Correction to fennel.h

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Posts: 32
Joined: Mon Jun 30, 2003 2:29 pm
Location: CCPO/ODU, USA

Correction to fennel.h

#1 Post by jklinck » Mon Jan 23, 2017 7:49 pm

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

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



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

Re: Correction to fennel.h

#2 Post by wilkin » Tue Jan 24, 2017 12:05 pm

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 ... y/fennel.h
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559

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

Re: Correction to fennel.h

#3 Post by jklinck » Tue Jan 24, 2017 2:30 pm

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.


Post Reply