[ncl-talk] Testing out new function (ncl 6.4.0): radext_fao56: missing values consistent for Nov-March

Tam, Benita (EC) benita.tam at canada.ca
Tue Jul 26 13:55:49 MDT 2016


Thanks.

I’ve been able to successfully run the code.

However, when I pull out data for a specific location, the months, November to March, contain missing values.

I’ve tested the same data in R using the SPEI program, and there are no missing values.

(output and scripts attached)

Thanks,
Benita
From: Dennis Shea [mailto:shea at ucar.edu]
Sent: July 26, 2016 3:09 PM
To: Mary Haley
Cc: Tam, Benita (EC); ncl-talk at ucar.edu
Subject: Re: [ncl-talk] Testing out new function (ncl 6.4.0): radext_fao56 doesn't work

Your code
        f= addfile("./Cangrd/tasmax_cangrd_1900_1950.nc<http://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<http://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<mailto: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<mailto: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<mailto:haley at ucar.edu>]
Sent: July 26, 2016 1:10 PM
To: Tam, Benita (EC)
Cc: ncl-talk at ucar.edu<mailto: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<mailto: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<mailto: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<mailto: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/92056f69/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_hargreaves1.txt
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160726/92056f69/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cangrd_ra2.ncl
Type: application/octet-stream
Size: 1454 bytes
Desc: cangrd_ra2.ncl
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160726/92056f69/attachment.obj 


More information about the ncl-talk mailing list