Skip to content

Commit

Permalink
Bugfix in gfsphysics/GFS_layer/GFS_typedefs.F90, allocate Tbd%drain_c…
Browse files Browse the repository at this point in the history
…pl and Tbd%dsnow_cpl when cplchm or cplflx is true
  • Loading branch information
climbfuji committed Mar 24, 2020
1 parent 9528d48 commit 6f4cb56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ccpp/physics
12 changes: 7 additions & 5 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4879,18 +4879,20 @@ subroutine tbd_create (Tbd, IM, Model)
Tbd%acvb = clear_val
Tbd%acvt = clear_val

if (Model%cplflx .or. Model%cplchm) then
allocate (Tbd%drain_cpl (IM))
allocate (Tbd%dsnow_cpl (IM))
Tbd%drain_cpl = clear_val
Tbd%dsnow_cpl = clear_val
endif

if (Model%do_sppt) then
allocate (Tbd%dtdtr (IM,Model%levs))
allocate (Tbd%dtotprcp (IM))
allocate (Tbd%dcnvprcp (IM))
allocate (Tbd%drain_cpl (IM))
allocate (Tbd%dsnow_cpl (IM))

Tbd%dtdtr = clear_val
Tbd%dtotprcp = clear_val
Tbd%dcnvprcp = clear_val
Tbd%drain_cpl = clear_val
Tbd%dsnow_cpl = clear_val
endif

allocate (Tbd%phy_f2d (IM,Model%ntot2d))
Expand Down

1 comment on commit 6f4cb56

@pjpegion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@climbfuji thanks, and you fixed it in a much cleaner way than I would. Cheers!

Please sign in to comment.