## This makefile used to plot from data in diag_norcpm plotcases in different combination ## The last profile will be applied PSFILES = $(wildcard *.ps) PNGFILES = $(patsubst %.ps,%.png,$(PSFILES)) caseGDA = norcpm1_analysis caseTroPacDA = norcpm1_tropac_analysis caseAtlDA = norcpm-cmip6_pacemaker caseHIST = noresm1-cmip6_historical_1950-2029 basepath = /nird/projects/NS9039K/shared/pgchiu/diag_norcpm ## for all plots and upload to www allplots: @echo 'make tropac-global && make tropac-hist && make atl-global && make atl-hist && make global-hist' ## profile1: TroPac DA - Global DA tropac-global: case1 = $(caseTroPacDA) tropac-global: case2 = $(caseGDA) tropac-global: difstr = 'TroPac-Global' tropac-global: difstrfn = "tropac-global" tropac-global: dstdir = "dif_pac-global" tropac-global: clean all upload ## profile2: TroPac DA - Historical run tropac-hist: case1 = $(caseTroPacDA) tropac-hist: case2 = $(caseHIST) tropac-hist: difstr = 'TroPac-HIST' tropac-hist: difstrfn = "tropac-hist" tropac-hist: dstdir = "dif_pac-hist" tropac-hist: clean all upload ## profile3: Global DA - Historical run global-hist: case1 = $(caseGDA) global-hist: case2 = $(caseHIST) global-hist: difstr = 'GlobalDA-HIST' global-hist: difstrfn = "globalDA-hist" global-hist: dstdir = "dif_globalDA-hist" global-hist: clean all upload ## profile4: Atl 30S-60N DA - Global DA atl-global: case1 = $(caseAtlDA) atl-global: case2 = $(caseGDA) atl-global: difstr = 'Atl 30S-60N - Global DA' atl-global: difstrfn = "atl30s60n-globalDA" atl-global: dstdir = "dif_atl30s60nDA-global" atl-global: clean all upload ## profile5: Atl 30S-60N DA - Historical run atl-hist: case1 = $(caseAtlDA) atl-hist: case2 = $(caseHIST) atl-hist: difstr = 'Atl 30S-60N - HIST' atl-hist: difstrfn = "atl30s60n-hist" atl-hist: dstdir = "dif_atl30s60nDA-hist" atl-hist: clean all upload default: @echo make iceplot all: iceplot t2mplot z200plot iceplot: @for case in $(case1) $(case2) ; do \ for SEASON in ANN JJA DJF ; do \ ln -fs $(basepath)/$${case}/31_ice/ens_aice_$${SEASON}_trend.nc ./$${case}_ens_aice_$${SEASON}_trend.nc ; \ ln -fs ${basepath}/$${case}/31_ice/ens_hi_$${SEASON}_trend.nc ./$${case}_ens_hi_$${SEASON}_trend.nc ; \ done \ done SEASON=ANN CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_ice.ncl SEASON=DJF CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_ice.ncl SEASON=JJA CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_ice.ncl t2mplot: @for case in $(case1) $(case2) ; do \ for SEASON in ANN JJA DJF ; do \ ln -fs ${basepath}/$${case}/02_Tref/ens_TREFHT_$${SEASON}_trend.nc ./$${case}_ens_TREFHT_$${SEASON}_trend.nc ; \ done \ done SEASON=ANN CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_t2m.ncl SEASON=DJF CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_t2m.ncl SEASON=JJA CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_t2m.ncl z200plot: @for case in $(case1) $(case2) ; do \ for SEASON in ANN JJA DJF ; do \ ln -fs ${basepath}/$${case}/03_Z200/ens_Z200_$${SEASON}_trend.nc ./$${case}_ens_Z200_$${SEASON}_trend.nc ; \ done \ done SEASON=ANN CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_z200.ncl SEASON=DJF CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_z200.ncl SEASON=JJA CASE1=$(case1) CASE2=$(case2) DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) ncl -Q dif_z200.ncl upload: @#betzy#rsync -a --exclude=*.nc . pgchiu@login-trd.nird.sigma2.no:~/NS9039K/www/pgchiu/test/dif_pac-global @DIFSTR=$(difstr) DIFSTRFN=$(difstrfn) sh 21-mk_html_page.sh @rsync -a --exclude=*.nc . ~/NS9039K/www/pgchiu/test/$(dstdir) @echo http://ns9039k.web.sigma2.no/pgchiu/test/$(dstdir)/index.html clean: @rm -f *.nc *.html *.ps *.ps.gz *.png