From b877da3d4d1d51698084a81e72a60943bce8790d Mon Sep 17 00:00:00 2001 From: Dusan Jovic <48258889+DusanJovic-NOAA@users.noreply.github.com> Date: Wed, 28 Dec 2022 12:03:03 -0500 Subject: [PATCH 1/4] Add optional 'time_unlimited' logical flag to model_configure (#612) This flag is set to .false.by default. When the user sets it to .true. explicitly in the model_configure file the time dimension in history files will be a record dimension (ie. unlimited) --- fv3_cap.F90 | 5 ++++- io/module_fv3_io_def.F90 | 1 + io/module_write_netcdf.F90 | 16 ++++++++++------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/fv3_cap.F90 b/fv3_cap.F90 index b647414a8..731d0e239 100644 --- a/fv3_cap.F90 +++ b/fv3_cap.F90 @@ -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 @@ -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) diff --git a/io/module_fv3_io_def.F90 b/io/module_fv3_io_def.F90 index dda5310ad..30fa553f6 100644 --- a/io/module_fv3_io_def.F90 +++ b/io/module_fv3_io_def.F90 @@ -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 diff --git a/io/module_write_netcdf.F90 b/io/module_write_netcdf.F90 index 787894ebc..7bf85686e 100644 --- a/io/module_write_netcdf.F90 +++ b/io/module_write_netcdf.F90 @@ -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 @@ -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 From a2e9109b1af6634abea55da3d6fa10030e8a1352 Mon Sep 17 00:00:00 2001 From: dustinswales Date: Fri, 6 Jan 2023 11:37:00 -0700 Subject: [PATCH 2/4] MYNNsfc uniform real kind (#611) * MYNNsfc uniform real kind --- ccpp/framework | 2 +- ccpp/physics | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ccpp/framework b/ccpp/framework index d4a000313..1b6352fb2 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit d4a00031381afa7cd90589040a5c7e8f53991801 +Subproject commit 1b6352fb24f053b738bde72eed0ddf0b60ec7c0f diff --git a/ccpp/physics b/ccpp/physics index df5f5e2aa..431591299 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit df5f5e2aaaff0d56609dd9e89c0ba9f32acc79fa +Subproject commit 43159129954280bfb6fa43f24efb815f66338115 From 2673541739b7f27281ee04f37eb14d3297b2d098 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 9 Jan 2023 15:21:35 -0700 Subject: [PATCH 3/4] update .gitmodules for testing --- .gitmodules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6bb663df1..e8ad9e32c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 From 5e667bea3963371153a58fc32a2285367c840c0d Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 23 Jan 2023 13:14:37 -0500 Subject: [PATCH 4/4] update ccpp/physics submodule pointer and .gitmodules --- .gitmodules | 6 ++---- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index e8ad9e32c..6bb663df1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,10 +8,8 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/grantfirl/ccpp-physics - branch = ufs-dev-PR28 - #url = https://github.com/NCAR/ccpp-physics - #branch = main + url = https://github.com/NCAR/ccpp-physics + branch = main [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/physics b/ccpp/physics index cbcb11a63..f50b0bdbf 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit cbcb11a631553e180b0ee0867289cebe5de2cf89 +Subproject commit f50b0bdbf0c965926110827c9eaa00bb063331bf