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

[netCDF #GDF-838214]: netcdf formatted dump index reporting ... wrong



Hi Tim,

I believe this is an issue that has been fixed in our development branch and is 
present in the current release candidate, 4.4.0-rc5.  Note that there are other 
issues with rc5 (that I've fixed as of this week, but have not made a release 
for yet), so I wouldn't recommend it for daily use.  I've attached the output 
of an ncdump from 4.4.0-rc5; at a glance it looks right to me, but you are more 
familiar with the data.  Can you take a look and let me know if it looks like 
what you would expect?

If so, then the upcoming 4.4.0 release should address this.  If not, then we 
have another issues that needs to be addressed.

Thanks, have a great day,

-Ward

> #1 - YES, I know the default indexing is C-based.
> #2 - YES, the problem occurs whether I use   -f f    -or-   -f c
> #3 - YES, it happens with multiple versions.
> #4 - YES, it happens with multiple files.
> 
> I’m on yellowstone, using
> 
> 0[2180] yslogin6:~/<3>models/jules/work $ module list
> 
> Currently Loaded Modules:
> 
> 1) ncarenv/1.0    2) ncarbinlibs/1.1    3) intel/12.1.5    4)
> ncarcompilers/1.0    5) netcdf/4.3.0
> 
> 0[2181] yslogin6:~/<3>models/jules/work $ date
> Wed Dec 30 12:54:18 MST 2015
> 
> 0[2182] yslogin6:~/<3>models/jules/work $ pwd
> /glade/p/work/thoar/DART/jules/models/jules/work
> 
> 
> 0[2184] yslogin6:~/<3>models/jules/work $ ncdump -f f -v
> land_tile_fractions check_me_out.nc > netcdf_4_3_0_dump.txt
> 
> 
> and I think the indexing is wrong … land_tile_fractions is dimensioned
> (9,1,14),
> I’m asking for a Fortran-style indexing scheme, and I only get the
> rightmost index going up to 13, AND … worse, I get TWO   (1,1,1)  values …
> seems like all the items that should be indexed 14 get incorrectly
> addressed as a duplicate of a previous value.  The DATA is correct, just
> the indexing is wrong.
> 
> 
> Please check the attached log and I’ve included the netCDF file in question.
> I have used both 4_3_0 and 4_3_3 with multiple netCDF files and believe
> this problem
> is repeatable across these tests.
> 
> Tim
> 
> Tim Hoar
> Data Assimilation Research Section
> Institute for Mathematics Applied to Geosciences
> National Center for Atmospheric Research
> address@hidden
> 303.497.1708
> 
> 


