Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = main
url = https://github.com/grantfirl/ccpp-physics
branch = ufs-dev-PR28
#url = https://github.com/NCAR/ccpp-physics
#branch = main
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
2 changes: 1 addition & 1 deletion ccpp/physics
5 changes: 4 additions & 1 deletion fv3_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ module fv3gfs_cap_mod
num_files, filename_base, &
wrttasks_per_group, n_group, &
lead_wrttask, last_wrttask, &
nsout_io, iau_offset, lflname_fulltime
nsout_io, iau_offset, lflname_fulltime, &
time_unlimited
!
use module_fcst_grid_comp, only: fcstSS => SetServices

Expand Down Expand Up @@ -322,6 +323,8 @@ subroutine InitializeAdvertise(gcomp, rc)
!
if(mype==0) print *,'af nems config,nfhout,nsout=',nfhout,nfhmax_hf,nfhout_hf, nsout,noutput_fh

call ESMF_ConfigGetAttribute(config=CF, value=time_unlimited, label ='time_unlimited:', default=.false., rc=rc)

endif ! quilting
!
call ESMF_ConfigGetAttribute(config=CF, value=dt_atmos, label ='dt_atmos:', rc=rc)
Expand Down
1 change: 1 addition & 0 deletions io/module_fv3_io_def.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module module_fv3_io_def
integer :: nbdlphys
integer :: nsout_io, iau_offset
logical :: lflname_fulltime
logical :: time_unlimited

character(len=esmf_maxstr),dimension(:),allocatable :: filename_base
character(len=esmf_maxstr),dimension(:),allocatable :: output_file
Expand Down
16 changes: 10 additions & 6 deletions io/module_write_netcdf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module module_write_netcdf
use netcdf
use module_fv3_io_def,only : ideflate, nbits, &
ichunk2d,jchunk2d,ichunk3d,jchunk3d,kchunk3d, &
output_grid,dx,dy,lon1,lat1,lon2,lat2
output_grid,dx,dy,lon1,lat1,lon2,lat2, &
time_unlimited
use mpi

implicit none
Expand Down Expand Up @@ -896,12 +897,15 @@ subroutine add_dim(ncid, dim_name, dimid, grid, rc)
typekind=typekind, itemCount=n, rc=rc); ESMF_ERR_RETURN(rc)

if (trim(dim_name) == "time") then
! using an unlimited dim requires collective mode (NF90_COLLECTIVE)
! for parallel writes, which seems to slow things down on hera.
!ncerr = nf90_def_dim(ncid, trim(dim_name), NF90_UNLIMITED, dimid); NC_ERR_STOP(ncerr)
ncerr = nf90_def_dim(ncid, trim(dim_name), 1, dimid); NC_ERR_STOP(ncerr)
! using an unlimited dim requires collective mode (NF90_COLLECTIVE)
! for parallel writes, which seems to slow things down on hera.
if (time_unlimited) then
ncerr = nf90_def_dim(ncid, trim(dim_name), NF90_UNLIMITED, dimid); NC_ERR_STOP(ncerr)
else
ncerr = nf90_def_dim(ncid, trim(dim_name), 1, dimid); NC_ERR_STOP(ncerr)
end if
else
ncerr = nf90_def_dim(ncid, trim(dim_name), n, dimid); NC_ERR_STOP(ncerr)
ncerr = nf90_def_dim(ncid, trim(dim_name), n, dimid); NC_ERR_STOP(ncerr)
end if

if (typekind==ESMF_TYPEKIND_R8) then
Expand Down