Skip to content

Commit

Permalink
Modify CMEPS for ufsdev_ruclsm (#84)
Browse files Browse the repository at this point in the history
* Corrected type for 2-m dewpoint.

* Corrected type of variables diag_flux and diag_log.

* Match von_karman_constant name with Physcons.

---------

Co-authored-by: tanyasmirnova <[email protected]>
  • Loading branch information
RatkoVasic-NOAA and tanyasmirnova authored Mar 31, 2023
1 parent 4511994 commit 91bcb84
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
17 changes: 15 additions & 2 deletions ufs/ccpp/data/MED_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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
use physcons, only: con_tice, karman

implicit none

Expand Down Expand Up @@ -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
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
Expand All @@ -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
Expand Down Expand Up @@ -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 :: dpt2m(:) => null() !< 2-m dewpoint (K)
contains
procedure :: create => diag_create !< allocate array data
end type MED_diag_type
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -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

Expand Down
47 changes: 47 additions & 0 deletions ufs/ccpp/data/MED_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
[karman]
standard_name = von_karman_constant
long_name = von karman constant
units = none
dimensions = ()
type = real

0 comments on commit 91bcb84

Please sign in to comment.