Re: [netcdfgroup] How to define hybrid sigma pressure coordinates?

Hi Andreas,

Three comments that I think might clear things up a bit:

1) The CF specification is a bit fuzzy around how to deal with a
dimensionless vertical coordinate whose formula includes two 1-D terms.

It does say that a "coordinate variable is associated with its
definition by the value of the standard_name [and formula_terms]
attributes". Which means you need a coordinate variable (i.e., a 1-D
variable whose name matches its dimension name) for each vertical
dimension, in your case "levm(levm)" and "levi(levi)".

Best practice is to fill the vertical coordinate variables with
approximate pressure level values and provide separate 1-D variables for
the formula terms. This allows applications that don't understand
dimensionless vertical coordinates (or don't want to go through all the
calculations) to use the vertical coordinate variables as a "reasonable"
approximation of pressure levels.

2) It looks like you are using the a/b formula rather than the ap/b
formula which means you need a "p0" term in your formula_terms attribute.

3) None of the netCDF libraries automatically calculate the pressure
values from dimensionless coordinates. The netCDF C library does not
include features to deal with CF. The CF side of things is left to a
separate library, libcf. However, I don't believe libcf currently
include handling of dimensionless coordinates. The netCDF Java library
includes capabilities to deal with various parts of the CF specification
including dimensionless coordinates. I'm not sure what other libraries
deal with CF dimensionless coordinates.

Hope that helps,

Ethan

On 8/19/2010 7:04 AM, Andreas Hilboll wrote:
> Hi there,
> 
> I am confused about how to define hybrid sigma pressure coordinates. I
> am aware of the CF1.4 metadata conventions, and tried to adhere to them.
> I attached the header of the file I created.
> 
> From my understanding, everything should be okay. However, the variables
> levm and levi don't show any values? I would have thought that NetCDF
> would calculate the pressures automatically, because all the information
> necessary is there?
> 
> I took a look at one of the example files
> (http://www.unidata.ucar.edu/software/netcdf/examples/cami_0000-09-01_64x128_L26_c030918.nc)
> shown on the NetCDF homepage. However, there, the lev and levi variables
> are only 1d, even though according to the formula_terms they also depend
> on PS, which in turn is 3d ... I'm lost.
> 
> Thanks for your insight!


> netcdf sat_2007-06_comp {
> dimensions:
>       lat = 64 ;
>       lon = 128 ;
>       levm = UNLIMITED ; // (60 currently)
>       levi = UNLIMITED ; // (61 currently)
>       time = UNLIMITED ; // (720 currently)
> variables:
>       float lat(lat) ;
>               lat:standard_name = "latitude" ;
>               lat:units = "degrees_north" ;
>               lat:long_name = "latitude" ;
>               lat:label = "Latitude [deg]" ;
>       float lon(lon) ;
>               lon:standard_name = "longitude" ;
>               lon:units = "degrees_east" ;
>               lon:long_name = "longitude" ;
>               lon:label = "Longitude [deg]" ;
>       float hyam(levm) ;
>               hyam:long_name = "hybrid A coefficient at layer midpoints" ;
>       float hybm(levm) ;
>               hybm:long_name = "hybrid B coefficient at layer midpoints" ;
>       float hyai(levi) ;
>               hyai:long_name = "hybrid A coefficient at layer interfaces" ;
>       float hybi(levi) ;
>               hybi:long_name = "hybrid B coefficient at layer interfaces" ;
>       float levm(time, levm, lat, lon) ;
>               levm:long_name = "hybrid level at midpoints" ;
>               levm:units = "hPa" ;
>               levm:standard_name = 
> "atmosphere_hybrid_sigma_pressure_coordinate" ;
>               levm:formula_terms = "a: hyam b: hybm ps: surface_pressure" ;
>       float levi(time, levi, lat, lon) ;
>               levi:long_name = "hybrid level at interfaces" ;
>               levi:units = "hPa" ;
>               levi:standard_name = 
> "atmosphere_hybrid_sigma_pressure_coordinate" ;
>               levi:formula_terms = "ap: hyai b: hybi ps: surface_pressure" ;
>       float time(time) ;
>               time:standard_name = "time" ;
>               time:units = "hours since 1990-01-01 00:00:00 +0:00" ;
>               time:long_name = "hours since 1990-01-01 00:00:00 +0:00" ;
>               time:calendar = "gregorian" ;
>               time:label = "Date" ;
>       float surface_pressure(time, lat, lon) ;
>               surface_pressure:units = "hPa" ;
>               surface_pressure:long_name = "surface pressure" ;
>               surface_pressure:label = "surface pressure [hPa]" ;
>       float tropopause_height(time, lat, lon) ;
>               tropopause_height:units = "m" ;
>               tropopause_height:standard_name = "tropopause_altitude" ;
>               tropopause_height:long_name = "tropopause height above surface 
> from ECMWF-IFS potential vorticity" ;
>               tropopause_height:label = "tropopause height above surface [m]" 
> ;
>       float no2(time, levm, lat, lon) ;
>               no2:units = "m3/m3" ;
>               no2:standard_name = 
> "volume_mixing_ratio_of_nitrogen_dioxide_in_air" ;
>               no2:long_name = "volume mixing ratio NO2" ;
>               no2:label = "VMR NO2 [m3/m3]" ;
>       float hcho(time, levm, lat, lon) ;
>               hcho:units = "m3/m3" ;
>               hcho:standard_name = 
> "volume_mixing_ratio_of_formaldehyde_in_air" ;
>               hcho:long_name = "volume mixing ratio HCHO" ;
>               hcho:label = "VMR HCHO [m3/m3]" ;
>       float so2(time, levm, lat, lon) ;
>               so2:units = "m3/m3" ;
>               so2:standard_name = 
> "volume_mixing_ratio_of_sulfur_dioxide_in_air" ;
>               so2:long_name = "volume mixing ratio SO2" ;
>               so2:label = "VMR SO2 [m3/m3]" ;
>       float chocho(time, levm, lat, lon) ;
>               chocho:units = "m3/m3" ;
>               chocho:standard_name = "volume_mixing_ratio_of_glyoxal_in_air" ;
>               chocho:long_name = "volume mixing ratio CHOCHO" ;
>               chocho:label = "VMR CHOCHO [m3/m3]" ;
>       float altitude(time, levm, lat, lon) ;
>               altitude:units = "m" ;
>               altitude:standard_name = "altitude" ;
>               altitude:long_name = "altitude above surface" ;
>               altitude:label = "altitude above surface [m]" ;
>       float temperature(time, levm, lat, lon) ;
>               temperature:units = "K" ;
>               temperature:standard_name = "air_temperature" ;
>               temperature:long_name = "air temperature" ;
>               temperature:label = "air temperature [K]" ;
> 
> // global attributes:
>               :description = "Test dataset" ;
>               :Conventions = "CF-1.4" ;
>               :title = "2007/06" ;
>               :institution = "Institute of Environmental Physics, University 
> of Bremen, Germany." ;
>               :history = "This file was created on Thu Aug 19 14:17:10 2010 
> by test-compression.py" ;
>               :contact = "Andreas Hilboll <hilboll@xxxxxxxxxxxxxxxxxxxxxxxx>" 
> ;
> }



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