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