<div dir="ltr"><div><div><div><div><div><div>The email does not provide enough information for debugging.<br>I would suggest the following to facilitate debugging.<br><br><br></div>Since &quot;horizontal resolution remains identical in this test&quot;, <br>pick one grid point<br><br></div><div>The reason for using {LAT:LAT},{LON:LON} is to force NCL to retain dimensionality.<br></div><div>     x(time,lev,lat,lon)<br></div><div>If you use {LAT},{LON}, NCL will eliminate the &#39;degenerate&#39; dimension<br></div><div>     x(time,lev)<br>-----------<br> </div><div><br></div><div><br></div>              LAT =    30.0 ; wherever<br></div>              LON = 180.0<br><br></div>              x = f-&gt;ERAI(:,:,{LAT:LAT},{LON:LON})  ; force NCL to retain dimensionality<br></div>              printVarSummary(x)   ; x(time,level,1,1)<br><br></div>              ps = f-&gt;PSFC(:,{LAT:LAT},{LON:LON})  ; force NCL to retain dimensionality<div>              printVarSummary(ps)<br></div><div><pre>       <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/system.shtml" target="_blank"><b>system</b></a>(&quot;/bin/rm -f <a href="http://test.nc" target="_blank">test_hyi2hyo.nc</a>&quot;)    ; remove any pre-existing file
       ncdf = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank"><b>addfile</b></a>(&quot;<a href="http://test.nc" target="_blank">test_hyi2hyo.nc</a>&quot; ,&quot;c&quot;)  ; open output netCDF file

    ;===================================================================
    ; create global attributes of the file (optional)
    ;===================================================================
       fAtt               = True            ; assign file attributes
       fAtt@title         = &quot;TEST NCL HYI2HYO: ERA-INTERIM grid point&quot;
       fAtt@source_file   =  &quot;<a href="http://original-file.nc" target="_blank">original-file.nc</a>&quot;
       fAtt@Conventions   = &quot;None&quot;
       fAtt@creation_date = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml" target="_blank"><b>systemfunc</b></a> (&quot;date&quot;)
       <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/fileattdef.shtml" target="_blank"><b>fileattdef</b></a>( ncdf, fAtt )            ; copy file attributes
       <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/filedimdef.shtml" target="_blank"><b>filedimdef</b></a>( ncdf,&quot;time&quot;,-1,True) 

    ;===================================================================
    ; output variables directly; NCL will call appropriate functions
    ; to write the meta data associated with each variable
    ;===================================================================<br>       ncdf-&gt;hya_erai = hya_erai                  ; 1D 
       ncdf-&gt;hyb_erai = hyb_erai                  ; 1D<br>       ncdf-&gt;hya_cam  = hya_cam                   ; 1D 
       ncdf-&gt;hyb_cam  = hyb_cam                   ; 1D <br><br>       ncdf-&gt;X_ERAI   = x                         ; 4D  <br>       ncdf-&gt;PS_ERAI  = ps                        ; 3D 
                                             <br>===<br></pre><pre>You can send the file and a *clean* simple version of your test script. <br></pre>  <br><br>   <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 2:55 PM, Mao-Lin Shen <span dir="ltr">&lt;<a href="mailto:maolin.shen@gfi.uib.no" target="_blank">maolin.shen@gfi.uib.no</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">Hi,<br><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><br><div><div><div><br></div>I interpolated data from hybrid ERA-Interim to CAM&#39;s hybrid level for nudging.<br></div>But we found a big difference in between when we compared the data on pressure level. <br><br></div>The results show in bellow.  <br><div><br>Left
 panel is the results applying hyi2hyo to get temperature on CAM&#39;s 
hybrid level first and then using vinth2p to get temperature on pressure
 level. <br><br></div><div>Right panel shows the results interpolated from ERA-Interim by using vinth2p.<br></div><div><br></div><div>Level       Temperature (Degree)    Temperature (Degree)</div><div>(850hPa)  294.0318218618177      292.5374525210495</div><div>(500hPa)  276.7536469179544      268.8364571841531</div><div>(250hPa)  256.9609800328714      233.3842838572815</div><div>(100hPa)  219.1232631977532      186.2120804720032</div><div><br></div><div>Horizontal resolution remains identical in this test.<br></div><div>The temperature are supposed to be identical, but it is not due to unclear issue. <br></div><div>Does any one have similar problem?<br></div>Or has idea how to tackle this issue?</div></div></div>
</div>
<br>
<br></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>