[MITgcm-support] BC's for flow in a box
Martin Losch
Martin.Losch at awi.de
Tue Feb 24 10:52:03 EST 2009
Hi David,
the obcs-code is actually not so difficult, but it's quite hard to
read at first, because things are often done more than once, and
values are overwritten (and I am going to add a level to that soon (o:)
The simplest (and least flexible) approach to use OBCS is to make a
local copy of obcs_calc.F, somehow generate the obc values for u,v,T,S
in this file and then let the model apply them, along with a sponge-
layer if required. If you don't mondify obcs_calc.F The default values
for u,v are zero; the default values for T and S are Tref and Sref.
So if you don't do anything to the code and have some parameter like
this in data.obcs:
&OBCS_PARM01
OB_Jnorth=40*-1,
OB_Jsouth=40*1,
OB_Ieast = 30*-1,
OB_Iwest = 30*1,
useOBCSsponge=.true.,
useOBCSprescribe=.false., (this is the default)
&
&OBCS_PARM02
&
&OBCS_PARM03
Urelaxobcsinner = 2592000,
Urelaxobcsbound = 86400,
Vrelaxobcsinner = 2592000,
Vrelaxobcsbound = 86400,
spongeThickness = 4,
&
You'll prescribe Tref for T, Sref for S, u=0 and v=0 along all open
boundaries with a sponge layer of 4 grid points, the restoring
timescale is 1day at the boundary, linearly increasing to 30days at
the "inner" edge of the sponge-layer. If you don't want a sponge for T
and S, you'll have to edit obcs_sponge (and set lambda_obcs_s/t=0), if
you don't want to prescribe T/S along the boundary, you'll have to
think of something or use the Orlanski OBCS (but that will also
recompute OB?u/v). In the end you'll probably have to edit obcs_calc
to suit your needs.
Martin
On Feb 24, 2009, at 3:24 PM, David Hebert wrote:
> Hi Martin,
>
> Thanks for the update. I do want a sponge layer for U/V. One thing I
> am having trouble finding in the code is does this require
> specifying boundary velocities of zero via OBWufile, OBWvfile, etc?
> or by setting indices via OB_I and OB_J does the model set boundary
> to zero unless otherwise specified with OBCS prescribe?
>
> Thanks,
>
> David
>
> Martin Losch wrote:
>> David,
>> closed boundaries with a sponge layer for for T/S are straight
>> forward with the RBCS package, velocities are not affected by this
>> package, using this package is quite straightforward.
>>
>> If you want a sponge layer for U/V, then you need to use OBCS and
>> you need to put your boundaries inside the domain, that is at 1,nx,
>> and 1,ny (OB_Jsouth=nx*1, OB_Jnorth=nx*-1, OB_Iwest=ny*1,
>> OB_Ieast=ny*-1) and then use the parameters OBCSuseSponge, U/
>> Vrelaxinner/bound
>>
>> Martin
>>
>> On Feb 24, 2009, at 3:07 AM, David Hebert wrote:
>>
>>> I would like to simulate a flow similar to an experimental setup
>>> of stratified fluid in a tank. In this configuration I would like
>>> to specify "closed" boundaries with a sponge layer. In order to do
>>> this, do I need to use OBCS prescribe to specify zero U,V at the
>>> boundaries (and corresponding T,S)? Or is it possible (and easier)
>>> by not specifying any open boundary indicies (that is, specify
>>> OB_Jnorth=nx*0, OB_Iwest=ny*0, etc.).
>>>
>>> Thanks,
>>>
>>>
>>> David
>>> _______________________________________________
>>> 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
More information about the MITgcm-support
mailing list