MONC
|
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.) More...
Data Types | |
type | grid_stencil_type |
Configuration for a specific stencil interpolation to perform. More... | |
Functions/Subroutines | |
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. More... | |
subroutine, public | free_stencil (stencil) |
Frees up the memory allocated to a stencil. More... | |
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 interpolation. More... | |
subroutine | calculate_interpolated_cell_value (local_grid, j, i, interpolate_in_dimension, field, column_stencil_values) |
Calculates the interpolated values for each point in a column. The exact method of interpolation depends on whether we are interpolating in the w, y or x dimension. More... | |
subroutine | copy_interpolated_to_prognostic (interpolated_fields, stencil, local_grid, x, y, interpolation_id) |
Copies stencil number of interpolated values from the store used by this functionality to preallocated prognostics. THe central point is always :,1,1 in the prognostic, with negative and in the x and y. More... | |
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.)
|
private |
Calculates the interpolated values for each point in a column. The exact method of interpolation depends on whether we are interpolating in the w, y or x dimension.
local_grid | The local grid |
j | Current local index in the y dimension |
i | Current local index in the x dimension |
interpolate_in_dimension | Which dimensions to interpolate in |
field | The field to interpolate from |
column_stencil_values | The result of the interpolation for the specific column |
Definition at line 147 of file stencil.F90.
|
private |
Copies stencil number of interpolated values from the store used by this functionality to preallocated prognostics. THe central point is always :,1,1 in the prognostic, with negative and in the x and y.
interpolated_fields | The interpolated field prognostics that will be updated |
stencil | The stencil configuration |
local_grid | Local grid |
x | Local x index of this column |
y | Local y index of this column |
interpolation_id | The ID of this interpolation which is used to retrieve information from the stencil configuration |
Definition at line 179 of file stencil.F90.
type(grid_stencil_type) function, public stencil_mod::create_stencil | ( | type(local_grid_type), intent(inout) | local_grid, |
type(prognostic_field_ptr_type), dimension(:), intent(inout) | fields, | ||
integer, intent(in) | nfields, | ||
integer, intent(in) | interpolations_to_perform, | ||
integer, dimension(:,:), intent(in) | sizes, | ||
logical, intent(in) | xdim, | ||
logical, intent(in) | ydim | ||
) |
Creates a stencil configuration which will then be used for interpolation.
local_grid | The local grid |
fields | The fields to perform the interpolation upon |
nfields | The number of fields included in a specific interpolation |
interpolations_to_perform | The number of distinct interpolations that will be performed |
sizes | The size of the stencil, for each field, in X and Y dimensions |
xdim | Whether the X dimension is active |
ydim | Whether the Y dimension is active |
Definition at line 36 of file stencil.F90.
subroutine, public stencil_mod::free_stencil | ( | type(grid_stencil_type), intent(inout) | stencil | ) |
Frees up the memory allocated to a stencil.
stencil | The stencil that we will free up |
Definition at line 63 of file stencil.F90.
subroutine, public stencil_mod::interpolate_to_dual | ( | type(local_grid_type), intent(inout) | local_grid, |
type(prognostic_field_type), intent(inout) | field, | ||
type(grid_stencil_type), intent(inout) | stencil, | ||
integer, intent(in) | x, | ||
integer, intent(in) | y, | ||
type(prognostic_field_type), dimension(:), intent(inout), allocatable | interpolated_fields, | ||
integer, intent(in) | interpolation_id | ||
) |
Interpolates the (vector) flow fields from the primal to dual grid based upon a specific field interpolation.
local_grid | The local grid |
field | The field to base this interpolation upon |
stencil | Stencil configuration |
x | Local column index in X |
y | Local column index in Y |
interpolated_fields | Interpolated prognostics that this will write the output into, central (x,y) point is 1,1 |
interpolation_id | Id of the interpolation |
Definition at line 87 of file stencil.F90.