Difference between revisions of "Lateral Boundary Conditions"

From WikiROMS
Jump to navigationJump to search
Line 665: Line 665:
|[[Variables#VolCons|VolCons]]([[Variables#inorth|inorth]], ng)
|[[Variables#VolCons|VolCons]]([[Variables#inorth|inorth]], ng)
|}
|}
{{note}}'''NOTE:''' The internal C-preprocessing option '''NUDGING_COEF''', defined previously in <span class="forestGreen">globaldefs.h</span>, is eliminated and replaced with logical switch '''NudgingCoeff'''(ng). This switch is used in <span class="forestGreen">ana_nudgcoef.h</span>. We recommend that you start with new version of <span class="forestGreen">ana_nudgecoef.h</span> and add the code needed for your application.
{{note}}'''NOTE:''' Also, the internal C-preprocessing option '''OBC_DATA''', defined previously in <span class="forestGreen">globaldefs.h</span>, is eliminated and replaced with logical switch '''ObcData'''(ng). This switch is activated internally in <span class="forestGreen">read_phypar.F</span> to process lateral boundary conditions NetCDF file.

Revision as of 17:28, 27 September 2011

Lateral Boundary Conditions

The lateral boundary conditions are specified by logical switches to facilitate applications with nested grids. It also allows to set different boundary conditions between the nonlinear model and the adjoint/tangent models. In addition, we can have different boundary conditions between active and passive tracers. The LBC structure is allocated as:

where 1:4 are the numbered boundary edges, nLBCvar is the number of LBC state variables, and Ngrids is the number of nested grids. The boundary order is: 1=west, 2=south, 3=east, and 4=north. That is, anticlockwise starting at the western boundary.

LBC indices.png

For example, the free-surface gradient boundary conditions are specified as:

LBC(iwest, isFsur, ng) % gradient
LBC(ieast, isFsur, ng) % gradient
LBC(isouth, isFsur, ng) % gradient
LBC(inorth, isFsur, ng) % gradient

The structure is declared in mod_param.F as:

integer :: nLBCvar

TYPE T_LBC
logical :: acquire  ! process lateral boundary data

logical :: Chapman
logical :: clamped
logical :: closed
logical :: Flather
logical :: gradient
logical :: nested
logical :: nudging
logical :: periodic
logical :: radiation
logical :: reduced
END TYPE T_LBC

TYPE (T_LBC), allocatable :: LBC(:,:,:)

TYPE (T_LBC), allocatable :: ad_LBC(:,:,:)
TYPE (T_LBC), allocatable :: tl_LBC(:,:,:)



Conversion Tables

Starting with ROMS version 3.6, the CPP options for lateral boundary conditions (user defined and internal) are deprecated and replaced with logical switches that are specified in the standard input files. The following tables show the conversion from CPP options to logical switches for each state variable using the LBC structure:


Free-surface
CPP Logical Switch, IF (...) THEN
WEST_FSCHAPMAN LBC(iwest,  isFsur, ng) % Chapman
EAST_FSCHAPMAN LBC(ieast,  isFsur, ng) % Chapman
SOUTH_FSCHAPMAN LBC(isouth, isFsur, ng) % Chapman
NORTH_FSCHAPMAN LBC(inorth, isFsur, ng) % Chapman
WEST_FSCLAMPED LBC(iwest,  isFsur, ng) % clamped
EAST_FSCLAMPED LBC(ieast,  isFsur, ng) % clamped
SOUTH_FSCLAMPED LBC(isouth, isFsur, ng) % clamped
NORTH_FSCLAMPED LBC(inorth, isFsur, ng) % clamped
WESTERN_WALL LBC(iwest,  isFsur, ng) % closed
EASTERN_WALL LBC(ieast,  isFsur, ng) % closed
SOUTHERN_WALL LBC(isouth, isFsur, ng) % closed
NORTHERN_WALL LBC(inorth, isFsur, ng) % closed
WEST_FSGRADIENT LBC(iwest,  isFsur, ng) % gradient
EAST_FSGRADIENT LBC(ieast,  isFsur, ng) % gradient
SOUTH_FSGRADIENT LBC(isouth, isFsur, ng) % gradient
NORTH_FSGRADIENT LBC(inorth, isFsur, ng) % gradient
WEST_FSNUDGING LBC(iwest,  isFsur, ng) % nudging
EAST_FSNUDGING LBC(ieast,  isFsur, ng) % nudging
SOUTH_FSNUDGING LBC(isouth, isFsur, ng) % nudging
NORTH_FSNUDGING LBC(inorth, isFsur, ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isFsur, ng) % periodic
LBC(ieast,  isFsur, ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isFsur, ng) % periodic
LBC(inorth, isFsur, ng) % periodic
WEST_FSRADIATION LBC(iwest,  isFsur, ng) % radiation
EAST_FSRADIATION LBC(ieast,  isFsur, ng) % radiation
SOUTH_FSRADIATION LBC(isouth, isFsur, ng) % radiation
NORTH_FSRADIATION LBC(inorth, isFsur, ng) % radiation
WEST_FSOBC LBC(iwest,  isFsur, ng) % acquire
EAST_FSOBC LBC(ieast,  isFsur, ng) % acquire
SOUTH_FSOBC LBC(isouth, isFsur, ng) % acquire
NORTH_FSOBC LBC(inorth, isFsur, ng) % acquire


2D U-momentum
CPP Logical Switch, IF (...) THEN
WEST_M2CLAMPED LBC(iwest,  isUbar, ng) % clamped
EAST_M2CLAMPED LBC(ieast,  isUbar, ng) % clamped
SOUTH_M2CLAMPED LBC(isouth, isUbar, ng) % clamped
NORTH_M2CLAMPED LBC(inorth, isUbar, ng) % clamped
WESTERN_WALL LBC(iwest,  isUbar, ng) % closed
EASTERN_WALL LBC(ieast,  isUbar, ng) % closed
SOUTHERN_WALL LBC(isouth, isUbar, ng) % closed
NORTHERN_WALL LBC(inorth, isUbar, ng) % closed
WEST_M2FLATHER LBC(iwest,  isUbar, ng) % Flather
EAST_M2FLATHER LBC(ieast,  isUbar, ng) % Flather
SOUTH_M2FLATHER LBC(isouth, isUbar, ng) % Flather
NORTH_M2FLATHER LBC(inorth, isUbar, ng) % Flather
WEST_M2GRADIENT LBC(iwest,  isUbar, ng) % gradient
EAST_M2GRADIENT LBC(ieast,  isUbar, ng) % gradient
SOUTH_M2GRADIENT LBC(isouth, isUbar, ng) % gradient
NORTH_M2GRADIENT LBC(inorth, isUbar, ng) % gradient
WEST_M2NUDGING LBC(iwest,  isUbar, ng) % nudging
EAST_M2NUDGING LBC(ieast,  isUbar, ng) % nudging
SOUTH_M2NUDGING LBC(isouth, isUbar, ng) % nudging
NORTH_M2NUDGING LBC(inorth, isUbar, ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isUbar, ng) % periodic
LBC(ieast,  isUbar, ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isUbar, ng) % periodic
LBC(inorth, isUbar, ng) % periodic
WEST_M2RADIATION LBC(iwest,  isUbar, ng) % radiation
EAST_M2RADIATION LBC(ieast,  isUbar, ng) % radiation
SOUTH_M2RADIATION LBC(isouth, isUbar, ng) % radiation
NORTH_M2RADIATION LBC(inorth, isUbar, ng) % radiation
WEST_M2REDUCED LBC(iwest,  isUbar, ng) % reduced
EAST_M2REDUCED LBC(ieast,  isUbar, ng) % reduced
SOUTH_M2REDUCED LBC(isouth, isUbar, ng) % reduced
NORTH_M2REDUCED LBC(inorth, isUbar, ng) % reduced
WEST_M2OBC LBC(iwest,  isUbar, ng) % acquire
EAST_M2OBC LBC(ieast,  isUbar, ng) % acquire
SOUTH_M2OBC LBC(isouth, isUbar, ng) % acquire
NORTH_M2OBC LBC(inorth, isUbar, ng) % acquire


2D V-momentum
CPP Logical Switch, IF (...) THEN
WEST_M2CLAMPED LBC(iwest,  isVbar, ng) % clamped
EAST_M2CLAMPED LBC(ieast,  isVbar, ng) % clamped
SOUTH_M2CLAMPED LBC(isouth, isVbar, ng) % clamped
NORTH_M2CLAMPED LBC(inorth, isVbar, ng) % clamped
WESTERN_WALL LBC(iwest,  isVbar, ng) % closed
EASTERN_WALL LBC(ieast,  isVbar, ng) % closed
SOUTHERN_WALL LBC(isouth, isVbar, ng) % closed
NORTHERN_WALL LBC(inorth, isVbar, ng) % closed
WEST_M2FLATHER LBC(iwest,  isVbar, ng) % Flather
EAST_M2FLATHER LBC(ieast,  isVbar, ng) % Flather
SOUTH_M2FLATHER LBC(isouth, isVbar, ng) % Flather
NORTH_M2FLATHER LBC(inorth, isVbar, ng) % Flather
WEST_M2GRADIENT LBC(iwest,  isVbar, ng) % gradient
EAST_M2GRADIENT LBC(ieast,  isVbar, ng) % gradient
SOUTH_M2GRADIENT LBC(isouth, isVbar, ng) % gradient
NORTH_M2GRADIENT LBC(inorth, isVbar, ng) % gradient
WEST_M2NUDGING LBC(iwest,  isVbar, ng) % nudging
EAST_M2NUDGING LBC(ieast,  isVbar, ng) % nudging
SOUTH_M2NUDGING LBC(isouth, isVbar, ng) % nudging
NORTH_M2NUDGING LBC(inorth, isVbar, ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isVbar, ng) % periodic
LBC(ieast,  isVbar, ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isVbar, ng) % periodic
LBC(inorth, isVbar, ng) % periodic
WEST_M2RADIATION LBC(iwest,  isVbar, ng) % radiation
EAST_M2RADIATION LBC(ieast,  isVbar, ng) % radiation
SOUTH_M2RADIATION LBC(isouth, isVbar, ng) % radiation
NORTH_M2RADIATION LBC(inorth, isVbar, ng) % radiation
WEST_M2REDUCED LBC(iwest,  isVbar, ng) % reduced
EAST_M2REDUCED LBC(ieast,  isVbar, ng) % reduced
SOUTH_M2REDUCED LBC(isouth, isVbar, ng) % reduced
NORTH_M2REDUCED LBC(inorth, isVbar, ng) % reduced
WEST_M2OBC LBC(iwest,  isVbar, ng) % acquire
EAST_M2OBC LBC(ieast,  isVbar, ng) % acquire
SOUTH_M2OBC LBC(isouth, isVbar, ng) % acquire
NORTH_M2OBC LBC(inorth, isVbar, ng) % acquire


3D U-momentum
CPP Logical Switch, IF (...) THEN
WEST_M3CLAMPED LBC(iwest,  isUvel, ng) % clamped
EAST_M3CLAMPED LBC(ieast,  isUvel, ng) % clamped
SOUTH_M3CLAMPED LBC(isouth, isUvel, ng) % clamped
NORTH_M3CLAMPED LBC(inorth, isUvel, ng) % clamped
WESTERN_WALL LBC(iwest,  isUvel, ng) % closed
EASTERN_WALL LBC(ieast,  isUvel, ng) % closed
SOUTHERN_WALL LBC(isouth, isUvel, ng) % closed
NORTHERN_WALL LBC(inorth, isUvel, ng) % closed
WEST_M3GRADIENT LBC(iwest,  isUvel, ng) % gradient
EAST_M3GRADIENT LBC(ieast,  isUvel, ng) % gradient
SOUTH_M3GRADIENT LBC(isouth, isUvel, ng) % gradient
NORTH_M3GRADIENT LBC(inorth, isUvel, ng) % gradient
WEST_M3NUDGING LBC(iwest,  isUvel, ng) % nudging
EAST_M3NUDGING LBC(ieast,  isUvel, ng) % nudging
SOUTH_M3NUDGING LBC(isouth, isUvel, ng) % nudging
NORTH_M3NUDGING LBC(inorth, isUvel, ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isUvel, ng) % periodic
LBC(ieast,  isUvel, ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isUvel, ng) % periodic
LBC(inorth, isUvel, ng) % periodic
WEST_M3RADIATION LBC(iwest,  isUvel, ng) % radiation
EAST_M3RADIATION LBC(ieast,  isUvel, ng) % radiation
SOUTH_M3RADIATION LBC(isouth, isUvel, ng) % radiation
NORTH_M3RADIATION LBC(inorth, isUvel, ng) % radiation
WEST_M3OBC LBC(iwest,  isUvel, ng) % acquire
EAST_M3OBC LBC(ieast,  isUvel, ng) % acquire
SOUTH_M3OBC LBC(isouth, isUvel, ng) % acquire
NORTH_M3OBC LBC(inorth, isUvel, ng) % acquire


3D V-momentum
CPP Logical Switch, IF (...) THEN
WEST_M3CLAMPED LBC(iwest,  isVvel, ng) % clamped
EAST_M3CLAMPED LBC(ieast,  isVvel, ng) % clamped
SOUTH_M3CLAMPED LBC(isouth, isVvel, ng) % clamped
NORTH_M3CLAMPED LBC(inorth, isVvel, ng) % clamped
WESTERN_WALL LBC(iwest,  isVvel, ng) % closed
EASTERN_WALL LBC(ieast,  isVvel, ng) % closed
SOUTHERN_WALL LBC(isouth, isVvel, ng) % closed
NORTHERN_WALL LBC(inorth, isVvel, ng) % closed
WEST_M3GRADIENT LBC(iwest,  isVvel, ng) % gradient
EAST_M3GRADIENT LBC(ieast,  isVvel, ng) % gradient
SOUTH_M3GRADIENT LBC(isouth, isVvel, ng) % gradient
NORTH_M3GRADIENT LBC(inorth, isVvel, ng) % gradient
WEST_M3NUDGING LBC(iwest,  isVvel, ng) % nudging
EAST_M3NUDGING LBC(ieast,  isVvel, ng) % nudging
SOUTH_M3NUDGING LBC(isouth, isVvel, ng) % nudging
NORTH_M3NUDGING LBC(inorth, isVvel, ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isVvel, ng) % periodic
LBC(ieast,  isVvel, ng) % periodic
NS_PERIODIC NSeriodic(ng)
LBC(isouth, isVvel, ng) % periodic
LBC(inorth, isVvel, ng) % periodic
WEST_M3RADIATION LBC(iwest,  isVvel, ng) % radiation
EAST_M3RADIATION LBC(ieast,  isVvel, ng) % radiation
SOUTH_M3RADIATION LBC(isouth, isVvel, ng) % radiation
NORTH_M3RADIATION LBC(inorth, isVvel, ng) % radiation
WEST_M3OBC LBC(iwest,  isVvel, ng) % acquire
EAST_M3OBC LBC(ieast,  isVvel, ng) % acquire
SOUTH_M3OBC LBC(isouth, isVvel, ng) % acquire
NORTH_M3OBC LBC(inorth, isVvel, ng) % acquire


TKE mixing
CPP Logical Switch, IF (...) THEN
WESTERN_WALL LBC(iwest,  isMtke, ng) % closed
EASTERN_WALL LBC(ieast,  isMtke, ng) % closed
SOUTHERN_WALL LBC(isouth, isMtke, ng) % closed
NORTHERN_WALL LBC(inorth, isMtke, ng) % closed
WEST_KGRADIENT LBC(iwest,  isMtke, ng) % gradient
EAST_KGRADIENT LBC(ieast,  isMtke, ng) % gradient
SOUTH_KGRADIENT LBC(isouth, isMtke, ng) % gradient
NORTH_KGRADIENT LBC(inorth, isMtke, ng) % gradient
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isMtke, ng) % periodic
LBC(ieast,  isMtke, ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isMtke, ng) % periodic
LBC(inorth, isMtke, ng) % periodic
WEST_KRADIATION LBC(iwest,  isMtke, ng) % radiation
EAST_KRADIATION LBC(ieast,  isMtke, ng) % radiation
SOUTH_KRADIATION LBC(isouth, isMtke, ng) % radiation
NORTH_KRADIATION LBC(inorth, isMtke, ng) % radiation


Tracers
CPP Logical Switch, IF (...) THEN
WEST_TCLAMPED LBC(iwest,  isTvar(:), ng) % clamped
EAST_TCLAMPED LBC(ieast,  isTvar(:), ng) % clamped
SOUTH_TCLAMPED LBC(isouth, isTvar(:), ng) % clamped
NORTH_TCLAMPED LBC(inorth, isTvar(:), ng) % clamped
WESTERN_WALL LBC(iwest,  isTvar(:), ng) % closed
EASTERN_WALL LBC(ieast,  isTvar(:), ng) % closed
SOUTHERN_WALL LBC(isouth, isTvar(:), ng) % closed
NORTHERN_WALL LBC(inorth, isTvar(:), ng) % closed
WEST_TGRADIENT LBC(iwest,  isTvar(:), ng) % gradient
EAST_TGRADIENT LBC(ieast,  isTvar(:), ng) % gradient
SOUTH_TGRADIENT LBC(isouth, isTvar(:), ng) % gradient
NORTH_TGRADIENT LBC(inorth, isTvar(:), ng) % gradient
WEST_TNUDGING LBC(iwest,  isTvar(:), ng) % nudging
EAST_TNUDGING LBC(ieast,  isTvar(:), ng) % nudging
SOUTH_TNUDGING LBC(isouth, isTvar(:), ng) % nudging
NORTH_TNUDGING LBC(inorth, isTvar(:), ng) % nudging
EW_PERIODIC EWperiodic(ng)
LBC(iwest,  isTvar(:), ng) % periodic
LBC(ieast,  isTvar(:), ng) % periodic
NS_PERIODIC NSperiodic(ng)
LBC(isouth, isTvar(:), ng) % periodic
LBC(inorth, isTvar(:), ng) % periodic
WEST_TRADIATION LBC(iwest,  isTvar(:), ng) % radiation
EAST_TRADIATION LBC(ieast,  isTvar(:), ng) % radiation
SOUTH_TRADIATION LBC(isouth, isTvar(:), ng) % radiation
NORTH_TRADIATION LBC(inorth, isTvar(:), ng) % radiation
WEST_TOBC LBC(iwest,  isTvar(:), ng) % acquire
EAST_TOBC LBC(ieast,  isTvar(:), ng) % acquire
SOUTH_TOBC LBC(isouth, isTvar(:), ng) % acquire
NORTH_TOBC LBC(inorth, isTvar(:), ng) % acquire


Starting with ROMS version 3.6, the CPP options for volume conservation are deprecated and replaced with logical switches that are specified in the ocean.in file. The following tables show the conversion from CPP options to logical switches:


Volume Conservation
CPP Logical Switch, IF (...) THEN
WEST_VOLCONS VolCons(iwest,  ng)
EAST_VOLCONS VolCons(ieast,  ng)
SOUTH_VOLCONS VolCons(isouth, ng)
NORTH_VOLCONS VolCons(inorth, ng)


NoteNOTE: The internal C-preprocessing option NUDGING_COEF, defined previously in globaldefs.h, is eliminated and replaced with logical switch NudgingCoeff(ng). This switch is used in ana_nudgcoef.h. We recommend that you start with new version of ana_nudgecoef.h and add the code needed for your application.


NoteNOTE: Also, the internal C-preprocessing option OBC_DATA, defined previously in globaldefs.h, is eliminated and replaced with logical switch ObcData(ng). This switch is activated internally in read_phypar.F to process lateral boundary conditions NetCDF file.