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

duplicate definitions of a few functions in CanopyFluxesMod.F90 #15

Open
billsacks opened this issue Dec 16, 2017 · 1 comment
Open
Labels
code health improving internal code structure to make easier to maintain (sustainability)

Comments

@billsacks
Copy link
Member

Bill Sacks < [email protected] > - 2013-07-23 21:57:40 -0600
Bugzilla Id: 1769
Bugzilla CC: [email protected], [email protected], [email protected],

Starting in clm4_0_67 (Jinyun's changes), there are duplicate definitions of 3 functions: ft, fth, fth25.

It looks like Jinyun turned these into true functions, which is an improvement.

However, the old statement functions were never removed from the top of subroutine Photosynthesis:

real(r8) :: ft ! photosynthesis temperature response (statement function)
real(r8) :: fth ! photosynthesis temperature inhibition (statement function)
real(r8) :: fth25 ! ccaling factor for photosynthesis temperature inhibition (statement function)

...

ft(tl,ha) = exp( ha / (rgas1.e-3_r8(tfrz+25._r8)) * (1._r8 - (tfrz+25._r8)/tl) )
fth(tl,hd,se,cc) = cc / ( 1._r8 + exp( (-hd+setl) / (rgas1.e-3_r8tl) ) )
fth25(hd,se) = 1._r8 + exp( (-hd+se
(tfrz+25._r8)) / (rgas1.e-3_r8(tfrz+25._r8)) )

(Incidentally, I had to go to a fortran reference to even figure out what these lines were doing... now that they have served their educational purpose, I think these old statement functions should be purged.)

I'm guessing that the local statement functions take precedence over the module-level functions, so the module-level functions currently aren't being used. So we should (1) remove the above lines, and then (2) confirm that answers are bfb.

@billsacks billsacks added this to the clm5 milestone Dec 16, 2017
@billsacks
Copy link
Member Author

Stefan < [email protected] > - 2014-04-07 09:47:38 -0600

Need to also pull out Jinyun's new functions as common code to both ED and non-ED code Photosynthesis code.

Should be part of BFB refactor tag.

@billsacks billsacks added the code health improving internal code structure to make easier to maintain (sustainability) label Feb 8, 2018
@billsacks billsacks removed this from the clm5 milestone Nov 7, 2018
MiCurry pushed a commit to MiCurry/CTSM that referenced this issue Sep 16, 2021
fix issue with ice_ic in user_nl file
slevis-lmwg referenced this issue in slevis-lmwg/ctsm Aug 1, 2023
basetype wasn't declared and needed to be. Also add more "implicit none"
statements in. Remove the deletion of "rtm.input_data_list" file, as cime
now does this. Remove the option of setting single-precision
history output, as it sometimes has numerical conversion issues. The
real solution for it should be to keep a single-precision history
buffer that then outputs at the same precision as stored, rather than
converting just before. This would trigger issues with the conversion
earlier.

Changes ported from mosart/#15 to rtm. Run pylint through buildlib/buildnml,
changes for fill value needed for pio2. Also use the floor operator
for a specific integer divide as python3 turns it into reals.

Add CODE_OF_CONDUCT.md
slevis-lmwg referenced this issue in slevis-lmwg/ctsm Aug 1, 2023
Bring in changes for xlf compiler, pio, and python3 update
samsrabin pushed a commit to samsrabin/CTSM that referenced this issue Apr 19, 2024
jedwards4b added a commit to jedwards4b/ctsm that referenced this issue Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health improving internal code structure to make easier to maintain (sustainability)
Projects
None yet
Development

No branches or pull requests

1 participant