Project

General

Profile

mergetime excludes some 1-d variables

Added by Chris Fletcher almost 12 years ago

I have found that mergetime in CDO 1.5.4 excludes some 1-d variables.

With the uploaded files, when I do:
cdo mergetime tmp1.nc tmp2.nc merge.nc
I find that merge.nc does not contain 1-d variables hyam and hybm that are contained in both original files.

I assume that they are excluded because these variables are not functions of time. However, I think it would be convenient to have CDO include them in the merged file, either as a 1-d variable like they are now, or by adding a time dimension.

Would this feature be desirable and, if so, could it be added to a future release?

Thanks.


Replies (1)

RE: mergetime excludes some 1-d variables - Added by Jaison-Thomas Ambadan almost 12 years ago

Hi,

I assume that they are excluded because these variables are not functions of time.

The coefficients for the hybrid levels need not have to be a function of time. As far as I understood, the problem is that your file (especially hyam and hybm) doesn't follow the standard convention that CDO recognize. As far as CDO is concerned, they are part of the meta into. Since they are not properly defined, the cdo -sinfo will complain that the VCT (Vertical co-ordinate table is missing).

For example, here is the ncdump (from my test case, of merging two files without any problems, which have the hybrid co-ordinates)

netcdf test {
dimensions:
lon = 1 ;
lat = 1 ;
lev = 40 ;
nhym = 40 ;
nhyi = 41 ;
time = UNLIMITED ; // (2 currently)
variables:
double lon(lon) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:axis = "X" ;
double lat(lat) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:axis = "Y" ;
double lev(lev) ;
lev:standard_name = "hybrid_sigma_pressure" ;
lev:long_name = "hybrid level at layer midpoints" ;
lev:units = "level" ;
lev:positive = "down" ;
lev:formula = "hyam hybm (mlev=hyam+hybm*aps)" ;
lev:formula_terms = "ap: hyam b: hybm ps: aps" ;
double hyai(nhyi) ;
hyai:long_name = "hybrid A coefficient at layer interfaces" ;
hyai:units = "Pa" ;
double hybi(nhyi) ;
hybi:long_name = "hybrid B coefficient at layer interfaces" ;
hybi:units = "1" ;
double hyam(nhym) ;
hyam:long_name = "hybrid A coefficient at layer midpoints" ;
hyam:units = "Pa" ;
double hybm(nhym) ;
hybm:long_name = "hybrid B coefficient at layer midpoints" ;
hybm:units = "1" ;
double time(time) ;
time:standard_name = "time" ;
time:units = "hours since 2007-05-24 00:00:00" ;
time:calendar = "proleptic_gregorian" ;
float var11(time, lev, lat, lon) ;
var11:table = 2 ;

...

You could try "ncrcat" or "ncks" to merge these files without loosing the coefficients.

Hope this helps.
Cheers,
J.

    (1-1/1)