nudging coefficient problem

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
chimera.u
Posts: 4
Joined: Mon Nov 10, 2008 8:44 pm
Location: IOCAS, TAMU

nudging coefficient problem

#1 Unread post by chimera.u »

my region nears to a square with east and south open boundary, when i use
{#define EAST_TRADIATION
#define EAST_TNUDGING

#define SOUTH_TRADIATION
#define SOUTH_TNUDGING

#define WESTERN_WALL
#define NORTHERN_WALL

#define TCLIMATOLOGY
#define TCLM_NUDGING
(EAST_TNUDGING and TCLM_NUDGING are both defined and the runs are compiled with mpi and
default ana_nudgcoef.h in the ROMS/Functionals directory)

I found the Tobc_out or Tobc_in in the restart file like this,
[0 0
1.0e-06*0.5787 1.0e-06*0.5787
0 0
0 0]

there is no Tobc values at the east boundary

after that, with more checking
I found it was induced by these codes in the Nonlinear/initial.F line 297-311
#ifdef NUDGING_COFF
!
!-----------------------------------------------------------------------
! If appropriate, set nudging coefficiests time scales.
!-----------------------------------------------------------------------
!
!$OMP PARALLEL DO PRIVATE(thread,subs,tile) SHARED(ng,numthreads)
DO thread=0,numthreads-1
subs=NtileX(ng)*NtileE(ng)/numthreads
DO tile=subs*thread,subs*(thread+1)-1
CALL ana_nudgcoef (ng, TILE, iNLM)
END DO
END DO
!$OMP END PARALLEL DO
#endif

accords to the code in the default ROMS/Functionals/ana_nudgcoef.h file line 437-463
# ifdef EAST_TNUDGING
# ifdef TCLM_NUDGING
DO itrc=1,NT(ng)
IF (NORTH_EAST_CORNER) THEN
Tobc_out(itrc,ng,ieast)= &
& CLIMA(ng)%Tnudgcof(Lm(ng)+1,Mm(ng),itrc)
Tobc_in (itrc,ng,ieast)=obcfac(ng)*Tobc_out(itrc,ng,ieast)
END IF
IF (EASTERN_EDGE) THEN
DO j=JstrR,JendR
CLIMA(ng)%Tnudgcof(Lm(ng)+1,j,itrc)=0.0_r8
END DO
END IF
END DO
# ifdef DISTRIBUTE
CALL mp_bcastf (ng, model, Tobc_out(:,ng,ieast), MT)
CALL mp_bcastf (ng, model, Tobc_in (:,ng,ieast), MT)
# endif
# else
DO itrc=1,NT(ng)
IF (NORTH_EAST_TEST) THEN
Tobc_out(itrc,ng,ieast)=Tnudg(itrc,ng)
Tobc_in (itrc,ng,ieast)=obcfac(ng)*Tnudg(itrc,ng)
END IF
END DO
# endif
# endif
only the tobc value in the first tile, the most southwest tile are broadcast, so the east boundary tobc value remains 0

Is this all right? I am confused. I think this is a bug.
Me myself, I just add
Tobc_out(:,ng,3)=Tobc_out(:,ng,2)
Tobc_in(:,ng,3)=Tobc_in(:,ng,2)

Post Reply