Skip to content

Commit

Permalink
Fix some bugs from the last merge.
Browse files Browse the repository at this point in the history
Fixes #633.
  • Loading branch information
GeorgeGayno-NOAA committed Nov 9, 2022
1 parent e121d0d commit 95f3bca
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions sorc/chgres_cube.fd/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ module atmosphere
type(esmf_field) :: xwind_s_target_grid !< 3-d wind, 'south' edge
type(esmf_field) :: ywind_s_target_grid !< 3-d wind, 'south' edge
type(esmf_field) :: zwind_s_target_grid !< 3-d wind, 'south' edge
type(esmf_field), public :: u_w_target_grid !< u-wind, 'west' edge
type(esmf_field), public :: v_w_target_grid !< v-wind, 'west' edge
!type(esmf_field), public :: u_w_target_grid !< u-wind, 'west' edge
!type(esmf_field), public :: v_w_target_grid !< v-wind, 'west' edge
!type(esmf_field) :: wind_w_target_grid !< 3-d wind, 'west' edge
type(esmf_field) :: xwind_w_target_grid !< 3-d wind, 'west' edge
type(esmf_field) :: ywind_w_target_grid !< 3-d wind, 'west' edge
type(esmf_field) :: zwind_w_target_grid !< 3-d wind, 'west' edge
type(esmf_field), public :: zh_target_grid !< 3-d height
!type(esmf_field), public :: zh_target_grid !< 3-d height

! Fields associated with thompson microphysics climatological tracers.

Expand Down Expand Up @@ -2492,17 +2492,18 @@ subroutine cleanup_all_target_atm_data

implicit none

integer :: rc, i
!integer :: rc, i
integer :: rc

print*,"- DESTROY LOCAL TARGET GRID ATMOSPHERIC FIELDS."

call ESMF_FieldDestroy(delp_target_grid, rc=rc)
call ESMF_FieldDestroy(dzdt_target_grid, rc=rc)
call ESMF_FieldDestroy(ps_target_grid, rc=rc)
!call ESMF_FieldDestroy(delp_target_grid, rc=rc)
!call ESMF_FieldDestroy(dzdt_target_grid, rc=rc)
!call ESMF_FieldDestroy(ps_target_grid, rc=rc)
call ESMF_FieldDestroy(pres_target_grid, rc=rc)
call ESMF_FieldDestroy(temp_target_grid, rc=rc)
call ESMF_FieldDestroy(u_s_target_grid, rc=rc)
call ESMF_FieldDestroy(v_s_target_grid, rc=rc)
!call ESMF_FieldDestroy(temp_target_grid, rc=rc)
!call ESMF_FieldDestroy(u_s_target_grid, rc=rc)
!call ESMF_FieldDestroy(v_s_target_grid, rc=rc)
!call ESMF_FieldDestroy(wind_target_grid, rc=rc)
call ESMF_FieldDestroy(xwind_target_grid, rc=rc)
call ESMF_FieldDestroy(ywind_target_grid, rc=rc)
Expand All @@ -2515,19 +2516,19 @@ subroutine cleanup_all_target_atm_data
call ESMF_FieldDestroy(xwind_w_target_grid, rc=rc)
call ESMF_FieldDestroy(ywind_w_target_grid, rc=rc)
call ESMF_FieldDestroy(zwind_w_target_grid, rc=rc)
call ESMF_FieldDestroy(u_w_target_grid, rc=rc)
call ESMF_FieldDestroy(v_w_target_grid, rc=rc)
call ESMF_FieldDestroy(zh_target_grid, rc=rc)
!call ESMF_FieldDestroy(u_w_target_grid, rc=rc)
!call ESMF_FieldDestroy(v_w_target_grid, rc=rc)
!call ESMF_FieldDestroy(zh_target_grid, rc=rc)

do i = 1, num_tracers
call ESMF_FieldDestroy(tracers_target_grid(i), rc=rc)
enddo
!do i = 1, num_tracers
! call ESMF_FieldDestroy(tracers_target_grid(i), rc=rc)
!enddo

deallocate(tracers_target_grid)
!deallocate(tracers_target_grid)

if (ESMF_FieldIsCreated(qnifa_climo_target_grid)) then
call ESMF_FieldDestroy(qnifa_climo_target_grid, rc=rc)
endif
!if (ESMF_FieldIsCreated(qnifa_climo_target_grid)) then
! call ESMF_FieldDestroy(qnifa_climo_target_grid, rc=rc)
!endif

call cleanup_atmosphere_target_data

Expand Down

0 comments on commit 95f3bca

Please sign in to comment.