29 module horiz_interp_spherical_mod
31 use platform_mod,
only : r4_kind, r8_kind
33 use mpp_mod,
only : mpp_root_pe,
mpp_pe
34 use mpp_mod,
only : input_nml_file
37 use constants_mod,
only : pi
44 module procedure horiz_interp_spherical_r4
45 module procedure horiz_interp_spherical_r8
49 module procedure horiz_interp_spherical_new_r4
50 module procedure horiz_interp_spherical_new_r8
54 module procedure horiz_interp_spherical_wght_r4
55 module procedure horiz_interp_spherical_wght_r8
63 module procedure full_search_r4
64 module procedure full_search_r8
68 module procedure radial_search_r4
69 module procedure radial_search_r8
73 module procedure spherical_distance_r4
74 module procedure spherical_distance_r8
77 integer,
parameter :: max_neighbors = 400
78 real(R8_KIND),
parameter :: max_dist_default = 0.1_r8_kind
79 integer,
parameter :: num_nbrs_default = 4
80 real(R8_KIND),
parameter :: large=1.e20_r8_kind
81 real(R8_KIND),
parameter :: epsln=1.e-10_r8_kind
83 integer :: pe, root_pe
103 #include<file_version.h>
104 logical :: module_is_initialized = .false.
115 if(module_is_initialized)
return
116 call write_version_number(
"horiz_interp_spherical_mod", version)
117 read (input_nml_file, horiz_interp_spherical_nml, iostat=io)
120 module_is_initialized = .true.
135 if(interp%horizInterpReals4_type%is_allocated)
then
136 if(
allocated(interp%horizInterpReals4_type%src_dist))
deallocate(interp%horizInterpReals4_type%src_dist)
137 else if (interp%horizInterpReals8_type%is_allocated)
then
138 if(
allocated(interp%horizInterpReals8_type%src_dist))
deallocate(interp%horizInterpReals8_type%src_dist)
140 if(
allocated(interp%num_found))
deallocate(interp%num_found)
141 if(
allocated(interp%i_lon))
deallocate(interp%i_lon)
142 if(
allocated(interp%j_lat))
deallocate(interp%j_lat)
144 interp%horizInterpReals4_type%is_allocated = .false.
145 interp%horizInterpReals8_type%is_allocated = .false.
151 #include "horiz_interp_spherical_r4.fh"
152 #include "horiz_interp_spherical_r8.fh"
154 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.