From 77dec9c00651d2b1e38000e944825bb5d8ac0856 Mon Sep 17 00:00:00 2001 From: Ratko Vasic Date: Fri, 24 Mar 2023 15:14:18 +0000 Subject: [PATCH 1/4] Modify CMEPS for ufsdev_ruclsm --- ufs/ccpp/data/MED_typedefs.F90 | 15 ++++++++++- ufs/ccpp/data/MED_typedefs.meta | 47 +++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/ufs/ccpp/data/MED_typedefs.F90 b/ufs/ccpp/data/MED_typedefs.F90 index 1b2ce51c5..dd1a01d93 100644 --- a/ufs/ccpp/data/MED_typedefs.F90 +++ b/ufs/ccpp/data/MED_typedefs.F90 @@ -4,7 +4,7 @@ module MED_typedefs !! \htmlinclude MED_typedefs.html !! use machine, only: kind_phys - use physcons, only: con_hvap, con_cp, con_rd, con_eps + use physcons, only: con_hvap, con_cp, con_rd, con_eps, con_rocp use physcons, only: con_epsm1, con_fvirt, con_g use physcons, only: con_tice @@ -189,6 +189,8 @@ module MED_typedefs integer :: lsoil !< number of soil layers integer :: kice !< vertical loop extent for ice levels, start at 1 integer :: lsm_ruc !< flag for RUC land surface model + integer :: diag_flux !< flag for flux method of 2-m diagnostics + integer :: diag_log !< flag for log 2-m diagnostics contains procedure :: init => control_initialize end type MED_control_type @@ -208,6 +210,8 @@ module MED_typedefs !! type MED_grid_type real(kind=kind_phys), pointer :: area(:) => null() !< area of the grid cell + real(kind=kind_phys), pointer :: xlat_d(:) => null() !< latitude in degrees + real(kind=kind_phys), pointer :: xlon_d(:) => null() !< longtitude in degrees contains procedure :: create => grid_create !< allocate array data end type MED_grid_type @@ -259,6 +263,7 @@ module MED_typedefs type MED_diag_type real(kind=kind_phys), pointer :: chh(:) => null() !< thermal exchange coefficient (kg m-2 s-1) real(kind=kind_phys), pointer :: cmm(:) => null() !< momentum exchange coefficient (m/s) + real(kind=kind_phys), pointer :: dpt2(:) => null() !< 2-m dewpoint (K) contains procedure :: create => diag_create !< allocate array data end type MED_diag_type @@ -636,6 +641,8 @@ subroutine control_initialize(model) model%lsoil = 4 model%kice = 2 model%lsm_ruc = 3 + model%diag_flux = .false. + model%diag_log = .false. end subroutine control_initialize @@ -658,6 +665,10 @@ subroutine grid_create(grid, im) allocate(grid%area(im)) grid%area = clear_val + allocate(grid%xlat_d(im)) + grid%xlat_d = clear_val + allocate(grid%xlon_d(im)) + grid%xlon_d = clear_val end subroutine grid_create @@ -745,6 +756,8 @@ subroutine diag_create(diag, im) diag%chh = clear_val allocate(diag%cmm(im)) diag%cmm = clear_val + allocate(diag%dpt2m(im)) + diag%dpt2m = clear_val end subroutine diag_create diff --git a/ufs/ccpp/data/MED_typedefs.meta b/ufs/ccpp/data/MED_typedefs.meta index 8177ae5ca..cc9371414 100644 --- a/ufs/ccpp/data/MED_typedefs.meta +++ b/ufs/ccpp/data/MED_typedefs.meta @@ -924,6 +924,18 @@ units = flag dimensions = () type = integer +[diag_flux] + standard_name = flag_for_flux_method_in_2m_diagnostics + long_name = flag for flux method in 2-m diagnostics + units = flag + dimensions = () + type = logical +[diag_log] + standard_name = flag_for_log_method_in_2m_diagnostics + long_name = flag for log method in 2-m diagnostics + units = flag + dimensions = () + type = logical ######################################################################## [ccpp-table-properties] @@ -964,6 +976,20 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[xlat_d] + standard_name = latitude_in_degree + long_name = latitude in degree north + units = degree_north + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys +[xlon_d] + standard_name = longitude_in_degree + long_name = longitude in degree east + units = degree_east + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys ######################################################################## [ccpp-table-properties] @@ -1228,6 +1254,13 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys +[dpt2m] + standard_name = dewpoint_temperature_at_2m + long_name = 2 meter dewpoint temperature + units = K + dimensions = (horizontal_loop_extent) + type = real + kind = kind_phys ######################################################################## [ccpp-table-properties] @@ -1343,3 +1376,17 @@ dimensions = () type = real kind = kind_phys +[con_rocp] + standard_name = ratio_of_gas_constant_dry_air_to_specific_heat_of_dry_air_at_constant_pressure + long_name = (rd/cp) + units = none + dimensions = () + type = real + kind = kind_phys +[con_karman] + standard_name = von_karman_constant + long_name = von karman constant + units = none + dimensions = () + type = real + From b2d0ed0e9d4a5cebc6c6fd61031bda7c85f92acc Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 24 Mar 2023 17:02:40 +0000 Subject: [PATCH 2/4] Corrected type for 2-m dewpoint. --- ufs/ccpp/data/MED_typedefs.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ufs/ccpp/data/MED_typedefs.F90 b/ufs/ccpp/data/MED_typedefs.F90 index dd1a01d93..bf51b1e1a 100644 --- a/ufs/ccpp/data/MED_typedefs.F90 +++ b/ufs/ccpp/data/MED_typedefs.F90 @@ -263,7 +263,7 @@ module MED_typedefs type MED_diag_type real(kind=kind_phys), pointer :: chh(:) => null() !< thermal exchange coefficient (kg m-2 s-1) real(kind=kind_phys), pointer :: cmm(:) => null() !< momentum exchange coefficient (m/s) - real(kind=kind_phys), pointer :: dpt2(:) => null() !< 2-m dewpoint (K) + real(kind=kind_phys), pointer :: dpt2m(:) => null() !< 2-m dewpoint (K) contains procedure :: create => diag_create !< allocate array data end type MED_diag_type From b667f46ca84d7fd8a99977425083dc25487f6e76 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 24 Mar 2023 17:17:06 +0000 Subject: [PATCH 3/4] Corrected type of variables diag_flux and diag_log. --- ufs/ccpp/data/MED_typedefs.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ufs/ccpp/data/MED_typedefs.F90 b/ufs/ccpp/data/MED_typedefs.F90 index bf51b1e1a..503a9ed6f 100644 --- a/ufs/ccpp/data/MED_typedefs.F90 +++ b/ufs/ccpp/data/MED_typedefs.F90 @@ -189,8 +189,8 @@ module MED_typedefs integer :: lsoil !< number of soil layers integer :: kice !< vertical loop extent for ice levels, start at 1 integer :: lsm_ruc !< flag for RUC land surface model - integer :: diag_flux !< flag for flux method of 2-m diagnostics - integer :: diag_log !< flag for log 2-m diagnostics + logical :: diag_flux !< flag for flux method of 2-m diagnostics + logical :: diag_log !< flag for log 2-m diagnostics contains procedure :: init => control_initialize end type MED_control_type From af5f3acf04503e4d6b63bab6babf35eb5cd74099 Mon Sep 17 00:00:00 2001 From: tanyasmirnova Date: Fri, 24 Mar 2023 17:41:52 +0000 Subject: [PATCH 4/4] Match von_karman_constant name with Physcons. --- ufs/ccpp/data/MED_typedefs.F90 | 2 +- ufs/ccpp/data/MED_typedefs.meta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ufs/ccpp/data/MED_typedefs.F90 b/ufs/ccpp/data/MED_typedefs.F90 index 503a9ed6f..b9c46c807 100644 --- a/ufs/ccpp/data/MED_typedefs.F90 +++ b/ufs/ccpp/data/MED_typedefs.F90 @@ -6,7 +6,7 @@ module MED_typedefs use machine, only: kind_phys use physcons, only: con_hvap, con_cp, con_rd, con_eps, con_rocp use physcons, only: con_epsm1, con_fvirt, con_g - use physcons, only: con_tice + use physcons, only: con_tice, karman implicit none diff --git a/ufs/ccpp/data/MED_typedefs.meta b/ufs/ccpp/data/MED_typedefs.meta index cc9371414..9071b7d52 100644 --- a/ufs/ccpp/data/MED_typedefs.meta +++ b/ufs/ccpp/data/MED_typedefs.meta @@ -1383,7 +1383,7 @@ dimensions = () type = real kind = kind_phys -[con_karman] +[karman] standard_name = von_karman_constant long_name = von karman constant units = none