<div dir="ltr"><div>Hello, <br></div><div>I have one more question. How do I control the range of vertical integration? For instance, I am only interested in water vapor or latent heating in the troposphere.  It seems that neither dpres_hybrid_ccm nor wgt_vertical_n has a control of vertical range for integration. Thank you very much!</div><div>Best, <br></div><div>Hui <br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2019 at 9:11 PM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>Please send all comments/questions to ncl-talk.</div><div>============</div><div>[1] It is *not* necessary to interpolate to isobaric levels.</div><div>[2] vibeta / wgt_vertical_n .... I do not want to llok at the fortran code used bi vibeta. <br></div><div>It will take too much time. I think using wgt_vertical_n is the way to go.<br></div><div><br></div><div><br></div><div>  diri = "./"<br>  fili = "<a href="http://cam35.h0.0008-07.nc" target="_blank">cam35.h0.0008-07.nc</a>"<br>  pthi = diri+fili<br>  f    = addfile(pthi,"r")<br><br>;---read necessary variables <br><br>  hyai = f->hyai ; read from a file the interface hybrid coefficients<br>  hybi = f->hybi ; read from a file<br>  ps   = f->PS   ; surface pressure [Pa]<br>;;p0   = 100000. ; same units as 'ps'<br>  p0   = f->P0<br>  T    = f->T    ; degK  ; T(time,level,lat,lon) ; dimension (0,1,2,3)<br><br>  dp   = dpres_hybrid_ccm(ps,p0,hyai,hybi)   ; layer thickness   <br>  copy_VarCoords(T,dp)<br>  printVarSummary(dp)<br>  print("----------")<br><br>  vopt = 0     ; vertically weighted average over the level (1-th dimension)<br>  vavg = wgt_vertical_n(T, dp, vopt, 1)  ; (time,lat,lon)<br>  vavg@long_name = "T*dp: vertically weighted average"<br>  vavg@units     = "[K kg/(m s2)]"<br>  printVarSummary(vavg)<br>  print("----------")<br><br>  vopt = 1     ; vertically weighted sum<br>  vsum = wgt_vertical_n(T, dp, vopt, 1)  ; (time,lat,lon)<br>  vsum@long_name = "T*dp: vertically weighted sum"<br>  vsum@units     = "("+T@units+" - "+ps@units+")"<br>  printVarSummary(vsum)<br>  print("----------")<br><br>  cp   = 1004.                               ; J/(K kg)     [ m2/(K s2) ]<br>  g    = 9.81                                ; m/s<br>  IE   = cp*vsum/g                             ; kg/s2  <br>  IE@long_name = "Vertically Integrated Internal Energy"<br>  IE@units     = "kg/s2"<br>  copy_VarCoords(vsum,IE)<br>  printVarSummary(IE)<br>  print("----------")</div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 9:55 PM Hui Ding <<a href="mailto:hding101@googlemail.com" target="_blank">hding101@googlemail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Dennis, <div><br><div>I have a few more questions. Assume that X is to be integrated vertically. And, X is on hybrid levels in CAM5 outputs. </div><div><br></div><div>1. Is it necessary to interpolate X onto pressure coordinate first prior to using wgt_vertical_n to do vertical integration? If not, which set of levels (hyam/hybm or hyai/hybi) should I use to calculate dp? </div><div><br></div><div>2. What are the advantages of using wgt_vertical_n compared with using vibeta in my case? Is it because I do not have to specify bottom to use wgt_vertical_n? </div><div><br></div><div>Thank you very much for your help!</div><div>Best regards, </div><div>Hui </div><div><br></div><div> </div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 3:31 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>I'd suggest using</div><br></div><div><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_vertical_n.shtml" target="_blank"><b>http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_vertical_n.shtml</b></a></div>See Example 2<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 10, 2019 at 10:56 AM Hui Ding via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi everyone, <br></div><div><br></div><div>I am trying to calculate mass-weighted vertical integration of latent heating from CESM LENS. I have a few questions on vibeta. <br></div><div><br></div><div>1. Latent heating is on hybrid levels in CAM5. Is it necessary to interpolate data on to pressure levels prior to using vibeta? <br></div><div><br></div><div>2. Is it correct to use pbot and ptop to specify the range for vertical integration? What if surface pressure is larger or smaller than pbot? <br></div><div><br></div><div>Thank you very much!</div><div>Best, <br></div><div>Hui <br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>