MODULE bdyice !!================================================================================= !! *** MODULE bdyice *** !! Ocean tracers: Flow Relaxation Scheme of sea-ice fields on each open boundary !!================================================================================= #if defined key_bdy && defined key_lim2 !!--------------------------------------------------------------------------------- !! 'key_bdy' : Unstructured Open Boundary Conditions !!--------------------------------------------------------------------------------- !! bdy_ice : Relaxation of tracers on unstructured open boundaries !!--------------------------------------------------------------------------------- !! * Modules used USE oce ! ocean dynamics and tracers variables #if defined key_lim2 USE ice_2 ! LIM_2 ice variables #endif USE dom_oce ! ocean space and time domain variables USE bdy_oce ! ocean open boundary conditions USE lbclnk ! ocean lateral boundary conditions (or mpp link) USE in_out_manager ! write to numout file IMPLICIT NONE PRIVATE !! * Accessibility PUBLIC bdy_ice ! routine called in stp !! * Substitutions !!--------------------------------------------------------------------------------- !! OPA 9.0 , LODYC-IPSL (2003) !!--------------------------------------------------------------------------------- CONTAINS SUBROUTINE bdy_ice( kt ) !!------------------------------------------------------------------------------ !! *** SUBROUTINE bdy_ice *** !! !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the !! case of unstructured open boundaries. Currently only tested !! for LIM2. !! !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in !! a three-dimensional baroclinic ocean model with realistic !! topography. Tellus, 365-382. !! History : !! NEMO 3.3 ! 2010-09 (D. Storkey) Original code !!------------------------------------------------------------------------------ !! * Arguments INTEGER, INTENT( in ) :: kt !! * Local declarations REAL(wp) :: zwgt ! boundary weight INTEGER :: jb, jk, jgrd ! dummy loop indices INTEGER :: ii, ij ! 2D addresses !!------------------------------------------------------------------------------ jgrd=1 !: Everything is at T-points here IF(ln_bdy_ice_frs) THEN DO jb = 1, nblen(jgrd) DO jk = 1, jpkm1 ii = nbi(jb,jgrd) ij = nbj(jb,jgrd) zwgt = nbw(jb,jgrd) ! Leads fraction relaxation at the boundary frld(ii,ij) = ( frld(ii,ij)*(1.-zwgt) + frld_bdy(jb)*zwgt ) & * tmask(ii,ij,1) ! Ice depth relaxation at the boundary hicif(ii,ij) = ( hicif(ii,ij)*(1.-zwgt) + hicif_bdy(jb)*zwgt ) & * tmask(ii,ij,1) ! Snow depth relaxation at the boundary hsnif(ii,ij) = ( hsnif(ii,ij)*(1.-zwgt) + hsnif_bdy(jb)*zwgt ) & * tmask(ii,ij,1) END DO END DO CALL lbc_lnk( frld, 'T', 1. ) ! Boundary points should be updated CALL lbc_lnk( hicif, 'T', 1. ) ! CALL lbc_lnk( hsnif, 'T', 1. ) ! ELSE ! we have called this routine without ln_bdy_ice_frs not set IF(kt .EQ. nit000) THEN WRITE(numout,*) 'E R R O R (possible) called bdy_ice when' WRITE(numout,*) 'ln_bdy_ice_frs is false?' ENDIF ENDIF ! if ln_bdy_ice_frs END SUBROUTINE bdy_ice #else !!--------------------------------------------------------------------------------- !! Default option Empty module !!--------------------------------------------------------------------------------- CONTAINS SUBROUTINE bdy_ice( kt ) ! Empty routine END SUBROUTINE bdy_ice #endif !!================================================================================= END MODULE bdyice