commit ee096824646daeb8bdebc0b6fd51bc356b345595
parent 034e722b3f58abaa152ebe13b88aed360ac5e959
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 30 Nov 2021 09:35:12 +0100
Makefile: reuse common PISM flags between targets
Diffstat:
M | Makefile | | | 49 | +++++++++++++++++++++++-------------------------- |
1 file changed, 23 insertions(+), 26 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,7 +1,22 @@
NPROC != awk '/^cpu cores/ {print $$4; exit}' /proc/cpuinfo
-SLSERIES=sealvl.nc
-INIT_T_END=1e4
-T_END=1e3
+SLSERIES = sealvl.nc
+INIT_T_END = 1e4
+T_END = 1e3
+PISM_COMMON = \
+ -stress_balance ssa+sia\
+ -gradient eta\
+ -cfbc -part_grid -kill_icebergs -subgl\
+ -options_left\
+ -plastic_phi 24\
+ -till_cohesion 0\
+ -hydrology routing\
+ -geothermal_flux 70e-3\
+ -sia_e 4.5 -ssa_e 0.512\
+ -bed_def lc\
+ -stress_balance.sia.max_diffusivity 1e4\
+ -extra_vars thk,topg,effbwp,velbar_mag,flux_mag,mask,dHdt,usurf,hardav,velbase_mag,nuH,tauc,taud,taub,flux_divergence,cell_grounded_fraction\
+ -backup_size big\
+ -o_order zyx\
all: \
ex_deltaSL-linear_1d-profile.pdf\
@@ -12,51 +27,33 @@ ex_deltaSL-linear_1d-profile.pdf: ex_deltaSL-linear_1d.nc
ex_deltaSL-linear_1d.nc: deltaSL-linear.nc
flowline.py -o $@ --collapse -d y ex_deltaSL-linear.nc
-deltaSL-linear.nc: init-linear.nc ${SLSERIES}
+deltaSL-linear.nc: init-linear.nc ${SLSERIES} Makefile
mpiexec -n ${NPROC} \
pismr -i init-linear.nc\
- -options_left\
+ ${PISM_COMMON}\
-sea_level constant,delta_sl -ocean_delta_sl_file ${SLSERIES}\
-extra_file ex_$@\
-extra_times 0:50:${T_END}\
- -extra_vars thk,topg,velbar_mag,flux_mag,mask,dHdt,usurf,hardav,velbase_mag,taud,taub,flux_divergence,cell_grounded_fraction\
-ts_file ts_$@\
-ts_times 0:50:${T_END}\
-ys 0 -ye ${T_END}\
- -backup_size big\
- -o $@\
- -o_order zyx
+ -o $@
${SLSERIES}: sealvl.py Makefile
printf '0\t0\n${T_END}\t200\n' | ./sealvl.py
-init-linear.nc: MISMIP_boot_1a_M1_A1.nc
+init-linear.nc: MISMIP_boot_1a_M1_A1.nc Makefile
mpiexec -n ${NPROC} \
pismr -i MISMIP_boot_1a_M1_A1.nc\
-bootstrap\
-Mx 301 -My 3 -Mz 15\
-Lz 5000\
- -stress_balance ssa+sia\
- -gradient eta\
+ ${PISM_COMMON}\
-front_retreat_file MISMIP_boot_1a_M1_A1.nc\
- -cfbc -part_grid -kill_icebergs -subgl\
-ys 0 -ye ${INIT_T_END}\
- -options_left\
- -plastic_phi 24\
- -till_cohesion 0\
- -hydrology routing\
- -geothermal_flux 70e-3\
- -sia_e 4.5 -ssa_e 0.512\
- -bed_def lc\
- -stress_balance.sia.max_diffusivity 1e4\
- -extra_file ex_$@\
- -extra_times 0:50:${INIT_T_END}\
- -extra_vars thk,topg,effbwp,velbar_mag,flux_mag,mask,dHdt,usurf,hardav,velbase_mag,nuH,tauc,taud,taub,flux_divergence,cell_grounded_fraction\
-ts_file ts_$@\
-ts_times 0:50:${INIT_T_END}\
- -backup_size big\
-o $@\
- -o_order zyx
MISMIP_boot_1a_M1_A1.nc: prepare.py MISMIP.py
./prepare.py -o $@ -e 1a -m 1