Skip to content

Commit

Permalink
Merge pull request #91 from grantfirl/ufs-dev-PR49
Browse files Browse the repository at this point in the history
UFS-dev PR#49
  • Loading branch information
grantfirl authored Apr 18, 2023
2 parents e5ff845 + b64e2d6 commit 73f7c1e
Show file tree
Hide file tree
Showing 18 changed files with 2,766 additions and 379 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ add_library(fv3atm
cpl/module_cplfields.F90
cpl/module_cap_cpl.F90
io/FV3GFS_io.F90
io/FV3GFS_restart_io.F90
io/module_write_netcdf.F90
io/module_write_restart_netcdf.F90
io/module_fv3_io_def.F90
io/module_write_internal_state.F90
io/module_wrt_grid_comp.F90
Expand Down
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
40 changes: 22 additions & 18 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module atmos_model_mod
use fms_mod, only: check_nml_error
use diag_manager_mod, only: diag_send_complete_instant
use time_manager_mod, only: time_type, get_time, get_date, &
operator(+), operator(-),real_to_time_type
operator(+), operator(-), real_to_time_type
use field_manager_mod, only: MODEL_ATMOS
use tracer_manager_mod, only: get_number_tracers, get_tracer_names, &
get_tracer_index, NO_TRACER
Expand Down Expand Up @@ -94,9 +94,15 @@ module atmos_model_mod
FV3GFS_GFS_checksum, &
FV3GFS_diag_register, FV3GFS_diag_output, &
DIAG_SIZE
use FV3GFS_restart_io_mod, only: FV3GFS_restart_register, &
fv_phy_restart_output, &
fv_sfc_restart_output
use fv_ufs_restart_io_mod, only: fv_dyn_restart_register, &
fv_dyn_restart_output
use fv_iau_mod, only: iau_external_data_type,getiauforcing,iau_initialize
use module_fv3_config, only: output_1st_tstep_rst, first_kdt, nsout, &
output_fh, fcst_mpi_comm, fcst_ntasks
output_fh, fcst_mpi_comm, fcst_ntasks, &
quilting_restart
use module_block_data, only: block_atmos_copy, block_data_copy, &
block_data_copy_or_fill, &
block_data_combine_fractions
Expand Down Expand Up @@ -177,7 +183,6 @@ module atmos_model_mod
logical :: debug = .false.
!logical :: debug = .true.
logical :: sync = .false.
logical :: restart_endfcst = .false.
real :: avg_max_length=3600.
logical :: ignore_rst_cksum = .false.
namelist /atmos_model_nml/ blocksize, chksum_debug, dycore_only, debug, sync, ccpp_suite, avg_max_length, &
Expand Down Expand Up @@ -735,6 +740,10 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call GFS_restart_populate (GFS_restart_var, GFS_control, GFS_data%Statein, GFS_data%Stateout, GFS_data%Sfcprop, &
GFS_data%Coupling, GFS_data%Grid, GFS_data%Tbd, GFS_data%Cldprop, GFS_data%Radtend, &
GFS_data%IntDiag, Init_parm, GFS_Diag)
if (quilting_restart) then
call fv_dyn_restart_register (Atm(mygrid))
call FV3GFS_restart_register (GFS_data%Sfcprop, GFS_restart_var, Atm_block, GFS_control)
endif
call FV3GFS_restart_read (GFS_data, GFS_restart_var, Atm_block, GFS_control, Atmos%domain_for_read, &
Atm(mygrid)%flagstruct%warm_start, ignore_rst_cksum)
if(GFS_control%do_ca .and. Atm(mygrid)%flagstruct%warm_start)then
Expand Down Expand Up @@ -1055,21 +1064,10 @@ subroutine atmos_model_end (Atmos)
endif
#endif

call atmosphere_end (Atmos % Time, Atmos%grid, restart_endfcst)
call atmosphere_end (Atmos % Time, Atmos%grid, .false.)

if(restart_endfcst) then
call FV3GFS_restart_write (GFS_data, GFS_restart_var, Atm_block, &
GFS_control, Atmos%domain)
! call write_stoch_restart_atm('RESTART/atm_stoch.res.nc')
endif
if (GFS_Control%do_sppt .or. GFS_Control%do_shum .or. GFS_Control%do_skeb .or. &
GFS_Control%lndp_type > 0 .or. GFS_Control%do_ca .or. GFS_Control%do_spp) then
if(restart_endfcst) then
call write_stoch_restart_atm('RESTART/atm_stoch.res.nc')
if (GFS_control%do_ca)then
call write_ca_restart()
endif
endif
call stochastic_physics_wrapper_end(GFS_control)
endif

Expand Down Expand Up @@ -1099,9 +1097,15 @@ subroutine atmos_model_restart(Atmos, timestamp)
type (atmos_data_type), intent(inout) :: Atmos
character(len=*), intent(in) :: timestamp

call atmosphere_restart(timestamp)
call FV3GFS_restart_write (GFS_data, GFS_restart_var, Atm_block, &
GFS_control, Atmos%domain, timestamp)
if (quilting_restart) then
call fv_sfc_restart_output(GFS_Data%Sfcprop, Atm_block, GFS_control)
call fv_phy_restart_output(GFS_restart_var, Atm_block)
call fv_dyn_restart_output(Atm(mygrid), timestamp)
else
call atmosphere_restart(timestamp)
call FV3GFS_restart_write (GFS_data, GFS_restart_var, Atm_block, &
GFS_control, Atmos%domain, timestamp)
endif
if(GFS_control%do_ca)then
call write_ca_restart(timestamp)
endif
Expand Down
28 changes: 0 additions & 28 deletions ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -739,20 +739,6 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[evbs]
standard_name = soil_upward_latent_heat_flux
long_name = soil upward latent heat flux
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[evcw]
standard_name = canopy_upward_latent_heat_flux
long_name = canopy upward latent heat flux
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[pah]
standard_name = total_precipitation_advected_heat
long_name = precipitation advected heat - total
Expand Down Expand Up @@ -1900,13 +1886,6 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
[sbsno]
standard_name = snow_deposition_sublimation_upward_latent_heat_flux
long_name = latent heat flux from snow depo/subl
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[scmpsw]
standard_name = components_of_surface_downward_shortwave_fluxes
long_name = derived type for special components of surface downward shortwave fluxes
Expand Down Expand Up @@ -2107,13 +2086,6 @@
units = flag
dimensions = ()
type = logical
[trans]
standard_name = transpiration_flux
long_name = total plant transpiration rate
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tseal]
standard_name = surface_skin_temperature_for_nsst
long_name = ocean surface skin temperature
Expand Down
Loading

0 comments on commit 73f7c1e

Please sign in to comment.