[Thread Prev][Thread Next][Index]

Re: Climatological axis in LAS V4



Jean Louis,

I just encountered this problem myself serving up the CDC MSU dataset. 
This and other CDC datasets use the year 0001 to signify a climatology
but omit the "modulo" attribute.  Ferret needs this attribute to
correctly identify the axis as a climatological axis.  Once Ferret
understands that the axis is a climatology it will accept either
"01-May-0000" or "01-May-0001" as valid climatological dates.

The following outlines what we can do with LAS 4 to succeed without
forcing the data owner to change the way that they do things.

You need to create some new scripts and tell LAS to use these scripts
when serving climatological variables.  Here's how:

1) In the xml file describing this dataset you need to have entries like
this for each climatological variable:

  <CDC_DS19-precip2070 name="Monthly LTM of Precipitation"
units="mm/month"
url="http://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/msu/precip.mon.ltm.nc#precip";
>
    <link match="/lasdata/grids/CDC_DS19-grid-lon1-lat2-time30"/>
    <properties>
     <ferret>
      <script_prefix>modulo_t_</script_prefix>
     </ferret>
    </properties>
  </CDC_DS19-precip2070>
         
2) Then you'll need to copy four scripts to new names:

  cp draw_1d.tmpl modulo_t_draw_1d.tmpl
  cp draw_2d.tmpl modulo_t_draw_2d.tmpl
  cp std_gif.tmpl modulo_t_std_gif.tmpl
  cp std_list.jnl modulo_t_std_list.jnl

3) In modulo_t_std_gif.tmpl change to the following:

  [% IF args.rank == '2' %]
    [% INCLUDE modulo_t_draw_2d.tmpl args = args %]
  [% ELSE %]
    [% INCLUDE modulo_t_draw_1d.tmpl args = args %]
  [% END %]

4), 5) Then, in the modulo_t_draw*.tmpl files you need to add a command
which adds the "modulo" attribute to the axis.  (The [l=1] is
unfortunately necessary.)

  set data "[% args.dataset_name %]"
  SET AXIS/MODULO `[% args.variable_name %][l=1],return=taxis` ! <---
NEW LINE

6) Finally, we need to do the same thing, with different syntax, in
modulo_t_std_list.jnl

  set data ($foo)
  SET AXIS/MODULO `$2[l=1],return=taxis` ! <--- NEW LINE


Yes, this seems convoluted, but the world of metadata is imperfect and
at least we have the means to rectify inadequacies.


Good luck,


-- Jonathan Callahan
 

Jean Louis MONGE wrote:
> 
> Hi Jonathan,
> 
> With LAS V4, this axis definition :
> 
>  <olr_mon_ltm_nc_time type="t" units="month">
>   <arange start="0001-01-01" step="1" size="12"/>
>  </olr_mon_ltm_nc_time>
> 
> generates this Ferret request :
> 
>  set region/x="260":"366"/y="-17.0":"44.0"/k=1/t="01-May-0000":"01-May-0000"
> 
> As the olr climatological dataset (from cdc.noaa.gov) has a time axis range
> from 0001-01-01 to 0001-12-01, the ferret request generates an out-of-range
> error message.
> 
> -- jean-louis
> 
> ***********************
> Jean-Louis Monge       tel. (33.1)69 33 45 35
> CNRS/LMD               fax. (33.1)69 33 30 05
> Ecole Polytechnique
> 91128 Palaiseau Cedex  monge@lmd.polytechnique.fr
> FRANCE


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement