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 15577 for NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_evp.F90 – NEMO

Ignore:
Timestamp:
2021-12-06T18:03:30+01:00 (2 years ago)
Author:
edblockley
Message:

Modifying EVP routine to allow calculation of sig?_pnorm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_evp.F90

    r15570 r15577  
    856856      ! Recommendation 1 : we use ice strength, not replacement pressure 
    857857      ! Recommendation 2 : need to use deformations at PREVIOUS iterate for viscosities 
    858 !!$      IF( iom_use('sig1_pnorm') .OR. iom_use('sig2_pnorm') ) THEN 
    859 !!$         ! 
    860 !!$         ALLOCATE( zsig1_p(jpi,jpj) , zsig2_p(jpi,jpj) , zsig_I(jpi,jpj) , zsig_II(jpi,jpj) )          
    861 !!$         !          
    862 !!$         DO jj = 1, jpj 
    863 !!$            DO ji = 1, jpi 
    864 !!$             
    865 !!$               ! Ice stresses computed with **viscosities** (delta, p/delta) at **previous** iterates  
    866 !!$               !                        and **deformations** at current iterates 
    867 !!$               !                        following Lemieux & Dupont (2020) 
    868 !!$               zfac             =   zp_delt(ji,jj) 
    869 !!$               zsig1            =   zfac * ( pdivu_i(ji,jj) - ( zdelta(ji,jj) + rn_creepl ) ) 
    870 !!$               zsig2            =   zfac * z1_ecc2 * zten_i(ji,jj) 
    871 !!$               zsig12           =   zfac * z1_ecc2 * pshear_i(ji,jj) 
    872 !!$                
    873 !!$               ! Stress invariants (sigma_I, sigma_II, Coon 1974, Feltham 2008), T-point 
    874 !!$               zsig_I(ji,jj)    =   zsig1 * 0.5_wp                                           ! 1st stress invariant, aka average normal stress, aka negative pressure 
    875 !!$               zsig_II(ji,jj)   =   SQRT ( MAX( 0._wp, zsig2 * zsig2 * 0.25_wp + zsig12 ) )  ! 2nd  ''       '', aka maximum shear stress 
    876 !!$       
    877 !!$               ! Normalized  principal stresses (used to display the ellipse) 
    878 !!$               z1_strength      =   1._wp / MAX( 1._wp, strength(ji,jj) ) 
    879 !!$               zsig1_p(ji,jj)   =   ( zsig_I(ji,jj) + zsig_II(ji,jj) ) * z1_strength 
    880 !!$               zsig2_p(ji,jj)   =   ( zsig_I(ji,jj) - zsig_II(ji,jj) ) * z1_strength 
    881 !!$            END DO 
    882 !!$         END DO                
    883 !!$         ! 
    884 !!$         CALL iom_put( 'sig1_pnorm' , zsig1_p )  
    885 !!$         CALL iom_put( 'sig2_pnorm' , zsig2_p )  
    886 !!$       
    887 !!$         DEALLOCATE( zsig1_p , zsig2_p , zsig_I, zsig_II ) 
    888 !!$          
    889 !!$      ENDIF 
     858      IF( iom_use('sig1_pnorm') .OR. iom_use('sig2_pnorm') ) THEN 
     859         ! 
     860         ALLOCATE( zsig1_p(jpi,jpj) , zsig2_p(jpi,jpj) , zsig_I(jpi,jpj) , zsig_II(jpi,jpj) )          
     861         !          
     862         DO jj = 1, jpj 
     863            DO ji = 1, jpi 
     864             
     865               ! Ice stresses computed with **viscosities** (delta, p/delta) at **previous** iterates  
     866               !                        and **deformations** at current iterates 
     867               !                        following Lemieux & Dupont (2020) 
     868               zfac             =   zp_delt(ji,jj) 
     869               zsig1            =   zfac * ( pdivu_i(ji,jj) - ( zdelta(ji,jj) + rn_creepl ) ) 
     870               zsig2            =   zfac * z1_ecc2 * zten_i(ji,jj) 
     871               zsig12           =   zfac * z1_ecc2 * pshear_i(ji,jj) 
     872                
     873               ! Stress invariants (sigma_I, sigma_II, Coon 1974, Feltham 2008), T-point 
     874               zsig_I(ji,jj)    =   zsig1 * 0.5_wp                                           ! 1st stress invariant, aka average normal stress, aka negative pressure 
     875               zsig_II(ji,jj)   =   SQRT ( MAX( 0._wp, zsig2 * zsig2 * 0.25_wp + zsig12 ) )  ! 2nd  ''       '', aka maximum shear stress 
     876       
     877               ! Normalized  principal stresses (used to display the ellipse) 
     878               z1_strength      =   1._wp / MAX( 1._wp, strength(ji,jj) ) 
     879               zsig1_p(ji,jj)   =   ( zsig_I(ji,jj) + zsig_II(ji,jj) ) * z1_strength 
     880               zsig2_p(ji,jj)   =   ( zsig_I(ji,jj) - zsig_II(ji,jj) ) * z1_strength 
     881            END DO 
     882         END DO                
     883         ! 
     884         CALL iom_put( 'sig1_pnorm' , zsig1_p )  
     885         CALL iom_put( 'sig2_pnorm' , zsig2_p )  
     886       
     887         DEALLOCATE( zsig1_p , zsig2_p , zsig_I, zsig_II ) 
     888          
     889      ENDIF 
    890890 
    891891      ! --- SIMIP --- ! 
Note: See TracChangeset for help on using the changeset viewer.