Skip to content

Commit

Permalink
Issue 672
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Aug 11, 2022
1 parent 8329e07 commit a282821
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
5 changes: 3 additions & 2 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ subroutine GFS_phys_time_vary_timestep_init (
imfdeepcnv, cal_pre, random_clds, nscyc, ntoz, h2o_phys, iaerclm, iccn, clstp, &
jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl, iflip, &
jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, &
jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, &
jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, in_nm, ccn_nm, fn_nml, &
imap, jmap, prsl, seed0, rann, nthrds, nx, ny, nsst, tile_num, nlunit, lsoil, lsoil_lsm,&
kice, ialb, isot, ivegsrc, input_nml_file, use_ufo, nst_anl, frac_grid, fhcyc, phour, &
lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, &
Expand Down Expand Up @@ -754,6 +754,7 @@ subroutine GFS_phys_time_vary_timestep_init (
integer, intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil
integer, intent(in) :: lsoil_lsm, kice, ialb, isot, ivegsrc
character(len=*), intent(in) :: input_nml_file(:)
character(len=*), intent(in) :: fn_nml
logical, intent(in) :: use_ufo, nst_anl, frac_grid
real(kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, &
xlat_d(:), xlon_d(:), landfrac(:)
Expand Down Expand Up @@ -894,7 +895,7 @@ subroutine GFS_phys_time_vary_timestep_init (
!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
if (nscyc > 0) then
if (mod(kdt,nscyc) == 1) THEN
call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, &
input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,&
frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
Expand Down
8 changes: 8 additions & 0 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,14 @@
type = real
kind = kind_phys
intent = inout
[fn_nml]
standard_name = filename_of_namelist
long_name = namelist filename
units = none
dimensions = ()
type = character
kind = len=*
intent = in
[imap]
standard_name = map_of_block_column_number_to_global_i_index
long_name = map of local index ix to global index i for this block
Expand Down
13 changes: 7 additions & 6 deletions physics/gcycle.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module gcycle_mod
!>\ingroup mod_GFS_phys_time_vary
!! This subroutine repopulates specific time-varying surface properties for
!! atmospheric forecast runs.
subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, fn_nml, &
input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice, &
frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
Expand All @@ -31,6 +31,7 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit,
integer, intent(in) :: me, nthrds, nx, ny, isc, jsc, nsst, &
tile_num, nlunit, lsoil, lsoil_lsm, kice
integer, intent(in) :: idate(:), ialb, isot, ivegsrc
character(len = 64), intent(in) :: fn_nml
character(len=*), intent(in) :: input_nml_file(:)
logical, intent(in) :: use_ufo, nst_anl, frac_grid
real(kind=kind_phys), intent(in) :: fhcyc, phour, landfrac(:), lakefrac(:), &
Expand Down Expand Up @@ -210,13 +211,13 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit,
enddo
!
#ifndef INTERNAL_FILE_NML
inquire (file=trim(Model%fn_nml),exist=exists)
inquire (file=trim(fn_nml),exist=exists)
if (.not. exists) then
write(6,*) 'gcycle:: namelist file: ',trim(Model%fn_nml),' does not exist'
write(6,*) 'gcycle:: namelist file: ',trim(fn_nml),' does not exist'
stop
else
open (unit=Model%nlunit, file=trim(Model%fn_nml), action='READ', status='OLD', iostat=ios)
rewind (Model%nlunit)
open (unit=nlunit, file=trim(fn_nml), action='READ', status='OLD', iostat=ios)
rewind (nlunit)
endif
#endif
CALL SFCCYCLE (9998, npts, max(lsoil,lsoil_lsm), sig1t, fhcyc, &
Expand All @@ -233,7 +234,7 @@ subroutine gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit,
min_ice, ialb, isot, ivegsrc, &
trim(tile_num_ch), i_indx, j_indx)
#ifndef INTERNAL_FILE_NML
close (Model%nlunit)
close (nlunit)
#endif
!
if ( nsst > 0 ) then
Expand Down

0 comments on commit a282821

Please sign in to comment.