<div dir="ltr">The documentation: <br>     <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml</a><br><br>states:<br><br><em>hbcofa</em>
A one-dimensional array containing the hybrid A coefficients<br><em>hbcofb</em>
A one-dimensional array containing the hybrid B coefficients<br><br><br><div>  <br></div><div>   hyam = f2[:]-&gt;hyam</div><div>   hybm = f2[:]-&gt;hybm<br></div><div>   printVarSummary(hyam)   ; &lt;==== two dimensions <br></div><div>   p0mb = 1000.0</div><div>   </div><div>   Z3new =vinth2p (Z3_ens, hyam,hybm, pnew, PS_ens, 1, p0mb, 1, True)</div><div>   </div><div>   printVarSummary (Z3new)<br><br>=======<br></div><div>Change <br><br><div>   hyam = f2[:]-&gt;hyam</div><div>   hybm = f2[:]-&gt;hybm<br><br></div><div>To:<br><br><div>   hyam = f2[0]-&gt;hyam          ; &lt;=== one-dimension<br></div><div>   hybm = f2[0]-&gt;hybm<br></div><div>   printVarSummary(hyam)</div><br></div><br></div><div><br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 11:11 PM, sidong <span dir="ltr">&lt;<a href="mailto:sidong@cma.gov.cn" target="_blank">sidong@cma.gov.cn</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span style="font-size:14px">Hi all,</span><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">I am trying to interpolate CCSM4 Decadal prediction dataset from hybrid coordinates to pressure coordinates.</span></div><div><span style="font-size:14px">I used the vinth2p function and downloaded the PS file separately. However, I got the following error. </span></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">Any suggestions will be highly appreciated.</span></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">Thank you</span></div><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">Dong</span></div><div><br></div><div>———————————<font color="#ff2600">ERROR</font>——————————————<wbr>—————</div><div>fatal:Number of dimensions in parameter (1) of (vinth2p) is (2), (1) dimensions were expected </div><div>fatal:[&quot;Execute.c&quot;:8575]:<wbr>Execute: Error occurred at or near line 34 in file </div><div>——————————— <font color="#0433ff"><b> Script</b></font>———————————————————————<wbr>———————</div><div><div>;*****************************<wbr>*******</div><div>  load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl&quot;</div><div>  load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot;</div><div>  load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/shea_util.ncl&quot;</div><div>  load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</div><div>;*****************************<wbr>*******</div><div>  begin</div><div>;-----------------------------<wbr>--------</div><div>   diri1 = &quot;//Volumes/Seagate/Z3/&quot;   ; input directory   </div><div>   fils  = systemfunc (&quot;ls &quot;+diri1+&quot;b40.dp.hd-1955.20C.<wbr>1d.*.<a href="http://cam2.h0.Z3.195501-196412.nc" target="_blank">cam2.h0.Z3.195501-196412.<wbr>nc</a>&quot;) ; file paths     </div><div>   f     = addfiles (fils, &quot;r&quot;)   ; note the &quot;s&quot; of addfile</div><div>   ListSetType (f, &quot;join&quot;)   </div><div>   Z3    = f[:]-&gt;Z3                ; read T from all files   </div><div>   printVarSummary (Z3)</div><div>;-----------------------------<wbr>--------</div><div>   diri2 = &quot;//Volumes/Seagate/PS/&quot;   ; input directory   </div><div>   fils2 = systemfunc (&quot;ls &quot;+diri2+&quot;b40.dp.hd-1955.20C.<wbr>1d.*.<a href="http://cam2.h0.PS.195501-196412.nc" target="_blank">cam2.h0.PS.195501-196412.<wbr>nc</a>&quot;) ; file paths      </div><div>   f2    = addfiles (fils2, &quot;r&quot;)   ; note the &quot;s&quot; of addfile</div><div>   ListSetType (f2, &quot;join&quot;)  </div><div>   PS    = f2[:]-&gt;PS                ; read T from all files  </div><div>   printVarSummary (PS) </div><div>;-----------------------------<wbr>--------</div><div>   Z3_ens = dim_avg_n_Wrap(Z3,0)</div><div>   PS_ens = dim_avg_n_Wrap(PS,0)</div><div>   </div><div>   printVarSummary (Z3_ens) </div><div>   printVarSummary (PS_ens) </div><div>;-----------------------------<wbr>--------</div><div>   pnew = (/950.0, 500.0, 300/) </div><div>   hyam = f2[:]-&gt;hyam</div><div>   hybm = f2[:]-&gt;hybm</div><div>   p0mb = 1000.0</div><div>   </div><div>   Z3new =vinth2p (Z3_ens, hyam,hybm, pnew, PS_ens, 1, p0mb, 1, True)</div><div>   </div><div>   printVarSummary (Z3new)</div></div><div><br></div><div><br></div><div>———————————<font color="#ff40ff">VarSummary</font>—————————<wbr>—————————————</div><div><div>Variable: Z3</div><div>Type: float</div><div>Total Size: 6900940800 bytes</div><div>            1725235200 values</div><div>Number of Dimensions: 5</div><div>Dimensions and sizes:<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>[ncl_join | 10] x [time | 120] x [lev | 26] x [lat | 192] x [lon | 288]</div><div>Coordinates: </div><div>            time: [  31..3650]</div><div>            lev: [3.54463800000001..992.<wbr>5560999999998]</div><div>            lat: [ -90..  90]</div><div>            lon: [   0..358.75]</div><div>Number Of Attributes: 4</div><div>  mdims :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>1</div><div>  units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>m</div><div>  long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Geopotential Height (above sea level)</div><div>  cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div><br></div><div>Variable: PS</div><div>Type: float</div><div>Total Size: 265420800 bytes</div><div>            66355200 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>[ncl_join | 10] x [time | 120] x [lat | 192] x [lon | 288]</div><div>Coordinates: </div><div>            time: [  31..3650]</div><div>            lat: [ -90..  90]</div><div>            lon: [   0..358.75]</div><div>Number Of Attributes: 3</div><div>  units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Pa</div><div>  long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Surface pressure</div><div>  cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div><br></div><div>Variable: Z3_ens</div><div>Type: float</div><div>Total Size: 690094080 bytes</div><div>            172523520 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes:<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 120] x [lev | 26] x [lat | 192] x [lon | 288]</div><div>Coordinates: </div><div>            time: [  31..3650]</div><div>            lev: [3.54463800000001..992.<wbr>5560999999998]</div><div>            lat: [ -90..  90]</div><div>            lon: [   0..358.75]</div><div>Number Of Attributes: 5</div><div>  cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div>  long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Geopotential Height (above sea level)</div><div>  units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>m</div><div>  mdims :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>1</div><div>  average_op_ncl :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>dim_avg_n over dimension(s): ncl_join</div><div><br></div><div>Variable: PS_ens</div><div>Type: float</div><div>Total Size: 26542080 bytes</div><div>            6635520 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 120] x [lat | 192] x [lon | 288]</div><div>Coordinates: </div><div>            time: [  31..3650]</div><div>            lat: [ -90..  90]</div><div>            lon: [   0..358.75]</div><div>Number Of Attributes: 4</div><div>  cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div>  long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Surface pressure</div><div>  units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Pa</div><div>  average_op_ncl :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>dim_avg_n over dimension(s): ncl_join</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>