[ncl-talk] integrate underground vertical level

Dennis Shea shea at ucar.edu
Fri Oct 13 08:08:54 MDT 2017


Simple Integration is :    SUM( x*dx)

Does the file have any variable like:
     SOIL_LAYER_THICKNESS(time, soil_layers) ;
     X (time, soil_layers ydim, xdim)           ;  (0,1,2,3) <=dimension
numbers
---
f = *addfile*("..." , "r")

slt = f->SOIL_LAYER_THICKNESS
x   = f->X

SLT = *conform*( x, slt, (/0,1/) )    ; convenience, clarity
XI    = *dim_sum_n*( x*SLT, *1*)     ; sum (integrate) the product;
(ntim,nlat,mlon)
*copy_VarCoords*(X(:,0,:,:), XI)   ; copy any coordinsate
XI at long_name = "Integration: "+x at long_name
XI at units  = "..."
*printVarSummary*(XI)

----
if you do not have a 'SOIL_LAYER_THICKNESS' variable, you will have to
create one.

good luck

On Thu, Oct 12, 2017 at 2:02 PM, sunmin park <mireiyue at gmail.com> wrote:

> Hello NCL users
>
> I have dataset which is soil moisture and it has 15 vertical levels. I
> need to integrate the levels to the levels I want. I have been looking for
> a function but so far I can find functions for pressure interpolation. Is
> there any function that integrate underground values?
>
> Thank you
> Sun-
>
> --
>
> Sunmin Park,
>
> PhD Candidate, Department of Earth Science,
>
> University of California Riverside
>
>
>
>
>
>
>
>
> <https://mailtrack.io/> Sent with Mailtrack
> <https://chrome.google.com/webstore/detail/mailtrack-for-gmail-inbox/ndnaehgpjlnokgebbaldlmgkapkpjkkb?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171013/82d9876d/attachment.html>


More information about the ncl-talk mailing list