Correction to fennel.h

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
jklinck
Posts: 34
Joined: Mon Jun 30, 2003 2:29 pm
Location: CCPO/ODU, USA

Correction to fennel.h

#1 Unread post by jklinck »

This error may have been identified before, but I did not see anything in the ecosystem discussion. Depending on how folks develop other ecosystem models, this error might have migrated to other ecosystem codes.

At the end of the sinking code in fennel.h, there are statements to remineralize phytoplankton nitrogen from cells that hit the bottom. The code is given below.

! add code from Fennel.h to account for phyto reaching the bottom
! based on remineralization of phyto nitrogen
if (ibio.eq. iPhyN) THEN
DO i=Istr,Iend
cff1=FC(i,0)*Hz_inv(i,1)
Bio(i,i,iOxyg)=Bio(i,i,iOxyg)-cff1*(115.0_r8/16.0_r8)
Bio(i,i,iNH4_)=Bio(i,i,iNH4_)+cff1
END DO
END IF

The problem is in the references to the Bio array which should be i,1 not i,i so that the the bottom concentrations are changed. Depending on the tiling and the number of vertical levels, this could do interesting damage to a calculation.
The correct lines are

Bio(i,1,iOxyg)=Bio(i,1,iOxyg)-cff1*(115.0_r8/16.0_r8)
Bio(i,1,iNH4_)=Bio(i,1,iNH4_)+cff1

John

User avatar
wilkin
Posts: 918
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Correction to fennel.h

#2 Unread post by wilkin »

What's the provenance of the version of fennel.h you are working with? I can't find lines matching those you describe.

Can you give line numbers in a fresh version of fennel.h from the trunk code, or from browsing at
https://www.myroms.org/projects/src/bro ... y/fennel.h
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

jklinck
Posts: 34
Joined: Mon Jun 30, 2003 2:29 pm
Location: CCPO/ODU, USA

Re: Correction to fennel.h

#3 Unread post by jklinck »

I think this is an error that I created (sorry to add confusion).

I started with the spect_fennel.h model (svn 2232 2012-01-03) in the COAWST distribution (svn 1000, distributed Dec 15, 2014). I changed the spectral light representation in hte code based on GRASSLIGHT (a shallow water optical/vegitation model) which I am using in shallow turbid water in Chesapeake Bay (part of an EPA study of shallow water processes).

The bio_sediment section of fennel.h in svn 1000 distribution from COAWST has a bottom remineralization code; I used parts of in constructing the code in my first message which remineralized phytoplankton that sink to the bottom.

This code is causing a lack of conservation of phosphorus and nitrogen which is why I am looking at this part of the code.

It seems that the error is my own creation.

Sorry again for the confusion.

John

Post Reply