trun-decoupled.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-decoupled.sh (2062B) --- 1 #!/bin/bash 2 3 # uses 2 files: 4 # pism_Greenland_5km_v1.1.nc from examples/std-greenland/ 5 # g2km_gridseq.nc ditto; or similar 6 # these files are documented in the PISM User's Manual, chapter 1 7 # 8 # do 9 # $ ./run-decoupled.sh 5 g2km_gridseq 10 # for 5 year run 11 12 set -e # exit on error 13 14 # check if env var PISM_DO was set (i.e. set PISM_DO=echo for a 'dry' run) 15 if [ -n "${PISM_DO:+1}" ] ; then # check if env var is already set 16 echo "# PISM_DO = $PISM_DO (already set)" 17 else 18 PISM_DO="" 19 fi 20 21 DURATION=$1 22 INNAME=$2 23 24 MPIDO="mpiexec -n 6" 25 26 CLIMATE="-surface given -surface_given_file pism_Greenland_5km_v1.1.nc" 27 PHYS="-sia_e 3.0 -stress_balance ssa+sia -topg_to_phi 15.0,40.0,-300.0,700.0 -pseudo_plastic -pseudo_plastic_q 0.5 -till_effective_fraction_overburden 0.02 -tauc_slippery_grounding_lines" 28 CALVING="-front_retreat_file pism_Greenland_5km_v1.1.nc" 29 30 # run this to check for no shock: continue g2km_gridseq.nc run 31 NAME=cont.nc 32 cmd="$MPIDO pismr -i $INNAME -skip -skip_max 20 $CLIMATE $PHYS $CALVING -ts_file ts_$NAME -ts_times 0:yearly:$DURATION -y $DURATION -o $NAME" 33 #$PISM_DO $cmd 34 echo 35 36 # suitable for -hydrology routing,distributed runs which are decoupled: 37 EXVAR="mask,thk,topg,usurf,tillwat,bwat,hydrobmelt,bwatvel" 38 EXVARDIST="${EXVAR},bwp,bwprel,hydrovelbase_mag" 39 40 # -hydrology routing 41 NAME=routing-decoupled.nc 42 cmd="$MPIDO pismr -i $INNAME -no_mass -energy none -stress_balance none $CLIMATE -extra_file ex_$NAME -extra_times 0:monthly:$DURATION -extra_vars $EXVAR -ts_file ts_$NAME -ts_times 0:daily:$DURATION -hydrology routing -hydrology_bmelt_file $INNAME -ys 0 -y $DURATION -max_dt 0.03 -o $NAME" 43 $PISM_DO $cmd 44 echo 45 46 # -hydrology distributed 47 NAME=distributed-decoupled.nc 48 cmd="$MPIDO pismr -i $INNAME -no_mass -energy none -stress_balance none $CLIMATE -extra_file ex_$NAME -extra_times 0:monthly:$DURATION -extra_vars $EXVARDIST -ts_file ts_$NAME -ts_times 0:daily:$DURATION -hydrology distributed -hydrology_bmelt_file $INNAME -hydrology_velbase_mag_file $INNAME -ys 0 -y $DURATION -max_dt 0.03 -o $NAME" 49 $PISM_DO $cmd 50 echo 51