Skip to content

Commit

Permalink
model/fv_dynamics.F90: replicating previous change to gmtb/develop br…
Browse files Browse the repository at this point in the history
…anch of FV3, always allocate dtdt_m for IPD version
  • Loading branch information
climbfuji committed Aug 30, 2019
1 parent 3df1171 commit b700cae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions model/fv_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b700cae

Please sign in to comment.