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

latest version of fv_regional_bc.F90 bug fix #159

Merged
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[submodule "atmos_cubed_sphere"]
path = atmos_cubed_sphere
url = https://github.com/NOAA-GSL/GFDL_atmos_cubed_sphere
branch = RRFS_dev
url = https://github.com/SamuelTrahanNOAA/GFDL_atmos_cubed_sphere
branch = bugfix/RRFS_dev_debug_v3
[submodule "ccpp/framework"]
path = ccpp/framework
url = https://github.com/NCAR/ccpp-framework
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NOAA-GSL/ccpp-physics
branch = RRFS_dev
url = https://github.com/hu5970/ccpp-physics
branch = rrfs_baseE
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ add_library(fv3atm
cpl/module_cplfields.F90
cpl/module_cap_cpl.F90
io/FV3GFS_io.F90
io/FV3GFS_io_generic.F90
io/FV3GFS_io_netcdf.F90
io/module_write_netcdf.F90
io/module_fv3_io_def.F90
io/module_write_internal_state.F90
Expand Down
11 changes: 8 additions & 3 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ module atmos_model_mod
real(kind=8), pointer, dimension(:,:) :: area
real(kind=8), pointer, dimension(:,:,:) :: layer_hgt, level_hgt
type(domain2d) :: domain ! domain decomposition
type(domain2d) :: domain_for_read ! domain decomposition
type(time_type) :: Time ! current time
type(time_type) :: Time_step ! atmospheric time step.
type(time_type) :: Time_init ! reference time.
Expand Down Expand Up @@ -173,7 +174,9 @@ module atmos_model_mod
!logical :: debug = .true.
logical :: sync = .false.
real :: avg_max_length=3600.
namelist /atmos_model_nml/ blocksize, chksum_debug, dycore_only, debug, sync, ccpp_suite, avg_max_length
logical :: ignore_rst_cksum = .false.
namelist /atmos_model_nml/ blocksize, chksum_debug, dycore_only, debug, sync, ccpp_suite, avg_max_length, &
ignore_rst_cksum

type (time_type) :: diag_time, diag_time_fhzero

Expand Down Expand Up @@ -553,7 +556,8 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
!-----------------------------------------------------------------------
call atmosphere_resolution (nlon, nlat, global=.false.)
call atmosphere_resolution (mlon, mlat, global=.true.)
call atmosphere_domain (Atmos%domain, Atmos%layout, Atmos%regional, Atmos%nested, &
call atmosphere_domain (Atmos%domain, Atmos%domain_for_read, Atmos%layout, &
Atmos%regional, Atmos%nested, &
Atmos%moving_nest_parent, Atmos%is_moving_nest, &
Atmos%ngrids, Atmos%mygrid, Atmos%pelist)
call atmosphere_diag_axes (Atmos%axes)
Expand Down Expand Up @@ -718,7 +722,8 @@ 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)
call FV3GFS_restart_read (GFS_data, GFS_restart_var, Atm_block, GFS_control, Atmos%domain, Atm(mygrid)%flagstruct%warm_start)
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
call read_ca_restart (Atmos%domain,GFS_control%ncells,GFS_control%nca,GFS_control%ncells_g,GFS_control%nca_g)
endif
Expand Down
29 changes: 16 additions & 13 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module FV3GFS_io_mod
use mpp_mod, only: mpp_error, mpp_pe, mpp_root_pe, &
mpp_chksum, NOTE, FATAL
use fms_mod, only: stdout
use FV3GFS_io_generic_mod, only: GFS_io_generic_type, unlimited, &
use fms2_io_mod, only: FmsNetcdfDomainFile_t, unlimited, &
open_file, close_file, &
register_axis, register_restart_field, &
register_variable_attribute, register_field, &
Expand Down Expand Up @@ -65,8 +65,8 @@ module FV3GFS_io_mod
character(len=32) :: fn_rrfssd = 'SMOKE_RRFS_data.nc'

!--- GFDL FMS netcdf restart data types defined in fms2_io
type(GFS_io_generic_type) :: Oro_restart, Sfc_restart, Phy_restart, dust12m_restart, emi_restart, rrfssd_restart
type(GFS_io_generic_type) :: Oro_ls_restart, Oro_ss_restart
type(FmsNetcdfDomainFile_t) :: Oro_restart, Sfc_restart, Phy_restart, dust12m_restart, emi_restart, rrfssd_restart
type(FmsNetcdfDomainFile_t) :: Oro_ls_restart, Oro_ss_restart

!--- GFDL FMS restart containers
character(len=32), allocatable, dimension(:) :: oro_name2, sfc_name2, sfc_name3
Expand Down Expand Up @@ -144,19 +144,20 @@ module FV3GFS_io_mod
!--------------------
! FV3GFS_restart_read
!--------------------
subroutine FV3GFS_restart_read (GFS_Data, GFS_Restart, Atm_block, Model, fv_domain, warm_start)
subroutine FV3GFS_restart_read (GFS_Data, GFS_Restart, Atm_block, Model, fv_domain, warm_start, ignore_rst_cksum)
type(GFS_data_type), intent(inout) :: GFS_Data(:)
type(GFS_restart_type), intent(inout) :: GFS_Restart
type(block_control_type), intent(in) :: Atm_block
type(GFS_control_type), intent(inout) :: Model
type(domain2d), intent(in) :: fv_domain
logical, intent(in) :: warm_start
logical, intent(in) :: ignore_rst_cksum

!--- read in surface data from chgres
call sfc_prop_restart_read (GFS_Data%Sfcprop, Atm_block, Model, fv_domain, warm_start)
call sfc_prop_restart_read (GFS_Data%Sfcprop, Atm_block, Model, fv_domain, warm_start, ignore_rst_cksum)

!--- read in physics restart data
call phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain)
call phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain, ignore_rst_cksum)

