Nudging time scales for RadNud boundaries

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
c.drinkorn
Posts: 110
Joined: Thu Mar 08, 2018 2:47 am
Location: German Research Centre for Geosciences

Nudging time scales for RadNud boundaries

#1 Unread post by c.drinkorn »

DEar ROMS community,

I am pondering over this for quite some time now. Maybe the answer is fairly easy but I couldn't quite figure it on my own:
How does ROMS calculate the RadNud boundary nudging time scales? Does it check the time unit of the boundary file in order to determine whether the timescale given in ocean.in are days or seconds?
The reason for my question is that I had a classical boundary blocking problem creating an artificial along-boundary current and effectively not letting any inflow happen. I used time scales in the order of a year or years for outgoing and days for incoming flows. However, the problem always remained and the model behavior at the boundary didn't show any significant change for different time scales. At some point I wondered what would happen if I just tried seconds instead of days. Eventually, the problem vanished. Now I have a really beautiful inflow and no artificial along-border flows anymore. In fact, it looks like I just cut a larger domain somewhere mid-field.
I am not quite sure how to interpret this, though. Did I sort of "shut down" nudging by having suuuper long nudging time scales or could it be that the time scales in fact had to be in seconds for the boundary since my boundary file has a time unit in seconds?
I can see that Tnudg is being rescaled in read_phypar.F and the momentum nudging time scales in inp_par.F - I am still a bit unsure about the pathways of the variable handling...
I am grateful for any hint! :)

c.drinkorn
Posts: 110
Joined: Thu Mar 08, 2018 2:47 am
Location: German Research Centre for Geosciences

Re: Nudging time scales for RadNud boundaries

#2 Unread post by c.drinkorn »

HI all,

to get back at this and be fair to the ROMS code I want to share that I investigated the *nudg and *obc_out / _in values provided in the output and they are very much consistent with the expected internal rescaling from days to seconds and the obc factor, respectively. :oops:
However, I still haven't succeeded to completely follow the pathway of the nudging time scales into the boundary routines. Can anyone provide help? Thank you very much!
All in all, I suppose that I most likely just need unusually long nudging time scales in order to overcome existing (still not completely revealed) boundary issues. I am investigating this further and will report any progress in order to help others struggling at their boundaries, too. :)

Cate

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Nudging time scales for RadNud boundaries

#3 Unread post by wilkin »

Running a recursive grep query for Tobc_in will guide you to where open boundary nudging time scales are set.

In subroutine inp_par.F you find ...

Code: Select all

            DO itrc=1,NT(ng)
              IF (LBC(ibry,isTvar(itrc),ng)%nudging) THEN
                Tobc_out(itrc,ng,ibry)=Tnudg(itrc,ng)
                Tobc_in (itrc,ng,ibry)=obcfac(ng)*Tnudg(itrc,ng)
              END IF
            END DO
Here Tnudg and obcfac are parameters set in roms.in (or ocean.in if you haven't updated in a while) and documented therein. As you note, all the units conversions for nudging time scales in days are correct in the conversion to inverse seconds, which is how the nudging is actually applied.

However ... in a block of comments preceding this code you will find:

Code: Select all

!  Set nudging coefficients (1/s) for passive/active (outflow/inflow)
!  open boundary conditions.  Weak nudging is expected in passive
!  outflow conditions and strong nudging is expected in active inflow
!  conditions. If nudging to climatology fields, these values are
!  replaced by spatial nudging coefficients distribution in the
!  open boundary condition routines.
The key word here is "replaced". So if you have so-called "climatology" nudging activated and are specifying the 3-D nudging with either #define ANA_NUDGCOF or defaulting to reading the 3-D nudging coefficients from an external NetCDF file (set by parameter NUDNAME in roms.in) then the code in inp_par.F is superseded.

This occurs within the boundary conditions file t3dbc_im.F , for example:

Code: Select all

                IF (LBC(iwest,isTvar(itrc),ng)%nudging) THEN
                  IF (LnudgeTCLM(itrc,ng)) THEN
                    obc_out=CLIMA(ng)%Tnudgcof(Istr-1,j,k,ic)
                    obc_in =obcfac(ng)*obc_out
                  ELSE
                    obc_out=Tobc_out(itrc,ng,iwest)
                    obc_in =Tobc_in (itrc,ng,iwest)
                  END IF
So you see there that if LnudgeTCLM is true (which is set in roms.in) then the Tobc_in and Tobc_out values set in inp_par.F are not used. Obcfac is still applied following the same convention, only it is applied to the out time scale set by Tnudgcof (from ANA_NUDGCOF or NUDNAME) not by Tnudg (from roms.in).

Note that this block of code is inside ...

Code: Select all

        IF (LBC(iwest,isTvar(itrc),ng)%radiation) THEN
so it appears to me as I read this code that there is no option to have boundary nudging without also having radiation.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

c.drinkorn
Posts: 110
Joined: Thu Mar 08, 2018 2:47 am
Location: German Research Centre for Geosciences

Re: Nudging time scales for RadNud boundaries

#4 Unread post by c.drinkorn »

Hi John, thank you very much for the clarification!
Yes, grep is my best friend. :) So I was somewhat familiar with the routines you pointed at. What's still unclear to me is from where t3dbc_im.F receives its Tobc_out which I suppose is already rescaled at that time. I guess, the thread goes back to one of the "shell" modules like mod_ocean or so from where the routines are called one after each other...
Yes, the radiation flag is only being set to true for the Rad or RadNud bc in load_lbc. Nud alone wouldn't work obviously. Or in this case one would have to use LnudgeTCLM, as you have already pointed out.
In my case, I am not nudging to a climatology but to a boundary field (if the orthogonal components are indeed directed into the domain). It seems like the flows inside of the domain exhibit a large inconsistency with the flows of the bry field so that inflow is being strongly damped and outflow tends to be reflected even when I apply "reasonable" nudging time scales. Only for values which are basically infinite in relation to the model time span this behavior stops.
I am currently investigating my boundary files for possible errors and looking into the mixing behavior of my simulation in order to hopefully find the reason for the issue. Let's see what I find... :)

c.drinkorn
Posts: 110
Joined: Thu Mar 08, 2018 2:47 am
Location: German Research Centre for Geosciences

Re: Nudging time scales for RadNud boundaries

#5 Unread post by c.drinkorn »

I'm sorry, I meant nl_ocean not mod_ocean.

Post Reply