# plot data variance in mpiexm
# mpiexm contains multiple atm(echam6) and one ocn(mpiom) coupling

Title: Ocean Heat Content annual variance ratio of control run
Description: |
    Inegrated Ocean Heat Content(OHC) 100m, 200m and 500m variance ratio.
COMMENT: |
    Inegrated Ocean Heat Content(OHC) 100m, 200m and 500m variance ratio.
COMPONENT:  mpiom

ohc100:
    VN: OHC-100
    TVN: OHC100m
ohc200:
    VN: OHC-200
    TVN: OHC200m
ohc500:
    VN: OHC-500
    TVN: OHC500m
VARIABLE:  VN
YEARBE: 1101,1250
NYR: 150

## plots setting
FIGFS: write_table("figfilelist.txt","a",[/figfn/],"%s") ;; for mk_html_page.sh
FIGFILES: $(cat figfilelist.txt) # for mk_html_pages.sh

VariGlobal:
    plotScript: mpiexm/plot_mpiexm_variance.ncl
    TITLE: "yearly TVN variance ratio NAME/CTL (model year: NAME=NYR, CTL=NYC)"
    FIGFILENAME: VN_var-ratio_CASE_SEAS
    PLOTRES: |
        res@mpLimitMode = "LatLon"
        res@mpMinLatF = -90.
        res@mpMaxLatF = 90.
        res@mpMinLonF = -330.
        res@mpMaxLonF =   30.
        res@pmTickMarkDisplayMode = "Always"
        res@mpCenterLonF =   -150.
        res@cnLinesOn = False
        res@cnFillOn = True
        res@lbOrientation = "Vertical"
        res@pmLabelBarWidthF = 0.1
        res@pmLabelBarOrthogonalPosF   = 0.01
        ;;res@cnFillColors         = (/(/150,255,253/),(/0,255,253/),(/34,118,254/),(/153,154,254/),(/253,152,153/),(/255,118,33/),(/254,254,0/)/)
        res@cnFillColors         = (/(/150,255,253/),(/0,255,253/),(/34,118,254/),(/153,154,254/),(/203,204,254/),(/255,255,255/),(/255,255,255/),(/254,254,0/),(/255,118,33/),(/255,0,0/),(/255,0,222/)/)
        res@cnFillColors   := res@cnFillColors/255. 
        res@cnLevelSelectionMode = "ExplicitLevels"
        ;res@cnLevels = (/.2,1,2,3,4,5/)
        res@cnLevels = (/.2,.4,.6,.8,.9,1.,1.1,1.2,1.4,1.6/)
        res@gsnRightString = "1"

        lres@cnLineColor = "Red"
        lres@cnLinesOn = True
        lres@cnFillOn = False
        lres@cnLevelSelectionMode = "ExplicitLevels"
        lres@cnLevels := (/.2/)
        lres@cnLineLabelsOn = False
        lres@cnInfoLabelOn = False
        FIGFS
VariNAtl:
    plotScript: mpiexm/plot_mpiexm_variance.ncl
    TITLE: "yearly TVN variance ratio NAME/CTL SEAS (model year: NAME=NYR, CTL=NYC)"
    FIGFILENAME: VN_var-ratio_CASE_SEAS_natl
    CACHEFILENAME: VN_var-ratio_CASE_SEAS
    PLOTRES: |
        res@mpLimitMode = "LatLon"
        res@mpMinLatF = 20.
        res@mpMaxLatF = 70.
        res@mpMinLonF = -80.
        res@mpMaxLonF =  10.
        res@pmTickMarkDisplayMode = "Always"
        res@mpCenterLatF = 50.
        res@mpCenterLonF =  -35.
        res@mpProjection = "LambertConformal"
        res@mpGridAndLimbOn = True
        res@gsnMaskLambertConformal = True
        res@cnLinesOn = False
        res@cnFillOn = True
        res@lbOrientation = "Vertical"
        res@pmLabelBarWidthF = 0.1
        res@pmLabelBarOrthogonalPosF   = 0.01
        ;res@cnFillColors         = (/(/150,255,253/),(/0,255,253/),(/34,118,254/),(/153,154,254/),(/253,152,153/),(/255,118,33/),(/254,254,0/)/)
        res@cnFillColors         = (/(/150,255,253/),(/0,255,253/),(/34,118,254/),(/153,154,254/),(/203,204,254/),(/255,255,255/),(/255,255,255/),(/254,254,0/),(/255,118,33/),(/255,0,0/),(/255,0,222/)/)
        res@cnFillColors   := res@cnFillColors/255. 
        res@cnLevelSelectionMode = "ExplicitLevels"
        ;res@cnLevels = (/.2,1,2,3,4,5/)
        res@cnLevels = (/.2,.4,.6,.8,.9,1.,1.1,1.2,1.4,1.6/)
        res@gsnRightString = "1"

        lres@cnLineColor = "Red"
        lres@cnLinesOn = True
        lres@cnFillOn = False
        lres@cnLevelSelectionMode = "ExplicitLevels"
        lres@cnLevels := (/.2/)
        lres@cnLineLabelsOn = False
        lres@cnInfoLabelOn = False
        FIGFS

