Recent Behavior Change in Warnings
Added by Matt Thompson almost 9 years ago
Uwe, et al,
Recently we here at NASA/GMAO noticed a change in CDO behavior as we now have a new warning. To wit, here is CDO 1.6.9:
(1030) $ cdo sinfon turb_import_checkpoint.20000415_210000.2 File format : netCDF4 -1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown constant 72 1 13824 1 F32 : RADLW 2 : unknown unknown constant 72 1 13824 1 F32 : RADLWC Grid coordinates : 1 : lonlat : points=13824 (48x288) lon : 1 to 48 by 1 degrees_east lat : 1 to 288 by 1 degrees_north Vertical coordinates : 1 : generic : levels=72 lev : 1 to 72 by 1 layer Time coordinate : 1 step RefTime = 2000-04-15 21:00:00 Units = minutes Calendar = standard YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2000-04-15 21:00:00 cdo sinfon: Processed 2 variables over 1 timestep ( 0.01s )
And with 1.7.0:
(1032) $ cdo sinfon turb_import_checkpoint.20000415_210000.2 Warning (varDefZaxis) : VCT missing File format : netCDF4 -1 : Institut Source Ttype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown constant 72 1 13824 1 F32 : RADLW 2 : unknown unknown constant 72 1 13824 1 F32 : RADLWC Grid coordinates : 1 : lonlat : points=13824 (48x288) lon : 1 to 48 by 1 degrees_east lat : 1 to 288 by 1 degrees_north Vertical coordinates : 1 : hybrid : levels=72 lev : 1 to 72 by 1 layer Time coordinate : 1 step RefTime = 2000-04-15 21:00:00 Units = minutes Calendar = standard YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2000-04-15 21:00:00 cdo sinfon: Processed 2 variables over 1 timestep ( 0.01s )
Now this example is with sinfon, but nearly all other operators--most notably, diffn--throw it as well:
(1042) $ cdo diffn turb_import_checkpoint.20000415_210000.1 turb_import_checkpoint.20000415_210000.2 Warning (varDefZaxis) : VCT missing cdo diffn: Processed 3981312 values from 4 variables over 2 timesteps ( 0.16s )
I'm guessing it has to do with the fact that it now sees the file as having hybrid levels, which it does and always has, compared to generic before.
Obviously we can suppress this with --no_warnings (we have scripts that do a diffn of about 20 files, so the warnings get voluminous), but I suppose I have two questions. One, why does diffn care about not having the VCT? Does diffn ever do remapping? sinfon and others, sure, they are informative, but diffn?
Second, let's say I'd like to remove these warnings by "fixing" the files when we write them out. Is there a global attribute or variable that needs to be set with our netCDF commands? In our model, we have ak and bk that we use to specify our hybrid levels. Is there a way to register the attributes "ak" and "bk" as the names of the VCT so that CDO would be satisfied if we added them to the file? (I'm guessing CDO, being ECHAM-focused probably has a different name for these arrays.) Of course, we'll probably just end up using --no_warnings, but it's always nice to not have to use that.
Thanks,
Matt
Replies (3)
RE: Recent Behavior Change in Warnings - Added by Uwe Schulzweida almost 9 years ago
Hi Matt,
You are right this warning message is not necessary, I have removed it in the next CDO release.
In CDO version 1.7.0 I have added support for hybrid sigma pressure coordinates following the CF convention. Older CDO versions support only our own ECHAM convention. For more information why your "VCT" is not detected correctly have a look at the CF convention or send the netCDF header of your file.
Cheers,
Uwe
RE: Recent Behavior Change in Warnings - Added by Matt Thompson almost 9 years ago
Uwe,
Thanks for the warning removal. I figure in some cases it's useful, just not diffn please.
As for the file, here is the header:
netcdf turb_import_checkpoint { dimensions: lon = 48 ; lat = 288 ; lev = 72 ; time = 1 ; variables: double lon(lon) ; lon:units = "degrees_east" ; lon:long_name = "Longitude" ; double lat(lat) ; lat:units = "degrees_north" ; lat:long_name = "Latitude" ; double lev(lev) ; lev:units = "layer" ; lev:long_name = "sigma at layer midpoints" ; lev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ; lev:coordinate = "eta" ; lev:positive = "down" ; lev:formulaTerms = "ap: ak b: bk ps: ps p0: p00" ; double time(time) ; time:units = "minutes since 2000-04-15 21:00:00" ; float RADLW(lev, lat, lon) ; RADLW:long_name = "air_temperature_tendency_due_to_longwave" ; RADLW:units = "K s-1" ; float RADLWC(lev, lat, lon) ; RADLWC:long_name = "clearsky_air_temperature_tendency_lw" ; RADLWC:units = "K s-1" ; }
So, as you can see, it is a hybrid and there is no ak or bk in it. I tried adding them as global attributes so they show up as (in a slimmed format since there are a lot of numbers!):
// global attributes: :ak = 1.f, 2.f, 3.27f, ...; :bk = 0.f, 0.f, 0.f, ... ;
with an ncdump -hc, but that wasn't enough it looks like as the warning is still thrown with sinfon. (Also, I couldn't figure out how to get cdo setgatt to do that; I had to use ncatted.)
RE: Recent Behavior Change in Warnings - Added by Uwe Schulzweida almost 9 years ago
CDO reads the "VCT" from the lev bounds, therefor the variable lev_bnds, ak_bnds and bk_bnds must be added. The attribute formular is missing and the attribute formularTerms must be renamed to formular_terms:
netcdf turb_import_checkpoint { dimensions: lon = 48 ; lat = 288 ; lev = 72 ; bnds = 2 ; time = 1 ; variables: double lon(lon) ; lon:units = "degrees_east" ; lon:long_name = "Longitude" ; double lat(lat) ; lat:units = "degrees_north" ; lat:long_name = "Latitude" ; double lev(lev) ; lev:units = "layer" ; lev:long_name = "sigma at layer midpoints" ; lev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ; lev:coordinate = "eta" ; lev:positive = "down" ; lev:formula = "p = ap + b*ps" ; lev:formula_terms = "ap: ak b: bk ps: ps p0: p00" ; lev:bounds = "lev_bnds" ; double ak(lev) ; ak:long_name = "vertical coordinate formula term: ak(k)" ; ak:units = "Pa" ; double bk(lev) ; bk:long_name = "vertical coordinate formula term: bk(k)" ; bk:units = "1" ; double lev_bnds(lev, bnds) ; lev_bnds:units = "layer" ; lev_bnds:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ; lev_bnds:formula = "p = ap + b*ps" ; lev_bnds:formula_terms = "ap: ak_bnds b: bk_bnds ps: ps p0: p00" ; double ak_bnds(lev, bnds) ; ak_bnds:long_name = "vertical coordinate formula term: ak(k+1/2)" ; ak_bnds:units = "Pa" ; double bk_bnds(lev, bnds) ; bk_bnds:long_name = "vertical coordinate formula term: bk(k+1/2)" ; bk_bnds:units = "1" ; double time(time) ; time:units = "minutes since 2000-04-15 21:00:00" ; float RADLW(lev, lat, lon) ; RADLW:long_name = "air_temperature_tendency_due_to_longwave" ; RADLW:units = "K s-1" ; float RADLWC(lev, lat, lon) ; RADLWC:long_name = "clearsky_air_temperature_tendency_lw" ; RADLWC:units = "K s-1" ; }