[ncl-talk] time_axis_labels issue

Mary Haley haley at ucar.edu
Fri May 20 13:15:56 MDT 2016


Paolina,

I'm not sure what I'm supposed to be looking for with the new code.  The
plot you sent looks fine to me.  Is there something wrong with it? Are you
getting any error messages?

I do see one issue, and that is that you are not getting the months on your
X axis.  Is this the issue? If so, I think this is because you are passing
a time array to "time_axis_labels" that doesn't have the proper units of
"days since.....", or "hours since....", etc.

When you use yyyymm_to_yyyyfrac, this just gives you an array of fractional
years, and the units are "YYYYMM", which time_axis_labels doesn't recognize.

I think you need something like this:

;----Convert numbers like (1900.1,1901.1,...), to (0.1,1.1,...)

  yyyyfrac2       = yyyyfrac - toint(min(yyyyfrac))
  yyyyfrac2 at units = "years since " + min(toint(yyyyfrac))

and then use "yyyfrac2" in your calls to time_axis_labels and gsn_csm_xy.

--Mary



On Fri, May 20, 2016 at 11:41 AM, Paolina Bongioannini Cerlini <
paolina.cerlini at unipg.it> wrote:

> Hi Mary,
> thank you a lot for your answer. I have managed to change the script and
> I am sending you a new ncl script that is working with a minor problem
> with the
> initial poit of time_axis_labels , if you can check it
> it would be great.
>  I attach the postscipt output, the output at screen, the ncl_filedump
> description of the NETCDF file, that is
> 2.67 GBytes, then I will put it in your ftp address(you gave me this in a
> previous exchange) if you
> need to run it.
> I have averaged the three daily times for each year, and I need a
> fractional time since the data
> do not cover the last year, but stop at february.
> Thank you again.
>
> Paolina
>
> ----- Original Message -----
> From: "Mary Haley" <haley at ucar.edu>
> To: "paolina cerlini" <paolina.cerlini at unipg.it>
> Cc: "ncl-talk" <ncl-talk at ucar.edu>
> Sent: Friday, 20 May, 2016 6:13:27 PM
> Subject: Re: [ncl-talk] time_axis_labels issue
>
>
>
> Paolina,
>
>
> I'm having trouble following your script because there are a lot of
> references to different "time" variables: time, TIME, time4, yyyymm,
> yyyyfrac, etc.
>
>
> Also, you have code like this:
>
>
>
>
> T25d = onedtond (T2, (/ 446,4 /) )
>
> T20 = dim_avg_n (T25d(:,:) , 1)
>
> Which I assume is because you need some kind of season average?
>
> Can you provide me with the NetCDF file so I can try running the script
> here?
>
> --Mary
>
>
>
>
>
>
>
> On Thu, May 19, 2016 at 7:06 AM, Paolina Bongioannini Cerlini <
> paolina.cerlini at unipg.it > wrote:
>
>
> Hello NCL people,
>
> I am trying to use time_axis_labels to plot a subset of ERA-INTERIM data.
> I attach the script, and the output at display,
> apparently correct but at the end the output , enclosed too, is wrong
> because of mismatch of
> the data time indices and time.
>
> Could you help me ?
> Thank you!
>
> Paolina
>
> --
> Paolina Bongioannini Cerlini Ph.D.
> University of Perugia
> CIRIAF -room 8
> 06125 - Perugia
>
> Tel. +39 075 5853576
> e-mail: paolina.cerlini at unipg.it
> skype: pcerlini
> --
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> --
> Paolina Bongioannini Cerlini Ph.D.
> University of Perugia
> CIRIAF -room 8
> 06125 - Perugia
>
> Tel.+39 075 5853576
> e-mail: paolina.cerlini at unipg.it
> skype: pcerlini
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160520/6a379767/attachment.html 


More information about the ncl-talk mailing list