[ncl-talk] climo_3.ncl

Dennis Shea shea at ucar.edu
Mon Aug 12 07:51:55 MDT 2019


To be clear,  the climo_3.ncl example uses

a    = addfile("*xieArkin-T42.nc*","r")

This file can readily be downloaded from

*      https://www.ncl.ucar.edu/Applications/Data/*
<https://www.ncl.ucar.edu/Applications/Data/>

It contains a 'time' coordinate variable defined with





* 'yyyymm' units        int time(time) ;                time:long_name
= "Year-Month" ;                time:units = "yyyymm" ;
<======*Hence, the following* coordinate subscripting {...} *can be
used


*          prc({200001:201612},:,:)*====
The GPCC file:



*     precip.mon.total.v2018.nc <http://precip.mon.total.v2018.nc>*can
be downloaded from:



*   https://www.esrl.noaa.gov/psd/data/gridded/data.gpcc.html
<https://www.esrl.noaa.gov/psd/data/gridded/data.gpcc.html>-----*It
has a *'time' *variable with units

* as follows:	*double time(time) ;
		time:long_name = "Time" ;
		*time:units = "days since 1800-1-1 00:00:00" ;*
               [snip]
                time:actual_range = 33237., 79227. ;

This can readily be changed to yyyymm via the *cd_calendar*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml>
function











*  a    = addfile("precip.mon.total.v2018.nc
<http://precip.mon.total.v2018.nc>","r")  prc  = a->precip
      ; (time,lat,lon)  printVarSummary(prc)
       yyyymm   = cd_calendar(prc&time,-1)  prc&time = yyyymm
        ; assign a new time variable: YYYYMM
printVarSummary(prc)               ; time: [189101..201612]
print("========")*


On Thu, Aug 8, 2019 at 7:48 AM Rick Brownrigg via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi,
>
> I don't have that data file handy, but given the error message and the
> name of that file, I speculate that the script has inappropriate time
> references for the file. Specifically, at the cited error line 41, there's
> this:
>
>   prcClm = clmMonTLL (prc({200001:201612},:,:))
>
> which looks like references to years 2000 through 2016.  Does your file
> span those years, or do you need to adjust the script to reflect the file?
>
> Hope that helps...
> Rick
>
>
> On Thu, Aug 8, 2019 at 5:01 AM Setareh Rahimi via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Dear all,
>> I got an error once run script  climo_3.ncl
>> <https://www.ncl.ucar.edu/Applications/Scripts/climo_3.ncl> from (
>> https://www.ncl.ucar.edu/Applications/climo.shtml).  Data I am using is precip.mon.total
>> .v2018.nc. I attached the error along with the script I am using.
>> Please, kindly advice me to remove the error.
>> Best wishes,
>> --
>> S.Rahimi
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190812/149216e1/attachment.html>


More information about the ncl-talk mailing list