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

[netCDF #VZH-911645]: my 4-D netcdf data is not read by unidata fortran codes



Hi Pankaj,

> I am looking for urgent help in reading 4-D netcdf data. I have
> tried to read my data using UNIDATA various fortran codes and
> c-program but after successful compilation, "variable not found stop
> 2" message is delivered on executing although UNIDATA sample netcdf
> files are duly read using these fortran codes.

For netcdfread_4D.f90, you are using the wrong variable names for
what's actually in the netCDF file you're reading.  Try:

!      character (len = *), parameter :: LAT_NAME = "latitude"
       character (len = *), parameter :: LAT_NAME = "TLAT"
!      character (len = *), parameter :: LON_NAME = "longitude"
       character (len = *), parameter :: LON_NAME = "TLONG"

For the second program, netcdfread_4D.f90, the same problem occurs,
since there is no variable in the file named "data".  If you want to
read values of the variable named "BSI", try:

!      character (len = *), parameter :: VAR_NAME='data' 
       character (len = *), parameter :: VAR_NAME='BSI' 

--Russ

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: VZH-911645
Department: Support netCDF
Priority: Normal
Status: Closed