Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 11 additions & 3 deletions HSP2/PLANK_Class.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ def simulate(self, tw, phval, co2, tss, OXRX, NUTRX, iphyto, izoo, iorn, iorp, i
else: # use full depth and velocity
self.balvel = avvele
self.baldep = avdepe
else:
self.balvel = 0.0
self.baldep = 0.0

# calculate solar radiation absorbed; solrad is the solar radiation at gage,
# corrected for location of reach; 0.97 accounts for surface reflection
Expand Down Expand Up @@ -1253,6 +1256,11 @@ def litrch(inlit, extb, extcla, extsed, avdepe, baldep, PHYFG, BALFG):
''' calculate light correction factor to algal growth (cflit);
determine amount of light available to phytoplankton and benthic algae'''
ln01 = 4.60517 # minus natural log 0.01

cflit = 0.0
phylit = 0.0
ballit = 0.0

if inlit > 0.0:
# calculate extinction of light based on the base extinction
# coefficient of the water incremented by self-shading effects
Expand Down Expand Up @@ -1290,10 +1298,10 @@ def litrch(inlit, extb, extcla, extsed, avdepe, baldep, PHYFG, BALFG):
ballit = inlit * exp(-extco * baldep)
if ballit < 0.0001:
ballit = 0.0

else: # there is no incident solar radiation; algal growth cannot occur
cflit = 0.0
phylit = 0.0
ballit = 0.0
pass

return phylit, ballit, cflit

@staticmethod
Expand Down
7 changes: 4 additions & 3 deletions HSP2/RQUAL_Class.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,10 @@ def simulate(self, ts):

self.PHYTO[loop] = self.PLANK.phyto
self.ZOO[loop] = self.PLANK.zoo
self.BENAL1[loop] = self.PLANK.benal[0]
self.TBENAL1[loop] = self.PLANK.tbenal[1]
self.TBENAL2[loop] = self.PLANK.tbenal[2]
if self.PLANK.BALFG:
self.BENAL1[loop] = self.PLANK.benal[0]
self.TBENAL1[loop] = self.PLANK.tbenal[1]
self.TBENAL2[loop] = self.PLANK.tbenal[2]
self.PHYCLA[loop] = self.PLANK.phycla

self.ORN[loop] = self.PLANK.orn
Expand Down