From 4ec97f2c568610b5a4530193284029a503dc02dd Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Fri, 6 Dec 2024 19:32:24 +0100 Subject: [PATCH] Add cisun and cisha to history --- src/biogeophys/PhotosynthesisMod.F90 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/biogeophys/PhotosynthesisMod.F90 b/src/biogeophys/PhotosynthesisMod.F90 index 6176668f19..029fea7d89 100644 --- a/src/biogeophys/PhotosynthesisMod.F90 +++ b/src/biogeophys/PhotosynthesisMod.F90 @@ -709,6 +709,30 @@ subroutine InitHistory(this, bounds) endif + ! megan variables + this%cisun_z_patch(begp:endp,:) = spval + this%cisha_z_patch(begp:endp,:) = spval + if (nlevcan>1) then + call hist_addfld2d (fname='CISUN', units='(Pa)', type2d='nlevcan', & + avgflag='A', long_name='sunlit leaf intracellular CO2 pressure', & + ptr_patch=this%cisun_z_patch, set_lake=spval, set_urb=spval, default='inactive') + + call hist_addfld2d (fname='CISHA', units='(Pa)', type2d='nlevcan', & + avgflag='A', long_name='shaded leaf intracellular CO2 pressure', & + ptr_patch=this%cisha_z_patch, set_lake=spval, set_urb=spval, default='inactive') + else + ptr_1d => this%cisun_z_patch(begp:endp,1) + call hist_addfld1d (fname='CISUN', units='(Pa)', & + avgflag='A', long_name='sunlit leaf intracellular CO2 pressure', & + ptr_patch=ptr_1d, default='inactive') + + ptr_1d => this%cisha_z_patch(begp:endp,1) + call hist_addfld1d (fname='CISHA', units='(Pa)', & + avgflag='A', long_name='shaded leaf intracellular CO2 pressure', & + ptr_patch=ptr_1d, default='inactive') + + endif + end subroutine InitHistory !-----------------------------------------------------------------------