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

[netCDF #UKJ-700587]: How to read 1-D string array from a netcdf in Fortran?

This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.


  • Subject: [netCDF #UKJ-700587]: How to read 1-D string array from a netcdf in Fortran?
  • Date: Tue, 28 Aug 2018 19:03:02 -0600

Unfortunately, this is a known problem with the netcdf fortran interface
and with the Fortran 2003 C interface. Frankly, we have not figured out
how to read  the netcdf-4 String type in Fortran. If you have any suggestions, 
we would appreciate any help you can provide.
re:https://github.com/Unidata/netcdf-fortran/issues/72


> 
> I was trying to use NF90_GET_VAR to read 1-D string array variable from
> a netcdf file in Fortran. The code is as below:
> 
> CALL CHECK( NF90_GET_VAR ( FID, VARID, XTime_UTC,(/1,1/),(/6,XNNCrIS/) ), 20)
> 
> I taken the 1-D string array as a 2-D character array.
> 
> And it didn't work. The bug is as below:
> 
> NetCDF: Mapped access for atomic types only
> 
> Would you please help me about this?
> 
> Thank you
> Hansen
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: UKJ-700587
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.