Skip to content

Commit 54da2c0

Browse files
committed
some clean-up of implementation of Z0_FORMULATION; disabled outdated and bad Z0_FORMULATION=1 (GEOS_SurfaceGridComp.rc, lsm_routines.F90, GEOS_CatchGridComp.F90, GEOS_CatchCNCLM51GridComp.F90)
1 parent 7b5175d commit 54da2c0

File tree

4 files changed

+89
-146
lines changed

4 files changed

+89
-146
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM51_GridComp/GEOS_CatchCNCLM51GridComp.F90

Lines changed: 26 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4007,7 +4007,6 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
40074007
integer :: CHOOSEZ0
40084008
real :: SCALE4Z0
40094009
real :: SCALE4ZVG
4010-
real :: SCALE4Z0_u
40114010
real :: MIN_VEG_HEIGHT
40124011

40134012
! -------------------------------------
@@ -4464,36 +4463,11 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
44644463
if(associated( MOU2M)) MOU2M = 0.0
44654464
if(associated( MOV2M)) MOV2M = 0.0
44664465

4467-
select case (CATCHCN_INTERNAL%Z0_FORMULATION)
4468-
case (0) ! no scaled at all
4469-
SCALE4ZVG = 1
4470-
SCALE4Z0 = 1
4471-
SCALE4Z0_u = 1
4472-
MIN_VEG_HEIGHT = 0.01
4473-
case (1) ! This case is bugged
4474-
SCALE4ZVG = 1
4475-
SCALE4Z0 = 2
4476-
SCALE4Z0_u = 1
4477-
MIN_VEG_HEIGHT = 0.01
4478-
case (2)
4479-
SCALE4ZVG = 1
4480-
SCALE4Z0 = 2
4481-
SCALE4Z0_u = 2
4482-
MIN_VEG_HEIGHT = 0.01
4483-
case (3)
4484-
SCALE4ZVG = 0.5
4485-
SCALE4Z0 = 1
4486-
SCALE4Z0_u = 1
4487-
MIN_VEG_HEIGHT = 0.01
4488-
case (4)
4489-
SCALE4ZVG = 1
4490-
SCALE4Z0 = 2
4491-
SCALE4Z0_u = 2
4492-
MIN_VEG_HEIGHT = 0.1
4493-
end select
4494-
4495-
SUBTILES: do N=1,NUM_SUBTILES
4496-
4466+
call get_Z0_FORMULATION_params( CATCHCN_INTERNAL%Z0_FORMULATION, &
4467+
MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0 )
4468+
4469+
SUBTILES: do N=1,NUM_SUBTILES
4470+
44974471
! jkolassa Jul 2025: For Z0-formulation == 4 use old (6-class) veg type
44984472
! and mix two veg types
44994473
! Consider updating to a 15-PFT resolution in the future
@@ -4505,21 +4479,21 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
45054479
else
45064480
ZVG = fvg1*(Z2CH - SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI1)) + &
45074481
fvg2*(Z2CH - SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI2))
4508-
!Z0T(:,N) = Z0_BY_ZVEG*ZVG*SCALE4Z0
45094482
endif
4510-
4511-
! For now roughnesses and displacement heights
4512-
! are the same for all subtiles.
4513-
4483+
4484+
! For now roughnesses and displacement heights are the same for all subtiles.
4485+
45144486
Z0T(:,N) = Z0_BY_ZVEG*ZVG*SCALE4Z0
4515-
IF (catchcn_internal%USE_ASCATZ0 == 1) THEN
4516-
WHERE (NDVI <= 0.2)
4517-
Z0T(:,N) = ASCATZ0
4518-
END WHERE
4519-
ENDIF
4520-
D0T = D0_BY_ZVEG*ZVG
4487+
4488+
IF (catchcn_internal%USE_ASCATZ0 == 1) THEN
4489+
WHERE (NDVI <= 0.2)
4490+
Z0T(:,N) = ASCATZ0
4491+
END WHERE
4492+
ENDIF
4493+
4494+
D0T = D0_BY_ZVEG*ZVG
45214495

4522-
DZE = max(DZ - D0T, 10.)
4496+
DZE = max(DZ - D0T, 10.)
45234497

45244498
if(associated(Z0 )) Z0 = Z0T(:,N)
45254499
if(associated(D0 )) D0 = D0T
@@ -4841,7 +4815,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
48414815
integer :: IM,JM
48424816

