Skip to content

Commit

Permalink
mv froot initialization back to vegin where necessary fields are alre…
Browse files Browse the repository at this point in the history
…ady present
  • Loading branch information
JhanSrbinovsky committed Dec 12, 2024
1 parent 771028e commit eed8513
Showing 1 changed file with 16 additions and 28 deletions.
44 changes: 16 additions & 28 deletions src/coupled/ESM1.5/CABLEfilesFromESM1.5/cable_um_init_subrs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ END SUBROUTINE initialize_veg

SUBROUTINE init_veg_pars_fr_vegin( soil_zse )

USE cable_common_module, ONLY: cable_user
USE cable_params_mod, ONLY: vegin
USE cable_um_tech_mod, ONLY: veg, soil
USE cable_def_types_mod, ONLY: mp, ms

Expand All @@ -340,37 +338,16 @@ SUBROUTINE init_veg_pars_fr_vegin( soil_zse )

CALL init_veg_from_vegin(1, mp, veg, soil_zse)

IF (cable_user%access13roots) THEN
! default prescribed values used in CMIP6 ACCESS-ESM1.5
veg%froot(:,1) = 0.05
veg%froot(:,2) = 0.20
veg%froot(:,3) = 0.20
veg%froot(:,4) = 0.20
veg%froot(:,5) = 0.20
veg%froot(:,6) = 0.15
ELSE
! parametrized values used in CMIP6 ACCESS-CM2
! calculate vegin%froot from using rootbeta and soil depth
! (Jackson et al. 1996, Oceologica, 108:389-411)
totdepth = 0.0
DO is = 1, ms-1
totdepth = totdepth + soil_zse(is) * 100.0 ! unit in centimetres
veg%froot(:, is) = MIN( 1.0, 1.0-veg%rootbeta(:)**totdepth )
END DO
veg%froot(:, ms) = 1.0 - veg%froot(:, ms-1)
DO is = ms-1, 2, -1
veg%froot(:, is) = veg%froot(:, is)-veg%froot(:,is-1)
END DO

ENDIF

RETURN

END SUBROUTINE init_veg_pars_fr_vegin

SUBROUTINE init_veg_from_vegin(ifmp,fmp, veg, soil_zse )
use cable_def_types_mod, ONLY : veg_parameter_type, ms, mp
USE cable_params_mod, ONLY : vegin

USE cable_def_types_mod, ONLY: veg_parameter_type, ms, mp
USE cable_params_mod, ONLY: vegin
USE cable_common_module, ONLY: cable_user

integer :: ifmp, & ! start local mp, # landpoints (jhan:when is this not 1 )
fmp ! local mp, # landpoints
Expand Down Expand Up @@ -428,7 +405,16 @@ SUBROUTINE init_veg_from_vegin(ifmp,fmp, veg, soil_zse )
veg%clitt(h) = vegin%clitt(veg%iveg(h))
END DO ! over each veg patch in land point

!used in CM2 - overwritten here
IF (cable_user%access13roots) THEN
! default prescribed values used in CMIP6 ACCESS-ESM1.5
veg%froot(:,1) = 0.05
veg%froot(:,2) = 0.20
veg%froot(:,3) = 0.20
veg%froot(:,4) = 0.20
veg%froot(:,5) = 0.20
veg%froot(:,6) = 0.15
ELSE
! parametrized values used in CMIP6 ACCESS-CM2
! calculate vegin%froot from using rootbeta and soil depth
! (Jackson et al. 1996, Oceologica, 108:389-411)
totdepth = 0.0
Expand All @@ -441,7 +427,9 @@ SUBROUTINE init_veg_from_vegin(ifmp,fmp, veg, soil_zse )
veg%froot(:, is) = veg%froot(:, is)-veg%froot(:,is-1)
END DO

ENDIF

RETURN
END SUBROUTINE init_veg_from_vegin


Expand Down

0 comments on commit eed8513

Please sign in to comment.