end subroutine FV3GFS_restart_read

Expand Down Expand Up @@ -530,13 +531,14 @@ end subroutine FV3GFS_GFS_checksum
! opens: oro_data.tile?.nc, sfc_data.tile?.nc
!
!----------------------------------------------------------------------
subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_start)
subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_start, ignore_rst_cksum)
!--- interface variable definitions
type(GFS_sfcprop_type), intent(inout) :: Sfcprop(:)
type (block_control_type), intent(in) :: Atm_block
type(GFS_control_type), intent(inout) :: Model
type (domain2d), intent(in) :: fv_domain
logical, intent(in) :: warm_start
logical, intent(in) :: ignore_rst_cksum
!--- local variables
integer :: i, j, k, ix, lsoil, num, nb, i_start, j_start, i_end, j_end
integer :: isc, iec, jsc, jec, npz, nx, ny
Expand Down Expand Up @@ -659,7 +661,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta

!--- read the orography restart/data
call mpp_error(NOTE,'reading topographic/orographic information from INPUT/oro_data.tile*.nc')
call read_restart(Oro_restart)
call read_restart(Oro_restart, ignore_checksum=ignore_rst_cksum)
call close_file(Oro_restart)


Expand Down Expand Up @@ -918,11 +920,11 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta
!--- read new GSL created orography restart/data
call mpp_error(NOTE,'reading topographic/orographic information from &
&INPUT/oro_data_ls.tile*.nc')
call read_restart(Oro_ls_restart)
call read_restart(Oro_ls_restart, ignore_checksum=ignore_rst_cksum)
call close_file(Oro_ls_restart)
call mpp_error(NOTE,'reading topographic/orographic information from &
&INPUT/oro_data_ss.tile*.nc')
call read_restart(Oro_ss_restart)
call read_restart(Oro_ss_restart, ignore_checksum=ignore_rst_cksum)
call close_file(Oro_ss_restart)


Expand Down Expand Up @@ -1318,7 +1320,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta

!--- read the surface restart/data
call mpp_error(NOTE,'reading surface properties data from INPUT/sfc_data.tile*.nc')
call read_restart(Sfc_restart)
call read_restart(Sfc_restart, ignore_checksum=ignore_rst_cksum)
call close_file(Sfc_restart)

if(Model%rrfs_sd) then
Expand Down Expand Up @@ -2692,12 +2694,13 @@ end subroutine rrfs_sd_copy_to_temporaries
! opens: phys_data.tile?.nc
!
!----------------------------------------------------------------------
subroutine phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain)
subroutine phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain, ignore_rst_cksum)
!--- interface variable definitions
type(GFS_restart_type), intent(in) :: GFS_Restart
type(block_control_type), intent(in) :: Atm_block
type(GFS_control_type), intent(in) :: Model
type(domain2d), intent(in) :: fv_domain
logical, intent(in) :: ignore_rst_cksum
!--- local variables
integer :: i, j, k, nb, ix, num
integer :: isc, iec, jsc, jec, npz, nx, ny
Expand Down Expand Up @@ -2758,7 +2761,7 @@ subroutine phys_restart_read (GFS_Restart, Atm_block, Model, fv_domain)

!--- read the surface restart/data
call mpp_error(NOTE,'reading physics restart data from INPUT/phy_data.tile*.nc')
call read_restart(Phy_restart)
call read_restart(Phy_restart, ignore_checksum=ignore_rst_cksum)
call close_file(Phy_restart)

!--- place the data into the block GFS containers
Expand Down
Loading