TS_plot:
    plotScript: mpiexm/plot_annual_timeseries.ncl
    TITLE: "TVN NAME TREG"
    FIGFILENAME: vn_REG_ts_CASE_SEAS
    PLOTRES: |
        FIGFS
REG_spg:
    LATBE: 50.,60.
    LONBE: -40.,-10.
    REG: spg
    TREG: "50~F34~0~F~N-60~F34~0~F~N,40~F34~0~F~W-10~F34~0~F~W"

## case setting
CASEDIR: /projects/NS9207K/pgchiu/CASE
    ## CASE define later

CTN: f08_1AGCM
    ## proxy of CCASE 'control case'
CCASE: CTN
CONTROLDIR: /projects/NS9207K/pgchiu/CCASE
YBEC: 1101,1250
CONTROLYEARBE: YBEC
NYC: 150

Case_CTL:
    CASE: f08_1AGCM
    NAME: CTL
Case_CTL2:
    CASE: f08_5AGCMs_NASPG_sample
    NAME: CTL2
Case_AVG:
    CASE: f08_5AGCMs_NASPG_average
    NAME: IEave
Case_AVG_glob:
    CASE: f09_5AGCMs_Global_average
    NAME: IEGave
Case_SAM:
    CASE: f09_5AGCMs_NASPG_sample
    NAME: IEsam

Season_ANN:
    SEAS: ANN
    MONTHS: 1,2,3,4,5,6,7,8,9,10,11,12
Season_DJF:
    SEAS: DJF
    MONTHS: 12,13,14
Season_MAM:
    SEAS: MAM
    MONTHS: 3,4,5
Season_JJA:
    SEAS: JJA
    MONTHS: 6,7,8
Season_SON:
    SEAS: SON
    MONTHS: 9,10,11

Scripts:
-  # Remove figfilelist.txt which is for mk_html_page.sh at bottom
    plotScript: mk_runcode.sh
    RUNTHESECODES: |
        rm -f figfilelist.txt
## annual global
- varPack: VariGlobal, ohc100, Season_ANN, Case_CTL2
- varPack: VariGlobal, ohc100, Season_ANN, Case_SAM
- varPack: VariGlobal, ohc100, Season_ANN, Case_AVG
- varPack: VariGlobal, ohc100, Season_ANN, Case_AVG_glob

## annual spg ts
- varPack: TS_plot, ohc100, REG_spg, Season_ANN, Case_CTL2
- varPack: TS_plot, ohc100, REG_spg, Season_ANN, Case_SAM
- varPack: TS_plot, ohc100, REG_spg, Season_ANN, Case_AVG
- varPack: TS_plot, ohc100, REG_spg, Season_ANN, Case_AVG_glob
- varPack: TS_plot, ohc100, REG_spg, Season_ANN, Case_CTL

## seasonal variance ratio
- varPack: VariGlobal, ohc100, Season_DJF, Case_CTL2
- varPack: VariGlobal, ohc100, Season_DJF, Case_SAM
- varPack: VariGlobal, ohc100, Season_DJF, Case_AVG
- varPack: VariGlobal, ohc100, Season_DJF, Case_AVG_glob
- varPack: VariGlobal, ohc100, Season_MAM, Case_CTL2
- varPack: VariGlobal, ohc100, Season_MAM, Case_SAM
- varPack: VariGlobal, ohc100, Season_MAM, Case_AVG
- varPack: VariGlobal, ohc100, Season_MAM, Case_AVG_glob
- varPack: VariGlobal, ohc100, Season_JJA, Case_CTL2
- varPack: VariGlobal, ohc100, Season_JJA, Case_SAM
- varPack: VariGlobal, ohc100, Season_JJA, Case_AVG
- varPack: VariGlobal, ohc100, Season_JJA, Case_AVG_glob
- varPack: VariGlobal, ohc100, Season_SON, Case_CTL2
- varPack: VariGlobal, ohc100, Season_SON, Case_SAM
- varPack: VariGlobal, ohc100, Season_SON, Case_AVG
- varPack: VariGlobal, ohc100, Season_SON, Case_AVG_glob

