<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>Thanks Martin for your answer. I tried to use
ptracers_forcing_surf.F but I didn't manage to make it work:
anyway, using rbcs may be more flexible. So I'm trying to
understand it.<br>
</p>
<p>So I would like to use RBCS package for one tracer, and I would
like to have a continuous source at (i=25, j=80, k=1) for a value
of 100.0 units, for example. I have several questions with rbcs. <br>
</p>
<p>my data.rbcs is:</p>
<p>&RBCS_PARM01<br>
relaxMaskFile(3) = 'ptracers_mask.bin',<br>
rbcsForcingPeriod = 0.,<br>
useRBCtemp = .FALSE.,<br>
useRBCsalt = .FALSE.,<br>
/<br>
<br>
&RBCS_PARM02<br>
useRBCptrnum(1)=.TRUE.,<br>
tauRelaxPTR(1) = 3600.,<br>
relaxPtracerFile(1) = 'ptracers.bin',<br>
/</p>
<p>and my data.ptracers is:<br>
</p>
<p> &PTRACERS_PARM01<br>
PTRACERS_numInUse=1,<br>
PTRACERS_Iter0= 0000141840,<br>
PTRACERS_taveFreq=60.0,<br>
# tracer 1 <br>
PTRACERS_names(1)='PT',<br>
PTRACERS_long_names(1)='Passive tracer',<br>
PTRACERS_units(1)='no units',<br>
PTRACERS_advScheme(1)=77,<br>
PTRACERS_useKPP(1)=.TRUE. ,<br>
PTRACERS_initialFile(1)='ptracers.bin',<br>
&<br>
<br>
</p>
<p> Here are my questions:<br>
</p>
<p>1) I don't understand very well how to choose tauRelaxPTR values.
My dt time step is 10s, and if I use tauRelaxPTR=10.0 s (for
continuous source), my run explodes. I see that my run doesn't
explode when tauRelaxPTR is from around 3600.0 seconds, but at
this value, the continuous source (i=25,j=80,k=1) is around 90.0
after 1 hour, whereas in my relaxPtracerFile I wanted a value of
100 at this point. (see attach file). I thought that tauRelaxPTR
was the timelapse to reach the value written in relaxPtracerFile ?
How to do to reach 100 units more precisely in my source cell? <br>
</p>
<p>2) I would like to know your advices for the choice of the mask
matrix in ptracers_mask.bin. For my test, I choose a mask value of
exp( −0.8x), with x the distance to my source cell
(i=25,j=80,k=1). I was inspired by this pdf, see page 92/160:
<a class="moz-txt-link-freetext" href="http://digitool.library.mcgill.ca/R/?func=dbin-jump-full&object_id=132855&local_base=GEN01-MCG02">http://digitool.library.mcgill.ca/R/?func=dbin-jump-full&object_id=132855&local_base=GEN01-MCG02</a></p>
<p>3) Just to know: ptracers.bin contained a matrix of 0 everywhere
except a value of 100 units in my source cell (i=25,j=80,k=1). Can
we have a continuous source for only one cell?<br>
</p>
<p>Thank you very much for your advices,</p>
<p>Camille<br>
</p>
<br>
<br>
<div class="moz-cite-prefix">Le 10/10/2017 à 13:13, Martin Losch a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:2629074C-3786-4F96-82A7-9683BC8F2031@awi.de">
<pre wrap="">Hi Camille,
to compute global indices from local i,j,bi,bj you can do this (where ig,jg are now the global indices):
jg = myYGlobalLo-1+(bj-1)*sNy+j
ig = myXGlobalLo-1+(bi-1)*sNx+i
I “stole” this from pkg/cost/cost_test.F, where this is also used to find global indices where the “cost function” is evaluated.
Martin
</pre>
<blockquote type="cite">
<pre wrap="">On 10. Oct 2017, at 11:20, Camille Mazoyer <a class="moz-txt-link-rfc2396E" href="mailto:mazoyer@univ-tln.fr"><mazoyer@univ-tln.fr></a> wrote:
Dear all,
I'm starting to work with ptracers to study passive tracers circulation in a mid closed bay. I'm starting to have nice results with it. Until now, I put an initial concentration at time t0, and then, I observe where the tracers go.
Now, I would like to add a time continuous source. I saw on the mailing list that there are two ways of doing this:
1)- with rbcs package
2) - modifying ptracers_forcing_surf.F source code.
I tryed option 1 but I did'nt manage to do what I want. I think option 2 is easier (?) for starting?
=> so option 2: I see where to modify the ptracers_forcing_surf.F code (see below), but I have a question about local i,j and global i,j. I want to add a source at i=22:23, j=84:85, k=1 (surface). These are global indices. How can I know which tile, and what local indices I have to write? (because the code what local indices no?)
C Example of how to add forcing at the surface
DO iTrc=1,PTRACERS_numInUse
c IF ( PTRACERS_StepFwd(iTrc) ) THEN
DO j = jMin, jMax
DO i = iMin, iMax
c surfaceForcingPTr(i,j,bi,bj,iTrc) = 0. _d 0
surfaceForcingPTr(i,j,bi,bj,iTrc) = 0. _d 0
c & + surfaceForcingS(i,j,bi,bj)
ENDDO
ENDDO
c ENDIF
ENDDO
Thanks you very much for your help,
Have a good day,
Camille
--
------------------------------------------
Camille Mazoyer
Phd Student
Mediterranean Institute of Oceanology (MIO)
Institut de Mathématiques de Toulon (IMATH)
Université de TOULON
Bat X - CS 60584
83041 TOULON cedex 9
France
tel: +33.4.94.14.24.50
Email: <a class="moz-txt-link-abbreviated" href="mailto:mazoyer@univ-tln.fr">mazoyer@univ-tln.fr</a>
<a class="moz-txt-link-freetext" href="http://mio.pytheas.univ-amu.fr/">http://mio.pytheas.univ-amu.fr/</a>
<a class="moz-txt-link-freetext" href="http://imath.fr/">http://imath.fr/</a>
_______________________________________________
MITgcm-support mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
MITgcm-support mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MITgcm-support@mitgcm.org">MITgcm-support@mitgcm.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
------------------------------------------
Camille Mazoyer
Phd Student
Mediterranean Institute of Oceanology (MIO)
Institut de Mathématiques de Toulon (IMATH)
Université de TOULON
Bat X - CS 60584
83041 TOULON cedex 9
France
tel: +33.4.94.14.24.50
Email: <a class="moz-txt-link-abbreviated" href="mailto:mazoyer@univ-tln.fr">mazoyer@univ-tln.fr</a>
<a class="moz-txt-link-freetext" href="http://mio.pytheas.univ-amu.fr/">http://mio.pytheas.univ-amu.fr/</a>
<a class="moz-txt-link-freetext" href="http://imath.fr/">http://imath.fr/</a></pre>
</body>
</html>