From b700cae673038f82189a1e6e0cb48a10a58ea726 Mon Sep 17 00:00:00 2001 From: climbfuji Date: Fri, 30 Aug 2019 11:58:00 -0600 Subject: [PATCH] model/fv_dynamics.F90: replicating previous change to gmtb/develop branch of FV3, always allocate dtdt_m for IPD version --- model/fv_dynamics.F90 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/model/fv_dynamics.F90 b/model/fv_dynamics.F90 index 4a9bab31a..8a723f7db 100644 --- a/model/fv_dynamics.F90 +++ b/model/fv_dynamics.F90 @@ -621,7 +621,9 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, mdt = bdt / real(k_split) #ifndef CCPP - if ( idiag%id_mdt > 0 .and. (.not. do_adiabatic_init) ) then + ! Routine Lagrangian_to_Eulerian expects dtdt_m to be allocated: + ! (fv_mapz.F90, 201): line real, intent(inout):: dtdt(is:ie,js:je,km) + !if ( idiag%id_mdt > 0 .and. (.not. do_adiabatic_init) ) then allocate ( dtdt_m(is:ie,js:je,npz) ) !$OMP parallel do default(none) shared(is,ie,js,je,npz,dtdt_m) do k=1,npz @@ -631,7 +633,7 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, enddo enddo enddo - endif + !endif #endif call timing_on('FV_DYN_LOOP') @@ -834,10 +836,10 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill, enddo ! call prt_mxm('Fast DTDT (deg/Day)', dtdt_m, is, ie, js, je, 0, npz, 1., gridstruct%area_64, domain) used = send_data(idiag%id_mdt, dtdt_m, fv_time) + endif #ifndef CCPP - deallocate ( dtdt_m ) + deallocate ( dtdt_m ) #endif - endif if( nwat == 6 ) then if (cld_amt > 0) then