30 module horiz_interp_spherical_mod
32 use platform_mod,
only : r4_kind, r8_kind
34 use mpp_mod,
only : mpp_root_pe,
mpp_pe
35 use mpp_mod,
only : input_nml_file
38 use constants_mod,
only : pi
45 module procedure horiz_interp_spherical_r4
46 module procedure horiz_interp_spherical_r8
50 module procedure horiz_interp_spherical_new_r4
51 module procedure horiz_interp_spherical_new_r8
55 module procedure horiz_interp_spherical_wght_r4
56 module procedure horiz_interp_spherical_wght_r8
64 module procedure full_search_r4
65 module procedure full_search_r8
69 module procedure radial_search_r4
70 module procedure radial_search_r8
74 module procedure spherical_distance_r4
75 module procedure spherical_distance_r8
78 integer,
parameter :: max_neighbors = 400
79 real(R8_KIND),
parameter :: max_dist_default = 0.1_r8_kind
80 integer,
parameter :: num_nbrs_default = 4
81 real(R8_KIND),
parameter :: large=1.e20_r8_kind
82 real(R8_KIND),
parameter :: epsln=1.e-10_r8_kind
84 integer :: pe, root_pe
104 #include<file_version.h>
105 logical :: module_is_initialized = .false.
116 if(module_is_initialized)
return
117 call write_version_number(
"horiz_interp_spherical_mod", version)
118 read (input_nml_file, horiz_interp_spherical_nml, iostat=io)
121 module_is_initialized = .true.
136 if(interp%horizInterpReals4_type%is_allocated)
then
137 if(
allocated(interp%horizInterpReals4_type%src_dist))
deallocate(interp%horizInterpReals4_type%src_dist)
138 else if (interp%horizInterpReals8_type%is_allocated)
then
139 if(
allocated(interp%horizInterpReals8_type%src_dist))
deallocate(interp%horizInterpReals8_type%src_dist)
141 if(
allocated(interp%num_found))
deallocate(interp%num_found)
142 if(
allocated(interp%i_lon))
deallocate(interp%i_lon)
143 if(
allocated(interp%j_lat))
deallocate(interp%j_lat)
145 interp%horizInterpReals4_type%is_allocated = .false.
146 interp%horizInterpReals8_type%is_allocated = .false.
152 #include "horiz_interp_spherical_r4.fh"
153 #include "horiz_interp_spherical_r8.fh"
155 end module horiz_interp_spherical_mod
integer function, public check_nml_error(IOSTAT, NML_NAME)
Checks the iostat argument that is returned after reading a namelist and determines if the error code...
subroutine, public write_version_number(version, tag, unit)
Prints to the log file (or a specified unit) the version id string and tag name.
subroutine, public horiz_interp_spherical_init
Initializes module and writes version number to logfile.out.
subroutine, public horiz_interp_spherical_del(Interp)
Deallocates memory used by "HI_KIND_TYPE" variables. Must be called before reinitializing with horiz_...
character(len=32) search_method
Namelist variable to indicate the searching method to find the nearest neighbor points....
Holds data pointers and metadata for horizontal interpolations, passed between the horiz_interp modul...
integer function stdout()
This function returns the current standard fortran unit numbers for output.
integer function mpp_pe()
Returns processor ID.