Hello,
Is it possible to read an array of strings (constant length) in fortran?
Below are specifics. Comments/help much appreciated - thanks.
Mark
netcdf file:
....
        int nlocs(nlocs) ;
                nlocs:suggested_chunk_dim = 429LL ;
....
group: MetaData {
  variables:
        string datetime(nlocs) ;
                string datetime:_FillValue = "" ;
                string datetime:units = "" ;
ncdump -v  datetime file.nc
.......
  datetime = "2021-09-30T23:02:25Z", "2021-09-30T23:07:25Z",
      "2021-09-30T23:09:23Z", "2021-09-30T23:17:25Z",
"2021-09-30T23:19:22Z",
.......
f90 code:
.......
INTEGER, PARAMETER :: date_string_length=20
CHARACTER(len=date_string_length), ALLOCATABLE :: aertimestr(:)
.......
CALL check_nc(nf90_inq_grp_ncid(ncid,"MetaData",grpid))
CALL check_nc(nf90_inq_varid(grpid,"datetime",varid))
CALL check_nc(nf90_get_var(grpid,varid,aertimestr))
.......
Error:
NetCDF: Attempt to convert between text & numbers