$ srcdump.sh jofuro-2.monthly.mask.ncl
------------------------------
List of the following files:
------------------------------
jofuro-2.monthly.mask.ncl
------------------------------
Machine info
------------------------------
aofd165.bio.mie-u.ac.jp
/work2/am/2017.Heavy.Rain/J-OFURO2
Sat Jul 15 08:00:19 JST 2017
======================
jofuro-2.monthly.mask.ncl
======================
begin
indir="/misc/raid112MANDA/KakenA.H28/J-OFURO2"
prefix="J-OFURO2_LHF_HF004_MONTHLY_"
;mmm="JUN"
mmm="JUL"
figdir="Fig.monthly.mask/"+mmm
system("mkdir -vp "+figdir)
if (mmm .eq. "JUN" )then
mm=6-1
end if
if (mmm .eq. "JUL" )then
mm=7-1
end if
yyyys=1988
yyyye=2008
yyyy=yyyys
infle=prefix+yyyy+".nc"
a = addfile(indir+"/"+infle, "r")
lon = a->XLONG
lat = a->YLAT
tmp = a->LHF
dim=dimsizes(tmp)
nt=yyyye-yyyys+1
ny=dim(1)
nx=dim(2)
lhflt=new((/nt,ny,nx/),typeof(tmp))
lat2d=new((/ny,nx/),float)
lon2d=new((/ny,nx/),float)
do j=0,ny-1
do i=0,nx-1
lon2d(j,i)=tofloat(lon(i))
lat2d(j,i)=tofloat(lat(j))
end do
end do
lonw=122.
lone=130.
lats=25.
latn=33.
it=-1
do yyyy=yyyys,yyyye
infle=prefix+yyyy+".nc"
a = addfile(indir+"/"+infle, "r")
; print(a)
lhf = a->LHF(mm,:,:)
it=it+1
lhf_sub=where(\
(lon2d .ge. lonw .and. lon2d .le. lone .and. \
lat2d .ge. lats .and. lat2d .le. latn),\
lhf, lhf@_FillValue)
lhflt(it,:,:)=lhf_sub(:,:)
end do ;yyyy
lhflt!0="time"
lhflt!1="lat"
lhflt!2="lon"
lhflt&lat=lat
lhflt&lon=lon
it=-1
do yyyy=yyyys,yyyye
it=it+1
infle=prefix+yyyy+".nc"
infle_no_suffix=systemfunc("basename "+ infle +" .nc")
;print("infle_no_suffix =" +infle_no_suffix)
;print("")
script_name = get_script_name()
script_no_suffix = systemfunc("basename "+ script_name +" .ncl")
;print("script_no_suffix =" +script_no_suffix)
;print("")
figfile=figdir+"/"+script_no_suffix+"_"+prefix+mmm+yyyy
figtype="png"
wks = gsn_open_wks(figtype,figfile)
; print(wks)
res = True ; make plot mods
res@gsnAddCyclic = False
res@sfXArray = lon
res@sfYArray = lat
opt=res
opt@cnFillOn = True
opt@gsnFrame = False
opt@gsnDraw = False
opt@mpMinLonF = 109
opt@mpMaxLonF = 140
opt@mpMinLatF = 15
opt@mpMaxLatF = 40
;opt@cnLevelSelectionMode = "ExplicitLevels"
;opt@cnLevels = (/ 0, 10, 20, 50, 100, 150, 200/)
opt@cnLevelSelectionMode = "ManualLevels"
opt@cnMinLevelValF = 0
opt@cnMaxLevelValF = 200
opt@cnLevelSpacingF = 10
opt@gsnLeftString = "LHF(Masked)"
opt@gsnCenterString = mmm+yyyy
opt@gsnRightString = "W/m~S~2~N~"
; Color Table Gallery
; http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml
gsn_define_colormap(wks,"WhiteBlueGreenYellowRed")
plot=gsn_csm_contour_map(wks,lhflt(it,:,:),opt)
draw(plot)
; HEADER
system("export LANG=C")
txres = True
txres@txFontHeightF = 0.01
txres@txJust="CenterLeft"
text=indir
gsn_text_ndc(wks,text,0.05,0.97,txres)
text=systemfunc("ls -lh "+ indir +"/"+ infle)
gsn_text_ndc(wks,text,0.05,0.95,txres)
;FOOTER
txres@txFontHeightF = 0.01
txres@txJust="CenterLeft"
text = systemfunc("date")
gsn_text_ndc(wks,text, 0.05,0.010,txres)
cwd =systemfunc("pwd")
gsn_text_ndc(wks,cwd, 0.05,0.025,txres)
gsn_text_ndc(wks,figfile+"."+figtype,0.05,0.040,txres)
frame(wks)
;print("")
print("Output: "+figfile+"."+figtype)
;print("")
end do ;yyyy
end
----------------------
End of jofuro-2.monthly.mask.ncl
----------------------