[ncl-talk] int2p_n_Wrap

Chathurika chatu at scsio.ac.cn
Thu Jan 13 04:24:47 MST 2022




Dear Dennis,




Many thanks for your reply.




I wonder how one can remap this density layers to depth level. If you have any idea, please share it with me. 




Many thanks again and best regards,

Chathu



-----Original Messages-----
From:"Dennis Shea" <shea at ucar.edu>
Sent Time:2021-12-31 22:18:17 (Friday)
To: Chathurika <chatu at scsio.ac.cn>
Cc: ncl-talk <ncl-talk at ucar.edu>
Subject: Re: [ncl-talk] int2p_n_Wrap


The script looks good. [Quick look]


See: Examples 1, 3, 4

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






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


Specialized in Oceanography and Marine Geology (Bachelor)
University of Ruhuna
Matara
Sri Lanka


Email : wickramagechathurika at rocketmail.com
chatu at scsio.ac.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220113/89642a5d/attachment.html>


More information about the ncl-talk mailing list