NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi I am a bit confused concerning use the functions nf90_get_var to read a character variable. Here is my part of the code to read the character variable: ierr=nf90_inq_varid(ncid,'platform_id',varid) ierr=nf90_Inquire_Variable(ncid,varid,vname,xtype,ndims,dimids,natts) ierr=nf90_get_var_schar (ncid,varid,sat%pi) print*, sat%pi(1:100) print*,'ierr=',ierr print*, trim(nf90_strerror(ierr)) print*,'vname=',vname when I run this code, there is a print: ierr= -56 NetCDF: Attempt to convert between text & numbers I used nf_get_var_text, but it still print the same error there is my variable’s information: platform_id (7517, 2) String, length = variable, 1371045 Number of attributes = 3 DIMENSION_LIST = 1-4388 comment = in situ platform ID, i.e. ship call sign or buoy WMO ID long_name = in situ platform ID And if I print the ‘xtype’,it will print ‘xtype=12’ I also wonder about what the xtype=12 stands for Best regards, Kevin
netcdfgroup
archives: