<div dir="ltr"><div><div><div><div><div>Regardless of what language you use ...<br><br>Simple overview:<br><br>[1] Determine the layer thicknesses (the 'dz' in the integral). <br>[2] At each grid point <br><br></div> HeatContent = (rho*Cp)*SUM[ T(k)*dz(k) ] .... <br><br></div> where 'k' spans the depths appropriate for 0 to 700m<br><br>===============<br></div><div>Atmospheric functions for pressure layer thickness in the atmosphere can be seen via<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/dpres_plevel_Wrap.shtml</a><br></div><div>Examples 1 and 2<br><br>================<br></div>There are no 'dz' functions for ocean depth like there are for atmospheric pressure (dpres_hybrid_ccm, dpres_plevel) so you must create your own code. I have one for our ocean model<br><br>;=============<br>undef("dz_pop")<br>; compute all layer thicknesses for POP: z_t ot z_w<br>function dz_pop(z[*])<br>local kz, dz<br>begin<br> kz = dimsizes(z)<br> dz = new( kz, typeof(z), "No_FillValue")<br> dz(0) = 0.5*(z(0)+z(1)) ; top layer has sfc<br> dz(1:kz-2) = 0.5*(z(2:kz-1)-z(0:kz-3))<br> dz( kz-1) = z(kz-1) - 0.5*(z(kz-1)+z(kz-2)) ; bottom layer<br> copy_VarCoords(z, dz)<br> dz@long_name = "layer thickness"<br> dz@units = z@units<br><br> return(dz)<br>end<br><br>============<br><br><br></div><div>If 700m is a level for your data, that is good. However, if 700m is not you must do some interpolation. Perhaps, <br></div><div><br><a href="https://www.ncl.ucar.edu/Applications/iso.shtml">https://www.ncl.ucar.edu/Applications/iso.shtml</a><br></div>Example 4<br><br>=============<br><br></div>Good Luck<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 27, 2015 at 1:36 PM, Fernanda Casagrande <span dir="ltr"><<a href="mailto:fe.casagrande2@gmail.com" target="_blank">fe.casagrande2@gmail.com</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">Dear Ncl users, <br><div class="gmail_quote"><div><div><div dir="ltr"><div class="gmail_quote"><div><div><div dir="ltr"><div class="gmail_quote"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br>
<div dir="ltr">I'm new in NCL and I would like calculate and plot Ocean Heat Content (h1=300m, h2=0) for Arctic region.<br>My data is Ocean Potential Temperature T(z) . <br>The ocean heat content is defined as <br>H = pCp
<span><font style="font-size:20pt" size="5">∫ </font>T(z)dz<br>p= water desnity == constant<br>Cp = Sea water heat capacity = Constant <br><br>h1 = 700 m<br>h2=0 m</span> <span><br>Thanks for any help. <br>best regards, <br>Fernanda </span>
<p><br><span></span></p><p><br><span></span></p><p><span><br></span></p><p><span><br></span></p><p><span><br></span></p><p><span><br></span></p><p><span><br></span></p>
<br><br><br><br>                                            </div></div>                                            </div></div>                                            </div></div>                                            </div></div>
</div><br></div>
</div></div></div><br></div>
</div></div></div><br></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>