Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerun subset of periodic surging experiments that did not make it 9ka #17

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions expr/03_PeriodicSurge/incomplete_runs.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
1.500000000000000000e+01 1.000000000000000048e-04
1.500000000000000000e+01 1.079999999999999960e-04
1.500000000000000000e+01 1.166000000000000017e-04
1.500000000000000000e+01 1.258999999999999974e-04
1.500000000000000000e+01 1.358999999999999965e-04
1.500000000000000000e+01 1.711000000000000118e-04
1.500000000000000000e+01 1.994999999999999974e-04
1.500000000000000000e+01 2.154000000000000044e-04
1.500000000000000000e+01 2.325999999999999888e-04
1.500000000000000000e+01 2.511999999999999802e-04
1.500000000000000000e+01 3.980999999999999730e-04
1.500000000000000000e+01 5.012000000000000396e-04
1.500000000000000000e+01 6.310000000000000504e-04
1.500000000000000000e+01 6.813000000000000262e-04
1.500000000000000000e+01 7.355999999999999909e-04
1.500000000000000000e+01 7.942999999999999540e-04
1.500000000000000000e+01 8.576999999999999772e-04
1.500000000000000000e+01 1.000000000000000021e-03
3.000000000000000000e+01 1.166000000000000017e-04
3.000000000000000000e+01 1.711000000000000118e-04
3.000000000000000000e+01 1.847999999999999925e-04
3.000000000000000000e+01 2.511999999999999802e-04
3.000000000000000000e+01 2.711999999999999784e-04
3.000000000000000000e+01 2.929000000000000180e-04
3.000000000000000000e+01 3.161999999999999880e-04
3.000000000000000000e+01 3.415000000000000067e-04
3.000000000000000000e+01 4.298999999999999870e-04
3.000000000000000000e+01 7.942999999999999540e-04
6.000000000000000000e+01 1.258999999999999974e-04
6.000000000000000000e+01 1.467999999999999904e-04
6.000000000000000000e+01 1.847999999999999925e-04
6.000000000000000000e+01 5.843000000000000537e-04
6.000000000000000000e+01 6.310000000000000504e-04
6.000000000000000000e+01 9.261000000000000135e-04
20 changes: 14 additions & 6 deletions expr/03_PeriodicSurge/make_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# glacier identifer
key = 'crmpt12'
# simulation length [yr]
TT = 9000
TT = 3000
# walltime in dd-hh:mm:ss
WT = '15-4:00:00'
WT = '4-4:00:00'
# memory allocation
MEM = '4000M'
# fixed 2-year surge period [a]
Expand All @@ -24,6 +24,12 @@
# length of the surge cycle [a]
cycles = [15, 30, 60]

###################################################
# Load the incomplete runs inorder to resubmit
###################################################
incomplete = np.loadtxt("incomplete_runs.dat")


###################################################
## Bisect to see periodicity emerge Experiment:
###################################################
Expand All @@ -38,11 +44,13 @@
# open the commands file used by the job array
with open(f'./run/{key}/{key}.commands', 'w') as f:

# itterate over betas and surge-cycle periods [yr]
for i, (beta, CP) in enumerate(product(betas, cycles)):

# itterate over betas and surge-cycle periods [yr] of incomplete runs
for i, exp_params in enumerate(incomplete):
#for i, (beta, CP) in enumerate(product(betas, cycles)):
CP, beta = exp_params

# calculate quiescent period [yr]
QP = CP-SP
QP = int(CP)-SP

