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

Issue 1984 fix: reduce warnings for ccpp-physics #149

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
4 changes: 4 additions & 0 deletions physics/GWD/unified_ugwp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ subroutine unified_ugwp_run(me, master, im, levs, ak,bk, ntrac, dtp, fhzero, kdt
errmsg = ''
errflg = 0

! Initialize variables not being used
zmtb(:) = 0.0
zlwb(:) = 0.0
zogb(:) = 0.0

! 1) ORO stationary GWs
! ------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ end subroutine GFS_surface_generic_pre_init
!!
subroutine GFS_surface_generic_pre_run (nthreads, im, levs, vfrac, islmsk, isot, ivegsrc, stype, scolor,vtype, slope, &
prsik_1, prslk_1, tsfc, phil, con_g, sigmaf, work3, zlvl, &
drain_cpl, dsnow_cpl, rain_cpl, snow_cpl, lndp_type, n_var_lndp, sfc_wts, &
lndp_var_list, lndp_prt_list, &
lndp_type, n_var_lndp, sfc_wts, lndp_var_list, lndp_prt_list, &
z01d, zt1d, bexp1d, xlai1d, vegf1d, lndp_vgf, &
cplflx, flag_cice, islmsk_cice, slimskin_cpl, &
wind, u1, v1, cnvwind, smcwlt2, smcref2, vtype_save, stype_save,scolor_save, slope_save, &
Expand All @@ -87,10 +86,6 @@ subroutine GFS_surface_generic_pre_run (nthreads, im, levs, vfrac, islmsk, isot,
real(kind=kind_phys), dimension(:), intent(inout) :: sigmaf, work3, zlvl

! Stochastic physics / surface perturbations
real(kind=kind_phys), dimension(:), intent(out) :: drain_cpl
real(kind=kind_phys), dimension(:), intent(out) :: dsnow_cpl
real(kind=kind_phys), dimension(:), intent(in) :: rain_cpl
real(kind=kind_phys), dimension(:), intent(in) :: snow_cpl
integer, intent(in) :: lndp_type, n_var_lndp
character(len=3), dimension(:), intent(in) :: lndp_var_list
real(kind=kind_phys), dimension(:), intent(in) :: lndp_prt_list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,38 +290,6 @@
type = real
kind = kind_phys
intent = inout
[drain_cpl]
standard_name = tendency_of_lwe_thickness_of_rain_amount_on_dynamics_timestep_for_coupling
long_name = change in rain_cpl (coupling_type)
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[dsnow_cpl]
standard_name = tendency_of_lwe_thickness_of_snowfall_amount_on_dynamics_timestep_for_coupling
long_name = change in show_cpl (coupling_type)
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[rain_cpl]
standard_name = cumulative_lwe_thickness_of_precipitation_amount_for_coupling
long_name = total rain precipitation
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[snow_cpl]
standard_name = cumulative_lwe_thickness_of_snow_amount_for_coupling
long_name = total snow precipitation
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[lndp_type]
standard_name = control_for_stochastic_land_surface_perturbation
long_name = index for stochastic land surface perturbations type
Expand Down
41 changes: 29 additions & 12 deletions physics/photochem/module_ozphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,18 @@ function load_o3prog(this, file, fileID) result (err_message)
integer, intent(in) :: fileID
character(len=*), intent(in) :: file
character(len=128) :: err_message
integer :: i1, i2, i3
integer :: i1, i2, i3, ierr
real(kind=4), dimension(:), allocatable :: lat4, pres4, time4, tempin
real(kind=4) :: blatc4

! initialize error message
err_message = ""

! Get dimensions from data file
open(unit=fileID,file=trim(file), form='unformatted', convert='big_endian')
read (fileID) this%ncf, this%nlat, this%nlev, this%ntime
open(unit=fileID,file=trim(file), form='unformatted', convert='big_endian', iostat=ierr, iomsg=err_message)
if (ierr /= 0 ) return
read (fileID, iostat=ierr, iomsg=err_message) this%ncf, this%nlat, this%nlev, this%ntime
if (ierr /= 0 ) return
rewind(fileID)

allocate (this%lat(this%nlat))
Expand All @@ -111,7 +116,8 @@ function load_o3prog(this, file, fileID) result (err_message)
allocate (this%data(this%nlat,this%nlev,this%ncf,this%ntime))

allocate(lat4(this%nlat), pres4(this%nlev), time4(this%ntime+1))
read (fileID) this%ncf, this%nlat, this%nlev, this%ntime, lat4, pres4, time4
read (fileID, iostat=ierr, iomsg=err_message) this%ncf, this%nlat, this%nlev, this%ntime, lat4, pres4, time4
if (ierr /= 0 ) return

! Store
this%pres(:) = pres4(:)
Expand All @@ -124,7 +130,8 @@ function load_o3prog(this, file, fileID) result (err_message)
do i1=1,this%ntime
do i2=1,this%ncf
do i3=1,this%nlev
read(fileID) tempin
read(fileID, iostat=ierr, iomsg=err_message) tempin
if (ierr /= 0 ) return
this%data(:,i3,i2,i1) = tempin(:)
enddo
enddo
Expand Down Expand Up @@ -520,12 +527,18 @@ function load_o3clim(this, file, fileID) result (err_message)

! Locals
real(kind=4) :: blatc4
integer :: iLev, iLat, imo
integer :: iLev, iLat, imo, ierr
real(kind=4), allocatable :: o3clim4(:,:,:), pstr4(:)
integer, allocatable :: imond(:), ilatt(:,:)

open(unit=fileID,file=trim(file), form='unformatted', convert='big_endian')
read (fileID,end=101) this%nlatc, this%nlevc, this%ntimec, blatc4
! initialize error message
err_message = ""

open(unit=fileID,file=trim(file),form='unformatted',convert='big_endian', iostat=ierr, iomsg=err_message)
if (ierr /= 0 ) return
read (fileID,end=101,iostat=ierr,iomsg=err_message) this%nlatc, this%nlevc, this%ntimec, blatc4
if (ierr /= 0 ) return

101 if (this%nlevc < 10 .or. this%nlevc > 100) then
rewind (fileID)
this%nlevc = 17
Expand All @@ -545,15 +558,18 @@ function load_o3clim(this, file, fileID) result (err_message)
allocate (this%pkstr(this%nlevc), this%pstr(this%nlevc), this%datac(this%nlatc,this%nlevc,12))
if ( this%nlevc == 17 ) then ! For the operational ozone climatology
do iLev = 1, this%nlevc
read (fileID,15) pstr4(iLev)
read (fileID,15,iostat=ierr,iomsg=err_message) pstr4(iLev)
if (ierr /= 0 ) return
15 format(f10.3)
enddo

do imo = 1, 12
do iLat = 1, this%nlatc
read (fileID,16) imond(imo), ilatt(iLat,imo), (o3clim4(iLat,iLev,imo),iLev=1,10)
read (fileID,16,iostat=ierr,iomsg=err_message) imond(imo), ilatt(iLat,imo), (o3clim4(iLat,iLev,imo),iLev=1,10)
if (ierr /= 0 ) return
16 format(i2,i4,10f6.2)
read (fileID,20) (o3clim4(iLat,iLev,imo),iLev=11,this%nlevc)
read (fileID,20,iostat=ierr,iomsg=err_message) (o3clim4(iLat,iLev,imo),iLev=11,this%nlevc)
if (ierr /= 0 ) return
20 format(6x,10f6.2)
enddo
enddo
Expand All @@ -565,7 +581,8 @@ function load_o3clim(this, file, fileID) result (err_message)

do imo = 1, 12
do iLev = 1, this%nlevc
read (fileID) (o3clim4(iLat,iLev,imo),iLat=1,this%nlatc)
read (fileID,iostat=ierr,iomsg=err_message) (o3clim4(iLat,iLev,imo),iLat=1,this%nlatc)
if (ierr /= 0 ) return
enddo
enddo
endif ! end if_this%nlevc_block
Expand Down