This is a known problem for which we do not currently have a solution: it requires more understanding of the FORTRAN/C interface than any of us here at Unidata has. The basic problem is the you are reading a vector of variable-length strings. See here: https://github.com/Unidata/netcdf-fortran/issues/72 We(Unidata) has not yet been able to figure out how to properly define an API in fortran to access the strings in the vector. Any suggestions would be welcome. > > A couple of us in NCAR's MMM lab have been trying unsuccessfully read a > 'text' variable from a netCDF file via the Fortran90 interface to the > netCDF library. Having looked at documentation (e.g., > https://www.unidata.ucar.edu/software/netcdf/netcdf-4/newdocs/netcdf-f90/Reading-and-Writing-Character-String-Values.html#Reading-and-Writing-Character-String-Values) > and relevant support mailing list posts (e.g., > https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg11262.html), > we're still not having any success. > > I've attached the toy program that we're trying to use to read the text > variable, as well as a sample netCDF file from which we're trying to read. > The variable in question is named 'station_id'. > > Specifically, could you provide any insight as to how the call to > nf90_get_var at line 79 of the attached toy program should look? > > Any help would be very much appreciated! > > Michael > > =Dennis Heimbigner Unidata Ticket Details =================== Ticket ID: KZW-910212 Department: Support netCDF Priority: Normal Status: Open =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.