Re: [netcdfgroup] NF90_GET_VAR from netcdf-fortran-4.4.3 release does not work with compound user defined type variable

On 04/22/2016 10:37 AM, Arlindo Arriaga wrote:
Dear all


NASA has decided to change formats of MODIS data files with ocean biology
products from hdf4 to netcdf-4, and my software turned useless.  I was asked
to change my Fortran executables from hdf4 to netcdf-4. After training
myself to get control on using netcdf-4 library functions of Fortran
interface, I hit on a road bloc: the function NF90_GET_VAR  to read datasets
works well for arrays of single types (integers or reals) but NOT for
compound user defined types, like the structure sstdata

TYPE binSST
real(kind=4) :: sum
real(kind=4) :: sum2
end TYPE binSST

TYPE(binSST), allocatable, dimension(:) :: sstdata


In case someone has hit on a similar problem or has a suggestion, I would
kindly appreciate the help.
I work in Linux (Ubuntu) 64 bits, and the Fortran compiler is gfortran.

Arlindo,

Are you trying to use compound variables using nf90_def_compound, a la:

http://stackoverflow.com/questions/6924073/netcdf-and-fortran-structures

I've used these before and they seem to work well. If not, what does your code look like?

Matt


--
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC,    Global Modeling and Assimilation Office
Code 610.1,  8800 Greenbelt Rd,  Greenbelt,  MD 20771
Phone: 301-614-6712                 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson



  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: