<div dir="ltr"><div><div><div><div><div><div> If:<br> ap(k) = [=a(k)*p0= a*p0]<br></div>then<br></div> hyam = ap/p0 ; p0=100000.0<br></div> hybm = b<br><br></div>AND<br><br></div>you have all the units correct, then<br><br></div>YES<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 27, 2018 at 7:13 PM, Anahita Amiri Farahani <span dir="ltr"><<a href="mailto:aamir003@ucr.edu" target="_blank">aamir003@ucr.edu</a>></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 all,<div><br></div><div>I just wanted to make sure that I used this function correctly</div><div><br></div><div><br></div><div>here is my script for CAM models:</div><div><br></div><div><div><br></div><div>ana=addfile("<a href="http://temp.nc" target="_blank">temp.nc</a>","r")</div><div>T = ana->T</div><div>TS = ana->TS</div><div>ps=ana->ps</div><div>delete(ana)</div><div><br></div><div><br></div><div><br></div><div>ana=addfile("<a href="http://F_2000_CAM5_PM_fine_no_ds.cam.h0.0008-09.nc" target="_blank">F_2000_CAM5_PM_<wbr>fine_no_ds.cam.h0.0008-09.nc</a>",<wbr>"r")</div><div>P0mb=ana->P0/100</div><div>;ps=ana->PS</div><div>hyam=ana->hyam</div><div>hybm=ana->hybm</div><div>;lev=ana->lev</div><div>lat=ana->lat</div><div>delete(ana)</div><div><br></div><div> lev = (/ 10, 20, 30, 50, 70,100,150,200,250 \</div><div> , 300,400,500,600,700,850,925,<wbr>1000 /) </div><div><br></div><div> lev!0 = "lev" ; variable/dim name </div><div> lev&lev = lev ; create coordinate variable</div><div> lev@long_name = "pressure" ; attach some attributes</div><div> lev@units = "hPa"</div><div> lev@positive = "down"</div><div><br></div><div> t_pres = vinth2p(T, hyam, hybm, lev, ps, 1, P0mb, 1, False )</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>and for GFDL I changed it to this:</div><div><br></div><div><div><br></div><div>P0mb=1000</div><div>hyam=pk/100000.</div><div>hybm=bk</div><div><br></div><div> lev = (/ 10, 20, 30, 50, 70,100,150,200,250 \</div><div> , 300,400,500,600,700,850,925,<wbr>1000 /) </div><div><br></div><div> lev!0 = "lev" ; variable/dim name </div><div> lev&lev = lev ; create coordinate variable</div><div> lev@long_name = "pressure" ; attach some attributes</div><div> lev@units = "hPa"</div><div> lev@positive = "down"</div><div><br></div><div> t_pres = vinth2p(T, hyam, hybm, lev, ps, 1, P0mb, 1, False )</div></div><div><br></div><div><br></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>