From 6930d6e6249f74ac334e49280d5e705bca1b9667 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Sun, 3 Sep 2023 18:07:24 +0000 Subject: [PATCH 01/22] GFDL_atmos_cubed_sphere: consistent string lengths in array --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 52bf918c1..d17a46eef 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 52bf918c194b7d906776447c6324bc75558133db +Subproject commit d17a46eef7d3629c4bc6bf70806797236c9d9008 From 0aee6e500eb7e4343f3cc1e1a6960fc76f85b05d Mon Sep 17 00:00:00 2001 From: Samuel Trahan Date: Wed, 6 Sep 2023 00:19:47 -0600 Subject: [PATCH 02/22] stop FV3_HRRR_c3 from crashing with gnu debug --- .gitmodules | 8 ++++---- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..4f95d7b85 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,15 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere - branch = dev/emc + url = https://github.com/SamuelTrahanNOAA/GFDL_atmos_cubed_sphere + branch = conus13km [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/ufs-community/ccpp-physics - branch = ufs/dev + url = https://github.com/SamuelTrahanNOAA/ccpp-physics + branch = c3-pointer-fix [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index d17a46eef..b8baff3c2 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit d17a46eef7d3629c4bc6bf70806797236c9d9008 +Subproject commit b8baff3c2cd77ccc46c53754e5d7b3425eb1eac2 diff --git a/ccpp/physics b/ccpp/physics index 5b946850a..315d3cc74 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5b946850af58e1cea8c37661158b661df21e9390 +Subproject commit 315d3cc74f5d5edad379f9968c361f5f3c513725 From 59f7814f360011b98c81b2f0d82786a1396a6ae6 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Thu, 7 Sep 2023 13:32:01 +0000 Subject: [PATCH 03/22] Update .gitmodules --- .gitmodules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..135c9ff4c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,9 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere - branch = dev/emc + # url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere + # branch = dev/emc + url = https://github.com/DusanJovic-NOAA/GFDL_atmos_cubed_sphere + branch = axis_type [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework From 4a498204dfd7465fc0431d99311f3ee8016cddb4 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 7 Sep 2023 21:14:40 +0000 Subject: [PATCH 04/22] bug fix from Dusan to recover_fields crash --- io/module_wrt_grid_comp.F90 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/io/module_wrt_grid_comp.F90 b/io/module_wrt_grid_comp.F90 index c8fc139e2..e36e0ed10 100644 --- a/io/module_wrt_grid_comp.F90 +++ b/io/module_wrt_grid_comp.F90 @@ -2040,9 +2040,11 @@ subroutine wrt_run(wrt_comp, imp_state_write, exp_state_write,clock,rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return endif - !recover fields from cartesian vector and sfc pressure - call recover_fields(file_bundle,rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + if (fcstItemNameList(i)(1:8) /= "restart_") then + !recover fields from cartesian vector and sfc pressure + call recover_fields(file_bundle,rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, line=__LINE__, file=__FILE__)) return + end if enddo ! From c6a04b0f2d18681bc59aaf975dcdde45d69fe59f Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 8 Sep 2023 21:07:47 +0000 Subject: [PATCH 05/22] rename GFDL_atmos_cubed_sphere branch --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 4f95d7b85..8a206992c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere url = https://github.com/SamuelTrahanNOAA/GFDL_atmos_cubed_sphere - branch = conus13km + branch = bugfix/string-length-mismatch [submodule "ccpp/framework"] path = ccpp/framework url = https://github.com/NCAR/ccpp-framework From c4e010601452f8206bb803c5a95c68058e8b8c84 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Sat, 9 Sep 2023 15:57:35 +0000 Subject: [PATCH 06/22] in dycore, initialize srf_wnd_var2 and tracers_var3 arrays --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index b8baff3c2..afab1e837 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit b8baff3c2cd77ccc46c53754e5d7b3425eb1eac2 +Subproject commit afab1e8378041768be75192d712fe0534268631f From 058d384325e42972a9b3bdf068057d999917bff0 Mon Sep 17 00:00:00 2001 From: Dusan Jovic Date: Mon, 11 Sep 2023 13:27:23 +0000 Subject: [PATCH 07/22] Write netcdf axis variables using the same real kind as data variables --- atmos_cubed_sphere | 2 +- io/fv3atm_clm_lake_io.F90 | 10 +++++----- io/fv3atm_common_io.F90 | 6 ++++++ io/fv3atm_restart_io.F90 | 10 +++++----- io/fv3atm_rrfs_sd_io.F90 | 4 ++-- io/fv3atm_sfc_io.F90 | 16 +++++++-------- io/module_write_restart_netcdf.F90 | 32 +++++++++++++++++------------- 7 files changed, 45 insertions(+), 35 deletions(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 52bf918c1..9da28bf46 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 52bf918c194b7d906776447c6324bc75558133db +Subproject commit 9da28bf469b78554f96afde6230ed5fb5ba68712 diff --git a/io/fv3atm_clm_lake_io.F90 b/io/fv3atm_clm_lake_io.F90 index c930e1df9..10fa5a81c 100644 --- a/io/fv3atm_clm_lake_io.F90 +++ b/io/fv3atm_clm_lake_io.F90 @@ -14,7 +14,7 @@ module fv3atm_clm_lake_io register_restart_field, write_data, & register_variable_attribute, register_field, get_dimension_size use fv3atm_common_io, only: create_2d_field_and_add_to_bundle, & - create_3d_field_and_add_to_bundle + create_3d_field_and_add_to_bundle, axis_type implicit none @@ -179,16 +179,16 @@ subroutine clm_lake_write_axes(clm_lake, Model, Sfc_restart) type(GFS_control_type), intent(in) :: Model type(FmsNetcdfDomainFile_t) :: Sfc_restart integer :: i - call register_field(Sfc_restart, 'levlake_clm_lake', 'double', (/'levlake_clm_lake'/)) + call register_field(Sfc_restart, 'levlake_clm_lake', axis_type, (/'levlake_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levlake_clm_lake', 'cartesian_axis' ,'Z', str_len=1) - call register_field(Sfc_restart, 'levsoil_clm_lake', 'double', (/'levsoil_clm_lake'/)) + call register_field(Sfc_restart, 'levsoil_clm_lake', axis_type, (/'levsoil_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levsoil_clm_lake', 'cartesian_axis' ,'Z', str_len=1) - call register_field(Sfc_restart, 'levsnowsoil_clm_lake', 'double', (/'levsnowsoil_clm_lake'/)) + call register_field(Sfc_restart, 'levsnowsoil_clm_lake', axis_type, (/'levsnowsoil_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levsnowsoil_clm_lake', 'cartesian_axis' ,'Z', str_len=1) - call register_field(Sfc_restart, 'levsnowsoil1_clm_lake', 'double', (/'levsnowsoil1_clm_lake'/)) + call register_field(Sfc_restart, 'levsnowsoil1_clm_lake', axis_type, (/'levsnowsoil1_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levsnowsoil1_clm_lake', 'cartesian_axis' ,'Z', str_len=1) call write_data(Sfc_restart, 'levlake_clm_lake', clm_lake%levlake_clm_lake) diff --git a/io/fv3atm_common_io.F90 b/io/fv3atm_common_io.F90 index 1143f23ac..faee19306 100644 --- a/io/fv3atm_common_io.F90 +++ b/io/fv3atm_common_io.F90 @@ -31,6 +31,12 @@ module fv3atm_common_io public :: get_nx_ny_from_atm +#ifdef CCPP_32BIT + character(len=5), parameter, public :: axis_type = 'float' +#else + character(len=6), parameter, public :: axis_type = 'double' +#endif + !>\defgroup fv3atm_common_io FV3ATM Common I/O Utilities Module !> @{ diff --git a/io/fv3atm_restart_io.F90 b/io/fv3atm_restart_io.F90 index 1edb985a8..39d2131b9 100644 --- a/io/fv3atm_restart_io.F90 +++ b/io/fv3atm_restart_io.F90 @@ -17,7 +17,7 @@ module fv3atm_restart_io_mod get_global_io_domain_indices, get_dimension_size use mpp_domains_mod, only: domain2d use fv3atm_common_io, only: create_2d_field_and_add_to_bundle, & - create_3d_field_and_add_to_bundle, copy_from_gfs_data + create_3d_field_and_add_to_bundle, copy_from_gfs_data, axis_type use fv3atm_sfc_io use fv3atm_rrfs_sd_io use fv3atm_clm_lake_io @@ -913,7 +913,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta amiopen=open_file(Phy_restart, trim(infile), 'overwrite', domain=fv_domain, is_restart=.true., dont_add_res_to_filename=.true.) if( amiopen ) then call register_axis(Phy_restart, 'xaxis_1', 'X') - call register_field(Phy_restart, 'xaxis_1', 'double', (/'xaxis_1'/)) + call register_field(Phy_restart, 'xaxis_1', axis_type, (/'xaxis_1'/)) call register_variable_attribute(Phy_restart, 'xaxis_1', 'cartesian_axis', 'X', str_len=1) call get_global_io_domain_indices(Phy_restart, 'xaxis_1', is, ie, indices=buffer) call write_data(Phy_restart, "xaxis_1", buffer) @@ -921,7 +921,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta call get_dimension_size(Phy_restart, 'xaxis_1', xaxis_1_chunk) call register_axis(Phy_restart, 'yaxis_1', 'Y') - call register_field(Phy_restart, 'yaxis_1', 'double', (/'yaxis_1'/)) + call register_field(Phy_restart, 'yaxis_1', axis_type, (/'yaxis_1'/)) call register_variable_attribute(Phy_restart, 'yaxis_1', 'cartesian_axis', 'Y', str_len=1) call get_global_io_domain_indices(Phy_restart, 'yaxis_1', is, ie, indices=buffer) call write_data(Phy_restart, "yaxis_1", buffer) @@ -929,7 +929,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta call get_dimension_size(Phy_restart, 'yaxis_1', yaxis_1_chunk) call register_axis(Phy_restart, 'zaxis_1', phy%npz) - call register_field(Phy_restart, 'zaxis_1', 'double', (/'zaxis_1'/)) + call register_field(Phy_restart, 'zaxis_1', axis_type, (/'zaxis_1'/)) call register_variable_attribute(Phy_restart, 'zaxis_1', 'cartesian_axis', 'Z', str_len=1) allocate( buffer(phy%npz) ) do i=1, phy%npz @@ -939,7 +939,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta deallocate(buffer) call register_axis(Phy_restart, 'Time', unlimited) - call register_field(Phy_restart, 'Time', 'double', (/'Time'/)) + call register_field(Phy_restart, 'Time', axis_type, (/'Time'/)) call register_variable_attribute(Phy_restart, 'Time', 'cartesian_axis', 'T', str_len=1) call write_data(Phy_restart, "Time", 1) else diff --git a/io/fv3atm_rrfs_sd_io.F90 b/io/fv3atm_rrfs_sd_io.F90 index 16410c8be..780153208 100644 --- a/io/fv3atm_rrfs_sd_io.F90 +++ b/io/fv3atm_rrfs_sd_io.F90 @@ -10,7 +10,7 @@ module fv3atm_rrfs_sd_io get_dimension_size use GFS_typedefs, only: GFS_sfcprop_type, GFS_control_type, kind_phys use fv3atm_common_io, only: get_nx_ny_from_atm, create_2d_field_and_add_to_bundle, & - create_3d_field_and_add_to_bundle + create_3d_field_and_add_to_bundle, axis_type implicit none @@ -114,7 +114,7 @@ subroutine rrfs_sd_state_write_axis(data,Model,Sfc_restart) type(FmsNetcdfDomainFile_t) :: Sfc_restart type(GFS_control_type), intent(in) :: Model - call register_field(Sfc_restart, 'fire_aux_data_levels', 'double', (/'fire_aux_data_levels'/)) + call register_field(Sfc_restart, 'fire_aux_data_levels', axis_type, (/'fire_aux_data_levels'/)) call register_variable_attribute(Sfc_restart, 'fire_aux_data_levels', 'cartesian_axis' ,'Z', str_len=1) call write_data(Sfc_restart, 'fire_aux_data_levels', data%fire_aux_data_levels) end subroutine rrfs_sd_state_write_axis diff --git a/io/fv3atm_sfc_io.F90 b/io/fv3atm_sfc_io.F90 index 90942e211..c0bfcf6d9 100644 --- a/io/fv3atm_sfc_io.F90 +++ b/io/fv3atm_sfc_io.F90 @@ -11,7 +11,7 @@ module fv3atm_sfc_io register_variable_attribute, register_field, & get_global_io_domain_indices, variable_exists, & get_dimension_size - use fv3atm_common_io, only: GFS_Data_transfer, & + use fv3atm_common_io, only: GFS_Data_transfer, axis_type, & create_2d_field_and_add_to_bundle, create_3d_field_and_add_to_bundle use GFS_typedefs, only: GFS_sfcprop_type, GFS_control_type, kind_phys use mpp_mod, only: mpp_error, NOTE @@ -309,19 +309,19 @@ subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) integer :: i, is, ie logical :: mand - call register_field(Sfc_restart, 'xaxis_1', 'double', (/'xaxis_1'/)) + call register_field(Sfc_restart, 'xaxis_1', axis_type, (/'xaxis_1'/)) call register_variable_attribute(Sfc_restart, 'xaxis_1', 'cartesian_axis', 'X', str_len=1) call get_global_io_domain_indices(Sfc_restart, 'xaxis_1', is, ie, indices=buffer) call write_data(Sfc_restart, "xaxis_1", buffer) deallocate(buffer) - call register_field(Sfc_restart, 'yaxis_1', 'double', (/'yaxis_1'/)) + call register_field(Sfc_restart, 'yaxis_1', axis_type, (/'yaxis_1'/)) call register_variable_attribute(Sfc_restart, 'yaxis_1', 'cartesian_axis', 'Y', str_len=1) call get_global_io_domain_indices(Sfc_restart, 'yaxis_1', is, ie, indices=buffer) call write_data(Sfc_restart, "yaxis_1", buffer) deallocate(buffer) - call register_field(Sfc_restart, 'zaxis_1', 'double', (/'zaxis_1'/)) + call register_field(Sfc_restart, 'zaxis_1', axis_type, (/'zaxis_1'/)) call register_variable_attribute(Sfc_restart, 'zaxis_1', 'cartesian_axis', 'Z', str_len=1) allocate( buffer(Model%kice) ) do i=1, Model%kice @@ -331,7 +331,7 @@ subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) deallocate(buffer) if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp) then - call register_field(Sfc_restart, 'zaxis_2', 'double', (/'zaxis_2'/)) + call register_field(Sfc_restart, 'zaxis_2', axis_type, (/'zaxis_2'/)) call register_variable_attribute(Sfc_restart, 'zaxis_2', 'cartesian_axis', 'Z', str_len=1) allocate( buffer(Model%lsoil) ) do i=1, Model%lsoil @@ -342,7 +342,7 @@ subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) endif if(Model%lsm == Model%lsm_noahmp) then - call register_field(Sfc_restart, 'zaxis_3', 'double', (/'zaxis_3'/)) + call register_field(Sfc_restart, 'zaxis_3', axis_type, (/'zaxis_3'/)) call register_variable_attribute(Sfc_restart, 'zaxis_3', 'cartesian_axis', 'Z', str_len=1) allocate(buffer(3)) do i=1, 3 @@ -351,7 +351,7 @@ subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) call write_data(Sfc_restart, 'zaxis_3', buffer) deallocate(buffer) - call register_field(Sfc_restart, 'zaxis_4', 'double', (/'zaxis_4'/)) + call register_field(Sfc_restart, 'zaxis_4', axis_type, (/'zaxis_4'/)) call register_variable_attribute(Sfc_restart, 'zaxis_4', 'cartesian_axis' ,'Z', str_len=1) allocate(buffer(7)) do i=1, 7 @@ -360,7 +360,7 @@ subroutine Sfc_io_write_axes(sfc, Model, Sfc_restart) call write_data(Sfc_restart, 'zaxis_4', buffer) deallocate(buffer) end if - call register_field(Sfc_restart, 'Time', 'double', (/'Time'/)) + call register_field(Sfc_restart, 'Time', axis_type, (/'Time'/)) call register_variable_attribute(Sfc_restart, 'Time', 'cartesian_axis', 'T', str_len=1) call write_data( Sfc_restart, 'Time', 1) end subroutine Sfc_io_write_axes diff --git a/io/module_write_restart_netcdf.F90 b/io/module_write_restart_netcdf.F90 index 53a1f719c..7904fe4cd 100644 --- a/io/module_write_restart_netcdf.F90 +++ b/io/module_write_restart_netcdf.F90 @@ -74,7 +74,7 @@ subroutine write_restart_netcdf(wrtfb, filename, & integer :: ncerr,ierr integer :: ncid integer :: oldMode - integer :: dimid + integer :: dimid, dimtype integer :: im_dimid, im_p1_dimid, jm_dimid, jm_p1_dimid, time_dimid integer :: im_varid, im_p1_varid, jm_varid, jm_p1_varid, time_varid integer, dimension(:), allocatable :: dimids_2d, dimids_3d @@ -188,6 +188,15 @@ subroutine write_restart_netcdf(wrtfb, filename, & deallocate(maxIndexPTile) deallocate(deToTileMap) deallocate(localDeToDeMap) + + if (typekind == ESMF_TYPEKIND_R4) then + dimtype = NF90_FLOAT + else if (typekind == ESMF_TYPEKIND_R8) then + dimtype = NF90_DOUBLE + else + if (mype==0) write(0,*)'Unsupported typekind ', typekind + call ESMF_Finalize(endflag=ESMF_END_ABORT) + end if end if if (fieldDimCount > gridDimCount) then @@ -236,29 +245,29 @@ subroutine write_restart_netcdf(wrtfb, filename, & if ( .not.is_restart_core ) then ncerr = nf90_def_dim(ncid, "xaxis_1", im, im_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "xaxis_1", NF90_DOUBLE, im_dimid, im_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "xaxis_1", dimtype, im_dimid, im_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, im_varid, trim(axis_attr_name), "X"); NC_ERR_STOP(ncerr) ncerr = nf90_def_dim(ncid, "yaxis_1", jm, jm_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "yaxis_1", NF90_DOUBLE, jm_dimid, jm_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "yaxis_1", dimtype, jm_dimid, jm_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_varid, trim(axis_attr_name), "Y"); NC_ERR_STOP(ncerr) else ncerr = nf90_def_dim(ncid, "xaxis_1", im, im_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "xaxis_1", NF90_DOUBLE, im_dimid, im_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "xaxis_1", dimtype, im_dimid, im_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, im_varid, trim(axis_attr_name), "X"); NC_ERR_STOP(ncerr) ncerr = nf90_def_dim(ncid, "xaxis_2", im+1, im_p1_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "xaxis_2", NF90_DOUBLE, im_p1_dimid, im_p1_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "xaxis_2", dimtype, im_p1_dimid, im_p1_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, im_p1_varid, trim(axis_attr_name), "X"); NC_ERR_STOP(ncerr) ncerr = nf90_def_dim(ncid, "yaxis_1", jm+1, jm_p1_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "yaxis_1", NF90_DOUBLE, jm_p1_dimid, jm_p1_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "yaxis_1", dimtype, jm_p1_dimid, jm_p1_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_p1_varid, trim(axis_attr_name), "Y"); NC_ERR_STOP(ncerr) ncerr = nf90_def_dim(ncid, "yaxis_2", jm, jm_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "yaxis_2", NF90_DOUBLE, jm_dimid, jm_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "yaxis_2", dimtype, jm_dimid, jm_varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, jm_varid, trim(axis_attr_name), "Y"); NC_ERR_STOP(ncerr) end if @@ -291,7 +300,7 @@ subroutine write_restart_netcdf(wrtfb, filename, & ncerr = nf90_def_dim(ncid, "Time", NF90_UNLIMITED, time_dimid); NC_ERR_STOP(ncerr) ! ncerr = nf90_def_dim(ncid, "Time", 1, time_dimid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, "Time", NF90_DOUBLE, time_dimid, time_varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, "Time", dimtype, time_dimid, time_varid); NC_ERR_STOP(ncerr) if (par) then ncerr = nf90_var_par_access(ncid, time_varid, NF90_COLLECTIVE); NC_ERR_STOP(ncerr) end if @@ -565,12 +574,7 @@ subroutine write_out_ungridded_dim_atts_from_field(field, dimLabel, dimid, rc) ncerr = nf90_def_dim(ncid, trim(dimLabel), valueCount, dimid=dimid); NC_ERR_STOP(ncerr); NC_ERR_STOP(ncerr) endif if( typekind == ESMF_TYPEKIND_R4 ) then - !!! FIXME Use NF90_DOUBLE as axis type, even though axis data are float - !!! This is needed to make phy/sfc restart files identical to FMS - !!! restart files which always defines all axis as double - - ! ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_FLOAT, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) - ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_DOUBLE, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_FLOAT, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, varid, trim(axis_attr_name), "Z"); NC_ERR_STOP(ncerr) ncerr = nf90_enddef(ncid=ncid); NC_ERR_STOP(ncerr) ncerr = nf90_put_var(ncid, varid, values=valueListr4); NC_ERR_STOP(ncerr) From fbad8390f585744c716ac5167927c629aae6bebd Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Wed, 20 Sep 2023 02:19:49 +0000 Subject: [PATCH 08/22] "GF radar reflectivity, dust bug fix, C3 updates, more fluxes output" --- .gitmodules | 4 +-- ccpp/data/GFS_typedefs.F90 | 13 ++++++++ ccpp/data/GFS_typedefs.meta | 23 +++++++++++++ ccpp/driver/GFS_diagnostics.F90 | 44 +++++++++++++++++++++++++ ccpp/physics | 2 +- ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml | 2 ++ 6 files changed, 85 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..ea2b6ed85 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,8 +8,8 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics - branch = ufs/dev + url = https://github.com/haiqinli/ccpp-physics + branch = ufs/dev-radar [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 171591a53..96ccb8c28 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -1501,6 +1501,9 @@ module GFS_typedefs integer :: ncnvwind !< the index of surface wind enhancement due to convection for MYNN SFC and RAS CNV in phy f2d !-- nml variables for RRFS-SD + real(kind=kind_phys) :: dust_drylimit_factor !< factor for drylimit parameterization in fengsha + real(kind=kind_phys) :: dust_moist_correction !< factor to tune volumetric soil moisture + integer :: dust_moist_opt !< dust moisture option 1:fecan 2:shao real(kind=kind_phys) :: dust_alpha !< alpha parameter for fengsha dust scheme real(kind=kind_phys) :: dust_gamma !< gamma parameter for fengsha dust scheme real(kind=kind_phys) :: wetdep_ls_alpha !< alpha parameter for wet deposition @@ -3829,9 +3832,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer :: ichoice_s = 3 !< flag for closure of C3/GF shallow convection !-- chem nml variables for RRFS-SD + real(kind=kind_phys) :: dust_drylimit_factor = 1.0 + real(kind=kind_phys) :: dust_moist_correction = 1.0 real(kind=kind_phys) :: dust_alpha = 0. real(kind=kind_phys) :: dust_gamma = 0. real(kind=kind_phys) :: wetdep_ls_alpha = 0. + integer :: dust_moist_opt = 1 ! fecan :1 else shao integer :: seas_opt = 2 integer :: dust_opt = 5 integer :: drydep_opt = 1 @@ -3995,6 +4001,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- aerosol scavenging factors ('name:value' string array) fscav_aero, & !--- RRFS-SD namelist + dust_drylimit_factor, dust_moist_correction, dust_moist_opt, & dust_alpha, dust_gamma, wetdep_ls_alpha, & seas_opt, dust_opt, drydep_opt, coarsepm_settling, & wetdep_ls_opt, smoke_forecast, aero_ind_fdb, aero_dir_fdb, & @@ -4214,6 +4221,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & !--- RRFS-SD Model%rrfs_sd = rrfs_sd + Model%dust_drylimit_factor = dust_drylimit_factor + Model%dust_moist_correction = dust_moist_correction + Model%dust_moist_opt = dust_moist_opt Model%dust_alpha = dust_alpha Model%dust_gamma = dust_gamma Model%wetdep_ls_alpha = wetdep_ls_alpha @@ -6314,6 +6324,9 @@ subroutine control_print(Model) if(model%rrfs_sd) then print *, ' ' print *, 'smoke parameters' + print *, 'dust_drylimit_factor: ',Model%dust_drylimit_factor + print *, 'dust_moist_correction: ',Model%dust_moist_correction + print *, 'dust_moist_opt : ',Model%dust_moist_opt print *, 'dust_alpha : ',Model%dust_alpha print *, 'dust_gamma : ',Model%dust_gamma print *, 'wetdep_ls_alpha : ',Model%wetdep_ls_alpha diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index a8ce4f016..a36802ede 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -6462,6 +6462,29 @@ type = real kind = kind_phys active = (do_smoke_coupling) +[dust_moist_correction] + standard_name = dust_moist_correction_fengsha_dust_scheme + long_name = moisture correction term for fengsha dust emission + units = none + dimensions = () + type = real + kind = kind_phys + active = (do_smoke_coupling) +[dust_drylimit_factor] + standard_name = dust_drylimit_factor_fengsha_dust_scheme + long_name = moisture correction term for drylimit in fengsha dust emission + units = none + dimensions = () + type = real + kind = kind_phys + active = (do_smoke_coupling) +[dust_moist_opt] + standard_name = control_for_dust_soil_moisture_option + long_name = smoke dust moisture parameterization 1 - fecan 2 - shao + units = index + dimensions = () + type = integer + active = (do_smoke_coupling) [dust_alpha] standard_name = alpha_fengsha_dust_scheme long_name = alpha paramter for fengsha dust scheme diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 0974fdc8d..4fc2e109a 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -4061,6 +4061,50 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop ExtDiag(idx)%data(nb)%var2 => sfcprop(nb)%wetness(:) enddo + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'nirbmdi' + ExtDiag(idx)%desc = 'sfc nir beam sw downward flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nirbmdi(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'nirdfdi' + ExtDiag(idx)%desc = 'sfc nir diff sw downward flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nirdfdi(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'visbmdi' + ExtDiag(idx)%desc = 'sfc uv+vis beam sw downward flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%visbmdi(:) + enddo + + idx = idx + 1 + ExtDiag(idx)%axes = 2 + ExtDiag(idx)%name = 'visdfdi' + ExtDiag(idx)%desc = ' sfc uv+vis diff sw downward flux' + ExtDiag(idx)%unit = 'W/m**2' + ExtDiag(idx)%mod_name = 'gfs_sfc' + allocate (ExtDiag(idx)%data(nblks)) + do nb = 1,nblks + ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%visdfdi(:) + enddo + if (Model%rdlai) then idx = idx + 1 ExtDiag(idx)%axes = 2 diff --git a/ccpp/physics b/ccpp/physics index 31a99de05..ab84c01a1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 31a99de05048187b61a2ea8381417b8dbd8db7e0 +Subproject commit ab84c01a110bbf13490fcf3243effe06cb26608d diff --git a/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml b/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml index a79f37f7f..d93060d5a 100644 --- a/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml +++ b/ccpp/suites/suite_FV3_GFS_v17_p8_c3.xml @@ -13,6 +13,7 @@ GFS_suite_interstitial_rad_reset + sgscloud_radpre GFS_rrtmg_pre GFS_radiation_surface rad_sw_pre @@ -20,6 +21,7 @@ rrtmg_sw_post rrtmg_lw_pre rrtmg_lw + sgscloud_radpost rrtmg_lw_post GFS_rrtmg_post From 4c578bf0ac29e633f01fea83f13b7b6911c6257d Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 21 Sep 2023 20:59:30 +0000 Subject: [PATCH 09/22] Fix race condition in GFS_phys_time_vary.fv3.F90 error detection --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 31a99de05..5612a96ed 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 31a99de05048187b61a2ea8381417b8dbd8db7e0 +Subproject commit 5612a96edecac3fe931cdc3a8754dfd6e1532df0 From 2959cab11a1de3a2af92fc152ec1b98f972323ce Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 21 Sep 2023 22:24:45 +0000 Subject: [PATCH 10/22] More bug fixes to GFS_phys_time_vary.fv3.F90: 1. detect empty errmsg from subroutines 2. Initialize err variables in set_soilveg.f, which is called from GFS_phys_time_vary.fv3.F90 --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 5612a96ed..7912a1954 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 5612a96edecac3fe931cdc3a8754dfd6e1532df0 +Subproject commit 7912a1954983010f1f2ee5ce552139b8dda0b669 From edc239bae892265dc3c10ce70ad9b87dcfe00e5e Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Thu, 21 Sep 2023 23:32:38 +0000 Subject: [PATCH 11/22] initialize errmsg & errflg in noahmp_tables.f90 --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 7912a1954..7332c8e7a 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7912a1954983010f1f2ee5ce552139b8dda0b669 +Subproject commit 7332c8e7ac3d5eec9d48947ec9c1bbd035d9dfeb From 601764025e8ab1294db6ed378a0b2c04efd22a56 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 22 Sep 2023 00:30:48 +0000 Subject: [PATCH 12/22] point to sam's branch --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c723ac1..ecc0aa03d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,8 +8,8 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/ufs-community/ccpp-physics - branch = ufs/dev + url = https://github.com/SamuelTrahanNOAA/ccpp-physics + branch = bugfix/errmsgflg-race-condition [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP From 359eb55608e3425bc84c704878c13e28cc1b6c0e Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Fri, 22 Sep 2023 13:42:57 +0000 Subject: [PATCH 13/22] only read h2odata, ozdata and noahmp table when they are needed --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 7332c8e7a..374996ecc 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7332c8e7ac3d5eec9d48947ec9c1bbd035d9dfeb +Subproject commit 374996ecc45f138ff48ed1812fee3dc59837c556 From 4021bb05675fe210bf79b06904a612761d8f977e Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Mon, 25 Sep 2023 13:04:27 +0000 Subject: [PATCH 14/22] also update atmos_cubed_sphere --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index afab1e837..a096540bf 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit afab1e8378041768be75192d712fe0534268631f +Subproject commit a096540bf650208a74c1bab9b5e09914328d5e4c From 9f59260bd201159e2fea137ea0a1d853534e0fad Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Tue, 26 Sep 2023 11:48:42 +0000 Subject: [PATCH 15/22] update atmos_cubed_sphere hash --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 81f254d95..f80df3f82 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 81f254d95aba6fb9ae94a18b432eb1a4be3799a8 +Subproject commit f80df3f82eb627db183f14cee57e85179231f642 From 4cd8a8f780d8457e4c0cbac8dc20dcf693be30fa Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 27 Sep 2023 01:20:15 +0000 Subject: [PATCH 16/22] remove all constant 3D variables from clm lake --- ccpp/data/GFS_typedefs.F90 | 30 +------- ccpp/data/GFS_typedefs.meta | 70 ++----------------- ccpp/driver/GFS_diagnostics.F90 | 36 ---------- ccpp/physics | 2 +- io/fv3atm_clm_lake_io.F90 | 119 ++++---------------------------- 5 files changed, 21 insertions(+), 236 deletions(-) diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 171591a53..d8aab5ff5 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -431,13 +431,7 @@ module GFS_typedefs ! CLM Lake model internal variables: real (kind=kind_phys), pointer :: lake_albedo(:) => null() ! - real (kind=kind_phys), pointer :: lake_z3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_dz3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_soil_watsat3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_csol3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_soil_tkmg3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_soil_tkdry3d(:,:) => null() ! - real (kind=kind_phys), pointer :: lake_soil_tksatu3d(:,:) => null() ! + real (kind=kind_phys), pointer :: input_lakedepth(:) => null() ! real (kind=kind_phys), pointer :: lake_h2osno2d(:) => null() ! real (kind=kind_phys), pointer :: lake_sndpth2d(:) => null() ! real (kind=kind_phys), pointer :: lake_snl2d(:) => null() ! @@ -454,8 +448,6 @@ module GFS_typedefs real (kind=kind_phys), pointer :: lake_icefrac3d(:,:)=> null() real (kind=kind_phys), pointer :: lake_rho0(:)=> null() real (kind=kind_phys), pointer :: lake_ht(:)=> null() - real (kind=kind_phys), pointer :: lake_clay3d(:,:) => null() - real (kind=kind_phys), pointer :: lake_sand3d(:,:) => null() integer, pointer :: lake_is_salty(:) => null() integer, pointer :: lake_cannot_freeze(:) => null() real (kind=kind_phys), pointer :: clm_lake_initialized(:) => null() !< lakeini was called @@ -2715,13 +2707,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate(Sfcprop%lake_t2m(IM)) allocate(Sfcprop%lake_q2m(IM)) allocate(Sfcprop%lake_albedo(IM)) - allocate(Sfcprop%lake_z3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_dz3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_soil_watsat3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_csol3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_soil_tkmg3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_soil_tkdry3d(IM,Model%nlevlake_clm_lake)) - allocate(Sfcprop%lake_soil_tksatu3d(IM,Model%nlevlake_clm_lake)) + allocate(Sfcprop%input_lakedepth(IM)) allocate(Sfcprop%lake_h2osno2d(IM)) allocate(Sfcprop%lake_sndpth2d(IM)) allocate(Sfcprop%lake_snl2d(IM)) @@ -2738,8 +2724,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) allocate(Sfcprop%lake_icefrac3d(IM,Model%nlevlake_clm_lake)) allocate(Sfcprop%lake_rho0(IM)) allocate(Sfcprop%lake_ht(IM)) - allocate(Sfcprop%lake_clay3d(IM,Model%nlevsoil_clm_lake)) - allocate(Sfcprop%lake_sand3d(IM,Model%nlevsoil_clm_lake)) allocate(Sfcprop%lake_is_salty(IM)) allocate(Sfcprop%lake_cannot_freeze(IM)) allocate(Sfcprop%clm_lake_initialized(IM)) @@ -2747,13 +2731,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%lake_t2m = clear_val Sfcprop%lake_q2m = clear_val Sfcprop%lake_albedo = clear_val - Sfcprop%lake_z3d = clear_val - Sfcprop%lake_dz3d = clear_val - Sfcprop%lake_soil_watsat3d = clear_val - Sfcprop%lake_csol3d = clear_val - Sfcprop%lake_soil_tkmg3d = clear_val - Sfcprop%lake_soil_tkdry3d = clear_val - Sfcprop%lake_soil_tksatu3d = clear_val + Sfcprop%input_lakedepth = clear_val Sfcprop%lake_h2osno2d = clear_val Sfcprop%lake_sndpth2d = clear_val Sfcprop%lake_snl2d = clear_val @@ -2770,8 +2748,6 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%lake_icefrac3d = clear_val Sfcprop%lake_rho0 = -111 Sfcprop%lake_ht = -111 - Sfcprop%lake_clay3d = clear_val - Sfcprop%lake_sand3d = clear_val Sfcprop%lake_is_salty = zero Sfcprop%lake_cannot_freeze = zero Sfcprop%clm_lake_initialized = zero diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index a8ce4f016..019e08708 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -2034,59 +2034,11 @@ type = real kind = kind_phys active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_z3d] - standard_name = depth_of_lake_interface_layers - long_name = depth of lake interface layers - units = fraction - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_dz3d] - standard_name = thickness_of_lake_layers - long_name = thickness of lake layers - units = fraction - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_soil_watsat3d] - standard_name = saturated_volumetric_soil_water_in_lake_model - long_name = saturated volumetric soil water in lake model +[input_lakedepth] + standard_name = lake_depth_before_correction + long_name = lake depth_before_correction units = m - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_csol3d] - standard_name = soil_heat_capacity_in_lake_model - long_name = soil heat capacity in lake model - units = m - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_soil_tkmg3d] - standard_name = soil_mineral_thermal_conductivity_in_lake_model - long_name = soil mineral thermal conductivity in lake model - units = m - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_soil_tkdry3d] - standard_name = dry_soil_thermal_conductivity_in_lake_model - long_name = dry soil thermal conductivity in lake model - units = m - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) - type = real - kind = kind_phys - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_soil_tksatu3d] - standard_name = saturated_soil_thermal_conductivity_in_lake_model - long_name = saturated soil thermal conductivity in lake model - units = m - dimensions = (horizontal_loop_extent, lake_vertical_dimension_for_clm_lake_model) + dimensions = (horizontal_loop_extent) type = real kind = kind_phys active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) @@ -2218,20 +2170,6 @@ type = real kind = kind_phys active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_clay3d] - standard_name = clm_lake_percent_clay - long_name = percent clay in clm lake model - units = percent - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_clm_lake_model) - type = integer - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) -[lake_sand3d] - standard_name = clm_lake_percent_sand - long_name = percent sand in clm lake model - units = percent - dimensions = (horizontal_loop_extent,soil_vertical_dimension_for_clm_lake_model) - type = integer - active = (control_for_lake_model_selection == 2 .and. control_for_lake_model_execution_method > 0) [lake_is_salty] standard_name = clm_lake_is_salty long_name = lake at this point is salty (1) or not (0) diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index 0974fdc8d..41b2a29af 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -5086,42 +5086,6 @@ subroutine clm_lake_externaldiag_populate(ExtDiag, Model, Sfcprop, idx, cn_one, integer :: nk, idx0, iblk - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_z3d, 'lake_z3d', 'lake_depth_on_interface_levels', 'm') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_clay3d, 'lake_clay3d', 'percent clay on soil levels in clm lake model', '%') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_sand3d, 'lake_sand3d', 'percent sand on soil levels in clm lake model', '%') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_dz3d, 'lake_dz3d', 'lake level thickness', 'm') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_soil_watsat3d, 'lake_soil_watsat3d', 'saturated volumetric soil water', 'm3 m-3') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_csol3d, 'lake_csol3d', 'soil heat capacity', 'J m-3 K-1') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_soil_tkmg3d, 'lake_soil_tkmg3d', 'soil thermal conductivity, minerals', 'W m-1 K-1') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_soil_tkdry3d, 'lake_soil_tkdry3d', 'soil thermal conductivity, dry soil', 'W m-1 K-1') - enddo - - do iblk=1,nblks - call link_all_levels(Sfcprop(iblk)%lake_soil_tksatu3d, 'lake_soil_tksatu3d', 'soil thermal conductivity, saturated soil', 'W m-1 K-1') - enddo - do iblk=1,nblks call link_all_levels(Sfcprop(iblk)%lake_snow_z3d, 'lake_snow_z3d', 'lake snow level depth', 'm') enddo diff --git a/ccpp/physics b/ccpp/physics index 31a99de05..dbd5f58b1 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 31a99de05048187b61a2ea8381417b8dbd8db7e0 +Subproject commit dbd5f58b1f04f8d31a445ca477a1cc1169707303 diff --git a/io/fv3atm_clm_lake_io.F90 b/io/fv3atm_clm_lake_io.F90 index 10fa5a81c..37c221597 100644 --- a/io/fv3atm_clm_lake_io.F90 +++ b/io/fv3atm_clm_lake_io.F90 @@ -39,21 +39,19 @@ module fv3atm_clm_lake_io real(kind_phys), pointer, private, dimension(:,:) :: & T_snow=>null(), T_ice=>null(), & lake_snl2d=>null(), lake_h2osno2d=>null(), lake_tsfc=>null(), clm_lakedepth=>null(), & - lake_savedtke12d=>null(), lake_sndpth2d=>null(), clm_lake_initialized=>null() + lake_savedtke12d=>null(), lake_sndpth2d=>null(), clm_lake_initialized=>null(), & + input_lakedepth=>null() ! All 3D variables needed for a restart real(kind_phys), pointer, private, dimension(:,:,:) :: & - lake_z3d=>null(), lake_dz3d=>null(), lake_soil_watsat3d=>null(), & - lake_csol3d=>null(), lake_soil_tkmg3d=>null(), lake_soil_tkdry3d=>null(), & - lake_soil_tksatu3d=>null(), lake_snow_z3d=>null(), lake_snow_dz3d=>null(), & + lake_snow_z3d=>null(), lake_snow_dz3d=>null(), & lake_snow_zi3d=>null(), lake_h2osoi_vol3d=>null(), lake_h2osoi_liq3d=>null(), & lake_h2osoi_ice3d=>null(), lake_t_soisno3d=>null(), lake_t_lake3d=>null(), & - lake_icefrac3d=>null(), lake_clay3d=>null(), lake_sand3d=>null() + lake_icefrac3d=>null() ! Axis indices in 1-based array, containing non-1-based indices real(kind_phys), pointer, private, dimension(:) :: & - levlake_clm_lake, levsoil_clm_lake, levsnowsoil_clm_lake, & - levsnowsoil1_clm_lake + levlake_clm_lake, levsnowsoil_clm_lake, levsnowsoil1_clm_lake contains ! register_axes calls registers_axis on Sfc_restart for all required axes @@ -117,14 +115,8 @@ subroutine clm_lake_allocate_data(clm_lake,Model) allocate(clm_lake%lake_sndpth2d(nx,ny)) allocate(clm_lake%clm_lakedepth(nx,ny)) allocate(clm_lake%clm_lake_initialized(nx,ny)) + allocate(clm_lake%input_lakedepth(nx,ny)) - allocate(clm_lake%lake_z3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_dz3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_soil_watsat3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_csol3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_soil_tkmg3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_soil_tkdry3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_soil_tksatu3d(nx,ny,Model%nlevlake_clm_lake)) allocate(clm_lake%lake_snow_z3d(nx,ny,Model%nlevsnowsoil1_clm_lake)) allocate(clm_lake%lake_snow_dz3d(nx,ny,Model%nlevsnowsoil1_clm_lake)) allocate(clm_lake%lake_snow_zi3d(nx,ny,Model%nlevsnowsoil_clm_lake)) @@ -134,20 +126,14 @@ subroutine clm_lake_allocate_data(clm_lake,Model) allocate(clm_lake%lake_t_soisno3d(nx,ny,Model%nlevsnowsoil1_clm_lake)) allocate(clm_lake%lake_t_lake3d(nx,ny,Model%nlevlake_clm_lake)) allocate(clm_lake%lake_icefrac3d(nx,ny,Model%nlevlake_clm_lake)) - allocate(clm_lake%lake_clay3d(nx,ny,Model%nlevsoil_clm_lake)) - allocate(clm_lake%lake_sand3d(nx,ny,Model%nlevsoil_clm_lake)) allocate(clm_lake%levlake_clm_lake(Model%nlevlake_clm_lake)) - allocate(clm_lake%levsoil_clm_lake(Model%nlevsoil_clm_lake)) allocate(clm_lake%levsnowsoil_clm_lake(Model%nlevsnowsoil_clm_lake)) allocate(clm_lake%levsnowsoil1_clm_lake(Model%nlevsnowsoil1_clm_lake)) do i=1,Model%nlevlake_clm_lake clm_lake%levlake_clm_lake(i) = i enddo - do i=1,Model%nlevsoil_clm_lake - clm_lake%levsoil_clm_lake(i) = i - enddo do i=-Model%nlevsnow_clm_lake,Model%nlevsoil_clm_lake clm_lake%levsnowsoil_clm_lake(i+Model%nlevsnow_clm_lake+1) = i enddo @@ -165,7 +151,6 @@ subroutine clm_lake_register_axes(clm_lake,Model,Sfc_restart) type(FmsNetcdfDomainFile_t) :: Sfc_restart call register_axis(Sfc_restart, 'levlake_clm_lake', dimension_length=Model%nlevlake_clm_lake) - call register_axis(Sfc_restart, 'levsoil_clm_lake', dimension_length=Model%nlevsoil_clm_lake) call register_axis(Sfc_restart, 'levsnowsoil_clm_lake', dimension_length=Model%nlevsnowsoil_clm_lake) call register_axis(Sfc_restart, 'levsnowsoil1_clm_lake', dimension_length=Model%nlevsnowsoil1_clm_lake) end subroutine clm_lake_register_axes @@ -182,9 +167,6 @@ subroutine clm_lake_write_axes(clm_lake, Model, Sfc_restart) call register_field(Sfc_restart, 'levlake_clm_lake', axis_type, (/'levlake_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levlake_clm_lake', 'cartesian_axis' ,'Z', str_len=1) - call register_field(Sfc_restart, 'levsoil_clm_lake', axis_type, (/'levsoil_clm_lake'/)) - call register_variable_attribute(Sfc_restart, 'levsoil_clm_lake', 'cartesian_axis' ,'Z', str_len=1) - call register_field(Sfc_restart, 'levsnowsoil_clm_lake', axis_type, (/'levsnowsoil_clm_lake'/)) call register_variable_attribute(Sfc_restart, 'levsnowsoil_clm_lake', 'cartesian_axis' ,'Z', str_len=1) @@ -192,7 +174,6 @@ subroutine clm_lake_write_axes(clm_lake, Model, Sfc_restart) call register_variable_attribute(Sfc_restart, 'levsnowsoil1_clm_lake', 'cartesian_axis' ,'Z', str_len=1) call write_data(Sfc_restart, 'levlake_clm_lake', clm_lake%levlake_clm_lake) - call write_data(Sfc_restart, 'levsoil_clm_lake', clm_lake%levsoil_clm_lake) call write_data(Sfc_restart, 'levsnowsoil_clm_lake', clm_lake%levsnowsoil_clm_lake) call write_data(Sfc_restart, 'levsnowsoil1_clm_lake', clm_lake%levsnowsoil1_clm_lake) end subroutine clm_lake_write_axes @@ -229,14 +210,8 @@ subroutine clm_lake_fill_data(clm_lake, Model, Atm_block, Sfcprop) clm_lake%lake_sndpth2d(i,j) = zero clm_lake%clm_lakedepth(i,j) = zero clm_lake%clm_lake_initialized(i,j) = zero + clm_lake%input_lakedepth(i,j) = zero - clm_lake%lake_z3d(i,j,:) = zero - clm_lake%lake_dz3d(i,j,:) = zero - clm_lake%lake_soil_watsat3d(i,j,:) = zero - clm_lake%lake_csol3d(i,j,:) = zero - clm_lake%lake_soil_tkmg3d(i,j,:) = zero - clm_lake%lake_soil_tkdry3d(i,j,:) = zero - clm_lake%lake_soil_tksatu3d(i,j,:) = zero clm_lake%lake_snow_z3d(i,j,:) = zero clm_lake%lake_snow_dz3d(i,j,:) = zero clm_lake%lake_snow_zi3d(i,j,:) = zero @@ -246,8 +221,6 @@ subroutine clm_lake_fill_data(clm_lake, Model, Atm_block, Sfcprop) clm_lake%lake_t_soisno3d(i,j,:) = zero clm_lake%lake_t_lake3d(i,j,:) = zero clm_lake%lake_icefrac3d(i,j,:) = zero - clm_lake%lake_clay3d(i,j,:) = zero - clm_lake%lake_sand3d(i,j,:) = zero enddo enddo end subroutine clm_lake_fill_data @@ -284,14 +257,8 @@ subroutine clm_lake_copy_from_grid(clm_lake, Model, Atm_block, Sfcprop) clm_lake%lake_sndpth2d(i,j) = Sfcprop(nb)%lake_sndpth2d(ix) clm_lake%clm_lakedepth(i,j) = Sfcprop(nb)%clm_lakedepth(ix) clm_lake%clm_lake_initialized(i,j) = Sfcprop(nb)%clm_lake_initialized(ix) + clm_lake%input_lakedepth(i,j) = Sfcprop(nb)%input_lakedepth(ix) - clm_lake%lake_z3d(i,j,:) = Sfcprop(nb)%lake_z3d(ix,:) - clm_lake%lake_dz3d(i,j,:) = Sfcprop(nb)%lake_dz3d(ix,:) - clm_lake%lake_soil_watsat3d(i,j,:) = Sfcprop(nb)%lake_soil_watsat3d(ix,:) - clm_lake%lake_csol3d(i,j,:) = Sfcprop(nb)%lake_csol3d(ix,:) - clm_lake%lake_soil_tkmg3d(i,j,:) = Sfcprop(nb)%lake_soil_tkmg3d(ix,:) - clm_lake%lake_soil_tkdry3d(i,j,:) = Sfcprop(nb)%lake_soil_tkdry3d(ix,:) - clm_lake%lake_soil_tksatu3d(i,j,:) = Sfcprop(nb)%lake_soil_tksatu3d(ix,:) clm_lake%lake_snow_z3d(i,j,:) = Sfcprop(nb)%lake_snow_z3d(ix,:) clm_lake%lake_snow_dz3d(i,j,:) = Sfcprop(nb)%lake_snow_dz3d(ix,:) clm_lake%lake_snow_zi3d(i,j,:) = Sfcprop(nb)%lake_snow_zi3d(ix,:) @@ -301,8 +268,6 @@ subroutine clm_lake_copy_from_grid(clm_lake, Model, Atm_block, Sfcprop) clm_lake%lake_t_soisno3d(i,j,:) = Sfcprop(nb)%lake_t_soisno3d(ix,:) clm_lake%lake_t_lake3d(i,j,:) = Sfcprop(nb)%lake_t_lake3d(ix,:) clm_lake%lake_icefrac3d(i,j,:) = Sfcprop(nb)%lake_icefrac3d(ix,:) - clm_lake%lake_clay3d(i,j,:) = Sfcprop(nb)%lake_clay3d(ix,:) - clm_lake%lake_sand3d(i,j,:) = Sfcprop(nb)%lake_sand3d(ix,:) enddo enddo end subroutine clm_lake_copy_from_grid @@ -338,14 +303,8 @@ subroutine clm_lake_copy_to_grid(clm_lake, Model, Atm_block, Sfcprop) Sfcprop(nb)%lake_sndpth2d(ix) = clm_lake%lake_sndpth2d(i,j) Sfcprop(nb)%clm_lakedepth(ix) = clm_lake%clm_lakedepth(i,j) Sfcprop(nb)%clm_lake_initialized(ix) = clm_lake%clm_lake_initialized(i,j) + Sfcprop(nb)%input_lakedepth(ix) = clm_lake%input_lakedepth(i,j) - Sfcprop(nb)%lake_z3d(ix,:) = clm_lake%lake_z3d(i,j,:) - Sfcprop(nb)%lake_dz3d(ix,:) = clm_lake%lake_dz3d(i,j,:) - Sfcprop(nb)%lake_soil_watsat3d(ix,:) = clm_lake%lake_soil_watsat3d(i,j,:) - Sfcprop(nb)%lake_csol3d(ix,:) = clm_lake%lake_csol3d(i,j,:) - Sfcprop(nb)%lake_soil_tkmg3d(ix,:) = clm_lake%lake_soil_tkmg3d(i,j,:) - Sfcprop(nb)%lake_soil_tkdry3d(ix,:) = clm_lake%lake_soil_tkdry3d(i,j,:) - Sfcprop(nb)%lake_soil_tksatu3d(ix,:) = clm_lake%lake_soil_tksatu3d(i,j,:) Sfcprop(nb)%lake_snow_z3d(ix,:) = clm_lake%lake_snow_z3d(i,j,:) Sfcprop(nb)%lake_snow_dz3d(ix,:) = clm_lake%lake_snow_dz3d(i,j,:) Sfcprop(nb)%lake_snow_zi3d(ix,:) = clm_lake%lake_snow_zi3d(i,j,:) @@ -355,8 +314,6 @@ subroutine clm_lake_copy_to_grid(clm_lake, Model, Atm_block, Sfcprop) Sfcprop(nb)%lake_t_soisno3d(ix,:) = clm_lake%lake_t_soisno3d(i,j,:) Sfcprop(nb)%lake_t_lake3d(ix,:) = clm_lake%lake_t_lake3d(i,j,:) Sfcprop(nb)%lake_icefrac3d(ix,:) = clm_lake%lake_icefrac3d(i,j,:) - Sfcprop(nb)%lake_clay3d(ix,:) = clm_lake%lake_clay3d(i,j,:) - Sfcprop(nb)%lake_sand3d(ix,:) = clm_lake%lake_sand3d(i,j,:) enddo enddo end subroutine clm_lake_copy_to_grid @@ -397,29 +354,10 @@ subroutine clm_lake_register_fields(clm_lake, Sfc_restart) dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'clm_lake_initialized', clm_lake%clm_lake_initialized, & dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) + call register_restart_field(Sfc_restart, 'input_lakedepth', clm_lake%input_lakedepth, & + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) ! Register 3D fields - call register_restart_field(Sfc_restart, 'lake_z3d', clm_lake%lake_z3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart, 'lake_dz3d', clm_lake%lake_dz3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_soil_watsat3d', clm_lake%lake_soil_watsat3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_csol3d', clm_lake%lake_csol3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_soil_tkmg3d', clm_lake%lake_soil_tkmg3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_soil_tkdry3d', clm_lake%lake_soil_tkdry3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_soil_tksatu3d', clm_lake%lake_soil_tksatu3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_snow_z3d', clm_lake%lake_snow_z3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) @@ -447,12 +385,6 @@ subroutine clm_lake_register_fields(clm_lake, Sfc_restart) call register_restart_field(Sfc_restart,'lake_icefrac3d', clm_lake%lake_icefrac3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_clay3d', clm_lake%lake_clay3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsoil_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) - call register_restart_field(Sfc_restart,'lake_sand3d', clm_lake%lake_sand3d, & - dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsoil_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) end subroutine clm_lake_register_fields !>@ This is clm_lake%bundle_fields, and it is only used in the @@ -484,22 +416,9 @@ subroutine clm_lake_bundle_fields(clm_lake, bundle, grid, Model, outputfile) call create_2d_field_and_add_to_bundle(clm_lake%lake_sndpth2d, "lake_sndpth2d", trim(outputfile), grid, bundle) call create_2d_field_and_add_to_bundle(clm_lake%clm_lakedepth, "clm_lakedepth", trim(outputfile), grid, bundle) call create_2d_field_and_add_to_bundle(clm_lake%clm_lake_initialized, "clm_lake_initialized", trim(outputfile), grid, bundle) + call create_2d_field_and_add_to_bundle(clm_lake%input_lakedepth, "input_lakedepth", trim(outputfile), grid, bundle) ! Register 3D fields - call create_3d_field_and_add_to_bundle(clm_lake%lake_z3d, 'lake_z3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_dz3d, 'lake_dz3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_soil_watsat3d, 'lake_soil_watsat3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_csol3d, 'lake_csol3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_soil_tkmg3d, 'lake_soil_tkmg3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_soil_tkdry3d, 'lake_soil_tkdry3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_soil_tksatu3d, 'lake_soil_tksatu3d', 'levlake_clm_lake', & - clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) call create_3d_field_and_add_to_bundle(clm_lake%lake_snow_z3d, 'lake_snow_z3d', 'levsnowsoil1_clm_lake', & clm_lake%levsnowsoil1_clm_lake, trim(outputfile), grid, bundle) call create_3d_field_and_add_to_bundle(clm_lake%lake_snow_dz3d, 'lake_snow_dz3d', 'levsnowsoil1_clm_lake', & @@ -518,10 +437,6 @@ subroutine clm_lake_bundle_fields(clm_lake, bundle, grid, Model, outputfile) clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) call create_3d_field_and_add_to_bundle(clm_lake%lake_icefrac3d, 'lake_icefrac3d', 'levlake_clm_lake', & clm_lake%levlake_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_clay3d, 'lake_clay3d', 'levsoil_clm_lake', & - clm_lake%levsoil_clm_lake, trim(outputfile), grid, bundle) - call create_3d_field_and_add_to_bundle(clm_lake%lake_sand3d, 'lake_sand3d', 'levsoil_clm_lake', & - clm_lake%levsoil_clm_lake, trim(outputfile), grid, bundle) end subroutine Clm_lake_bundle_fields @@ -560,14 +475,8 @@ subroutine clm_lake_deallocate_data(clm_lake) IF_ASSOC_DEALLOC_NULL(lake_sndpth2d) IF_ASSOC_DEALLOC_NULL(clm_lakedepth) IF_ASSOC_DEALLOC_NULL(clm_lake_initialized) + IF_ASSOC_DEALLOC_NULL(input_lakedepth) - IF_ASSOC_DEALLOC_NULL(lake_z3d) - IF_ASSOC_DEALLOC_NULL(lake_dz3d) - IF_ASSOC_DEALLOC_NULL(lake_soil_watsat3d) - IF_ASSOC_DEALLOC_NULL(lake_csol3d) - IF_ASSOC_DEALLOC_NULL(lake_soil_tkmg3d) - IF_ASSOC_DEALLOC_NULL(lake_soil_tkdry3d) - IF_ASSOC_DEALLOC_NULL(lake_soil_tksatu3d) IF_ASSOC_DEALLOC_NULL(lake_snow_z3d) IF_ASSOC_DEALLOC_NULL(lake_snow_dz3d) IF_ASSOC_DEALLOC_NULL(lake_snow_zi3d) @@ -577,8 +486,6 @@ subroutine clm_lake_deallocate_data(clm_lake) IF_ASSOC_DEALLOC_NULL(lake_t_soisno3d) IF_ASSOC_DEALLOC_NULL(lake_t_lake3d) IF_ASSOC_DEALLOC_NULL(lake_icefrac3d) - IF_ASSOC_DEALLOC_NULL(lake_clay3d) - IF_ASSOC_DEALLOC_NULL(lake_sand3d) #undef IF_ASSOC_DEALLOC_NULL end subroutine clm_lake_deallocate_data From 03826c2d5250364089ad096f2fb13e9280dc8020 Mon Sep 17 00:00:00 2001 From: "samuel.trahan" Date: Wed, 27 Sep 2023 14:40:25 +0000 Subject: [PATCH 17/22] calculate clm lake constants only once per i loop --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index dbd5f58b1..75ec62308 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit dbd5f58b1f04f8d31a445ca477a1cc1169707303 +Subproject commit 75ec62308ae51ea48b03ecd438b8a1eb71c8b929 From b42dbfb2778f30a0e4e8a6174482c896b7c5a1e2 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Thu, 28 Sep 2023 20:36:52 +0000 Subject: [PATCH 18/22] "point to ccpp-phyiscs updates" --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index ab84c01a1..7a8f6934f 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit ab84c01a110bbf13490fcf3243effe06cb26608d +Subproject commit 7a8f6934f40390de915f4d8828d2119da9f99956 From 783630b587098a50c5719d48b545b09138014cc7 Mon Sep 17 00:00:00 2001 From: "Haiqin.Li" Date: Fri, 29 Sep 2023 02:50:56 +0000 Subject: [PATCH 19/22] "point to the dimension fix of smc for dust emission" --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 7a8f6934f..ab4d5f120 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7a8f6934f40390de915f4d8828d2119da9f99956 +Subproject commit ab4d5f1206d5bb8a7550682612a84bf77e0bdbdc From 6aebe2bf6a3be18774fbed3781b836f77159fc8e Mon Sep 17 00:00:00 2001 From: Samuel Trahan Date: Fri, 29 Sep 2023 07:54:40 -0600 Subject: [PATCH 20/22] more dycore bug fixes from GFDL_atmos_cubed_sphere PR 285 --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index f80df3f82..eb6a55806 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit f80df3f82eb627db183f14cee57e85179231f642 +Subproject commit eb6a5580635825a5949ff95532e262a865e81aed From 7530982bbb26371afd7c2ee6e5338d6b6275130c Mon Sep 17 00:00:00 2001 From: Samuel Trahan Date: Fri, 29 Sep 2023 08:56:34 -0600 Subject: [PATCH 21/22] merge GFDL_atmos_cubed_sphere #276 --- atmos_cubed_sphere | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index eb6a55806..d5ed1e79c 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit eb6a5580635825a5949ff95532e262a865e81aed +Subproject commit d5ed1e79c0970a45429e1fc7eacd4ebed01f21b8 From 3add3f6da4de30aae4bc8ed506a6e30a8962d56c Mon Sep 17 00:00:00 2001 From: Samuel Trahan Date: Tue, 3 Oct 2023 11:53:50 -0400 Subject: [PATCH 22/22] point to upstream ccpp-physics and GFDL_atmos_cubed_sphere --- .gitmodules | 8 ++++---- atmos_cubed_sphere | 2 +- ccpp/physics | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 8a206992c..22c723ac1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,15 @@ [submodule "atmos_cubed_sphere"] path = atmos_cubed_sphere - url = https://github.com/SamuelTrahanNOAA/GFDL_atmos_cubed_sphere - branch = bugfix/string-length-mismatch + url = https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere + branch = dev/emc [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/SamuelTrahanNOAA/ccpp-physics - branch = c3-pointer-fix + url = https://github.com/ufs-community/ccpp-physics + branch = ufs/dev [submodule "upp"] path = upp url = https://github.com/NOAA-EMC/UPP diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index d5ed1e79c..caba092f6 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit d5ed1e79c0970a45429e1fc7eacd4ebed01f21b8 +Subproject commit caba092f682c9713a485e782b8f9ba6480adaca2 diff --git a/ccpp/physics b/ccpp/physics index 609c90bfe..dd91c3af6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 609c90bfe2b046c9e4a495701b2426bb44bd0b86 +Subproject commit dd91c3af6296f69c4b3630f774374d51d928887c