[ncl-talk] ESMF_regrid argument Opt definition

Mary Haley haley at ucar.edu
Fri Jun 3 13:35:27 MDT 2016


I'm not sure what's going on.

In the 6.3.0 version of "ESMG_regridding.ncl", the "Opt" variable is
clearly defined on line 1563. The line number that the error message is
pointing to is somewhere in the middle of the function where "Opt" has
already been referenced multiple times, so why didn't those lines produce
errors as well?

If you have multiple versions of NCL on your system, you need to make sure
that when you switch between the two versions, you are correctly resetting
your NCARG_ROOT and PATH environment variables.

You can double-check this by typing:

which ncl
ncl -V
env | grep NCARG

--Mary



On Thu, Jun 2, 2016 at 4:18 PM, Lynch, Cary D <cary.lynch at pnnl.gov> wrote:

> Hello,
> I am having issues with regridding a cmip5 ocean variable.  Using the
> function “ESMF_regrid” (with NCL version 6.3.0) my script is as follows:
>
> ;**************************************
> 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/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
> ;**************************************
> begin
> ;****************************************
>
>   diri = "/Volumes/theato/"
>
>   dp1 =
> addfile(diri+"theato_Omon_CESM1-BGC_rcp85_r1i1p1_200601-210012.nc","r")
>   tsi = dp1->theta
>   tsia = month_to_annual(tsi,1)
>
>   tsiax = tsia(0,:,:)
>   tsiax at lat2d = dp1->lat
>   tsiax at lon2d = dp1->lon
>
>   Opt = True
>   Opt at ForceOverwrite   = True
>   Opt at SrcMask2D      = where(.not.ismissing(tsiax),1,0)
>   Opt at DstGridType = "1deg"
>   Opt at SrcGridCornerLat = dp1->lat_vertices
>   Opt at SrcGridCornerLon = dp1->lon_vertices
>   Opt at DstLLCorner      = (/-89.75d,   0.00d /)
>   Opt at DstURCorner      = (/ 89.75d, 359.75d /)
>
>   rgtsi = ESMF_regrid(tsiax,Opt)
>
>   printVarSummary(rgtsi)
>
> ;**********************
> End
>
> The error message(s) I receive after running above script is as follows:
>
> fatal:Variable (Opt) is undefined
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 1588 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3853 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3983 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
>
> Is this a version issue because on a previous version (NCL 6.1.0) I did
> not run into this problem?
> Any help will be appreciated.
> Thank you.
>
>
> _______________________________________________
> 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/20160603/a17f1235/attachment.html 


More information about the ncl-talk mailing list