27 real(DEFAULT_PRECISION),
allocatable ::
qc_col(:)
33 real(DEFAULT_PRECISION),
allocatable ::
sth_lw(:,:,:)
56 type(model_state_type),
target,
intent(inout) :: current_state
59 k_top = current_state%local_grid%size(z_index) + current_state%local_grid%halo_size(z_index) * 2
60 x_local = current_state%local_grid%size(x_index) + current_state%local_grid%halo_size(x_index) * 2
61 y_local = current_state%local_grid%size(y_index) + current_state%local_grid%halo_size(x_index) * 2
72 iql=get_q_index(standard_q_names%CLOUD_LIQUID_MASS,
'lwrad_exponential')
74 longwave_exp_decay=options_get_real(current_state%options_database,
"longwave_exp_decay")
78 density_factor(:) = current_state%global_grid%configuration%vertical%rhon(:)* &
79 current_state%global_grid%configuration%vertical%dz(:)
90 type(model_state_type),
target,
intent(inout) :: current_state
95 real(DEFAULT_PRECISION) :: dtm
97 if (current_state%halo_column)
return 99 dtm = current_state%dtm*2.0
100 if (current_state%field_stepping == forward_stepping) dtm=current_state%dtm
102 icol=current_state%column_local_x
103 jcol=current_state%column_local_y
106 if (current_state%field_stepping == forward_stepping)
then 107 qc_col(:) = current_state%q(
iql)%data(:, jcol, icol) + current_state%sq(
iql)%data(:, jcol, icol)*dtm
109 qc_col(:)= current_state%zq(
iql)%data(:, jcol, icol) + current_state%sq(
iql)%data(:, jcol, icol)*dtm
120 do k =
k_top-1, 1, -1
121 if (
qc_col(k+1) > 1.e-10)
then 131 if (
qc_col(k) > 1.e-10)
then 151 current_state%sth%data(:, jcol, icol) = current_state%sth%data(:, jcol, icol) +
sth_lw(:, jcol, icol)
157 type(model_state_type),
target,
intent(inout) :: current_state
real(default_precision), dimension(:), allocatable radiation_factor
integer, parameter, public forward_stepping
type(standard_q_names_type), public standard_q_names
subroutine initialisation_callback(current_state)
The initialisation callback sets up the prescribed longwave fluxes and the exponential decay factor...
real(default_precision), dimension(:,:,:), allocatable sth_lw
real(default_precision) cltop_longwave_flux
real(kind=default_precision), public cp
subroutine finalisation_callback(current_state)
real(default_precision), dimension(:), allocatable lwrad_flux
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
integer, parameter, public z_index
Grid index parameters.
Contains common definitions for the data and datatypes used by MONC.
The ModelState which represents the current state of a run.
Description of a component.
Scientific constant values used throughout simulations. Each has a default value and this can be over...
This manages the Q variables and specifically the mapping between names and the index that they are s...
Simple exponential scheme to calculate the longwave radiation associated with cloud. The scheme is based on the methods used in GASS intercomparison cases, e.g. DYCOMS, ISDAC.
Interfaces and types that MONC components must specify.
real(default_precision) longwave_exp_decay
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.
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...
type(component_descriptor_type) function, public lwrad_exponential_get_descriptor()
Provides the descriptor back to the caller and is used in component registration. ...
real(default_precision), dimension(:), allocatable lwrad_flux_top
The model state which represents the current state of a run.
real(default_precision), dimension(:), allocatable qc_col
integer, parameter, public y_index
subroutine timestep_callback(current_state)
Called for each column per timestep this will apply a forcing term to the aerosol fields...
real(default_precision), dimension(:), allocatable lwrad_flux_base
real(default_precision) clbase_longwave_flux
integer, parameter, public x_index
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 density_factor