README.md (6090B)
1 MISMIP in PISM 2 ============== 3 4 This directory contains scripts that can be used to run MISMIP experiments using PISM. To understand the intent of these experiments, please see the MISMIP website at http://homepages.ulb.ac.be/~fpattyn/mismip/, and download the intercomparison description PDF from that site. 5 6 Older PISM versions included C++ code managing MISMIP experiments. With the addition of more sophisticated reporting code that old code became unnecessary. Here all MISMIP-specific code is in Python scripts. 7 8 Step by step instructions 9 ------------------------- 10 11 First of all, you will need to copy or symlink `util/PISMNC.py` into the 12 current directory to make sure that Python will be able to import it. 13 14 The script `run.py` is used to generate a `bash` scripts performing MISMIP 15 experiments. Running `run.py --help` produces the following: 16 17 Usage: run.py [options] 18 19 Creates a script running MISMIP experiments. 20 21 Options: 22 -h, --help show this help message and exit 23 --initials=INITIALS Initials (3 letters) 24 -e EXPERIMENT, --experiment=EXPERIMENT 25 MISMIP experiments (one of '1a', '1b', '2a', '2b', 26 '3a', '3b') 27 -s STEP, --step=STEP MISMIP step number 28 -u, --uniform_thickness 29 Use uniform 10 m ice thickness 30 -a, --all Run all experiments 31 -m MODE, --mode=MODE MISMIP grid mode 32 --Mx=MX Custom grid size; use with --mode=3 33 --model=MODEL Models: 1 - SSA only; 2 - SIA+SSA 34 --executable=EXECUTABLE 35 Executable to run, e.g. 'mpiexec -n 4 pismr' 36 37 For example, to set up MISMIP experiment `1a` using grid mode 1, a 12 km grid, run 38 39 ./run.py -e 1a --mode=1 > experiment-1a-mode-1.sh 40 41 This will create `experiment-1a-mode-1.sh` as well as the bootstrapping file 42 `MISMIP_boot_1a_M1_A1.nc` and configuration files corresponding to each "step" 43 in the experiment. 44 45 Run in the backround with 2 cores and saving output to a text file this way: 46 47 bash experiment-1a-mode-1.sh 2 >& out.1a-mode-1 & 48 49 You can also copy the script (along with 50 `MISMIP_boot_1a_M1_A1.nc` and `MISMIP_conf_1a_A*.nc`) to a supercomputer to 51 do the run later. For such application, the script helpfully uses environment variables `PISM_DO`, 52 `PISM_BIN` and `PISM_MPIDO`. For example, on some Cray machines you might do 53 54 PISM_MPIDO="aprun -n " bash experiment-1a-mode-1.sh 32 55 56 will use `aprun` on 32 cores. Alternatively, you can use 57 58 ./run.py -e 1a --mode=1 --executable="aprun -n 32 pismr" 59 60 or similar to skip the "preamble" handling environment variables and get "raw" 61 commands. 62 63 64 Refined grid runs 65 ----------------- 66 67 The above "grid mode 1" runs use 150 grid spaces in the MISMIP modeling domain, 68 which is 301 grid points in PISM's (doubled) domain. The domain is doubled because 69 PISM is easiest configure as a whole ice sheet model with ice free ocean at the 70 edge of the computation domain. (Compare the example in `examples/jako/`, however.) 71 72 To run a higher resolution 3 km grid, with somewhat-improved grounding line 73 performance, ask the `run.py` script to put option `-Mx 1201` into the bash 74 script: 75 76 ./run.py -e 1a --mode=3 --Mx=1201 > experiment-1a-mode-3.sh 77 78 Then this is a 4 core run: 79 80 bash experiment-1a-mode-3.sh 4 >& out.1a-mode-3 & 81 82 83 Technical details 84 ----------------- 85 86 The script `MISMIP.py` contains MISMIP parameters and the code needed to 87 compute the semi-analytic grounding line location and the corresponding 88 thickness profile for each experiment. 89 90 The script `prepare.py` contains functions using `MISMIP.py` to generate 91 PISM-readable NetCDF files with semi-analytic ice thickness profiles, and 92 the prescribed accumulation map. It can be imported as a module or run 93 as a script to generate PISM bootstrapping files. 94 95 The script `run.py` generates `bash` scripts performing MISMIP runs using 96 `MISMIP.py` and `prepare.py`. 97 98 Implementation details 99 ---------------------- 100 101 We can turn PISM's default sliding law into MISMIP's power law by setting the 102 threshold speed to 1 meter per second, which will make it inactive. 103 104 The `-pseudo_plastic_uthreshold` command-line option takes an argument in meters per year, so we use `-pseudo_plastic_uthreshold 3.15569259747e7`, where `3.15569259747e7` is the number of seconds in a year. 105 106 The MISMIP parameter C corresponds to `tauc` in PISM. It can be set using `-yield_stress constant -tauc C`. 107 108 The MISMIP power law exponent `m` corresponds to `-pseudo_plastic_q` in PISM. 109 110 We use the `-config_override` option to set other MISMIP-specific parameters, such as ice softness, ice density and others. 111 112 Note that PISM does not at this time implement the stopping criteria described in the MISMIP specification. Instead we use the maximum run lengths that are provided as an alternative. On the other hand, PISM's output files contain all the information necessary to compute the rate of change of the grounding line position and the thickness rate of change during post-processing. 113 114 Post-processing 115 --------------- 116 117 Converting PISM output files to ASCII files following MISMIP 118 specifications is left as an exercise. 119 120 However, we do provide the `plot.py` script for visualization. 121 122 It plots modeled ice flux as a function of the distance from the divide and the geometry profile. 123 124 We see a discontinuity in the flux at the grounding 125 line. This is an issue in PISM that needs to be addressed to improve its 126 handling of the grounding line motion. For example, try 127 128 ./plot.py ABC1_1a_M1_A1.nc -f -o flux.png 129 130 Run `plot.py --help` for a list of command-line options. You can also produce plots for several PISM output files at once. For example, 131 132 ./plot.py ABC*.nc 133 134 will create geometry profile *and* ice flux plots for all matched files. 135 136 Also, note that the variable `ice_area_glacierized_grounded` in `ts_ABC1_1a_M1_A1.nc` and similar 137 allows one to see time-dependent changes in the grounding line location 138 because grounded ice area is proportional to the distance from the divide to the 139 grounding line.