[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: 20010123: nc-3.5 Fortran 90: nf90_get_var() on 2D character v ariable



Steve and Robert,

Thanks very much for the reply.  Below is an example of the data that
I was trying to read in, the variable is called "band_name".
Also, this netCDF file was written by a c or c++ program.  We used the
c - interface to netCDF and we were able to read the strings in without any
problem.  

For some reason, when attempting to read in this data with the F90
interface,
I was only able to read in the first item in the array.

I had my declarations something like the following:

Character ( Len = string_len ) :: CharData(:,:)

I was able to get the varID, dimensionID's, etc and there was no error
returned by the program (status == nf90_noerror).

Anyway, if you have suggestions for improving the structure of this data, I
am
very much open to suggestions.  Thanks again for your help.  By the way,
I really like the F90 interface to netCDF...

Dave





netcdf sts_viirs_radiometry_bands_v5 {
dimensions:
        scans = UNLIMITED ; // (1 currently)
        lines = 1024 ;
        samples = 16 ;
        bands = 16 ;
        string_len = 16 ;
        nPar19 = 19 ;
variables:
    ...some variables...

        char band_name(string_len, bands) ;
                band_name:long_name = "Accepted band name" ;

    ...more variables...
  
        data:

 band_name =
  "M1",
  "M2",
  "M3",
  "M4",
  "M5",
  "M6",
  "M7",
  "M8",
  "M9",
  "M10",
  "M11",
  "M12",
  "M13",
  "M14",
  "M15",
  "M16" ;
}