32 module horiz_interp_conserve_mod
34 use platform_mod,
only: r4_kind, r8_kind
37 use mpp_mod,
only: comm_tag_1, comm_tag_2
40 use constants_mod,
only: pi
67 module procedure horiz_interp_conserve_new_1dx1d_r4
68 module procedure horiz_interp_conserve_new_1dx2d_r4
69 module procedure horiz_interp_conserve_new_2dx1d_r4
70 module procedure horiz_interp_conserve_new_2dx2d_r4
71 module procedure horiz_interp_conserve_new_1dx1d_r8
72 module procedure horiz_interp_conserve_new_1dx2d_r8
73 module procedure horiz_interp_conserve_new_2dx1d_r8
74 module procedure horiz_interp_conserve_new_2dx2d_r8
84 module procedure horiz_interp_conserve_r4
85 module procedure horiz_interp_conserve_r8
91 module procedure data_sum_r4
92 module procedure data_sum_r8
98 module procedure stats_r4
99 module procedure stats_r8
105 module procedure horiz_interp_conserve_version1_r8
106 module procedure horiz_interp_conserve_version1_r4
114 module procedure horiz_interp_conserve_version2_r8
115 module procedure horiz_interp_conserve_version2_r4
124 #include<file_version.h>
154 select case(interp%version)
156 if( interp%horizInterpReals8_type%is_allocated)
then
157 if(
allocated(interp%horizInterpReals8_type%area_src))
deallocate(interp%horizInterpReals8_type%area_src)
158 if(
allocated(interp%horizInterpReals8_type%area_dst))
deallocate(interp%horizInterpReals8_type%area_dst)
159 if(
allocated(interp%horizInterpReals8_type%facj))
deallocate(interp%horizInterpReals8_type%facj)
160 if(
allocated(interp%jlat))
deallocate(interp%jlat)
161 if(
allocated(interp%horizInterpReals8_type%faci))
deallocate(interp%horizInterpReals8_type%faci)
162 if(
allocated(interp%ilon))
deallocate(interp%ilon)
163 else if( interp%horizInterpReals4_type%is_allocated)
then
164 if(
allocated(interp%horizInterpReals4_type%area_src))
deallocate(interp%horizInterpReals4_type%area_src)
165 if(
allocated(interp%horizInterpReals4_type%area_dst))
deallocate(interp%horizInterpReals4_type%area_dst)
166 if(
allocated(interp%horizInterpReals4_type%facj))
deallocate(interp%horizInterpReals4_type%facj)
167 if(
allocated(interp%jlat))
deallocate(interp%jlat)
168 if(
allocated(interp%horizInterpReals4_type%faci))
deallocate(interp%horizInterpReals4_type%faci)
169 if(
allocated(interp%ilon))
deallocate(interp%ilon)
172 if( interp%horizInterpReals8_type%is_allocated)
then
173 if(
allocated(interp%i_src))
deallocate(interp%i_src)
174 if(
allocated(interp%j_src))
deallocate(interp%j_src)
175 if(
allocated(interp%i_dst))
deallocate(interp%i_dst)
176 if(
allocated(interp%j_dst))
deallocate(interp%j_dst)
177 if(
allocated(interp%horizInterpReals8_type%area_frac_dst)) &
178 deallocate(interp%horizInterpReals8_type%area_frac_dst)
179 else if( interp%horizInterpReals4_type%is_allocated )
then
180 if(
allocated(interp%i_src))
deallocate(interp%i_src)
181 if(
allocated(interp%j_src))
deallocate(interp%j_src)
182 if(
allocated(interp%i_dst))
deallocate(interp%i_dst)
183 if(
allocated(interp%j_dst))
deallocate(interp%j_dst)
184 if(
allocated(interp%horizInterpReals4_type%area_frac_dst)) &
185 deallocate(interp%horizInterpReals4_type%area_frac_dst)
188 interp%horizInterpReals4_type%is_allocated = .false.
189 interp%horizInterpReals8_type%is_allocated = .false.
193 #include "horiz_interp_conserve_r4.fh"
194 #include "horiz_interp_conserve_r8.fh"
196 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
integer pe
is the current pe
logical great_circle_algorithm
turns on the great_circle_algorithm to compute grid cell areas.
subroutine, public horiz_interp_conserve_del(Interp)
integer root_pe
is the root_pe
logical module_is_initialized
is a flag to prevent module re-initialization.
Internally used generic interface when interpolating data with Interp generated from horiz_interp_new...
Generic interface to interpolate data from source grid to target grid from the weights stored in Inte...
Generic inteface called from horiz_interp_conserve to interpolate data using Interp populated from ho...
Generic interface called from horiz_interp_conserve to interpolate 2d data. Calls horiz_interp_conser...
Internally used generic interface when interpolating data with Interp generated from horiz_interp_new...
Datatype holding interpolation weights, mapping indices, and metadata for horizontal interpolation....
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.
Receive data from another PE.
Send data to a receiving PE.
Generic interface to compute interpolation weights and mapping indices. Member subroutines and their ...