[ncl-talk] int2p_n_Wrap
Dennis Shea
shea at ucar.edu
Fri Dec 31 07:18:17 MST 2021
The script looks good. [Quick look]
See: Examples 1, 3, 4
*http://www.ncl.ucar.edu/Applications/iso.shtml*
<http://www.ncl.ucar.edu/Applications/iso.shtml>
On Fri, Dec 31, 2021 at 4:19 AM Chathurika via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Dear All,
>
>
> I want to calculate the salinity on isopycnal surfaces, 26 ≤ *σ**θ* ≤
> 27.75 (*σ**θ* is the potential density). So I calculated it as follows.
> Could you please tell me what I do here right or wrong. Script works. I
> just want to know whether the calculation makes sense or not. Thank you
> so so much. Looking forward to hearing from you.
>
>
> The script;
>
> P0 = 1000
>
>
> diri="/..../"
> sfile = "ER-hist.nc"
>
>
> f = addfile(diri+sfile,"r")
> vname=getfilevarnames(f)
> print(vname)
>
>
> hist = f->rhopoto(:,:,{-25:-70},:)
> P_D = hist - P0
> copy_VarCoords(hist, P_D)
> copy_VarMeta(hist, P_D)
> printVarSummary(P_D)
> printMinMax(P_D, False)
>
>
> ;************************************************
> ; Interpolate to specific [constant] TEMP levels
> ; The default returned vertical coordinate is Z_T but change to 'tlev'
> ;************************************************
> tlev = (/ 26.00 , 26.25,26.50,26.75,27.00,27.25,27.50,27.75/) ;
> same units [here, C] as TEMP
> tlev at units = P_D at units
> tlev!0 = "tlev"
>
>
> delete([/diri,sfile,f,vname,hist/])
>
>
> diri="/.../hist/"
> sfile = "ER-hist.nc"
>
>
> f = addfile(diri+sfile,"r")
> vname=getfilevarnames(f)
> print(vname)
>
>
> salt = f->so(:,:,{-25:-70},:)
> printVarSummary(salt)
> printMinMax(salt, False)
>
>
> ;**********************************************************
> ; use int2p_n to interpolate:
> ;*********************************************************
> ityp = 0
> pdim = 1
>
> xlvl = int2p_n_Wrap (P_D, salt, tlev, ityp, pdim)
> printVarSummary(xlvl)
> printMinMax(xlvl, True)
>
>
>
>
> ER2 = dim_avg_n_Wrap(xlvl, 3)
> ER = dim_avg_n_Wrap(ER2, 0)
> printVarSummary(ER)
> printMinMax(ER, True)
>
> Best Regards,
>
> Chathu
> ------------------------------
>
>
>
> Wickramage Chathurika Hemamali
> Msc in Physical Oceanography
> State Key Laboratory of Tropical Oceanography
> South China Sea Institute of Oceanology
> University of Chinese Academy of Science
> China
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20211231/4e6c2d70/attachment.html>
More information about the ncl-talk
mailing list