#677 closed bug (Fixed)
Light formulation in npzd_Powell.h without SPITZ cpp flag
| Reported by: | dwhitt | Owned by: | arango |
|---|---|---|---|
| Priority: | minor | Milestone: | Release ROMS/TOMS 3.7 |
| Component: | Nonlinear | Version: | 3.7 |
| Keywords: | Cc: | dw494@… |
Description (last modified by )
I'm following up on a forum post entitled NPZD_POWELL without SPITZ CPP option dated Nov 27 2013. This post discusses a bug that has gone unfixed as of January 14 2015 when I downloaded the version of ROMS I am currently working with.
To reiterate:
The option to run NPZD_POWELL without SPITZ flag produces an error in the phytoplankton growth rate. Perhaps make the SPITZ option activated by default as that follows Powell et al. 2006, delete the alternative code, and delete the SPITZ CPP option?
For example, in npzd_Powell.h replace the following:
#ifdef SPITZ
cff1=dtdays*Vm_NO3(ng)*PhyIS(ng)
cff2=Vm_NO3(ng)*Vm_NO3(ng)
cff3=PhyIS(ng)*PhyIS(ng)
#else
cff1=dtdays*Vm_NO3(ng)
#endif
DO k=1,N(ng)
DO i=Istr,Iend
#ifdef SPITZ
cff4=1.0_r8/SQRT(cff2+cff3*Light(i,k)*Light(i,k))
cff=Bio(i,k,iPhyt)* &
& cff1*cff4*Light(i,k)/ &
& (K_NO3(ng)+Bio(i,k,iNO3_))
#else
cff=Bio(i,k,iPhyt)* &
& cff1*Light(i,k)/ &
& (K_NO3(ng)+Bio(i,k,iNO3_))
#endif
Bio(i,k,iNO3_)=Bio(i,k,iNO3_)/(1.0_r8+cff)
Bio(i,k,iPhyt)=Bio(i,k,iPhyt)+ &
& Bio(i,k,iNO3_)*cff
END DO
END DO
with:
cff1=dtdays*Vm_NO3(ng)*PhyIS(ng)
cff2=Vm_NO3(ng)*Vm_NO3(ng)
cff3=PhyIS(ng)*PhyIS(ng)
DO k=1,N(ng)
DO i=Istr,Iend
cff4=1.0_r8/SQRT(cff2+cff3*Light(i,k)*Light(i,k))
cff=Bio(i,k,iPhyt)* &
& cff1*cff4*Light(i,k)/ &
& (K_NO3(ng)+Bio(i,k,iNO3_))
Bio(i,k,iNO3_)=Bio(i,k,iNO3_)/(1.0_r8+cff)
Bio(i,k,iPhyt)=Bio(i,k,iPhyt)+ &
& Bio(i,k,iNO3_)*cff
END DO
END DO
Change History (3)
comment:1 by , 10 years ago
| Description: | modified (diff) |
|---|---|
| Resolution: | → Fixed |
| Status: | new → closed |
follow-up: 3 comment:2 by , 10 years ago
But what is the SPITZ flag? There's no mention of it in checkdefs.F or in cppdefs.h.
comment:3 by , 10 years ago
Replying to kate:
But what is the SPITZ flag? There's no mention of it in checkdefs.F or in cppdefs.h.
There is not need for that since the SPLIZ CPP-option was eliminated. That's what the above message says about making this formulation the default. I think that this is related to a Spliz formulation for light penetration.

Yes, thank you for bringing this to my attention. I missed this forum message. I also corrected that tangent linear, representer, and adjoint versions of this routine.