get_lat_corners.F90 Source File


This file depends on

sourcefile~~get_lat_corners.f90~~EfferentGraph sourcefile~get_lat_corners.f90 get_lat_corners.F90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~get_lat_corners.f90->sourcefile~errorhandling.f90 sourcefile~lataxis.f90 LatAxis.F90 sourcefile~get_lat_corners.f90->sourcefile~lataxis.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~get_lat_corners.f90->sourcefile~mapl_range.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~coordinateaxis.f90 CoordinateAxis.F90 sourcefile~lataxis.f90->sourcefile~coordinateaxis.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~lataxis.f90->sourcefile~pfio.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~mapl_range.f90->sourcefile~mapl_exceptionhandling.f90

Source Code

#include "MAPL_ErrLog.h"

submodule (mapl3g_LatAxis) get_lat_corners_smod
   use mapl_RangeMod
!   use hconfig3g
   use esmf
   use mapl_ErrorHandling
   implicit none (type, external)

   integer, parameter :: R8 = ESMF_KIND_R8

contains

   module function get_lat_corners(centers) result(corners)
      real(kind=R8), intent(in) :: centers(:)
      real(kind=R8), allocatable :: corners(:)

      associate (jm => size(centers))
        allocate(corners(jm+1))
         corners(1) = centers(1) - (centers(2)-centers(1))/2
         corners(2:jm) = (centers(1:jm-1) + centers(2:jm))/2
         corners(jm+1) = centers(jm) + (centers(jm)-centers(jm-1))/2
      end associate
   end function get_lat_corners

end submodule get_lat_corners_smod