FMS 2025.01-dev
Flexible Modeling System
|
Performs spatial interpolation between grids using conservative interpolation. More...
Data Types | |
interface | horiz_interp_conserve_new |
Allocates space and initializes a derived-type variable that contains pre-computed interpolation indices and weights. More... | |
Functions/Subroutines | |
subroutine | data_sum_ (grid_data, area, facis, facie, facjs, facje, dwtsum, wtsum, arsum, mask) |
sums up the data and weights for a single output grid box | |
subroutine | horiz_interp_conserve_ (interp, data_in, data_out, verbose, mask_in, mask_out) |
Subroutine for performing the horizontal interpolation between two grids. | |
subroutine, public | horiz_interp_conserve_del (interp) |
Deallocates memory used by "HI_KIND_TYPE" variables. Must be called before reinitializing with horiz_interp_new. | |
subroutine, public | horiz_interp_conserve_init |
Writes version number to logfile. | |
subroutine | horiz_interp_conserve_new_1dx1d_ (interp, lon_in, lat_in, lon_out, lat_out, verbose) |
subroutine | horiz_interp_conserve_new_1dx2d_ (interp, lon_in, lat_in, lon_out, lat_out, mask_in, mask_out, verbose) |
subroutine | horiz_interp_conserve_new_2dx1d_ (interp, lon_in, lat_in, lon_out, lat_out, mask_in, mask_out, verbose) |
subroutine | horiz_interp_conserve_new_2dx2d_ (interp, lon_in, lat_in, lon_out, lat_out, mask_in, mask_out, verbose) |
subroutine | horiz_interp_conserve_version1_ (interp, data_in, data_out, verbose, mask_in, mask_out) |
subroutine | horiz_interp_conserve_version2_ (interp, data_in, data_out, verbose) |
subroutine | stats_ (dat, area, asum, dsum, wsum, low, high, miss, mask) |
This statistics is for conservative scheme. | |
Variables | |
logical | great_circle_algorithm = .false. |
logical | module_is_initialized = .FALSE. |
integer | pe |
integer | root_pe |
Performs spatial interpolation between grids using conservative interpolation.
This module can conservatively interpolate data from any logically rectangular grid to any rectangular grid. The interpolation scheme is area-averaging conservative scheme. There is an optional mask field for missing input data in both horiz_interp__conserveinit and horiz_interp_conserve. For efficiency purpose, mask should only be kept in horiz_interp_init (will remove the mask in horiz_interp in the future). There are 1-D and 2-D version of horiz_interp_conserve_init for 1-D and 2-D grid. There is a optional argument mask in horiz_interp_conserve_init_2d and no mask should to passed into horiz_interp_conserv. optional argument mask will not be passed into horiz_interp_conserve_init_1d and optional argument mask may be passed into horiz_interp_conserve (For the purpose of reproduce Memphis??? results). An optional output mask field may be used in conjunction with the input mask to show where output data exists.
interface horiz_interp_conserve_mod::horiz_interp_conserve_new |
Allocates space and initializes a derived-type variable that contains pre-computed interpolation indices and weights.
Allocates space and initializes a derived-type variable that contains pre-computed interpolation indices and weights for improved performance of multiple interpolations between the same grids.
lon_in | Longitude (in radians) for source data grid. |
lat_in | Latitude (in radians) for source data grid. |
lon_out | Longitude (in radians) for destination data grid. |
lat_out | Latitude (in radians) for destination data grid. |
verbose | flag for the amount of print output. |
mask_in | Input mask. must be the size (size(lon_in)-1, size(lon. The real value of mask_in must be in the range (0.,1.). Set mask_in=0.0 for data points that should not be used or have missing data. |
mask_out | Output mask that specifies whether data was computed. |
Interp | A derived-type variable containing indices and weights used for subsequent interpolations. To reinitialize this variable for a different grid-to-grid interpolation you must first use the "horiz_interp_del" interface. |
Definition at line 92 of file horiz_interp_conserve.F90.
subroutine data_sum_ | ( | real(fms_hi_kind_), dimension(:,:), intent(in) | grid_data, |
real(fms_hi_kind_), dimension(:,:), intent(in) | area, | ||
real(fms_hi_kind_), intent(in) | facis, | ||
real(fms_hi_kind_), intent(in) | facie, | ||
real(fms_hi_kind_), intent(in) | facjs, | ||
real(fms_hi_kind_), intent(in) | facje, | ||
real(fms_hi_kind_), intent(inout) | dwtsum, | ||
real(fms_hi_kind_), intent(inout) | wtsum, | ||
real(fms_hi_kind_), intent(inout) | arsum, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask | ||
) |
sums up the data and weights for a single output grid box
Definition at line 896 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_ | ( | type (horiz_interp_type), intent(in) | interp, |
real(fms_hi_kind_), dimension(:,:), intent(in) | data_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(out) | data_out, | ||
integer, intent(in), optional | verbose, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(out), optional | mask_out | ||
) |
Subroutine for performing the horizontal interpolation between two grids.
Subroutine for performing the horizontal interpolation between two grids. horiz_interp_conserve_new must be called before calling this routine.
[in] | data_in | Input data on source grid |
[out] | data_out | Output data on destination grid |
[in] | verbose | 0 = no output; 1 = min,max,means; 2 = max output |
[in] | mask_in | Input mask, must be the same size as the input data. The real value of mask_in must be in the range (0.,1.). Set mask_in=0.0 for data points that should not be used or have missing data. mask_in will be applied only when horiz_interp_conserve_new_1d is called. mask_in will be passed into horiz_interp_conserve_new_2d |
[out] | mask_out | Output mask that specifies whether data was computed. mask_out will be computed only when horiz_interp_conserve_new_1d is called. mask_out will be computed in horiz_interp_conserve_new_2d |
Definition at line 623 of file horiz_interp_conserve.inc.
subroutine, public horiz_interp_conserve_del | ( | type (horiz_interp_type), intent(inout) | interp | ) |
Deallocates memory used by "HI_KIND_TYPE" variables. Must be called before reinitializing with horiz_interp_new.
[in,out] | interp | A derived-type variable returned by previous call to horiz_interp_new. The input variable must have allocated arrays. The returned variable will contain deallocated arrays. |
Definition at line 160 of file horiz_interp_conserve.F90.
subroutine, public horiz_interp_conserve_init |
Writes version number to logfile.
Definition at line 147 of file horiz_interp_conserve.F90.
subroutine horiz_interp_conserve_new_1dx1d_ | ( | type(horiz_interp_type), intent(inout) | interp, |
real(fms_hi_kind_), dimension(:), intent(in) | lon_in, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lat_in, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lon_out, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lat_out, | ||
integer, intent(in), optional | verbose | ||
) |
Definition at line 21 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_new_1dx2d_ | ( | type(horiz_interp_type), intent(inout) | interp, |
real(fms_hi_kind_), dimension(:), intent(in) | lon_in, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lat_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lon_out, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lat_out, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(inout), optional | mask_out, | ||
integer, intent(in), optional | verbose | ||
) |
Definition at line 225 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_new_2dx1d_ | ( | type(horiz_interp_type), intent(inout) | interp, |
real(fms_hi_kind_), dimension(:,:), intent(in) | lon_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lat_in, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lon_out, | ||
real(fms_hi_kind_), dimension(:), intent(in) | lat_out, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(inout), optional | mask_out, | ||
integer, intent(in), optional | verbose | ||
) |
Definition at line 397 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_new_2dx2d_ | ( | type(horiz_interp_type), intent(inout) | interp, |
real(fms_hi_kind_), dimension(:,:), intent(in) | lon_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lat_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lon_out, | ||
real(fms_hi_kind_), dimension(:,:), intent(in) | lat_out, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(inout), optional | mask_out, | ||
integer, intent(in), optional | verbose | ||
) |
Definition at line 509 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_version1_ | ( | type (horiz_interp_type), intent(in) | interp, |
real(fms_hi_kind_), dimension(:,:), intent(in) | data_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(out) | data_out, | ||
integer, intent(in), optional | verbose, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(out), optional | mask_out | ||
) |
Definition at line 660 of file horiz_interp_conserve.inc.
subroutine horiz_interp_conserve_version2_ | ( | type (horiz_interp_type), intent(in) | interp, |
real(fms_hi_kind_), dimension(:,:), intent(in) | data_in, | ||
real(fms_hi_kind_), dimension(:,:), intent(out) | data_out, | ||
integer, intent(in), optional | verbose | ||
) |
Definition at line 809 of file horiz_interp_conserve.inc.
subroutine stats_ | ( | real(fms_hi_kind_), dimension(:,:), intent(in) | dat, |
real(fms_hi_kind_), dimension(:,:), intent(in) | area, | ||
real(fms_hi_kind_), intent(out) | asum, | ||
real(fms_hi_kind_), intent(out) | dsum, | ||
real(fms_hi_kind_), intent(out) | wsum, | ||
real(fms_hi_kind_), intent(out) | low, | ||
real(fms_hi_kind_), intent(out) | high, | ||
integer, intent(out) | miss, | ||
real(fms_hi_kind_), dimension(:,:), intent(in), optional | mask | ||
) |
This statistics is for conservative scheme.
Definition at line 830 of file horiz_interp_conserve.inc.
|
private |
Definition at line 142 of file horiz_interp_conserve.F90.
|
private |
Definition at line 140 of file horiz_interp_conserve.F90.
|
private |
Definition at line 136 of file horiz_interp_conserve.F90.
|
private |
Definition at line 136 of file horiz_interp_conserve.F90.