Model
This module contains the main SWAMPE function which runs the 2D shallow-water general circulation model.
- SWAMPE.model.run_model(M, dt, tmax, Phibar, omega, a, test=None, g=9.8, forcflag=True, taurad=86400, taudrag=86400, DPhieq=4000000, a1=0.05, plotflag=True, plotfreq=5, minlevel=None, maxlevel=None, diffflag=True, modalflag=True, alpha=0.01, contflag=False, saveflag=True, expflag=False, savefreq=150, K6=1.24e+33, custompath=None, contTime=None, timeunits='hours', verbose=True)
This is the main SWAMPE function which runs the model.
- Parameters:
M (int) – spectral resolution
dt (float) – time step length in seconds
tmax (int) – number of timesteps to run in the simulation
Phibar (float) – reference geopotential (a good rule of thumb is Phibar=gH, where H is scale height in meters)
omega (float) – planetary rotation rate in radians/s
a (float) – planetary radius in meters
test (int, optional) – number of test from Jakob & Hack (1993), tests 1 and 2 are supported, defaults to None
g (float, optional) – surface gravity, defaults to 9.8 m/s^2
forcflag (bool, optional) – option to implement radiative forcing from the host star, defaults to True
taurad (float, optional) – radiative timescale for Newtonian relaxation in the forcing scheme, defaults to 86400 s
taudrag (float, optional) – drag timescale for wind forcing, defaults to 86400 s
DPhieq (float, optional) – day/night amplitude of prescribed local radiative equilibrium geopotential, defaults to 4*(10**6) m^2/s^2.
a1 (float, optional) – angle for tests 1 and 2 from Jakob and Hack (1993), defaults to 0.05
plotflag (bool, optional) – option to display progress plots over the course of the simulation run, defaults to True
plotfreq (int, optional) – frequency of plot output during the simulation run, defaults to once every 5 timesteps
minlevel (float, optional) – minimum level of colorbar for geopotential plotting, defaults to minimum geopotential
maxlevel (float, optional) – maximum level of colorbar for geopotential plotting, defaults to minimum geopotential
diffflag (bool, optional) – option to turn on the diffusion/hyperviscosity filter, defaults to True (strongly recommended)
modalflag (bool, optional) – option to turn on the modal splitting filter from Hack and Jakob (1992), defaults to True
alpha (float, optional) – parameter for the modal splitting filter from Hack and Jakob (1992), defaults to 0.01
contflag (bool, optional) – option to continue the simulation from saved data, defaults to False
saveflag (bool, optional) – option to save data as pickle files, defaults to True
expflag (bool, optional) – option to use explicit time-stepping scheme instead of modified Euler, defaults to False (strongly recommended to use the modified Euler scheme)
savefreq (int, optional) – frequency of saving the data, defaults to once every 150 timesteps
K6 (float, optional) – sixth order hyperviscosity filter parameter, defaults to 1.24*10**33
custompath (str, optional) – option to specify the path for saving the data. By default SWAMPE will make a local directory data/ and store files there.
contTime (int, optional) – (if continuing from saved data) timestamp of the data, defaults to None
timeunits (str, optional) – time units, defaults to ‘hours’, also supports ‘minutes’ and ‘seconds’
verbose (bool, optional) – option to print progress statements, defaults to True