negative tracer and preserving negativity in fennel.h

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
longmtm
Posts: 55
Joined: Tue Dec 13, 2005 7:23 pm
Location: Univ of Maryland Center for Environmental Science

negative tracer and preserving negativity in fennel.h

#1 Unread post by longmtm »

We experienced negative concentrations for NO3 and also Temperature and Salinity with CPP options for tracers being:

#define TS_SVADVECTION
#define TS_U3HADVECTION

It seems to us that most likely the negativity is produced by the advection scheme for T and S are not updated in fennel.h/fasham.h at all.

Yet in trying to find out how NO3 negativity accumulates in time and expands in space, I'd like to know why folks chose to preserve negativity of bio-tracers in updating global tracers in fennel.h:

https://www.myroms.org/projects/src/bro ... r/fennel.h

Code: Select all


430 	        DO ibio=1,NBT
431 	          indx=idbio(ibio)
432 	          DO k=1,N(ng)
433 	            DO i=Istr,Iend
434                  Bio(i,k,indx)=MAX(t(i,j,k,nstp,indx),0.0_r8)
435 	            END DO
436 	          END DO
437 	        END DO
...
...
1243        DO ibio=1,NBT
1244 	          indx=idbio(ibio)
1245 	          DO k=1,N(ng)
1246 	            DO i=Istr,Iend
1247 	              t(i,j,k,nnew,indx)=MIN(t(i,j,k,nnew,indx),0.0_r8)+        &
1248 	     &                           Hz(i,j,k)*Bio(i,k,indx)
1249 	#ifdef TS_MPDATA
1250 	              t(i,j,k,3,indx)=t(i,j,k,nnew,indx)*Hz_inv(i,k)
1251 	#endif
1252 	            END DO
1253 	          END DO
1254 	        END DO
1255 	      END DO J_LOOP

where first rhs term in 1247 keeps the negative values in t(i,j,k,nnew,indx) although all bio tracers (Bio(i,k,indx) are supposed to be non-negative. Any reason for doing this? Note that line 434 made Bio() a copy of t() with negative values chopped off. What if we remove first rhs term in 1247 and hope that negativity would not grow in time?


Many thanks,

Wen

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

Re: negative tracer and preserving negativity in fennel.h

#2 Unread post by jcwarner »

i did not code the bio stuff, and not sure how thigs are in there now. But it is typically not advisable to 'chop off' negative values, as these values are required for global mass conservation. Perhaps that code was for some other issue (??).
There is the option of mpdata
#undef TS_SVADVECTION
#undef TS_U3HADVECTION
#define TS_MPDATA
as an optoin for positive definite advection. suggest that you give it a try.

-j

longmtm
Posts: 55
Joined: Tue Dec 13, 2005 7:23 pm
Location: Univ of Maryland Center for Environmental Science

Re: negative tracer and preserving negativity in fennel.h

#3 Unread post by longmtm »

John, many thanks.

Conserving mass is probably the most compelling reason that negativity is preserved using the first RHS term (firstly chopped off, and then added back). I guess the other reason should be trying to avoid rapid change of signs/values before and after bio reaction terms being added for stability purposes.

We'll try TS_MPDATA and report back.

Wen

kfennel
Posts: 37
Joined: Thu Jun 12, 2003 6:55 pm
Location: Dalhousie University
Contact:

Re: negative tracer and preserving negativity in fennel.h

#4 Unread post by kfennel »

Just to confirm John Warner's point above: we decided to not "chop off" negative values to ensure mass conservation. Problems should be greatly reduced with TS_MPDATA.

-Katja

Post Reply