38 module horiz_interp_conserve_mod
40 use platform_mod,
only: r4_kind, r8_kind
43 use mpp_mod,
only: comm_tag_1, comm_tag_2
46 use constants_mod,
only: pi
93 module procedure horiz_interp_conserve_new_1dx1d_r4
94 module procedure horiz_interp_conserve_new_1dx2d_r4
95 module procedure horiz_interp_conserve_new_2dx1d_r4
96 module procedure horiz_interp_conserve_new_2dx2d_r4
97 module procedure horiz_interp_conserve_new_1dx1d_r8
98 module procedure horiz_interp_conserve_new_1dx2d_r8
99 module procedure horiz_interp_conserve_new_2dx1d_r8
100 module procedure horiz_interp_conserve_new_2dx2d_r8
104 module procedure horiz_interp_conserve_r4
105 module procedure horiz_interp_conserve_r8
110 module procedure data_sum_r4
111 module procedure data_sum_r8
115 module procedure stats_r4
116 module procedure stats_r8
120 module procedure horiz_interp_conserve_version1_r8
121 module procedure horiz_interp_conserve_version1_r4
125 module procedure horiz_interp_conserve_version2_r8
126 module procedure horiz_interp_conserve_version2_r4
136 integer :: pe, root_pe
139 #include<file_version.h>
140 logical :: module_is_initialized = .false.
142 logical :: great_circle_algorithm = .false.
149 if(module_is_initialized)
return
154 module_is_initialized = .true.
166 select case(interp%version)
168 if( interp%horizInterpReals8_type%is_allocated)
then
169 if(
allocated(interp%horizInterpReals8_type%area_src))
deallocate(interp%horizInterpReals8_type%area_src)
170 if(
allocated(interp%horizInterpReals8_type%area_dst))
deallocate(interp%horizInterpReals8_type%area_dst)
171 if(
allocated(interp%horizInterpReals8_type%facj))
deallocate(interp%horizInterpReals8_type%facj)
172 if(
allocated(interp%jlat))
deallocate(interp%jlat)
173 if(
allocated(interp%horizInterpReals8_type%faci))
deallocate(interp%horizInterpReals8_type%faci)
174 if(
allocated(interp%ilon))
deallocate(interp%ilon)
175 else if( interp%horizInterpReals4_type%is_allocated)
then
176 if(
allocated(interp%horizInterpReals4_type%area_src))
deallocate(interp%horizInterpReals4_type%area_src)
177 if(
allocated(interp%horizInterpReals4_type%area_dst))
deallocate(interp%horizInterpReals4_type%area_dst)
178 if(
allocated(interp%horizInterpReals4_type%facj))
deallocate(interp%horizInterpReals4_type%facj)
179 if(
allocated(interp%jlat))
deallocate(interp%jlat)
180 if(
allocated(interp%horizInterpReals4_type%faci))
deallocate(interp%horizInterpReals4_type%faci)
181 if(
allocated(interp%ilon))
deallocate(interp%ilon)
184 if( interp%horizInterpReals8_type%is_allocated)
then
185 if(
allocated(interp%i_src))
deallocate(interp%i_src)
186 if(
allocated(interp%j_src))
deallocate(interp%j_src)
187 if(
allocated(interp%i_dst))
deallocate(interp%i_dst)
188 if(
allocated(interp%j_dst))
deallocate(interp%j_dst)
189 if(
allocated(interp%horizInterpReals8_type%area_frac_dst)) &
190 deallocate(interp%horizInterpReals8_type%area_frac_dst)
191 else if( interp%horizInterpReals4_type%is_allocated )
then
192 if(
allocated(interp%i_src))
deallocate(interp%i_src)
193 if(
allocated(interp%j_src))
deallocate(interp%j_src)
194 if(
allocated(interp%i_dst))
deallocate(interp%i_dst)
195 if(
allocated(interp%j_dst))
deallocate(interp%j_dst)
196 if(
allocated(interp%horizInterpReals4_type%area_frac_dst)) &
197 deallocate(interp%horizInterpReals4_type%area_frac_dst)
200 interp%horizInterpReals4_type%is_allocated = .false.
201 interp%horizInterpReals8_type%is_allocated = .false.
205 #include "horiz_interp_conserve_r4.fh"
206 #include "horiz_interp_conserve_r8.fh"
208 end module horiz_interp_conserve_mod
subroutine, public write_version_number(version, tag, unit)
Prints to the log file (or a specified unit) the version id string and tag name.
logical function, public get_great_circle_algorithm()
Determine if we are using the great circle algorithm.
subroutine, public horiz_interp_conserve_init
Writes version number to logfile.
subroutine, public horiz_interp_conserve_del(Interp)
Deallocates memory used by "HI_KIND_TYPE" variables. Must be called before reinitializing with horiz_...
Allocates space and initializes a derived-type variable that contains pre-computed interpolation indi...
Holds data pointers and metadata for horizontal interpolations, passed between the horiz_interp modul...
subroutine mpp_sync_self(pelist, check, request, msg_size, msg_type)
This is to check if current PE's outstanding puts are complete but we can't use shmem_fence because w...
integer function mpp_npes()
Returns processor count for current pelist.
integer function mpp_pe()
Returns processor ID.
Recieve data from another PE.
Send data to a receiving PE.