! ! Ferret/PyFerret Script to plot Figure 8 ! ! Biastoch, Sein, Durgadoo, Wang, Danilov ! Simulating the Agulhas system in global ocean models – nesting vs. multi-resolution ! unstructured meshes, Ocean Modelling, doi: 10.1016/J.OCEMOD-D-17-00174 ! Note that the ACT section is extracted beforehand (see extract scripts) go default ppl conset ,2 set mem/size=200 cancel region; cancel view; cancel data/all;cancel var/all; can mode logo define symbol print=no define symbol filename=Agulhas_detail define view/text=0.72/x=0:1/y=0.675:1 upup define view/text=0.72/x=0:1/y=0.45:0.9 uplo define view/text=0.72/x=0:0.55/y=0:0.6 le define view/text=0.72/x=0.45:1/y=0:0.6 ri IF ($program_name"0|PyFerret>1|*>0") THEN cancel text SET TEXT/FONT=arial hlab SET TEXT/FONT=arial vlab SET TEXT/FONT=arial/col=white movable ELSE if ($print) then set mode metafile ($filename).plt endif ENDIf use agu06_5d_19880101_20071231_ACT4.nc use 1_INALT01-KJD308_5d_19880101_20071231_ACT4.nc use "../ACT/ACT_2010-2013.nc" let vmean=vcross[l=@ave]/1e2 let vdot=vcross/1e2-vmean let mketmp=0.5*vmean*vmean let mke=mketmp[z=@din] let eketmp=0.5*vdot*vdot let eke=eketmp[l=@ave,z=@din] let tke=mke+eke define region/t="01-jan-1988":"31-dec-2007" tim set region tim set region/x=0:280 set win/asp=1 1 set view upup plot/thick=2/nol/dashed/vlim=101:450/hlim=0:280/set mke[d=1],mke[d=2] ppl axset 1,0,1,1 ppl axlabp,0,-1 !ppl xlab km !ppl ylab m^3/s^2 ppl plot cancel region/t plot/thick=2/ov/nol/dashed/col=blue mke[d=3] set region tim label 12.5,300,0,,0.18 (a) set view uplo plot/thick=2/nol/dashed/vlim=0:100/hlim=0:280/set mke[d=1],mke[d=2] ppl axset 0,1,1,1 ppl axlabp,-1,-1 ppl xlab km ppl ylab m^3/s^2 ppl plot plot/thick=2/col=black/d=1/nol/ov eke plot/thick=2/col=red/d=2/nol/ov eke cancel region/t plot/thick=2/ov/nol/dashed/col=blue mke[d=3] plot/thick=2/ov/nol/col=blue eke[d=3] set region tim IF ($program_name"0|PyFerret>1|*>0") THEN label 160,100,-1,,0.14 FESOM SET TEXT/FONT=arial/col=red label 160,85,-1,,0.14 NEMO SET TEXT/FONT=arial/col=blue label 160,70,-1,,0.14 ACT data CANCEL TEXT/FONT=arial/col=blue ENDIf cancel data/all;cancel var/all; cancel region use "../1-resolution/1_mesh_mask_B8N.nc" use agu06_U_010_1990-1999_4b_10year_INALT01_46lev_NEMO.nc use agu06_V_010_1990-1999_4b_10year_INALT01_46lev_NEMO.nc use 1_INALT01-KJD308_10y_19900101_19991231_grid_U.nc use 1_INALT01-KJD308_10y_19900101_19991231_grid_V.nc use agu06_eke100m_010_1988-2007_4b_10year_INALT01_46lev_NEMO_100m.nc use 1_INALT01-KJD308_5d_19980101_20071231_eke100m.nc define var/units=degrees_E lamt01=glamt[d=1] define var/units=degrees_N phit01=gphit[d=1] !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! set region/i=900:1100/j=120:320 set vi le fill/vlim=-40:-26:2/hlim=22:34:3/lev=(10,1010,1000)/pal=verylightgray/nokey/nol/set ignore0(eke[d=6])*1e4,lamt01,phit01 ppl axlabp,-1,-1 ppl fill contour/lev=(10)/nol/ov ignore0(eke[d=6])*1e4,lamt01,phit01 vector/len=0.5/z=100/xs=5/ys=5/nol/key/col=black/ov ignore0(VOZOCRTX[d=2]),ignore0(VOMECRTY[d=3]),lamt01,phit01 shade/ov/nol/pal=grey/lev=(0,0.1,0.1) tmask[k=1,d=1],lamt01,phit01 plot/line/vs/ov/col=red/thick=2/nol {27.5,28.8},{-33.3,-35.6} plot/line/vs/ov/col=green/thick=2/nol {`lamt01[i=989,j=237]`,`lamt01[i=1017,j=237]`},{`phit01[i=989,j=237]`,`phit01[i=1017,j=237]`} label 22.5,-27.5,-1,,0.18 (b) FESOM set vi ri fill/vlim=-40:-26:2/hlim=22:34:3/lev=(10,1010,1000)/pal=lightgray/nokey/nol/set ignore0(eke[d=7])*1e4,lamt01,phit01 ppl axlabp,-1,1 ppl fill contour/lev=(10)/nol/ov ignore0(eke[d=7])*1e4,lamt01,phit01 vector/len=0.5/z=100/xs=5/ys=5/nol/col=black/ov ignore0(VOZOCRTX[d=4]),ignore0(VOMECRTY[d=5]),lamt01,phit01 shade/ov/nol/pal=grey/lev=(0,0.1,0.1) tmask[k=1,d=1],lamt01,phit01 plot/line/vs/ov/col=red/thick=2/nol {27.5,28.8},{-33.3,-35.6} plot/line/vs/ov/col=green/thick=2/nol {`lamt01[i=989,j=237]`,`lamt01[i=1017,j=237]`},{`phit01[i=989,j=237]`,`phit01[i=1017,j=237]`} label 22.5,-27.5,-1,,0.18 (c) NEMO IF ($print) THEN IF ($program_name"0|PyFerret>1|*>0") THEN FRAME/FILE=($filename).pdf ELSE CANCEL MODE META sp Fprint -o ($filename).ps -l cps -p portrait ($filename).plt ENDIF ENDIF