For other readers on the User Forum it helps to see the whole logic here:
Code: Select all
IF (LBC(iwest,isTvar(itrc),ng)%nudging) THEN
# ifdef TCLM_NUDGING
IF (DOMAIN(ng)%SouthWest_Corner(tile)) THEN
Tobc_out(itrc,ng,iwest)=CLIMA(ng)%Tnudgcof(0,1,itrc)
Tobc_in (itrc,ng,iwest)=obcfac(ng)* &
& Tobc_out(itrc,ng,iwest)
END IF
IF (DOMAIN(ng)%Western_Edge(tile)) THEN
DO j=JstrT,JendT
CLIMA(ng)%Tnudgcof(0,j,itrc)=0.0_r8
END DO
END IF
# else
IF (DOMAIN(ng)%SouthWest_Test(tile)) THEN
Tobc_out(itrc,ng,iwest)=Tnudg(itrc,ng)
Tobc_in (itrc,ng,iwest)=obcfac(ng)*Tnudg(itrc,ng)
END IF
# endif
END IF
If TCLM_NUDGING is not defined (the ELSE block) the inflow/outflow nudging time scales are simply set on the basis of values in ocean.in (TNUDG and OBCFAC). In this case there is no nudging anywhere else in the domain but on the perimeter.
But if TCLM_NUDGING is defined then the nudging on the boundary due to Tobc_in/out would "double" the nudging. So this is suppressed by the block that includes
Code: Select all
CLIMA(ng)%Tnudgcof(0,j,itrc)=0.0_r8
The spatial distribution of 3-D nudging applied by TCLM_NUDGING is set in the code that precedes all this. The default code follows the lines:
Code: Select all
#else
!
! Default nudging coefficients. Set nudging coefficients uniformly to
! the values specified in the standard input file.
But this is preceded by possible individual user customizations. If a user makes modifications then the nudging values due to TCLM_NUDGING can differ from Tnudg on the boundary. So the lines of code you question with the
0,1 index are intended to extract the customized values on the perimeter and use those for boundary nudging. A single value is required because Tobc_in/out are scalars.
Like Kate, I tend to modify this code chunk myself to set TCLM_NUDGING and boundary nudging coefficients as I wish.