Opened 10 years ago
Last modified 10 years ago
#677 closed bug
Light formulation in npzd_Powell.h without SPITZ cpp flag — at Initial Version
Reported by: | dwhitt | Owned by: | arango |
---|---|---|---|
Priority: | minor | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Nonlinear | Version: | 3.7 |
Keywords: | Cc: | dw494@… |
Description
I'm following up on a forum post entitled '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