Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing GNU Warnings #151

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion GFDL_tools/fv_ada_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,8 @@ subroutine ps_nudging(dt, factor, npz, ak, bk, ps_obs, mask, tm, ps, phis, delp,
pt0 = tm(i,j)/(pk0(km+1)-pk0(km))*(kappa*(pn0(km+1)-pn0(km)))
pst = pk0(km+1) + (gz0(i,j)-phis(i,j))/(cp_air*pt0)
endif
666 ps_dt(i,j) = pst**(1./kappa) - ps(i,j)
ps_dt(i,j) = pst**(1./kappa) - ps(i,j)
666 continue ! i-loop
enddo ! j-loop

if( nf_ps>0 ) call del2_scalar(ps_dt, del2_cd, 1, nf_ps, bd, npx, npy, gridstruct, domain)
Expand Down
6 changes: 3 additions & 3 deletions model/fv_regional_bc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ module fv_regional_mod
,oro_data ='oro_data.tile7.halo4.nc'

#ifdef OVERLOAD_R4
real, parameter:: real_snan=x'FFBFFFFF'
real, parameter:: real_snan=real(Z'FFBFFFFF')
#else
real, parameter:: real_snan=x'FFF7FFFFFFFFFFFF'
real, parameter:: real_snan=real(Z'FFF7FFFFFFFFFFFF')
#endif
real(kind=R_GRID), parameter:: dbl_snan=x'FFF7FFFFFFFFFFFF'
real(kind=R_GRID), parameter:: dbl_snan=real(Z'FFF7FFFFFFFFFFFF',kind=R_GRID)

interface dump_field
module procedure dump_field_3d
Expand Down
22 changes: 13 additions & 9 deletions tools/fv_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -5081,25 +5081,29 @@ subroutine ppme(p,qe,delp,im,km)

km1 = km - 1

do 500 k=2,km
do 500 i=1,im
500 a6(i,k) = delp(i,k-1) + delp(i,k)
do k=2,km
do i=1,im
a6(i,k) = delp(i,k-1) + delp(i,k)
enddo
enddo

do 1000 k=1,km1
do 1000 i=1,im
do k=1,km1
do i=1,im
delq(i,k) = p(i,k+1) - p(i,k)
1000 continue
enddo
enddo

do 1220 k=2,km1
do 1220 i=1,im
do k=2,km1
do i=1,im
c1 = (delp(i,k-1)+0.5*delp(i,k))/a6(i,k+1)
c2 = (delp(i,k+1)+0.5*delp(i,k))/a6(i,k)
tmp = delp(i,k)*(c1*delq(i,k) + c2*delq(i,k-1)) / &
(a6(i,k)+delp(i,k+1))
qmax = max(p(i,k-1),p(i,k),p(i,k+1)) - p(i,k)
qmin = p(i,k) - min(p(i,k-1),p(i,k),p(i,k+1))
dc(i,k) = sign(min(abs(tmp),qmax,qmin), tmp)
1220 continue
enddo
enddo

!****6***0*********0*********0*********0*********0*********0**********72
! 4th order interpolation of the provisional cell edge value
Expand Down
2 changes: 1 addition & 1 deletion tools/fv_eta.F90
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ subroutine var_les(km, ak, bk, ptop, ks, pint, s_rate)
real ep, es, alpha, beta, gama
real, parameter:: akap = 2./7.
!---- Tunable parameters:
real:: k_inc = 10 ! # of layers from bottom up to near const dz region
integer:: k_inc = 10 ! # of layers from bottom up to near const dz region
real:: s0 = 0.8 ! lowest layer stretch factor
!-----------------------
real:: s_inc
Expand Down
3 changes: 2 additions & 1 deletion tools/fv_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,8 @@ subroutine ps_nudging(dt, factor, factor_nwp, npz, ak, bk, ps_obs, mask, tm, ps,
pt0 = tm(i,j)/(pk0(km+1)-pk0(km))*(kappa*(pn0(km+1)-pn0(km)))
pst = pk0(km+1) + (gz0(i,j)-phis(i,j))/(cp_air*pt0)
endif
666 ps_dt(i,j) = pst**(1./kappa) - ps(i,j)
ps_dt(i,j) = pst**(1./kappa) - ps(i,j)
Copy link
Contributor

Choose a reason for hiding this comment

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

In the original code, 'goto 666' will execute the ps_dt(i,j) assignment. The revised code will not.

666 continue ! i-loop
enddo ! j-loop

if( nf_ps>0 ) call del2_scalar(ps_dt, del2_cd, 1, nf_ps, bd, npx, npy, gridstruct, domain)
Expand Down