Using time-dependent forcing

Introduction

PISM can use time-dependent scalar and spatially-variable forcing inputs.

The ncdump output for a typical forcing file would look similar to this example.

Listing 2 Example time-dependent forcing
netcdf delta_T {
dimensions:
  nv = 2 ;
  time = UNLIMITED ; // (4 currently)
variables:
  double nv(nv) ;
  double time(time) ;
    time:units = "365 days since 1-1-1" ;
    time:axis = "T" ;
    time:bounds = "time_bounds" ;
    time:calendar = "365_day" ;
    time:long_name = "time" ;
  double time_bounds(time, nv) ;
  double delta_T(time) ;
    delta_T:units = "Kelvin" ;
    delta_T:long_name = "temperature offsets" ;
data:

 time        = 0,  100, 900, 1000;
 time_bounds = 0, 100, 100, 500, 500, 900, 900, 1000;
 delta_T     = 0, -30, -30, 0;
}

A data set like this one could be used to model a scenario in which the temperature at the top surface of the ice drops by 30 degrees over the course of 100 years, remains constant for 800 years, then increases by 30 degrees over 100 years. See Scalar temperature offsets.

In addition to times, all forcing files have to contain time bounds defining time intervals corresponding to individual records.

Note

PISM will check if the modeled time interval (set using time­.start and time­.end or time­.run_length) is a subset of the time covered by a forcing file and stop if it is not.

Set input­.forcing­.time_extrapolation to true to tell PISM to use constant extrapolation instead.

Scalar time-dependent inputs

All scalar time-dependent inputs are interpreted as piecewise-linear.

Time bounds are used to compute period length for periodic forcing and the time interval covered by provided data otherwise. Only the left end point of the first interval and the right end point of the last interval are used.

Spatially-variable time-dependent inputs

To make balancing the books possible PISM interprets fluxes such as the top surface mass balance, precipitation, and the sub shelf mass flux as piecewise-constant in time over intervals defined by time bounds.

In this case times corresponding to individual forcing records are irrelevant (and are ignored) and only time bounds are used.

Other 2D input fields (examples: ice surface temperature, near-surface air temperature, sea level elevation) are interpreted as piecewise-linear in time.

In this case times are read from the file and time bounds are used to compute period length for periodic forcing and the time interval covered by provided data otherwise.

Periodic forcing

A PISM forcing file with a periodic forcing has to contain exactly one period.

The left end point of the first time interval defines the start of the period.

The total duration of forcing in the file defines the length of the period. Specifically, the length of the period is the difference of the right end point of the last interval and the left end point of the first interval.

When used as periodic forcing, Example time-dependent forcing would be interpreted as having the period of one thousand \(365\)-day years, with the period starting on January \(1\) of year \(1\).

Note

  • A real life (Gregorian, Julian, etc) calendar does not usually make sense in simulations using periodic forcing.

  • It is usually a good idea to use time units that are an integer multiple of one second, for example “day” or “365 days” as in the example above. This makes forcing files easier to interpret. (The units “years” corresponds to the mean tropical year. This is appropriate when converting from m/s to m/year, for example, but not for keeping track of time.)

Adding time bounds

NCO's ncap2 makes it easy to add time bounds to a data set.

Save one of the scripts below to add_time_bounds.txt and then run

ncap2 -O -S add_time_bounds.txt forcing.nc forcing-with-bounds.nc

to add time bounds to forcing.nc.

Times as mid-points of intervals

Use this script to interpret each time as a mid-point of the corresponding interval.

defdim("nv",2);
time_bnds=make_bounds(time,$nv,"time_bnds");

or just use this one command:

Listing 3 Adding time bounds, interpreting times as mid-points of intervals
ncap2 -O -s 'defdim("nv",2);time_bnds=make_bounds(time,$nv,"time_bnds");' \
      forcing.nc forcing-with-bounds.nc

Times as left end points of intervals

Use this script to interpret each time as a the left end point of the corresponding interval.

Listing 4 Adding time bounds, interpreting times as left end points of intervals
time@bounds="time_bnds";
defdim("nv",2);
time_bnds=array(0,0,/$time,$nv/);
time_bnds(:,0)=time;
time_bnds(:-2,1)=time(1:);
time_bnds(-1,1)=2*time(-1)-time(-2);

Times as right end points of intervals

Use this script to interpret each time as a the right end point of the corresponding interval.

Listing 5 Adding time bounds, interpreting times as right end points of intervals
time@bounds="time_bnds";
defdim("nv",2);
time_bnds=array(0,0,/$time,$nv/);
time_bnds(:,1)=time;
time_bnds(1:,0)=time(:-2);
time_bnds(0,0)=2*time(0)-time(1);

Previous Up Next