Go to the documentation of this file.
58 type(model_state_type),
target,
intent(inout) :: current_state
63 k_top = current_state%local_grid%size(z_index) + current_state%local_grid%halo_size(z_index) * 2
64 x_local = current_state%local_grid%size(x_index) + current_state%local_grid%halo_size(x_index) * 2
65 y_local = current_state%local_grid%size(y_index) + current_state%local_grid%halo_size(x_index) * 2
67 if (is_component_enabled(current_state%options_database,
"socrates_couple"))
then
69 (log_error,
"Socrates and lwrad_exponential both enabled, switch off one in config - STOP")
81 iql=get_q_index(standard_q_names%CLOUD_LIQUID_MASS,
'lwrad_exponential')
83 longwave_exp_decay=options_get_real(current_state%options_database,
"longwave_exp_decay")
87 density_factor(:) = current_state%global_grid%configuration%vertical%rhon(:)* &
88 current_state%global_grid%configuration%vertical%dz(:)
99 type(model_state_type),
target,
intent(inout) :: current_state
102 integer :: icol, jcol
104 real(DEFAULT_PRECISION) :: dtm
106 if (current_state%halo_column)
return
108 dtm = current_state%dtm*2.0
109 if (current_state%field_stepping == forward_stepping) dtm=current_state%dtm
111 icol=current_state%column_local_x
112 jcol=current_state%column_local_y
115 if (current_state%field_stepping == forward_stepping)
then
116 qc_col(:) = current_state%q(
iql)%data(:, jcol, icol) + current_state%sq(
iql)%data(:, jcol, icol)*dtm
118 qc_col(:)= current_state%zq(
iql)%data(:, jcol, icol) + current_state%sq(
iql)%data(:, jcol, icol)*dtm
129 do k =
k_top-1, 1, -1
130 if (
qc_col(k+1) > 1.e-10)
then
140 if (
qc_col(k) > 1.e-10)
then
160 current_state%sth%data(:, jcol, icol) = current_state%sth%data(:, jcol, icol) +
sth_lw(:, jcol, icol)
166 type(model_state_type),
target,
intent(inout) :: current_state
logical function, public is_component_enabled(options_database, component_name)
Determines whether or not a specific component is registered and enabled.
integer, parameter, public log_error
Only log ERROR messages.
subroutine finalisation_callback(current_state)
real(default_precision), dimension(:), allocatable lwrad_flux_base
real(default_precision), dimension(:), allocatable density_factor
integer, parameter, public x_index
integer, parameter, public y_index
real(default_precision), dimension(:), allocatable lwrad_flux
real(default_precision), dimension(:), allocatable qc_col
subroutine timestep_callback(current_state)
Called for each column per timestep this will apply a forcing term to the aerosol fields.
real(kind=default_precision), public cp
Interfaces and types that MONC components must specify.
real(default_precision) cltop_longwave_flux
real(default_precision), dimension(:,:,:), allocatable sth_lw
real(default_precision) longwave_exp_decay
Scientific constant values used throughout simulations. Each has a default value and this can be over...
integer, parameter, public z_index
Grid index parameters.
type(standard_q_names_type), public standard_q_names
The ModelState which represents the current state of a run.
real(default_precision) clbase_longwave_flux
integer, parameter, public forward_stepping
Simple exponential scheme to calculate the longwave radiation associated with cloud....
integer function, public get_q_index(name, assigning_component)
Add in a new entry into the register if the name does not already exist or return the index of the pr...
real(default_precision), dimension(:), allocatable lwrad_flux_top
Contains common definitions for the data and datatypes used by MONC.
subroutine, public log_master_log(level, message)
Will log just from the master process.
subroutine initialisation_callback(current_state)
The initialisation callback sets up the prescribed longwave fluxes and the exponential decay factor.
This manages the Q variables and specifically the mapping between names and the index that they are s...
real(default_precision), dimension(:), allocatable radiation_factor
Functionality to support the different types of grid and abstraction between global grids and local o...
Manages the options database. Contains administration functions and deduce runtime options from the c...
Description of a component.
real(kind=default_precision) function, public options_get_real(options_database, key, index)
Retrieves a real value from the database that matches the provided key.
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
The model state which represents the current state of a run.
type(component_descriptor_type) function, public lwrad_exponential_get_descriptor()
Provides the descriptor back to the caller and is used in component registration.