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 3625 for branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2012-11-21T14:19:18+01:00 (11 years ago)
Author:
acc
Message:

Branch dev_NOC_2012_r3555. #1006. Step 7. Check in code now merged with dev_r3385_NOCS04_HAMF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r3294 r3625  
    1515   !!   'key_lim2' AND NOT 'key_lim2_vp'            EVP LIM-2 sea-ice model 
    1616   !!---------------------------------------------------------------------- 
    17    !!   lim_rhg   : computes ice velocities 
     17   !!   lim_rhg       : computes ice velocities 
    1818   !!---------------------------------------------------------------------- 
    19    USE phycst           ! Physical constant 
    20    USE par_oce          ! Ocean parameters 
    21    USE dom_oce          ! Ocean domain 
    22    USE sbc_oce          ! Surface boundary condition: ocean fields 
    23    USE sbc_ice          ! Surface boundary condition: ice fields 
    24    USE lbclnk           ! Lateral Boundary Condition / MPP link 
    25    USE lib_mpp          ! MPP library 
    26    USE wrk_nemo         ! work arrays 
    27    USE in_out_manager   ! I/O manager 
    28    USE prtctl           ! Print control 
     19   USE phycst         ! Physical constant 
     20   USE oce     , ONLY :  snwice_mass, snwice_mass_b 
     21   USE par_oce        ! Ocean parameters 
     22   USE dom_oce        ! Ocean domain 
     23   USE sbc_oce        ! Surface boundary condition: ocean fields 
     24   USE sbc_ice        ! Surface boundary condition: ice fields 
    2925#if defined key_lim3 
    30    USE ice              ! LIM-3: ice variables 
    31    USE dom_ice          ! LIM-3: ice domain 
    32    USE limitd_me        ! LIM-3:  
     26   USE ice            ! LIM-3: ice variables 
     27   USE dom_ice        ! LIM-3: ice domain 
     28   USE limitd_me      ! LIM-3:  
    3329#else 
    34    USE ice_2            ! LIM2: ice variables 
    35    USE dom_ice_2        ! LIM2: ice domain 
     30   USE ice_2          ! LIM-2: ice variables 
     31   USE dom_ice_2      ! LIM-2: ice domain 
    3632#endif 
     33   USE lbclnk         ! Lateral Boundary Condition / MPP link 
     34   USE lib_mpp        ! MPP library 
     35   USE wrk_nemo       ! work arrays 
     36   USE in_out_manager ! I/O manager 
     37   USE prtctl         ! Print control 
     38   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    3739 
    3840   IMPLICIT NONE 
     
    4749#  include "vectopt_loop_substitute.h90" 
    4850   !!---------------------------------------------------------------------- 
    49    !! NEMO/LIM3 4.0 , UCL - NEMO Consortium (2011) 
     51   !! NEMO/LIM3 3.4 , UCL - NEMO Consortium (2011) 
    5052   !! $Id$ 
    5153   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    124126      REAL(wp) ::   zindb         ! ice (1) or not (0)       
    125127      REAL(wp) ::   zdummy        ! dummy argument 
     128      REAL(wp) ::   zintb, zintn  ! dummy argument 
    126129 
    127130      REAL(wp), POINTER, DIMENSION(:,:) ::   zpresh           ! temporary array for ice strength 
     
    144147      REAL(wp), POINTER, DIMENSION(:,:) ::   zs12             ! Non-diagonal stress tensor component zs12 
    145148      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr   ! Local error on velocity 
     149      REAL(wp), POINTER, DIMENSION(:,:) ::   zpice            ! array used for the calculation of ice surface slope: 
     150                                                              !   ocean surface (ssh_m) if ice is not embedded 
     151                                                              !   ice top surface if ice is embedded 
    146152       
    147153      !!------------------------------------------------------------------- 
     
    150156      CALL wrk_alloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    151157      CALL wrk_alloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds          ) 
    152       CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
     158      CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
    153159 
    154160#if  defined key_lim2 && ! defined key_lim2_vp 
     
    231237      !  v_oce2: ocean v component on v points                         
    232238 
     239      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: compute representative ice top surface ==! 
     240          !                                             
     241          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 
     242          !                                               = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1} 
     243         zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp      
     244          ! 
     245          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1} 
     246          !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1}) 
     247         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 
     248          ! 
     249         zpice(:,:) = ssh_m(:,:) + (  zintn * snwice_mass(:,:) +  zintb * snwice_mass_b(:,:)  ) * r1_rau0 
     250          ! 
     251      ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==! 
     252         zpice(:,:) = ssh_m(:,:) 
     253      ENDIF 
     254 
    233255      DO jj = k_j1+1, k_jpj-1 
    234256         DO ji = fs_2, fs_jpim1 
     
    273295            ! include it later 
    274296 
    275             zdsshx =  ( ssh_m(ji+1,jj) - ssh_m(ji,jj) ) / e1u(ji,jj) 
    276             zdsshy =  ( ssh_m(ji,jj+1) - ssh_m(ji,jj) ) / e2v(ji,jj) 
     297            zdsshx =  ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 
     298            zdsshy =  ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 
    277299 
    278300            za1ct(ji,jj) = ztagnx - zmass1(ji,jj) * grav * zdsshx 
     
    746768      CALL wrk_dealloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    747769      CALL wrk_dealloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds          ) 
    748       CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
     770      CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
    749771 
    750772   END SUBROUTINE lim_rhg 
Note: See TracChangeset for help on using the changeset viewer.