Skip to content

Commit

Permalink
Address compiler warnings for FV3 raised in an issue (NOAA-GFDL#324)
Browse files Browse the repository at this point in the history
* give istatus a value on exit from hailcast_init

* fix issues with declared out variables in test_cases.F90

* fix out of range default integers, eol spaces, and remove delz argument from set_regional_BCs in fv_regional_bc.F90

* removed -nowarn from Intel compiler flags

* added suggested ifdef to remove goto warning as per operations
  • Loading branch information
bensonr authored and laurenchilutti committed Jul 18, 2024
1 parent 3a7ac59 commit 8498046
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion model/fv_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill,

reg_bc_update_time=current_time_in_seconds
call set_regional_BCs & !<-- Insert values into the boundary region valid for the start of this large timestep.
(delp,delz,w,pt &
(delp,w,pt &
#ifdef USE_COND
,q_con &
#endif
Expand Down
16 changes: 8 additions & 8 deletions model/fv_regional_bc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ module fv_regional_mod
integer,parameter :: bc_time_interval=3 &
,nhalo_data =4 &
,nhalo_model=3
integer, public, parameter :: int_init_default = -9999999
!
integer, public, parameter :: H_STAGGER = 1
integer, public, parameter :: U_STAGGER = 2
Expand Down Expand Up @@ -4033,7 +4034,7 @@ end subroutine remap_dwinds_regional_bc
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!---------------------------------------------------------------------

subroutine set_regional_BCs(delp,delz,w,pt &
subroutine set_regional_BCs(delp,w,pt &
#ifdef USE_COND
,q_con &
#endif
Expand All @@ -4042,7 +4043,7 @@ subroutine set_regional_BCs(delp,delz,w,pt &
#endif
,q &
,u,v,uc,vc &
,bd, nlayers &
,bd, nlayers &
,fcst_time )
!
!---------------------------------------------------------------------
Expand Down Expand Up @@ -4074,7 +4075,6 @@ subroutine set_regional_BCs(delp,delz,w,pt &
,pt
!
real,dimension(bd%isd:,bd%jsd:,1:),intent(out) :: w
real,dimension(bd%is:,bd%js:,1:),intent(out) :: delz
#ifdef USE_COND
real,dimension(bd%isd:,bd%jsd:,1:),intent(out) :: q_con
#endif
Expand Down Expand Up @@ -4363,7 +4363,7 @@ subroutine regional_boundary_update(array &
!
integer,intent(in) :: is,ie,js,je & !<-- Compute limits
,isd,ied,jsd,jed & !<-- Memory limits
,it !<-- Acoustic step
,it !<-- Acoustic step
!
integer,intent(in),optional :: index4 !<-- Index for the 4-D tracer array.
!
Expand Down Expand Up @@ -4453,7 +4453,7 @@ subroutine regional_boundary_update(array &
endif
j1_blend=js
j2_blend=js+nrows_blend_user-1
i_bc=-9e9
i_bc=int_init_default
j_bc=j2
!
endif
Expand Down Expand Up @@ -4503,7 +4503,7 @@ subroutine regional_boundary_update(array &
j2_blend=je+1
endif
j1_blend=j2_blend-nrows_blend_user+1
i_bc=-9e9
i_bc=int_init_default
j_bc=j1
!
endif
Expand Down Expand Up @@ -4560,7 +4560,7 @@ subroutine regional_boundary_update(array &
j2_blend=j2_blend+1
endif
i_bc=i2
j_bc=-9e9
j_bc=int_init_default
!
endif
endif
Expand Down Expand Up @@ -4619,7 +4619,7 @@ subroutine regional_boundary_update(array &
j2_blend=j2_blend+1
endif
i_bc=i1
j_bc=-9e9
j_bc=int_init_default
!
endif
endif
Expand Down
5 changes: 2 additions & 3 deletions tools/test_cases.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ subroutine init_case(u,v,w,pt,delp,q,phis, ps,pe,peln,pk,pkz, uc,vc, ua,va, ak,
! Iterate then interpolate to get balanced pt & pk on the sphere
! Adjusting ptop
call SuperK_u(npz, zs1, uz1, dudz)
call balanced_K(npz, is, ie, js, je, ng, pe1(npz+1), ze1, ts1, qs1, uz1, dudz, pe, pk, pt, &
call balanced_K(npz, is, ie, js, je, ng, pe1(npz+1), ze1, ts1, qs1, uz1, dudz, pe, pt, &
delz, zvir, ptop, ak, bk, agrid)
do j=js,je
do i=is,ie
Expand Down Expand Up @@ -6300,7 +6300,7 @@ subroutine SuperK_Sounding(km, pe, p00, ze, pt, qz)

end subroutine SuperK_Sounding

subroutine balanced_K(km, is, ie, js, je, ng, ps0, ze1, ts1, qs1, uz1, dudz, pe, pk, pt, &
subroutine balanced_K(km, is, ie, js, je, ng, ps0, ze1, ts1, qs1, uz1, dudz, pe, pt, &
delz, zvir, ptop, ak, bk, agrid)
integer, intent(in):: is, ie, js, je, ng, km
real, intent(in), dimension(km ):: ts1, qs1, uz1, dudz
Expand All @@ -6311,7 +6311,6 @@ subroutine balanced_K(km, is, ie, js, je, ng, ps0, ze1, ts1, qs1, uz1, dudz, pe,
real, intent(inout), dimension(km+1):: ak, bk
real, intent(inout), dimension(is:ie,js:je,km):: pt
real, intent(inout), dimension(is:,js:,1:) :: delz
real, intent(out), dimension(is:ie,js:je,km+1):: pk
! pt is FV's cp*thelta_v
real, intent(inout), dimension(is-1:ie+1,km+1,js-1:je+1):: pe
! Local
Expand Down

0 comments on commit 8498046

Please sign in to comment.