[ncl-talk] [ncl- talk] regridding 2x2 degree data

Smrati Purwar ritipurwar at gmail.com
Wed Apr 3 02:29:10 MDT 2019


Hello all,
   i have .5 degree data . i am trying to regrid it in 2 degree data .But
it is giving error. Please help


Variable: rf1
Type: float
Total Size: 69660 bytes
            17415 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 129] x [lon | 135]
Coordinates:
            lat: [6.5..38.5]
            lon: [66.5..100]
Number Of Attributes: 4
  _FillValue : -999
  long_name : GRIDDED RAINFALL
  average_op_ncl : dim_avg_n over dimension(s): sfc
  missing_value : -999
fatal:Eq: Dimension size, for dimension number 0, of operands does not
match, can't continue

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1639 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1847 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 3910 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4042 in
file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl

fatal:["Execute.c":8640]:Execute: Error occurred at or near line 18 in file
grid.ncl

fatal:Variable (rf_regrid) is undefined
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 19 in file
grid.ncl

fatal:Variable (rf_regrid) is undefined
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 22 in file
grid.ncl



Here is my script
load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
f = addfile("rainfall2013.nc","r")
time = f ->time
rf = f->rf(0:30,:,:,:)                      ; {7:36},{68:100})
;printVarSummary(rf)
rf1 = dim_avg_n_Wrap(dim_avg_n_Wrap(rf,0),0)
printVarSummary(rf1)
;print(rf1&lat)
Opt = True
Opt at SrcMask2D = where(.not.ismissing(rf),1,0)
Opt at Overwrite = True
Opt at DstLLCorner = (/8.00d,68.00d/)
Opt at DstURCorner = (/36.00d,100.00d/)
Opt at DstGridType = "2deg"
Opt at InterpMethod = "bilinear"
rf_regrid = ESMF_regrid(rf,Opt)
printVarSummary(rf_regrid)
system("rm -rf regrid_bilinear2X2.nc")
fout = addfile("regrid_bilinear2X2.nc", "c")
fout->rf = rf_regrid

-- 
With Thanks & Regards
Smrati Purwar
Ph.D Scholar(CSIR-JRF)
CSIR- 4th Paradigm Institute(CMMACS)
NAL Belur Campus, Wind tunnel road
Bangalore, India-560037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190403/60fe6e97/attachment.html>


More information about the ncl-talk mailing list