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 8150 for branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90 – NEMO

Ignore:
Timestamp:
2017-06-07T16:37:36+02:00 (7 years ago)
Author:
vancop
Message:

SIMIP outputs, phase 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/v3_6_CMIP6_ice_diagnostics/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r7517 r8150  
    149149                                                                             !   ocean surface (ssh_m) if ice is not embedded 
    150150                                                                             !   ice top surface if ice is embedded    
    151       REAL(wp), POINTER, DIMENSION(:,:) ::   zCor                            ! Coriolis stress array (SIMIP) 
     151      REAL(wp), POINTER, DIMENSION(:,:) ::   zCorx, zCory                    ! Coriolis stress array (SIMIP) 
    152152      REAL(wp), POINTER, DIMENSION(:,:) ::   zswitchU, zswitchV              ! dummy arrays 
    153153      REAL(wp), POINTER, DIMENSION(:,:) ::   zmaskU, zmaskV                  ! mask for ice presence 
     
    164164      CALL wrk_alloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 
    165165      CALL wrk_alloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 
    166       CALL wrk_alloc( jpi,jpj, zCor) 
     166      CALL wrk_alloc( jpi,jpj, zCorx, zCory) 
    167167 
    168168#if  defined key_lim2 && ! defined key_lim2_vp 
     
    449449 
    450450                  ! Coriolis at V-points (energy conserving formulation) 
    451                   zCor(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     451                  zCory(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    452452                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    453453                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    454454 
    455455                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    456                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
     456                  zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
    457457                   
    458458                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    465465            CALL lbc_lnk( v_ice, 'V', -1. ) 
    466466 
    467             ! SIMIP diag 
    468             IF ( jter .EQ. nn_nevp ) THEN 
    469                diag_corstry(:,:) = zCor(:,:)  
    470             ENDIF 
    471              
    472467#if defined key_agrif && defined key_lim2 
    473468            CALL agrif_rhg_lim2( jter, nn_nevp, 'V' ) 
     
    485480 
    486481                  ! Coriolis at U-points (energy conserving formulation) 
    487                   zCor(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
     482                  zCorx(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    488483                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    489484                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    490485                   
    491486                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    492                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
     487                  zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
    493488 
    494489                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    500495            END DO 
    501496            CALL lbc_lnk( u_ice, 'U', -1. ) 
    502             IF ( jter .EQ. nn_nevp ) THEN 
    503                diag_corstrx(:,:) = zCor(:,:)  
    504             ENDIF 
    505497             
    506498#if defined key_agrif && defined key_lim2 
     
    521513 
    522514                  ! Coriolis at U-points (energy conserving formulation) 
    523                   zCor(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
     515                  zCorx(ji,jj)  =   0.25_wp * r1_e1u(ji,jj) *  & 
    524516                     &    ( zmf(ji  ,jj) * ( e1v(ji  ,jj) * v_ice(ji  ,jj) + e1v(ji  ,jj-1) * v_ice(ji  ,jj-1) )  & 
    525517                     &    + zmf(ji+1,jj) * ( e1v(ji+1,jj) * v_ice(ji+1,jj) + e1v(ji+1,jj-1) * v_ice(ji+1,jj-1) ) ) 
    526518                   
    527519                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    528                   zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCor(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
     520                  zTauE = zfU(ji,jj) + zTauU_ia(ji,jj) + zCorx(ji,jj) + zspgU(ji,jj) + zTauO * ( u_oce(ji,jj) - u_ice(ji,jj) ) 
    529521 
    530522                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    552544 
    553545                  ! Coriolis at V-points (energy conserving formulation) 
    554                   zCor(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
     546                  zCory(ji,jj)  = - 0.25_wp * r1_e2v(ji,jj) *  & 
    555547                     &    ( zmf(ji,jj  ) * ( e2u(ji,jj  ) * u_ice(ji,jj  ) + e2u(ji-1,jj  ) * u_ice(ji-1,jj  ) )  & 
    556548                     &    + zmf(ji,jj+1) * ( e2u(ji,jj+1) * u_ice(ji,jj+1) + e2u(ji-1,jj+1) * u_ice(ji-1,jj+1) ) ) 
    557549 
    558550                  ! Sum of external forces (explicit solution) = F + tau_ia + Coriolis + spg + tau_io 
    559                   zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCor(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
     551                  zTauE = zfV(ji,jj) + zTauV_ia(ji,jj) + zCory(ji,jj) + zspgV(ji,jj) + zTauO * ( v_oce(ji,jj) - v_ice(ji,jj) ) 
    560552                   
    561553                  ! ice velocity using implicit formulation (cf Madec doc & Bouillon 2009) 
     
    640632      stress12_i(:,:) = zs12(:,:) 
    641633 
    642       ! SIMIP diagnostic internal stress terms (N/m2) 
    643       diag_dssh_dx(:,:) = zspgU(:,:) 
    644       diag_dssh_dy(:,:) = zspgV(:,:) 
     634      ! SIMIP diagnostics: sea surface sloop stress, coriolis and internal stress terms (N/m2)  
     635      !                    stress tensor invariants (normal and shear stress N/m) 
     636      DO jj = k_j1+1, k_jpj-1 
     637         DO ji = 2, jpim1 
     638             zswi  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - epsi06 ) ) ! 1 if ice, 0 if no ice 
     639 
     640             diag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * zswi                                 ! normal stress 
     641             diag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * zswi   ! shear stress 
     642 
     643             diag_dssh_dx(ji,jj) = zspgU(ji,jj) * zswi    ! sea surface slope stress term 
     644             diag_dssh_dy(ji,jj) = zspgV(ji,jj) * zswi 
     645 
     646             diag_corstrx(ji,jj) = zCorx(ji,jj) * zswi    ! Coriolis stress term 
     647             diag_corstry(ji,jj) = zCory(ji,jj) * zswi 
     648 
     649             diag_intstrx(ji,jj) = zfU(ji,jj)   * zswi    ! internal stress term 
     650             diag_intstry(ji,jj) = zfV(ji,jj)   * zswi 
     651 
     652         END DO 
     653      END DO 
     654 
     655      CALL lbc_lnk_multi( diag_sig1   , 'T',  1., diag_sig2   , 'T',  1., & 
     656                 &        diag_dssh_dx, 'U', -1., diag_dssh_dy, 'V', -1., & 
     657                 &        diag_corstrx, 'U', -1., diag_corstry, 'V', -1.  &  
     658                 &        diag_intstrx, 'U', -1., diag_intstry, 'V', -1.  ) 
     659 
    645660      CALL lbc_lnk( diag_dssh_dx, 'U', -1. ) 
    646661      CALL lbc_lnk( diag_dssh_dy, 'V', -1. ) 
    647662 
    648       diag_intstrx(:,:) = zfU(:,:) 
    649       diag_intstry(:,:) = zfV(:,:) 
    650663      CALL lbc_lnk( diag_intstrx, 'U', -1. ) 
    651664      CALL lbc_lnk( diag_intstry, 'V', -1. ) 
    652665 
    653       ! SIMIP diagnostic stress tensor invariants (normal and shear stress N/m) 
    654       DO jj = k_j1+1, k_jpj-1 
    655          DO ji = 2, jpim1 
    656              zswi  = MAX( 0._wp , SIGN( 1._wp , at_i(ji,jj) - 1.0e-6 ) ) ! 1 if ice, 0 if no ice 
    657              diag_sig1(ji,jj) = ( zs1(ji,jj) + zs2(ji,jj) ) * zswi 
    658              diag_sig2(ji,jj) = SQRT( ( zs1(ji,jj) - zs2(ji,jj) )**2 + 4*zs12(ji,jj)**2 ) * zswi 
    659          END DO 
    660       END DO 
    661       CALL lbc_lnk( diag_sig1, 'T', 1. ) 
    662       CALL lbc_lnk( diag_sig2, 'T', 1. ) 
    663  
     666      CALL lbc_lnk( diag_corstrx, 'U', -1. ) 
     667      CALL lbc_lnk( diag_corstry, 'V', -1. ) 
     668             
    664669      ! 
    665670      !------------------------------------------------------------------------------! 
     
    705710      CALL wrk_dealloc( jpi,jpj, zds, zs1, zs2, zs12, zu_ice, zv_ice, zresr, zpice ) 
    706711      CALL wrk_dealloc( jpi,jpj, zswitchU, zswitchV, zmaskU, zmaskV, zfmask, zwf ) 
    707       CALL wrk_dealloc( jpi,jpj, zCor ) 
     712      CALL wrk_dealloc( jpi,jpj, zCorx, zCory) 
    708713 
    709714   END SUBROUTINE lim_rhg 
Note: See TracChangeset for help on using the changeset viewer.