<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;}
/* 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;}
p.m2446855455457960263p1, li.m2446855455457960263p1, div.m2446855455457960263p1
        {mso-style-name:m_2446855455457960263p1;
        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.m2446855455457960263s1
        {mso-style-name:m_2446855455457960263s1;}
span.m2446855455457960263apple-tab-span
        {mso-style-name:m_2446855455457960263apple-tab-span;}
span.m2446855455457960263apple-converted-space
        {mso-style-name:m_2446855455457960263apple-converted-space;}
p.m2446855455457960263p2, li.m2446855455457960263p2, div.m2446855455457960263p2
        {mso-style-name:m_2446855455457960263p2;
        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.EmailStyle24
        {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">Hi Mary<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You’re absolutely correct; I was reading a slightly different input domain for the variable ‘var’ and the source latitude. All fixed now; sorry to waste your time on such a silly little error.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Will<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">Mary Haley <haley@ucar.edu><br>
<b>Date: </b>Tuesday, 21 August 2018 at 6:19 AM<br>
<b>To: </b>Will Hobbs <will.hobbs@utas.edu.au><br>
<b>Cc: </b>"ncl-talk@ucar.edu" <ncl-talk@ucar.edu><br>
<b>Subject: </b>Re: [ncl-talk] ESMF_regrid - SrcGridLat/SrcGridLon not recognised<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">Hi Will,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">Were there any other errors with this script?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">The reason I ask is that it looks like your source grid is dimensioned 59 x 360 according to your printVarSummary statement, but the SrcGridLat says it is an array of 54 elements.  I'm assuming that "var"
 is the variable you are regridding? If so, then you will need to make sure the lat/lon arrays are set to the same lat/lon arrays as "var".  In fact, since "var" is a rectilinear grid and has lat/lon attached as coordinate arrays, you shouldn't need to set
 SrcGridLat or SrcGridLon at all.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">I've attached a very simple example of regridding data that is on a rectilinear grid. You'll see that I'm not setting SrcGridLat/Lon at all. The data is attached too since it's small.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt">--Mary<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Sun, Aug 19, 2018 at 6:53 PM, Will Hobbs <<a href="mailto:will.hobbs@utas.edu.au" target="_blank">will.hobbs@utas.edu.au</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi all<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am using ESMF_regrid to regrid a number of different ocean models (some rectilinear, some not)  onto a common lat/lon grid. To do this I explicitly set the SrcGridLat and SrcGridLon
 attributes, but sometimes I get the following error message:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">(0)</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1">get_src_grid_info: SrcGridType and/or SrcGridLat/SrcGridLon were not set.</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">(0)</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263apple-converted-space">          </span><span class="m2446855455457960263s1">Cannot determine the source grid type.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I’ve done a printVarSummary of both the variable to regrid and the ‘Opt’ (i.e. options variable – see below) and it’s clear that both attributes are there on the Opt file, just
 not being recognised by ESMF_regrid. I can’t find any reason why they wouldn’t be.
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Any ideas?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Will<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Variable: var</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Type: float</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Total Size: 4893696000 bytes</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">1223424000 values</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Number of Dimensions: 4</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Dimensions and sizes:</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">[time | 1920] x [lev | 30] x [lat | 59] x [lon | 360]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Coordinates:</span><span class="m2446855455457960263apple-converted-space"> </span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">time: [674900.5..733269.5]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">lev: [ </span><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">5..5243.5966796875]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">lat: [-78.5..-20.5]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">lon: [ 0.5..359.5]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Number Of Attributes: 9</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">standard_name :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">sea_water_salinity</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">long_name :</span><span class="m2446855455457960263apple-tab-span">  
</span><span class="m2446855455457960263s1">Sea Water Salinity</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">units :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">psu</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">cell_methods :</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">time: mean (interval: 60 seconds)</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">cell_measures :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">area: areacello volume: volcello</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">history :</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">2011-12-26T07:02:13Z altered by CMOR: replaced missing value flag (1e+35) with standard missing value (1e+20). 2011-12-26T07:02:15Z altered by CMOR: Converted type from 'd' to 'f'. 2011-12-26T07:02:15Z altered by
 CMOR: Inverted axis: lat.</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">missing_value :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">1e+20</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">_FillValue :</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1">1e+20</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">associated_files :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">baseURL: <a href="http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation" target="_blank">
http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation</a> gridspecFile: gridspec_ocean_fx_FGOALS-g2_<a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a> areacello: areacello_fx_FGOALS-g2_<a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a>
 volcello: volcello_fx_FGOALS-g2_<a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a></span><o:p></o:p></p>
<p class="m2446855455457960263p2"> <o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Variable: Opt</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Type: logical</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Total Size: 4 bytes</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space">           
</span><span class="m2446855455457960263s1">1 values</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Number of Dimensions: 1</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Dimensions and sizes:</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">[1]</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Coordinates:</span><span class="m2446855455457960263apple-converted-space"> </span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263s1">Number Of Attributes: 18</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">WgtFileName :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">/g/data1/ua8/CMIP5_ocean_processing/masks/FGOALS-g2/FGOALS-g2_-80--25_1x1_level0_<a href="http://weights.nc">weights.nc</a></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">SrcGridMask :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1"><ARRAY of 21240 elements></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">RemovePETLog :</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">RemoveWgtFile :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">False</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">RemoveDstFile :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">RemoveSrcFile :</span><span class="m2446855455457960263apple-tab-span">   
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstRegional :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstURCorner :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">( -25, 359 )</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstLLCorner :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">( -80,</span><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">0 )</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstGridLon :</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1"><ARRAY of 360 elements></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstGridLat :</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1"><ARRAY of 56 elements></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">SrcRegional :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">SrcGridLon :</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1"><ARRAY of 360 elements></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">SrcGridLat :</span><span class="m2446855455457960263apple-tab-span"> 
</span><span class="m2446855455457960263s1"><ARRAY of 54 elements></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">ForceOverwrite :</span><span class="m2446855455457960263apple-tab-span">  
</span><span class="m2446855455457960263s1">True</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">InterpMethod :</span><span class="m2446855455457960263apple-tab-span">    
</span><span class="m2446855455457960263s1">bilinear</span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">DstFileName :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1"><a href="http://tmp2.nc" target="_blank">tmp2.nc</a></span><o:p></o:p></p>
<p class="m2446855455457960263p1"><span class="m2446855455457960263apple-converted-space"> 
</span><span class="m2446855455457960263s1">SrcFileName :</span><span class="m2446855455457960263apple-tab-span">
</span><span class="m2446855455457960263s1"><a href="http://tmp1.nc" target="_blank">tmp1.nc</a></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p style="line-height:10.0pt"><span style="font-size:10.0pt"><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.
<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>