viewtopic.php?f=19&t=3326&hilit=compact
...I reported a problem when radiative+nudging boundary conditions were specified for Fennel biological tracers using the compact specification, for example:
Code: Select all
LBC(isTvar) == RadNud RadNud RadNud RadNud \ ! idbio(*)
I have now found that a very similar problem occurs for regular tracer boundaries. Eg. I attempt to specify radiative+nudging boundaries for temperature, salinity and several passive tracers using the compact form, but the boundary data are retrieved only for temperature (which I noticed when the salinity in my domain went from 35 to zero in ten days!).
This time I have a fix. In file ROMS/Utility/inp_par.F, subroutine LOAD_LBC, lines 1664-1685, there is a block of code that sets boundary flags for the second and subsequent tracers:
Code: Select all
#ifdef SOLVE3D
!
! If processing tracers and last standard input entry (Icont=0), set
! unspecified tracer values to the last tracer entry.
!
IF ((iTrcStr.gt.0).and.(iTrcEnd.gt.0)) THEN
IF ((Icont.eq.0).and.(ifield.lt.isTvar(iTrcEnd))) THEN
DO i=ifield+1,isTvar(iTrcEnd)
DO ibry=1,4
S(ibry,i,igrid)%clamped = S(ibry,ifield,igrid)%clamped
S(ibry,i,igrid)%closed = S(ibry,ifield,igrid)%closed
S(ibry,i,igrid)%gradient = S(ibry,ifield,igrid)%gradient
S(ibry,i,igrid)%nested = S(ibry,ifield,igrid)%nested
S(ibry,i,igrid)%periodic = S(ibry,ifield,igrid)%periodic
S(ibry,i,igrid)%radiation = S(ibry,ifield,igrid)%radiation
S(ibry,i,igrid)%nudging = S(ibry,ifield,igrid)%nudging
END DO
ic=ic+1
END DO
END IF
END IF
#endif
Code: Select all
#ifdef SOLVE3D
!
! If processing tracers and last standard input entry (Icont=0), set
! unspecified tracer values to the last tracer entry.
!
IF ((iTrcStr.gt.0).and.(iTrcEnd.gt.0)) THEN
IF ((Icont.eq.0).and.(ifield.lt.isTvar(iTrcEnd))) THEN
DO i=ifield+1,isTvar(iTrcEnd)
DO ibry=1,4
S(ibry,i,igrid)%clamped = S(ibry,ifield,igrid)%clamped
S(ibry,i,igrid)%closed = S(ibry,ifield,igrid)%closed
S(ibry,i,igrid)%gradient = S(ibry,ifield,igrid)%gradient
S(ibry,i,igrid)%nested = S(ibry,ifield,igrid)%nested
S(ibry,i,igrid)%periodic = S(ibry,ifield,igrid)%periodic
S(ibry,i,igrid)%radiation = S(ibry,ifield,igrid)%radiation
S(ibry,i,igrid)%nudging = S(ibry,ifield,igrid)%nudging
S(ibry,i,igrid)%acquire = S(ibry,i,igrid)%clamped.OR. &
& S(ibry,i,igrid)%nudging
END DO
ic=ic+1
END DO
END IF
END IF
#endif