I have a domain in which the physical model has run for a few decades, no problem. In turning on the NEMURO model, things look pretty good, but it then blew up after 600 days. I had added a check to diag to blow up on outrageous bio values, similar to the code for excessive density and velocity.
Looking at the fields in the blow-up record in the restart file, I see that T and S look perfectly sensible, but it appears that all the bio fields have an extremely large value at one spot, right at the surface. The value of Akt there, a dz below the surface, is also extremely large (LMD_MIXING), denoting what is probably a statically unstable water column. I'm betting that large value of Akt created a flux of stuff upwards, which would have left a large negative value just below, but the negatives are all clipped to zero in NEMURO and probably all the other bio models too. I know Ken Coyle tried the assumption that the physics would not introduce negatives if there weren't any before and was sorely disappointed when he was shown to be wrong. Al Hermann and Liz Dobbins also report seeing large value spots in the bio fields associated with changes in the vertical stratification.
So what to do? I know some will suggest switching to GLS_MXING, but we've put too much into this domain with the LMD to switch willingly. It seems to me that LMD is doing as well as we could expect for the T and S. It just may not be right for the biology, which will have smaller vertical scales. Instead, I'm using the T value of Akt for the T and S, and using the S value of Akt for the bio tracers. I've added a limiter to the S value so that it never gets quite so large. It's running...
vertical mixing story
Re: vertical mixing story
I don't know if this is helpful or not, but it seems to me that clipping alone is not sufficient to prevent a blowup. The diffusion process conserves total nitrogen between cells, but clipping does not. The process then acts as a local source of nitrogen, which can continue indefinitely.
A second question is: do you have the upgradient flux on in LMD? There's no constraint by this process to prevent negatives, either.
A second question is: do you have the upgradient flux on in LMD? There's no constraint by this process to prevent negatives, either.
Re: vertical mixing story
Hi Kate,
Note that some of the other bio models don't clip bio tracers (I know for a fact that BIO_FENNEL does not). Instead a local variable inside the biology routine is clipped temporarily for calculating source and sinks terms, but when written back into the tracer array the biological sources and sinks act on the tracer value that came in. This ensures mass conservation. If this isn't done in NEMURO you may want to give it a try.
Cheers, Katja
Note that some of the other bio models don't clip bio tracers (I know for a fact that BIO_FENNEL does not). Instead a local variable inside the biology routine is clipped temporarily for calculating source and sinks terms, but when written back into the tracer array the biological sources and sinks act on the tracer value that came in. This ensures mass conservation. If this isn't done in NEMURO you may want to give it a try.
Cheers, Katja
Re: vertical mixing story
Nemuro in ROMS does the same thing as Katja describes for bio_fennel.
Look for the lines:
Bio_bak(i,k,ibio)=MAX(0.0_r8,t(i,j,k,nstp,ibio))
Bio(i,k,ibio)=Bio_bak(i,k,ibio)
The computations commence from the values in Bio set to be positive definite. But the entries in the global tracer array are not touched. Only at the very end of the subroutine is the integrated bio tendency added to the global tracer array values. If they were previously negative due to advection over/undershoot for example, then they may or may not be positive after the update. But this way global conservation of nitrogen is retained.
We've found MPDATA is a big help for keeping the undershoot to a minimum.
Look for the lines:
Bio_bak(i,k,ibio)=MAX(0.0_r8,t(i,j,k,nstp,ibio))
Bio(i,k,ibio)=Bio_bak(i,k,ibio)
The computations commence from the values in Bio set to be positive definite. But the entries in the global tracer array are not touched. Only at the very end of the subroutine is the integrated bio tendency added to the global tracer array values. If they were previously negative due to advection over/undershoot for example, then they may or may not be positive after the update. But this way global conservation of nitrogen is retained.
We've found MPDATA is a big help for keeping the undershoot to a minimum.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
Re: vertical mixing story
Kate,
Another idea (from Fei) may be to distribute the light at the surface
layer over the mixed layer depth rather than as a function of Z. This
could potentially smooth out the spikes that we see, without applying
limiters, and provides some measure of vertical coupling for the biology
which is now absent which is why we can see 2-delta type behavior. It's
a thought.
Another idea (from Fei) may be to distribute the light at the surface
layer over the mixed layer depth rather than as a function of Z. This
could potentially smooth out the spikes that we see, without applying
limiters, and provides some measure of vertical coupling for the biology
which is now absent which is why we can see 2-delta type behavior. It's
a thought.
Re: vertical mixing story
Here are some pictures of the troubles I was talking about.
First, the bad value is at the surface, so some surface plots. Nitrate:
Diatoms:
Akt (one grid down):
Next, vertical slice plots through the worst spot, a day before things go south:
A day later:
Two hours later:
At least one of the other bio fields had hit 200 mmole/m3, the cutoff. Whatever tricks are being used with bio_bak, I submit that I am generating nitrate.
In clamping the Akt being used by the bio variables, I have gotten it to run for over a hundred days past this time. Is this the best fix? I don't know.
First, the bad value is at the surface, so some surface plots. Nitrate:
Diatoms:
Akt (one grid down):
Next, vertical slice plots through the worst spot, a day before things go south:
A day later:
Two hours later:
At least one of the other bio fields had hit 200 mmole/m3, the cutoff. Whatever tricks are being used with bio_bak, I submit that I am generating nitrate.
In clamping the Akt being used by the bio variables, I have gotten it to run for over a hundred days past this time. Is this the best fix? I don't know.
Re: vertical mixing story
Someone asked for my code changes, so I thought I'd put them out there now that I've gathered them into a patch. (patch with "patch -p1 < akt_patch")
Note that it only changes the lmd_mixing case as is.
Note that it only changes the lmd_mixing case as is.
- Attachments
-
- akt_patch.txt
- (2.24 KiB) Downloaded 526 times