[gradsusr] Customize time axis
Stefano Materia
stefano.materia at cmcc.it
Wed May 28 18:28:43 EDT 2014
Hi Jennifer, sorry for my delayed reply.
Why do you believe I need two axes? I only have one month (January), and I
need to plot my 124 values (four per day at 8, 11, 14, 23). I really think
I only need the axis for diurnal cycle at those specific times, but I'm
not able to build it :)
This is how the ncdump output looks like.
ncdump -h tday_jan_daymean_1981-2010.nc
netcdf tday_jan_daymean_1981-2010 {
dimensions:
longitude = 464 ;
latitude = 201 ;
time = UNLIMITED ; // (124 currently)
variables:
float longitude(longitude) ;
longitude:standard_name = "longitude" ;
longitude:long_name = "Longitude values" ;
longitude:units = "degrees_E" ;
longitude:axis = "X" ;
float latitude(latitude) ;
latitude:standard_name = "latitude" ;
latitude:long_name = "Latitude values" ;
latitude:units = "degrees_N" ;
latitude:axis = "Y" ;
double time(time) ;
time:standard_name = "time" ;
time:long_name = "Time in days" ;
time:units = "days since 1980-01-01 08:00:00" ;
time:calendar = "standard" ;
short tn(time, latitude, longitude) ;
tn:standard_name = "air_temperature" ;
tn:long_name = "minimum temperature" ;
tn:units = "Celsius" ;
tn:add_offset = 0.f ;
tn:scale_factor = 0.01f ;
tn:_FillValue = -9999s ;
tn:missing_value = -9999s ;
///
and here is the output of the cdo command showinfo:
cdo sinfo tday_jan_daymean_1981-2010.nc
File format: netCDF
-1 : Institut Source Ttype Levels Num Gridsize Num Dtype :
Parameter ID
1 : unknown unknown instant 1 1 93264 1 I16 : -1
Grid coordinates :
1 : lonlat > size : dim = 93264 nx = 464 ny = 201
longitude : first = -40.375 last = 75.375 inc =
0.25 degrees_E
latitude : first = 25.375 last = 75.375 inc =
0.25 degrees_N
Vertical coordinates :
1 : surface : 0
Time coordinate : 124 steps
RefTime = 1980-01-01 08:00:00 Units = days 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
1980-01-01 08:00:00 1980-01-01 11:00:00 1980-01-01 14:00:00
1980-01-01 23:00:00
1980-01-02 08:00:00 1980-01-02 11:00:00 1980-01-02 14:00:00
1980-01-02 23:00:00
1980-01-03 08:00:00 1980-01-03 11:00:00 1980-01-03 14:00:00
1980-01-03 23:00:00
..................................................................................
///
Thanks very much for your help.
Stefano
> It sounds like what you really need are two axes -- a time axis with a
> monthly increment, and another axis for the diurnal cycle at hours 8, 11,
> 14, and 23 (E with a size of 4 would be useful for that). You can't plot
> data at 12hourly and monthly increments in the same dimension. You will
> probably need a full descriptor to get it right. What does the ncdump
> output look like?
> --Jennifer
>
>
>
> On May 20, 2014, at 1:32 PM, Stefano Materia wrote:
>
>> Dear all,
>> I am facing a very annoying problem which I am not able to get around.
>>
>> I have netcdf data for the month of January, in which four temperatures
>> are registered every day: at 8:00am, 11:00am, 2:00pm, 11:00pm.
>> Basically,
>> I have 124 values per month (31*4) specified at those exact times of the
>> day, and this is how I want to graph them.
>>
>> RefTime = 1980-01-01 08:00:00 Units = days 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
>> 1980-01-01 08:00:00 1980-01-01 11:00:00 1980-01-01 14:00:00
>> 1980-01-01
>> 23:00:00
>> 1980-01-02 08:00:00 1980-01-02 11:00:00 1980-01-02 14:00:00
>> 1980-01-02
>> 23:00:00
>> 1980-01-03 08:00:00 1980-01-03 11:00:00 1980-01-03 14:00:00
>> 1980-01-03
>> 23:00:00
>> 1980-01-04 08:00:00 1980-01-04 11:00:00 1980-01-04 14:00:00
>> 1980-01-04
>> 23:00:00
>> ...
>>
>> When I try to plot this in Grads though, the time axis becomes
>> disarranged: Grads splits the time steps every three hours
>>
>> ga-> q file
>> File 1 :
>> Descriptor: tday_jan_daymean_1981-2010.nc
>> Binary: tday_jan_daymean_1981-2010.nc
>> Type = Gridded
>> Xsize = 464 Ysize = 201 Zsize = 1 Tsize = 124 Esize = 1
>> Number of Variables = 1
>> tn 0 t,y,x temperature
>> ga-> set t 1
>> Time values set: 1980:1:1:8 1980:1:1:8
>> ga-> set t 2
>> Time values set: 1980:1:1:11 1980:1:1:11
>> ga-> set t 3
>> Time values set: 1980:1:1:14 1980:1:1:14
>> ga-> set t 4
>> Time values set: 1980:1:1:17 1980:1:1:17
>> ga-> set t 5
>> Time values set: 1980:1:1:20 1980:1:1:20
>> ga-> set t 6
>> Time values set: 1980:1:1:20 1980:1:1:23
>>
>> This is not right, because I need my points to be centered at the time
>> temperature are registered. Attached, a snapshot of the wrong plot
>> coming
>> out (for simplicity, I plotted up to the 16th timestep, which should be
>> Jan 4, but it's not).
>>
>> I do not even find a way to specify this into the TDEF of a ctl file.
>>
>> Is anyone able to help me?
>> Thanks a lot!
>>
>> --
>> Stefano Materia, PhD
>> Centro Euro-Mediterraneo sui Cambiamenti Climatici
>> Viale Aldo Moro, 44 - 40127 Bologna
>> Tel: +39 051 3782611
>> Fax: +39 051 3782655
>>
>>
>> <GradsPlot.png>_______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>
> --
> Jennifer M. Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> 111 Research Hall, Mail Stop 2B3
> George Mason University
> 4400 University Drive
> Fairfax, VA 22030
>
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
--
Stefano Materia, PhD
Centro Euro-Mediterraneo sui Cambiamenti Climatici
Viale Aldo Moro, 44 - 40127 Bologna
Tel: +39 051 3782611
Fax: +39 051 3782655
More information about the gradsusr
mailing list