Skip to content
5 changes: 2 additions & 3 deletions physics/GWD/cires_ugwpv1_oro.F90
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, &
real(kind=kind_phys),dimension(im),intent(out) :: zobl, zogw, zlwb, tau_ogw

character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg
integer, intent(out) :: errflg
!
!
! locals vars for SSO
Expand Down Expand Up @@ -1008,13 +1008,12 @@ subroutine orogw_v1 (im, km, imx, me, master, dtp, kdt, do_tofd, &
endif
endif

return
end subroutine orogw_v1
!
!
subroutine ugwp_tofd1d(levs, con_cp, dtp, sigflt, zsurf, zpbl, u, v, &
zmid, utofd, vtofd, epstofd, krf_tofd)

use machine , only : kind_phys
use ugwp_oro_init, only : n_tofd, const_tofd, ze_tofd, a12_tofd, ztop_tofd
!
Expand Down
4 changes: 4 additions & 0 deletions physics/GWD/ugwpv1_gsldrag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,8 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
index_of_y_wind, ldiag3d, ldiag_ugwp, &
ugwp_seq_update, spp_wts_gwd, spp_gwd, errmsg, errflg)
endif
if(errflg/=0) return

!
! dusfcg = du_ogwcol + du_oblcol + du_osscol + du_ofdcol
!
Expand Down Expand Up @@ -635,6 +637,8 @@ subroutine ugwpv1_gsldrag_run(me, master, im, levs, ak, bk, ntrac, lonr, dtp,
dudt_obl, dvdt_obl,dudt_ofd, dvdt_ofd, &
du_ogwcol, dv_ogwcol, du_oblcol, dv_oblcol, &
du_ofdcol, dv_ofdcol, errmsg,errflg )
if(errflg/=0) return

