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

Update from master #381

Merged
merged 69 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
2240d84
Fill values for soil parameters of water body
zhangsp8 Jan 16, 2025
15be31f
Merge branch 'master' of github.com:zhangsp8/CoLM202X
zhangsp8 Jan 16, 2025
31d5b6c
Update CoLM.F90
Oscarrrhhhh Jan 18, 2025
009c94d
Code optimizations.
zhangsp8 Jan 18, 2025
f03648c
Merge pull request #370 from Oscarrrhhhh/patch-12
CoLM-SYSU Jan 18, 2025
673269e
Merge pull request #371 from zhangsp8/master
CoLM-SYSU Jan 18, 2025
2e14a75
fix a bug in snowwater_lake when dealing with snow melt above unfroze…
Jan 21, 2025
7da0c03
Merge pull request #372 from bnuweinan/master
CoLM-SYSU Jan 21, 2025
ba7e20f
Modify snow optical properties for VEG SNOW.
yuanhuas Jan 21, 2025
1b0991d
Merge branch 'master' of github.com:yuanhuas/CoLM202X
yuanhuas Jan 21, 2025
2f0b44c
Adjust leaf snow optical properties for VEG_SNOW.
yuanhuas Jan 23, 2025
2464819
update runscripts for tianhe; add DEF_PIO_groupsize=2 for mkinitial
chrislxj Jan 23, 2025
850cdd1
additional configuration files are added for scripts
chrislxj Jan 23, 2025
af7efaf
Merge pull request #373 from chrislxj/master
CoLM-SYSU Jan 23, 2025
e217c92
Optimization for special cases of defining grid.
zhangsp8 Jan 23, 2025
3396335
Merge branch 'CoLM-SYSU:master' into master
zhangsp8 Jan 23, 2025
18bd8ae
Fix bug in create_scripts
CoLM-SYSU Jan 23, 2025
9b9a64b
Merge pull request #374 from zhangsp8/master
CoLM-SYSU Jan 24, 2025
fb9be04
Optimize send/recv in MOD_Mesh
zhangsp8 Jan 25, 2025
5e1cdc7
Merge branch 'master' of github.com:zhangsp8/CoLM202X
zhangsp8 Jan 25, 2025
e88e18c
Merge branch 'CoLM-SYSU:master' into master
zhangsp8 Jan 25, 2025
5b0abb0
1) Fix to be able run PFP/PC for non-soil-vegetated sites; 2) LAI read
yuanhuas Jan 25, 2025
6002d67
Merge branch 'CoLM-SYSU:master' into master
yuanhuas Jan 25, 2025
f346d68
Merge branch 'master' of github.com:yuanhuas/CoLM202X
yuanhuas Jan 25, 2025
8707c51
Code format adjust.
yuanhuas Jan 25, 2025
414b297
Merge pull request #375 from zhangsp8/master
CoLM-SYSU Jan 25, 2025
f5a881d
Optimize for Single Point run.
yuanhuas Jan 28, 2025
c8a1c1e
Merge branch 'CoLM-SYSU:master' into master
yuanhuas Feb 2, 2025
670ad40
Code tidy for Urban and related files, including the format of
yuanhuas Feb 4, 2025
f565e9b
Correct many type errors for main/*.F90.
yuanhuas Feb 4, 2025
987e22a
Change foreward to forward for forcing namelist files.
yuanhuas Feb 4, 2025
517b3a4
Correct for type errors and annotation indent for LULCC.
yuanhuas Feb 4, 2025
d1f369a
Correct type errors for mksrfdata/*.F90.
yuanhuas Feb 4, 2025
f2f5cb2
Correct type errors for mkinidata/*.F90.
yuanhuas Feb 4, 2025
d3ed5c7
Correct type errors of annotations for other directories.
yuanhuas Feb 5, 2025
f15f486
Code format for URBAN model.
yuanhuas Feb 5, 2025
365be24
Code tidy for LULCC.
yuanhuas Feb 5, 2025
a3963b6
Code tidy and correct type errors for main/*.F90.
yuanhuas Feb 5, 2025
5c72a6e
Code tidy for urban model.
yuanhuas Feb 6, 2025
2daeea8
Code tidy for LULCC.
yuanhuas Feb 6, 2025
40604ec
Code format tidy for main/*.F90.
yuanhuas Feb 6, 2025
4f22902
bug fixed of fsatdcf in CoLMDRIVER.F90
zhangsp8 Feb 9, 2025
b52cc12
Merge branch 'master' of github.com:zhangsp8/CoLM202X
zhangsp8 Feb 9, 2025
70b5955
Add vf_clay as a global variable required by land assimulation
Feb 9, 2025
32bd86a
New basin network to improve efficiency of lateral flow.
zhangsp8 Feb 9, 2025
2ecf4c5
fix a bug in Fitting algorithm
Feb 9, 2025
affd0cb
restore constraints in Aggregation_SoilParameters
zhangsp8 Feb 9, 2025
09f3365
Revised leaf snow properties.
yuanhuas Feb 10, 2025
c1c4e0d
modification to basin network.
zhangsp8 Feb 11, 2025
e368ab7
Code format for MOD_OrbCoszen.F90.
yuanhuas Feb 11, 2025
d1ca562
Merge pull request #376 from bnuweinan/master
CoLM-SYSU Feb 11, 2025
7bcc985
Merge branch 'CoLM-SYSU:master' into master
zhangsp8 Feb 11, 2025
a3553c1
modification to soil parameter aggregation
zhangsp8 Feb 11, 2025
6cf0044
constrain river velocity.
zhangsp8 Feb 11, 2025
037adfe
Merge branch 'CoLM-SYSU:master' into master
yuanhuas Feb 11, 2025
2154a16
Merge pull request #377 from zhangsp8/master
CoLM-SYSU Feb 11, 2025
0c55922
Set default value of vf_clay as 0.1 when the data is missing
Feb 11, 2025
c7d717b
Merge pull request #378 from bnuweinan/master
CoLM-SYSU Feb 11, 2025
ce26b7d
Merge branch 'CoLM-SYSU:master' into master
yuanhuas Feb 12, 2025
00943f2
Merge branch 'master' of github.com:yuanhuas/CoLM202X
yuanhuas Feb 12, 2025
3294571
Add initial value for oroflag.
yuanhuas Feb 12, 2025
51831d8
Resolve conflicts before merge.
yuanhuas Feb 12, 2025
da772a6
Merge branch 'master' into codetidy
yuanhuas Feb 12, 2025
76a3923
Type error fix for MOD_Vars_1DFluxes.F90.
yuanhuas Feb 12, 2025
a73800d
Merge pull request #379 from yuanhuas/master
CoLM-SYSU Feb 12, 2025
447fcaa
Merge branch 'master' into codetidy
yuanhuas Feb 13, 2025
d41cd66
Unify annotation Dummy Arguments.
yuanhuas Feb 13, 2025
cdc20db
Code indent for MOD_Initialize.F90.
yuanhuas Feb 13, 2025
ec67969
Merge pull request #380 from yuanhuas/codetidy
CoLM-SYSU Feb 15, 2025
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
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ mksrfdata.x : mkdir_build ${HEADER} ${OBJS_SHARED} ${OBJS_MKSRFDATA}
# ----- End of Target 1 mksrfdata ----

OBJS_BASIC = \
MOD_Hydro_IO.o \
MOD_Hydro_Vars_TimeVariables.o \
MOD_Hydro_Vars_1DFluxes.o \
MOD_Catch_BasinNetwork.o \
MOD_Catch_IO.o \
MOD_Catch_Vars_TimeVariables.o \
MOD_Catch_Vars_1DFluxes.o \
MOD_BGC_Vars_1DFluxes.o \
MOD_BGC_Vars_1DPFTFluxes.o \
MOD_BGC_Vars_PFTimeVariables.o \
Expand Down Expand Up @@ -224,7 +225,7 @@ OBJS_MAIN = \
MOD_Catch_HillslopeFlow.o \
MOD_Catch_SubsurfaceFlow.o \
MOD_Catch_RiverLakeFlow.o \
MOD_Hydro_Hist.o \
MOD_Catch_Hist.o \
MOD_BGC_CNCStateUpdate1.o \
MOD_BGC_CNCStateUpdate2.o \
MOD_BGC_CNCStateUpdate3.o \
Expand Down
64 changes: 32 additions & 32 deletions main/BGC/MOD_BGC_CNCStateUpdate1.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
#ifdef BGC

MODULE MOD_BGC_CNCStateUpdate1
!-------------------------------------------------------------------------------------------------

!-------------------------------------------------------------------------------------------------
! !DESCRIPTION:
! First updates in vegetation and soil carbon. Thre major updates are included in bgc_CNCStateUpdate1Mod
! First updates in vegetation and soil carbon. The major updates are included in bgc_CNCStateUpdate1Mod
! 1. Update phenology-associated veg and soil C pool size changes, including plant growth
! 2. Update decomposition-associated soil C pool size changes
! 3. Record the accumulated C transfers associated to phenology and decomposition for semi-analytic spinup
Expand All @@ -14,7 +14,7 @@ MODULE MOD_BGC_CNCStateUpdate1
! The Community Land Model version 5.0 (CLM5.0)
!
! REVISION:
! Xingjie Lu, 2022, 1) modify original CLM5 to be compatible with CoLM code structure.
! Xingjie Lu, 2022, 1) modify original CLM5 to be compatible with CoLM code structure.
! 2) Record the accumulated phenology-associated C transfer for veg and soil C semi-analytic spinup
! 3) Record the accumulated decomposition-associated C transfer for soil C semi-analytic spinup

Expand All @@ -32,10 +32,10 @@ MODULE MOD_BGC_CNCStateUpdate1
AKX_cwd_to_cel_c_vr_acc , AKX_cwd_to_lig_c_vr_acc , AKX_soil1_to_soil3_c_vr_acc, AKX_soil2_to_soil1_c_vr_acc, &
AKX_soil2_to_soil3_c_vr_acc, AKX_soil3_to_soil1_c_vr_acc, &
AKX_met_exit_c_vr_acc , AKX_cel_exit_c_vr_acc , AKX_lig_exit_c_vr_acc , AKX_cwd_exit_c_vr_acc , &
AKX_soil1_exit_c_vr_acc , AKX_soil2_exit_c_vr_acc , AKX_soil3_exit_c_vr_acc
AKX_soil1_exit_c_vr_acc , AKX_soil2_exit_c_vr_acc , AKX_soil3_exit_c_vr_acc

USE MOD_BGC_Vars_1DFluxes, only: &
! decomposition pools flux varables (in)
! decomposition pools flux variables (in)
decomp_cpools_sourcesink, decomp_ctransfer_vr, decomp_hr_vr , &
phenology_to_met_c , phenology_to_cel_c , phenology_to_lig_c

Expand All @@ -54,32 +54,32 @@ MODULE MOD_BGC_CNCStateUpdate1
! crop variables (in)
harvdate_p , cropprod1c_p , &

! SASU variables
! SASU variables
I_leafc_p_acc , I_leafc_st_p_acc , I_frootc_p_acc , I_frootc_st_p_acc , &
I_livestemc_p_acc , I_livestemc_st_p_acc , I_deadstemc_p_acc , I_deadstemc_st_p_acc , &
I_livecrootc_p_acc, I_livecrootc_st_p_acc, I_deadcrootc_p_acc, I_deadcrootc_st_p_acc, &
I_grainc_p_acc , I_grainc_st_p_acc , &

AKX_leafc_xf_to_leafc_p_acc , AKX_frootc_xf_to_frootc_p_acc , AKX_livestemc_xf_to_livestemc_p_acc , &
AKX_deadstemc_xf_to_deadstemc_p_acc , AKX_livecrootc_xf_to_livecrootc_p_acc , AKX_deadcrootc_xf_to_deadcrootc_p_acc , &
AKX_grainc_xf_to_grainc_p_acc , AKX_livestemc_to_deadstemc_p_acc , AKX_livecrootc_to_deadcrootc_p_acc , &

AKX_leafc_st_to_leafc_xf_p_acc , AKX_frootc_st_to_frootc_xf_p_acc , AKX_livestemc_st_to_livestemc_xf_p_acc , &
AKX_deadstemc_st_to_deadstemc_xf_p_acc, AKX_livecrootc_st_to_livecrootc_xf_p_acc, AKX_deadcrootc_st_to_deadcrootc_xf_p_acc, &
AKX_livestemc_st_to_livestemc_xf_p_acc, AKX_grainc_st_to_grainc_xf_p_acc , &

AKX_leafc_exit_p_acc , AKX_frootc_exit_p_acc , AKX_livestemc_exit_p_acc , &
AKX_deadstemc_exit_p_acc , AKX_livecrootc_exit_p_acc , AKX_deadcrootc_exit_p_acc , &
AKX_grainc_exit_p_acc , &

AKX_leafc_st_exit_p_acc , AKX_frootc_st_exit_p_acc , AKX_livestemc_st_exit_p_acc , &
AKX_deadstemc_st_exit_p_acc , AKX_livecrootc_st_exit_p_acc , AKX_deadcrootc_st_exit_p_acc , &
AKX_grainc_st_exit_p_acc , &

AKX_leafc_xf_exit_p_acc , AKX_frootc_xf_exit_p_acc , AKX_livestemc_xf_exit_p_acc , &
AKX_deadstemc_xf_exit_p_acc , AKX_livecrootc_xf_exit_p_acc , AKX_deadcrootc_xf_exit_p_acc , &
AKX_grainc_xf_exit_p_acc


USE MOD_BGC_Vars_1DPFTFluxes, only: &
! vegetation carbon flux variables (in)
Expand Down Expand Up @@ -124,7 +124,7 @@ MODULE MOD_BGC_CNCStateUpdate1
cpool_leaf_storage_gr_p , cpool_froot_storage_gr_p , &
cpool_livestem_storage_gr_p , cpool_deadstem_storage_gr_p , &
cpool_livecroot_storage_gr_p, cpool_deadcroot_storage_gr_p , &

cpool_grain_gr_p , cpool_grain_storage_gr_p , &

! maintenance respiration fluxes (in)
Expand All @@ -135,11 +135,11 @@ MODULE MOD_BGC_CNCStateUpdate1
transfer_leaf_gr_p , transfer_froot_gr_p , &
transfer_livestem_gr_p , transfer_deadstem_gr_p , &
transfer_livecroot_gr_p, transfer_deadcroot_gr_p, &
transfer_grain_gr_p , xsmrpool_to_atm_p
transfer_grain_gr_p , xsmrpool_to_atm_p


IMPLICIT NONE

PUBLIC :: CStateUpdate1

CONTAINS
Expand Down Expand Up @@ -167,23 +167,23 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
decomp_cpools_sourcesink(j,i_lig_lit,i) = phenology_to_lig_c(j,i) *deltim
decomp_cpools_sourcesink(j,i_cwd ,i) = 0._r8
ENDDO

IF(DEF_USE_SASU .or. DEF_USE_DiagMatrix)THEN
DO j=1,nl_soil
I_met_c_vr_acc(j,i) = I_met_c_vr_acc(j,i) + phenology_to_met_c(j,i) *deltim
I_cel_c_vr_acc(j,i) = I_cel_c_vr_acc(j,i) + phenology_to_cel_c(j,i) *deltim
I_lig_c_vr_acc(j,i) = I_lig_c_vr_acc(j,i) + phenology_to_lig_c(j,i) *deltim
ENDDO
ENDIF

DO k = 1, ndecomp_transitions
DO j = 1,nl_soil
decomp_cpools_sourcesink(j,donor_pool(k),i) = &
decomp_cpools_sourcesink(j,donor_pool(k),i) &
- (decomp_hr_vr(j,k,i) + decomp_ctransfer_vr(j,k,i)) * deltim
ENDDO
ENDDO
ENDDO

DO k = 1,ndecomp_transitions
IF ( receiver_pool(k) /= 0 ) THEN ! skip terminal transitions
DO j = 1,nl_soil
Expand All @@ -193,7 +193,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
ENDDO
ENDIF
ENDDO

IF(DEF_USE_SASU .or. DEF_USE_DiagMatrix)THEN
DO j = 1, nl_soil
AKX_met_to_soil1_c_vr_acc (j,i) = AKX_met_to_soil1_c_vr_acc (j,i) + decomp_ctransfer_vr(j, 1,i) * deltim
Expand All @@ -206,7 +206,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
AKX_soil2_to_soil1_c_vr_acc(j,i) = AKX_soil2_to_soil1_c_vr_acc(j,i) + decomp_ctransfer_vr(j, 8,i) * deltim
AKX_soil2_to_soil3_c_vr_acc(j,i) = AKX_soil2_to_soil3_c_vr_acc(j,i) + decomp_ctransfer_vr(j, 9,i) * deltim
AKX_soil3_to_soil1_c_vr_acc(j,i) = AKX_soil3_to_soil1_c_vr_acc(j,i) + decomp_ctransfer_vr(j,10,i) * deltim

AKX_met_exit_c_vr_acc (j,i) = AKX_met_exit_c_vr_acc (j,i) + (decomp_hr_vr(j, 1,i) + decomp_ctransfer_vr(j, 1,i)) * deltim
AKX_cel_exit_c_vr_acc (j,i) = AKX_cel_exit_c_vr_acc (j,i) + (decomp_hr_vr(j, 2,i) + decomp_ctransfer_vr(j, 2,i)) * deltim
AKX_lig_exit_c_vr_acc (j,i) = AKX_lig_exit_c_vr_acc (j,i) + (decomp_hr_vr(j, 3,i) + decomp_ctransfer_vr(j, 3,i)) * deltim
Expand All @@ -219,7 +219,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
AKX_soil3_exit_c_vr_acc (j,i) = AKX_soil3_exit_c_vr_acc (j,i) + (decomp_hr_vr(j,10,i) + decomp_ctransfer_vr(j,10,i)) * deltim
ENDDO
ENDIF

DO m = ps , pe
ivt = pftclass(m)
leafc_p (m) = leafc_p (m) + leafc_xfer_to_leafc_p (m) * deltim
Expand All @@ -243,7 +243,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
grainc_p (m) = grainc_p (m) + grainc_xfer_to_grainc_p (m) * deltim
grainc_xfer_p (m) = grainc_xfer_p (m) - grainc_xfer_to_grainc_p (m) * deltim
ENDIF

IF(DEF_USE_SASU .or. DEF_USE_DiagMatrix)THEN
AKX_leafc_xf_to_leafc_p_acc (m) = AKX_leafc_xf_to_leafc_p_acc (m) + leafc_xfer_to_leafc_p (m) * deltim
AKX_frootc_xf_to_frootc_p_acc(m) = AKX_frootc_xf_to_frootc_p_acc(m) + frootc_xfer_to_frootc_p(m) * deltim
Expand All @@ -266,11 +266,11 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
AKX_grainc_xf_exit_p_acc (m) = AKX_grainc_xf_exit_p_acc (m) + grainc_xfer_to_grainc_p (m) * deltim
ENDIF
ENDIF

! phenology: litterfall fluxes
leafc_p (m) = leafc_p (m) - leafc_to_litter_p (m) * deltim
frootc_p(m) = frootc_p(m) - frootc_to_litter_p(m) * deltim

! livewood turnover fluxes
IF (woody(ivt) == 1) THEN
livestemc_p (m) = livestemc_p (m) - livestemc_to_deadstemc_p (m) * deltim
Expand All @@ -283,7 +283,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
grainc_p (m) = grainc_p (m) - (grainc_to_food_p(m) + grainc_to_seed_p(m)) * deltim
cropseedc_deficit_p(m) = cropseedc_deficit_p(m) - crop_seedc_to_leaf_p(m) * deltim + grainc_to_seed_p(m) * deltim
ENDIF

IF(DEF_USE_SASU .or. DEF_USE_DiagMatrix)THEN
AKX_leafc_exit_p_acc (m) = AKX_leafc_exit_p_acc (m) + leafc_to_litter_p (m) * deltim
AKX_frootc_exit_p_acc(m) = AKX_frootc_exit_p_acc(m) + frootc_to_litter_p(m) * deltim
Expand Down Expand Up @@ -391,7 +391,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
cpool_p (m) = cpool_p (m) - cpool_livestem_gr_p (m) * deltim
cpool_p (m) = cpool_p (m) - cpool_grain_gr_p (m) * deltim
ENDIF

gresp_xfer_p(m) = gresp_xfer_p(m) - transfer_leaf_gr_p (m) * deltim
gresp_xfer_p(m) = gresp_xfer_p(m) - transfer_froot_gr_p(m) * deltim
IF (woody(ivt) == 1) THEN
Expand All @@ -417,11 +417,11 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
cpool_p (m) = cpool_p (m) - cpool_livestem_storage_gr_p (m) * deltim
cpool_p (m) = cpool_p (m) - cpool_grain_storage_gr_p (m) * deltim
ENDIF

! growth respiration stored for release during transfer growth
cpool_p (m) = cpool_p (m) - cpool_to_gresp_storage_p(m) * deltim
gresp_storage_p(m) = gresp_storage_p(m) + cpool_to_gresp_storage_p(m) * deltim

! move storage pools into transfer pools
leafc_storage_p (m) = leafc_storage_p (m) - leafc_storage_to_xfer_p (m) * deltim
leafc_xfer_p (m) = leafc_xfer_p (m) + leafc_storage_to_xfer_p (m) * deltim
Expand All @@ -430,7 +430,7 @@ SUBROUTINE CStateUpdate1 (i, ps, pe, deltim, nl_soil, ndecomp_transitions, npcro
IF (woody(ivt) == 1) THEN
gresp_storage_p (m) = gresp_storage_p (m) - gresp_storage_to_xfer_p(m) * deltim
gresp_xfer_p (m) = gresp_xfer_p (m) + gresp_storage_to_xfer_p(m) * deltim

livestemc_storage_p (m) = livestemc_storage_p (m) - livestemc_storage_to_xfer_p (m) * deltim
livestemc_xfer_p (m) = livestemc_xfer_p (m) + livestemc_storage_to_xfer_p (m) * deltim
deadstemc_storage_p (m) = deadstemc_storage_p (m) - deadstemc_storage_to_xfer_p (m) * deltim
Expand Down
Loading