## seasonal spg time sries
- varPack: TS_plot, ohc100, REG_spg, Season_DJF, Case_CTL2
- varPack: TS_plot, ohc100, REG_spg, Season_DJF, Case_SAM
- varPack: TS_plot, ohc100, REG_spg, Season_DJF, Case_AVG
- varPack: TS_plot, ohc100, REG_spg, Season_DJF, Case_AVG_glob
- varPack: TS_plot, ohc100, REG_spg, Season_DJF, Case_CTL
- varPack: TS_plot, ohc100, REG_spg, Season_MAM, Case_CTL2
- varPack: TS_plot, ohc100, REG_spg, Season_MAM, Case_SAM
- varPack: TS_plot, ohc100, REG_spg, Season_MAM, Case_AVG
- varPack: TS_plot, ohc100, REG_spg, Season_MAM, Case_AVG_glob
- varPack: TS_plot, ohc100, REG_spg, Season_MAM, Case_CTL
- varPack: TS_plot, ohc100, REG_spg, Season_JJA, Case_CTL2
- varPack: TS_plot, ohc100, REG_spg, Season_JJA, Case_SAM
- varPack: TS_plot, ohc100, REG_spg, Season_JJA, Case_AVG
- varPack: TS_plot, ohc100, REG_spg, Season_JJA, Case_AVG_glob
- varPack: TS_plot, ohc100, REG_spg, Season_JJA, Case_CTL
- varPack: TS_plot, ohc100, REG_spg, Season_SON, Case_CTL2
- varPack: TS_plot, ohc100, REG_spg, Season_SON, Case_SAM
- varPack: TS_plot, ohc100, REG_spg, Season_SON, Case_AVG
- varPack: TS_plot, ohc100, REG_spg, Season_SON, Case_AVG_glob
- varPack: TS_plot, ohc100, REG_spg, Season_SON, Case_CTL
## NAtl plots
- varPack: VariNAtl, ohc100, Season_ANN, Case_CTL2
- varPack: VariNAtl, ohc100, Season_ANN, Case_SAM
- varPack: VariNAtl, ohc100, Season_ANN, Case_AVG
- varPack: VariNAtl, ohc100, Season_ANN, Case_AVG_glob
- varPack: VariNAtl, ohc100, Season_DJF, Case_CTL2
- varPack: VariNAtl, ohc100, Season_DJF, Case_SAM
- varPack: VariNAtl, ohc100, Season_DJF, Case_AVG
- varPack: VariNAtl, ohc100, Season_DJF, Case_AVG_glob
- varPack: VariNAtl, ohc100, Season_MAM, Case_CTL2
- varPack: VariNAtl, ohc100, Season_MAM, Case_SAM
- varPack: VariNAtl, ohc100, Season_MAM, Case_AVG
- varPack: VariNAtl, ohc100, Season_MAM, Case_AVG_glob
- varPack: VariNAtl, ohc100, Season_JJA, Case_CTL2
- varPack: VariNAtl, ohc100, Season_JJA, Case_SAM
- varPack: VariNAtl, ohc100, Season_JJA, Case_AVG
- varPack: VariNAtl, ohc100, Season_JJA, Case_AVG_glob
- varPack: VariNAtl, ohc100, Season_SON, Case_CTL2
- varPack: VariNAtl, ohc100, Season_SON, Case_SAM
- varPack: VariNAtl, ohc100, Season_SON, Case_AVG
- varPack: VariNAtl, ohc100, Season_SON, Case_AVG_glob

## OHC 200
## annual global
- varPack: VariGlobal, ohc200, Season_ANN, Case_CTL2
- varPack: VariGlobal, ohc200, Season_ANN, Case_SAM
- varPack: VariGlobal, ohc200, Season_ANN, Case_AVG
- varPack: VariGlobal, ohc200, Season_ANN, Case_AVG_glob

## OHC 500
## annual global
- varPack: VariGlobal, ohc500, Season_ANN, Case_CTL2
- varPack: VariGlobal, ohc500, Season_ANN, Case_SAM
- varPack: VariGlobal, ohc500, Season_ANN, Case_AVG
- varPack: VariGlobal, ohc500, Season_ANN, Case_AVG_glob

-  
    plotScript: mk_html_page.sh
    COLUMN:
        CTL2 IE-sample IE-average IE-average_global CTL 'tr' 
        'Annual variance ratio' 'tr'
        ANN 'tr' 4 
        'Annual subpolar gyre time series' 'tr' 
        ANN 'tr' 5
        'Seasonal variance ratio' 'tr'
        DJF 'tr' 4 
        MAM 'tr' 4 
        JJA 'tr' 4 
        SON 'tr' 4
        'Seasonal time series' 'tr' 
        DJF 'tr' 5 
        MAM 'tr' 5 
        JJA 'tr' 5 
        SON 'tr' 5
        'North At5antic variance ratio' 'tr'
        ANN 'tr' 4
        DJF 'tr' 4 
        MAM 'tr' 4 
        JJA 'tr' 4 
        SON 'tr' 4

        'Annual variance ratio OHC 200m' 'tr'
        ANN 'tr' 4 
        'Annual variance ratio OHC 500m' 'tr'
        ANN 'tr' 4 
