[ncl-talk] ESMF_regrid argument Opt definition

Lynch, Cary D cary.lynch at pnnl.gov
Thu Jun 2 16:18:36 MDT 2016


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160602/97d86183/attachment.html 


More information about the ncl-talk mailing list