Ticket Details
===================
Ticket ID: GDF-838214
Department: Support netCDF
Priority: Normal
Status: Closed
netcdf check_me_out {
dimensions:
        metadatalength = 64 ;
        locationrank = 3 ;
        copy = 1 ;
        time = UNLIMITED ; // (1 currently)
        NMLlinelen = 129 ;
        NMLnlines = 372 ;
        StateVariable = 952 ;
        x = 14 ;
        y = 1 ;
        soil = 4 ;
        land = 14 ;
        tile = 9 ;
        scpool = 1 ;
        longitude = 3 ;
        latitude = 5 ;
variables:
        int copy(copy) ;
                copy:long_name = "ensemble member or copy" ;
                copy:units = "nondimensional" ;
                copy:valid_range = 1, 1 ;
        char CopyMetaData(copy, metadatalength) ;
                CopyMetaData:long_name = "Metadata for each copy/member" ;
        char inputnml(NMLnlines, NMLlinelen) ;
                inputnml:long_name = "input.nml contents" ;
        double time(time) ;
                time:long_name = "time" ;
                time:axis = "T" ;
                time:cartesian_axis = "T" ;
                time:calendar = "gregorian" ;
                time:units = "days since 1601-01-01 00:00:00" ;
        float x(y, x) ;
                x:long_name = "land-only gridcell longitudes" ;
                x:cartesian_axis = "X" ;
                x:units = "degrees_east" ;
                x:valid_range = 0.f, 360.f ;
        float y(y, x) ;
                y:long_name = "land-only gridcell latitudes" ;
                y:cartesian_axis = "Y" ;
                y:units = "degrees_north" ;
                y:valid_range = -90.f, 90.f ;
        float soil(soil) ;
                soil:long_name = "coordinate soil levels" ;
                soil:cartesian_axis = "Z" ;
                soil:units = "m" ;
        float land_tile_fractions(tile, y, x) ;
                land_tile_fractions:long_name = "land-only gridcell tile 
fractions" ;
                land_tile_fractions:units = "" ;
                land_tile_fractions:valid_range = 0.f, 1.f ;
        float longitude(latitude, longitude) ;
                longitude:long_name = "physical-space longitudes" ;
                longitude:cartesian_axis = "X" ;
                longitude:units = "degrees_east" ;
                longitude:valid_range = 0.f, 360.f ;
        float latitude(latitude, longitude) ;
                latitude:long_name = "physical-space latitudes" ;
                latitude:cartesian_axis = "Y" ;
                latitude:units = "degrees_north" ;
                latitude:valid_range = -90.f, 90.f ;
        float physical_tile_fractions(tile, latitude, longitude) ;
                physical_tile_fractions:long_name = "physical-space tile 
fractions" ;
                physical_tile_fractions:units = "" ;
                physical_tile_fractions:valid_range = 0.f, 1.f ;
        float land_fraction(latitude, longitude) ;
                land_fraction:long_name = "physical-space land fractions" ;
                land_fraction:units = "" ;
                land_fraction:valid_range = 0.f, 1.f ;
                land_fraction:comment = "1==land, 0==not land" ;
        float canopy(time, copy, tile, land) ;
                canopy:long_name = "canopy" ;
                canopy:DART_kind = "KIND_CANOPY_WATER" ;
                canopy:units = "" ;
                canopy:missing_value = -9999.f ;
                canopy:_FillValue = -9999.f ;
        float gs(time, copy, land) ;
                gs:long_name = "gs" ;
                gs:DART_kind = "KIND_SURFACE_CONDUCTANCE" ;
                gs:units = "" ;
                gs:missing_value = -9999.f ;
                gs:_FillValue = -9999.f ;
        float tstar_tile(time, copy, tile, land) ;
                tstar_tile:long_name = "tstar_tile" ;
                tstar_tile:DART_kind = "KIND_SKIN_TEMPERATURE" ;
                tstar_tile:units = "" ;
                tstar_tile:missing_value = -9999.f ;
                tstar_tile:_FillValue = -9999.f ;
        float t_soil(time, copy, soil, land) ;
                t_soil:long_name = "t_soil" ;
                t_soil:DART_kind = "KIND_SOIL_TEMPERATURE" ;
                t_soil:units = "" ;
                t_soil:missing_value = -9999.f ;
                t_soil:_FillValue = -9999.f ;
        float cs(time, copy, scpool, land) ;
                cs:long_name = "cs" ;
                cs:DART_kind = "KIND_SOIL_CARBON" ;
                cs:units = "" ;
                cs:missing_value = -9999.f ;
                cs:_FillValue = -9999.f ;
        float sthuf(time, copy, soil, land) ;
                sthuf:long_name = "sthuf" ;
                sthuf:DART_kind = "KIND_SOIL_MOISTURE_FRACTION" ;
                sthuf:units = "" ;
                sthuf:missing_value = -9999.f ;
                sthuf:_FillValue = -9999.f ;
        float snow_tile(time, copy, tile, land) ;
                snow_tile:long_name = "snow_tile" ;
                snow_tile:DART_kind = "KIND_SNOW_WATER" ;
                snow_tile:units = "" ;
                snow_tile:missing_value = -9999.f ;
                snow_tile:_FillValue = -9999.f ;
        float rho_snow(time, copy, tile, land) ;
                rho_snow:long_name = "rho_snow" ;
                rho_snow:DART_kind = "KIND_SNOW_BULK_DENSITY" ;
                rho_snow:units = "" ;
                rho_snow:missing_value = -9999.f ;
                rho_snow:_FillValue = -9999.f ;
        float snow_depth(time, copy, tile, land) ;
                snow_depth:long_name = "snow_depth" ;
                snow_depth:DART_kind = "KIND_SNOW_THICKNESS" ;
                snow_depth:units = "" ;
                snow_depth:missing_value = -9999.f ;
                snow_depth:_FillValue = -9999.f ;
        float smcl(time, copy, soil, y, x) ;
                smcl:long_name = "Gridbox moisture content of each soil layer" ;
                smcl:DART_kind = "KIND_SOIL_MOISTURE" ;
                smcl:units = "kg m-2" ;
                smcl:missing_value = -1.e+20f ;
                smcl:_FillValue = -1.e+20f ;
        float esoil(time, copy, tile, y, x) ;
                esoil:long_name = "Tile surface evapotranspiration from soil 
moisture store for snow-free land tiles" ;
                esoil:DART_kind = "KIND_LATENT_HEAT_FLUX" ;
                esoil:units = "kg m-2 s-1" ;
                esoil:missing_value = -1.e+20f ;
                esoil:_FillValue = -1.e+20f ;

// global attributes:
                :title = "just testing a restart" ;
                :assim_model_source = "$URL: 
https://subversion.ucar.edu/DAReS/DART/branches/jules/assim_model/assim_model_mod.f90
 $" ;
                :assim_model_revision = "$Revision: 7959 $" ;
                :assim_model_revdate = "$Date: 2015-05-06 16:18:27 -0600 (Wed, 
06 May 2015) $" ;
                :creation_date = "YYYY MM DD HH MM SS = 2015 12 30 12 46 18" ;
                :model_source = "$URL: 
