def of a rectangle open boundaries

For questions about setting up the basic hydrodynamics. Bathymetry inclusion, tidal boundary conditions, river inclusion and so on..

Moderator: Saheedpp

Post Reply
Sou
Posts: 51
Joined: Wed Sep 03, 2014 7:46 pm
Full name: Soudeh Afsharian

def of a rectangle open boundaries

Post by Sou »

Hello,
How can I define a rectangle open boundaries? it seems that the model doesn't let me consider all side as open boundaries.
I tried to define a rectangle in water where all sides are open and the depth is uniform, here is the brief statement:

!---grid dimensions
nc = 11; nr = 11; nz = 25

!---number of open sea boundaries
nosbu = 20; nosbv = 20

.
.
.
.
IMPLICIT NONE

!
!*Local variables
!
INTEGER :: i, j, jj, ii



procname(pglev+1) = 'usrdef_grid'
CALL log_timer_in()

!
!3. Open boundary locations
!--------------------------
!
!---West
ii = 0
j_441: DO j=1,nr-1

ii = ii + 1
iobu(ii) = 1
jobu(ii) = j

ENDDO j_441

!---East
!j_442: DO j=1,nr-1

! ii = ii + 1
! iobu(ii) = nc
! jobu(ii) = j

!ENDDO j_442

!---South
jj = 0
i_443: DO i=1,nc-1

jj = jj + 1
iobv(jj) = i
jobv(jj) = 1

ENDDO i_443


!---North
jj = 0
i_444: DO i=1,nc-1

jj = jj + 1
iobv(jj) = i
jobv(jj) = nr

ENDDO i_444

CALL log_timer_out()

RETURN

END SUBROUTINE usrdef_grid



But the model shows runlogerror and doesn't let me do it. However it runs normally for 2 open boundaries.
Please help me in that.
Regards,
Sue
Katrijn
Posts: 87
Joined: Fri Nov 29, 2013 3:04 pm
Full name: Katrijn Baetens

Re: def of a rectangle open boundaries

Post by Katrijn »

Hi Sou,

I do notice a few things:
east boundary is commented (probably you testing the code)
At the north boundary you reset jj to 0, this should not be done (iobv(1:20)), if you reset you don't fill the whole array

Hope this helps,

KAt
Sou
Posts: 51
Joined: Wed Sep 03, 2014 7:46 pm
Full name: Soudeh Afsharian

Re: def of a rectangle open boundaries

Post by Sou »

Thank You Kat, the problem was caused by jj=0 as you implied. now it lets me open all 4 boundaries.
Thanks again,
Sue
Post Reply