The Intermediate Complexity Atmospheric Research model (ICAR)
A computationally efficient atmospheric model for downscaling.
 All Classes Files Functions Variables
Public Member Functions | Private Member Functions | Private Attributes | List of all members
time_step Module Reference


Main time stepping module. Calculates a stable time step (dt) and loops over physics calls Also updates boundaries every time step. More...

Public Member Functions

subroutine, public step (domain, options, bc, model_time, next_output)
 

Step forward one IO time step. More...

 

Private Member Functions

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...

 

Private Attributes

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
 

Detailed Description


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)

Member Function/Subroutine Documentation

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
bcBoundary conditions structure containing dXdt variables
nstepsNumber of time steps calculated in step() function
optionsModel options structure specifies which variables need to be updated

Here is the caller graph for this function:

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
curdatadata array to be updated
dXdtArray containing increments to be applied to the boundaries. (nz x max(nx,ny) x 4)

Here is the caller graph for this function:

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]

Here is the caller graph for this function:

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
domainModel domain data structure to be updated
optionsModel options (not used at present)

Here is the call graph for this function:

Here is the caller graph for this function:

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
domainfull domain data structure to be updated
bcboundary conditions (containing dXdt increments)
optionsoptions structure specifies which variables need to be updated

Here is the call graph for this function:

Here is the caller graph for this function:

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
domaindomain data structure containing model state
optionsmodel options structure
bcmodel boundary conditions data structure
model_timeCurrent internal model time (seconds since start of run)
next_outputNext time to write an output file (in "model_time")

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

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: