Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvhpc fix for horiz_interp_type #1187

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 39 additions & 38 deletions horiz_interp/horiz_interp_type.F90
Original file line number Diff line number Diff line change
Expand Up @@ -57,44 +57,6 @@ module horiz_interp_type_mod
module procedure stats_r8
end interface

!> Holds data pointers and metadata for horizontal interpolations, passed between the horiz_interp modules
!> @ingroup horiz_interp_type_mod
type horiz_interp_type
integer, dimension(:,:), allocatable :: ilon !< indices for conservative scheme
integer, dimension(:,:), allocatable :: jlat !< indices for conservative scheme
!! wti ist used for derivative "weights" in bicubic
integer, dimension(:,:,:), allocatable :: i_lon !< indices for bilinear interpolation
!! and spherical regrid
integer, dimension(:,:,:), allocatable :: j_lat !< indices for bilinear interpolation
!! and spherical regrid
logical, dimension(:,:), allocatable :: found_neighbors !< indicate whether destination grid
!! has some source grid around it.
integer, dimension(:,:), allocatable :: num_found
integer :: nlon_src !< size of source grid
integer :: nlat_src !< size of source grid
integer :: nlon_dst !< size of destination grid
integer :: nlat_dst !< size of destination grid
integer :: interp_method !< interpolation method.
!! =1, conservative scheme
!! =2, bilinear interpolation
!! =3, spherical regrid
!! =4, bicubic regrid
logical :: I_am_initialized=.false.
integer :: version !< indicate conservative
!! interpolation version with value 1 or 2
!--- The following are for conservative interpolation scheme version 2 ( through xgrid)
integer :: nxgrid !< number of exchange grid
!! between src and dst grid.
integer, dimension(:), allocatable :: i_src !< indices in source grid.
integer, dimension(:), allocatable :: j_src !< indices in source grid.
integer, dimension(:), allocatable :: i_dst !< indices in destination grid.
integer, dimension(:), allocatable :: j_dst !< indices in destination grid.
type(horizInterpReals8_type), allocatable :: horizInterpReals8_type !< derived type holding kind 8 real data pointers
!! if compiled with r8_kind
type(horizInterpReals4_type), allocatable :: horizInterpReals4_type !< derived type holding kind 4 real data pointers
!! if compiled with r8_kind

end type

!> real(8) pointers for use in horiz_interp_type
type horizInterpReals8_type
Expand Down Expand Up @@ -148,6 +110,45 @@ module horiz_interp_type_mod

end type horizInterpReals4_type

!> Holds data pointers and metadata for horizontal interpolations, passed between the horiz_interp modules
!> @ingroup horiz_interp_type_mod
type horiz_interp_type
integer, dimension(:,:), allocatable :: ilon !< indices for conservative scheme
integer, dimension(:,:), allocatable :: jlat !< indices for conservative scheme
!! wti ist used for derivative "weights" in bicubic
integer, dimension(:,:,:), allocatable :: i_lon !< indices for bilinear interpolation
!! and spherical regrid
integer, dimension(:,:,:), allocatable :: j_lat !< indices for bilinear interpolation
!! and spherical regrid
logical, dimension(:,:), allocatable :: found_neighbors !< indicate whether destination grid
!! has some source grid around it.
integer, dimension(:,:), allocatable :: num_found
integer :: nlon_src !< size of source grid
integer :: nlat_src !< size of source grid
integer :: nlon_dst !< size of destination grid
integer :: nlat_dst !< size of destination grid
integer :: interp_method !< interpolation method.
!! =1, conservative scheme
!! =2, bilinear interpolation
!! =3, spherical regrid
!! =4, bicubic regrid
logical :: I_am_initialized=.false.
integer :: version !< indicate conservative
!! interpolation version with value 1 or 2
!--- The following are for conservative interpolation scheme version 2 ( through xgrid)
integer :: nxgrid !< number of exchange grid
!! between src and dst grid.
integer, dimension(:), allocatable :: i_src !< indices in source grid.
integer, dimension(:), allocatable :: j_src !< indices in source grid.
integer, dimension(:), allocatable :: i_dst !< indices in destination grid.
integer, dimension(:), allocatable :: j_dst !< indices in destination grid.
type(horizInterpReals8_type), allocatable :: horizInterpReals8_type !< derived type holding kind 8 real data pointers
!! if compiled with r8_kind
type(horizInterpReals4_type), allocatable :: horizInterpReals4_type !< derived type holding kind 4 real data pointers
!! if compiled with r8_kind

end type

!> @addtogroup horiz_interp_type_mod
!> @{
contains
Expand Down