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 15385 – NEMO

Changeset 15385


Ignore:
Timestamp:
2021-10-15T15:52:48+02:00 (3 years ago)
Author:
clem
Message:

cleaning some ice routines. No change in sette

Location:
NEMO/trunk/src/ICE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/ICE/icedyn_rhg_evp.F90

    r15375 r15385  
    134134      REAL(wp) ::   zvCr                                                ! critical ice volume above which ice is landfast 
    135135      ! 
    136       REAL(wp) ::   zintb, zintn                                        ! dummy argument 
    137136      REAL(wp) ::   zfac_x, zfac_y 
    138       REAL(wp) ::   zshear, zdum1, zdum2 
    139137      ! 
    140138      REAL(wp), DIMENSION(jpi,jpj) ::   zdelta, zp_delt                 ! delta and P/delta at T points 
  • NEMO/trunk/src/ICE/icethd.F90

    r15374 r15385  
    182182         ENDIF 
    183183      END_2D 
    184       CALL lbc_lnk( 'icecor', u_ice, 'U', -1.0_wp, v_ice, 'V', -1.0_wp ) 
     184      CALL lbc_lnk( 'icethd', u_ice, 'U', -1.0_wp, v_ice, 'V', -1.0_wp ) 
    185185      ! 
    186186      ! convergence tests 
  • NEMO/trunk/src/ICE/icethd_da.F90

    r12489 r15385  
    109109      !!--------------------------------------------------------------------- 
    110110      INTEGER  ::   ji     ! dummy loop indices 
    111       REAL(wp)            ::   zastar, zdfloe, zperi, zwlat, zda 
     111      REAL(wp)            ::   zastar, zdfloe, zperi, zwlat, zda, zda_tot 
    112112      REAL(wp), PARAMETER ::   zdmax = 300._wp 
    113113      REAL(wp), PARAMETER ::   zcs   = 0.66_wp 
    114114      REAL(wp), PARAMETER ::   zm1   = 3.e-6_wp 
    115115      REAL(wp), PARAMETER ::   zm2   = 1.36_wp 
    116       ! 
    117       REAL(wp), DIMENSION(jpij) ::   zda_tot 
    118116      !!--------------------------------------------------------------------- 
    119117      ! 
     
    128126         zwlat  = zm1 * ( MAX( 0._wp, sst_1d(ji) - ( t_bo_1d(ji) - rt0 ) ) )**zm2  ! Melt speed rate [m/s] 
    129127         ! 
    130          zda_tot(ji) = MIN( zwlat * zperi * rDt_ice, at_i_1d(ji) )                 ! sea ice concentration decrease (>0) 
     128         zda_tot = MIN( zwlat * zperi * rDt_ice, at_i_1d(ji) )                     ! sea ice concentration decrease (>0) 
    131129       
    132130         ! --- Distribute reduction among ice categories and calculate associated ice-ocean fluxes --- ! 
     
    134132            ! decrease of concentration for the category jl 
    135133            !    each category contributes to melting in proportion to its concentration 
    136             zda = MIN( a_i_1d(ji), zda_tot(ji) * a_i_1d(ji) / at_i_1d(ji) ) 
     134            zda = MIN( a_i_1d(ji), zda_tot * a_i_1d(ji) / at_i_1d(ji) ) 
    137135             
    138136            ! Contribution to salt flux 
  • NEMO/trunk/src/ICE/iceupdate.F90

    r14997 r15385  
    9292      INTEGER  ::   ji, jj, jl, jk   ! dummy loop indices 
    9393      REAL(wp) ::   zqsr             ! New solar flux received by the ocean 
    94       REAL(wp), DIMENSION(jpi,jpj) ::   z2d                  ! 2D workspace 
     94      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z2d                  ! 2D workspace 
    9595      !!--------------------------------------------------------------------- 
    9696      IF( ln_timing )   CALL timing_start('iceupdate') 
     
    239239 
    240240      IF ( iom_use( 'vfxthin' ) ) THEN   ! mass flux from ice growth in open water + thin ice (<20cm) => comparable to observations 
     241         ALLOCATE( z2d(jpi,jpj) ) 
    241242         WHERE( hm_i(:,:) < 0.2 .AND. hm_i(:,:) > 0. ) ; z2d = wfx_bog 
    242243         ELSEWHERE                                     ; z2d = 0._wp 
    243244         END WHERE 
    244245         CALL iom_put( 'vfxthin', wfx_opw + z2d ) 
     246         DEALLOCATE( z2d ) 
    245247      ENDIF 
    246248 
  • NEMO/trunk/src/ICE/icevar.F90

    r15070 r15385  
    343343      REAL(wp) ::   z1_dS 
    344344      REAL(wp) ::   ztmp1, ztmp2, zs0, zs 
    345       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   z_slope_s, zalpha    ! case 2 only 
     345      REAL(wp), ALLOCATABLE, DIMENSION(:,:) ::   z_slope_s, zalpha    ! case 2 only 
    346346      REAL(wp), PARAMETER :: zsi0 = 3.5_wp 
    347347      REAL(wp), PARAMETER :: zsi1 = 4.5_wp 
     
    361361      CASE( 2 )       !  time varying salinity with linear profile  ! 
    362362         !            !---------------------------------------------! 
    363          ! 
    364          ALLOCATE( z_slope_s(jpi,jpj,jpl) , zalpha(jpi,jpj,jpl) ) 
     363         z1_dS = 1._wp / ( zsi1 - zsi0 ) 
     364         ! 
     365         ALLOCATE( z_slope_s(jpi,jpj) , zalpha(jpi,jpj) ) 
    365366         ! 
    366367         DO jl = 1, jpl 
    367             DO jk = 1, nlay_i 
    368                sz_i(:,:,jk,jl)  = s_i(:,:,jl) 
    369             END DO 
    370          END DO 
    371          !                                      ! Slope of the linear profile 
    372          WHERE( h_i(:,:,:) > epsi20 )   ;   z_slope_s(:,:,:) = 2._wp * s_i(:,:,:) / h_i(:,:,:) 
    373          ELSEWHERE                      ;   z_slope_s(:,:,:) = 0._wp 
    374          END WHERE 
    375          ! 
    376          z1_dS = 1._wp / ( zsi1 - zsi0 ) 
    377          DO jl = 1, jpl 
     368 
    378369            DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    379                zalpha(ji,jj,jl) = MAX(  0._wp , MIN( ( zsi1 - s_i(ji,jj,jl) ) * z1_dS , 1._wp )  ) 
     370               !                                      ! Slope of the linear profile 
     371               IF( h_i(ji,jj,jl) > epsi20 ) THEN 
     372                  z_slope_s(ji,jj) = 2._wp * s_i(ji,jj,jl) / h_i(ji,jj,jl) 
     373               ELSE 
     374                  z_slope_s(ji,jj) = 0._wp 
     375               ENDIF 
     376               ! 
     377               zalpha(ji,jj) = MAX(  0._wp , MIN( ( zsi1 - s_i(ji,jj,jl) ) * z1_dS , 1._wp )  ) 
    380378               !                             ! force a constant profile when SSS too low (Baltic Sea) 
    381                IF( 2._wp * s_i(ji,jj,jl) >= sss_m(ji,jj) )   zalpha(ji,jj,jl) = 0._wp 
     379               IF( 2._wp * s_i(ji,jj,jl) >= sss_m(ji,jj) )   zalpha(ji,jj) = 0._wp 
    382380            END_2D 
    383          END DO 
    384          ! 
    385          ! Computation of the profile 
    386          DO jl = 1, jpl 
     381            ! 
     382            ! Computation of the profile 
    387383            DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nlay_i ) 
    388384               !                          ! linear profile with 0 surface value 
    389                zs0 = z_slope_s(ji,jj,jl) * ( REAL(jk,wp) - 0.5_wp ) * h_i(ji,jj,jl) * r1_nlay_i 
    390                zs  = zalpha(ji,jj,jl) * zs0 + ( 1._wp - zalpha(ji,jj,jl) ) * s_i(ji,jj,jl)     ! weighting the profile 
     385               zs0 = z_slope_s(ji,jj) * ( REAL(jk,wp) - 0.5_wp ) * h_i(ji,jj,jl) * r1_nlay_i 
     386               zs  = zalpha(ji,jj) * zs0 + ( 1._wp - zalpha(ji,jj) ) * s_i(ji,jj,jl)     ! weighting the profile 
    391387               sz_i(ji,jj,jk,jl) = MIN( rn_simax, MAX( zs, rn_simin ) ) 
    392388            END_3D 
     
    448444      CASE( 2 )       !  time varying salinity with linear profile  ! 
    449445         !            !---------------------------------------------! 
     446         z1_dS = 1._wp / ( zsi1 - zsi0 ) 
    450447         ! 
    451448         ALLOCATE( z_slope_s(jpij), zalpha(jpij) ) 
    452449         ! 
    453          !                                      ! Slope of the linear profile 
    454          WHERE( h_i_1d(1:npti) > epsi20 )   ;   z_slope_s(1:npti) = 2._wp * s_i_1d(1:npti) / h_i_1d(1:npti) 
    455          ELSEWHERE                          ;   z_slope_s(1:npti) = 0._wp 
    456          END WHERE 
    457  
    458          z1_dS = 1._wp / ( zsi1 - zsi0 ) 
    459450         DO ji = 1, npti 
     451            !                                      ! Slope of the linear profile 
     452            IF( h_i_1d(ji) > epsi20 ) THEN 
     453               z_slope_s(ji) = 2._wp * s_i_1d(ji) / h_i_1d(ji) 
     454            ELSE 
     455               z_slope_s(ji) = 0._wp 
     456            ENDIF 
     457            ! 
    460458            zalpha(ji) = MAX(  0._wp , MIN(  ( zsi1 - s_i_1d(ji) ) * z1_dS , 1._wp  )  ) 
    461459            !                             ! force a constant profile when SSS too low (Baltic Sea) 
    462460            IF( 2._wp * s_i_1d(ji) >= sss_1d(ji) )   zalpha(ji) = 0._wp 
     461            ! 
    463462         END DO 
    464463         ! 
     
    715714      bv_i (:,:,:) = 0._wp 
    716715      DO jl = 1, jpl 
    717          DO jk = 1, nlay_i 
    718             WHERE( t_i(:,:,jk,jl) < rt0 - epsi10 ) 
    719                bv_i(:,:,jl) = bv_i(:,:,jl) - rTmlt * sz_i(:,:,jk,jl) * r1_nlay_i / ( t_i(:,:,jk,jl) - rt0 ) 
    720             END WHERE 
    721          END DO 
     716         DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, nlay_i ) 
     717            IF( t_i(ji,jj,jk,jl) < rt0 - epsi10 ) THEN 
     718               bv_i(ji,jj,jl) = bv_i(ji,jj,jl) - rTmlt * sz_i(ji,jj,jk,jl) * r1_nlay_i / ( t_i(ji,jj,jk,jl) - rt0 ) 
     719            ENDIF 
     720         END_3D 
    722721      END DO 
    723722      WHERE( vt_i(:,:) > epsi20 )   ;   bvm_i(:,:) = SUM( bv_i(:,:,:) * v_i(:,:,:) , dim=3 ) / vt_i(:,:) 
     
    782781      ! temporary 
    783782      REAL(wp) :: zintn, zintb                     ! time interpolation weights [] 
    784       REAL(wp), DIMENSION(jpi,jpj) :: zsnwiceload  ! snow and ice load [m] 
    785783      ! 
    786784      ! compute ice load used to define the equivalent ssh in lead 
     
    795793         zintb = REAL( nn_fsbc + 1 ) / REAL( nn_fsbc ) * 0.5_wp 
    796794         ! 
    797          zsnwiceload(:,:) = ( zintn * psnwice_mass(:,:) + zintb * psnwice_mass_b(:,:) ) * r1_rho0 
     795         ! compute equivalent ssh in lead 
     796         ice_var_sshdyn(:,:) = pssh(:,:) + ( zintn * psnwice_mass(:,:) + zintb * psnwice_mass_b(:,:) ) * r1_rho0 
    798797         ! 
    799798      ELSE 
    800          zsnwiceload(:,:) = 0.0_wp 
     799         ! compute equivalent ssh in lead 
     800         ice_var_sshdyn(:,:) = pssh(:,:) 
    801801      ENDIF 
    802       ! compute equivalent ssh in lead 
    803       ice_var_sshdyn(:,:) = pssh(:,:) + zsnwiceload(:,:) 
    804802      ! 
    805803   END FUNCTION ice_var_sshdyn 
Note: See TracChangeset for help on using the changeset viewer.