Main time stepping module. Calculates a stable time step (dt) and loops over physics calls Also updates boundaries every time step.
More...
|
subroutine, public | step (domain, options, bc, model_time, next_output) |
|
Step forward one IO time step. More...
|
|
|
subroutine | boundary_update (curdata, dXdt) |
|
Update the edges of curdata by adding dXdt More...
|
|
subroutine | forcing_update (domain, bc, options) |
|
Updated all fields in domain using the respective dXdt variables More...
|
|
subroutine | diagnostic_update (domain, options) |
|
Update model diagnostic fields More...
|
|
subroutine | apply_dt (bc, nsteps, options) |
|
Uses the dt from step() to convert the forcing increments to per/time step increments More...
|
|
real function | compute_dt (dx, u, v, w, CFL, cfl_strictness) |
|
Calculate the maximum stable time step given some CFL criteria More...
|
|
|
real, dimension(:,:), allocatable | lastw |
|
real, dimension(:,:), allocatable | currw |
|
real, dimension(:,:), allocatable | uw |
|
real, dimension(:,:), allocatable | vw |
|
real, dimension(:,:), allocatable | temporaries |
|
real, dimension(:,:), allocatable | used |
|
real, dimension(:,:), allocatable | to |
|
real, dimension(:,:), allocatable | compute |
|
real, dimension(:,:), allocatable | diagnostic |
|
real, dimension(:,:), allocatable | w_real |
|
real, dimension(:,:), allocatable | field |
|
Main time stepping module. Calculates a stable time step (dt) and loops over physics calls Also updates boundaries every time step.
- Author
- Ethan Gutmann (gutma.nosp@m.nn@u.nosp@m.car.e.nosp@m.du)
subroutine time_step::apply_dt |
( |
type(bc_type), intent(inout) |
bc, |
|
|
integer, intent(in) |
nsteps, |
|
|
type(options_type), intent(in) |
options |
|
) |
| |
|
private |
Uses the dt from step() to convert the forcing increments to per/time step increments
Divides dXdt variables by n timesteps so that after adding it N times we will be at the correct final value.
- Parameters
-
bc | Boundary conditions structure containing dXdt variables |
nsteps | Number of time steps calculated in step() function |
options | Model options structure specifies which variables need to be updated
|
subroutine time_step::boundary_update |
( |
real, dimension(:,:,:), intent(inout) |
curdata, |
|
|
real, dimension(:,:,:), intent(in) |
dXdt |
|
) |
| |
|
private |
Update the edges of curdata by adding dXdt
Apply dXdt to the boundaries of a given data array. For these variables, dXdt is a small array just storing the boundary increments
- Parameters
-
curdata | data array to be updated |
dXdt | Array containing increments to be applied to the boundaries. (nz x max(nx,ny) x 4)
|
real function time_step::compute_dt |
( |
real, intent(in) |
dx, |
|
|
real, dimension(:,:,:), intent(in) |
u, |
|
|
real, dimension(:,:,:), intent(in) |
v, |
|
|
real, dimension(:,:,:), intent(in) |
w, |
|
|
real, intent(in) |
CFL, |
|
|
integer, intent(in) |
cfl_strictness |
|
) |
| |
|
private |
Calculate the maximum stable time step given some CFL criteria
For each grid cell, find the mean of the wind speeds from each direction * sqrt(3) for the 3D advection CFL limited time step Also find the maximum wind speed anywhere in the domain to check against a 1D advection limit.
- Parameters
-
dx | [ scalar ] horizontal grid cell width [m] |
u | [nx+1 x nz x ny] east west wind speeds [m/s] |
v | [nx x nz x ny+1] North South wind speed [m/s] |
w | [nx x nz x ny] vertical wind speed [m/s] |
CFL | [ scalar ] CFL limit to use (e.g. 1.0) |
- Returns
- dt [ scalar ] Maximum stable time step [s]
subroutine time_step::diagnostic_update |
( |
type(domain_type), intent(inout) |
domain, |
|
|
type(options_type), intent(in) |
options |
|
) |
| |
|
private |
Update model diagnostic fields
Calculates most model diagnostic fields such as Psfc, 10m height winds and ustar
- Parameters
-
domain | Model domain data structure to be updated |
options | Model options (not used at present)
|
subroutine time_step::forcing_update |
( |
type(domain_type), intent(inout) |
domain, |
|
|
type(bc_type), intent(inout) |
bc, |
|
|
type(options_type), intent(in) |
options |
|
) |
| |
|
private |
Updated all fields in domain using the respective dXdt variables
- Parameters
-
domain | full domain data structure to be updated |
bc | boundary conditions (containing dXdt increments) |
options | options structure specifies which variables need to be updated
|
subroutine, public time_step::step |
( |
type(domain_type), intent(inout) |
domain, |
|
|
type(options_type), intent(in) |
options, |
|
|
type(bc_type), intent(inout) |
bc, |
|
|
real*8, intent(inout) |
model_time, |
|
|
real*8, intent(inout) |
next_output |
|
) |
| |
Step forward one IO time step.
Calculated the internal model time step to satisfy the CFL criteria, then updates all forcing update increments for that dt and loops through time calling physics modules. Also checks to see if it is time to write a model output file.
- Parameters
-
domain | domain data structure containing model state |
options | model options structure |
bc | model boundary conditions data structure |
model_time | Current internal model time (seconds since start of run) |
next_output | Next time to write an output file (in "model_time")
|
real, dimension(:,:), allocatable time_step::compute |
|
private |
real, dimension(:,:), allocatable time_step::currw |
|
private |
real, dimension(:,:), allocatable time_step::diagnostic |
|
private |
real, dimension(:,:), allocatable time_step::field |
|
private |
real, dimension(:,:), allocatable time_step::lastw |
|
private |
real, dimension(:,:), allocatable time_step::temporaries |
|
private |
real, dimension(:,:), allocatable time_step::to |
|
private |
real, dimension(:,:), allocatable time_step::used |
|
private |
real, dimension(:,:), allocatable time_step::uw |
|
private |
real, dimension(:,:), allocatable time_step::vw |
|
private |
real, dimension(:,:), allocatable time_step::w_real |
|
private |
The documentation for this module was generated from the following file: