Skip to content

Commit

Permalink
Update regression scripts and the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
ckhroulev committed Jun 25, 2021
1 parent 997be29 commit 435a184
Show file tree
Hide file tree
Showing 34 changed files with 59 additions and 62 deletions.
2 changes: 1 addition & 1 deletion doc/browser/petsc.md
Expand Up @@ -241,6 +241,6 @@ multiprocessor jobs, the display may have to be set on the command
line, for instance as `-display :0` or similar; this must be given as
the final option. For example,

mpiexec -n 2 pisms -view thk -display :0
mpiexec -n 2 pismr -eisII A -view thk -display :0

allows a two processor run to view the ice thickness.
2 changes: 1 addition & 1 deletion doc/sphinx/Makefile
Expand Up @@ -9,7 +9,7 @@ INTERMEDIATE=diag.json diag-2.json dummy.nc pism_config.nc surface_input.nc
dummy.nc:
# use a thermal bedrock layer model and run for 1 year to complete the
# bootstrapping
pisms -y 1 -Mbz 5 -Lbz 1000 -Mz 5 -Mx 5 -My 5 -o $@ -verbose 1
pismr -eisII A -y 1 -Mbz 5 -Lbz 1000 -Mz 5 -Mx 5 -My 5 -o $@ -verbose 1

# rename climatic_mass_balance: we need precipitation for an atmosphere model
ncrename -v climatic_mass_balance,precipitation -O $@ $@
Expand Down
16 changes: 8 additions & 8 deletions doc/sphinx/climate_forcing/testing.rst
Expand Up @@ -34,18 +34,18 @@ correctly:

.. code-block:: none
mpiexec -n 2 pisms -eisII A -y 1000 -o state.nc
mpiexec -n 2 pismr -eisII A -y 1000 -o state.nc
pismr -i state.nc -surface given -extra_times 0.0:0.1:2.5 \
-extra_file movie.nc -extra_vars climatic_mass_balance,ice_surface_temp \
-ys 0 -ye 2.5
Using ``pisms`` merely generates demonstration climate data, using EISMINT II choices
:cite:`EISMINT00`. The next run extracts the surface mass balance :var:`climatic_mass_balance`
and surface temperature :var:`ice_surface_temp` from ``state.nc``. It then does nothing
interesting, exactly because a constant climate is used. Viewing ``movie.nc`` we see these
same values as from ``state.nc``, in variables :var:`climatic_mass_balance`,
:var:`ice_surface_temp`, reported back to us as the time- and space-dependent climate at
times ``ys:dt:ye``. It is a boring "movie."
Using ``pismr -eisII A`` merely generates demonstration climate data, using EISMINT II
choices :cite:`EISMINT00`. The next run extracts the surface mass balance
:var:`climatic_mass_balance` and surface temperature :var:`ice_surface_temp` from
``state.nc``. It then does nothing interesting, exactly because a constant climate is
used. Viewing ``movie.nc`` we see these same values as from ``state.nc``, in variables
:var:`climatic_mass_balance`, :var:`ice_surface_temp`, reported back to us as the time-
and space-dependent climate at times ``ys:dt:ye``. It is a boring "movie."

