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 6736 for branches/NERC/dev_r3874_FASTNEt/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2016-06-24T09:50:27+02:00 (8 years ago)
Author:
jamesharle
Message:

FASTNEt code modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r3874_FASTNEt/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r3791 r6736  
    88   !!             -   !  2008-11  (M. Vancoppenolle, S. Bouillon, Y. Aksenov) add surface tilt in ice rheolohy  
    99   !!            3.3  !  2009-05  (G.Garric) addition of the lim2_evp cas 
    10    !!            3.4  !  2011-01  (A. Porter)  dynamical allocation  
    11    !!            3.5  !  2012-08  (R. Benshila)  AGRIF  
     10   !!            3.4  !  2011-01  (A Porter)  dynamical allocation  
    1211   !!---------------------------------------------------------------------- 
    1312#if defined key_lim3 || (  defined key_lim2 && ! defined key_lim2_vp ) 
     
    1615   !!   'key_lim2' AND NOT 'key_lim2_vp'            EVP LIM-2 sea-ice model 
    1716   !!---------------------------------------------------------------------- 
    18    !!   lim_rhg       : computes ice velocities 
     17   !!   lim_rhg   : computes ice velocities 
    1918   !!---------------------------------------------------------------------- 
    20    USE phycst         ! Physical constant 
    21    USE oce     , ONLY :  snwice_mass, snwice_mass_b 
    22    USE par_oce        ! Ocean parameters 
    23    USE dom_oce        ! Ocean domain 
    24    USE sbc_oce        ! Surface boundary condition: ocean fields 
    25    USE sbc_ice        ! Surface boundary condition: ice fields 
     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 
     29   USE lib_fortran      ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
    2630#if defined key_lim3 
    27    USE ice            ! LIM-3: ice variables 
    28    USE dom_ice        ! LIM-3: ice domain 
    29    USE limitd_me      ! LIM-3:  
     31   USE ice              ! LIM-3: ice variables 
     32   USE dom_ice          ! LIM-3: ice domain 
     33   USE limitd_me        ! LIM-3:  
    3034#else 
    31    USE ice_2          ! LIM-2: ice variables 
    32    USE dom_ice_2      ! LIM-2: ice domain 
    33 #endif 
    34    USE lbclnk         ! Lateral Boundary Condition / MPP link 
    35    USE lib_mpp        ! MPP library 
    36    USE wrk_nemo       ! work arrays 
    37    USE in_out_manager ! I/O manager 
    38    USE prtctl         ! Print control 
    39    USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined)   
    40 #if defined key_agrif && defined key_lim2 
    41    USE agrif_lim2_interp 
     35   USE ice_2            ! LIM2: ice variables 
     36   USE dom_ice_2        ! LIM2: ice domain 
    4237#endif 
    4338 
     
    130125      REAL(wp) ::   zindb         ! ice (1) or not (0)       
    131126      REAL(wp) ::   zdummy        ! dummy argument 
    132       REAL(wp) ::   zintb, zintn  ! dummy argument 
    133127 
    134128      REAL(wp), POINTER, DIMENSION(:,:) ::   zpresh           ! temporary array for ice strength 
     
    152146      REAL(wp), POINTER, DIMENSION(:,:) ::   zs12             ! Non-diagonal stress tensor component zs12 
    153147      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr   ! Local error on velocity 
    154       REAL(wp), POINTER, DIMENSION(:,:) ::   zpice            ! array used for the calculation of ice surface slope: 
    155                                                               !   ocean surface (ssh_m) if ice is not embedded 
    156                                                               !   ice top surface if ice is embedded    
    157148      !!------------------------------------------------------------------- 
    158149 
     
    160151      CALL wrk_alloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    161152      CALL wrk_alloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  ) 
    162       CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
     153      CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
    163154 
    164155#if  defined key_lim2 && ! defined key_lim2_vp 
     
    171162# endif 
    172163     at_i(:,:) = 1. - frld(:,:) 
    173 #endif 
    174 #if defined key_agrif && defined key_lim2  
    175     CALL agrif_rhg_lim2_load      ! First interpolation of coarse values 
    176164#endif 
    177165      ! 
     
    244232      !  v_oce2: ocean v component on v points                         
    245233 
    246       IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: compute representative ice top surface ==! 
    247           !                                             
    248           ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 
    249           !                                               = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1} 
    250          zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp      
    251           ! 
    252           ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1} 
    253           !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1}) 
    254          zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 
    255           ! 
    256          zpice(:,:) = ssh_m(:,:) + (  zintn * snwice_mass(:,:) +  zintb * snwice_mass_b(:,:)  ) * r1_rau0 
    257           ! 
    258       ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==! 
    259          zpice(:,:) = ssh_m(:,:) 
    260       ENDIF 
    261  
    262234      DO jj = k_j1+1, k_jpj-1 
    263235         DO ji = fs_2, fs_jpim1 
     
    302274            ! include it later 
    303275 
    304             zdsshx =  ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 
    305             zdsshy =  ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 
     276            zdsshx =  ( ssh_m(ji+1,jj) - ssh_m(ji,jj) ) / e1u(ji,jj) 
     277            zdsshy =  ( ssh_m(ji,jj+1) - ssh_m(ji,jj) ) / e2v(ji,jj) 
    306278 
    307279            za1ct(ji,jj) = ztagnx - zmass1(ji,jj) * grav * zdsshx 
     
    520492 
    521493            CALL lbc_lnk( u_ice(:,:), 'U', -1. ) 
    522 #if defined key_agrif 
    523             CALL agrif_rhg_lim2( jter, nevp, 'U' ) 
    524 #endif 
    525494 
    526495!CDIR NOVERRCHK 
     
    548517 
    549518            CALL lbc_lnk( v_ice(:,:), 'V', -1. ) 
    550 #if defined key_agrif 
    551             CALL agrif_rhg_lim2( jter, nevp, 'V' ) 
    552 #endif 
    553519 
    554520         ELSE  
     
    577543 
    578544            CALL lbc_lnk( v_ice(:,:), 'V', -1. ) 
    579 #if defined key_agrif 
    580             CALL agrif_rhg_lim2( jter, nevp , 'V' ) 
    581 #endif 
    582545 
    583546!CDIR NOVERRCHK 
     
    608571 
    609572            CALL lbc_lnk( u_ice(:,:), 'U', -1. ) 
    610 #if defined key_agrif 
    611             CALL agrif_rhg_lim2( jter, nevp, 'U' ) 
    612 #endif 
    613573 
    614574         ENDIF 
     
    651611      CALL lbc_lnk( u_ice(:,:), 'U', -1. )  
    652612      CALL lbc_lnk( v_ice(:,:), 'V', -1. )  
    653 #if defined key_agrif 
    654       CALL agrif_rhg_lim2( nevp , nevp, 'U' ) 
    655       CALL agrif_rhg_lim2( nevp , nevp, 'V' ) 
    656 #endif 
    657613 
    658614      DO jj = k_j1+1, k_jpj-1  
     
    790746      CALL wrk_dealloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    791747      CALL wrk_dealloc( jpi,jpj, zf1   , deltat, zu_ice, zf2   , deltac, zv_ice , zdd   , zdt    , zds  , zdst  ) 
    792       CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
     748      CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr                         ) 
    793749 
    794750   END SUBROUTINE lim_rhg 
Note: See TracChangeset for help on using the changeset viewer.