about m3obc.h Question

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
pip39
Posts: 11
Joined: Mon Sep 07, 2009 8:07 pm
Location: nsysu

about m3obc.h Question

#1 Unread post by pip39 »

l modify 'm2obc.h' variable
'analytical.f90' successfully produce the expected variables

but
l modify 'm3obc.h' variable
'analytical.f90' no produce the expected variables


i already #define ANA_M3OBC in 'estuary_test.h'


Help me to explain




---'m2obc.h'------
!-----------------------------------------------------------------------
! 2D momentum open boundary conditions.
!-----------------------------------------------------------------------
!

#if defined ESTUARY_TEST
# ifdef WEST_M2OBC
IF (WESTERN_EDGE) THEN
DO j=JstrR,JendR
BOUNDARY(ng)%ubar_west(j)=3.0_r8
END DO
DO j=Jstr,JendR
BOUNDARY(ng)%vbar_west(j)=0.0_r8
END DO



---analytical.f90-----
!-----------------------------------------------------------------------
! 2D momentum open boundary conditions.
!-----------------------------------------------------------------------
!

IF (Istr.eq.1) THEN
DO j=JstrR,JendR
BOUNDARY(ng)%ubar_west(j)=3.0_r8
END DO
DO j=Jstr,JendR
BOUNDARY(ng)%vbar_west(j)=0.0_r8
END DO
END IF
RETURN
END SUBROUTINE ana_m2obc_tile
SUBROUTINE ana_nudgcoef (ng, tile, model)





---'m3obc.h'----------
!-----------------------------------------------------------------------
! 3D momentum open boundary conditions.
!-----------------------------------------------------------------------
#

if defined ESTUARY_TEST
# ifdef WEST_M3OBC

IF (WESTERN_EDGE) THEN
DO k=1,N(ng)
DO j=JstrR,JendR
BOUNDARY(ng)%u_west(j,k)=2.0_r8
END DO
DO j=Jstr,JendR
BOUNDARY(ng)%v_west(j,k)=0.0_r8
END DO
END DO



---analytical.f90-----
!-----------------------------------------------------------------------
! 3D momentum open boundary conditions.
!-----------------------------------------------------------------------


RETURN
END SUBROUTINE ana_m3obc_tile
SUBROUTINE ana_nudgcoef (ng, tile, model)

Entrapmen
Posts: 14
Joined: Thu Jul 17, 2008 3:28 pm
Location: IMS/METU and AWI

Re: about m3obc.h Question

#2 Unread post by Entrapmen »

What are the boundary conditions for your domain?

pip39
Posts: 11
Joined: Mon Sep 07, 2009 8:07 pm
Location: nsysu

Re: about m3obc.h Question

#3 Unread post by pip39 »

Entrapmen wrote:What are the boundary conditions for your domain?

#define UV_ADV
#define UV_LOGDRAG
#define TS_U3HADVECTION
#define SALINITY
#define SOLVE3D
#define SPLINES
#define SEDIMENT
#ifdef SEDIMENT
# define SUSPLOAD
#endif
#define AVERAGES
#define AVERAGES_AKV
#define AVERAGES_AKS
#define NORTHERN_WALL
#define SOUTHERN_WALL
#define EAST_FSGRADIENT
#define EAST_M2CLAMPED
#define EAST_M3GRADIENT
#define EAST_TCLAMPED
#define WEST_FSCHAPMAN
#define WEST_M2CLAMPED
#undef WEST_M2REDUCED
#undef FSOBC_REDUCED
#define WEST_M3GRADIENT
#define WEST_TRADIATION
#define WEST_TNUDGING
#define GLS_MIXING
#undef MY25_MIXING
#if defined GLS_MIXING || defined MY25_MIXING
# define KANTHA_CLAYSON
# undef CANUTO_A
# define N2S2_HORAVG
#endif
#define ANA_GRID
#define ANA_INITIAL
#define ANA_SEDIMENT
#define ANA_SMFLUX
#define ANA_STFLUX
#define ANA_BTFLUX
#define ANA_SSFLUX
#define ANA_BSFLUX
#define ANA_SPFLUX
#define ANA_BPFLUX
#define ANA_FSOBC
#define ANA_M2OBC
#define ANA_M3OBC
#define ANA_TOBC

User avatar
kate
Posts: 4089
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: about m3obc.h Question

#4 Unread post by kate »

Perhaps it's because the gradient condition doesn't need a boundary value. The boundary chunk is surrounded by '# ifdef WEST_M3OBS' which is defined in globaldefs.h:

Code: Select all

#if (defined WEST_M3RADIATION  && defined WEST_M3NUDGING)  || \
     defined WEST_M3CLAMPED
# define WEST_M3OBC
#endif

Post Reply