MODULE obc_oce !!============================================================================== !! *** MODULE obc_oce *** !! Open Boundary Cond. : define related variables !!============================================================================== !!---------------------------------------------------------------------- !! 'key_obc' : Open Boundary Condition !!---------------------------------------------------------------------- !! history : !! 8.0 01/91 (CLIPPER) Original code !! 8.5 06/02 (C. Talandier) modules !! 06/04 (F. Durand) ORCA2_ZIND config !! !!---------------------------------------------------------------------- !! * Modules used USE par_oce ! ocean parameters USE obc_par ! open boundary condition parameters #if defined key_obc IMPLICIT NONE PUBLIC !!---------------------------------------------------------------------- !! open boundary variables !!---------------------------------------------------------------------- ! ! !!* Namelist namobc: open boundary condition * INTEGER :: nn_obcdta = 0 !: = 0 use the initial state as obc data ! ! = 1 read obc data in obcxxx.dta files CHARACTER(len=20) :: cn_obcdta = 'annual' !: set to annual if obc datafile hold 1 year of data ! ! set to monthly if obc datafile hold 1 month of data LOGICAL :: ln_obc_clim = .true. !: obc data files are climatological LOGICAL :: ln_obc_fla = .false. !: Flather open boundary condition not used LOGICAL :: ln_vol_cst = .true. !: Conservation of the whole volume REAL(wp) :: rn_dpein = 1. !: damping time scale for inflow at East open boundary REAL(wp) :: rn_dpwin = 1. !: " " at West open boundary REAL(wp) :: rn_dpsin = 1. !: " " at South open boundary REAL(wp) :: rn_dpnin = 1. !: " " at North open boundary REAL(wp) :: rn_dpeob = 15. !: damping time scale for the climatology at East open boundary REAL(wp) :: rn_dpwob = 15. !: " " at West open boundary REAL(wp) :: rn_dpsob = 15. !: " " at South open boundary REAL(wp) :: rn_dpnob = 15. !: " " at North open boundary REAL(wp) :: rn_volemp = 1. !: = 0 the total volume will have the variability of the ! ! surface Flux E-P else (volemp = 1) the volume will be constant ! ! = 1 the volume will be constant during all the integration. ! !!! OLD non-DOCTOR name of namelist variables INTEGER :: nbobc !: number of open boundaries ( 1=< nbobc =< 4 ) INTEGER :: nobc_dta !: = 0 use the initial state as obc data REAL(wp) :: rdpein !: damping time scale for inflow at East open boundary REAL(wp) :: rdpwin !: " " at West open boundary REAL(wp) :: rdpsin !: " " at South open boundary REAL(wp) :: rdpnin !: " " at North open boundary REAL(wp) :: rdpeob !: damping time scale for the climatology at East open boundary REAL(wp) :: rdpwob !: " " at West open boundary REAL(wp) :: rdpsob !: " " at South open boundary REAL(wp) :: rdpnob !: " " at North open boundary REAL(wp) :: volemp !: = 0 the total volume will have the variability of the CHARACTER(len=20) :: cffile !!General variables for open boundaries: !!-------------------------------------- LOGICAL :: & !: lfbceast, lfbcwest, & !: logical flag for a fixed East and West open boundaries lfbcnorth, lfbcsouth !: logical flag for a fixed North and South open boundaries ! ! These logical flags are set to 'true' if damping time ! ! scale are set to 0 in the namelist, for both inflow and outflow). REAL(wp), PUBLIC :: obcsurftot !: Total lateral surface of open boundaries REAL(wp), PUBLIC, DIMENSION(jpi,jpj) :: & !: obctmsk, & !: mask array identical to tmask, execpt along OBC where it is set to 0 ! ! it used to calculate the cumulate flux E-P in the obcvol.F90 routine obcumask, obcvmask !: u-, v- Force filtering mask for the open ! ! boundary condition on grad D !!-------------------- !! East open boundary: !!-------------------- INTEGER :: nie0 , nie1 !: do loop index in mpp case for jpieob INTEGER :: nie0p1, nie1p1 !: do loop index in mpp case for jpieob+1 INTEGER :: nie0m1, nie1m1 !: do loop index in mpp case for jpieob-1 INTEGER :: nje0 , nje1 !: do loop index in mpp case for jpjed, jpjef INTEGER :: nje0p1, nje1m1 !: do loop index in mpp case for jpjedp1,jpjefm1 INTEGER :: nje1m2, nje0m1 !: do loop index in mpp case for jpjefm1-1,jpjed REAL(wp), DIMENSION(jpjed:jpjef) :: & !: sshfoe, & !: now climatology of the east boundary sea surface height ubtfoe,vbtfoe !: now climatology of the east boundary barotropic transport REAL(wp), DIMENSION(jpj,jpk) :: & !: ufoe, vfoe, & !: now climatology of the east boundary velocities tfoe, sfoe, & !: now climatology of the east boundary temperature and salinity uclie !: baroclinic componant of the zonal velocity after radiation ! ! in the obcdyn.F90 routine REAL(wp), DIMENSION(jpjed:jpjef,jpj) :: sshfoe_b !: east boundary ssh correction averaged over the barotropic loop ! ! (if Flather's algoritm applied at open boundary) !!------------------------------- !! Arrays for radiative East OBC: !!------------------------------- REAL(wp), DIMENSION(jpj,jpk,3,3) :: uebnd, vebnd !: baroclinic u & v component of the velocity over 3 rows ! ! and 3 time step (now, before, and before before) REAL(wp), DIMENSION(jpj,jpk,2,2) :: tebnd, sebnd !: East boundary temperature and salinity over 2 rows ! ! and 2 time step (now and before) REAL(wp), DIMENSION(jpj,jpk) :: u_cxebnd, v_cxebnd !: Zonal component of the phase speed ratio computed with ! ! radiation of u and v velocity (respectively) at the ! ! east open boundary (u_cxebnd = cx rdt ) REAL(wp), DIMENSION(jpj,jpk) :: uemsk, vemsk, temsk !: 2D mask for the East OB ! Note that those arrays are optimized for mpp case ! (hence the dimension jpj is the size of one processor subdomain) !!-------------------- !! West open boundary !!-------------------- INTEGER :: niw0 , niw1 !: do loop index in mpp case for jpiwob INTEGER :: niw0p1, niw1p1 !: do loop index in mpp case for jpiwob+1 INTEGER :: njw0 , njw1 !: do loop index in mpp case for jpjwd, jpjwf INTEGER :: njw0p1, njw1m1 !: do loop index in mpp case for jpjwdp1,jpjwfm1 INTEGER :: njw1m2, njw0m1 !: do loop index in mpp case for jpjwfm2,jpjwd REAL(wp), DIMENSION(jpjwd:jpjwf) :: & !: sshfow, & !: now climatology of the west boundary sea surface height ubtfow,vbtfow !: now climatology of the west boundary barotropic transport REAL(wp), DIMENSION(jpj,jpk) :: & !: ufow, vfow, & !: now climatology of the west velocities tfow, sfow, & !: now climatology of the west temperature and salinity ucliw !: baroclinic componant of the zonal velocity after the radiation ! ! in the obcdyn.F90 routine REAL(wp), DIMENSION(jpjwd:jpjwf,jpj) :: sshfow_b !: west boundary ssh correction averaged over the barotropic loop ! ! (if Flather's algoritm applied at open boundary) !!------------------------------- !! Arrays for radiative West OBC !!------------------------------- REAL(wp), DIMENSION(jpj,jpk,3,3) :: uwbnd, vwbnd !: baroclinic u & v components of the velocity over 3 rows ! ! and 3 time step (now, before, and before before) REAL(wp), DIMENSION(jpj,jpk,2,2) :: twbnd, swbnd !: west boundary temperature and salinity over 2 rows and ! ! 2 time step (now and before) REAL(wp), DIMENSION(jpj,jpk) :: u_cxwbnd, v_cxwbnd !: Zonal component of the phase speed ratio computed with ! ! radiation of zonal and meridional velocity (respectively) ! ! at the west open boundary (u_cxwbnd = cx rdt ) REAL(wp), DIMENSION(jpj,jpk) :: uwmsk, vwmsk, twmsk !: 2D mask for the West OB ! Note that those arrays are optimized for mpp case ! (hence the dimension jpj is the size of one processor subdomain) !!--------------------- !! North open boundary !!--------------------- INTEGER :: nin0 , nin1 !: do loop index in mpp case for jpind, jpinf INTEGER :: nin0p1, nin1m1 !: do loop index in mpp case for jpindp1, jpinfm1 INTEGER :: nin1m2, nin0m1 !: do loop index in mpp case for jpinfm1-1,jpind INTEGER :: njn0 , njn1 !: do loop index in mpp case for jpnob INTEGER :: njn0p1, njn1p1 !: do loop index in mpp case for jpnob+1 INTEGER :: njn0m1, njn1m1 !: do loop index in mpp case for jpnob-1 REAL(wp), DIMENSION(jpind:jpinf) :: & !: sshfon, & !: now climatology of the north boundary sea surface height ubtfon,vbtfon !: now climatology of the north boundary barotropic transport REAL(wp), DIMENSION(jpi,jpk) :: & !: ufon, vfon, & !: now climatology of the north boundary velocities tfon, sfon, & !: now climatology of the north boundary temperature and salinity vclin !: baroclinic componant of the meridian velocity after the radiation ! ! in yhe obcdyn.F90 routine REAL(wp), DIMENSION(jpind:jpinf,jpj) :: sshfon_b !: north boundary ssh correction averaged over the barotropic loop ! ! (if Flather's algoritm applied at open boundary) !!-------------------------------- !! Arrays for radiative North OBC !!-------------------------------- REAL(wp), DIMENSION(jpi,jpk,3,3) :: unbnd, vnbnd !: baroclinic u & v components of the velocity over 3 ! ! rows and 3 time step (now, before, and before before) REAL(wp), DIMENSION(jpi,jpk,2,2) :: tnbnd, snbnd !: north boundary temperature and salinity over ! ! 2 rows and 2 time step (now and before) REAL(wp), DIMENSION(jpi,jpk) :: u_cynbnd, v_cynbnd !: Meridional component of the phase speed ratio compu- ! ! ted with radiation of zonal and meridional velocity ! ! (respectively) at the north OB (u_cynbnd = cx rdt ) REAL(wp), DIMENSION(jpi,jpk) :: unmsk, vnmsk, tnmsk !: 2D mask for the North OB ! Note that those arrays are optimized for mpp case ! (hence the dimension jpj is the size of one processor subdomain) !!--------------------- !! South open boundary !!--------------------- INTEGER :: nis0 , nis1 !: do loop index in mpp case for jpisd, jpisf INTEGER :: nis0p1, nis1m1 !: do loop index in mpp case for jpisdp1, jpisfm1 INTEGER :: nis1m2, nis0m1 !: do loop index in mpp case for jpisfm1-1,jpisd INTEGER :: njs0 , njs1 !: do loop index in mpp case for jpsob INTEGER :: njs0p1, njs1p1 !: do loop index in mpp case for jpsob+1 REAL(wp), DIMENSION(jpisd:jpisf) :: & !: sshfos, & !: now climatology of the south boundary sea surface height ubtfos,vbtfos !: now climatology of the south boundary barotropic transport REAL(wp), DIMENSION(jpi,jpk) :: & !: ufos, vfos, & !: now climatology of the south boundary velocities tfos, sfos, & !: now climatology of the south boundary temperature and salinity vclis !: baroclinic componant of the meridian velocity after the radiation ! ! in the obcdyn.F90 routine REAL(wp), DIMENSION(jpisd:jpisf,jpj) :: sshfos_b !: south boundary ssh correction averaged over the barotropic loop ! ! (if Flather's algoritm applied at open boundary) !!-------------------------------- !! Arrays for radiative South OBC (computed by the forward time step in dynspg) !!-------------------------------- REAL(wp), DIMENSION(jpi,jpk,3,3) :: usbnd, vsbnd !: baroclinic u & v components of the velocity over 3 ! ! rows and 3 time step (now, before, and before before) REAL(wp), DIMENSION(jpi,jpk,2,2) :: tsbnd, ssbnd !: south boundary temperature and salinity over ! ! 2 rows and 2 time step (now and before) REAL(wp), DIMENSION(jpi,jpk) :: u_cysbnd, v_cysbnd !: Meridional component of the phase speed ratio ! ! computed with radiation of zonal and meridional velocity ! ! (repsectively) at the south OB (u_cynbnd = cx rdt ) REAL(wp), DIMENSION(jpi,jpk) :: usmsk, vsmsk, tsmsk !: 2D mask for the South OB #else !!---------------------------------------------------------------------- !! Default option : Empty module !!---------------------------------------------------------------------- #endif !!---------------------------------------------------------------------- !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009) !! $Id$ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!====================================================================== END MODULE obc_oce