New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
bdyice.F90 in branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/BDY – NEMO

source: branches/2011/DEV_r2739_STFC_dCSE/NEMOGCM/NEMO/OPA_SRC/BDY/bdyice.F90 @ 4474

Last change on this file since 4474 was 3211, checked in by spickles2, 12 years ago

Stephen Pickles, 11 Dec 2011

Commit to bring the rest of the DCSE NEMO development branch
in line with the latest development version. This includes
array index re-ordering of all OPA_SRC/.

  • Property svn:keywords set to Id
File size: 4.5 KB
Line 
1MODULE bdyice
2   !!======================================================================
3   !!                       ***  MODULE  bdyice  ***
4   !! Unstructured Open Boundary Cond. :  Flow Relaxation Scheme applied sea-ice
5   !!======================================================================
6   !!  History :  3.3  !  2010-09 (D. Storkey)  Original code
7   !!----------------------------------------------------------------------
8#if defined   key_bdy   &&   defined key_lim2
9   !!----------------------------------------------------------------------
10   !!   'key_bdy'            and                 Unstructured Open Boundary Conditions
11   !!   'key_lim2'                                                 LIM-2 sea ice model
12   !!----------------------------------------------------------------------
13   !!   bdy_ice_frs        : Relaxation of tracers on unstructured open boundaries
14   !!----------------------------------------------------------------------
15   USE oce             ! ocean dynamics and tracers variables
16   USE ice_2           ! LIM_2 ice variables
17   USE dom_oce         ! ocean space and time domain variables
18   USE bdy_oce         ! ocean open boundary conditions
19   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
20   USE in_out_manager  ! write to numout file
21   USE lib_mpp         ! distributed memory computing
22   
23   IMPLICIT NONE
24   PRIVATE
25
26   PUBLIC   bdy_ice_frs    ! routine called in sbcmod
27
28   !! * Control permutation of array indices
29#  include "oce_ftrans.h90"
30#  include "dom_oce_ftrans.h90"
31
32   !!----------------------------------------------------------------------
33   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
34   !! $Id$
35   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
36   !!----------------------------------------------------------------------
37CONTAINS
38
39   SUBROUTINE bdy_ice_frs( kt )
40      !!------------------------------------------------------------------------------
41      !!                 ***  SUBROUTINE bdy_ice_frs  ***
42      !!                   
43      !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the case
44      !!              of unstructured open boundaries. Currently only tested for LIM2.
45      !!
46      !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in a three-
47      !!             dimensional baroclinic ocean model with realistic topography. Tellus, 365-382.
48      !!------------------------------------------------------------------------------
49      INTEGER, INTENT( in ) ::   kt   ! model time step index
50      !!
51      INTEGER  ::   jb, jk, jgrd   ! dummy loop indices
52      INTEGER  ::   ii, ij         ! local scalar
53      REAL(wp) ::   zwgt, zwgt1    ! local scalar
54      !!------------------------------------------------------------------------------
55      !
56      jgrd = 1      ! Everything is at T-points here
57      !
58      IF( ln_ice_frs ) THEN     ! update ice fields by relaxation at the boundary
59         DO jb = 1, nblen(jgrd)
60            DO jk = 1, jpkm1
61               ii    = nbi(jb,jgrd)
62               ij    = nbj(jb,jgrd)
63               zwgt  = nbw(jb,jgrd)
64               zwgt1 = 1.e0 - nbw(jb,jgrd)
65               frld (ii,ij) = ( frld (ii,ij) * zwgt1 + frld_bdy (jb) * zwgt ) * tmask(ii,ij,1)     ! Leads fraction
66               hicif(ii,ij) = ( hicif(ii,ij) * zwgt1 + hicif_bdy(jb) * zwgt ) * tmask(ii,ij,1)     ! Ice depth
67               hsnif(ii,ij) = ( hsnif(ii,ij) * zwgt1 + hsnif_bdy(jb) * zwgt ) * tmask(ii,ij,1)     ! Snow depth
68            END DO
69         END DO
70         CALL lbc_lnk( frld, 'T', 1. )                                         ! lateral boundary conditions
71         CALL lbc_lnk( hicif, 'T', 1. )   ;   CALL lbc_lnk( hsnif, 'T', 1. )
72         !
73      ELSE                          ! we have called this routine without ln_ice_frs not set
74         IF( kt == nit000 )   CALL ctl_warn( 'E R R O R (possible) called bdy_ice_frs when ln_ice_frs is false?' )
75      ENDIF
76      !     
77   END SUBROUTINE bdy_ice_frs
78#else
79   !!---------------------------------------------------------------------------------
80   !!   Default option                                                    Empty module
81   !!---------------------------------------------------------------------------------
82CONTAINS
83   SUBROUTINE bdy_ice_frs( kt )      ! Empty routine
84      WRITE(*,*) 'bdy_ice_frs: You should not have seen this print! error?', kt
85   END SUBROUTINE bdy_ice_frs
86#endif
87
88   !!=================================================================================
89END MODULE bdyice
Note: See TracBrowser for help on using the repository browser.