Using PISM for flow-line modeling

As described in sections Computational box and Spatial grid, PISM is a three-dimensional model. Moreover, parameters grid­.Mx and grid­.My have to be greater than or equal to three, so it is not possible to turn PISM into a 2D (flow-line) model by setting grid­.Mx or grid­.My to \(1\).

There is a way around this, though: by using grid­.periodicity to tell PISM to make the computational grid \(y\)-periodic and providing initial and boundary conditions that are functions of \(x\) only one can ensure that there is no flow in the \(y\)-direction.

In this case grid­.My can be any number; we want to avoid unnecessary computations, though, so grid­.My of \(3\) is the obvious choice.

One remaining problem is that PISM still expects input files to contain both x and y dimensions. To help with this, PISM comes with a Python script that turns NetCDF files with \(N\) grid points along a flow line into files with 2D fields containing \(N\times3\) grid points.1

Here’s an example which uses the script examples/preprocessing/ to create a minimal, and obviously unrealistic, dataset. The file created by this script contains all the required information but is not ready to use with PISM. Proceed as follows:

examples/preprocessing/ # creates with only an x-direction -o --expand -d y

This produces a PISM-ready Specifically, “expands” its input file in the \(y\)-direction. Now we can “bootstrap” from

mpiexec -n 2 pismr \
        -surface given \
        -bootstrap -i \
        -Mx 201 -Lx 1000 \
        -My 3 -Ly 4 -periodicity y \
        -Lz 2000 -Mz 11 \
        -y 10000 -o

To make it easier to visualize data in the file created by PISM, “collapse” it using NCO:

ncks -O -d y,1
ncwa -O -a time,y



This script requires the numpy and netCDF4 Python modules. Run --help for a full list of options.

Previous Up Next