Re: netcdf4 and ncdump

Hi Gerry + others

On Mon, Jun 11, 2007 at 10:24:24AM -0500, Gerry Creager wrote:
> Karsten,
> 
> If you can explain to me a bit more of your concern here, I might be 
> able to help with either NetCDF implementation or use of a spatial 
> database (with subsequent NetCDF translation?).

My aim is to make a very generic output scheme for an ocean model. At
run time I want to be able to store 'any' model variable - prognostic
and diagnostic - in any hyperslap. This is necessary since storing all
variables in the highest temporal resolution would soon fill up any normal
disk resources.

Typically examples would be surface values of e.g. temperature, bottom
values of oxygen etc - or vertical transects that could be used for
one-way nested models - or data corresponding to locations of buoys or
tide gauge stations. All of those would need higher temporal resolution
than what would be necessary/possible for the total calculation domain.

Since this is done in Fortran I want to use the namelist feature to
define the output specifications so I'll in the output namelist have a
maximum of MAX_GRPS specs ala:

id=drogden,irange=12:12,jrange=34:34,krange=ALL,trange=0,36,varlist=elev,U,V,uu,vv,
S,T

id=surface,irange=ALL,jrange=ALL,krange=25:25,trange=0,72,varlist=S,T

This is relative easy to pass in Fortran and allows me to make
individual groups for each of the id's given. The members of the varlist
will be mapped to the NetCDF4 varid via a Fortran type spec. 

All this works OK - I'll need to work a bit more on the parsing of the
specs - but the generation of the NetCDF4 file is OK.

And here my point comes in with regard to inherit coordinate variables
as well as dimensions. The ALL keyword falls back to the root dimensions
and the root dimensions corresponds to the total computational domain. 
It is easy to provide the - redundant - cordinate variaables for all
groups that has an ALL spec - but it is redundant :-) 

> 
> We're working on time-series observations and slabbed obs over time, as 
> well.  I've not had too many problems with NetCDF for this.

In NetCDF3 my scheme would require a new file for each group of variables 
I wanted so save with a different unlimited dimension - not so with
NetCDF4 :-). So in principle I do not have any problems with NetCDF3 or
NetCDF4.
> 
> gerry

Karsten

PS: Here is an example of the dimensions with 7 groups:

netcdf getm {
dimensions:
        lon = 130 ;
        lat = 5 ;
        z = 21 ;
variables:
        float lon(lon) ;
        float lat(lat) ;
        float level(z) ;

// global attributes:
                :title = "Haidvogel and Beckmann test case" ;
                :history = "Generated by getm, ver. 1.7.0" ;
data:

group: 2d {
dimensions:
        time = UNLIMITED ; // (0 currently)
}

group: 3d {
dimensions:
        time = UNLIMITED ; // (0 currently)
}

group: station {
dimensions:
        lon = 1 ;
        lat = 1 ;
        time = UNLIMITED ; // (0 currently)
}

group: surface {
dimensions:
        level = 1 ;
        time = UNLIMITED ; // (0 currently)
}

group: slab_xz {
dimensions:
        lat = 1 ;
        time = UNLIMITED ; // (0 currently)
}

group: slab_yz {
dimensions:
        lon = 1 ;
        time = UNLIMITED ; // (0 currently)
}

group: slab_xy {
dimensions:
        level = 1 ;
        time = UNLIMITED ; // (0 currently)
}
}


-- 
----------------------------------------------------------------------
Karsten Bolding                    Bolding & Burchard Hydrodynamics
Strandgyden 25                     Phone: +45 64422058
DK-5466 Asperup                    Fax:   +45 64422068
Denmark                            Email: karsten@xxxxxxxxxxxxxxxxxxxx

http://www.findvej.dk/Strandgyden25,5466,11,3
----------------------------------------------------------------------

==============================================================================
To unsubscribe netcdfgroup, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
==============================================================================


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