netcdf file with non linear time
Arlindo da Silva
arlindo.dasilva at GMAIL.COM
Mon Mar 16 21:15:27 EDT 2009
On Tue, Mar 10, 2009 at 4:17 AM, Heiner Körnich <heiner at misu.su.se> wrote:
> Hi,
>
> I don't think that GrADS can handle this. You could split the dates into
> separate files with some netcdf tool (eg. NCO or CDO), and then open three
> files in GrADS instead.
>
If you are willing to lie to grads you can create a DDF file where you
redefine the TDEF record to be linear (not true to what the data
really is); see documentation for the xdfopen command. You should be
able to plot your data without having to rewrite your file, provide
you keep in mind that grads does not have an accurate description of
"time" in this case.
Arlindo
> Regards,
> Heiner
>
> On Tue, Mar 10, 2009 at 8:58 AM, Francoise Cheroux
> <francoise.cheroux at meteo.fr> wrote:
>>
>> Hello,
>>
>> We have data in a netcdf file with non linear time, that is 2 January, 11
>> January and 21 Januany (see the file header below). Grads plots the data
>> as
>> if they were 2 January, 11 and 20 January (regular 10 day intervals).
>>
>> How could grads take into account the dates written in the netcdf file?
>>
>> Thanks for your response.
>>
>> Regards,
>>
>> Martine Michou
>>
>>
>>
>> netcdf CCMVal2_REF-B1_CNRM-ACM_2_T3I_va_01 {
>> dimensions:
>> lon = 128 ;
>> lat = 64 ;
>> plev = 60 ;
>> time = UNLIMITED ; // (3 currently)
>> variables:
>> float lon(lon) ;
>> lon:long_name = "longitude" ;
>> lon:units = "degrees_east" ;
>> lon:standard_name = "longitude" ;
>> float lat(lat) ;
>> lat:long_name = "latitude" ;
>> lat:units = "degrees_north" ;
>> lat:standard_name = "latitude" ;
>> float plev(plev) ;
>> plev:long_name = "pressure" ;
>> plev:units = "Pa" ;
>> double time(time) ;
>> time:units = "hours since 1990-01-01 00:00" ;
>> float va(time, plev, lat, lon) ;
>> va:long_name = "northward_wind" ;
>> va:units = "m s-1" ;
>> va:grid_type = "gaussian" ;
>> va:comment = "instantaneous values" ;
>> float APS(lat, lon) ;
>> APS:long_name = "APS" ;
>> APS:units = "level" ;
>> APS:missing_value = -999.f ;
>>
>> // global attributes:
>> :CDI = "Climate Data Interface version 1.2.0" ;
>> :Conventions = "CF-1.0" ;
>> :history = "Mon Mar 09 16:29:33 2009: cdo selsmon,1
>> CCMVal2_REF-B1_CNRM-ACM_2_T3I_va.nc
>> CCMVal2_REF-B1_CNRM-ACM_2_T3I_va_01.nc\n",
>> "Thu Mar 5 11:46:43 2009: ncrcat M29/va_h0.M29_1990_01_02.nc
>> M29/va_h0.M29_1990_01_11.nc M29/va_h0.M29_1990_01_21.nc
>> M29/va_h0.M29_1990_02_01.nc M29/va_h0.M29_1990_02_11.nc
>> M29/va_h0.M29_1990_02_21.nc M29/va_h0.M29_1990_03_01.nc
>> M29/va_h0.M29_1990_03_11.nc M29/va_h0.M29_1990_03_21.nc
>> M29/va_h0.M29_1990_04_01.nc M29/va_h0.M29_1990_04_11.nc
>> M29/va_h0.M29_1990_04_21.nc M29/va_h0.M29_1990_05_01.nc
>> M29/va_h0.M29_1990_05_11.nc M29/va_h0.M29_1990_05_21.nc
>> M29/va_h0.M29_1990_06_01.nc M29/va_h0.M29_1990_06_11.nc
>> M29/va_h0.M29_1990_06_21.nc M29/va_h0.M29_1990_07_01.nc
>> M29/va_h0.M29_1990_07_11.nc M29/va_h0.M29_1990_07_21.nc
>> M29/va_h0.M29_1990_08_01.nc M29/va_h0.M29_1990_08_11.nc
>> M29/va_h0.M29_1990_08_21.nc M29/va_h0.M29_1990_09_01.nc
>> M29/va_h0.M29_1990_09_11.nc M29/va_h0.M29_1990_09_21.nc
>> M29/va_h0.M29_1990_10_01.nc M29/va_h0.M29_1990_10_11.nc
>> M29/va_h0.M29_1990_10_21.nc M29/va_h0.M29_1990_11_01.nc
>> M29/va_h0.M29_1990_11_11.nc M29/va_h0.M29_1990_11_21.nc
>> M29/va_h0.M29_1990_12_01.nc M29/va_h0.M29_1990_12_11.nc
>> M29/va_h0.M29_1990_12_21.nc M29/CCMVal2_REF-B1_CNRM-ACM_2_T3I_va.nc\n",
>> "Thu Mar 05 11:45:46 2009: cdo splitday TMP/mon01.nc
>> TMP/day\n",
>> "Thu Mar 05 11:45:09 2009: cdo splitmon M29/va_h0.M29.1990.nc
>> TMP/mon\n",
>> "created at time: Thu Mar 5 08:02:01 2009" ;
>> :institution = "CNRM (Centre National de Recherches
>> Meteorologiques,
>> Meteo-France, Toulouse, France)" ;
>> :title = "ARPEGE T42L60 coupled to MOCAGE-Climat" ;
>> :references = "arpege version 4" ;
>> :comment = "For accumulated variables: january 1st=accumulation
>> over
>> 12h-->18h + 18h-->0h of january 1st + 0h-->6h and 6h-->12h of january 2nd.
>> For instantaneous variables: january 1st= mean over 18h of january 1st +
>> 0h,6h and 12h of january 2nd." ;
>> :nco_openmp_thread_number = 1 ;
>> :CDO = "Climate Data Operators version 1.2.0
>> (http://www.mpimet.mpg.de/cdo)" ;
>> data:
>>
>> lon = 0, 2.8125, 5.625, 8.4375, 11.25, 14.0625, 16.875, 19.6875, 22.5,
>> 25.3125, 28.125, 30.9375, 33.75, 36.5625, 39.375, 42.1875, 45, 47.8125,
>> 50.625, 53.4375, 56.25, 59.0625, 61.875, 64.6875, 67.5, 70.3125,
>> 73.125,
>> 75.9375, 78.75, 81.5625, 84.375, 87.1875, 90, 92.8125, 95.625, 98.4375,
>> 101.25, 104.0625, 106.875, 109.6875, 112.5, 115.3125, 118.125,
>> 120.9375,
>> 123.75, 126.5625, 129.375, 132.1875, 135, 137.8125, 140.625, 143.4375,
>> 146.25, 149.0625, 151.875, 154.6875, 157.5, 160.3125, 163.125,
>> 165.9375,
>> 168.75, 171.5625, 174.375, 177.1875, 180, 182.8125, 185.625, 188.4375,
>> 191.25, 194.0625, 196.875, 199.6875, 202.5, 205.3125, 208.125,
>> 210.9375,
>> 213.75, 216.5625, 219.375, 222.1875, 225, 227.8125, 230.625, 233.4375,
>> 236.25, 239.0625, 241.875, 244.6875, 247.5, 250.3125, 253.125,
>> 255.9375,
>> 258.75, 261.5625, 264.375, 267.1875, 270, 272.8125, 275.625, 278.4375,
>> 281.25, 284.0625, 286.875, 289.6875, 292.5, 295.3125, 298.125,
>> 300.9375,
>> 303.75, 306.5625, 309.375, 312.1875, 315, 317.8125, 320.625, 323.4375,
>> 326.25, 329.0625, 331.875, 334.6875, 337.5, 340.3125, 343.125,
>> 345.9375,
>> 348.75, 351.5625, 354.375, 357.1875 ;
>>
>> lat = -87.8638, -85.09653, -82.31291, -79.5256, -76.7369, -73.94752,
>> -71.15775, -68.36776, -65.57761, -62.78735, -59.99702, -57.20663,
>> -54.4162, -51.62573, -48.83524, -46.04473, -43.2542, -40.46365,
>> -37.67309, -34.88252, -32.09195, -29.30136, -26.51077, -23.72017,
>> -20.92957, -18.13897, -15.34836, -12.55776, -9.767145, -6.976533,
>> -4.185921, -1.395307, 1.395307, 4.185921, 6.976533, 9.767145, 12.55776,
>> 15.34836, 18.13897, 20.92957, 23.72017, 26.51077, 29.30136, 32.09195,
>> 34.88252, 37.67309, 40.46365, 43.2542, 46.04473, 48.83524, 51.62573,
>> 54.4162, 57.20663, 59.99702, 62.78735, 65.57761, 68.36776, 71.15775,
>> 73.94752, 76.7369, 79.5256, 82.31291, 85.09653, 87.8638 ;
>>
>> plev = 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45,
>> 44,
>> 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26,
>> 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8,
>> 7,
>> 6, 5, 4, 3, 2, 1 ;
>>
>> time = 24, 240, 480 ;
>> }
>
>
>
> --
> Heiner Körnich
> Dept. of Meteorology Tel: +46 8 164333
> Stockholms University, SE-106 91 Stockholm, Sweden
> Email: heiner at misu.su.se www.misu.su.se/~heiner/
>
--
Arlindo da Silva
dasilva at alum.mit.edu
More information about the gradsusr
mailing list