<div dir="ltr"><div><div><div><div><div>No.<br><br>[1]<br></div><div>Look at your source variable. The &#39;cod&#39; variable contains the cyclic points<br></div><br>Variable: cod<br>Dimensions and sizes:    [lat | 45] x [lon | 361]<br>Coordinates: <br>            lat: [  45..  89]<br>            lon: [-180.. 180]         &lt;==== Cyclic point<br><br>====<br></div>The cyclic point should be avoided.<br><br>   cod    = ifil-&gt;cod(:,{-180:179})<br>   printVarSummary(cod)<br>   printMinMax(cod,0)<br><br>Variable: cod<br>Dimensions and sizes:    [lat | 45] x [lon | 360]<br>Coordinates: <br>            lat: [  45..  89]<br>            lon: [-180.. 179]       &lt;==== No Cyclic point<br><br>++++++++++++++++++++++++++++++++++++++++<br><br>[2]<br></div>Again, look at your data ... the &#39;cod&#39; variable contains missing values.<br></div>These must be flagged.<br><br>   nmsg   = num(ismissing(cod))<br>   print(&quot;nmsg=&quot;+nmsg)<br>   print(&quot;---------------&quot;)<br>...<br>   if (nmsg.gt.0) then<br>       opt@SrcMask2D     = where(.not.ismissing(cod),1,0)<br>   end if<br><br>++++++++++++++++++++++++++++++++++++++<br><br></div>See attached<br><br>Variable: cod_conserve<br>Type: float<br>Total Size: 8192 bytes<br>            2048 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [lat | 16] x [lon | 128]<br>Coordinates: <br>            lat: [46.04472732543945..87.86380004882812]<br>            lon: [-180..177.1875]<br>Number Of Attributes: 3<br>  _FillValue :    -999<br>  remap :    remapped via ESMF_regrid_with_weights: Bilinear<br>  missing_value :    -999<br>(0)    min=0.274607   max=1.91372<br><br><div><div><div><br><br><div><br> <br></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 28, 2017 at 6:45 PM, Rashed Mahmood <span dir="ltr">&lt;<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Sorry please ignore previous message; I think It can be done using ESMF regrid by using:<br>    Opt@DstGridLon        = LONT<br>    Opt@DstGridLat        = TLAT      ;(Gaussian lats)<br>    Opt@DstRegional       = True<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 28, 2017 at 5:26 PM, Rashed Mahmood <span dir="ltr">&lt;<a href="mailto:rashidcomsis@gmail.com" target="_blank">rashidcomsis@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi everyone,<br></div><br>My data is 1*1 degree resolution which is Not global (latitute span: 45N-89N) and I want to convert it into a Gaussian grid as below. I thought ESMF_regrid would be easy But I am not sure what to specify for attribute &quot;Opt@DstGridType       = &quot;??????&quot; for a Gaussian destination grid?<br></div><br></div>So I tried using area_conserve_remap as in following simple code:<br><br>begin<br>   ifil   = addfile(&quot;<a href="http://test_file.nc" target="_blank">test_file.nc</a>&quot;,&quot;r&quot;)<br>   cod    = ifil-&gt;cod<br>   printVarSummary(cod)<br><br>   NLATT  = 64<br>   MLONT  =  2*NLATT<br>   LATT   = latGau(NLATT, &quot;lat&quot;, &quot;latitude&quot; , &quot;degrees_north&quot;)<br>   LONT   =  fspan(-180,180,128)<br>   TLAT   = LATT({45:90})<br><br>   opt       = True<br>   opt@NLATi = 178<br>   opt@NALTo = NLATT<br>   gcod      = area_conserve_remap_Wrap (cod&amp;lon, cod&amp;lat, cod ,LONT, TLAT, opt)<br><br>end<br><br><div><br></div><div>However, I am getting error as below, which I understand is due not global lats but not sure how to fix it? The sample data file attached.<br><br>Copyright (C) 1995-2015 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.3.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><br>Variable: cod<br>Type: float<br>Total Size: 64980 bytes<br>            16245 values<br>Number of Dimensions: 2<br>Dimensions and sizes:   [lat | 45] x [lon | 361]<br>Coordinates: <br>            lat: [  45..  89]<br>            lon: [-180.. 180]<br>Number Of Attributes: 3<br>  _FillValue :  -999<br>  remap :       remapped via ESMF_regrid_with_weights: Bilinear<br>  missing_value :       -999<br><span style="background-color:rgb(255,255,255)"><span style="color:rgb(255,0,0)"> </span><span style="color:rgb(255,0,0)">Error in &quot;cremapbin&quot;:<br> Could not map global lat array into grid array<br>Abort (core dumped)</span><br></span><br></div><div>any thoughts?<br><br><br><br></div><div>Thank you,<br></div><div>Rashed<br></div><div><br><br></div><div><br><br><br></div></div>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>