ttesting.rst - 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
       ---
       ttesting.rst (7962B)
       ---
            1 .. include:: shortcuts.txt
            2 
            3 Testing if forcing data is used correctly
            4 ------------------------------------------
            5 
            6 It is very important to ensure that selected forcing options produce the result you
            7 expect: we find that the ice sheet response is very sensitive to provided climate forcing,
            8 especially in short-scale simulations.
            9 
           10 This section describes how to use PISM to inspect climate forcing.
           11 
           12 Visualizing climate inputs, without ice dynamics
           13 ++++++++++++++++++++++++++++++++++++++++++++++++
           14 
           15 Recall that internally in PISM there is a :ref:`separation of climate inputs from ice
           16 dynamics <sec-climate-inputs>`. This makes it possible to turn "off" the ice dynamics
           17 code to visualize the climate mass balance and temperature boundary conditions produced
           18 using a combination of options and input files. This is helpful during the process of
           19 creating PISM-readable data files, and modeling with such.
           20 
           21 To do this, use the option :opt:`-test_climate_models` (which is equivalent to
           22 :opt:`-stress_balance none` and :opt:`-energy none`) together with PISM's reporting
           23 capabilities (:opt:`-extra_file`, :opt:`-extra_times`, :opt:`-extra_vars`).
           24 
           25 Turning "off" ice dynamics saves computational time while allowing one to use the same
           26 options as in an actual modeling run. Note that :opt:`-test_climate_models` does *not*
           27 disable geometry updates, so one can check if surface elevation feedbacks modeled using
           28 lapse rates (and similar) work correctly. Please use the :opt:`-no_mass` command-line
           29 option to fix ice geometry. (This may be necessary if the mass balance rate data would
           30 result in extreme ice sheet growth that is not balanced by ice flow in this setup.
           31 
           32 As an example, set up an ice sheet state file and check if climate data is read in
           33 correctly:
           34 
           35 .. code-block:: none
           36 
           37    mpiexec -n 2 pisms -eisII A -y 1000 -o state.nc
           38    pismr -i state.nc -surface given -extra_times 0.0:0.1:2.5 \
           39          -extra_file movie.nc -extra_vars climatic_mass_balance,ice_surface_temp \
           40          -ys 0 -ye 2.5
           41 
           42 Using ``pisms`` merely generates demonstration climate data, using EISMINT II choices
           43 :cite:`EISMINT00`. The next run extracts the surface mass balance :var:`climatic_mass_balance`
           44 and surface temperature :var:`ice_surface_temp` from ``state.nc``. It then does nothing
           45 interesting, exactly because a constant climate is used. Viewing ``movie.nc`` we see these
           46 same values as from ``state.nc``, in variables :var:`climatic_mass_balance`,
           47 :var:`ice_surface_temp`, reported back to us as the time- and space-dependent climate at
           48 times ``ys:dt:ye``. It is a boring "movie."
           49 
           50 A more interesting example uses a :ref:`positive degree-day scheme <sec-surface-pdd>`).
           51 This scheme uses a variable called :var:`precipitation`, and a calculation of melting, to
           52 get the surface mass balance :var:`climatic_mass_balance`.
           53 
           54 Assuming that ``g20km_10ka.nc`` was created :ref:`as described in the User's Manual
           55 <sec-runscript>`, running
           56 
           57 .. code-block:: none
           58 
           59     pismr -test_climate_models -no_mass -i g20km_10ka.nc \
           60           -atmosphere searise_greenland -surface pdd \
           61           -ys 0 -ye 1 -extra_times 0:1week:1 \
           62           -extra_file foo.nc \
           63           -extra_vars climatic_mass_balance,ice_surface_temp,air_temp_snapshot,precipitation
           64     
           65 produces ``foo.nc``. Viewing in with ``ncview`` shows an annual cycle in the variable
           66 :var:`air_temp` and a noticeable decrease in the surface mass balance during summer months
           67 (see variable :var:`climatic_mass_balance`). Note that :var:`ice_surface_temp` is constant
           68 in time: this is the temperature *at the ice surface but below firn* and it does not
           69 include seasonal variations :cite:`Hock05`.
           70 
           71 Using low-resolution test runs
           72 ++++++++++++++++++++++++++++++
           73 
           74 Sometimes a run like the one above is still too costly. In this case it might be helpful
           75 to replace it with a similar run on a coarser grid, with or without the option
           76 :opt:`-test_climate_models`. (Testing climate inputs usually means checking if the timing
           77 of modeled events is right, and high spatial resolution is not essential.)
           78 
           79 The command
           80 
           81 .. code-block:: none
           82 
           83     pismr -i g20km_pre100.nc -bootstrap -Mx 51 -My 101 -Mz 11 \
           84           -atmosphere searise_greenland \
           85           -surface pdd -ys 0 -ye 2.5 \
           86           -extra_file foo.nc -extra_times 0:0.1:2.5 \
           87           -extra_vars climatic_mass_balance,air_temp_snapshot,smelt,srunoff,saccum
           88           -ts_file ts.nc -ts_times 0:0.1:2.5 \
           89           -o bar.nc
           90 
           91 will produce ``foo.nc`` containing a "movie" very similar to the one created by the
           92 previous run, but including the full influence of ice dynamics.
           93 
           94 In addition to ``foo.nc``, the latter command will produce ``ts.nc`` containing scalar
           95 time-series. The variable ``surface_ice_flux`` (the *total over the ice-covered area* of
           96 the surface mass flux) can be used to detect if climate forcing is applied at the right
           97 time.
           98 
           99 Visualizing the climate inputs in the Greenland case
          100 ++++++++++++++++++++++++++++++++++++++++++++++++++++
          101 
          102 Assuming that ``g20km_pre100.nc`` was produced by the run described in section
          103 :ref:`sec-start`), one can run the following to check if the PDD model in PISM (see
          104 section :ref:`sec-surface-pdd`) is "reasonable":
          105 
          106 .. code-block:: none
          107 
          108    pismr -i g20km_pre100.nc -atmosphere searise_greenland,precip_scaling \
          109          -surface pdd -atmosphere_precip_scaling_file pism_dT.nc \
          110          -extra_times 0:1week:3 -ys 0 -ye 3 \
          111          -extra_file pddmovie.nc -o_order zyx \
          112          -extra_vars climatic_mass_balance,air_temp_snapshot
          113 
          114 This produces the file ``pddmovie.nc`` with several variables:
          115 :var:`climatic_mass_balance` (instantaneous net accumulation (ablation) rate),
          116 :var:`air_temp_snapshot` (instantaneous near-surface air temperature),
          117 :var:`precipitation` (mean annual ice-equivalent precipitation rate) and some others.
          118 
          119 The variable :var:`precipitation` does not evolve over time because it is part of the
          120 SeaRISE-Greenland data and is read in from the input file.
          121 
          122 The other two variables were used to create figure :numref:`fig-pddseries`, which shows
          123 the time-series of the accumulation rate (top graph) and the air temperature (bottom
          124 graph) with the map view of the surface elevation on the left.
          125 
          126 Here are two things to notice:
          127 
          128 #. The summer peak day is in the right place. The default for this value is July 15 (day
          129    `196`, at approximately `196/365 \simeq 0.54` year). (If it is important, the peak day
          130    can be changed using the configuration parameter
          131    :config:`atmosphere.fausto_air_temp.summer_peak_day`).
          132 
          133 #. Lows of the surface mass balance rate :var:`climatic_mass_balance` correspond to
          134    positive degree-days in the given period, because of highs of the air temperature.
          135    Recall the air temperature graph does not show random daily variations. Even though it
          136    has the maximum of about `266` Kelvin, the parameterized instantaneous air
          137    temperature can be above freezing. A positive value for positive degree-days is
          138    expected :cite:`CalovGreve05`.
          139 
          140 .. figure:: figures/pdd-movie.png
          141    :name: fig-pddseries
          142 
          143    Time series of the surface mass balance rate and near-surface air temperature.
          144 
          145 We can also test the surface temperature forcing code with the following command.
          146 
          147 .. code-block:: none
          148 
          149     pismr -i g20km_pre100.nc -surface simple \
          150           -atmosphere searise_greenland,delta_T \
          151           -atmosphere_delta_T_file pism_dT.nc \
          152           -extra_times 100 -ys -125e3 -ye 0 \
          153           -extra_vars ice_surface_temp \
          154           -extra_file dT_movie.nc -o_order zyx \
          155           -test_climate_models -no_mass
          156     
          157 The output ``dT_movie.nc`` and ``pism_dT.nc`` were used to create
          158 :numref:`fig-artm-timeseries`.
          159 
          160 This figure shows the GRIP temperature offsets and the time-series of the temperature at
          161 the ice surface at a point in southern Greenland (bottom graph), confirming that the
          162 temperature offsets are used correctly.
          163 
          164 .. figure:: figures/dT-movie.png
          165    :name: fig-artm-timeseries
          166 
          167    Time series of the surface temperature compared to GRIP temperature offsets
          168