Skip to content

Commit

Permalink
merge NOAA-EMC#705
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTrahanNOAA committed Sep 29, 2023
2 parents 6aebe2b + 03826c2 commit 2a5c47e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 236 deletions.
30 changes: 3 additions & 27 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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() !
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -2738,22 +2724,14 @@ 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))

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
Expand All @@ -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
Expand Down
70 changes: 4 additions & 66 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
36 changes: 0 additions & 36 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
Loading

0 comments on commit 2a5c47e

Please sign in to comment.