NEMURO bug in GraZS2ZP

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
cae
Posts: 36
Joined: Mon Jun 30, 2003 5:29 pm
Location: UC Santa Cruz

NEMURO bug in GraZS2ZP

#1 Unread post by cae »

It looks to me like there's a small bug in line 673 of the current nemuro.h code. This occurs in the HOLLING_GRAZING section of the GraZS2ZP section. In the last line of the following code snippet, cff depends on cff3 raised to the power cff4. I think this should be cff3 multiplied by cff4.

Code: Select all

!
!  Predactory Zooplankton grazing on Small Zooplankton, GraZS2ZP.
!
#if defined IVLEV_EXPLICIT
              cff4=1.0_r8-EXP(LamP(ng)*(ZS2ZPstar(ng)-Bio(i,k,iSzoo)))
              cff5=EXP(-PusaiZS(ng)*Bio(i,k,iLzoo))
              GraZS2ZP=fac6*cff3*cff5*MAX(0.0_r8,cff4)*Bio(i,k,iPzoo)
              Bio(i,k,iSzoo)=Bio(i,k,iSzoo)-GraZS2ZP
              Bio(i,k,iPzoo)=Bio(i,k,iPzoo)+GraZS2ZP
#else
# ifdef HOLLING_GRAZING
              cff4=1.0_r8/(KZS2ZP(ng)+Bio(i,k,iSzoo)*Bio(i,k,iSzoo))
              cff5=EXP(-PusaiZS(ng)*Bio(i,k,iLzoo))
              cff=fac6*cff3**cff4*cff5*Bio(i,k,iPzoo)*Bio(i,k,iSzoo)
In other words, the last line of this snippet should be:

Code: Select all

cff=fac6*cff3*cff4*cff5*Bio(i,k,iPzoo)*Bio(i,k,iSzoo)
Sorry if it's my misreading of the code.

Post Reply