[ncl-talk] convert the time "since seconds" to month-year

Carl Schreck cjschrec at ncsu.edu
Tue Dec 11 06:46:44 MST 2018


Please see
https://www.ncl.ucar.edu/Document/Functions/User_contributed/time_axis_labels.shtml
and the examples therein.

Does it work if you uncomment line 49? If not, can you be more specific on
what "doesn't work"?

On Tue, Dec 11, 2018 at 3:24 AM Amal Inge <amalingenieur89 at gmail.com> wrote:

>
> Dear NCL experts,
>
> I want to plot a time series of monthly data of nc file with the script
> attached but it didn't work, i think that I should convert the time "since
> seconds" to month-year.
> how could i do this please?
>
> many thanks
> Amal
>
> netcdf dox01_med_0-52 {
> dimensions:
>     time = UNLIMITED ; // (215 currently)
>     lev = 13 ;
>     lat = 253 ;
>     lon = 670 ;
> variables:
>     double time(time) ;
>         time:axis = "T" ;
>         time:calendar = "standard" ;
>         time:units = "seconds since 1970-01-01 00:00:00" ;
>         time:long_name = "time" ;
>         time:standard_name = "time" ;
>     float lev(lev) ;
>         lev:_CoordinateZisPositive = "down" ;
>         lev:_CoordinateAxisType = "Height" ;
>         lev:axis = "Z" ;
>         lev:positive = "down" ;
>         lev:units = "m" ;
>         lev:long_name = "depth" ;
>         lev:standard_name = "depth" ;
>     float lat(lat) ;
>         lat:axis = "Y" ;
>         lat:units = "degrees_north" ;
>         lat:long_name = "latitude" ;
>         lat:standard_name = "latitude" ;
>     float lon(lon) ;
>         lon:axis = "X" ;
>         lon:units = "degrees_east" ;
>         lon:long_name = "longitude" ;
>         lon:standard_name = "longitude" ;
>     float dox(time, lev, lat, lon) ;
>         dox:missing_value = 1.e+20f ;
>         dox:_ChunkSizes = 1, 22, 84, 161 ;
>         dox:units = "millimol m-3" ;
>         dox:long_name = "Mole concentration of Dissolved Molecular Oxygen
> in sea water" ;
>         dox:standard_name =
> "mole_concentration_of_dissolved_molecular_oxygen_in_sea_water" ;
>         dox:_FillValue = 1.e+20f ;
>
> // global attributes:
>         :creation_date = "Tue Dec  4 23:27:50 CET 2018" ;
>         :Conventions = "None" ;
>         :source_file = "dox_med_0-52.nc" ;
>         :title = "NCL Efficient Approach to netCDF Creation" ;
> }
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 

<https://ncics.org/> *Carl J. Schreck III, PhD*
*Research Scholar*
North Carolina State University <http://ncsu.edu/>
North Carolina Institute for Climate Studies (NCICS) <https://ncics.org/>
151 Patton Ave, Asheville, NC 28801
e: cjschrec at ncsu.edu
o: +1 828 257 3140 <(828)%20257-3140>
c: +1 828 484 1702 <(828)%20484-1702>
Publications
<http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
ncics.org/mjo
CycloneCenter.org <https://www.cyclonecenter.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181211/2edfeeec/attachment.html>


More information about the ncl-talk mailing list