29 module horiz_interp_bilinear_mod
33 use constants_mod,
only: pi
35 use platform_mod,
only: r4_kind, r8_kind
38 use fms_string_utils_mod,
only:
string
58 module procedure horiz_interp_bilinear_new_1d_r4
59 module procedure horiz_interp_bilinear_new_1d_r8
60 module procedure horiz_interp_bilinear_new_2d_r4
61 module procedure horiz_interp_bilinear_new_2d_r8
68 module procedure horiz_interp_read_weights_bilinear_r4
69 module procedure horiz_interp_read_weights_bilinear_r8
77 module procedure horiz_interp_bilinear_r4
78 module procedure horiz_interp_bilinear_r8
81 real(r8_kind),
parameter ::
epsln=1.e-10_r8_kind
82 real(r4_kind),
parameter ::
epsln_r4=1.e-4_r4_kind
83 integer,
parameter ::
dummy = -999
89 module procedure intersect_r4
90 module procedure intersect_r8
93 #include<file_version.h>
121 if( interp%horizInterpReals4_type%is_allocated)
then
122 if(
allocated(interp%horizInterpReals4_type%wti))
deallocate(interp%horizInterpReals4_type%wti)
123 if(
allocated(interp%horizInterpReals4_type%wtj))
deallocate(interp%horizInterpReals4_type%wtj)
124 else if (interp%horizInterpReals8_type%is_allocated)
then
125 if(
allocated(interp%horizInterpReals8_type%wti))
deallocate(interp%horizInterpReals8_type%wti)
126 if(
allocated(interp%horizInterpReals8_type%wtj))
deallocate(interp%horizInterpReals8_type%wtj)
128 if(
allocated(interp%i_lon))
deallocate(interp%i_lon)
129 if(
allocated(interp%j_lat))
deallocate(interp%j_lat)
131 interp%horizInterpReals4_type%is_allocated = .false.
132 interp%horizInterpReals8_type%is_allocated = .false.
136 #include "horiz_interp_bilinear_r4.fh"
137 #include "horiz_interp_bilinear_r8.fh"
139 end module horiz_interp_bilinear_mod
Close a netcdf or domain file opened with open_file or open_virtual_file.
Opens a NetCDF dataset on disk and initializes the file object.
Read data from a defined field in a file.
subroutine, public write_version_number(version, tag, unit)
Prints to the log file (or a specified unit) the version id string and tag name.
character(:) function, allocatable, public string(v, fmt)
Converts a number or a Boolean value to a string.
real(r4_kind), parameter epsln_r4
is 0.0001
subroutine, public horiz_interp_bilinear_del(Interp)
Deallocates memory used by "horiz_interp_type" variables.
integer, parameter dummy
is -999
real(r8_kind), parameter epsln
is a really small number
logical module_is_initialized
is a flag to prevent re-initialization
subroutine, public horiz_interp_bilinear_init
Generic interface to interpolate data from a source grid to target grid using the weights stored in I...
Generic interface to populate Interp from a weight file generated from fregrid. Calls horiz_interp_re...
Generic interface used internally when finding nearest neighboring input cells for an output cell....
integer, parameter, public bilinear
is an internally used parameter to mark bilinear interpolation
Generic interfaces to compute statistics for bilinear and spherical interpolation Calls stats_r4 when...
Datatype holding interpolation weights, mapping indices, and metadata for horizontal interpolation....
integer function stdout()
This function returns the current standard fortran unit numbers for output.
integer function mpp_pe()
Returns processor ID.
Generic interface to compute interpolation weights and mapping indices. Member subroutines and their ...