# dump the command in the text file
f.write(cmd.format(KEY=key, SP=SP, QP=QP, TT=TT, beta=beta, T0=T0))
Expand Down
12 changes: 12 additions & 0 deletions expr/03_PeriodicSurge/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ The basis of the this experiment folder is the `periodic_surge.py` script, which
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.000e-03 -TT 6000
```

## Split simulations
For computational and/or numerical stability reasons it's often useful to split the 9ka simulations into
more managable 3ka chunks. The `./periodic_surge.py` script supports restart files, but the `$run_name` variable
is unaware of the restarts / time splitting. So, it's neccessary to rename the resulting files to contain
more descriptive information about the corresponding time span run. So for example, if you've run the first
3ka of a 9ka simulation, you should run:
```bash
for file in $(find result/crmpt12/ -name "crmpt12_dx_50_TT_3000.0_MB*"); do
mv $file ${file/3000.0/0--3ka}
done
```

## Postprocessing
For analysis and plotting, it's convenient to extract the timeseries of interest from the full `zarr` files.
To do so, run:
Expand Down
127 changes: 34 additions & 93 deletions expr/03_PeriodicSurge/run/crmpt12/crmpt12.commands
Original file line number Diff line number Diff line change
@@ -1,93 +1,34 @@
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.000e-03 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.000e-03 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.000e-03 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 9.261e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 9.261e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 9.261e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 8.577e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 8.577e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 8.577e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 7.943e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 7.943e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 7.943e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 7.356e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 7.356e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 7.356e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 6.813e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 6.813e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 6.813e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 6.310e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 6.310e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 6.310e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 5.843e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 5.843e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 5.843e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 5.412e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 5.412e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 5.412e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 5.012e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 5.012e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 5.012e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 4.642e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 4.642e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 4.642e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 4.299e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 4.299e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 4.299e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 3.981e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.981e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 3.981e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 3.687e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.687e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 3.687e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 3.415e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.415e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 3.415e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 3.162e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.162e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 3.162e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.929e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.929e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 2.929e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.712e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.712e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 2.712e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.512e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.512e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 2.512e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.326e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.326e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 2.326e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.154e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.154e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 2.154e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.995e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.995e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.995e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.848e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.848e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.848e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.711e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.711e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.711e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.585e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.585e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.585e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.468e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.468e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.468e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.359e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.359e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.359e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.259e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.259e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.259e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.166e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.166e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.166e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.080e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.080e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.080e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.000e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.000e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.000e-04 -TT 9000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.000e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.080e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.166e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.259e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.359e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.711e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.995e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.154e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.326e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 2.512e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 3.981e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 5.012e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 6.310e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 6.813e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 7.356e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 7.943e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 8.577e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 13 -beta 1.000e-03 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.166e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.711e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 1.848e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.512e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.712e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 2.929e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.162e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 3.415e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 4.299e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 28 -beta 7.943e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.259e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.468e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 1.848e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 5.843e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 6.310e-04 -TT 3000 -T0 0
./periodic_surge.py -k "crmpt12" -SP 2 -QP 58 -beta 9.261e-04 -TT 3000 -T0 0
4 changes: 2 additions & 2 deletions expr/03_PeriodicSurge/run/crmpt12/crmpt12_submit.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#SBATCH --array=1-93%93
#SBATCH --array=1-34%34
#SBATCH --job-name=crmpt12_%A # base job name for the array
#SBATCH --mem-per-cpu=4000M # maximum 200M per job
#SBATCH --time=15-4:00:00 # maximum walltime per job
#SBATCH --time=4-4:00:00 # maximum walltime per job
#SBATCH --nodes=1 # Only one node is needed
#SBATCH --ntasks=1 # These are serial jobs
#SBATCH --mail-type=END # send all mail (way to much)
Expand Down
16 changes: 2 additions & 14 deletions expr/03_PeriodicSurge/sifs/periodic_surge.sif
Original file line number Diff line number Diff line change
Expand Up @@ -428,20 +428,8 @@ Solver 10
Variable DOFs = 1
procedure = File "ElmerIceSolvers" "DeformationalHeatSolver"

Linear System Solver = "Iterative"
Linear System Iterative Method = "BiCGStab"
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0E-07
Linear System Abort Not Converged = Logical True
Linear System Preconditioning = "ILU0"
Linear System Residual Output = 1

Steady State Convergence Tolerance = 1.0E-02

Nonlinear System Convergence Tolerance = 1.0E-06
Nonlinear System Max Iterations = 100
Nonlinear System Min Iterations = 2
Nonlinear System Relaxation Factor = Real 1.0
Linear System Solver = direct
Linear System direct Method = umfpack

Flow Solver Name = String "Flow Solution"
Flow Loads Name = String "Flow Solution Loads"
Expand Down