::::::::::::::
pl.MLD.ILD.BLT.run.sh
::::::::::::::
#!/bin/sh
export LANC=C
exe=./runncl.sh
ncl=$(basename $0 .run.sh).ncl
# Default value
dataset=ECCO.dr080g
yyyy="2005-2012"
m=1
vlev=1
dt=0.5
m=$1
dt=$2
indir=/work4/data/${dataset}
if [ ! -d $indir ]; then
echo
echo Error in $0 : No such directory, $indir
echo
exit 1
fi
outdir=${HOME}/2015.Ibnu.Indian.Ocean/Fig/${dataset}/$(basename $(pwd))/\
$(basename $0 .sh)/${yyyy}
if [ ! -d $outdir ]; then
mkdir -vp $outdir
fi
mm=$(printf %02d $m)
if [ $m -eq 1 ]; then mmm="Jan"; fi
if [ $m -eq 2 ]; then mmm="Feb"; fi
if [ $m -eq 3 ]; then mmm="Mar"; fi
if [ $m -eq 4 ]; then mmm="Apr"; fi
if [ $m -eq 5 ]; then mmm="May"; fi
if [ $m -eq 6 ]; then mmm="Jun"; fi
if [ $m -eq 7 ]; then mmm="Jul"; fi
if [ $m -eq 8 ]; then mmm="Aug"; fi
if [ $m -eq 9 ]; then mmm="Sep"; fi
if [ $m -eq 10 ]; then mmm="Oct"; fi
if [ $m -eq 11 ]; then mmm="Nov"; fi
if [ $m -eq 12 ]; then mmm="Dec"; fi
in[0]=${indir}/${dataset}.Tclm.${yyyy}.${mm}.nc
in[1]=${indir}/${dataset}.Sclm.${yyyy}.${mm}.nc
if [ ! -f "${in[0]}" ]; then
echo "Error in $0: No such file, ${in[0]}"
exit 1
fi
if [ ! -f "${in[1]}" ]; then
echo "Error in $0: No such file, ${in[1]}"
exit 1
fi
$exe $ncl ${in[0]} ${in[1]} ${yyyy} ${m} ${mmm} ${dt} ${outdir}
echo
echo Done $(basename $0).
echo
exit 0
::::::::::::::
runncl.sh
::::::::::::::
#!/bin/bash
#
# Universal wrapper script for ncl.
# Pass arguments from the command line to environment variables
#
# version 0.1, Thierry Corti, C2SM ETH Zurich
#
E_BADARGS=65
if [ ! -n "$1" ]
then
echo "Usage: `basename $0` script.ncl argument1 argument2 etc."
exit $E_BADARGS
fi
# save number of arguments to environment variable NCL_N_ARG
export NCL_N_ARGS=$#
# save command line arguments to environment variable NCL_ARG_#
for ((index=1; index<=$#; index++))
do
eval export NCL_ARG_$index=\$$index
done
# run ncl
ncl -Q -n $1
exit 0
::::::::::::::
wrapit.sh
::::::::::::::
#!/bin/bash
f90=$1
stub=$(basename $f90 .f90).stub
if [ ! -f $f90 ]; then echo Error in $0. No such file, $f90; exit 1; fi
if [ ! -f $fst ]; then echo Error in $0. No such file, $f90; exit 1; fi
export LANG=C
cat <<EOF
Fortran Source file: $f90
Stub file: $stub
EOF
WRAPIT $stub $f90
if [ $? -ne 0 ]; then
echo "***"
echo "*** ERROR in $0 while running WRAPIT."
echo "***"
exit 1
fi
echo
date
echo Shared Libraries:
ls -lh *.so
echo
echo Done $(basename $0).
echo
exit 0
::::::::::::::
mixed_layer.f90
::::::::::::::
subroutine find_ild(nx,ny,nz,t3d,t2d,dt,z1d,fillvalue,ild)
integer,intent(in)::nx,ny,nz
real,intent(in)::t3d(nx,ny,nz),t2d(nx,ny)
real,intent(in)::dt
real,intent(in)::z1d(nz)
real,intent(in)::fillvalue
real,intent(inout)::ild(nx,ny)
! z1d(k): Model's vertical coordinate
! ild=isothermal layer depth
do j=1,ny
do i=1,nx
ild(i,j)=fillvalue ! default = undefined
xs= t2d(i,j) - dt
do k=1,nz-1
if(t3d(i,j,k+1) <= xs .and. xs < t3d(i,j,k) )then
y1=z1d(k+1)
y2=z1d(k)
x1=t3d(i,j,K+1)
x2=t3d(i,j,k)
!Linear Interpolation
ys=(y2-y1)/(x2-x1)*(xs-x1) + y1
ild(i,j)=ys
end if
end do !k
! Otherwise, the water column should be vertically homogeneous.
! ild(i,j)=fillvalue
end do !i
end do !j
end subroutine find_ild
subroutine pdens3d(im,jm,km,t3d,s3d,z1d,fillvalue,pd3d)
integer,intent(in)::im,jm,km
real,intent(in),dimension(im,jm,km)::t3d,s3d
real,intent(in),dimension(km)::z1d
real,intent(in)::fillvalue
real,intent(inout),dimension(im,jm,km)::pd3d
pd3d=fillvalue
do k=1,km
do j=1,jm
do i=1,im
if(t3d(i,j,k)/=fillvalue .and. s3d(i,j,k)/=fillvalue)then
call sigma_theta(z1d(k),t3d(i,j,k),s3d(i,j,k),pd3d(i,j,k))
end if
end do!i
end do !j
end do !k
end subroutine pdens3d
subroutine pdens2d(im,jm,t2d,s2d,z,fillvalue,pd2d)
integer,intent(in)::im,jm
real,intent(in),dimension(im,jm)::t2d,s2d
real,intent(in)::z
real,intent(in)::fillvalue
real,intent(inout),dimension(im,jm)::pd2d
pd2d=fillvalue
do j=1,jm
do i=1,im
if(t2d(i,j)/=fillvalue .and. s2d(i,j)/=fillvalue)then
call sigma_theta(z,t2d(i,j),s2d(i,j),pd2d(i,j))
end if
end do!i
end do !j
end subroutine pdens2d
subroutine dsigth(im,jm,pd1,pd2,fillvalue,dpd)
integer,intent(in)::im,jm
real,intent(in),dimension(im,jm)::pd1, pd2
real,intent(in)::fillvalue
real,intent(inout),dimension(im,jm)::dpd
dpd=fillvalue
do j=1,jm
do i=1,im
if(pd1(i,j)/=fillvalue .and. pd2(i,j)/=fillvalue)then
dpd(i,j)=pd1(i,j)-pd2(i,j)
end if
end do!i
end do !j
end subroutine dsigth
subroutine find_mld(nx,ny,nz,pd3d,pd2d,dpd,z1d,fillvalue,mld)
integer,intent(in)::nx,ny,nz
real,intent(in)::pd3d(nx,ny,nz),pd2d(nx,ny),dpd(nx,ny)
real,intent(in)::z1d(nz)
real,intent(in)::fillvalue
real,intent(inout)::mld(nx,ny)
! z1d(k): Model's vertical coordinate
! ild=isothermal layer depth
do j=1,ny
do i=1,nx
mld(i,j)=fillvalue ! default = undefined
xs= pd2d(i,j) + dpd(i,j)
do k=1,nz-1
if(pd3d(i,j,k) <= xs .and. xs < pd3d(i,j,k+1) )then
y1=z1d(k)
y2=z1d(k+1)
x1=pd3d(i,j,k)
x2=pd3d(i,j,k+1)
!Linear Interpolation
ys=(y2-y1)/(x2-x1)*(xs-x1) + y1
mld(i,j)=ys
end if
end do !k
end do !i
end do !j
end subroutine find_mld
subroutine calc_blt(nx,ny,ild,mld,fillvalue,blt)
integer,intent(in)::nx,ny
real,intent(in)::ild(nx,ny),mld(nx,ny)
real,intent(in)::fillvalue
real,intent(inout)::blt(nx,ny)
real,parameter::eps=0.1
! z1d(k): Model's vertical coordinate
! ild=isothermal layer depth
do j=1,ny
do i=1,nx
blt(i,j)=fillvalue
if(mld(i,j)/=fillvalue .and. ild(i,j)/=fillvalue )then
if(mld(i,j)>eps .and. ild(i,j)>eps )then
blt(i,j)=ild(i,j)-mld(i,j)
end if
end if
end do !i
end do !j
end subroutine calc_blt
subroutine sigma_theta(z,t,s,sigth)
implicit none
real,intent(in) :: z,t,s
real,intent(out) :: sigth
! Description:
! sigma_theta = sigma(theta,s,p=0)
! whete, theta is potential temperature, s is salinity, and p is pressure
! Author: aym
real p0 ! pressure in decibars
real pr ! reference pressure in decibars
real th,theta ! potential temperature
real*8 pd,sd,thd,rhod
! Potential temperature
p0=z ! p0 in decibars
pr=0.0
th=theta(s,t,p0,pr)
! Potential density
pd=0.d0 !dble(z)*0.1d0
sd=dble(s)
thd=dble(th)
call eqst2(pd,thd,sd,rhod)
sigth=sngl(rhod-1000.d0)
end subroutine sigma_theta
!***********************************************************************
! eqst2.f90
! TASK
!j 状態方程式(IES80)により海水の密度を計算する。
! REMARK
!
!j All arguments must be DOUBLE PRECISION.
!
!j 入力データは,P [bar], T[deg.], S [psu]
! 圧力の単位がbarであることに注意! (1.0bar = 0.1*dbar)
!
! [USAGE]
!
! Pressure=0.1*z
! call eqst2(pressure,t,s,dens)
!
! where z is depth in meters, t is temperature, s is salinity, and
! dens is density in kg/m3.
!
!
!j 適用範囲
! -2 < T < 40 [deg.]
! 0 < S < 42 [psu]
! 0 < P < 1000 [bar] = 10000 [dbar]
!
!j 水深[m]=圧力[dbar]という関係を仮定している。これによる両者の誤差は
!j 1%以内(海洋観測指針)。
! It assumes no pressure variation along geopotential surfaces,
! that is, depth and pressure are interchangeable.
!
! REFERENCE
!j 気象庁編():海洋観測指針,428pp.
! UNESCO (1981): Background Papers and Supporting Data on the
! International Equation of State of Seawater. Tech. Pap. Mar.
! Sci., 38, 192pp.
!***********************************************************************
subroutine eqst2(P,T,S,RHO)
implicit none
double precision,intent(in) :: P,T,S
double precision,intent(out):: RHO
double precision b0,b1,b2,b3,b4, c0,c1,c2, d0
double precision a0,a1,a2,a3,a4,a5
double precision f0,f1,f2,f3, g0,g1,g2
double precision i0,i1,i2, j0
double precision m0,m1,m2
double precision e0,e1,e2,e3,e4
double precision h0,h1,h2,h3
double precision k0,k1,k2
parameter(b0= 8.24493d-1, c0=-5.72466d-3 &
& ,b1=-4.0899d-3 , c1= 1.0227d-4 &
& ,b2= 7.6438d-5 , c2=-1.6546d-6 &
& ,b3=-8.2467d-7 &
& ,b4= 5.3875d-9 , d0= 4.8314d-4)
parameter(a0= 999.842594, a1= 6.793952d-2 &
& ,a2=-9.095290d-3,a3= 1.001685d-4 &
& ,a4=-1.120083d-6,a5= 6.536332d-9)
parameter(f0= 54.6746 ,g0= 7.944d-2 &
& ,f1= -0.603459 ,g1= 1.6483d-2 &
& ,f2= 1.09987d-2,g2=-5.3009d-4 &
& ,f3= -6.1670d-5)
parameter(i0= 2.2838d-3 ,j0= 1.91075d-4 &
& ,i1=-1.0981d-5 &
& ,i2=-1.6078d-6)
parameter(m0=-9.9348d-7, m1= 2.0816d-8 &
& ,m2= 9.1697d-10)
parameter(e0= 19652.21, e1= 148.4206 &
& ,e2=-2.327105, e3= 1.360477d-2 &
& ,e4=-5.155288e-5)
parameter(h0= 3.239908, h1= 1.43713d-3 &
& ,h2= 1.16092d-4, h3=-5.77905d-7)
parameter(k0= 8.50935d-5, k1=-6.12293d-6 &
& ,k2= 5.2787d-8)
integer k
double precision rhow,rhop0,Kw,Aw,Bw,Kp0,A,B,Kp
!-----------------------------------------------------------------------
!j 以下の式番号はすべて海洋観測指針(p.92~93)に記載されている式番号に
!j 対応する。
! Eq.(4)
rhow=a0 + a1*t + a2*t**2 + a3*t**3 + a4*t**4 &
& + a5*t**5
! Eq.(3)
rhop0=rhow + (b0 + b1*t + b2*t**2 + b3*t**3 &
& + b4*t**4)*s &
& + (c0 + c1*t + c2*t**2)*s**(1.5) &
& + d0*s**2
! Eq.(9)
Kw=e0 + e1*t + e2*t**2 + e3*t**3 + e4*t**4
! Eq.(10)
Aw=h0 + h1*t + h2*t**2 + h3*t**3
! Eq.(11)
Bw=k0 + k1*t + k2*t**2
! Eq.(6)
Kp0=Kw + (f0 + f1*t + f2*t**2 + f3*t**3)*s &
& + (g0 + g1*t + g2*t**2)*S**(1.5)
! Eq.(7)
A=Aw + (i0 + i1*t + i2*t**2)*s + j0*S**(1.5)
! Eq.(8)
B=Bw + (m0 + m1*t + m2*t**2)*s
! Eq.(5)
Kp=Kp0 + A*p + B*p**2
! Eq.(1)
rho=rhop0/(1.0d0 - p/Kp)
end subroutine eqst2
function theta(s,t0,p0,pr)
!
! to compute local potential temperature at pr
! using bryden 1973 polynomial for adiabatic lapse rate
! and runge-kutta 4-th order integration algorithm.
! ref: bryden,h.,1973,deep-sea res.,20,401-408
! fofonoff,n.,1977,deep-sea res.,24,489-491
! units:
! pressure p0 *** decibars ***
! temperature t0 deg celsius (ipts-68)
! salinity s (ipss-78)
! reference prs pr decibars
! potential tmp. theta deg celsius
! checkvalue: theta= 36.89073 c,s=40 (ipss-78),t0=40 deg c,
! p0=10000 decibars,pr=0 decibars
!
! set-up intermediate temperature and pressure variables
!
! http://www.marine.csiro.au/~jackett/NeutralDensity/
implicit none
real,intent(in)::s,t0,p0,pr
real p,t,h,xk,q,theta,atg
p=p0
t=t0
h = pr - p
xk = h*atg(s,t,p)
t = t + 0.5*xk
q = xk
p = p + 0.5*h
xk = h*atg(s,t,p)
t = t + 0.29289322*(xk-q)
q = 0.58578644*xk + 0.121320344*q
xk = h*atg(s,t,p)
t = t + 1.707106781*(xk-q)
q = 3.414213562*xk - 4.121320344*q
p = p + 0.5*h
xk = h*atg(s,t,p)
theta = t + (xk-2.0*q)/6.0
end function theta
function atg(s,t,p)
!
! adiabatic temperature gradient deg c per decibar
! ref: bryden,h.,1973,deep-sea res.,20,401-408
! units:
! pressure p decibars
! temperature t deg celsius (ipts-68)
! salinity s (ipss-78)
! adiabatic atg deg. c/decibar
! checkvalue: atg=3.255976e-4 c/dbar for s=40 (ipss-78),
! t=40 deg c,p0=10000 decibars
!
! http://www.marine.csiro.au/~jackett/NeutralDensity/
implicit none
real,intent(in)::s,t,p
real atg,ds
ds = s - 35.0
atg = (((-2.1687d-16*t+1.8676d-14)*t-4.6206d-13)*p &
+((2.7759d-12*t-1.1351d-10)*ds+((-5.4481d-14*t &
+8.733d-12)*t-6.7795d-10)*t+1.8741d-8))*p &
+(-4.2393d-8*t+1.8932d-6)*ds &
+((6.6228d-10*t-6.836d-8)*t+8.5258d-6)*t+3.5803d-5
end function atg
::::::::::::::
mixed_layer.stub
::::::::::::::
C NCLFORTSTART
subroutine find_ild(nx,ny,nz,t3d,t2d,dt,z1d,fillvalue,ild)
integer nx,ny,nz
real t3d(nx,ny,nz)
real t2d(nx,ny)
real dt
real z1d(nz)
real fillvalue
real ild(nx,ny)
C NCLEND
C NCLFORTSTART
subroutine pdens3d(im,jm,km,t3d,s3d,z1d,fillvalue,pd3d)
integer im,jm,km
real t3d(im,jm,km),s3d(im,jm,km)
real z1d(km)
real fillvalue
real pd3d(im,jm,km)
C NCLEND
C NCLFORTSTART
subroutine pdens2d(im,jm,t2d,s2d,z,fillvalue,pd2d)
integer im,jm
real t2d(im,jm),s2d(im,jm)
real z
real fillvalue
real pd2d(im,jm)
C NCLEND
C NCLFORTSTART
subroutine dsigth(im,jm,pd1,pd2,fillvalue,dpd)
integer im,jm
real pd1(im,jm), pd2(im,jm)
real fillvalue
real dpd(im,jm)
C NCLEND
C NCLFORTSTART
subroutine find_mld(nx,ny,nz,pd3d,pd2d,dpd,z1d,fillvalue,mld)
integer nx,ny,nz
real pd3d(nx,ny,nz),pd2d(nx,ny),dpd(nx,ny)
real z1d(nz)
real fillvalue
real mld(nx,ny)
C NCLEND
C NCLFORTSTART
subroutine calc_blt(nx,ny,ild,mld,fillvalue,blt)
integer nx,ny
real ild(nx,ny),mld(nx,ny)
real fillvalue
real blt(nx,ny)
C NCLEND
C NCLFORTSTART
subroutine sigma_theta(z,t,s,sigth)
real z,t,s
real sigth
C NCLEND
C NCLFORTSTART
subroutine eqst2(P,T,S,RHO)
double precision P,T,S
double precision RHO
C NCLEND
C NCLFORTSTART
function theta(s,t0,p0,pr)
real s,t0,p0,pr
C NCLEND
C NCLFORTSTART
function atg(s,t,p)
real s,t,p
C NCLEND
::::::::::::::
pl.MLD.ILD.BLT.ncl
::::::::::::::
;
; Plot horizontal maps of
; - isothermal-layer depth (ILD)
; - MLD
; - BLT
; of climatological average of ECCO dr080g dataset
;
;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
external ML "./mixed_layer.so"
begin
wallClock1 = systemfunc("export LANG=C; date") ; retrieve wall clock time
;
; default value
;
vlev=2
dataset="ECCO dr080g"
;
; Read command line arguments
;
scname = getenv("NCL_ARG_1")
infle1 = getenv("NCL_ARG_2")
infle2 = getenv("NCL_ARG_3")
yyyy = getenv("NCL_ARG_4")
m = getenv("NCL_ARG_5")
mmm = getenv("NCL_ARG_6")
dt_in = getenv("NCL_ARG_7")
outdir = getenv("NCL_ARG_8")
dt=stringtofloat(dt_in)
;
; Read input data
;
ft=addfile(infle1,"r")
fs=addfile(infle2,"r")
tglobal3d=ft->tclim
sglobal3d=fs->sclim
;printVarSummary(tglobal3d)
z1d=ft->depth
lat=ft->lat
lon=ft->lon
;printVarSummary(tglobal3d)
t3d=tglobal3d(depth|:,{lat|-30:30},{lon|30:120})
s3d=sglobal3d(depth|:,{lat|-30:30},{lon|30:120})
;
; Find ILD
;
dims=dimsizes(t3d)
im=dims(2)
jm=dims(1)
km=dims(0)
ild=t3d(0,:,:)
ild@coordinates:="lat lon"
delete(ild@depth)
ild!0:="lat"
ild!1:="lon"
;printVarSummary(t3d)
;printVarSummary(ild)
;Set depth
klev=vlev-1 ; stringtointeger(vlev)-1
;print(klev)
z=floattointeger(z1d(klev))
;print(z)
t2d = t3d(klev,:,:)
t2d@coordinates:="lat lon"
delete(t2d@depth)
;printVarSummary(t2d)
;
; ILD
;
ML::find_ild(im,jm,km,t3d,t2d,dt,z1d,t3d@_FillValue,ild)
;print(ild)
;
; Potential density (3D)
;
pd3d=t3d
pd3d@standard_name:="potential density"
delete(pd3d@long_name)
pd3d@coordinates:="depth lat lon"
pd3d@units="kg/m3"
ML::pdens3d(im,jm,km,t3d,s3d,z1d,t3d@_FillValue,pd3d)
;printVarSummary(pd3d)
;
; Salinity at a reference depth
;
s2d = s3d(klev,:,:)
s2d@coordinates:="lat lon"
delete(s2d@depth)
;printVarSummary(s2d)
;
; Potential density at a reference depth (2D)
;
pd2d_r= s2d
zref=z1d(klev)
ML::pdens2d(im,jm,t2d,s2d,zref,t3d@_FillValue,pd2d_r)
;
; Potential density at T=Tref - dT, S=Sref, P=p0 (2D)
;
pd2d_b= s2d
zref=z1d(klev)
t2d_b=t2d - dt
ML::pdens2d(im,jm,t2d_b,s2d,zref,t3d@_FillValue,pd2d_b)
;
; Difference in potential densities (pd2d_b - pd2d_r)
;
dpd2d=pd2d_b
dpd2d@standard_name:="difference in potential density"
delete(dpd2d@long_name)
dpd2d@coordinates:="lat lon"
dpd2d@units="kg/m3"
ML::dsigth(im,jm,pd2d_b,pd2d_r,t3d@_FillValue,dpd2d)
;printVarSummary(dpd2d)
;print(dpd2d)
;
; MLD
;
mld=dpd2d
mld@standard_name:="mixed layer depth"
mld@units="m"
ML::find_mld(im,jm,km,pd3d,pd2d_r,dpd2d,z1d,t3d@_FillValue,mld)
;printVarSummary(mld)
;
; BLT
;
blt=mld
blt@standard_name:="barrier layer thickness"
blt@units="m"
ML::calc_blt(im,jm,ild,mld,t3d@_FillValue,blt)
;printVarSummary(blt)
;print(blt)
;do j=1,jm
; do i=1,im
; print(ild(j,i)+" "+mld(j,i)+" "+blt(j,i))
; end do
;end do
;
; Set year and month
;
dateprt= mmm + " (" + yyyy +")"
;
; Set output file name
;
filetype="png" ;"ps"
mm=sprinti("%0.2i",stringtointeger(m))
ofle=outdir + "/" + "ECCO.dr080g_MLD.ILD.BLT." + yyyy + "." + mm + "." + filetype
wks = gsn_open_wks(filetype,ofle)
;
; Set NCL resources
;
res = True
res@gsnDraw = False ; don't draw
res@gsnFrame = False ; don't advance frame
;Figure size
res@vpHeightF = 0.2 ;0.35
res@vpWidthF = 0.25 ;0.55
res@vpYF = 0.6 ;0.2
res@vpXF = 0.1 ;0.2
;Map
res@mpFillOn = True
res@gsnPaperOrientation = "landscape"
res@mpShapeMode = "FreeAspect"
res@gsnAddCyclic = False
;Contour
res@cnFillOn = True ; turn on color fill
res@cnLineColor = "white"
res@lbOrientation = "horizontal"
res@cnLevelSelectionMode = "ManualLevels" ; manually set the contour levels with the following 3 resources
res@gsnContourLineThicknessesScale=1.5
;Choose subregion
res@mpMinLatF =-20
res@mpMaxLatF = 20
res@mpMinLonF = 40
res@mpMaxLonF =110
res@mpDataBaseVersion = "Ncarg4_1" ; use GMT coastline
;
; Left panel
;
res1=res
;res1@vpYF = 0.9
res1@vpXF = 0.05
res1@cnMinLevelValF = 10 ; set min contour level
res1@cnMaxLevelValF = 100 ; set max contour level
res1@cnLevelSpacingF = 10 ; set contour spacing
res1@gsnLeftString = "" ; add the gsn titles
res1@gsnCenterString = "ILD [m]"
res1@gsnRightString = ""
plot1 = gsn_csm_contour_map(wks,ild,res1) ; Draw a contour plot.
; now assign plotA to array
draw(plot1)
delete(res1)
;
; Center panel
;
res2=res
;res2@vpYF = 0.45
res2@vpXF = 0.35
res2@cnMinLevelValF = 10 ; set min contour level
res2@cnMaxLevelValF = 100 ; set max contour level
res2@cnLevelSpacingF = 10 ; set contour spacing
res2@gsnLeftString = "" ; add the gsn titles
res2@gsnCenterString = "MLD [m]"
res2@gsnRightString = ""
plot2 = gsn_csm_contour_map(wks,mld,res2) ; Draw a contour plot.
draw(plot2)
delete(res2)
;
; Right panel
;
gsn_define_colormap(wks,"precip3_16lev")
res3=res
;res3@vpYF = 0.45
res3@vpXF = 0.65
res3@cnMinLevelValF = 0 ; set min contour level
res3@cnMaxLevelValF = 70 ; set max contour level
res3@cnLevelSpacingF = 10 ; set contour spacing
res3@gsnLeftString = "" ; add the gsn titles
res3@gsnCenterString = "BLT [m]"
res3@gsnRightString = ""
plot3 = gsn_csm_contour_map(wks,blt,res3) ; Draw a contour plot.
draw(plot3)
delete(res3)
txres = True ; text mods desired
txres@txFontHeightF = 0.015 ; font smaller. default big
txres@txBackgroundFillColor = "white"
txres@txFontColor="black"
text=dataset
gsn_text_ndc(wks,text,0.475,0.75,txres)
text=dateprt
gsn_text_ndc(wks,text,0.475,0.7,txres)
txres@txFontHeightF = 0.013 ; font smaller. default big
text="dt="+dt_in+" [~S~o~N~C]"
gsn_text_ndc(wks,text,0.475,0.67,txres)
;
; Header and footer
;
;drawNDCGrid(wks)
txres = True ; text mods desired
txres@txFontHeightF = 0.01 ; font smaller. default big
gsn_text_ndc(wks,outdir,0.5,0.99,txres)
text=systemfunc("export LANG=C; date")
gsn_text_ndc(wks,text,0.2,0.010,txres)
text=systemfunc("pwd")+"/"+scname
gsn_text_ndc(wks,text,0.5,0.03,txres)
frame(wks)
print("")
print("Output: "+ ofle)
print("")
end