[MITgcm-support] passive tracer restoring

钱钰坤 qianyk at mail3.sysu.edu.cn
Wed Jul 19 22:34:54 EDT 2017


Hi Martin,


Thanks very much for your suggestion.  I agree with you that it is much simpler not to involve the RBCS package.


After reading the source code of the ptracer pkg, I've added the restoring code at the end of the ptracers_integrate.F (see the attached figure), maybe not the best.


The main problem is that the restoring code requires the maximum and minimum values of the tracer field at each timestep.  This is a reduction operation in parallel environment and is not simple for me to write a subroutine that returning the max and min.  Fortunately, I found the existing subroutine MON_CALC_STATS_RL which is in monitor pkg and summarizes statistics for any given fields (actually, I only need max and min values while this subroutine provides more than this and thus could slow down the integration if it is called each timestep).


Now the code works fine but I still not sure about:
1) the upper and lower bound of the index for the loop (i,j) is correct (1-OLy to sNy+OLy for j while 1-OLx to sNx+OLx for i);
2) the use of maskInC or maskC to maskout the topo (I find maskInC works fine).


Thanks again.

------------------
 Best regards 
 
Yu-Kun Qian (钱钰坤) 
Center for Monsoon and Environment Research 
 Department of Atmospheric Sciences
School of Environmental Science and Engineering 
 Sun Yat-sen University 
No. 135 Xingang West Road, Haizhu District 
Guangzhou, 510275, P.R. China 
Tel; 020-84115227 
Email: qianyk at mail3.sysu.edu.cn      


 
 
 
------------------ 原始邮件 ------------------
发件人: "Martin Losch"<Martin.Losch at awi.de>;
发送时间: 2017年7月18日(星期二) 晚上7:56
收件人: "MITgcm Support"<mitgcm-support at mitgcm.org>; 

主题: Re: [MITgcm-support] passive tracer restoring

 
Hi,

did you get an answer? 

You could modify the RBCS package to do what you want to do, but maybe simpler to edit ptracers_apply_forcing.F, where you can add any passive tracer tendency. You need to reformulate your method so that translates into a tendency (tracerunits/time) and add it to gPtracer in an extra loop. This routine is called for every vertical level (k), so a 2D loop sufficies:

        DO j=jMin,jMax
         DO i=iMin,iMax
          gPtracer(i,j) = gPtracer(i,j) + yourTendency(i,j)
         ENDDO
        ENDDO

Martin

> On 7. Jul 2017, at 05:25, 钱钰坤 <qianyk at mail3.sysu.edu.cn> wrote:
> 
> Hi all,
> 
> I've released a passive tracer q in a specific setup and let the tracer evolve under the dynamic flows without any sources.
> 
> Due to the numerical diffusion induced by advection schemes (no explicit diffusion is set), the tracer variances decay slowly with time.  Therefore, for a long-time run, the global averaged tracer variance (or overall gradient estimated roughly by qmax-qmin) will decrease all the time.  To prevent this, I need the restoring method by Alen and Nakamura (2003, JAS):
> 
> q*=-1+2(q-qmin)/(qmax-qmin)
> 
> After this restoring (and normalization) at each time step, the tracer maximum and minimum values will remain between -1 and 1, and do not decay with time.
> 
> The problem is where to add this restoring code (or which source file to add to) every time step, so that it is a simple and easy task.
> 
> I've thought to use RBCS but RBCS seems to suitable for prescribed tracer field and the restoring formula here is tracer dependent.
> 
> Thanks in advance.
> 
> Reference:
> Allen, D. R. and N. Nakamura, 2003: Tracer Equivalent Latitude: A Diagnostic Tool for Isentropic Transport Studies. J. Atmos. Sci., 60, 287-304.
> 
> 
> ------------------
> Best regards 
> 
> Yu-Kun Qian (钱钰坤) 
> Center for Monsoon and Environment Research
> Department of Atmospheric Sciences
> School of Environmental Science and Engineering 
> Sun Yat-sen University 
> No. 135 Xingang West Road, Haizhu District 
> Guangzhou, 510275, P.R. China 
> Tel; 020-84115227 
> Email: qianyk at mail3.sysu.edu.cn
>  
>  
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20170720/1a31a390/attachment.htm>


More information about the MITgcm-support mailing list