Commit 256b1d36 authored by HOURDIN Christophe's avatar HOURDIN Christophe
Browse files

general cleaning after forced nemo to croco/pisces adaptation

parent fdb107ef
2017 : Version nemo 3.4 + xios
11/11/2020 : Version croco + agrif + pisces
MODULE asmbkg
!!======================================================================
!! *** MODULE asmtrj -> asmbkg ***
!! Assimilation trajectory interface: Write to file the background state and the model state trajectory
!!======================================================================
!! History : ! 2007-03 (M. Martin) Met. Office version
!! ! 2007-04 (A. Weaver) asm_trj_wri, original code
!! ! 2007-03 (K. Mogensen) Adapt to NEMOVAR and use IOM instead of IOIPSL
!! ! 2007-04 (A. Weaver) Name change (formally asmbkg.F90). Distinguish
!! background states in Jb term and at analysis time.
!! Include state trajectory routine (currently empty)
!! ! 2007-07 (A. Weaver) Add tke_rst and flt_rst for case nitbkg=0
!! ! 2009-03 (F. Vigilant) Add hmlp (zdfmxl) for no tracer nmldp=2
!! ! 2009-06 (F. Vigilant) asm_trj_wri: special case when kt=nit000-1
!! ! 2009-07 (F. Vigilant) asm_trj_wri: add computation of eiv at restart
!! ! 2010-01 (A. Vidard) split asm_trj_wri into tam_trj_wri and asm_bkg_wri
!!----------------------------------------------------------------------
!!----------------------------------------------------------------------
!! 'key_asminc' : Switch on the assimilation increment interface
!!----------------------------------------------------------------------
!! asm_bkg_wri : Write out the background state
!! asm_trj_wri : Write out the model state trajectory (used with 4D-Var)
!!----------------------------------------------------------------------
USE oce ! Dynamics and active tracers defined in memory
USE sbc_oce ! Ocean surface boundary conditions
USE zdf_oce ! Vertical mixing variables
USE zdfddm ! Double diffusion mixing parameterization
USE ldftra_oce ! Lateral tracer mixing coefficient defined in memory
USE ldfslp ! Slopes of neutral surfaces
USE tradmp ! Tracer damping
#if defined key_zdftke
USE zdftke ! TKE vertical physics
#endif
USE eosbn2 ! Equation of state (eos_bn2 routine)
USE zdfmxl ! Mixed layer depth
USE dom_oce, ONLY : ndastp
USE sol_oce, ONLY : gcx ! Solver variables defined in memory
USE in_out_manager ! I/O manager
USE iom ! I/O module
USE asmpar ! Parameters for the assmilation interface
USE zdfmxl ! mixed layer depth
#if defined key_traldf_c2d
USE ldfeiv ! eddy induced velocity coef. (ldf_eiv routine)
#endif
#if defined key_lim2
USE ice_2
#endif
#if defined key_lim3
USE ice
#endif
IMPLICIT NONE
PRIVATE
PUBLIC asm_bkg_wri !: Write out the background state
!!----------------------------------------------------------------------
!! NEMO/OPA 3.3 , NEMO Consortium (2010)
!! $Id: $
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE asm_bkg_wri( kt )
!!-----------------------------------------------------------------------
!! *** ROUTINE asm_bkg_wri ***
!!
!! ** Purpose : Write to file the background state for later use in the
!! inner loop of data assimilation or for direct initialization
!! in the outer loop.
!!
!! ** Method : Write out the background state for use in the Jb term
!! in the cost function and for use with direct initialization
!! at analysis time.
!!-----------------------------------------------------------------------
INTEGER, INTENT( IN ) :: kt ! Current time-step
!
CHARACTER (LEN=50) :: cl_asmbkg
CHARACTER (LEN=50) :: cl_asmdin
LOGICAL :: llok ! Check if file exists
INTEGER :: inum ! File unit number
REAL(wp) :: zdate ! Date
!!-----------------------------------------------------------------------
! !-------------------------------------------
IF( kt == nitbkg_r ) THEN ! Write out background at time step nitbkg_r
! !-----------------------------------========
!
WRITE(cl_asmbkg, FMT='(A,".nc")' ) TRIM( c_asmbkg )
cl_asmbkg = TRIM( cl_asmbkg )
INQUIRE( FILE = cl_asmbkg, EXIST = llok )
!
IF( .NOT. llok ) THEN
IF(lwp) WRITE(numout,*) ' Setting up assimilation background file '// TRIM( c_asmbkg )
!
! ! Define the output file
CALL iom_open( c_asmbkg, inum, ldwrt = .TRUE., kiolib = jprstlib)
!
IF( nitbkg_r == nit000 - 1 ) THEN ! Treat special case when nitbkg = 0
zdate = REAL( ndastp )
#if defined key_zdftke
! lk_zdftke=T : Read turbulent kinetic energy ( en )
IF(lwp) WRITE(numout,*) ' Reading TKE (en) from restart...'
CALL tke_rst( nit000, 'READ' ) ! lk_zdftke=T : Read turbulent kinetic energy ( en )
#endif
ELSE
zdate = REAL( ndastp )
ENDIF
!
! ! Write the information
CALL iom_rstput( kt, nitbkg_r, inum, 'rdastp' , zdate )
CALL iom_rstput( kt, nitbkg_r, inum, 'un' , un )
CALL iom_rstput( kt, nitbkg_r, inum, 'vn' , vn )
CALL iom_rstput( kt, nitbkg_r, inum, 'tn' , tsn(:,:,:,jp_tem) )
CALL iom_rstput( kt, nitbkg_r, inum, 'sn' , tsn(:,:,:,jp_sal) )
CALL iom_rstput( kt, nitbkg_r, inum, 'sshn' , sshn )
#if defined key_zdftke
CALL iom_rstput( kt, nitbkg_r, inum, 'en' , en )
#endif
CALL iom_rstput( kt, nitbkg_r, inum, 'gcx' , gcx )
!
CALL iom_close( inum )
ENDIF
!
ENDIF
! !-------------------------------------------
IF( kt == nitdin_r ) THEN ! Write out background at time step nitdin_r
! !-----------------------------------========
!
WRITE(cl_asmdin, FMT='(A,".nc")' ) TRIM( c_asmdin )
cl_asmdin = TRIM( cl_asmdin )
INQUIRE( FILE = cl_asmdin, EXIST = llok )
!
IF( .NOT. llok ) THEN
IF(lwp) WRITE(numout,*) ' Setting up assimilation background file '// TRIM( c_asmdin )
!
! ! Define the output file
CALL iom_open( c_asmdin, inum, ldwrt = .TRUE., kiolib = jprstlib)
!
IF( nitdin_r == nit000 - 1 ) THEN ! Treat special case when nitbkg = 0
zdate = REAL( ndastp )
ELSE
zdate = REAL( ndastp )
ENDIF
!
! ! Write the information
CALL iom_rstput( kt, nitdin_r, inum, 'rdastp' , zdate )
CALL iom_rstput( kt, nitdin_r, inum, 'un' , un )
CALL iom_rstput( kt, nitdin_r, inum, 'vn' , vn )
CALL iom_rstput( kt, nitdin_r, inum, 'tn' , tsn(:,:,:,jp_tem) )
CALL iom_rstput( kt, nitdin_r, inum, 'sn' , tsn(:,:,:,jp_sal) )
CALL iom_rstput( kt, nitdin_r, inum, 'sshn' , sshn )
#if defined key_lim2 || defined key_lim3
IF(( nn_ice == 2 ) .OR. ( nn_ice == 3 )) THEN
CALL iom_rstput( kt, nitdin_r, inum, 'iceconc', 1.0 - frld(:,:) )
ENDIF
#endif
!
CALL iom_close( inum )
ENDIF
!
ENDIF
!
END SUBROUTINE asm_bkg_wri
!!======================================================================
END MODULE asmbkg
This diff is collapsed.
MODULE bdy_oce
!!======================================================================
!! *** MODULE bdy_oce ***
!! Unstructured Open Boundary Cond. : define related variables
!!======================================================================
!! History : 1.0 ! 2001-05 (J. Chanut, A. Sellar) Original code
!! 3.0 ! 2008-04 (NEMO team) add in the reference version
!! 3.3 ! 2010-09 (D. Storkey) add ice boundary conditions
!! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge
!! - ! 2012-01 (C. Rousset) add ice boundary conditions for lim3
!!----------------------------------------------------------------------
#if defined key_bdy
!!----------------------------------------------------------------------
!! 'key_bdy' Unstructured Open Boundary Condition
!!----------------------------------------------------------------------
USE par_oce ! ocean parameters
USE bdy_par ! Unstructured boundary parameters
USE lib_mpp ! distributed memory computing
IMPLICIT NONE
PUBLIC
TYPE, PUBLIC :: OBC_INDEX !: Indices and weights which define the open boundary
INTEGER, DIMENSION(jpbgrd) :: nblen
INTEGER, DIMENSION(jpbgrd) :: nblenrim
INTEGER, POINTER, DIMENSION(:,:) :: nbi
INTEGER, POINTER, DIMENSION(:,:) :: nbj
INTEGER, POINTER, DIMENSION(:,:) :: nbr
INTEGER, POINTER, DIMENSION(:,:) :: nbmap
REAL , POINTER, DIMENSION(:,:) :: nbw
REAL , POINTER, DIMENSION(:,:) :: nbd
REAL , POINTER, DIMENSION(:) :: flagu
REAL , POINTER, DIMENSION(:) :: flagv
END TYPE OBC_INDEX
TYPE, PUBLIC :: OBC_DATA !: Storage for external data
REAL, POINTER, DIMENSION(:) :: ssh
REAL, POINTER, DIMENSION(:) :: u2d
REAL, POINTER, DIMENSION(:) :: v2d
REAL, POINTER, DIMENSION(:,:) :: u3d
REAL, POINTER, DIMENSION(:,:) :: v3d
REAL, POINTER, DIMENSION(:,:) :: tem
REAL, POINTER, DIMENSION(:,:) :: sal
#if defined key_lim2
REAL, POINTER, DIMENSION(:) :: frld
REAL, POINTER, DIMENSION(:) :: hicif
REAL, POINTER, DIMENSION(:) :: hsnif
#elif defined key_lim3
REAL, POINTER, DIMENSION(:,:) :: a_i !: now ice leads fraction climatology
REAL, POINTER, DIMENSION(:,:) :: ht_i !: Now ice thickness climatology
REAL, POINTER, DIMENSION(:,:) :: ht_s !: now snow thickness
#endif
END TYPE OBC_DATA
!!----------------------------------------------------------------------
!! Namelist variables
!!----------------------------------------------------------------------
CHARACTER(len=80), DIMENSION(jp_bdy) :: cn_coords_file !: Name of bdy coordinates file
CHARACTER(len=80) :: cn_mask_file !: Name of bdy mask file
!
LOGICAL, DIMENSION(jp_bdy) :: ln_coords_file !: =T read bdy coordinates from file;
! !: =F read bdy coordinates from namelist
LOGICAL :: ln_mask_file !: =T read bdymask from file
LOGICAL :: ln_vol !: =T volume correction
!
INTEGER :: nb_bdy !: number of open boundary sets
INTEGER, DIMENSION(jp_bdy) :: nn_rimwidth !: boundary rim width for Flow Relaxation Scheme
INTEGER :: nn_volctl !: = 0 the total volume will have the variability of the surface Flux E-P
! ! = 1 the volume will be constant during all the integration.
INTEGER, DIMENSION(jp_bdy) :: nn_dyn2d ! Choice of boundary condition for barotropic variables (U,V,SSH)
INTEGER, DIMENSION(jp_bdy) :: nn_dyn2d_dta !: = 0 use the initial state as bdy dta ;
!: = 1 read it in a NetCDF file
!: = 2 read tidal harmonic forcing from a NetCDF file
!: = 3 read external data AND tidal harmonic forcing from NetCDF files
INTEGER, DIMENSION(jp_bdy) :: nn_dyn3d ! Choice of boundary condition for baroclinic velocities
INTEGER, DIMENSION(jp_bdy) :: nn_dyn3d_dta !: = 0 use the initial state as bdy dta ;
!: = 1 read it in a NetCDF file
INTEGER, DIMENSION(jp_bdy) :: nn_tra ! Choice of boundary condition for active tracers (T and S)
INTEGER, DIMENSION(jp_bdy) :: nn_tra_dta !: = 0 use the initial state as bdy dta ;
!: = 1 read it in a NetCDF file
LOGICAL, DIMENSION(jp_bdy) :: ln_tra_dmp !: =T Tracer damping
LOGICAL, DIMENSION(jp_bdy) :: ln_dyn3d_dmp !: =T Baroclinic velocity damping
REAL, DIMENSION(jp_bdy) :: rn_time_dmp !: Damping time scale in days
#if ( defined key_lim2 || defined key_lim3 )
INTEGER, DIMENSION(jp_bdy) :: nn_ice_lim ! Choice of boundary condition for sea ice variables
INTEGER, DIMENSION(jp_bdy) :: nn_ice_lim_dta !: = 0 use the initial state as bdy dta ;
!: = 1 read it in a NetCDF file
#endif
!
!!----------------------------------------------------------------------
!! Global variables
!!----------------------------------------------------------------------
REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: bdytmask !: Mask defining computational domain at T-points
REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: bdyumask !: Mask defining computational domain at U-points
REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: bdyvmask !: Mask defining computational domain at V-points
REAL(wp) :: bdysurftot !: Lateral surface of unstructured open boundary
REAL(wp), POINTER, DIMENSION(:,:) :: pssh !:
REAL(wp), POINTER, DIMENSION(:,:) :: phur !:
REAL(wp), POINTER, DIMENSION(:,:) :: phvr !: Pointers for barotropic fields
REAL(wp), POINTER, DIMENSION(:,:) :: pu2d !:
REAL(wp), POINTER, DIMENSION(:,:) :: pv2d !:
!!----------------------------------------------------------------------
!! open boundary data variables
!!----------------------------------------------------------------------
INTEGER, DIMENSION(jp_bdy) :: nn_dta !: =0 => *all* data is set to initial conditions
!: =1 => some data to be read in from data files
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET :: dta_global !: workspace for reading in global data arrays (unstr. bdy)
REAL(wp), ALLOCATABLE, DIMENSION(:,:,:), TARGET :: dta_global2 !: workspace for reading in global data arrays (struct. bdy)
TYPE(OBC_INDEX), DIMENSION(jp_bdy), TARGET :: idx_bdy !: bdy indices (local process)
TYPE(OBC_DATA) , DIMENSION(jp_bdy) :: dta_bdy !: bdy external data (local process)
!!----------------------------------------------------------------------
!! NEMO/OPA 4.0 , NEMO Consortium (2011)
!! $Id: bdy_oce.F90 3651 2012-11-26 10:46:39Z cbricaud $
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!----------------------------------------------------------------------
CONTAINS
FUNCTION bdy_oce_alloc()
!!----------------------------------------------------------------------
USE lib_mpp, ONLY: ctl_warn, mpp_sum
!
INTEGER :: bdy_oce_alloc
!!----------------------------------------------------------------------
!
ALLOCATE( bdytmask(jpi,jpj) , bdyumask(jpi,jpj), bdyvmask(jpi,jpj), &
& STAT=bdy_oce_alloc )
!
IF( lk_mpp ) CALL mpp_sum ( bdy_oce_alloc )
IF( bdy_oce_alloc /= 0 ) CALL ctl_warn('bdy_oce_alloc: failed to allocate arrays.')
!
END FUNCTION bdy_oce_alloc
#else
!!----------------------------------------------------------------------
!! Dummy module NO Unstructured Open Boundary Condition
!!----------------------------------------------------------------------
LOGICAL :: ln_tides = .false. !: =T apply tidal harmonic forcing along open boundaries
#endif
!!======================================================================
END MODULE bdy_oce
MODULE bdy_par
!!======================================================================
!! *** MODULE bdy_par ***
!! Unstructured Open Boundary Cond. : define related parameters
!!======================================================================
!! History : 1.0 ! 2005-01 (J. Chanut, A. Sellar) Original code
!! 3.0 ! 2008-04 (NEMO team) add in the reference version
!! 3.3 ! 2010-09 (D. Storkey and E. O'Dea) update for Shelf configurations
!! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge
!!----------------------------------------------------------------------
#if defined key_bdy
!!----------------------------------------------------------------------
!! 'key_bdy' : Unstructured Open Boundary Condition
!!----------------------------------------------------------------------
IMPLICIT NONE
PUBLIC
# if ! defined key_agrif
LOGICAL, PUBLIC, PARAMETER :: lk_bdy = .TRUE. !: Unstructured Ocean Boundary Condition flag
# else
LOGICAL, PUBLIC :: lk_bdy = .TRUE. !: Unstructured Ocean Boundary Condition flag
# endif
INTEGER, PUBLIC, PARAMETER :: jp_bdy = 10 !: Maximum number of bdy sets
INTEGER, PUBLIC, PARAMETER :: jpbtime = 1000 !: Max number of time dumps per file
INTEGER, PUBLIC, PARAMETER :: jpbgrd = 3 !: Number of horizontal grid types used (T, U, V)
!! Flags for choice of schemes
INTEGER, PUBLIC, PARAMETER :: jp_none = 0 !: Flag for no open boundary condition
INTEGER, PUBLIC, PARAMETER :: jp_frs = 1 !: Flag for Flow Relaxation Scheme
INTEGER, PUBLIC, PARAMETER :: jp_flather = 2 !: Flag for Flather
#else
!!----------------------------------------------------------------------
!! Default option : NO Unstructured open boundary condition
!!----------------------------------------------------------------------
# if ! defined key_agrif
LOGICAL, PUBLIC, PARAMETER :: lk_bdy = .FALSE. !: Unstructured Ocean Boundary Condition flag
# else
LOGICAL, PUBLIC :: lk_bdy = .FALSE. !: Unstructured Ocean Boundary Condition flag
# endif
#endif
!!----------------------------------------------------------------------
!! NEMO/OPA 3.3 , NEMO Consortium (2010)
!! $Id: bdy_par.F90 3294 2012-01-28 16:44:18Z rblod $
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!======================================================================
END MODULE bdy_par
This diff is collapsed.
MODULE bdydyn
!!======================================================================
!! *** MODULE bdydyn ***
!! Unstructured Open Boundary Cond. : Apply boundary conditions to velocities
!!======================================================================
!! History : 1.0 ! 2005-02 (J. Chanut, A. Sellar) Original code
!! - ! 2007-07 (D. Storkey) Move Flather implementation to separate routine.
!! 3.0 ! 2008-04 (NEMO team) add in the reference version
!! 3.2 ! 2008-04 (R. Benshila) consider velocity instead of transport
!! 3.3 ! 2010-09 (E.O'Dea) modifications for Shelf configurations
!! 3.3 ! 2010-09 (D.Storkey) add ice boundary conditions
!! 3.4 ! 2011 (D. Storkey) rewrite in preparation for OBC-BDY merge
!!----------------------------------------------------------------------
#if defined key_bdy
!!----------------------------------------------------------------------
!! 'key_bdy' : Unstructured Open Boundary Condition
!!----------------------------------------------------------------------
!! bdy_dyn : split velocities into barotropic and baroclinic parts
!! and call bdy_dyn2d and bdy_dyn3d to apply boundary
!! conditions
!!----------------------------------------------------------------------
USE wrk_nemo ! Memory Allocation
USE timing ! Timing
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE dynspg_oce
USE bdy_oce ! ocean open boundary conditions
USE bdydyn2d ! open boundary conditions for barotropic solution
USE bdydyn3d ! open boundary conditions for baroclinic velocities
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE in_out_manager !
USE domvvl ! variable volume
IMPLICIT NONE
PRIVATE
PUBLIC bdy_dyn ! routine called in dynspg_flt (if lk_dynspg_flt) or
! dyn_nxt (if lk_dynspg_ts or lk_dynspg_exp)
# include "domzgr_substitute.h90"
!!----------------------------------------------------------------------
!! NEMO/OPA 3.3 , NEMO Consortium (2010)
!! $Id: bdydyn.F90 3970 2013-07-11 13:59:14Z cbricaud $
!! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE bdy_dyn( kt, dyn3d_only )
!!----------------------------------------------------------------------
!! *** SUBROUTINE bdy_dyn ***
!!
!! ** Purpose : - Wrapper routine for bdy_dyn2d and bdy_dyn3d.
!!
!!----------------------------------------------------------------------
!!
INTEGER, INTENT( in ) :: kt ! Main time step counter
LOGICAL, INTENT( in ), OPTIONAL :: dyn3d_only ! T => only update baroclinic velocities
!!
INTEGER :: jk,ii,ij,ib,igrd ! Loop counter
LOGICAL :: ll_dyn2d, ll_dyn3d
!!
IF( nn_timing == 1 ) CALL timing_start('bdy_dyn')
ll_dyn2d = .true.
ll_dyn3d = .true.
IF( PRESENT(dyn3d_only) ) THEN
IF( dyn3d_only ) ll_dyn2d = .false.
ENDIF
!-------------------------------------------------------
! Set pointers
!-------------------------------------------------------
pssh => sshn
phur => hur
phvr => hvr
CALL wrk_alloc(jpi,jpj,pu2d,pv2d)
!-------------------------------------------------------
! Split velocities into barotropic and baroclinic parts
!-------------------------------------------------------
pu2d(:,:) = 0.e0
pv2d(:,:) = 0.e0
! bg jchanut tschanges (not specifically related to ts; this is a bug)
IF (lk_vvl) THEN
DO jk = 1, jpkm1 !! Vertically integrated momentum trends
pu2d(:,:) = pu2d(:,:) + fse3u_a(:,:,jk) * umask(:,:,jk) * ua(:,:,jk)
pv2d(:,:) = pv2d(:,:) + fse3v_a(:,:,jk) * vmask(:,:,jk) * va(:,:,jk)
END DO
pu2d(:,:) = pu2d(:,:) / ( hu_0(:,:) + sshu_a(:,:) + 1._wp - umask(:,:,1) )
pv2d(:,:) = pv2d(:,:) / ( hv_0(:,:) + sshv_a(:,:) + 1._wp - vmask(:,:,1) )
! end jchanut tschanges
ELSE
DO jk = 1, jpkm1 !! Vertically integrated momentum trends
pu2d(:,:) = pu2d(:,:) + fse3u(:,:,jk) * umask(:,:,jk) * ua(:,:,jk)
pv2d(:,:) = pv2d(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) * va(:,:,jk)
END DO
pu2d(:,:) = pu2d(:,:) * phur(:,:)
pv2d(:,:) = pv2d(:,:) * phvr(:,:)
ENDIF
DO jk = 1 , jpkm1
ua(:,:,jk) = ua(:,:,jk) - pu2d(:,:) * umask(:,:,jk)
va(:,:,jk) = va(:,:,jk) - pv2d(:,:) * vmask(:,:,jk)
END DO
!-------------------------------------------------------
! Apply boundary conditions to barotropic and baroclinic
! parts separately
!-------------------------------------------------------
IF( ll_dyn2d ) CALL bdy_dyn2d( kt )
IF( ll_dyn3d ) CALL bdy_dyn3d( kt )
!-------------------------------------------------------
! Recombine velocities
!-------------------------------------------------------
DO jk = 1 , jpkm1
ua(:,:,jk) = ( ua(:,:,jk) + pu2d(:,:) ) * umask(:,:,jk)
va(:,:,jk) = ( va(:,:,jk) + pv2d(:,:) ) * vmask(:,:,jk)
END DO
CALL wrk_dealloc(jpi,jpj,pu2d,pv2d)
IF( nn_timing == 1 ) CALL timing_stop('bdy_dyn')
END SUBROUTINE bdy_dyn
#else
!!----------------------------------------------------------------------
!! Dummy module NO Unstruct Open Boundary Conditions
!!----------------------------------------------------------------------
CONTAINS
SUBROUTINE bdy_dyn( kt ) ! Empty routine
WRITE(*,*) 'bdy_dyn: You should not have seen this print! error?', kt
END SUBROUTINE bdy_dyn
#endif
!!======================================================================
END MODULE bdydyn
MODULE bdydyn2d
!!======================================================================
!! *** MODULE bdydyn ***
!! Unstructured Open Boundary Cond. : Apply boundary conditions to barotropic solution
!!======================================================================
!! History : 3.4 ! 2011 (D. Storkey) new module as part of BDY rewrite
!! 3.5 ! 2012 (S. Mocavero, I. Epicoco) Optimization of BDY communications
!! 3.5 ! 2013-07 (J. Chanut) Compliant with time splitting changes
!!----------------------------------------------------------------------
#if defined key_bdy
!!----------------------------------------------------------------------
!! 'key_bdy' : Unstructured Open Boundary Condition
!!----------------------------------------------------------------------
!! bdy_dyn2d : Apply open boundary conditions to barotropic variables.
!! bdy_dyn2d_fla : Apply Flather condition
!!----------------------------------------------------------------------
USE timing ! Timing
USE oce ! ocean dynamics and tracers
USE dom_oce ! ocean space and time domain
USE bdy_oce ! ocean open boundary conditions
USE dynspg_oce ! for barotropic variables
USE phycst ! physical constants
USE lbclnk ! ocean lateral boundary conditions (or mpp link)
USE in_out_manager !
IMPLICIT NONE
PRIVATE
PUBLIC bdy_dyn2d ! routine called in dynspg_ts and bdy_dyn
PUBLIC bdy_ssh ! routine called in dynspg_ts or sshwzv