FMS  2026.01.01-dev
Flexible Modeling System
horiz_interp_bilinear_mod

Data Types

interface  horiz_interp_bilinear
 Generic interface to interpolate data from a source grid to target grid using the weights stored in Interp. Calls horiz_interp_bilinear_r4 if input and output data are 2D arrays in 32-bit precision. Calls horiz_interp_bilinear_r8 if input and output data are 2D arrays in 64-bit precision. More...
 
interface  horiz_interp_read_weights_bilinear
 Generic interface to populate Interp from a weight file generated from fregrid. Calls horiz_interp_read_weights_bilinear_r4 if grid arguments are provided as 32-bit precision. Calls horiz_interp_read_weights_bilienar_r8 if grid arguments are provided as 64-bit precision. More...
 
interface  intersect
 Generic interface used internally when finding nearest neighboring input cells for an output cell. Calls intersect_r4 when grid points are in 32-bit precision. Calls intersect_r8 when grid points are in 64-bit precision. More...
 

Functions/Subroutines

subroutine, public horiz_interp_bilinear_del (Interp)
 Deallocates memory used by "horiz_interp_type" variables. More...
 
subroutine, public horiz_interp_bilinear_init
 
 horiz_interp_bilinear_new_1d_r4
 
 horiz_interp_bilinear_new_1d_r8
 
 horiz_interp_bilinear_new_2d_r4
 
 horiz_interp_bilinear_new_2d_r8
 
 horiz_interp_bilinear_r4
 
 horiz_interp_bilinear_r8
 
 horiz_interp_read_weights_bilinear_r4
 
 horiz_interp_read_weights_bilinear_r8
 
 intersect_r4
 
 intersect_r8
 

Variables

integer, parameter dummy = -999
 is -999
 
real(r8_kind), parameter epsln =1.e-10_r8_kind
 is a really small number
 
real(r4_kind), parameter epsln_r4 =1.e-4_r4_kind
 is 0.0001
 
logical module_is_initialized = .FALSE.
 is a flag to prevent re-initialization
 

Detailed Description

Author
Zhi Liang Zhi.L.nosp@m.iang.nosp@m.@noaa.nosp@m..gov Horiz_interp_bilinear_mod contains methods called from horiz_interp_mod to interpolate data on a regular rectangular grid to a rectangular/tripolar grid. Users are recommened to use the top-level module horiz_interp_mod with "interp" set to "bilinear" for bilinear interpolation.

Data Type Documentation

◆ horiz_interp_bilinear_mod::horiz_interp_bilinear

interface horiz_interp_bilinear_mod::horiz_interp_bilinear

Generic interface to interpolate data from a source grid to target grid using the weights stored in Interp. Calls horiz_interp_bilinear_r4 if input and output data are 2D arrays in 32-bit precision. Calls horiz_interp_bilinear_r8 if input and output data are 2D arrays in 64-bit precision.

Definition at line 76 of file horiz_interp_bilinear.F90.

Private Member Functions

 horiz_interp_bilinear_r4
 
 horiz_interp_bilinear_r8
 

◆ horiz_interp_bilinear_mod::horiz_interp_read_weights_bilinear

interface horiz_interp_bilinear_mod::horiz_interp_read_weights_bilinear

Generic interface to populate Interp from a weight file generated from fregrid. Calls horiz_interp_read_weights_bilinear_r4 if grid arguments are provided as 32-bit precision. Calls horiz_interp_read_weights_bilienar_r8 if grid arguments are provided as 64-bit precision.

Definition at line 67 of file horiz_interp_bilinear.F90.

Private Member Functions

 horiz_interp_read_weights_bilinear_r4
 
 horiz_interp_read_weights_bilinear_r8
 

◆ horiz_interp_bilinear_mod::intersect

interface horiz_interp_bilinear_mod::intersect

Generic interface used internally when finding nearest neighboring input cells for an output cell. Calls intersect_r4 when grid points are in 32-bit precision. Calls intersect_r8 when grid points are in 64-bit precision.

Definition at line 88 of file horiz_interp_bilinear.F90.

Private Member Functions

 intersect_r4
 
 intersect_r8
 

Function/Subroutine Documentation

◆ horiz_interp_bilinear_del()

subroutine, public horiz_interp_bilinear_mod::horiz_interp_bilinear_del ( type (horiz_interp_type), intent(inout)  Interp)

Deallocates memory used by "horiz_interp_type" variables.

Must be called before reinitializing with horiz_interp_bilinear_new. Deallocates arrays holding bilinear 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 117 of file horiz_interp_bilinear.F90.

◆ horiz_interp_bilinear_init()

subroutine, public horiz_interp_bilinear_mod::horiz_interp_bilinear_init
Initializes horiz_interp_bilinear_mod. Called from horiz_interp_init in horiz_interp_mod.

Definition at line 101 of file horiz_interp_bilinear.F90.