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.
Changeset 2185 for branches/devukmo2010/NEMO/OPA_SRC/BDY/bdyice.F90 – NEMO

Ignore:
Timestamp:
2010-10-07T17:17:57+02:00 (14 years ago)
Author:
rfurner
Message:

adding updates from bdy branch, revision 2100:2168

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devukmo2010/NEMO/OPA_SRC/BDY/bdyice.F90

    r2128 r2185  
    11MODULE bdyice 
    2    !!================================================================================= 
     2   !!====================================================================== 
    33   !!                       ***  MODULE  bdyice  *** 
    4    !! Ocean tracers:   Flow Relaxation Scheme of sea-ice fields on each open boundary 
    5    !!================================================================================= 
    6 #if defined key_bdy && defined key_lim2 
    7    !!--------------------------------------------------------------------------------- 
    8    !!   'key_bdy'      :                         Unstructured Open Boundary Conditions 
    9    !!--------------------------------------------------------------------------------- 
     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   !!---------------------------------------------------------------------- 
    1013   !!   bdy_ice        : Relaxation of tracers on unstructured open boundaries 
    11    !!--------------------------------------------------------------------------------- 
    12    !! * Modules used 
     14   !!---------------------------------------------------------------------- 
    1315   USE oce             ! ocean dynamics and tracers variables 
    14 #if defined key_lim2 
    1516   USE ice_2           ! LIM_2 ice variables 
    16 #endif 
    1717   USE dom_oce         ! ocean space and time domain variables  
    1818   USE bdy_oce         ! ocean open boundary conditions 
    1919   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2020   USE in_out_manager  ! write to numout file 
     21    
    2122   IMPLICIT NONE 
    2223   PRIVATE 
    2324 
    24    !! * Accessibility 
    25    PUBLIC bdy_ice     ! routine called in stp 
     25   PUBLIC   bdy_ice    ! routine called in sbcmod 
    2626 
    27    !! * Substitutions 
    28  
    29    !!--------------------------------------------------------------------------------- 
    30    !!   OPA 9.0 , LODYC-IPSL  (2003) 
    31    !!--------------------------------------------------------------------------------- 
    32  
     27   !!---------------------------------------------------------------------- 
     28   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     29   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     30   !!---------------------------------------------------------------------- 
    3331CONTAINS 
    3432 
     
    3735      !!                 ***  SUBROUTINE bdy_ice  *** 
    3836      !!                     
    39       !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the   
    40       !!              case of unstructured open boundaries. Currently only tested 
    41       !!              for LIM2. 
     37      !! ** Purpose : Apply the Flow Relaxation Scheme for sea-ice fields in the case  
     38      !!              of unstructured open boundaries. Currently only tested for LIM2. 
    4239      !!  
    43       !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in  
    44       !!             a three-dimensional baroclinic ocean model with realistic 
    45       !!             topography. Tellus, 365-382. 
    46       !!  History : 
    47       !!   NEMO 3.3  !  2010-09 (D. Storkey) Original code 
     40      !! Reference : Engedahl H., 1995: Use of the flow relaxation scheme in a three- 
     41      !!             dimensional baroclinic ocean model with realistic topography. Tellus, 365-382. 
    4842      !!------------------------------------------------------------------------------ 
    49       !! * Arguments 
    50       INTEGER, INTENT( in ) ::   kt 
    51  
    52       !! * Local declarations 
    53       REAL(wp) :: zwgt                       ! boundary weight 
    54       INTEGER ::   jb, jk, jgrd              ! dummy loop indices 
    55       INTEGER ::   ii, ij                    ! 2D addresses 
     43      INTEGER, INTENT( in ) ::   kt   ! model time step index 
     44      !! 
     45      INTEGER  ::   jb, jk, jgrd   ! dummy loop indices 
     46      INTEGER  ::   ii, ij         ! local scalar 
     47      REAL(wp) ::   zwgt, zwgt1    ! local scalar 
    5648      !!------------------------------------------------------------------------------ 
    57  
    58       jgrd=1 !: Everything is at T-points here 
    59   
    60       IF(ln_bdy_ice_frs) THEN 
    61   
    62         DO jb = 1, nblen(jgrd) 
    63           DO jk = 1, jpkm1 
    64             ii = nbi(jb,jgrd) 
    65             ij = nbj(jb,jgrd) 
    66             zwgt = nbw(jb,jgrd) 
    67  
    68             ! Leads fraction relaxation at the boundary    
    69             frld(ii,ij) = ( frld(ii,ij)*(1.-zwgt)  +  frld_bdy(jb)*zwgt ) & 
    70                                                           * tmask(ii,ij,1)          
    71  
    72             ! Ice depth relaxation at the boundary    
    73             hicif(ii,ij) = ( hicif(ii,ij)*(1.-zwgt)  +  hicif_bdy(jb)*zwgt ) & 
    74                                                           * tmask(ii,ij,1) 
    75             ! Snow depth relaxation at the boundary    
    76             hsnif(ii,ij) = ( hsnif(ii,ij)*(1.-zwgt)  +  hsnif_bdy(jb)*zwgt ) & 
    77                                                           * tmask(ii,ij,1) 
    78     
    79           END DO 
    80         END DO  
    81  
    82         CALL lbc_lnk( frld, 'T', 1. )  ! Boundary points should be updated 
    83         CALL lbc_lnk( hicif, 'T', 1. ) ! 
    84         CALL lbc_lnk( hsnif, 'T', 1. ) ! 
    85        
    86       ELSE 
    87         ! we have called this routine without ln_bdy_ice_frs not set 
    88         IF(kt .EQ. nit000) THEN 
    89           WRITE(numout,*) 'E R R O R (possible) called bdy_ice when' 
    90           WRITE(numout,*) 'ln_bdy_ice_frs is false?' 
    91         ENDIF 
    92       ENDIF ! if ln_bdy_ice_frs 
    93        
     49      ! 
     50      jgrd = 1      ! Everything is at T-points here 
     51      ! 
     52      IF( ln_bdy_ice_frs ) THEN     ! update ice fields by relaxation at the boundary 
     53         DO jb = 1, nblen(jgrd) 
     54            DO jk = 1, jpkm1 
     55               ii    = nbi(jb,jgrd) 
     56               ij    = nbj(jb,jgrd) 
     57               zwgt  = nbw(jb,jgrd) 
     58               zwgt1 = 1.e0 - nbw(jb,jgrd) 
     59               frld (ii,ij) = ( frld (ii,ij) * zwgt1 + frld_bdy (jb) * zwgt ) * tmask(ii,ij,1)     ! Leads fraction  
     60               hicif(ii,ij) = ( hicif(ii,ij) * zwgt1 + hicif_bdy(jb) * zwgt ) * tmask(ii,ij,1)     ! Ice depth  
     61               hsnif(ii,ij) = ( hsnif(ii,ij) * zwgt1 + hsnif_bdy(jb) * zwgt ) * tmask(ii,ij,1)     ! Snow depth 
     62            END DO 
     63         END DO  
     64         CALL lbc_lnk( frld, 'T', 1. )                                         ! lateral boundary conditions 
     65         CALL lbc_lnk( hicif, 'T', 1. )   ;   CALL lbc_lnk( hsnif, 'T', 1. ) 
     66         ! 
     67      ELSE                          ! we have called this routine without ln_bdy_ice_frs not set 
     68         IF( kt == nit000 )   CALL ctl_warn( 'E R R O R (possible) called bdy_ice when ln_bdy_ice_frs is false?' ) 
     69      ENDIF 
     70      !       
    9471   END SUBROUTINE bdy_ice 
    9572#else 
     
    9976CONTAINS 
    10077   SUBROUTINE bdy_ice( kt )      ! Empty routine 
     78      WRITE(*,*) 'bdy_ice: You should not have seen this print! error?', kt 
    10179   END SUBROUTINE bdy_ice 
    10280#endif 
Note: See TracChangeset for help on using the changeset viewer.