13 use mpi
, only : mpi_request_null, mpi_status_ignore
25 real(kind=DEFAULT_PRECISION),
dimension(:,:),
allocatable ::
q_advection 56 type(model_state_type),
target,
intent(inout) :: current_state
57 character(len=*),
intent(in) :: name
58 type(component_field_information_type),
intent(out) :: field_information
61 field_information%field_type=component_array_field_type
62 field_information%data_type=component_double_data_type
63 if (name .eq.
"q_advection")
then 64 field_information%number_dimensions=2
66 field_information%number_dimensions=1
68 field_information%dimension_sizes(1)=current_state%local_grid%size(z_index)
69 if (name .eq.
"q_advection") field_information%dimension_sizes(2)=current_state%number_q_fields
70 field_information%enabled=.true.
78 type(model_state_type),
target,
intent(inout) :: current_state
79 character(len=*),
intent(in) :: name
80 type(component_field_value_type),
intent(out) :: field_value
82 if (name .eq.
"u_advection")
then 84 else if (name .eq.
"v_advection")
then 86 else if (name .eq.
"w_advection")
then 88 else if (name .eq.
"th_advection")
then 90 else if (name .eq.
"q_advection")
then 98 type(model_state_type),
target,
intent(inout) :: current_state
100 type(prognostic_field_ptr_type),
dimension(3) :: fields
101 integer,
dimension(3, 2) :: sizes
102 integer :: num_fields
103 logical :: xdim, ydim
110 num_fields = num_fields + 1
111 fields(num_fields)%ptr => current_state%u
112 sizes(num_fields,:) = (/ 2, 2 /)
118 num_fields = num_fields + 1
119 fields(num_fields)%ptr => current_state%v
120 sizes(num_fields,:) = (/ 1, 1 /)
125 num_fields = num_fields + 1
126 fields(num_fields)%ptr => current_state%w
127 sizes(num_fields,:) = (/ 1, 1 /)
145 star_stencil = create_stencil(current_state%local_grid, fields, num_fields, 3, sizes, xdim, ydim)
146 allocate(
flux_y(current_state%global_grid%size(z_index)))
147 allocate(
flux_z(current_state%global_grid%size(z_index)))
148 allocate(
flux_x(current_state%global_grid%size(z_index)))
149 allocate(
u_advection(current_state%global_grid%size(z_index)),
v_advection(current_state%global_grid%size(z_index)), &
151 q_advection(current_state%global_grid%size(z_index), current_state%number_q_fields))
160 type(model_state_type),
target,
intent(inout) :: current_state
177 type(model_state_type),
target,
intent(inout) :: current_state
179 if (current_state%halo_column)
then 180 if (.not. ((current_state%column_local_y == current_state%local_grid%halo_size(y_index) .and. &
181 current_state%column_local_x .le. current_state%local_grid%local_domain_end_index(x_index) .and. &
182 current_state%column_local_x .ge. current_state%local_grid%local_domain_start_index(x_index)-1) .or. &
183 (current_state%column_local_x == current_state%local_grid%halo_size(x_index) .and. &
184 current_state%column_local_y .ge. current_state%local_grid%local_domain_start_index(y_index) &
185 .and. current_state%column_local_y .le. current_state%local_grid%local_domain_end_index(y_index)) ))
return 196 type(model_state_type),
intent(inout) :: current_state
198 real(kind=DEFAULT_PRECISION) :: dtm
200 dtm = current_state%dtm*2.0_default_precision
201 if (current_state%momentum_stepping == forward_stepping) dtm=current_state%dtm
204 call advect_u(current_state%column_local_y, current_state%column_local_x, dtm, current_state%u, &
205 current_state%v, current_state%w, current_state%zu, current_state%su, current_state%global_grid, &
206 current_state%local_grid, current_state%parallel, current_state%halo_column, current_state%field_stepping)
210 call advect_v(current_state%column_local_y, current_state%column_local_x, dtm, current_state%u, &
211 current_state%v, current_state%w, current_state%zv, current_state%sv, current_state%global_grid, &
212 current_state%local_grid, current_state%parallel, current_state%halo_column, current_state%field_stepping)
216 call advect_w(current_state%column_local_y, current_state%column_local_x, dtm, current_state%u, &
217 current_state%v, current_state%w, current_state%zw, current_state%sw, current_state%global_grid,&
218 current_state%local_grid, current_state%parallel, current_state%halo_column, current_state%field_stepping)
225 type(model_state_type),
intent(inout) :: current_state
228 real(kind=DEFAULT_PRECISION) :: dtm
230 dtm = current_state%dtm*2.0_default_precision
231 if (current_state%scalar_stepping == forward_stepping) dtm=current_state%dtm
233 do i=1,current_state%number_q_fields
234 if (current_state%q(i)%active)
then 235 call advect_scalar_field(current_state%column_local_y, current_state%column_local_x, dtm, current_state%u, &
236 current_state%v, current_state%w, current_state%zq(i), current_state%q(i), current_state%sq(i), &
237 current_state%global_grid, current_state%local_grid, current_state%parallel, &
238 current_state%halo_column, current_state%field_stepping)
239 q_advection(:,i)=current_state%sq(i)%data(:, current_state%column_local_y, current_state%column_local_x)
247 type(model_state_type),
intent(inout) :: current_state
249 real(kind=DEFAULT_PRECISION) :: dtm
251 dtm = current_state%dtm*2.0_default_precision
252 if (current_state%scalar_stepping == forward_stepping) dtm=current_state%dtm
254 if (current_state%th%active)
then 255 call advect_scalar_field(current_state%column_local_y, current_state%column_local_x, dtm, current_state%u,&
256 current_state%v, current_state%w, current_state%zth, current_state%th, current_state%sth, current_state%global_grid,&
257 current_state%local_grid, current_state%parallel, current_state%halo_column, current_state%field_stepping)
258 th_advection=current_state%sth%data(:, current_state%column_local_y, current_state%column_local_x)
263 subroutine advect_scalar_field(y_local_index, x_local_index, dt, u, v, w, z_q_field, q_field, source_field, &
264 global_grid, local_grid, parallel, halo_column, field_stepping)
266 integer,
intent(in) ::y_local_index, x_local_index, field_stepping
267 real(kind=DEFAULT_PRECISION),
intent(in) ::dt
268 logical,
intent(in) :: halo_column
269 type(prognostic_field_type),
intent(inout) :: u, w, v, z_q_field, q_field, source_field
270 type(global_grid_type),
intent(inout) :: global_grid
271 type(local_grid_type),
intent(inout) :: local_grid
272 type(parallel_state_type),
intent(inout) :: parallel
274 if (.not.
allocated(q_field%flux_previous_x))
allocate(q_field%flux_previous_x(local_grid%size(z_index), &
275 local_grid%size(y_index)+4))
276 if (.not.
allocated(q_field%flux_previous_y))
allocate(q_field%flux_previous_y(local_grid%size(z_index)))
280 if (field_stepping == forward_stepping)
then 281 call ultflx(y_local_index, x_local_index, u, v, w, y_local_index, x_local_index, q_field, local_grid, &
282 global_grid%configuration, parallel, 0, dt, &
283 flux_y,
flux_z,
flux_x, q_field%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz,&
284 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
286 call ultflx(y_local_index, x_local_index, u, v, w, y_local_index, x_local_index, z_q_field, local_grid, &
287 global_grid%configuration, parallel, 0, dt, &
288 flux_y,
flux_z,
flux_x, q_field%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz,&
289 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
294 if (.not. halo_column)
then 296 local_grid, global_grid, q_field%flux_previous_y, q_field%flux_previous_x(:,y_local_index), &
297 global_grid%configuration%vertical%tzc1, global_grid%configuration%vertical%tzc2, .true.)
300 if (y_local_index .lt. local_grid%local_domain_end_index(y_index)) q_field%flux_previous_y(:) =
flux_y(:)
306 subroutine advect_u(y_local_index, x_local_index, dt, u, v, w, zf, su, global_grid, local_grid, parallel, &
307 halo_column, field_stepping)
309 integer,
intent(in) :: y_local_index, x_local_index, field_stepping
310 real(kind=DEFAULT_PRECISION),
intent(in) ::dt
311 logical,
intent(in) :: halo_column
312 type(prognostic_field_type),
intent(inout) :: u, w, v, zf, su
313 type(global_grid_type),
intent(inout) :: global_grid
314 type(local_grid_type),
intent(inout) :: local_grid
315 type(parallel_state_type),
intent(inout) :: parallel
317 if (.not.
allocated(u%flux_previous_x))
allocate(u%flux_previous_x(local_grid%size(z_index), local_grid%size(y_index)+4))
318 if (.not.
allocated(u%flux_previous_y))
allocate(u%flux_previous_y(local_grid%size(z_index)))
324 if (field_stepping == forward_stepping)
then 328 u%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz, &
329 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
335 u%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz, &
336 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
341 if (.not. halo_column)
then 344 u%flux_previous_y, u%flux_previous_x(:,y_local_index), &
345 global_grid%configuration%vertical%tzc1, global_grid%configuration%vertical%tzc2, .true.)
346 u_advection=su%data(:, y_local_index, x_local_index)
349 if (y_local_index .lt. local_grid%local_domain_end_index(y_index)) u%flux_previous_y(:) =
flux_y(:)
355 subroutine advect_v(y_local_index, x_local_index, dt, u, v, w, zf, sv, global_grid, local_grid, parallel, &
356 halo_column, field_stepping)
358 integer,
intent(in) ::y_local_index, x_local_index, field_stepping
359 real(kind=DEFAULT_PRECISION),
intent(in) ::dt
360 logical,
intent(in) :: halo_column
361 type(prognostic_field_type),
intent(inout) :: u, w, v, zf, sv
362 type(global_grid_type),
intent(inout) :: global_grid
363 type(local_grid_type),
intent(inout) :: local_grid
364 type(parallel_state_type),
intent(inout) :: parallel
366 if (.not.
allocated(v%flux_previous_x))
allocate(v%flux_previous_x(local_grid%size(z_index), local_grid%size(y_index)+4))
367 if (.not.
allocated(v%flux_previous_y))
allocate(v%flux_previous_y(local_grid%size(z_index)))
373 if (field_stepping == forward_stepping)
then 377 v%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz, &
378 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
384 v%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdz, &
385 global_grid%configuration%vertical%rdzn, global_grid%configuration%vertical%dzn, 2, local_grid%size(z_index))
390 if (.not. halo_column)
then 393 v%flux_previous_y, v%flux_previous_x(:,y_local_index), &
394 global_grid%configuration%vertical%tzc1, global_grid%configuration%vertical%tzc2, .true.)
395 v_advection=sv%data(:, y_local_index, x_local_index)
398 if (y_local_index .lt. local_grid%local_domain_end_index(y_index)) v%flux_previous_y(:) =
flux_y(:)
404 subroutine advect_w(y_local_index, x_local_index, dt, u, v, w, zf, sw, global_grid, local_grid, parallel, &
405 halo_column, field_stepping)
407 integer,
intent(in) ::y_local_index, x_local_index, field_stepping
408 real(kind=DEFAULT_PRECISION),
intent(in) ::dt
409 logical,
intent(in) :: halo_column
410 type(prognostic_field_type),
intent(inout) :: u, w, v, zf, sw
411 type(global_grid_type),
intent(inout) :: global_grid
412 type(local_grid_type),
intent(inout) :: local_grid
413 type(parallel_state_type),
intent(inout) :: parallel
415 if (.not.
allocated(w%flux_previous_x))
allocate(w%flux_previous_x(local_grid%size(z_index), local_grid%size(y_index)+4))
416 if (.not.
allocated(w%flux_previous_y))
allocate(w%flux_previous_y(local_grid%size(z_index)))
422 if (field_stepping == forward_stepping)
then 426 w%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdzn, &
427 global_grid%configuration%vertical%rdz, global_grid%configuration%vertical%dz, 1, local_grid%size(z_index)-1)
433 w%flux_previous_x(:,y_local_index), global_grid%configuration%vertical%rdzn, &
434 global_grid%configuration%vertical%rdz, global_grid%configuration%vertical%dz, 1, local_grid%size(z_index)-1)
439 if (.not. halo_column)
then 442 w%flux_previous_y, w%flux_previous_x(:,y_local_index),&
443 global_grid%configuration%vertical%tzd1, global_grid%configuration%vertical%tzd2, .false.)
444 w_advection=sw%data(:, y_local_index, x_local_index)
446 if (y_local_index .lt. local_grid%local_domain_end_index(y_index)) w%flux_previous_y(:) =
flux_y(:)
452 subroutine differentiate_face_values(y_flow_index, x_flow_index, u, v, w, y_source_index, x_source_index, source_field, &
453 local_grid, global_grid, flux_y_previous, flux_x_previous, tzc1, tzc2, differentiate_top)
455 integer,
intent(in) :: y_flow_index, x_flow_index, y_source_index, x_source_index
456 logical,
intent(in) :: differentiate_top
457 real(kind=DEFAULT_PRECISION),
intent(in),
dimension(*) :: tzc1, tzc2
458 type(prognostic_field_type),
intent(inout) :: u, w, v
459 type(prognostic_field_type),
intent(inout) :: source_field
460 type(global_grid_type),
intent(inout) :: global_grid
461 type(local_grid_type),
intent(inout) :: local_grid
462 real(kind=DEFAULT_PRECISION),
intent(in),
dimension(:) :: flux_y_previous, flux_x_previous
466 do k=2,local_grid%size(z_index)-1
468 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
469 (v%data(k, y_flow_index-1, x_flow_index)* flux_y_previous(k) - v%data(k, y_flow_index, x_flow_index)*
flux_y(k))*&
470 global_grid%configuration%horizontal%cy
473 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
474 4.0_default_precision*(w%data(k-1, y_flow_index, x_flow_index)*
flux_z(k)*tzc1(k) - &
475 w%data(k, y_flow_index, x_flow_index)*
flux_z(k+1)*tzc2(k))
478 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
479 (u%data(k, y_flow_index, x_flow_index-1)*
flux_x(k) - u%data(k, y_flow_index, x_flow_index)*flux_x_previous(k))*&
480 global_grid%configuration%horizontal%cx
483 if (differentiate_top)
then 484 k=local_grid%size(z_index)
485 source_field%data(k, y_source_index, x_source_index)=0.0_default_precision
487 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
488 (v%data(k, y_flow_index-1, x_flow_index)* flux_y_previous(k) - v%data(k, y_flow_index, x_flow_index)*
flux_y(k))*&
489 global_grid%configuration%horizontal%cy
492 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
493 4.0_default_precision*tzc1(k)* w%data(k-1, y_flow_index, x_flow_index)*
flux_z(k)
496 source_field%data(k, y_source_index, x_source_index)=source_field%data(k, y_source_index, x_source_index)+&
497 (u%data(k, y_flow_index, x_flow_index-1)*
flux_x(k) -u%data(k, y_flow_index, x_flow_index)*flux_x_previous(k))*&
498 global_grid%configuration%horizontal%cx
509 integer,
intent(in) :: y_local_index
510 type(prognostic_field_type),
intent(inout) :: field
511 type(parallel_state_type),
intent(inout) :: parallel
512 type(local_grid_type),
intent(inout) :: local_grid
516 if (y_local_index == local_grid%local_domain_end_index(y_index) .and. parallel%my_coords(y_index) == 0 .and. &
517 field%async_flux_handle .ne. mpi_request_null)
then 518 call mpi_wait(field%async_flux_handle, mpi_status_ignore, ierr)
532 integer,
intent(in) :: y_local_index
533 type(prognostic_field_type),
intent(inout) :: field
534 type(parallel_state_type),
intent(inout) :: parallel
535 type(local_grid_type),
intent(inout) :: local_grid
539 if (y_local_index == local_grid%local_domain_start_index(y_index)-1 .and. parallel%my_coords(y_index) == 0)
then 540 if (.not.
allocated(field%flux_y_buffer))
allocate(field%flux_y_buffer(local_grid%size(z_index)))
541 field%flux_y_buffer(:) =
flux_y(:)
542 if (parallel%my_rank .ne. local_grid%neighbours(y_index,1))
then 543 call mpi_isend(field%flux_y_buffer, local_grid%size(z_index), precision_type, local_grid%neighbours(y_index,1), 0, &
544 parallel%neighbour_comm, field%async_flux_handle, ierr)
556 integer,
intent(in) :: y_local_index
557 type(prognostic_field_type),
intent(inout) :: field
558 type(parallel_state_type),
intent(inout) :: parallel
559 type(local_grid_type),
intent(inout) :: local_grid
563 if (y_local_index == local_grid%local_domain_end_index(y_index) .and. parallel%my_coords(y_index) == &
564 parallel%dim_sizes(y_index)-1)
then 565 if (field%async_flux_handle .ne. mpi_request_null)
then 566 call mpi_wait(field%async_flux_handle, mpi_status_ignore, ierr)
568 flux_y(:) = field%flux_y_buffer(:)
581 integer,
intent(in) :: y_local_index
582 type(prognostic_field_type),
intent(inout) :: field
583 type(parallel_state_type),
intent(inout) :: parallel
584 type(local_grid_type),
intent(inout) :: local_grid
588 if (y_local_index == local_grid%local_domain_start_index(y_index) .and. parallel%my_coords(y_index) == &
589 parallel%dim_sizes(y_index)-1)
then 590 if (parallel%my_rank .ne. local_grid%neighbours(y_index,3))
then 591 if (.not.
allocated(field%flux_y_buffer))
allocate(field%flux_y_buffer(local_grid%size(z_index)))
592 call mpi_irecv(field%flux_y_buffer, local_grid%size(z_index), precision_type, local_grid%neighbours(y_index,3), 0, &
593 parallel%neighbour_comm, field%async_flux_handle, ierr)
603 character(len=*),
intent(in) :: field
605 if (len_trim(field) .ne. 0)
then 606 if (trim(field) .eq.
"tvd" .or. trim(field) .eq.
"any")
then integer, public precision_type
A pointer to the prognostic field. This is so we can wrap prognostics up in an array and still refer ...
Wrapper type for the value returned for a published field from a component.
subroutine differentiate_face_values(y_flow_index, x_flow_index, u, v, w, y_source_index, x_source_index, source_field, local_grid, global_grid, flux_y_previous, flux_x_previous, tzc1, tzc2, differentiate_top)
Differentiates face values to update the source field.
subroutine initialisation_callback(current_state)
Sets up the stencil_mod (used in interpolation) and allocates data for the flux fields.
integer, parameter, public forward_stepping
subroutine advect_flow_fields(current_state)
Will advect the flow fields.
subroutine field_value_retrieval_callback(current_state, name, field_value)
Field value retrieval callback, this returns the value of a specific published field.
character(len=string_length) function, public options_get_string(options_database, key, index)
Retrieves a string value from the database that matches the provided key.
Contains prognostic field definitions and functions.
subroutine advect_w(y_local_index, x_local_index, dt, u, v, w, zf, sw, global_grid, local_grid, parallel, halo_column, field_stepping)
Advects the W flow field.
A prognostic field which is assumed to be 3D.
subroutine, public interpolate_to_dual(local_grid, field, stencil, x, y, interpolated_fields, interpolation_id)
Interpolates the (vector) flow fields from the primal to dual grid based upon a specific field interp...
subroutine finalisation_callback(current_state)
Frees up the memory associated with the advection.
subroutine register_y_flux_wrap_recv_if_required(y_local_index, field, parallel, local_grid)
Registers an MPI asynchronous receive for the flux if required.
real(kind=default_precision), dimension(:), allocatable u_advection
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.
logical function determine_if_advection_here(field)
Parses a field string (read in from the configuration file) and determines whether this algorithm sho...
real(kind=default_precision), dimension(:), allocatable flux_z
real(kind=default_precision), dimension(:), allocatable flux_y
Information about the parallel aspects of the system.
real(kind=default_precision), dimension(:,:), allocatable q_advection
Contains common definitions for the data and datatypes used by MONC.
The ModelState which represents the current state of a run.
Calculates the effective face values for advection using Leonard's ultimate quickest scheme with firs...
subroutine timestep_callback(current_state)
Timestep callback hook which performs the TVD advection for each prognostic field.
Description of a component.
subroutine advect_scalar_field(y_local_index, x_local_index, dt, u, v, w, z_q_field, q_field, source_field, global_grid, local_grid, parallel, halo_column, field_stepping)
Advects a single scalar field.
subroutine, public ultflx(y_flow_index, x_flow_index, u, v, w, y_scalar_index, x_scalar_index, zf, local_grid, grid_config, parallel, kdof, dt, flux_y, flux_z, flux_x, flux_previous_x, rdz, rdzn, dzn, kmin, kmax)
type(grid_stencil_type), save star_stencil
real(kind=default_precision), dimension(:), allocatable flux_x
integer, parameter, public component_array_field_type
subroutine complete_y_flux_wrap_recv_if_required(y_local_index, field, parallel, local_grid)
Completes the Y flux MPI asynchronous recieve if required. If the wrap around process is the same (on...
real(kind=default_precision), dimension(:), allocatable th_advection
Map data structure that holds string (length 20 maximum) key value pairs.
subroutine field_information_retrieval_callback(current_state, name, field_information)
Field information retrieval callback, this returns information for a specific components published fi...
real(kind=default_precision), dimension(:), allocatable v_advection
subroutine complete_y_flux_wrap_send_if_required(y_local_index, field, parallel, local_grid)
Completes the Y flux MPI asynchronous send if required.
Interfaces and types that MONC components must specify.
Defined the local grid, i.e. the grid held on this process after decomposition.
Collection data structures.
Performs the interpolation between the primal and dual grids via a stencil approach. For performance reasons, for each field we store the entirety of the y dimension and the number of x slices required by the stencil. Therefore a new interpolation is simply the calculation of one point and reuse of existing computed points (unless this is the first x or y.) The applicable interpolation stenciled data is copied out, with :,1,1 being the central point, minus and plus in each y and x dimension as determined by the stencil size. This is done so that the stencil size can easily be different for each flow field and this is the case with u (where we need u-2 in the X.)
subroutine advect_u(y_local_index, x_local_index, dt, u, v, w, zf, su, global_grid, local_grid, parallel, halo_column, field_stepping)
Advects the U flow field.
type(prognostic_field_type), dimension(:), allocatable interpolated_fields
subroutine register_y_flux_wrap_send_if_required(y_local_index, field, parallel, local_grid)
Registers an asynchronous send for the Y flux if required.
subroutine advect_v(y_local_index, x_local_index, dt, u, v, w, zf, sv, global_grid, local_grid, parallel, halo_column, field_stepping)
Advects the V flow field.
Functionality to support the different types of grid and abstraction between global grids and local o...
Configuration for a specific stencil interpolation to perform.
Manages the options database. Contains administration functions and deduce runtime options from the c...
type(component_descriptor_type) function, public tvdadvection_get_descriptor()
Provides a description of this component for the core to register.
real(kind=default_precision), dimension(:), allocatable w_advection
subroutine advect_q_fields(current_state)
Advects the Q fields.
subroutine, public free_stencil(stencil)
Frees up the memory allocated to a stencil.
Implements TVD advection for prognostic fields.
The model state which represents the current state of a run.
integer, parameter, public y_index
integer, parameter, public x_index
type(grid_stencil_type) function, public create_stencil(local_grid, fields, nfields, interpolations_to_perform, sizes, xdim, ydim)
Creates a stencil configuration which will then be used for interpolation.
subroutine advect_theta(current_state)
Advects the theta field if it is active.
integer, parameter, public component_double_data_type