From 72f60dc7ea8f5cec34e2c4b5e92edc69a4969a97 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Fri, 22 Jan 2021 14:52:52 -0700 Subject: [PATCH 1/2] Rearrange allocation of hgt_1d in mtnlm7_oclsm.f to fix errors on MacOS --- sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f index 46cd166ec..788cfb7cc 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f +++ b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f @@ -1781,7 +1781,7 @@ SUBROUTINE MAKEMT2(ZAVG,ZSLM,ORO,SLM,land_frac,VAR,VAR4, implicit none real, parameter :: D2R = 3.14159265358979/180. integer, parameter :: MAXSUM=20000000 - real hgt_1d(MAXSUM) + real, dimension(:), allocatable :: hgt_1d integer IM, JM, IMN, JMN real GLAT(JMN), GLON(IMN) INTEGER ZAVG(IMN,JMN),ZSLM(IMN,JMN) @@ -1806,6 +1806,7 @@ SUBROUTINE MAKEMT2(ZAVG,ZSLM,ORO,SLM,land_frac,VAR,VAR4, ! --- mskocn=1 Use ocean model sea land mask, OK and present, ! --- mskocn=0 dont use Ocean model sea land mask, not OK, not present print *,' _____ SUBROUTINE MAKEMT2 ' + allocate(hgt_1d(MAXSUM)) C---- GLOBAL XLAT AND XLON ( DEGREE ) C JM1 = JM - 1 From 50f97dfbc82a44e1e52e120ea2de7378461d78d9 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 25 Jan 2021 10:48:41 -0700 Subject: [PATCH 2/2] Add matching deallocate statement, fix subroutine name in comment --- sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f index 788cfb7cc..b64acc3b4 100644 --- a/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f +++ b/sorc/orog_mask_tools.fd/orog.fd/mtnlm7_oclsm.f @@ -1902,9 +1902,9 @@ SUBROUTINE MAKEMT2(ZAVG,ZSLM,ORO,SLM,land_frac,VAR,VAR4, ENDDO ENDDO !$omp end parallel do - WRITE(6,*) "! MAKEMT ORO SLM VAR VAR4 DONE" + WRITE(6,*) "! MAKEMT2 ORO SLM VAR VAR4 DONE" C - + deallocate(hgt_1d) RETURN END