-
Notifications
You must be signed in to change notification settings - Fork 338
Multilayer Canopy #1996
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
base: master
Are you sure you want to change the base?
Multilayer Canopy #1996
Changes from 1 commit
29c72a9
b3f245a
4641c8d
7518e79
447fc97
b996a7a
90fcf64
018ac84
fb60fe8
9152d3a
5146260
95710d8
76deeb3
d730e34
7de8f78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -362,19 +362,19 @@ subroutine MLCanopyFluxes (bounds, num_exposedvegp, filter_exposedvegp, & | |
p = filter_mlcan(fp) | ||
c = patch%column(p) | ||
g = patch%gridcell(p) | ||
lat = grc%latdeg(g) * pi / 180._r8 | ||
lon = grc%londeg(g) * pi / 180._r8 | ||
lat = grc%lat(g) | ||
lon = grc%lon(g) | ||
coszen = shr_orb_cosz (caldaym1, lat, lon, declinm1) | ||
solar_zen(p) = acos(max(0.01_r8,coszen)) | ||
|
||
! Compare coszen to that expected from CLM | ||
|
||
if (abs(coszen-surfalb_inst%coszen_col(c)) .gt. 1.e-03_r8) then | ||
if (abs(coszen-surfalb_inst%coszen_col(c)) > 1.e-2_r8) then | ||
write (iulog,*) 'ERROR: MLCanopyFluxes: coszen diagnostic timestepping error' | ||
write (iulog,*) 'nstep: ',nstep | ||
write (iulog,*) 'coszen: ',coszen | ||
write (iulog,*) 'CLM coszen: ',surfalb_inst%coszen_col(c) | ||
! call endrun (msg=' MLCanopyFluxes: stopping on coszen error') | ||
call endrun (msg=' MLCanopyFluxes: stopping on coszen error') | ||
end if | ||
end do | ||
|
||
|
@@ -407,12 +407,18 @@ subroutine MLCanopyFluxes (bounds, num_exposedvegp, filter_exposedvegp, & | |
dlai(p,ic) = dlai_frac(p,ic) * lai(p) | ||
dsai(p,ic) = dsai_frac(p,ic) * sai(p) | ||
dpai(p,ic) = dlai(p,ic) + dsai(p,ic) | ||
! Now reset values to minimum | ||
dlai(p,ic) = max(dlai(p,ic), 0.01_r8) | ||
dsai(p,ic) = max(dsai(p,ic), 0.01_r8) | ||
dpai(p,ic) = dlai(p,ic) + dsai(p,ic) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gordon, these are the lines that you recommended changing (410 - 411). |
||
end do | ||
|
||
totpai = sum(dpai(p,1:ncan(p))) | ||
if (abs(totpai - (lai(p)+sai(p))) > 1.e-06_r8) then | ||
call endrun (msg=' ERROR: MLCanopyFluxes: plant area index not updated correctly') | ||
end if | ||
! NB slevis 2024/3/19: The next was a valid error check before | ||
! introducing minimum dlai and dsai a few lines up from here | ||
! if (abs(totpai - (lai(p)+sai(p))) > 1.e-06_r8) then | ||
! call endrun (msg=' ERROR: MLCanopyFluxes: plant area index not updated correctly') | ||
! end if | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think I mentioned before, but this error was triggered by the previous change to lines 410-411. Again, I commented it out because I do not think that we should expect it to pass anymore. |
||
|
||
end do | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not bring up this one before, either. It's a simplification that does not change answers.