MOM6
midas_vertmap::fill_boundaries Interface Reference

Detailed Description

Fill grid edges.

Definition at line 22 of file midas_vertmap.F90.

Private functions

real function, dimension(0:size(m, 1)+1, 0:size(m, 2)+1) fill_boundaries_real (m, cyclic_x, tripolar_n)
 fill grid edges More...
 
integer function, dimension(0:size(m, 1)+1, 0:size(m, 2)+1) fill_boundaries_int (m, cyclic_x, tripolar_n)
 Fill grid edges. More...
 

Functions and subroutines

◆ fill_boundaries_int()

integer function, dimension(0:size(m,1)+1,0:size(m,2)+1) midas_vertmap::fill_boundaries::fill_boundaries_int ( integer, dimension(:,:), intent(in)  m,
logical, intent(in)  cyclic_x,
logical, intent(in)  tripolar_n 
)
private

Fill grid edges.

Parameters
[in]minput array
[in]cyclic_xzonal cyclic condition
[in]tripolar_nnorthern fold condition
Returns
output filled array

Definition at line 782 of file midas_vertmap.F90.

782  integer, dimension(:,:), intent(in) :: m !< input array
783  logical, intent(in) :: cyclic_x !< zonal cyclic condition
784  logical, intent(in) :: tripolar_n !< northern fold condition
785  integer, dimension(0:size(m,1)+1,0:size(m,2)+1) :: mp !< output filled array
786  ! Local variables
787  real, dimension(size(m,1),size(m,2)) :: m_real
788  real, dimension(0:size(m,1)+1,0:size(m,2)+1) :: mp_real
789 
790  m_real = real(m)
791 
792  mp_real = fill_boundaries_real(m_real,cyclic_x,tripolar_n)
793 
794  mp = int(mp_real)
795 
796  return
797 

◆ fill_boundaries_real()

real function, dimension(0:size(m,1)+1,0:size(m,2)+1) midas_vertmap::fill_boundaries::fill_boundaries_real ( real, dimension(:,:), intent(in)  m,
logical, intent(in)  cyclic_x,
logical, intent(in)  tripolar_n 
)
private

fill grid edges

Parameters
[in]minput array
[in]cyclic_xzonal cyclic condition
[in]tripolar_nnorthern fold condition
Returns
output filled array

Definition at line 802 of file midas_vertmap.F90.

802  real, dimension(:,:), intent(in) :: m !< input array
803  logical, intent(in) :: cyclic_x !< zonal cyclic condition
804  logical, intent(in) :: tripolar_n !< northern fold condition
805  real, dimension(0:size(m,1)+1,0:size(m,2)+1) :: mp !< output filled array
806 
807  integer :: ni,nj,i,j
808 
809  ni=size(m,1); nj=size(m,2)
810 
811  mp(1:ni,1:nj)=m(:,:)
812 
813  if (cyclic_x) then
814  mp(0,1:nj)=m(ni,1:nj)
815  mp(ni+1,1:nj)=m(1,1:nj)
816  else
817  mp(0,1:nj)=m(1,1:nj)
818  mp(ni+1,1:nj)=m(ni,1:nj)
819  endif
820 
821  mp(1:ni,0)=m(1:ni,1)
822  if (tripolar_n) then
823  do i=1,ni
824  mp(i,nj+1)=m(ni-i+1,nj)
825  enddo
826  else
827  mp(1:ni,nj+1)=m(1:ni,nj)
828  endif
829 
830  return
831 

The documentation for this interface was generated from the following file: