Hi Elinor,
I believe you have found a bug in the landsea_mask function in NCL..
This bug hasn't been discovered before because I am guessing no-one has
input a longitude array where the longitudes are .ge. 360.
The solution is to modify
$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl (if you have
permission) or to copy the shea_util.ncl file into your local directory,
modify it, and use it in your script.
Change line 2413 from this:
if (inlon.ge.361) then
to this:
if (max(inlon).ge.361) then
Thanks for sending a clean example script of the issue!
Adam
On 11/01/2011 12:29 PM, Elinor Martin wrote:
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>
> a = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/landsea/nc", "r")
> lsdata = a-> LSMASK
>
> nlat = 128
> lat = latGau(nlat, "lat","latitude","degrees_north")
> lon=fspan(0,360,256)
>
> lsm = landsea_mask(lsdata,lat,lon)
-- ______________________________________________________________ Adam Phillips asphilli@ucar.edu NCAR/Climate and Global Dynamics Division (303) 497-1726 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Nov 1 15:36:59 2011
This archive was generated by hypermail 2.1.8 : Fri Nov 04 2011 - 08:43:41 MDT