<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Georgia;
panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I would guess this is the relevant error message:<o:p></o:p></p>
<p class="MsoNormal">‘fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue’<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You’ve assigned a 4d array (rf) to an attribute that expects a 2d array:<o:p></o:p></p>
<p class="MsoNormal">Opt@SrcMask2D = where(.not.ismissing(rf),1,0)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I assume you meant to type rf1 rather than rf……<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">ncl-talk <ncl-talk-bounces@ucar.edu> on behalf of Smrati Purwar <ritipurwar@gmail.com><br>
<b>Date: </b>Wednesday, 3 April 2019 at 7:32 PM<br>
<b>To: </b>Ncl-talk <ncl-talk@ucar.edu><br>
<b>Subject: </b>[ncl-talk] [ncl- talk] regridding 2x2 degree data<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">Hello all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> i have .5 degree data . i am trying to regrid it in 2 degree data .But it is giving error. Please help<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> <br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Variable: rf1<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Type: float<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Total Size: 69660 bytes<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 17415 values<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Number of Dimensions: 2<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Dimensions and sizes: [lat | 129] x [lon | 135]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Coordinates: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> lat: [6.5..38.5]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> lon: [66.5..100]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Number Of Attributes: 4<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> _FillValue : -999<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> long_name : GRIDDED RAINFALL<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> average_op_ncl : dim_avg_n over dimension(s): sfc<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> missing_value : -999<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can't continue<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1639 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1847 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 3910 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4042 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 18 in file grid.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:Variable (rf_regrid) is undefined<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 19 in file grid.ncl<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:Variable (rf_regrid) is undefined<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fatal:["Execute.c":8640]:Execute: Error occurred at or near line 22 in file grid.ncl<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Here is my script<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">f = addfile("<a href="http://rainfall2013.nc">rainfall2013.nc</a>","r")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">time = f ->time<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">rf = f->rf(0:30,:,:,:) ; {7:36},{68:100})<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">;printVarSummary(rf)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">rf1 = dim_avg_n_Wrap(dim_avg_n_Wrap(rf,0),0)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">printVarSummary(rf1)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">;print(rf1&lat)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt = True<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@SrcMask2D = where(.not.ismissing(rf),1,0)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@Overwrite = True<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@DstLLCorner = (/8.00d,68.00d/)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@DstURCorner = (/36.00d,100.00d/)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@DstGridType = "2deg"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Opt@InterpMethod = "bilinear"<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">rf_regrid = ESMF_regrid(rf,Opt)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">printVarSummary(rf_regrid)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">system("rm -rf regrid_bilinear2X2.nc")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fout = addfile("regrid_bilinear2X2.nc", "c")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">fout->rf = rf_regrid<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">With Thanks & Regards</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">Smrati Purwar</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">Ph.D Scholar(CSIR-JRF)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">CSIR- 4th Paradigm Institute(CMMACS)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">NAL Belur Campus, Wind tunnel road</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Georgia",serif;color:blue">Bangalore, India-560037</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p style="font-size:10pt; line-height:10pt; font-family: Calibri,sans-serif;"><br>
<br>
University of Tasmania Electronic Communications Policy (December, 2014). <br>
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained
in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
</p>
</body>
</html>