trun_prog.sh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
(HTM) git clone git://src.adamsgaard.dk/pism
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
trun_prog.sh (2088B)
---
1 #!/bin/bash
2
3 NN=2 # default number of processors
4 if [ $# -gt 0 ] ; then # if user says "run_prog.sh 8" then NN = 8
5 NN="$1"
6 fi
7
8 M=211 # for 5km; note M=526 for 2km, M=421 for 2.5km, M=351 for 3km
9 if [ $# -gt 1 ] ; then # if user says "run_prog.sh 8 211" then NN = 8 and M = 351
10 M="$2"
11 fi
12
13 SSAE=0.6 # ssa enhancement factor
14 if [ $# -gt 2 ] ; then # if user says "run_prog.sh 8 211 0.7" then ... and -ssa_e 0.7
15 SSAE="$3"
16 fi
17
18 YEARS=3000 # integration time
19 if [ $# -gt 3 ] ; then # if user says "run_prog.sh 8 211 0.7 200" then ... and -y 200
20 YEARS="$4"
21 fi
22
23 PISMPREFIX=""
24 #PISMPREFIX="../../../bin/"
25
26 # use these for more robust SSA solves
27 # STRONGKSP="-ssafd_ksp_type gmres -ssafd_ksp_norm_type unpreconditioned -ssafd_ksp_pc_side right -ssafd_pc_type asm -ssafd_sub_pc_type lu"
28 # STRONGKSP=""
29
30 # preliminary bootstrap and diagnostic run:
31 STARTNAME=startfile_Mx${M}.nc
32 cmd_diag="mpiexec -n $NN ${PISMPREFIX}pismr -i ../Ross_combined.nc -bootstrap -Mx $M -My $M \
33 -Mz 61 -Lz 3000 -z_spacing equal -surface given -stress_balance ssa \
34 -yield_stress constant -tauc 1e6 -pik -ssa_dirichlet_bc -ssa_e $SSAE \
35 $STRONGKSP -y 0.1 -ys 0.0 -o $STARTNAME -o_order zyx "
36 echo "running command:"
37 echo
38 echo "$cmd_diag"
39 ${cmd_diag}
40
41 # prognostic run
42 NAME=prog_Mx${M}_yr${YEARS}.nc
43 ECALV=1e18 # constant for eigen_calving parameterization
44 CTHICK=50.0 # constant thickness for thickness_calving
45 exdt=1
46 exvars="thk,mask,velsurf_mag,strain_rates,tendency_of_ice_mass_due_to_flow,tendency_of_ice_mass_due_to_discharge"
47 cmd_prog="mpiexec -n $NN ${PISMPREFIX}pismr -i $STARTNAME \
48 -surface given -stress_balance ssa -yield_stress constant -tauc 1e6 -pik \
49 -calving eigen_calving,thickness_calving -eigen_calving_K $ECALV -front_retreat_cfl \
50 -ssa_dirichlet_bc -ssa_e $SSAE -ys 0 -y $YEARS -o $NAME -o_size big \
51 -thickness_calving_threshold $CTHICK $STRONGKSP \
52 -ts_file ts-${NAME} -ts_times 0:monthly:${YEARS} \
53 -extra_file ex-${NAME} -extra_times 0:${exdt}:${YEARS} -extra_vars ${exvars} \
54 -options_left"
55 echo "running command:"
56 echo
57 echo "$cmd_prog"
58 ${cmd_prog}
59