48434817
real :: SCALE4ZVG
4844-
real :: SCALE4Z0_u
4818+
real :: SCALE4Z0
48454819
real :: MIN_VEG_HEIGHT
48464820

48474821
type(ESMF_VM) :: VM
@@ -4874,29 +4848,9 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
48744848
VERIFY_(STATUS)
48754849

48764850
call ESMF_VMGetCurrent(VM, rc=STATUS)
4877-
4878-
select case (CATCHCN_INTERNAL%Z0_FORMULATION)
4879-
case (0) ! no scaled at all
4880-
SCALE4ZVG = 1
4881-
SCALE4Z0_u = 1
4882-
MIN_VEG_HEIGHT = 0.01
4883-
case (1) ! This case is bugged
4884-
SCALE4ZVG = 1
4885-
SCALE4Z0_u = 1
4886-
MIN_VEG_HEIGHT = 0.01
4887-
case (2)
4888-
SCALE4ZVG = 1
4889-
SCALE4Z0_u = 2
4890-
MIN_VEG_HEIGHT = 0.01
4891-
case (3)
4892-
SCALE4ZVG = 0.5
4893-
SCALE4Z0_u = 1
4894-
MIN_VEG_HEIGHT = 0.01
4895-
case (4)
4896-
SCALE4ZVG = 1
4897-
SCALE4Z0_u = 2
4898-
MIN_VEG_HEIGHT = 0.1
4899-
end select
4851+
4852+
call get_Z0_FORMULATION_params( CATCHCN_INTERNAL%Z0_FORMULATION, &
4853+
MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0 )
49004854

49014855
! ------------------------------------------------------------------------------
49024856
! If its time, recalculate the LSM tile routine
@@ -6489,8 +6443,12 @@ subroutine Driver ( RC )
64896443
fveg2*(Z2CH - SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI2))
64906444
endif
64916445

6492-
Z0 = Z0_BY_ZVEG*ZVG*SCALE4Z0_u
6446+
! For now roughnesses and displacement heights are the same for all subtiles.
6447+
6448+
Z0 = Z0_BY_ZVEG*ZVG*SCALE4Z0
6449+
64936450
IF (catchcn_internal%USE_ASCATZ0 == 1) WHERE (NDVI <= 0.2) Z0 = ASCATZ0
6451+
64946452
D0 = D0_BY_ZVEG*ZVG
64956453

64966454
UUU = max(UU,MAPL_USMIN) * (log((ZVG-D0+Z0)/Z0) &

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90

Lines changed: 15 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3246,7 +3246,6 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
32463246
integer :: CHOOSEZ0
32473247
real :: SCALE4Z0
32483248
real :: SCALE4ZVG
3249-
real :: SCALE4Z0_u
32503249
real :: MIN_VEG_HEIGHT
32513250

32523251
! -------------------------------------
@@ -3560,35 +3559,10 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
35603559
if(associated( MOQ2M)) MOQ2M = 0.0
35613560
if(associated( MOU2M)) MOU2M = 0.0
35623561
if(associated( MOV2M)) MOV2M = 0.0
3563-
3564-
select case (CATCH_INTERNAL_STATE%Z0_FORMULATION)
3565-
case (0) ! no scaled at all
3566-
SCALE4ZVG = 1
3567-
SCALE4Z0 = 1
3568-
SCALE4Z0_u = 1
3569-
MIN_VEG_HEIGHT = 0.01
3570-
case (1) ! This case is bugged
3571-
SCALE4ZVG = 1
3572-
SCALE4Z0 = 2
3573-
SCALE4Z0_u = 1
3574-
MIN_VEG_HEIGHT = 0.01
3575-
case (2)
3576-
SCALE4ZVG = 1
3577-
SCALE4Z0 = 2
3578-
SCALE4Z0_u = 2
3579-
MIN_VEG_HEIGHT = 0.01
3580-
case (3)
3581-
SCALE4ZVG = 0.5
3582-
SCALE4Z0 = 1
3583-
SCALE4Z0_u = 1
3584-
MIN_VEG_HEIGHT = 0.01
3585-
case (4)
3586-
SCALE4ZVG = 1
3587-
SCALE4Z0 = 2
3588-
SCALE4Z0_u = 2
3589-
MIN_VEG_HEIGHT = 0.1
3590-
end select
3591-
3562+
3563+
call get_Z0_FORMULATION_params( CATCH_INTERNAL_STATE%Z0_FORMULATION, &
3564+
MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0 )
3565+
35923566
SUBTILES: do N=1,NUM_SUBTILES
35933567

35943568
! Effective vegetation height. In catchment, LAI dependence
@@ -3602,18 +3576,18 @@ subroutine RUN1 ( GC, IMPORT, EXPORT, CLOCK, RC )
36023576
ZVG = Z2CH - SAI4ZVG(VEG)*SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI)
36033577
else
36043578
ZVG = Z2CH - SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI)
3605-
!Z0T(:,N) = Z0_BY_ZVEG*ZVG*SCALE4Z0
36063579
endif
3607-
3608-
! For now roughnesses and displacement heights
3609-
! are the same for all subtiles.
3610-
3580+
3581+
! For now roughnesses and displacement heights are the same for all subtiles.
3582+
36113583
Z0T(:,N) = Z0_BY_ZVEG*ZVG*SCALE4Z0
3584+
36123585
IF (CATCH_INTERNAL_STATE%USE_ASCATZ0 == 1) THEN
36133586
WHERE (NDVI <= 0.2)
36143587
Z0T(:,N) = ASCATZ0
36153588
END WHERE
36163589
ENDIF
3590+
36173591
D0T = D0_BY_ZVEG*ZVG
36183592

