diff --git a/AppGridCreate.F90 b/AppGridCreate.F90 index 0726b71d..85580567 100644 --- a/AppGridCreate.F90 +++ b/AppGridCreate.F90 @@ -436,91 +436,6 @@ function AppGridCreateF(IM_WORLD, JM_WORLD, LM, NX, NY, rc) result(esmfgrid) RETURN_(ESMF_SUCCESS) end function AppGridCreateF -subroutine AppGridCreate (META, esmfgrid, RC) - -#include "MAPL_Generic.h" - - use ESMF - use MAPL - use MAPL2, only: MAPL_GetResource, MAPL_MetaComp - use fv_arrays_mod, only: REAL4, REAL8, R_GRID - implicit none - - ! !ARGUMENTS: - - type(MAPL_MetaComp), intent(INOUT) :: META - type (ESMF_Grid), intent( OUT) :: esmfgrid - integer, optional, intent( OUT) :: rc - - ! ErrLog variables - !----------------- - - integer :: STATUS - character(len=ESMF_MAXSTR), parameter :: Iam="AppGridCreate" - - ! Local variables - !----------------- - - integer :: IM_WORLD - integer :: JM_WORLD - integer :: LM - integer :: NX, NY - character(len=ESMF_MAXSTR) :: tmpname, gridname - character(len=ESMF_MAXSTR) :: FMT, FMTIM, FMTJM - real(REAL8) :: deglon=0.0 - - interface - function AppGridCreateF(IM_WORLD, JM_WORLD, LM, NX, NY, rc) - use ESMF - implicit none - type(ESMF_Grid) :: AppGridCreateF - integer, intent(IN) :: IM_WORLD, JM_WORLD, LM - integer, intent(IN) :: NX, NY - integer, optional, intent(OUT) :: rc - end function AppGridCreateF - end interface - - ! Get Decomposition from CF - !-------------------------- - - ! !RESOURCE_ITEM: none :: Processing elements in 1st dimension - call MAPL_GetResource( META, NX, label ='NX:', default=1, rc = status ) - VERIFY_(STATUS) - ! !RESOURCE_ITEM: none :: Processing elements in 2nd dimension - call MAPL_GetResource( META, NY, label ='NY:', default=1, rc = status ) - VERIFY_(STATUS) - - ! Get World problem size from CF - !------------------------------- - - ! !RESOURCE_ITEM: none :: Grid size in 1st dimension - call MAPL_GetResource( META, IM_WORLD, 'AGCM_IM:', rc = status ) - VERIFY_(STATUS) - ! !RESOURCE_ITEM: none :: Grid size in 2nd dimension - call MAPL_GetResource( META, JM_WORLD, 'AGCM_JM:', rc = status ) - VERIFY_(STATUS) - ! !RESOURCE_ITEM: none :: Grid size in 3rd dimension - call MAPL_GetResource( META, LM, 'AGCM_LM:', default=1, rc = status ) - VERIFY_(STATUS) - - ! The grid's name is optional - !---------------------------- - - call GET_INT_FORMAT(IM_WORLD, FMTIM) - call GET_INT_FORMAT(JM_WORLD, FMTJM) - FMT = '(A,' // trim(FMTIM) //',A,' // trim(FMTJM) // ',A)' - write(tmpname,trim(FMT)) 'PE',IM_WORLD,'x',JM_WORLD,'-CF' - ! !RESOURCE_ITEM: none :: Optional grid name - call MAPL_GetResource( META, GRIDNAME, 'AGCM.GRIDNAME:', default=trim(tmpname), rc = status ) - VERIFY_(STATUS) - - esmfgrid = AppGridCreateF(IM_WORLD, JM_WORLD, LM, NX, NY, STATUS) - VERIFY_(STATUS) - - RETURN_(ESMF_SUCCESS) - -end subroutine AppGridCreate - subroutine GET_INT_FORMAT(N, FMT) integer :: N character(len=*) :: FMT