[ncl-talk] Testing out new function (ncl 6.4.0): radext_fao56 doesn't work

Dennis Shea shea at ucar.edu
Tue Jul 26 13:08:54 MDT 2016


Your code
        f= addfile("./Cangrd/tasmax_cangrd_1900_1950.nc", "r")
        tasmax = f->tasmax                 ; tasmax(time,lat,lon)
        tasmax at units = "degC"
        printVarSummary(tasmax)
        time = f->time
        jday = time   ; <******* I would be **stunned** if this were
correct
        radext   = radext_fao56(jday, lat, 1)    ; (time,lat)

---
Please read:
  http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml
  http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
  http://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml

        f= addfile("./Cangrd/tasmax_cangrd_1900_1950.nc", "r")
        tasmax = f->tasmax                 ; tasmax(time,lat,lon)
        printVarSummary(tasmax)

        time   = f->time
        date  = *cd_calendar*(time, -5)
        jday  = *day_of_year*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml>
(date(:,0),date(:,1),date(:,2)

    radext   = radext_fao56(jday, tasmax&lat, 1)    ; (time,lat)

    RADEXT   = conform(tas, radext, (/0,1/) )   ; time;lat,lon
    copy_VarAtts(radext, RADEXT)
    copy_VarCoords(tas,  RADEXT)
    printVarSummary(RADEXT)

---

I also suggest you read the FAO-56 document.
In particular, the section on external radiation.

Good luck







On Tue, Jul 26, 2016 at 12:14 PM, Mary Haley <haley at ucar.edu> wrote:

> In the future, please respond back to ncl-talk so other users can benefit
> from the answers.
>
> Dennis will have to answer your question about the function, as he wrote
> the suite of crop routines. He's on ncl-talk.
>
> --Mary
>
>
> On Tue, Jul 26, 2016 at 11:45 AM, Tam, Benita (EC) <benita.tam at canada.ca>
> wrote:
>
>> Thanks, Mary.
>>
>>
>>
>> I have one more question: I am trying to produce extraterrestrial
>> radiation (radext) with three dimensions, but currently, my output is only
>> 2D. Is there a way to ensure that NCL keeps my longitude dimension?
>>
>>
>>
>> (script attached)
>>
>>
>>
>> Thanks,
>>
>> Benita
>>
>>
>>
>> *From:* Mary Haley [mailto:haley at ucar.edu]
>> *Sent:* July 26, 2016 1:10 PM
>> *To:* Tam, Benita (EC)
>> *Cc:* ncl-talk at ucar.edu
>> *Subject:* Re: [ncl-talk] Testing out new function (ncl 6.4.0):
>> radext_fao56 doesn't work
>>
>>
>>
>> You need to load the "crop.ncl" library:
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/crop.ncl <http://www.ncl.ucar.edu/Document/Functions/Crop/crop.shtml>"
>>
>> The documentation for this function has this information in the "Prototype" section:
>>
>> http://www.ncl.ucar.edu/Document/Functions/Crop/radext_fao56.shtml
>>
>>
>>
>>
>>
>> On Tue, Jul 26, 2016 at 10:48 AM, Tam, Benita (EC) <benita.tam at canada.ca>
>> wrote:
>>
>> Hi,
>>
>>
>>
>> I am testing out the latest version of NCL (6.4.0). The function,
>> radext_fao56, doesn’t seem to work.
>>
>>
>>
>> Error:
>>
>>
>>
>> fatal:Undefined identifier: (radext_fao56) is undefined, can't continue
>>
>> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 30 in
>> file cangrd_ra.ncl
>>
>>
>>
>> (NCL script attached)
>>
>>
>>
>> Thanks,
>>
>> Benita
>>
>>
>> _______________________________________________
>> 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/20160726/14a857db/attachment.html 


More information about the ncl-talk mailing list