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

Ignore:
Timestamp:
2012-06-15T14:53:43+02:00 (12 years ago)
Author:
acc
Message:

Branch: dev_r3385_NOCS04_HAMF; #665. Stage 3 of 2012 development: First working version with (optionally) active embedding. Still some stability questions when running the LIM2-EVP, ORCA2 test-case with full embedding. Works with reduced (halved) timestep. Still investigating.

File:
1 edited

Legend:

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

    r3294 r3414  
    3535   USE dom_ice_2        ! LIM2: ice domain 
    3636#endif 
     37   USE oce, ONLY :  snwice_mass, snwice_mass_b 
    3738 
    3839   IMPLICIT NONE 
     
    124125      REAL(wp) ::   zindb         ! ice (1) or not (0)       
    125126      REAL(wp) ::   zdummy        ! dummy argument 
     127      REAL(wp) ::   zintb, zintn  ! dummy argument 
    126128 
    127129      REAL(wp), POINTER, DIMENSION(:,:) ::   zpresh           ! temporary array for ice strength 
     
    144146      REAL(wp), POINTER, DIMENSION(:,:) ::   zs12             ! Non-diagonal stress tensor component zs12 
    145147      REAL(wp), POINTER, DIMENSION(:,:) ::   zu_ice, zv_ice, zresr   ! Local error on velocity 
     148      REAL(wp), POINTER, DIMENSION(:,:) ::   zpice            ! array used for the calculation of ice surface slope: 
     149                                                              !   ocean surface (ssh_m) if ice is not embedded 
     150                                                              !   ice top surface if ice is embedded 
    146151       
    147152      !!------------------------------------------------------------------- 
     
    150155      CALL wrk_alloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    151156      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                         ) 
     157      CALL wrk_alloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
    153158 
    154159#if  defined key_lim2 && ! defined key_lim2_vp 
     
    231236      !  v_oce2: ocean v component on v points                         
    232237 
     238      IF( nn_ice_embd == 2 ) THEN             !== embedded sea ice: compute representative ice top surface ==! 
     239          !                                             
     240          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 
     241          !                                               = (1/nn_fsbc)^2 * {SUM[n], n=0,nn_fsbc-1} 
     242         zintn = REAL( nn_fsbc - 1 ) / REAL( nn_fsbc ) * 0.5_wp      
     243          ! 
     244          ! average interpolation coeff as used in dynspg = (1/nn_fsbc) * {SUM[1-n/nn_fsbc], n=0,nn_fsbc-1} 
     245          !                                               = (1/nn_fsbc)^2 * (nn_fsbc^2 - {SUM[n], n=0,nn_fsbc-1}) 
     246         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 
     247          ! 
     248         zpice(:,:) = ssh_m(:,:) + (  zintn * snwice_mass(:,:) +  zintb * snwice_mass_b(:,:)  ) * r1_rau0 
     249          ! 
     250      ELSE                                    !== non-embedded sea ice: use ocean surface for slope calculation ==! 
     251         zpice(:,:) = ssh_m(:,:) 
     252      ENDIF 
     253 
    233254      DO jj = k_j1+1, k_jpj-1 
    234255         DO ji = fs_2, fs_jpim1 
     
    273294            ! include it later 
    274295 
    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) 
     296            zdsshx =  ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj) 
     297            zdsshy =  ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj) 
    277298 
    278299            za1ct(ji,jj) = ztagnx - zmass1(ji,jj) * grav * zdsshx 
     
    746767      CALL wrk_dealloc( jpi,jpj, zc1   , u_oce1, u_oce2, u_ice2, zusw  , v_oce1 , v_oce2, v_ice1                ) 
    747768      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                         ) 
     769      CALL wrk_dealloc( jpi,jpj, zdd   , zdt   , zds   , zs1   , zs2   , zs12   , zresr , zpice                 ) 
    749770 
    750771   END SUBROUTINE lim_rhg 
Note: See TracChangeset for help on using the changeset viewer.