34 type(model_state_type),
target,
intent(inout) :: current_state
39 fcoriol=options_get_real(current_state%options_database,
"fcoriol")
40 current_state%geostrophic_wind_rate_of_change_in_x=options_get_real(current_state%options_database, &
41 "geostrophic_wind_rate_of_change_in_x")
42 current_state%geostrophic_wind_rate_of_change_in_y=options_get_real(current_state%options_database, &
43 "geostrophic_wind_rate_of_change_in_y")
44 current_state%surface_geostrophic_wind_x=options_get_real(current_state%options_database,
"surface_geostrophic_wind_x")
45 current_state%surface_geostrophic_wind_y=options_get_real(current_state%options_database,
"surface_geostrophic_wind_y")
50 do k=1,current_state%local_grid%size(z_index)
55 current_state%global_grid%configuration%vertical%zn(k)
57 current_state%global_grid%configuration%vertical%zn(k)
65 type(model_state_type),
target,
intent(inout) :: current_state
69 if (current_state%halo_column)
then 70 if (.not. ((current_state%column_local_y == current_state%local_grid%halo_size(y_index) .and. &
71 current_state%column_local_x .le. current_state%local_grid%local_domain_end_index(x_index) .and. &
72 current_state%column_local_x .ge. current_state%local_grid%local_domain_start_index(x_index)-1) .or. &
73 (current_state%column_local_x == current_state%local_grid%halo_size(x_index) .and. &
74 current_state%column_local_y .ge. current_state%local_grid%local_domain_start_index(y_index) &
75 .and. current_state%column_local_y .le. current_state%local_grid%local_domain_end_index(y_index)) ))
return 78 do k=2,current_state%local_grid%size(z_index)
79 #if defined(U_ACTIVE) && defined(V_ACTIVE) 80 current_state%su%data(k, current_state%column_local_y, current_state%column_local_x)=&
81 current_state%su%data(k, current_state%column_local_y, current_state%column_local_x)+
fcoriol*&
82 (0.25_default_precision*(current_state%v%data(k, current_state%column_local_y, current_state%column_local_x)+&
83 current_state%v%data(k, current_state%column_local_y, current_state%column_local_x+1)+&
84 current_state%v%data(k, current_state%column_local_y-1, current_state%column_local_x)+&
85 current_state%v%data(k, current_state%column_local_y-1, current_state%column_local_x+1))+current_state%vgal-&
88 current_state%sv%data(k, current_state%column_local_y, current_state%column_local_x)=&
89 current_state%sv%data(k, current_state%column_local_y, current_state%column_local_x)-
fcoriol*&
90 (0.25_default_precision*(current_state%u%data(k, current_state%column_local_y, current_state%column_local_x)+&
91 current_state%u%data(k, current_state%column_local_y, current_state%column_local_x-1)+&
92 current_state%u%data(k, current_state%column_local_y+1, current_state%column_local_x)+&
93 current_state%u%data(k, current_state%column_local_y+1, current_state%column_local_x-1))+current_state%ugal-&
real(kind=default_precision), dimension(:), allocatable geostrophic_wind_y
type(component_descriptor_type) function, public coriolis_get_descriptor()
Provides the descriptor back to the caller and is used in component registration. ...
subroutine timestep_callback(current_state)
For each none halo cell this will calculate the coriolis terms for su and sv fields.
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.
Interfaces and types that MONC components must specify.
logical baroclinicity_use_geostrophic_shear
subroutine initialisation_callback(current_state)
Initialisation call back which will read in the coriolis configuration and set up the geostrophic win...
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...
This calculates the coriolis and mean pressure gradient terms which impact su and sv fields...
Manages the options database. Contains administration functions and deduce runtime options from the c...
real(kind=default_precision) fcoriol
logical function, public options_get_logical(options_database, key, index)
Retrieves a logical value from the database that matches the provided key.
The model state which represents the current state of a run.
integer, parameter, public y_index
integer, parameter, public x_index
real(kind=default_precision), dimension(:), allocatable geostrophic_wind_x