Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added wood thinning changes from UM7 repository #433

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions src/coupled/ESM1.5/casa_landuse.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# define ESM15 YES
#ifdef ESM15
module landuse_mod

contains
Expand Down Expand Up @@ -212,8 +210,7 @@ SUBROUTINE newlitter_thin( casabiome,frac_x,ifpre_x,frac_y,ifpre_y, &

DO nL=1,mlitter
DO nP=1,mplant
dclitter(nv,nL) = fromPtoL(nv,nL,nP) *dcplant(nv,nP)
!clitter_g(nv,nL) = clitter_g(nv,nL) + fromPtoL(nv,nL,nP) *dcplant(nv,nP)
dclitter(nv,nL) = dclitter(nv,nL) + fromPtoL(nv,nL,nP)*dcplant(nv,nP)
ENDDO
ENDDO

Expand All @@ -230,15 +227,11 @@ SUBROUTINE newlitter_thin( casabiome,frac_x,ifpre_x,frac_y,ifpre_y, &
dplitter(nv,metb) = dpplant(nv,leaf) + dpplant(nv,froot)-dplitter(nv,str)
dplitter(nv,CWD) = dpplant(nv,wood)
ENDIF !of "icycle >2"
ENDIF
END DO

clitter_g = clitter_g + dclitter
IF (icycle > 1) nlitter_g = nlitter_g + dnlitter
IF (icycle > 2) plitter_g = plitter_g + dplitter
clitter_g(nv,:) = clitter_g(nv,:) + dclitter(nv,:)
IF (icycle > 1) nlitter_g(nv,:) = nlitter_g(nv,:) + dnlitter(nv,:)
IF (icycle > 2) plitter_g(nv,:) = plitter_g(nv,:) + dplitter(nv,:)

DO nv=1,mforest
IF (ifpre_y(nv)) THEN ! pft exist in the 2nd year
clitter_y(nv,:) = clitter_g(nv,:)/frac_y(nv)
IF (icycle > 1) nlitter_y(nv,:) = nlitter_g(nv,:)/frac_y(nv)
IF (icycle > 2) plitter_y(nv,:) = plitter_g(nv,:)/frac_y(nv)
Expand Down
21 changes: 16 additions & 5 deletions src/coupled/ESM1.5/casa_um_inout.F90
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ SUBROUTINE casa_reinit_pk(casabiome,casamet,casapool,casabal,veg,phen, &
!REAL(r_2), DIMENSION(3) :: pool_frac, pool_time
REAL,PARAMETER:: POOL_FRAC(3) =(/0.33, 0.33, 0.34/)
REAL,PARAMETER:: POOL_TIME(3) =(/1.00, 0.10, 0.01/)
REAL(r_2) :: cplant_z(um1%land_pts,um1%ntiles,mplant)
REAL(r_2) :: nplant_z(um1%land_pts,um1%ntiles,mplant)
REAL(r_2) :: pplant_z(um1%land_pts,um1%ntiles,mplant)
REAL(r_2) :: cplant_z(um1%land_pts,um1%ntiles,mplant) ! Plant carbon pools after thinning.
REAL(r_2) :: nplant_z(um1%land_pts,um1%ntiles,mplant) ! Plant nitrogen pools after thinning.
REAL(r_2) :: pplant_z(um1%land_pts,um1%ntiles,mplant) ! Plant phosphorus pools after thinning.

! check if all of them are required
INTEGER :: g, p, k, y ! np
Expand Down Expand Up @@ -507,8 +507,6 @@ SUBROUTINE casa_reinit_pk(casabiome,casamet,casapool,casabal,veg,phen, &
wresp_n = 0.
wresp_p = 0.

thinning = 0.

! assign "old" cnp pool values (from last dump file, initilization)
clabile_x(:,:) = cpool_tile(:,:,1)
cplant_x(:,:,1) = cpool_tile(:,:,2)
Expand Down Expand Up @@ -675,9 +673,15 @@ SUBROUTINE casa_reinit_pk(casabiome,casamet,casapool,casabal,veg,phen, &

! TEST Lestevens 6june18 - thinning forests after luc ----
IF (l_thinforest) THEN
! Initialize local arrays for cnp pools after thinning
cplant_z(g,:,:) = cplant_y(g,:,:)
if (icycle > 1) nplant_z(g,:,:) = nplant_y(g,:,:)
if (icycle > 2) pplant_z(g,:,:) = pplant_y(g,:,:)
! The removed wood needs to be added to the wood_flux variable
logc(g,:) = logc(g,:) + (1 - thinning(g,:))*cplant_y(g,:,wood)
IF (icycle > 1) logn(g,:) = logn(g,:) + (1 - thinning(g,:))*nplant_y(g,:,wood)
IF (icycle > 2) logp(g,:) = logp(g,:) + (1 - thinning(g,:))*pplant_y(g,:,wood)

DO y=1,3 ! pools for whvest
woodhvest_c(g,:,y) = woodhvest_c(g,:,y) + &
(1-thinning(g,:)) * pool_frac(y) * cplant_y(g,:,wood)
Expand All @@ -686,16 +690,23 @@ SUBROUTINE casa_reinit_pk(casabiome,casamet,casapool,casabal,veg,phen, &
if (icycle > 2) woodhvest_p(g,:,y) = woodhvest_p(g,:,y) + &
(1-thinning(g,:)) * pool_frac(y) * pplant_y(g,:,wood)
END DO

! Calculate cnp pools after thinning
DO y=1,mplant
cplant_z(g,:,y) = thinning(g,:) * cplant_y(g,:,y)
if (icycle > 1) nplant_z(g,:,y) = thinning(g,:) * nplant_y(g,:,y)
if (icycle > 2) pplant_z(g,:,y) = thinning(g,:) * pplant_y(g,:,y)
END DO

! Remove thinned mass from plant pools

! Redistribute the harvested plant mass to litter pools
CALL newlitter_thin(casabiome,frac_y(g,:),ifpre_y(g,:),frac_y(g,:),ifpre_y(g,:), &
cplant_y(g,:,:),nplant_y(g,:,:),pplant_y(g,:,:), &
cplant_z(g,:,:),nplant_z(g,:,:),pplant_z(g,:,:), &
clitter_y(g,:,:),nlitter_y(g,:,:),plitter_y(g,:,:), &
clitter_y(g,:,:),nlitter_y(g,:,:),plitter_y(g,:,:),thinning(g,:))
! Restore the new plant pools to output arrays.
cplant_y(g,:,:) = cplant_z(g,:,:)
if (icycle > 1) nplant_y(g,:,:) = nplant_z(g,:,:)
if (icycle > 2) pplant_y(g,:,:) = pplant_z(g,:,:)
Expand Down
Loading