[netcdfgroup] trouble with NF_PUT_VARA_REAL

Hello all,

I am attempting to use the NF_PUT_VARA_REAL routine to write a series of
two dimensional arrays where each array represents a quantity on a
single horizontal level.  The array is sized 1152x721 and there are 72
levels to be written.  An ncdump of the resulting file shows that all of
the values for 'Q' are '_' instead of real physical values.

Any ideas?

Should the dataset dimensions have the same order as the variable
dimensions?

Here are my 'start' and 'count' arrays.  I can probably get rid of the
time dimension since the file will never contain more than one time.

       start(1) = 1
       start(2) = 1
       start(3) = lev
       start(4) = 1
       count(1) = 1152
       count(2) = 721
       count(3) = 1
       count(4) = 1
       STATUS = NF_PUT_VARA_REAL(fid, varid, start, count, VAR)

ncdump of the resulting file gives

dimensions:
        lon = 1152 ;
        lat = 721 ;
        lev = 72 ;
        time = UNLIMITED ; // (1 currently)
variables:
        double lon(lon) ;
                lon:long_name = "longitude" ;
                lon:units = "degrees_east" ;
        double lat(lat) ;
                lat:long_name = "latitude" ;
                lat:units = "degrees_north" ;
        double lev(lev) ;
                lev:long_name = "vertical level" ;
                lev:units = "layer" ;
                lev:positive = "down" ;
                lev:coordinate = "eta" ;
                lev:standard_name = "model_layers" ;
        int time(time) ;
                time:long_name = "time" ;
                time:units = "minutes since 2009-01-01 00:00:00" ;
                time:time_increment = 60000 ;
                time:begin_date = 20090101 ;
                time:begin_time = 0 ;
        float Q(time, lev, lat, lon) ;
                Q:long_name = "specific_humidity" ;
                Q:units = "1" ;
                Q:_FillValue = 1.e+15f ;
                Q:missing_value = 1.e+15f ;
                Q:fmissing_value = 1.e+15f ;
                Q:scale_factor = 1.f ;
                Q:add_offset = 0.f ;
                Q:standard_name = "specific_humidity" ;
                Q:vmin = 1.e+15f ;
                Q:vmax = 1.e+15f ;
                Q:valid_range = 1.e+15f, 1.e+15f ;

data:

 Q =
  _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _,
    _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_,

-- 
Dan Kokron
Global Modeling and Assimilation Office
NASA Goddard Space Flight Center
Greenbelt, MD 20771
Daniel.S.Kokron@xxxxxxxx
Phone: (301) 614-5192
Fax:   (301) 614-5304



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