Bottom flux for Fennel model

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
ashbre
Posts: 21
Joined: Tue Apr 28, 2020 3:08 pm
Location: Florida Atlantic University

Bottom flux for Fennel model

#1 Unread post by ashbre »

Hi there,

I recently updated to the latest source code and one of my bottom boundary conditions has stopped working. In particular, a nutrient flux associated with the Fennel biological model.

I've added the following to ana_btflux.h

ELSE IF (itrc.eq.iNH4_) THEN
DO j=JstrT,JendT
DO i=IstrT,IendT

btflux(i,j,itrc)=-3.0e-2_r8

END DO
END DO

I know the code gets inside this loop from a print statement, but my NH4 concentration does not seem to receive this flux (I tried the flux with different orders of magnitude). I noticed this variable used to be called btflx, so I wonder if there are other parts of the source code that I should change/modify.

All the best,
Ash

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Bottom flux for Fennel model

#2 Unread post by jcwarner »

are you sure it gets in that loop with the btflux variable? i dont see that variable in the code, it should be btflx.
do this:
grep -nir btflux ROMS/*
and
grep -nir btflx ROMS/*

do you see btflux as a variable anywhere else??
-j

ashbre
Posts: 21
Joined: Tue Apr 28, 2020 3:08 pm
Location: Florida Atlantic University

Re: Bottom flux for Fennel model

#3 Unread post by ashbre »

I see both variables throughout in the new source code.

All the best,
Ash

User avatar
arango
Site Admin
Posts: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: Bottom flux for Fennel model

#4 Unread post by arango »

Yes, good catch. Thank you. The stflx and btflx state variables are used in ROMS governing equations. Contrarily, the stflux and btflux are used exclusively to process data from NetCDF files or analytical functions. The problem here is that the assignment is missing in set_vbc.F:

Code: Select all

#  if defined BIOLOGY || defined SEDIMENT || defined T_PASSIVE
!
!-----------------------------------------------------------------------
!  Load surface and bottom passive tracer fluxes (T m/s).
!-----------------------------------------------------------------------
!
      DO itrc=NAT+1,NT(ng)
        DO j=JstrR,JendR
          DO i=IstrR,IendR
            stflx(i,j,itrc)=stflux(i,j,itrc)
            btflx(i,j,itrc)=btflux(i,j,itrc)
          END DO
        END DO
      END DO
#  endif
This strategy allows any needed manipulation in set_vbc.F. I didn’t notice this before because usually that flux is set to zero.

I will update the code. Thank you for reporting this issue.

Post Reply