[MITgcm-support] instability issue with sponge
Jody Klymak
jklymak at uvic.ca
Wed Feb 8 09:50:34 EST 2012
Hi John,
On Feb 8, 2012, at 0:52 AM, Martin Losch wrote:
>
> the sponge layer can indeed cause perturbation. After all you are restoring your model to prescribed boundary values (in your case OBNt, OBNs, OBNu, OBNv) over the sponge layer with a restoring time scale that is determined by the appropriate parameters. Unless thes OBNt/s/u/v are not exactly the same as the corresponding model values (i.e. in your case with no forcing with uniform salinity=35, temperature with N2=10^-6, u=v=0), the sponge layer will make model move. I have the impression that this is not the primary problem.
Just to add to that, by default the sponge sponges to Sref and Tref, so if your temperature profile is set by TRef you should be fine. But if TRef is a constant, and your temperature profile set by setting hydrogThetaFile, then obviously you'll sponge your density differently, and you'll have to modify obcs_sponge.F appropriately.
But this should be seen if you look at your T output.
Otherwise, its hard to see how w/ no forcing you are getting instabilities in the sponge layer, though I have to admit I've rarely run for 30 days. re you sure you've set your timescales to something sensible? a couple of years ago Nicolas Grisouard suggested:
> Say you have a forcing frequency w.
> - number of points: as long as the horizontal wavelength of mode-1 internal waves of frequency w,
> - [UV]relaxobcsinner = (2*pi/w)/1000,
> - [UV]relaxobcsbound = 2*pi/w.
>
I think this is a bit draconian, and usually get away with much shorter sponges w/o noticeable reflections, but its a starting point. You may also consider telescoping the sponge layer so dy gets larger w/in it. No need to waste a lot of computation cells on a-physical space. Just make sure your telescope is relatively gradual.
> The stability issue is more difficult to answer without additional information. With your parameters the maximum allowed velocity is around .5*dy/dt ~ 3m/s before the CFL criterion is violated. I assume that's what is happing. Other parameters affect this velocity, i.e. the amount of viscosity and diffusivity you prescribe, and the choice of advection scheme.
These could be problems, though I'm not sure how the bare advection scheme could exceed CFL if there is no forcing. But maybe the viscosity and diffusivity.
I guess even in the no-forcing case with a well-prescribed sponge, there will eventually be motion due to diffusivity at the surface and seafloor. You'll start to make mixed layers, but the sponge will be towards stratified conditions. That will drive some secondary circulation. But even at 30 days, your vertical diffusivity would have to be pretty high for this to be noticeable.
Cheers, Jody
> I suggest that you post your "code" directory and your "input" directory (the namelist "data*" files)
>
> Martin
>
> PS:
> - unless you have Nx>1 and a wall in y-direction, you are not dealing with a channel, but with a periodic domain. I am not sure if you want that.
>
> - For performance reasons, I suggest that you use Nx=300 (on an f-plane this makes no difference). Some compilers can optimize the innermost loops (which are i-loops), but if Nx=1 (or, 2) there isn't much to optimize.
>
> On Feb 8, 2012, at 4:25 AM, John Pender wrote:
>
>> Greetings, All -
>>
>> I have been tasked with crawling up the MITgcm learning curve using a 2D ocean channel as a vehicle. I have been running into a stability issue that I haven't managed to fix and could use some advice. The broad features of the channel are:
>>
>> 2D channel running north/south for 600 km
>> f0 and beta are both zero for now
>> uniform depth of 4000m
>> uniform salinity of 35
>> stratified temperature with N2 = 10^-6
>> Ny = 300
>> Nz = 20
>> deltaT = 300 sec
>>
>> The idea is to force the southern end in a specific way by enabling OBCs and modifying obcs_calc.F to suit. The forcing is baroclinic so it creates a progression of cells (m=1) which propagate northward in a slow, stately fashion. The time window of this experiment is very long - on the order of 100 days - so the cells have more than enough time to reach the northern end of the channel. I don't want the waves reflecting back so I have installed a sponge at the northern end. I've used many permutations of the sponge thickness and the inner/outer parameters and it is indeed crushing the baroclinic wave train as advertised. For a while.
>>
>> The problem is stability. I need this experiment to run for, as I say, 100 days but the model is self terminating at around 30 days because of wildly erratic large numbers. What's interesting is that I have turned the forcing off and the experiment still self terminates in about the same number of days. I would have expected very little (if any) motion in the unforced case, and that is indeed what happens when I also turn off the sponge. The model runs endlessly when the sponge is gone and there is no forcing. When the sponge is on, however, motion is generated for no discernible reason at the inner edge of the sponge. The motion is very small at first (it appears after about 3 time steps) and if it stayed small I wouldn't worry about it. The problem is that the motion gets larger and larger over time (ultimately crashing the model) so there must be an additive feature or perhaps even a nonlinear feedback effect that I obviously don't understand.
>>
>> It has been suggested to me that turning on the sponge somehow changes the density of the water within the sponge's extent (though obviously this shouldn't happen), which then forces motion. I don't actually know if this is the case because the model doesn't much *like* keeping me appraised of the local density, but this explanation is definitely consistent with my observations of v, w, and eta. I would think this would produce a finite amount of motion (assuming energy's conserved) so it doesn't really explain the steady growth in mechanical energy over the 30 days or so it takes to run the numbers into the stratosphere.
>>
>> Thanks very much,
>> John
>>
>>
>> _______________________________________________
>> MITgcm-support mailing list
>> MITgcm-support at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-support
>
>
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
--
Jody Klymak
http://web.uvic.ca/~jklymak/
More information about the MITgcm-support
mailing list