################################## # STANDARD PLOTS OF MODEL OUTPUT # ################################## # # # ABOUT THIS SCRIPT # ================= # bash script controlling NCL scripts for plotting standard output. This scrip sets I/O paths and passes options for NCL scripts that: # 1. Plots long term means of precipitation and temperature # 2. Plots precipitation and temperature differences between this run and a specified control run # 3. Plots long term means of wind # # # # ================= # # USER DECLARATIONS # # ================= # # nclSTND=/esd/docs/jingmin/src/seb_plot_scripts/plotsBasic_stnd.ncl # NCL script for standard plots nclDIFF=/esd/docs/jingmin/src/seb_plot_scripts/plotsBasic_diff.ncl # NCL script for difference plots nclWIND=/esd/docs/jingmin/src/seb_plot_scripts/plotsBasic_wind.ncl # NCL script for wind plots # mPATH=/esd/data/climate_models/echam/echam_output/ESD # model output path # SIMULATION INFORMATION # ---------------------- # simulation description (may be used in plot title by NCL script) simNm='e012 (Mio9ma)' simNu1='e012' #simulation number of the raw output file. e.g. simNu='e007_2' in 'e007_2_100301.01.nc' # for file name construction (consistent with model run scripts) PLT=hpc-bw # platform MOD=e5w2.3 # model, e5w2.3 (echam wiso version 2.3) EXP=e012 # experiment number RES=159 # resolution LEV=31 # vertical levels TIM=Mio9ma # time; PD = present day, PI = Pre-Industrial, MH = Mid Holocene, LGM = Last Glacial Maximum, PLIO = Pliocene OIN=1d # output interval; 1m = 1 month, 1d = 1 day ADD= # additional info, e.g. "_"+"tbt050" for 50% tibet topo or "_"+"tbt050sam050" for tibet & andes at 50% #YRI=1003 # 1st complete year in output #YRF=1018 # last complete year in output # # REFERENCE SIMULATION INFORMATION # -------------------------------- # simulation description (may be used in plot title by NCL script) simRefNm='e007_2 (PI)' simNu2='e007_2' # for file name construction (consistent with model run scripts) PLT2=hpc-bw # platform MOD2=e5w2.3 # model, e5w2.3 (echam wiso version 2.3) EXP2=e007_2 # experiment number RES2=159 # resolution LEV2=31 # vertical levels TIM2=PI # time; PD = present day, PI = Pre-Industrial, MH = Mid Holocene, LGM = Last Glacial Maximum, PLIO = Pliocene OIN2=1d # output interval, 1m (1 month) ADD2= # additional info, e.g. "_"+"tbt050" for 50% tibet topo or "_"+"tbt050sam050" for tibet & andes at 50% #YRI2=1003 # 1st complete year in output #YRF2=1016 # last complete year in output # # PLOT OPTIONS # ------------ STND=2 # standard plots (simply plot processed output), 1=yes 2=no DIFF=2 # differ ence plots (difference between simulation and reference simulation), 1=yes 2=no DIFF_PC=2 # difference plots with differences expressed in percentage, 1=yes (plot as percentage), 2=no (plot values) WIND=1 # wind plot, 1=yes 2=no hl=29 # vertical level where wind plotted. For L31, hl=0 is the top of the atmosphere, hl=30 is the direct surface level. # plotTime=an # mo=plot monthly long term means, an=plot annual long term means; annual means will be constructed from same input # climVars=('Temperature' 'Precipitation') # variables to be treated (used in title and for IF querie in NCL script) monthNms=('January-June' 'July-December') # month names (used in title of NCL script) # plotRegion=glo # REGION TO BE PLOTTED: glo=global, als=Alaska, sam=Andes, nam=Olympic Mnt, tbt=Tibet/Himalayas, eur=Europe, eas=Eurasia # # # # # ============ # # INSTRUCTIONS # # ============ # # # generate paths and filenames iPATH1=${mPATH}/${EXP}_${PLT}_${MOD}_${TIM}${ADD}_t${RES}l${LEV}.${OIN}/output_processed/ # path to processed output iPATH2=${mPATH}/${EXP2}_${PLT2}_${MOD2}_${TIM2}${ADD2}_t${RES2}l${LEV2}.${OIN2}/output_processed/ # path to reference output oPATH=${mPATH}/${EXP}_${PLT}_${MOD}_${TIM}${ADD}_t${RES}l${LEV}.${OIN}/plots/drafts/ # path to plot directory iFILE1=${YRI}_${YRF}_mlterm.nc iFILE2=${YRI2}_${YRF2}_mlterm.nc iPATH1=${mPATH}/${EXP}_${PLT}_${MOD}_${TIM}${ADD}_t${RES}l${LEV}.${OIN}/output_processed/lterm/ # path to lterm data iPATH2=${mPATH}/${EXP2}_${PLT2}_${MOD2}_${TIM2}${ADD2}_t${RES2}l${LEV2}.${OIN2}/output_processed/lterm/ # path to reference lterm data oPATH=${mPATH}/${EXP}_${PLT}_${MOD}_${TIM}${ADD}_t${RES}l${LEV}.${OIN}/plots/drafts # path to plot directory wPATH1=${mPATH}/${EXP}_${PLT}_${MOD}_${TIM}${ADD}_t${RES}l${LEV}.${OIN}/output_processed/wind/wind_lterm/ #path to wind lterm data oSTND=$oPATH/standard/ oDIFF=$oPATH/difference/ oWIND=$oPATH/wind/ #echo $simNu iFILE1=${simNu1}"_echam_lterm.nc" iFILE2=${simNu2}"_echam_lterm.nc" wFILE1=${simNu1}"_wind_lterm.nc" waFILE1=${simNu1}"_wind_alterm.nc" # # export general options and names export iPATH1 export iPATH2 export wPATH1 export iFILE1 export oPATH export oSTND export oDIFF export oWIND export iFILE2 export wFILE1 export EXP export EXP2 export simNm export simNu1 export simNu2 export simRefNm export plotRegion export plotTime export hl export waFILE1 # # #echo $oPATH #echo $oSTND #echo $oDIFF #echo $oWIND # # creat data folder if not exited if [ ! -d "${oPATH}" ] then mkdir ${oPATH} fi # if [ ! -d "$oSTND" ] then mkdir $oSTND fi # if [ ! -d "$oDIFF" ] then mkdir $oDIFF fi # if [ ! -d "$oWIND" ] then mkdir $oWIND fi # # # # # STANDARD PLOTS # -------------- if [ $STND = "1" ]; then echo echo '>> STANDARD PLOTS' echo ' --------------' echo ' processed simulation file (input): ' ${iPATH1}${iFILE1} echo # export plot-specific variables to be read by NCL script for i in {0..1}; do # loop through variables climVar=${climVars[i]} export climVar # export climate variable # if annual values to be plotted if [ $plotTime = "an" ]; then months=1 # for dummy variable in case of annual means export months # export period for dummy variable monthsNm=${monthNms[1]} export monthsNm # export month names for dummy variable echo ' > creating standard annual mean plot for:' $plotRegion $climVar # execute NCL script ncl -Q $nclSTND # if monthly values to be plotted elif [ $plotTime = "mo" ]; then for j in {0..1}; do # loop through 6 months periods months=j export months # export period (1=1-6, 2=7-12) monthsNm=${monthNms[j]} export monthsNm # export month names echo ' > creating standard plot for:' $plotRegion $climVar $monthsNm # execute NCL script ncl -Q $nclSTND done fi done # echo ' ----------------' fi # # # # # DIFFERENCE PLOTS # ---------------- if [ $DIFF = "1" ]; then echo echo '>> DIFFERENCE PLOTS' echo ' ----------------' echo ' processed simulation file (input): ' ${iPATH1}${iFILE1} echo ' reference simulation file (input): ' ${iPATH2}${iFILE2} echo # export plot-specific variables to be read by NCL script export iPATH2 # export path to reference simulation for i in {0..1}; do # loop through variables climVar=${climVars[i]} export climVar # export climate variable # if annual values to be plotted if [ $plotTime = "an" ]; then months=1 # for dummy variable in case of annual means export months # export period for dummy variable monthsNm=${monthNms[1]} export monthsNm # export month names for dummy variable export DIFF_PC echo ' > creating annual means difference plot for:' $plotRegion $climVar # execute NCL script ncl -Q $nclDIFF # if monthly values to be plotted elif [ $plotTime = "mo" ]; then for j in {0..1}; do # loop through 6 months periods months=j export months # export period (1=1-6, 2=7-12) monthsNm=${monthNms[j]} export monthsNm # export month names export DIFF_PC echo ' > creating difference plot for:' $plotRegion $climVar $monthsNm # execute NCL script ncl -Q $nclDIFF done fi done echo ' ----------------' fi # WIND PLOTS # -------------- if [ $WIND = "1" ]; then echo echo '>> WIND PLOTS' echo ' --------------' echo ' processed simulation file (input): ' ${wPATH1}${wFILE1} echo # export plot-specific variables to be read by NCL script var='wind' # if annual values to be plotted if [ $plotTime = "an" ]; then months=1 # for dummy variable in case of annual means export months # export period for dummy variable monthsNm=${monthNms[1]} export monthsNm # export month names for dummy variable echo ' > creating wind annual mean plot for:' $plotRegion $var # execute NCL script ncl -Q $nclWIND # if monthly values to be plotted elif [ $plotTime = "mo" ]; then for j in {0..1}; do # loop through 6 months periods months=j export months # export period (1=1-6, 2=7-12) monthsNm=${monthNms[j]} export monthsNm # export month names echo ' > creating wind plot for:' $plotRegion $var $monthsNm # execute NCL script ncl -Q $nclWIND done fi echo ' ----------------' fi # # echo #echo ' plot directory (output path): ' ${oPATH} echo '>> DONE'