<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! Thank you so much.</div><div class=""><br class=""></div><div class="">Best </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 <<a href="mailto:shea@ucar.edu" class="">shea@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">The documentation: <br class=""> <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=""> <br class=""></div><div class=""> hyam = f2[:]->hyam</div><div class=""> hybm = f2[:]->hybm<br class=""></div><div class=""> printVarSummary(hyam) ; <==== two dimensions <br class=""></div><div class=""> p0mb = 1000.0</div><div class=""> </div><div class=""> Z3new =vinth2p (Z3_ens, hyam,hybm, pnew, PS_ens, 1, p0mb, 1, True)</div><div class=""> </div><div class=""> printVarSummary (Z3new)<br class=""><br class="">=======<br class=""></div><div class="">Change <br class=""><br class=""><div class=""> hyam = f2[:]->hyam</div><div class=""> hybm = f2[:]->hybm<br class=""><br class=""></div><div class="">To:<br class=""><br class=""><div class=""> hyam = f2[0]->hyam ; <=== one-dimension<br class=""></div><div class=""> hybm = f2[0]->hybm<br class=""></div><div class=""> 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=""><<a href="mailto:sidong@cma.gov.cn" target="_blank" class="">sidong@cma.gov.cn</a>></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. </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 </div><div class="">fatal:["Execute.c":8575]:<wbr class="">Execute: Error occurred at or near line 34 in file </div><div class="">——————————— <font color="#0433ff" class=""><b class=""> Script</b></font>———————————————————————<wbr class="">———————</div><div class=""><div class="">;*****************************<wbr class="">*******</div><div class=""> load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_code.ncl"</div><div class=""> load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/gsn_csm.ncl"</div><div class=""> load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/shea_util.ncl"</div><div class=""> load "$NCARG_ROOT/lib/ncarg/<wbr class="">nclscripts/csm/contributed.<wbr class="">ncl"</div><div class="">;*****************************<wbr class="">*******</div><div class=""> begin</div><div class="">;-----------------------------<wbr class="">--------</div><div class=""> diri1 = "//Volumes/Seagate/Z3/" ; input directory </div><div class=""> fils = 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 </div><div class=""> f = addfiles (fils, "r") ; note the "s" of addfile</div><div class=""> ListSetType (f, "join") </div><div class=""> Z3 = f[:]->Z3 ; read T from all files </div><div class=""> printVarSummary (Z3)</div><div class="">;-----------------------------<wbr class="">--------</div><div class=""> diri2 = "//Volumes/Seagate/PS/" ; input directory </div><div class=""> 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 </div><div class=""> f2 = addfiles (fils2, "r") ; note the "s" of addfile</div><div class=""> ListSetType (f2, "join") </div><div class=""> PS = f2[:]->PS ; read T from all files </div><div class=""> printVarSummary (PS) </div><div class="">;-----------------------------<wbr class="">--------</div><div class=""> Z3_ens = dim_avg_n_Wrap(Z3,0)</div><div class=""> PS_ens = dim_avg_n_Wrap(PS,0)</div><div class=""> </div><div class=""> printVarSummary (Z3_ens) </div><div class=""> printVarSummary (PS_ens) </div><div class="">;-----------------------------<wbr class="">--------</div><div class=""> pnew = (/950.0, 500.0, 300/) </div><div class=""> hyam = f2[:]->hyam</div><div class=""> hybm = f2[:]->hybm</div><div class=""> p0mb = 1000.0</div><div class=""> </div><div class=""> Z3new =vinth2p (Z3_ens, hyam,hybm, pnew, PS_ens, 1, p0mb, 1, True)</div><div class=""> </div><div class=""> 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=""> 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: </div><div class=""> time: [ 31..3650]</div><div class=""> lev: [3.54463800000001..992.<wbr class="">5560999999998]</div><div class=""> lat: [ -90.. 90]</div><div class=""> lon: [ 0..358.75]</div><div class="">Number Of Attributes: 4</div><div class=""> mdims :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>1</div><div class=""> units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>m</div><div class=""> long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Geopotential Height (above sea level)</div><div class=""> 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=""> 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: </div><div class=""> time: [ 31..3650]</div><div class=""> lat: [ -90.. 90]</div><div class=""> lon: [ 0..358.75]</div><div class="">Number Of Attributes: 3</div><div class=""> units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Pa</div><div class=""> long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Surface pressure</div><div class=""> 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=""> 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: </div><div class=""> time: [ 31..3650]</div><div class=""> lev: [3.54463800000001..992.<wbr class="">5560999999998]</div><div class=""> lat: [ -90.. 90]</div><div class=""> lon: [ 0..358.75]</div><div class="">Number Of Attributes: 5</div><div class=""> cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div class=""> long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Geopotential Height (above sea level)</div><div class=""> units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>m</div><div class=""> mdims :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>1</div><div class=""> 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=""> 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: </div><div class=""> time: [ 31..3650]</div><div class=""> lat: [ -90.. 90]</div><div class=""> lon: [ 0..358.75]</div><div class="">Number Of Attributes: 4</div><div class=""> cell_methods :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div class=""> long_name :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Surface pressure</div><div class=""> units :<span class="m_2443770969806253206Apple-tab-span" style="white-space:pre-wrap">        </span>Pa</div><div class=""> 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>