A more interesting example uses a :ref:`positive degree-day scheme <sec-surface-pdd>`.
This scheme uses a variable called :var:`precipitation`, and a calculation of melting, to
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/installation/arch.rst
Expand Up @@ -26,7 +26,7 @@ You can then install PISM and its dependencies with the following command:
yay -Sy pism
Once installed, the PISM binaries (e.g. ``pismr``, ``pisms``, various Python
Once installed, the PISM binaries (e.g. ``pismr``, ``pismv``, various Python
tools) are available in the PATH and do not require further intervention to
work. It is recommended that the installation is manually verified with the
instructions in section :ref:`sec-install-quick-tests`.
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx/installation/quick-tests.rst
Expand Up @@ -28,14 +28,14 @@ correctly.

.. code-block:: none
pisms -y 5000 -view thk,temppabase,velsurf_mag
pismr -eisII A -y 5000 -view thk,temppabase,velsurf_mag
When using such viewers and ``mpiexec`` the additional final option ``-display :0`` is
sometimes required to enable MPI to use X, like this:

.. code-block:: none
mpiexec -n 2 pisms -y 5000 -view thk,temppabase,velsurf_mag -display :0
mpiexec -n 2 pismr -eisII A -y 5000 -view thk,temppabase,velsurf_mag -display :0
Also ``-drawpause 0.1`` or similar may be needed if the figures are refreshing too fast.

Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx/manual/initialization/index.rst
Expand Up @@ -11,9 +11,9 @@ There are three ways to start PISM:
or
- option :opt:`-i` :opt:`-bootstrap` reads an "incomplete" NetCDF file and uses heuristics
to fill in needed fields, or
- one of the executables ``pisms`` or ``pismv`` is used to initialize simplified-geometry
experiments or verification tests from formulas in the source code, and thus no input
file is required.
- ``pismr -eisII ...`` and the ``pismv`` executable are used to initialize
simplified-geometry experiments and verification tests from formulas in the source code,
and thus no input file is required.

One of the first two choices is required when using the executable ``pismr``. Modeling
usually starts with the ``-i input.nc -bootstrap`` because real ice sheet observations are
Expand Down
8 changes: 4 additions & 4 deletions doc/sphinx/manual/initialization/restarting.rst
Expand Up @@ -10,15 +10,15 @@ run can be loaded with ":opt:`-i`":

.. code-block:: none
pisms -eisII A -y 100 -o foo.nc
pisms -eisII A -i foo.nc -y 100 -o bar.nc
pismr -eisII A -y 100 -o foo.nc
pismr -eisII A -i foo.nc -y 100 -o bar.nc
As noted, verification tests (section :ref:`sec-verif`) and simplified-geometry experiments
(section :ref:`sec-simp`) do not need input files at all because they initialize from
formulas in the source code. They can, however, be continued from saved model states using
:opt:`-i`. Specifying the simplified geometry experiment or verification test *is*,
however, necessary if the run is to continue with the climate inputs for that experiment
or test. For example, based on the above ``pisms`` runs, it is valid to do
or test. For example, based on the above ``pismr -eisII A`` runs, it is valid to do

.. code-block:: none
Expand All @@ -38,7 +38,7 @@ resulting file, like this:

.. code-block:: none
pisms -eisII A -y 10 -o foo.nc
pismr -eisII A -y 10 -o foo.nc
ncdump -h foo.nc | less
Note that variables in the output file have a ``pism_intent`` attribute. When
Expand Down
6 changes: 3 additions & 3 deletions doc/sphinx/manual/modeling-choices/computational/grid.rst
Expand Up @@ -112,7 +112,7 @@ For example:

.. code-block:: bash
> pisms -grid.registration center \
> pismr -eisII A -grid.registration center \
-Lx 10 -Mx 4 \
-y 0 -verbose 1 \
-o grid-test.nc
Expand Down Expand Up @@ -148,7 +148,7 @@ Compare this to

.. code-block:: bash
> pisms -grid.registration corner \
> pismr -eisII A -grid.registration corner \
-Lx 10 -Mx 5 \
-y 0 -verbose 1 \
-o grid-test.nc
Expand Down Expand Up @@ -268,7 +268,7 @@ For example,

.. code-block:: none
mpiexec -n 3 pisms -Mx 101 -My 101 \
mpiexec -n 3 pismr -eisII A -Mx 101 -My 101 \
-Nx 1 -procs_x 101 \
-Ny 3 -procs_y 20,61,20
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/manual/modeling-choices/computational/time.rst
Expand Up @@ -198,7 +198,7 @@ As an example, consider these two runs:

.. code-block:: none
pisms -y 6000 -o foo.nc
pismr -eisII A -y 6000 -o foo.nc
pismr -i foo.nc -y 0.001 -o bar.nc -o_size big
The result of the second (short) run is a NetCDF file ``bar.nc`` which contains the full
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/manual/modeling-choices/dynamics/sia.rst
Expand Up @@ -99,7 +99,7 @@ There are two associated parameters:
- :config:`stress_balance.sia.bed_smoother.theta_min` is the minimum value of `\theta` in
the parameterization.

This mechanism is turned off by default in executables ``pisms`` and ``pismv``.
This mechanism is turned off by default in ``pismv``.

Under the default :config:`output.size` (``medium``), PISM writes fields :var:`topgsmooth`
and :var:`schoofs_theta` from this mechanism. The thickness relative to the smoothed
Expand Down
Expand Up @@ -57,9 +57,9 @@ Here are minimal example runs to compare these models:

.. code-block:: none
mpiexec -n 4 pisms -eisII A -y 8000 -o eisIIA_nobd.nc
mpiexec -n 4 pisms -eisII A -bed_def iso -y 8000 -o eisIIA_bdiso.nc
mpiexec -n 4 pisms -eisII A -bed_def lc -y 8000 -o eisIIA_bdlc.nc
mpiexec -n 4 pismr -eisII A -y 8000 -o eisIIA_nobd.nc
mpiexec -n 4 pismr -eisII A -bed_def iso -y 8000 -o eisIIA_bdiso.nc
mpiexec -n 4 pismr -eisII A -bed_def lc -y 8000 -o eisIIA_bdlc.nc
Compare the :var:`topg`, :var:`usurf`, and :var:`dbdt` variables in the resulting output
files. See also the comparison done in :cite:`BLKfastearth`.
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/manual/practical-usage/input-output.rst
Expand Up @@ -61,7 +61,7 @@ Note the ``-help`` and ``-usage`` options for getting help at the command line.
- Brief descriptions of the many PISM and PETSc options. The run occurs as usual
according to the other options. (The option documentation does not get listed if
the run didn't get started properly.) Use with a pipe into ``grep`` to get
usefully-filtered information on options, for example ``pisms -help | grep cold``.
usefully-filtered information on options, for example ``pismr -help | grep cold``.

* - :opt:`-info`
- Gives information about PETSc operations during the run.
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/manual/practical-usage/regridding.rst
Expand Up @@ -26,7 +26,7 @@ as in this example: }

.. code-block:: none
pisms -eisII A -Mx 101 -My 101 -Mz 201 -y 1000 \
pismr -eisII A -Mx 101 -My 101 -Mz 201 -y 1000 \
-regrid_file foo.nc -regrid_vars thk,temp -o bar.nc
By specifying regridded variables "``thk,temp``", the ice thickness and temperature values
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/manual/simplified-geometry/eismint-2.rst
Expand Up @@ -45,7 +45,7 @@ Experiments E -- L are only documented in :cite:`EISIIdescribe`.
:header-rows: 1
:widths: 5,2

* - Command: "``pisms +``"
* - Command: "``pismr +``"
- Relation to experiment A

* - ``-eisII A -Mx 61 -My 61 -Mz 61 -Lz 5000 -y 2e5 -o eisIIA.nc``
Expand Down
4 changes: 2 additions & 2 deletions examples/eismintII/runexp.sh
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright (C) 2013--2016 The PISM Authors
# Copyright (C) 2013--2016, 2021 The PISM Authors

# This is just a helper script to make running EISMINT II experiments easier.
# It adds suggested diagnostics which help compare to the published experiments.
Expand Down Expand Up @@ -57,7 +57,7 @@ fi
SKIP=5 # adjust upward for high res
ROOT=eisII$EXP$MHOR
echo "$SCRIPTNAME run into steady state with constant climate forcing for $RUNTIME a"
cmd="$PISM_MPIDO $NN pisms -eisII $EXP $GRIDORINPUT -ys 0 -y $DUR \
cmd="$PISM_MPIDO $NN pismr -eisII $EXP $GRIDORINPUT -ys 0 -y $DUR \
-skip -skip_max $SKIP -o $ROOT.nc -extra_file ex_$ROOT.nc \
-extra_vars thk,temppabase,velsurf_mag,velbar_mag,flux_mag,diffusivity,bmelt,taud_mag \
-extra_times 1000:1000:$DUR -ts_file ts_$ROOT.nc \
Expand Down
4 changes: 1 addition & 3 deletions src/coupler/surface/EISMINTII.hh
@@ -1,4 +1,4 @@
/* Copyright (C) 2014, 2015, 2016, 2017, 2018 PISM Authors
/* Copyright (C) 2014, 2015, 2016, 2017, 2018, 2021 PISM Authors
*
* This file is part of PISM.
*
Expand Down Expand Up @@ -27,8 +27,6 @@ namespace surface {

/** EISMINT II climate inputs.
*
* This class should be removed together with the pisms executable
* (once I get to that).
*/
class EISMINTII : public PSFormulas {
public:
Expand Down
1 change: 1 addition & 0 deletions src/icemodel/IceEISModel.cc
Expand Up @@ -170,6 +170,7 @@ void IceEISModel::initialize_2d() {
}

void IceEISModel::bootstrap_2d(const File &input_file) {
(void) input_file;
throw RuntimeError::formatted(PISM_ERROR_LOCATION,
"EISMINT II mode does not support bootstrapping");
}
Expand Down
2 changes: 1 addition & 1 deletion test/regression/beddef_lc_restart.sh
Expand Up @@ -14,7 +14,7 @@ rm -f $files
set -e

mpi="$MPIEXEC -n 3"
pisms="$PISM_PATH/pisms"
pisms="$PISM_PATH/pismr -eisII A"
pismr="$PISM_PATH/pismr"

# time step length
Expand Down
2 changes: 1 addition & 1 deletion test/regression/temp_continuity.py
Expand Up @@ -23,7 +23,7 @@ def run(cmd):
dts = [100, 50]
for dt in dts:
try:
cmd = "{path}/pisms -eisII B -y 2400 -Mx 16 -My 16 -Mz 21 -Lbz 1000 -Mbz 11 -energy enthalpy -regrid_file in-temp-continuity.nc -regrid_vars thk -verbose 1 -max_dt {dt} -o out-temp-continuity.nc -output.sizes.medium temp -gradient mahaffy".format(path=pism_path, dt=dt)
cmd = "{path}/pismr -eisII B -y 2400 -Mx 16 -My 16 -Mz 21 -Lbz 1000 -Mbz 11 -energy enthalpy -regrid_file in-temp-continuity.nc -regrid_vars thk -verbose 1 -max_dt {dt} -o out-temp-continuity.nc -output.sizes.medium temp -gradient mahaffy".format(path=pism_path, dt=dt)

run(cmd)

Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_01.sh
Expand Up @@ -10,7 +10,7 @@ OPTS="-max_dt 1 -o_size small -energy enthalpy"
set -e -x

# generate an interesting file
$PISM_PATH/pisms -energy enthalpy -Mx 6 -My 6 -Mz 5 -y 5000 -max_dt 500.0 -o baz-01.nc
$PISM_PATH/pismr -eisII A -energy enthalpy -Mx 6 -My 6 -Mz 5 -y 5000 -max_dt 500.0 -o baz-01.nc

# run for ten years, fixed time step
$PISM_PATH/pismr -i baz-01.nc $OPTS -ys 0 -y 10 -o foo-01.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_03.sh
Expand Up @@ -11,7 +11,7 @@ OPTS="-o_size small "
set -e -x

# Create a file to start from:
$MPIEXEC -n 2 $PISM_PATH/pisms -energy enthalpy -y 1000 $OPTS -o foo-03.nc -Mx 31 -My 41
$MPIEXEC -n 2 $PISM_PATH/pismr -eisII A -energy enthalpy -y 1000 $OPTS -o foo-03.nc -Mx 31 -My 41

# Run for 0 years:
$MPIEXEC -n 2 $PISM_PATH/pismr -i foo-03.nc -y 0 $OPTS -o bar-03.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_05.sh
Expand Up @@ -11,7 +11,7 @@ OPTS="-i foo-05.nc -bootstrap -Mx 41 -My 61 -Mz 21 -Lz 5000 -y 0 -o_size small"
set -e -x

# Create a file to bootstrap from (with a non-trivial bed topography):
$PISM_PATH/pisms -eisII I -Mx 121 -My 61 -Mz 21 -y 0 -o foo-05.nc
$PISM_PATH/pismr -eisII I -Mx 121 -My 61 -Mz 21 -y 0 -o foo-05.nc

# Bootstrap from this file and run for 0 years:
$MPIEXEC -n 2 $PISM_PATH/pismr $OPTS -o bar-05.nc
Expand Down
6 changes: 3 additions & 3 deletions test/regression/test_08.sh
Expand Up @@ -8,15 +8,15 @@ echo "Test # 8: regridding: coarse -> fine -> coarse (vertical direction)."
# The list of files to delete when done.
files="coarse1-08.nc coarse2-08.nc fine1-08.nc fine2-08.nc"

# -grid.registration corner is needed to match default settings of pisms
# -grid.registration corner is needed to match default settings of pismr -eisII A
OPTS="-y 0 -grid.registration corner"

set -e -x

# Create a file to regrid from:
$PISM_PATH/pisms -energy enthalpy -Mx 10 -My 10 -Mz 11 -y 6000 -max_dt 300.0 -o coarse1-08.nc
$PISM_PATH/pismr -eisII A -energy enthalpy -Mx 10 -My 10 -Mz 11 -y 6000 -max_dt 300.0 -o coarse1-08.nc
# Create another file with a finer grid:
$PISM_PATH/pisms -energy enthalpy -Mx 10 -My 10 -Mz 21 -y 6000 -max_dt 300.0 -o fine1-08.nc
$PISM_PATH/pismr -eisII A -energy enthalpy -Mx 10 -My 10 -Mz 21 -y 6000 -max_dt 300.0 -o fine1-08.nc

# Coarse -> fine:
$PISM_PATH/pismr -i fine1-08.nc -regrid_file coarse1-08.nc -regrid_vars enthalpy $OPTS -o fine2-08.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_09.sh
Expand Up @@ -13,7 +13,7 @@ rm -f $files
set -e -x

# Create a file to bootstrap from (with a non-trivial bed topography):
$MPIEXEC -n 1 $PISM_PATH/pisms -eisII I -Mx 51 -My 60 -Mz 21 -Mbz 21 -Lbz 1000 -y 0 -o foo-09.nc
$MPIEXEC -n 1 $PISM_PATH/pismr -eisII A -Mx 51 -My 60 -Mz 21 -Mbz 21 -Lbz 1000 -y 0 -o foo-09.nc

# Bootstrap from this file and run for 0 years:
$MPIEXEC -n 2 $PISM_PATH/pismr -i foo-09.nc -bootstrap $OPTS -o bar-09.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_10.sh
Expand Up @@ -14,7 +14,7 @@ set -e -x
NRANGE="1 2 3 4 5"

# Create a file to bootstrap from:
$MPIEXEC -n 1 $PISM_PATH/pisms -eisII I -Mx 51 -My 101 -y 0 -o foo0-10.nc
$MPIEXEC -n 1 $PISM_PATH/pismr -eisII A -eisII I -Mx 51 -My 101 -y 0 -o foo0-10.nc

# Bootstrap:
for NN in $NRANGE;
Expand Down
6 changes: 3 additions & 3 deletions test/regression/test_13.sh
Expand Up @@ -4,13 +4,13 @@ PISM_PATH=$1
MPIEXEC=$2

# Test name:
echo "Test #13: enthalpy symmetry near the base (pisms -energy enthalpy)."
echo "Test #13: enthalpy symmetry near the base (pismr -eisII A -energy enthalpy)."
# The list of files to delete when done.
files="simp_exper-13.nc"

rm -f $files
# run pisms
$MPIEXEC -n 2 $PISM_PATH/pisms -y 10e3 -Lz 5000 -Mx 12 -My 12 -o_size big -energy enthalpy -o simp_exper-13.nc
# run pismr -eisII A
$MPIEXEC -n 2 $PISM_PATH/pismr -eisII A -y 10e3 -Lz 5000 -Mx 12 -My 12 -o_size big -energy enthalpy -o simp_exper-13.nc

ncpdq -a z,y,x -O simp_exper-13.nc simp_exper-13.nc

Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_23.sh
Expand Up @@ -16,7 +16,7 @@ rm -f $files
set -e -x

# create foo-23.nc (at about 6500 years we get some basal melting...)
$MPIEXEC -n 2 $PISM_PATH/pisms -energy enthalpy -y 6500 $opts -o foo-23.nc
$MPIEXEC -n 2 $PISM_PATH/pismr -eisII A -energy enthalpy -y 6500 $opts -o foo-23.nc

# bootstrap from it, re-gridding all the variables we can
$PISM_PATH/pismr -i foo-23.nc -bootstrap -regrid_file foo-23.nc -y 0 $opts -o bar-23.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_27.sh
Expand Up @@ -12,7 +12,7 @@ rm -f $files

set -e -x

$PISM_PATH/pisms -eisII A -y 1000 -view velsurf,thk -Mbz 11 -Lbz 1000 -o_size small -o simp_exper-27.nc
$PISM_PATH/pismr -eisII A -eisII A -y 1000 -view velsurf,thk -Mbz 11 -Lbz 1000 -o_size small -o simp_exper-27.nc

if [ $? != 0 ];
then
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_28.sh
Expand Up @@ -15,7 +15,7 @@ set -e
set -x

# create a (complete) dataset to bootstrap from:
$MPIEXEC -n 2 $PISM_PATH/pisms -y 100 -o foo-28.nc
$MPIEXEC -n 2 $PISM_PATH/pismr -eisII A -y 100 -o foo-28.nc

OPTS="-i foo-28.nc -bootstrap -Mx 61 -My 61 -Mz 11 -y 10 -Lz 1000"
# bootstrap and run for 100 years:
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_31.sh
Expand Up @@ -16,7 +16,7 @@ set -e
set -x

# prepare input files with temp and liqfrac and with temp only
$PISM_PATH/pisms -Mx 3 -My 3 -energy enthalpy -y 10 -o temp-liqfrac.nc -o_size big
$PISM_PATH/pismr -eisII A -Mx 3 -My 3 -energy enthalpy -y 10 -o temp-liqfrac.nc -o_size big
ncks -x -v enthalpy -O temp-liqfrac.nc temp-liqfrac.nc
ncks -x -v liqfrac -O temp-liqfrac.nc temp.nc

Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_32.sh
Expand Up @@ -12,7 +12,7 @@ OPTS="-ys 0 -y 0 -i foo-32.nc -bootstrap -regrid_file foo-32.nc -Lz 4000 -Mx 31
set -e -x

# Create the file to regrid and bootstrap from:
$PISM_PATH/pisms -energy enthalpy -y 500 -o foo-32.nc -o_size big
$PISM_PATH/pismr -eisII A -energy enthalpy -y 500 -o foo-32.nc -o_size big

# Bootstrap from this file:
$PISM_PATH/pismr $OPTS -o bar-32.nc
Expand Down
2 changes: 1 addition & 1 deletion test/regression/test_33.sh
Expand Up @@ -15,7 +15,7 @@ set -e
set -x

# prepare input files with temp and liqfrac and with temp only
$PISM_PATH/pisms -y 100 -o in.nc
$PISM_PATH/pismr -eisII A -y 100 -o in.nc

$PISM_SOURCE_DIR/examples/python/sia_forward.py -i in.nc -o out.nc

Expand Down

0 comments on commit 435a184

Please sign in to comment.