FMS  2026.01.01-dev
Flexible Modeling System
horiz_interp_conserve_mod

Data Types

interface  data_sum
 Internally used generic interface when interpolating data with Interp generated from horiz_interp_new_1dx1d_r*. Not frequently used. More...
 
interface  horiz_interp_conserve
 Generic interface to interpolate data from source grid to target grid from the weights stored in Interp. Calls horiz_interp_conserve_r4 if input and output data are 2D arrays in 32-bit precision. Calls horiz_interp_conserve_r8 if input and output data are 2D arrays in 64-bit precision. Horiz_interp_conserve_r* will subsequently call horiz_interp_conserve_version1 or horiz_interp_conserve_version2 depending on value of Interpversion. More...
 
interface  horiz_interp_conserve_version1
 Generic inteface called from horiz_interp_conserve to interpolate data using Interp populated from horiz_interp_new_1dx1d_r*. More...
 
interface  horiz_interp_conserve_version2
 Generic interface called from horiz_interp_conserve to interpolate 2d data. Calls horiz_interp_conserve_version2_r4 when data are 2D arrays in 32-bit precision. Calls horiz_interp_conserve_version2_r8 when data are 2D arrays in 64-bit precision. More...
 
interface  stats
 Internally used generic interface when interpolating data with Interp generated from horiz_interp_new_1dx1d_r*. Not frequently used. More...
 

Functions/Subroutines

int create_xgrid_1dx2d_order1_ (const int *nlon_in, const int *nlat_in, const int *nlon_out, const int *nlat_out, const double *lon_in, const double *lat_in, const double *lon_out, const double *lat_out, const double *mask_in, int *i_in, int *j_in, int *i_out, int *j_out, double *xgrid_area)
 Functions to compute the exchange grid.
 
 data_sum_r4
 
 data_sum_r8
 
subroutine, public horiz_interp_conserve_del (Interp)
 
subroutine, public horiz_interp_conserve_init
 
 horiz_interp_conserve_new_1dx1d_r4
 
 horiz_interp_conserve_new_1dx1d_r8
 
 horiz_interp_conserve_new_1dx2d_r4
 
 horiz_interp_conserve_new_1dx2d_r8
 
 horiz_interp_conserve_new_2dx1d_r4
 
 horiz_interp_conserve_new_2dx1d_r8
 
 horiz_interp_conserve_new_2dx2d_r4
 
 horiz_interp_conserve_new_2dx2d_r8
 
 horiz_interp_conserve_r4
 
 horiz_interp_conserve_r8
 
 horiz_interp_conserve_version1_r4
 
 horiz_interp_conserve_version1_r8
 
 horiz_interp_conserve_version2_r4
 
 horiz_interp_conserve_version2_r8
 
 stats_r4
 
 stats_r8
 

Variables

logical great_circle_algorithm = .false.
 turns on the great_circle_algorithm to compute grid cell areas.
 
logical module_is_initialized = .FALSE.
 is a flag to prevent module re-initialization.
 
integer pe
 is the current pe
 
integer root_pe
 is the root_pe
 

Detailed Description

Author
Bruce Wyman, Zhi Liang
Horiz_interp_conserve_mod contains methods called from horiz_interp_mod to interpolate data on any logically rectangular grid to any rectangular grid with order 1 conservative method. Users are recommended to use the top-level module horiz_interp_mod with "interp" set to "conservative for conservative interpolation.

Data Type Documentation

◆ horiz_interp_conserve_mod::data_sum

interface horiz_interp_conserve_mod::data_sum

Internally used generic interface when interpolating data with Interp generated from horiz_interp_new_1dx1d_r*. Not frequently used.

Definition at line 90 of file horiz_interp_conserve.F90.

Private Member Functions

 data_sum_r4
 
 data_sum_r8
 

◆ horiz_interp_conserve_mod::horiz_interp_conserve

interface horiz_interp_conserve_mod::horiz_interp_conserve

Generic interface to interpolate data from source grid to target grid from the weights stored in Interp. Calls horiz_interp_conserve_r4 if input and output data are 2D arrays in 32-bit precision. Calls horiz_interp_conserve_r8 if input and output data are 2D arrays in 64-bit precision. Horiz_interp_conserve_r* will subsequently call horiz_interp_conserve_version1 or horiz_interp_conserve_version2 depending on value of Interpversion.

Definition at line 83 of file horiz_interp_conserve.F90.

Private Member Functions

 horiz_interp_conserve_r4
 
 horiz_interp_conserve_r8
 

◆ horiz_interp_conserve_mod::horiz_interp_conserve_version1

interface horiz_interp_conserve_mod::horiz_interp_conserve_version1

Generic inteface called from horiz_interp_conserve to interpolate data using Interp populated from horiz_interp_new_1dx1d_r*.

Definition at line 104 of file horiz_interp_conserve.F90.

Private Member Functions

 horiz_interp_conserve_version1_r4
 
 horiz_interp_conserve_version1_r8
 

◆ horiz_interp_conserve_mod::horiz_interp_conserve_version2

interface horiz_interp_conserve_mod::horiz_interp_conserve_version2

Generic interface called from horiz_interp_conserve to interpolate 2d data. Calls horiz_interp_conserve_version2_r4 when data are 2D arrays in 32-bit precision. Calls horiz_interp_conserve_version2_r8 when data are 2D arrays in 64-bit precision.

Definition at line 113 of file horiz_interp_conserve.F90.

Private Member Functions

 horiz_interp_conserve_version2_r4
 
 horiz_interp_conserve_version2_r8
 

◆ horiz_interp_conserve_mod::stats

interface horiz_interp_conserve_mod::stats

Internally used generic interface when interpolating data with Interp generated from horiz_interp_new_1dx1d_r*. Not frequently used.

Definition at line 97 of file horiz_interp_conserve.F90.

Private Member Functions

 stats_r4
 
 stats_r8
 

Function/Subroutine Documentation

◆ horiz_interp_conserve_del()

subroutine, public horiz_interp_conserve_mod::horiz_interp_conserve_del ( type (horiz_interp_type), intent(inout)  Interp)
Deallocates arrays holding conservative order 1 interpolation weights and mapping indices in Interp. Resets is_allocated to .false. Called from horiz_interp_del in horiz_interp_mod.
Parameters
[in,out]interpwill be reset with deallocated memory

Definition at line 150 of file horiz_interp_conserve.F90.

◆ horiz_interp_conserve_init()

subroutine, public horiz_interp_conserve_mod::horiz_interp_conserve_init
Initializes horiz_interp_conserve_mod. Called from horiz_interp_init in horiz_interp_mod.

Definition at line 135 of file horiz_interp_conserve.F90.