<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 10.5pt; font-family: ΢ÈíÑźÚ; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span><br></div><div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">Dear all,</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">I am trying to use ESMF_regrid to regrid from a curvillinear grid to a 1deg grid. When the variable needed to regrid is 3-D(time,i,j), I got an error as follows:</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><span style="background-color: rgba(0, 0, 0, 0); font-style: italic;"><font color="#0000ff">fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1108 in file ./ESMF_regridding.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 2978 in file ./ESMF_regridding.ncl<br><br>fatal:["Execute.c":8640]:Execute: Error occurred at or near line 3089 in file ./ESMF_regridding.ncl</font></span></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">But for the 2-D variale, my script can be run.</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">Do I need to write a loop to regrid on mutiple time steps? Or are there any other ways?</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">P.S. the ncl version is 6.4.0</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">Here's my script:</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div><font color="#0000ff" face="΢ÈíÑźÚ, Tahoma"><i>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"<br><br>begin<br>;---Data file containing source grid<br> dir = "/home/wangn/data/CMIP5/LGM/monthly/tos/"<br> src_file = "tos_Omon_CNRM-CM5_lgm_r1i1p1_197001-197912.nc" <br> sfile = addfile(dir + src_file,"r")<br><br>;---Get variable to regrid<br> varname = "tos" <br> var = sfile->tos<br> src_lat = sfile->lat <br> src_lon = sfile->lon <br><br>;---Set up regridding options<br> Opt = True<br><br>;---"bilinear" is the default. "patch" and "conserve" are other options.<br> Opt@InterpMethod = "bilinear" ;;---Change (maybe)<br><br> Opt@WgtFileName = "curv_to_1deg.nc"<br><br> Opt@SrcGridLat = src_lat <br> Opt@SrcGridLon = src_lon<br> Opt@SrcRegional = False <br> Opt@SrcInputFileName = src_file <br> Opt@SrcMask2D = where(.not.ismissing(var),1,0) <br> <br><br> Opt@DstGridType = "1deg" <br> Opt@DstLLCorner = (/-89.75d, 0.00d /) <br> Opt@DstURCorner = (/ 89.75d, 359.75d /) </i></font></div><div><font color="#0000ff" face="΢ÈíÑźÚ, Tahoma"><i><br> Opt@DstRegional = False <br> Opt@PrintTimings = True<br> Opt@Debug = True<br><br> var_regrid = ESMF_regrid(var,Opt) <br><br> printVarSummary(var_regrid)<br>end</i></font><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><span style="background-color: rgba(0, 0, 0, 0);"><br></span></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">Thank you for your attention</div><div style="font-family: ΢ÈíÑźÚ, Tahoma;"><br></div><div style="font-family: ΢ÈíÑźÚ, Tahoma;">Wang Na</div></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>wangna@mail.iap.ac.cn</div></div></span></div>
</body></html>