36193593
DZE = max(DZ - D0T, 10.)
@@ -3930,7 +3904,7 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
39303904
integer :: IM,JM
39313905

39323906
real :: SCALE4ZVG
3933-
real :: SCALE4Z0_u
3907+
real :: SCALE4Z0
39343908
real :: MIN_VEG_HEIGHT
39353909
type(ESMF_VM) :: VM
39363910
type (T_CATCH_STATE), pointer :: CATCH_INTERNAL_STATE
@@ -3964,28 +3938,8 @@ subroutine RUN2 ( GC, IMPORT, EXPORT, CLOCK, RC )
39643938

39653939
call ESMF_VMGetCurrent(VM, rc=STATUS)
39663940

3967-
select case (CATCH_INTERNAL_STATE%Z0_FORMULATION)
3968-
case (0) ! no scaled at all
3969-
SCALE4ZVG = 1
3970-
SCALE4Z0_u = 1
3971-
MIN_VEG_HEIGHT = 0.01
3972-
case (1) ! This case is bugged
3973-
SCALE4ZVG = 1
3974-
SCALE4Z0_u = 1
3975-
MIN_VEG_HEIGHT = 0.01
3976-
case (2)
3977-
SCALE4ZVG = 1
3978-
SCALE4Z0_u = 2
3979-
MIN_VEG_HEIGHT = 0.01
3980-
case (3)
3981-
SCALE4ZVG = 0.5
3982-
SCALE4Z0_u = 1
3983-
MIN_VEG_HEIGHT = 0.01
3984-
case (4)
3985-
SCALE4ZVG = 1
3986-
SCALE4Z0_u = 2
3987-
MIN_VEG_HEIGHT = 0.1
3988-
end select
3941+
call get_Z0_FORMULATION_params( CATCH_INTERNAL_STATE%Z0_FORMULATION, &
3942+
MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0 )
39893943

39903944
! ------------------------------------------------------------------------------
39913945
! If its time, recalculate the LSM tile routine
@@ -5132,13 +5086,12 @@ subroutine Driver ( RC )
51325086
ZVG = Z2CH - SCALE4ZVG*(Z2CH - MIN_VEG_HEIGHT)*exp(-LAI)
51335087
endif
51345088

5135-
Z0 = Z0_BY_ZVEG*ZVG*SCALE4Z0_u
5089+
! For now roughnesses and displacement heights are the same for all subtiles.
51365090

5137-
! For now roughnesses and displacement heights
5138-
! are the same for all subtiles.
5139-
!---------------------------------------------------
5091+
Z0 = Z0_BY_ZVEG*ZVG*SCALE4Z0
51405092

51415093
IF (CATCH_INTERNAL_STATE%USE_ASCATZ0 == 1) WHERE (NDVI <= 0.2) Z0 = ASCATZ0
5094+
51425095
D0 = D0_BY_ZVEG*ZVG
51435096

