Project

General

Profile

cdo seldate missing attribute

Added by Maria Perez about 5 years ago

I'm using cdo seldate to extract a time period from a larger file. It works good but it is skipping an attribute.

Before cdo my netcdf looks like this:

Group / {
dimensions:
time = 248 ;
lat = 17 ;
lon = 49 ;

variables:
// Preference 'PRESERVE_FVD': false,
// dimensions consistent with ncBrowse, not with native MATLAB netcdf package.
double time(time), shape = [248]
time:units = "days since 1948-01-01 00:00:00.0" ;
time:coordinates = "T" ;
double lat(lat), shape = [17]
lat:units = "(N)" ;
lat:coordinates = "Y" ;
double lon(lon), shape = [49]
lon:units = "(E)" ;
lon:coordinates = "X" ;
double Uwind(time,lat,lon), shape = [248 17 49]
Uwind:units = "m s-1" ;
Uwind:long_name = "zonal wind" ;
Uwind:coordinates = "lat lon" ;

Then I do this cdo command
cdo seldate,${t0:0:4}-${t0:5:2}-${t0:8:2}T00:00:00,${t1:0:4}-${t1:5:2}-${t1:8:2}T21:00:00 ${afil_temp} ${rundir}/era_model2.nc

And an attribute disappears:
Group / {
dimensions:
time = UNLIMITED ; (24 currently)
lon = 49 ;
lat = 17 ;

variables:
// Preference 'PRESERVE_FVD': false,
// dimensions consistent with ncBrowse, not with native MATLAB netcdf package.
double time(time), shape = [24], Chunking = [512], Deflate = 0
time:standard_name = "time" ;
time:units = "days since 1948-01-01 00:00:00.0" ;
time:calendar = "standard" ;
time:axis = "T" ;
double lon(lon), shape = [49]
lon:units = "(E)" ;
lon:axis = "X" ;
double lat(lat), shape = [17]
lat:units = "(N)" ;
lat:axis = "Y" ;
double Uwind(time,lat,lon), shape = [24 17 49], Chunking = [1 17 49], Deflate = 0
Uwind:long_name = "zonal wind" ;
Uwind:units = "m s-1" ;

Am I missing something? the rest of the output looks good.
Thanks


Replies (1)

RE: cdo seldate missing attribute - Added by Karin Meier-Fleischer about 5 years ago

Hi Maria,

I think that CDO deletes the coordinates attribute because it is unnecessary as the dimensions are lat and lon, already.

-Karin

    (1-1/1)