https://subversion.ucar.edu/DAReS/DART/branches/jules/models/jules/model_mod.f90
 $" ;
                :model_revision = "$Revision: 9349 $" ;
                :model_revdate = "$Date: 2015-12-29 15:42:01 -0700 (Tue, 29 Dec 
2015) $" ;
                :model = "JULES" ;
data:

 land_tile_fractions =
  0.2,   // land_tile_fractions(1,1,1)
    0,   // land_tile_fractions(2,1,1)
    0,   // land_tile_fractions(3,1,1)
    0.1,   // land_tile_fractions(4,1,1)
    0,   // land_tile_fractions(5,1,1)
    0,   // land_tile_fractions(6,1,1)
    0,   // land_tile_fractions(7,1,1)
    0,   // land_tile_fractions(8,1,1)
    0,   // land_tile_fractions(9,1,1)
    0,   // land_tile_fractions(10,1,1)
    0,   // land_tile_fractions(11,1,1)
    0,   // land_tile_fractions(12,1,1)
    0,   // land_tile_fractions(13,1,1)
    0,  // land_tile_fractions(15,1,1)
    0.1,   // land_tile_fractions(1,1,2)
    0,   // land_tile_fractions(2,1,2)
    0,   // land_tile_fractions(3,1,2)
    0.1,   // land_tile_fractions(4,1,2)
    0,   // land_tile_fractions(5,1,2)
    0.1,   // land_tile_fractions(6,1,2)
    0,   // land_tile_fractions(7,1,2)
    0,   // land_tile_fractions(8,1,2)
    0,   // land_tile_fractions(9,1,2)
    0,   // land_tile_fractions(10,1,2)
    0,   // land_tile_fractions(11,1,2)
    0,   // land_tile_fractions(12,1,2)
    0,   // land_tile_fractions(13,1,2)
    0,  // land_tile_fractions(15,1,2)
    0.3,   // land_tile_fractions(1,1,3)
    0,   // land_tile_fractions(2,1,3)
    0,   // land_tile_fractions(3,1,3)
    0.4,   // land_tile_fractions(4,1,3)
    0,   // land_tile_fractions(5,1,3)
    0.4,   // land_tile_fractions(6,1,3)
    0,   // land_tile_fractions(7,1,3)
    0,   // land_tile_fractions(8,1,3)
    0,   // land_tile_fractions(9,1,3)
    0,   // land_tile_fractions(10,1,3)
    0,   // land_tile_fractions(11,1,3)
    0,   // land_tile_fractions(12,1,3)
    0,   // land_tile_fractions(13,1,3)
    0,  // land_tile_fractions(15,1,3)
    0.2,   // land_tile_fractions(1,1,4)
    0,   // land_tile_fractions(2,1,4)
    0,   // land_tile_fractions(3,1,4)
    0.1,   // land_tile_fractions(4,1,4)
    0,   // land_tile_fractions(5,1,4)
    0,   // land_tile_fractions(6,1,4)
    0,   // land_tile_fractions(7,1,4)
    0,   // land_tile_fractions(8,1,4)
    0,   // land_tile_fractions(9,1,4)
    0,   // land_tile_fractions(10,1,4)
    0,   // land_tile_fractions(11,1,4)
    0,   // land_tile_fractions(12,1,4)
    0,   // land_tile_fractions(13,1,4)
    0,  // land_tile_fractions(15,1,4)
    0,   // land_tile_fractions(1,1,5)
    0,   // land_tile_fractions(2,1,5)
    0,   // land_tile_fractions(3,1,5)
    0,   // land_tile_fractions(4,1,5)
    0,   // land_tile_fractions(5,1,5)
    0,   // land_tile_fractions(6,1,5)
    0,   // land_tile_fractions(7,1,5)
    0,   // land_tile_fractions(8,1,5)
    0,   // land_tile_fractions(9,1,5)
    0,   // land_tile_fractions(10,1,5)
    0,   // land_tile_fractions(11,1,5)
    0,   // land_tile_fractions(12,1,5)
    0,   // land_tile_fractions(13,1,5)
    0,  // land_tile_fractions(15,1,5)
    0,   // land_tile_fractions(1,1,6)
    0,   // land_tile_fractions(2,1,6)
    0,   // land_tile_fractions(3,1,6)
    0,   // land_tile_fractions(4,1,6)
    0,   // land_tile_fractions(5,1,6)
    0,   // land_tile_fractions(6,1,6)
    0,   // land_tile_fractions(7,1,6)
    0,   // land_tile_fractions(8,1,6)
    0,   // land_tile_fractions(9,1,6)
    0,   // land_tile_fractions(10,1,6)
    0,   // land_tile_fractions(11,1,6)
    0,   // land_tile_fractions(12,1,6)
    0,   // land_tile_fractions(13,1,6)
    0,  // land_tile_fractions(15,1,6)
    0,   // land_tile_fractions(1,1,7)
    0,   // land_tile_fractions(2,1,7)
    0,   // land_tile_fractions(3,1,7)
    0,   // land_tile_fractions(4,1,7)
    0,   // land_tile_fractions(5,1,7)
    0,   // land_tile_fractions(6,1,7)
    0,   // land_tile_fractions(7,1,7)
    0,   // land_tile_fractions(8,1,7)
    0,   // land_tile_fractions(9,1,7)
    0,   // land_tile_fractions(10,1,7)
    0,   // land_tile_fractions(11,1,7)
    0,   // land_tile_fractions(12,1,7)
    0,   // land_tile_fractions(13,1,7)
    0,  // land_tile_fractions(15,1,7)
    0.2,   // land_tile_fractions(1,1,8)
    1,   // land_tile_fractions(2,1,8)
    1,   // land_tile_fractions(3,1,8)
    0.3,   // land_tile_fractions(4,1,8)
    1,   // land_tile_fractions(5,1,8)
    0.5,   // land_tile_fractions(6,1,8)
    1,   // land_tile_fractions(7,1,8)
    1,   // land_tile_fractions(8,1,8)
    1,   // land_tile_fractions(9,1,8)
    1,   // land_tile_fractions(10,1,8)
    1,   // land_tile_fractions(11,1,8)
    1,   // land_tile_fractions(12,1,8)
    1,   // land_tile_fractions(13,1,8)
    1,  // land_tile_fractions(15,1,8)
    0,   // land_tile_fractions(1,1,9)
    0,   // land_tile_fractions(2,1,9)
    0,   // land_tile_fractions(3,1,9)
    0,   // land_tile_fractions(4,1,9)
    0,   // land_tile_fractions(5,1,9)
    0,   // land_tile_fractions(6,1,9)
    0,   // land_tile_fractions(7,1,9)
    0,   // land_tile_fractions(8,1,9)
    0,   // land_tile_fractions(9,1,9)
    0,   // land_tile_fractions(10,1,9)
    0,   // land_tile_fractions(11,1,9)
    0,   // land_tile_fractions(12,1,9)
    0,   // land_tile_fractions(13,1,9)
    0;  // land_tile_fractions(15,1,9)
    }