51445097
UUU = max(UU,MAPL_USMIN) * (log((ZVG-D0+Z0)/Z0) &

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/Shared/lsm_routines.F90

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2367,18 +2367,6 @@ subroutine gndtmp(phi,zbar,ht,xfice,tp,FICE,dts,thetaf,fh21)
23672367

23682368
end subroutine gndtmp
23692369

2370-
! *******************************************************************
2371-
2372-
2373-
2374-
2375-
2376-
2377-
2378-
2379-
2380-
2381-
23822370
! *******************************************************************
23832371

23842372
subroutine catch_calc_tp( NTILES, poros, ghtcnt, tp, fice )
@@ -2519,8 +2507,6 @@ end subroutine catch_calc_wtotl
25192507

25202508
! *******************************************************************
25212509

2522-
! *******************************************************************
2523-
25242510
subroutine catch_calc_ght( dzgt, poros, tp, fice, ghtcnt )
25252511

25262512
! Invert (model diagnostic) soil temperature and ice fraction
@@ -2729,6 +2715,52 @@ subroutine dampen_tc_oscillations( dtstep, tair, tc_old, tc_new_in, &
27292715

27302716
end subroutine dampen_tc_oscillations
27312717

2718+
! *******************************************************************
2719+
2720+
subroutine get_Z0_FORMULATION_params( Z0_FORM, &
2721+
MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0 )
2722+
2723+
integer, intent(in) :: Z0_FORM
2724+
real, intent(out) :: MIN_VEG_HEIGHT, SCALE4ZVG, SCALE4Z0
2725+
2726+
! -------------------------------------------------
2727+
2728+
select case (Z0_FORM)
2729+
2730+
case (0) ! not scaled at all
2731+
SCALE4ZVG = 1
2732+
SCALE4Z0 = 1
2733+
MIN_VEG_HEIGHT = 0.01
2734+
2735+
!case (1) ! This case is bugged; was used in Ganymed-4_1, SMAP NRv4/NRv4.1; DISABLED 28 Aug 2025
2736+
! SCALE4ZVG = 1
2737+
! SCALE4Z0 = 2 ! was used in RUN1()
2738+
! SCALE4Z0_u = 1 ! was used in RUN2(), inconsistent with RUN1()
2739+
! MIN_VEG_HEIGHT = 0.01
2740+
2741+
case (2)
2742+
SCALE4ZVG = 1
2743+
SCALE4Z0 = 2
2744+
MIN_VEG_HEIGHT = 0.01
2745+
2746+
case (3)
2747+
SCALE4ZVG = 0.5
2748+
SCALE4Z0 = 1
2749+
MIN_VEG_HEIGHT = 0.01
2750+
2751+
case (4)
2752+
SCALE4ZVG = 1
2753+
SCALE4Z0 = 2
2754+
MIN_VEG_HEIGHT = 0.1
2755+
2756+
case default
2757+
2758+
_ASSERT(.FALSE., 'unknown Z0_FORMULATION')
2759+
2760+
end select
2761+
2762+
end subroutine get_Z0_FORMULATION_params
2763+
27322764
! ********************************************************************
27332765

27342766
SUBROUTINE irrigation_rate (IRRIG_METHOD, &

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Shared/GEOS_SurfaceGridComp.rc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@
6969
# For CatchCNCLM40, Z0_FORMULATION=3 is hardwired.
7070
#
7171
# 0 : Fortuna, SMAP NRv3
72-
# 1 : Ganymed-4_1, SMAP NRv4/NRv4.1
72+
# [1 : Ganymed-4_1, SMAP NRv4/NRv4.1] --> DISABLED, 28 Aug 2025
7373
# 2 : Heracles-4_3, Icarus (AGCM default)
7474
# 3 : SMAP NRv5/NRv7.2
7575
# 4 : Icarus-NLv3 (f525_fp, f527_fp, f529_fp)
76-
# SMAP NRv8.1, NRv9.1, NRv10.0
76+
# SMAP NRv8.1, NRv9.1, NRv10.0, NRv11.4
7777
#
7878
# GEOSagcm=>Z0_FORMULATION: 4
7979
# GEOSldas=>Z0_FORMULATION: 4

0 commit comments

Comments
 (0)