define derived data type that contains indices and weights used for subsequent interpolations.
mpp_mod
type horiz_interp_type
real, dimension(:,:), pointer :: faci =>NULL(), facj =>NULL() !weights for conservative scheme
integer, dimension(:,:), pointer :: ilon =>NULL(), jlat =>NULL() !indices for conservative scheme
real, dimension(:,:), pointer :: area_src =>NULL() !area of the source grid
real, dimension(:,:), pointer :: area_dst =>NULL() !area of the destination grid
real, dimension(:,:,:), pointer :: wti =>NULL(),wtj =>NULL() !weights for bilinear interpolation
!wti ist used for derivative "weights" in bicubic
integer, dimension(:,:,:), pointer :: i_lon =>NULL(), j_lat =>NULL() !indices for bilinear interpolation
!and spherical regrid
real, dimension(:,:,:), pointer :: src_dist =>NULL() !distance between destination grid and
!neighbor source grid.
logical, dimension(:,:), pointer :: found_neighbors =>NULL() !indicate whether destination grid
!has some source grid around it.
real :: max_src_dist
integer, dimension(:,:), pointer :: num_found => NULL()
integer :: nlon_src, nlat_src !size of source grid
integer :: nlon_dst, nlat_dst !size of destination grid
integer :: interp_method !interpolation method.
!=1, conservative scheme
!=2, bilinear interpolation
!=3, spherical regrid
!=4, bicubic regrid
real, dimension(:,:), pointer :: rat_x =>NULL(), rat_y =>NULL() !the ratio of coordinates of the dest grid
! (x_dest -x_src_r)/(x_src_l -x_src_r) and (y_dest -y_src_r)/(y_src_l -y_src_r)
real, dimension(:), pointer :: lon_in =>NULL(), lat_in =>NULL() !the coordinates of the source grid
end type
|