[MITgcm-support] obcs for ptracers
Nataliya Stashchuk
nataliya.stashchuk at plymouth.ac.uk
Fri Apr 25 08:48:12 EDT 2008
Martin,
I am very sorry but I still have problems with tracers.
1.In programme obcs_calc.F I can't find line
OBEptr(J,K,bi,bj,iTracer) =
& pTracer(I_obc-1,J,K,bi,bj,iTracer)
& *_maskW(I_obc,J,K,bi,bj)
Here we have OBE for t,s,u,v,w,eta but not for tracers.
2. I tried to introduced tracers data at the boundary as you suggested before via file data.ptracers
&PTRACERS_PARM01
PTRACERS_ref=60*0.,61*1.,
PTRACERS_numInUse=1,
PTRACERS_initialFile='Tracer.init',
PTRACERS_names(1)='Tr',
But I got error message:
STOP ABNORMAL END: S/R OBCS_CHECK statement executed
Could you help?
Nataliya
-----Original Message-----
From: mitgcm-support-bounces at mitgcm.org [mailto:mitgcm-support-bounces at mitgcm.org] On Behalf Of Martin Losch
Sent: 24 April 2008 15:36
To: mitgcm-support at mitgcm.org
Subject: Re: [MITgcm-support] obcs for ptracers
This is what you need to do:
1. in your "code" directory, edit package.conf to include a line
"ptracers"
2. In obcs_calc.F (not in obcs_calc.f) look for the code-block that
starts with #ifdef ALLOW_PTRACERS, for an eastern boundary you need
to replace the line
OBEptr(J,K,bi,bj,iTracer) =
& pTracer(I_obc-1,J,K,bi,bj,iTracer)
& *_maskW(I_obc,J,K,bi,bj)
with what you want to have there, e.g
OBEptr(J,K,bi,bj,iTracer) = 1.
3. in your build directory, run
genmake2 (or make makefile) && make CLEAN && make depend && make
4. in your run directory create a data.ptracers as you suggest, there
are more runtime flags that you can set, see PTRACERS_PARAMS.h and
ptracers_readparms.F, there is PTRACER_ref, which can be used to
prescribe an initial profile just like tRef, sRef.
The output files will be either ptracer.*.nc (if you use mnc/netcdf)
or PTRACER01.*.data/meta if you don't
But again, you can do all this via input files (also the open
boundary conditions for T and S). This avoids editing obcs_calc.F
Martin
On 24 Apr 2008, at 16:25, Nataliya Stashchuk wrote:
> Martin,
>
> Please, confirm that at first I must prepare file data.ptracers in
> which I show initial field for tracer as Tracer.init and than
> all results for tracer will be in files starting with Tr.
>
> ----------------------------------------------------------------------
> ----------------------
> # This set-up is supposed to mimic salinity. That is, initially
> # PTRACER(:,:,:,1) is identical to salinity, except that the
> # open boundary conditions are different, so that PTRACER(:,:,:,1)
> evolves
> # differently than salinity.
> &PTRACERS_PARM01
> PTRACERS_numInUse=1,
> PTRACERS_initialFile='Tracer.init',
> PTRACERS_names(1)='Tr',
> &
> ----------------------------------------------------------------------
> ------------------------------
> Than in obcs_calc.F I must add one new line to fix tracer as 1 with
> name OBETr()
>
>
> DO K=1,Nr
> DO J=1-Oly,sNy+Oly
> I_obc=OB_Ie(J,bi,bj)
> IF (I_obc.ne.0) THEN
> OBEu(J,K,bi,bj)=0.
> OBEv(J,K,bi,bj)=0.
>
> OBEt(J,K,bi,bj)=10.
> OBEs(J,K,bi,bj)=10.
>
> OBETr(J,K,bi,bj)=1.
>
> Many thanks,
>
> Nataliya
>
>
>
>
> -----Original Message-----
> From: mitgcm-support-bounces at mitgcm.org [mailto:mitgcm-support-
> bounces at mitgcm.org] On Behalf Of Martin Losch
> Sent: 24 April 2008 15:01
> To: mitgcm-support at mitgcm.org
> Subject: Re: [MITgcm-support] obcs for ptracers
>
> You can do that in quite the same way as for T and S:
> either you hard-code is in obcs_calc (instead OBCt=10. you use
> OBSptr=2. or so),
> or you prescribe a file with these open boundary conditions as done
> in exp4 (I prefer this, because you won't have to recompile the code).
>
> Martin
> On 24 Apr 2008, at 15:50, Nataliya Stashchuk wrote:
>
>> Martin,
>>
>> In verification/exp4/input data.ptracers I found the following:
>> ---------------------------------------------------------------------
>> -
>> ----------------------------------------------
>>
>> # This set-up is supposed to mimic salinity. That is, initially
>> # PTRACER(:,:,:,1) is identical to salinity, except that the
>> # open boundary conditions are different, so that PTRACER(:,:,:,1)
>> evolves
>> # differently than salinity.
>> &PTRACERS_PARM01
>> PTRACERS_numInUse=1,
>> PTRACERS_initialFile='S.init',
>> PTRACERS_names(1)='salt_mimic',
>> &
>> ---------------------------------------------------------------------
>> -
>> ------------------------------------------------
>> This means that in this experiment salinity is used as a tracer. In
>> such a case it is very simple to fix tracer at open boundary
>> condition.
>> For example if I want to fix temperature as 10 and salinity
>> (tracer) as 1 at eastern boundary I can change two last lines in
>> obcs_calc.F like this
>>
>> ---------------------------------------------------------------------
>> -
>> ------------------------
>>
>> #ifdef ALLOW_OBCS_EAST
>> C Eastern OB
>> #ifdef ALLOW_DEBUG
>> IF (debugMode) CALL DEBUG_MSG('OBCS_CALC: East',myThid)
>> #endif
>> IF (useOrlanskiEast) THEN
>> #ifdef ALLOW_ORLANSKI
>> CALL ORLANSKI_EAST(
>> & bi, bj, futureTime,
>> & uVel, vVel, wVel, theta, salt,
>> & myThid )
>> #endif
>> ELSE
>> DO K=1,Nr
>> DO J=1-Oly,sNy+Oly
>> I_obc=OB_Ie(J,bi,bj)
>> IF (I_obc.ne.0) THEN
>> OBEu(J,K,bi,bj)=0.
>> OBEv(J,K,bi,bj)=0.
>>
>> OBEt(J,K,bi,bj)=10.
>> OBEs(J,K,bi,bj)=1.
>>
>> ---------------------------------------------------------------------
>> -
>> ----------------------------------------------------
>>
>> In my case I use both T and S to find density. Thus I will use
>> tracer as additional variable and I must fix its value at a boundary.
>>
>> How I can do this?
>>
>> Nataliya
>>
>>
>>
>>
>> -----Original Message-----
>> From: mitgcm-support-bounces at mitgcm.org [mailto:mitgcm-support-
>> bounces at mitgcm.org] On Behalf Of Martin Losch
>> Sent: 24 April 2008 13:28
>> To: mitgcm-support at mitgcm.org
>> Subject: Re: [MITgcm-support] obcs for ptracers
>>
>> Nataliya,
>> I am not quite sure what exactly it is that you want to do, but you
>> can do two things to prescribe tracer concentration:
>> 1. with the rbcs package you can restore to some climatology (or
>> fixed in time) fields with a certain time scale
>> 2. with the obcs package you can prescribe open boundary values (also
>> for passive tracers in ptracers), see verification/exp4 for a simple
>> example.
>>
>> Martin
>>
>> On 24 Apr 2008, at 13:31, Nataliya Stashchuk wrote:
>>
>>> Dear MITgcm users,
>>>
>>>
>>>
>>> The temperature and salinity are fixed at one of the open
>>> boundaries in my computation area. EOS is used as Knudsen equation
>>> for density in my runs.
>>>
>>>
>>>
>>> I will be happy to use the tracer in my investigation and need to
>>> fix the value of the tracer at the open boundary during the run. My
>>> investigation of ptracer pkg did not give me a clue how to do
>>> this. Could you help?
>>>
>>>
>>>
>>>
>>>
>>> Regards,
>>>
>>>
>>>
>>> Nataliya
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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