!
! orogw_v1: dusfcg = du_ogwcol + du_oblcol + du_ofdcol only 3 terms
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ subroutine GFS_phys_time_vary_init (
myerrmsg = 'read_aerdata failed without a message'
call read_aerdata (me,master,iflip,idate,myerrmsg,myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
Comment thread
grantfirl marked this conversation as resolved.
Outdated
if(errflg/=0) return
else if(iaermdl ==2 ) then
do ix=1,ntrcaerm
do j=1,levs
Expand All @@ -255,20 +256,23 @@ subroutine GFS_phys_time_vary_init (
myerrmsg = 'read_tau_amf failed without a message'
call read_tau_amf(me, master, myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
if(errflg/=0) return
endif

!> - Initialize soil vegetation (needed for sncovr calculation further down)
myerrflg = 0
myerrmsg = 'set_soilveg failed without a message'
call set_soilveg(me, isot, ivegsrc, nlunit, myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
if(errflg/=0) return

!> - read in NoahMP table (needed for NoahMP init)
if(lsm == lsm_noahmp) then
myerrflg = 0
myerrmsg = 'read_mp_table_parameters failed without a message'
call read_mp_table_parameters(myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
if(errflg/=0) return
endif


Expand Down Expand Up @@ -913,9 +917,7 @@ subroutine GFS_phys_time_vary_timestep_init (
ddy_aer, iindx1_aer, &
iindx2_aer, ddx_aer, &
levs, prsl, aer_nm, errmsg, errflg)
if(errflg /= 0) then
return
endif
if(errflg /= 0) return
endif

!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
Expand Down
17 changes: 13 additions & 4 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, &
endif
iaermdl = iaer/1000 ! control flag for aerosol scheme selection
if ( iaermdl < 0 .or. (iaermdl>2 .and. iaermdl/=5) ) then
print *, ' Error -- IAER flag is incorrect, Abort'
errflg = 1
errmsg = 'ERROR(GFS_rrtmg_setup): IAER flag is incorrect'
return
Expand Down Expand Up @@ -218,14 +217,23 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, &
con_pi )
call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, &
con_pi, con_t0c, con_c, con_boltz, con_plnk, errflg, errmsg)
if(errflg/=0) return

call gas_init ( me, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg )
if(errflg/=0) return

call cld_init ( si, levr, imp_physics, me, con_g, con_rd, errflg, errmsg)
if(errflg/=0) return

call rlwinit ( me, rad_hr_units, inc_minor_gas, icliq_lw, isubcsw, &
iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, &
iovr_exp, iovr_exprand, errflg, errmsg )
if(errflg/=0) return

call rswinit ( me, rad_hr_units, inc_minor_gas, icliq_sw, isubclw, &
iovr, iovr_rand, iovr_maxrand, iovr_max, iovr_dcorr, &
iovr_exp, iovr_exprand,iswmode, errflg, errmsg )
if(errflg/=0) return

if ( me == 0 ) then
print *,' Radiation sub-cloud initial seed =',ipsd0, &
Expand All @@ -235,8 +243,6 @@ subroutine GFS_rrtmg_setup_init ( si, levr, ictm, isol, solar_file, ico2, &
!
is_initialized = .true.
!
return

end subroutine GFS_rrtmg_setup_init

!> \section arg_table_GFS_rrtmg_setup_timestep_init Argument Table
Expand Down Expand Up @@ -446,13 +452,15 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,&
! --- outputs:
& slag,sdec,cdec,solcon,con_pi,errmsg,errflg &
& )
if(errflg/=0) return

endif ! end_if_lsswr_block

!> -# Call module_radiation_aerosols::aer_update(), monthly update, no
!! time interpolation
if ( lmon_chg ) then
call aer_update ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg )
if(errflg/=0) return
endif

!> -# Call co2 and other gases update routine:
Expand All @@ -466,6 +474,8 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,&

call gas_update ( kyear,kmon,kday,khour,lco2_chg, me, co2dat_file, &
co2gbl_file, ictm, ico2, errflg, errmsg )
if(errflg/=0) return

if (ntoz == 0) then
call ozphys%update_o3clim(kmon, kday, khour, loz1st)
endif
Expand All @@ -478,7 +488,6 @@ subroutine radupdate( idate,jdate,deltsw,deltim,lsswr,me, iaermdl,&
!> -# Call clouds update routine (currently not needed)
! call cld_update ( iyear, imon, me )
!
return
!...................................
end subroutine radupdate
!-----------------------------------
Expand Down
7 changes: 5 additions & 2 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,16 @@ subroutine GFS_rrtmgp_setup_init(do_RRTMGP, imp_physics, imp_physics_fer_hires,
call sol_init ( me, isol, solar_file, con_solr_2008, con_solr_2002, con_pi )
call aer_init ( levr, me, iaermdl, iaerflg, lalw1bd, aeros_file, con_pi, con_t0c, &
con_c, con_boltz, con_plnk, errflg, errmsg)
if(errflg/=0) return
call gas_init ( me, co2usr_file, co2cyc_file, ico2, ictm, con_pi, errflg, errmsg )
if(errflg/=0) return

if ( me == 0 ) then
print *,' return from rad_initialize (GFS_rrtmgp_setup_init) - after calling radinit'
endif

is_initialized = .true.

return
end subroutine GFS_rrtmgp_setup_init

!> \section arg_table_GFS_rrtmgp_setup_timestep_init Argument Table
Expand Down Expand Up @@ -222,11 +223,13 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad
endif
iyear0 = iyear
call sol_update(jdate, kyear, deltsw, deltim, lsol_chg, me, slag, sdec, cdec, solcon, con_pi, errmsg, errflg)
if(errflg/=0) return
endif

! Update aerosols...
if ( lmon_chg ) then
call aer_update ( iyear, imon, me, iaermdl, aeros_file, errflg, errmsg)
if(errflg/=0) return
endif

! Update trace gases (co2 only)...
Expand All @@ -238,13 +241,13 @@ subroutine GFS_rrtmgp_setup_timestep_init (idate, jdate, deltsw, deltim, doSWrad
endif
call gas_update (kyear, kmon, kday, khour, lco2_chg, me, co2dat_file, co2gbl_file, ictm,&
ico2, errflg, errmsg )
if(errflg/=0) return
if (ntoz == 0) then
call ozphys%update_o3clim(kmon, kday, khour, loz1st)
endif

if ( loz1st ) loz1st = .false.

return
end subroutine GFS_rrtmgp_setup_timestep_init

!> \section arg_table_GFS_rrtmgp_setup_finalize Argument Table
Expand Down
4 changes: 1 addition & 3 deletions physics/Interstitials/UFS_SCM_NEPTUNE/gcycle.F90
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml,
#ifndef INTERNAL_FILE_NML
inquire (file=trim(fn_nml),exist=exists)
if (.not. exists) then
write(6,*) 'gcycle:: namelist file: ',trim(fn_nml),' does not exist'
errflg = 1
errmsg = 'ERROR(gcycle): namelist file: ',trim(fn_nml),' does not exist.'
return
Expand Down Expand Up @@ -359,7 +358,6 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml,
!
! if (Model%me .eq. 0) print*,'executed gcycle during hour=',fhour
!
RETURN
END
end subroutine gcycle

end module gcycle_mod
1 change: 0 additions & 1 deletion physics/MP/GFDL/module_gfdl_cloud_microphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3601,7 +3601,6 @@ subroutine gfdl_cloud_microphys_mod_init (me, master, nlunit, input_nml_file, lo
#else
inquire (file = trim (fn_nml), exist = exists)
if (.not. exists) then
write (6, *) 'gfdl - mp :: namelist file: ', trim (fn_nml), ' does not exist'
errflg = 1
errmsg = 'ERROR(gfdl_cloud_microphys_mod_init): namelist file '//trim (fn_nml)//' does not exist'
return
Expand Down
Loading