NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Leon, > On Fri, Feb 22, 2013 at 2:59 PM, Russ Rew <russ@xxxxxxxxxxxxxxxx> wrote: > > > > And I override these defaults by providing a chunksizes array when > > calling > > > NF90_DEF_VAR? > > > > Not quite. You have to call nc_def_var_chunking(..., chunkshape) for > > each variable *before* calling nc_enddef(). > > > I don't see a Fortran 90 equivalent of nc_def_var_chunking, and providing a > chunksizes array when calling NF90_DEF_VAR seems to have the desired > effect. For example: > > dimensions: > step = UNLIMITED ; > cell = 100 ; > variables: > float temperature(step, cell) ; > temperature:_Storage = "chunked" ; > temperature:_ChunkSizes = 1000, 100 ; > ... > > Am I missing something by doing it this way? Oops, sorry, I was answering in the context of the C API and should have noticed the question was about F90. There *is* a Fortran 90 equivalent to nc_def_var_chunking, using optional arguments to nf90_def_var: http://www.unidata.ucar.edu/netcdf/docs/netcdf-f90.html#NF90_005fDEF_005fVAR The "storage" and "chunksizes" arguments are what you want. Creating variable "special attributes" that begin with "_" won't work. The only special attribute that the library understands is "_FillValue". The other special attributes that begin with "_" were not intended for setting properties from library APIs, but just for displaying and setting them in CDL, as the ncgen documentation says: These special virtual attributes are not actually part of the file, they are merely a convenient way to set miscellaneous properties of the data in CDL The special attributes currently supported are as follows: `_Format', `_Fletcher32, `_ChunkSizes', `_Endianness', `_DeflateLevel', `_Shuffle', and `_Storage'. In recent versions of the C-based netCDF library, the ncgen utility interprets these special attributes and converts them into the necessary netCDF function calls, but the library functions don't do that. I guess we need to return an error for attempts to use special attributes in the library APIs as a substitute for function calls, if we're not going to interpret them at a low level in the library. --Russ
netcdfgroup
archives: