<div dir="ltr"><div>I think I will fill the poles as follow:<br><br>   do nt=0,ntim-1<br>        do nl=0, mlev-1<br>         U(nt,nl,mlat-1,:) = dim_avg(U(nt,nl,mlat-2,:))  ; pole_nh <br>         U(nt,nl,   0  ,:) = dim_avg(U(nt,nl,   1  ,:))        ; pole_sh <br>        end do<br>    end do<br><br></div>but it&#39;s really coarse in the edge of the data.. no idea how to smooth it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 1:41 PM, antonio avio <span dir="ltr">&lt;<a href="mailto:antonioavio@googlemail.com" target="_blank">antonioavio@googlemail.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 Karin,<br></div>What I wanted to do is to interpolate from 144x288 to 73x144.<br></div>It works, but the edges of the data are missing esp. in the north and south poles.<br></div>Thanks<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 2, 2015 at 12:56 PM, Karin Meier-Fleischer <span dir="ltr">&lt;<a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Antonio,<br>
    <br>
    I think you should have a look at you lines<span><br>
    <br>
    <tt>  xlat = fspan(-90.,90,73)</tt><tt><br>
    </tt><tt>  xlon = fspan(0.,357.5,144)</tt><br>
    <br></span>
    you&#39;re mixing latitude and longitude and/or use wrong dimension
    sizes.<br>
    <br>
    <font color="#3333ff"><tt>  xlat = fspan(-90.,90,144)</tt><tt><br>
      </tt><tt>  xlon = fspan(0.,357.5,288)</tt></font><br>
    <br>
    Bye,<br>
    Karin<br>
    <br>
    <div>Am 02.04.15 um 12:44 schrieb antonio
      avio:<br>
    </div>
    <blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>
          <div>
            <div>Hallo NCL,<br>
            </div>
            Im just wondering why the output of the interpolation filed
            are missing in the last latitude (south and north poles:
            87.5-90). The input data is bellow:<br>
            <br>
            netcdf MERRA.U.1979.plev {<br>
            dimensions:<br>
                    time = 365 ;<br>
                    levels = 42 ;<br>
                    latitude = 144 ;<br>
                    longitude = 288 ;<br>
            variables:<br>
                    float U(time, levels, latitude, longitude) ;<br>
                            U:long_name = &quot;Eastward wind component&quot; ;<br>
                            U:_FillValue = 1.e+15f ;<br>
                            U:comments = &quot;Unknown1 variable comment&quot; ;<br>
                            U:grid_name = &quot;grid-1&quot; ;<br>
                            U:time_statistic = &quot;average&quot; ;<br>
                    double time(time) ;<br>
                            time:standard_name = &quot;time&quot; ;<br>
                            time:units = &quot;hours since 1979-01-01
            12:00:00&quot; ;<br>
                            time:calendar = &quot;standard&quot; ;<br>
                    double levels(levels) ;<br>
                            levels:standard_name = &quot;air_pressure&quot; ;<br>
                            levels:long_name = &quot;Level&quot; ;<br>
                            levels:units = &quot;hPa&quot; ;<br>
                            levels:positive = &quot;down&quot; ;<br>
                            levels:axis = &quot;Z&quot; ;<br>
                    double latitude(latitude) ;<br>
                            latitude:standard_name = &quot;latitude&quot; ;<br>
                            latitude:long_name = &quot;Latitude&quot; ;<br>
                            latitude:units = &quot;degrees_north&quot; ;<br>
                            latitude:axis = &quot;Y&quot; ;<br>
                    double longitude(longitude) ;<br>
                            longitude:standard_name = &quot;longitude&quot; ;<br>
                            longitude:long_name = &quot;Longitude&quot; ;<br>
                            longitude:units = &quot;degrees_east&quot; ;<br>
                            longitude:axis = &quot;X&quot; ;<br>
            <br>
            <br>
          </div>
          My script is:<br>
          <br>
          oad &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>
          load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot; <br>
          load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot; <br>
          <br>
          begin<br>
          <br>
          ;===========2.5x2.5=============<br>
          <br>
            xlat = fspan(-90.,90,73)<br>
            xlon = fspan(0.,357.5,144)<br>
            xlat@units = &quot;degrees_north&quot;<br>
            xlon@units = &quot;degrees_east&quot;<br>
          <br>
          ;===============================<br>
          <br>
          do y =1979,1979<br>
            print(y)<br>
          <br>
            f  = addfile (&quot;MERRA.U.&quot;+y+&quot;.<a href="http://plev.nc" target="_blank">plev.nc</a>&quot; , &quot;r&quot;)<br>
          <br>
              u   = f-&gt;U<br>
              u   = lonFlip(u)<br>
          <br>
          printVarSummary(u) <br>
          <br>
          print(&quot;=====================Process=========================&quot;)<br>
          <br>
            U =
          linint2(u&amp;longitude,u&amp;latitude,u,True,xlon,xlat,0)<br>
          <br>
          <br>
            U!0   = &quot;time&quot;<br>
            U!1   = &quot;level&quot;<br>
            U!2   = &quot;lat&quot;<br>
            U!3   = &quot;lon&quot;<br>
            U&amp;lat = xlat<br>
            U&amp;lon = xlon<br>
            U&amp;time  = u&amp;time<br>
            U&amp;level = u&amp;levels<br>
          <br>
        </div>
        <div>printVarSummary(U)<br>
          <br>
        </div>
        Thank you<br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
    <br>
    <pre cols="72">-- 
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support

Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany

Phone:    <a href="tel:%2B49%20%280%2940%20460094%20126" value="+4940460094126" target="_blank">+49 (0)40 460094 126</a>
Fax:      <a href="tel:%2B49%20%280%2940%20460094%20270" value="+4940460094270" target="_blank">+49 (0)40 460094 270</a>
E-Mail:   <a href="mailto:meier-fleischer@dkrz.de" target="_blank">meier-fleischer@dkrz.de</a>
URL:      <a href="http://www.dkrz.de" target="_blank">www.dkrz.de</a>

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
  </div>

<br>_______________________________________________<br>
ncl-talk mailing list<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><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>