C $Header: /u/gcmpack/MITgcm/pkg/obcs/OBCS.h,v 1.25 2010/11/11 09:42:54 mlosch Exp $
C $Name: $
#ifdef ALLOW_OBCS
C useOrlanskiNorth/South/East/West
C :: specify Orlanski boundary conditions for northern/
C southern/eastern/Western
C useStevensNorth/South/East/West
C :: use open boundary computations following Stevens (1990)
C T/SrelaxStevens :: relaxation time scale (in seconds) for T/S-points
C for Stevens boundary conditions
C useStevensPhaseVel
C :: use phase velocity contribution for open boundary
C computations following Stevens (1990), default = true
C useStevensAdvection
C :: use advective contribution for open boundary
C computations following Stevens (1990), default = true
C useOBCSsponge :: turns on sponge layer along boundary (def=false)
C spongeThickness :: number grid points that make up the sponge layer (def=0)
C U/Vrelaxobcsinner/bound :: relaxation time scale (in seconds) for U/V-points
C on the boundary (bound) and at the innermost grid point
C of the sponge layer (inner); relaxation time scales
C in-between are linearly interpolated from these values
C useOBCSbalance :: balance the volume flux through boundary
C at every time step
C useOBCSprescribe :: read boundary conditions from a file
C (overrides Orlanski and other boundary values)
C OBCSprintDiags :: print boundary values to STDOUT (def=true)
C useOBCSYearlyFields :: when reading boundary values by exf, assume yearly
C climatology (def=false)
C OBCSfixTopo :: check and adjust topography for problematic gradients
C across boundaries (def=true)
C tileHasOB[N,S,E,W] :: this tile has OB at Northern/Southern/Eastern/Western edge
C OB[N,S,E,W][u,v,t,s,a,h,sn,sl,uice,vice]File :: Files with boundary
C conditons, the letter combinations mean:
C N/S/E/W :: northern/southern/eastern/western boundary
C u/v/t/s :: ocean u/v velocities, temperature/salinity
C a/h :: sea ice concentration/effective thickness
C sn/sl :: effective snow thickness/sea ice salinity
C uice/vice :: sea ice u/v drift velocities
COMMON /PARM_IL_OB/
& spongeThickness,
& useOrlanskiNorth,useOrlanskiSouth,
& useOrlanskiEast,useOrlanskiWest,
& useStevensNorth,useStevensSouth,
& useStevensEast,useStevensWest,
& useStevensPhaseVel, useStevensAdvection,
& useOBCSsponge, useOBCSbalance, useOBCSprescribe,
& OBCSprintDiags, useOBCSYearlyFields,
& OBCSfixTopo
INTEGER spongeThickness
LOGICAL useOrlanskiNorth
LOGICAL useOrlanskiSouth
LOGICAL useOrlanskiEast
LOGICAL useOrlanskiWest
LOGICAL useStevensNorth
LOGICAL useStevensSouth
LOGICAL useStevensEast
LOGICAL useStevensWest
LOGICAL useStevensPhaseVel
LOGICAL useStevensAdvection
LOGICAL useOBCSsponge
LOGICAL useOBCSbalance
LOGICAL useOBCSprescribe
LOGICAL OBCSprintDiags
LOGICAL useOBCSYearlyFields
LOGICAL OBCSfixTopo
COMMON /PARM_R_OB/
& Urelaxobcsinner,Urelaxobcsbound,
& Vrelaxobcsinner,Vrelaxobcsbound,
& TrelaxStevens, SrelaxStevens
_RS Urelaxobcsinner
_RS Urelaxobcsbound
_RS Vrelaxobcsinner
_RS Vrelaxobcsbound
_RS TrelaxStevens
_RS SrelaxStevens
COMMON /OBCS_ACTIVE_TILES/
& tileHasOBN, tileHasOBS, tileHasOBE, tileHasOBW
LOGICAL tileHasOBN(nSx,nSy)
LOGICAL tileHasOBS(nSx,nSy)
LOGICAL tileHasOBE(nSx,nSy)
LOGICAL tileHasOBW(nSx,nSy)
COMMON /GRID_IND_OB/
& OB_Jn,OB_Js,OB_Ie,OB_Iw
INTEGER OB_Jn(1-Olx:sNx+Olx,nSx,nSy)
INTEGER OB_Js(1-Olx:sNx+Olx,nSx,nSy)
INTEGER OB_Ie(1-Oly:sNy+Oly,nSx,nSy)
INTEGER OB_Iw(1-Oly:sNy+Oly,nSx,nSy)
COMMON /OB_FILES/
& OBNetaFile,OBSetaFile,OBEetaFile,OBWetaFile,
& OBNwFile, OBSwFile, OBEwFile, OBWwFile,
& OBNuFile,OBNvFile,OBNtFile,OBNsFile,OBNaFile,OBNhFile,
& OBSuFile,OBSvFile,OBStFile,OBSsFile,OBSaFile,OBShFile,
& OBEuFile,OBEvFile,OBEtFile,OBEsFile,OBEaFile,OBEhFile,
& OBWuFile,OBWvFile,OBWtFile,OBWsFile,OBWaFile,OBWhFile,
& OBNslFile,OBSslFile,OBEslFile,OBWslFile,
& OBNsnFile,OBSsnFile,OBEsnFile,OBWsnFile,
& OBNuiceFile,OBSuiceFile,OBEuiceFile,OBWuiceFile,
& OBNviceFile,OBSviceFile,OBEviceFile,OBWviceFile
CHARACTER*(MAX_LEN_FNAM)
& OBNetaFile,OBSetaFile,OBEetaFile,OBWetaFile,
& OBNwFile, OBSwFile, OBEwFile, OBWwFile,
& OBNuFile,OBNvFile,OBNtFile,OBNsFile,OBNaFile,OBNhFile,
& OBSuFile,OBSvFile,OBStFile,OBSsFile,OBSaFile,OBShFile,
& OBEuFile,OBEvFile,OBEtFile,OBEsFile,OBEaFile,OBEhFile,
& OBWuFile,OBWvFile,OBWtFile,OBWsFile,OBWaFile,OBWhFile,
& OBNslFile,OBSslFile,OBEslFile,OBWslFile,
& OBNsnFile,OBSsnFile,OBEsnFile,OBWsnFile,
& OBNuiceFile,OBSuiceFile,OBEuiceFile,OBWuiceFile,
& OBNviceFile,OBSviceFile,OBEviceFile,OBWviceFile
C-- COMMON /GRID_OB/ Open boudary related stuff
C OBNu is the U value imposed at the Northern OB
C OBNv is the V value imposed at the Northern OB
C OBNt is the T value imposed at the Northern OB
C OBNs is the S value imposed at the Northern OB
C OBNa is the ice AREA value imposed at the Northern OB
C OBNh is the ice HEFF value imposed at the Northern OB
C OBNsl is the ice HSALT value imposed at the Northern OB
C OBNsn is the ice HSNOW value imposed at the Northern OB
C OBNuice is the uice value imposed at the Northern OB
C OBNvice is the vice value imposed at the Northern OB
C etc
#ifdef ALLOW_OBCS_NORTH
COMMON /GRID_N_OB/
& OBNu,OBNv,OBNt,OBNs
_RL OBNu (1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBNv (1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBNt (1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBNs (1-Olx:sNx+Olx,Nr,nSx,nSy)
#ifdef ALLOW_OBCS_PRESCRIBE
COMMON /GRID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nSx,nSy)
_RL OBWuice (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWvice (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWuice0 (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWvice0 (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWuice1 (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWvice1 (1-Oly:sNy+Oly,nSx,nSy)
#endif /* ALLOW_SEAICE */
#endif /* ALLOW_OBCS_WEST */
#ifdef ALLOW_NONHYDROSTATIC
COMMON /GRID_OBNH/
& OBNw, OBSw, OBEw, OBWw
_RL OBNw (1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBSw (1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBEw (1-Oly:sNy+Oly,Nr,nSx,nSy)
_RL OBWw (1-Oly:sNy+Oly,Nr,nSx,nSy)
#ifdef ALLOW_OBCS_PRESCRIBE
COMMON /GRID_OBNH_AUX/
& OBNw0, OBSw0, OBEw0, OBWw0,
& OBNw1, OBSw1, OBEw1, OBWw1
_RL OBNw0(1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBSw0(1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBEw0(1-Oly:sNy+Oly,Nr,nSx,nSy)
_RL OBWw0(1-Oly:sNy+Oly,Nr,nSx,nSy)
_RL OBNw1(1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBSw1(1-Olx:sNx+Olx,Nr,nSx,nSy)
_RL OBEw1(1-Oly:sNy+Oly,Nr,nSx,nSy)
_RL OBWw1(1-Oly:sNy+Oly,Nr,nSx,nSy)
#endif /* ALLOW_OBCS_PRESCRIBE */
#endif /* ALLOW_NONHYDROSTATIC */
#ifdef NONLIN_FRSURF
COMMON /GRID_OB_NLFS/
& OBNhfac0,OBShfac0,OBEhfac0,OBWhfac0
_RS OBNhfac0(1-Olx:sNx+Olx,nSx,nSy)
_RS OBShfac0(1-Olx:sNx+Olx,nSx,nSy)
_RS OBEhfac0(1-Oly:sNy+Oly,nSx,nSy)
_RS OBWhfac0(1-Oly:sNy+Oly,nSx,nSy)
COMMON /OB_NLFS/
& OBNeta, OBSeta, OBEeta, OBWeta
_RL OBNeta (1-Olx:sNx+Olx,nSx,nSy)
_RL OBSeta (1-Olx:sNx+Olx,nSx,nSy)
_RL OBEeta (1-Oly:sNy+Oly,nSx,nSy)
_RL OBWeta (1-Oly:sNy+Oly,nSx,nSy)
#ifdef ALLOW_OBCS_PRESCRIBE
COMMON /OB_NLFS_AUX/
& OBNeta0,OBSeta0,OBEeta0,OBWeta0,
& OBNeta1,OBSeta1,OBEeta1,OBWeta1
_RL OBNeta0(1-Olx:sNx+Olx,nSx,nSy)
_RL OBSeta0(1-Olx:sNx+Olx,nSx,nSy)
_RL OBEeta0(1-Oly:sNy+Oly,nSx,nSy)
_RL OBWeta0(1-Oly:sNy+Oly,nSx,nSy)
_RL OBNeta1(1-Olx:sNx+Olx,nSx,nSy)
_RL OBSeta1(1-Olx:sNx+Olx,nSx,nSy)
_RL OBEeta1(1-Oly:sNy+Oly,nSx,nSy)
_RL OBWeta1(1-Oly:sNy+Oly,nSx,nSy)
#endif /* ALLOW_OBCS_PRESCRIBE */
#endif /* NONLIN_FRSURF */
COMMON /GG_VOLFLUX/ shiftvel
_RL shiftvel(2)
#endif /* ALLOW_OBCS */