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 12372 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynatf.F90 – NEMO

Ignore:
Timestamp:
2020-02-12T13:37:21+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r11943_MERGE_2019. A few changes to align the option 1 branch with the trunk@12371. These include a fix for #2317 (changes for LFRA freshwater correction) which was done at changeset 12279 on the trunk. These affect dynatf.F90, traatf.F90 and isfdynatf.F90 and pass SETTE but change results in all tests that use freshwater input (expected). All other changes on the trunk are present (where applicable) up to and including changeset 12367 (Solve #2380)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/DYN/dynatf.F90

    r12340 r12372  
    102102      REAL(wp) ::   zue3a, zue3n, zue3b, zcoef    ! local scalars 
    103103      REAL(wp) ::   zve3a, zve3n, zve3b, z1_2dt   !   -      - 
    104       REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zue, zve 
     104      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   zue, zve, zwfld 
    105105      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ze3t_f, ze3u_f, ze3v_f, zua, zva  
    106106      !!---------------------------------------------------------------------- 
     
    191191            ! Time-filtered scale factor at t-points 
    192192            ! ---------------------------------------------------- 
    193             ALLOCATE( ze3t_f(jpi,jpj,jpk) ) 
     193            ALLOCATE( ze3t_f(jpi,jpj,jpk), zwfld(jpi,jpj) ) 
    194194            DO jk = 1, jpkm1 
    195195               ze3t_f(:,:,jk) = pe3t(:,:,jk,Kmm) + atfp * ( pe3t(:,:,jk,Kbb) - 2._wp * pe3t(:,:,jk,Kmm) + pe3t(:,:,jk,Kaa) ) 
    196196            END DO 
    197197            ! Add volume filter correction: compatibility with tracer advection scheme 
    198             ! => time filter + conservation correction (only at the first level) 
     198            ! => time filter + conservation correction 
    199199            zcoef = atfp * rdt * r1_rau0 
    200  
    201             ze3t_f(:,:,1) = ze3t_f(:,:,1) - zcoef * ( emp_b(:,:) - emp(:,:) ) * tmask(:,:,1) 
    202  
    203             IF ( ln_rnf ) THEN 
    204                IF( ln_rnf_depth ) THEN 
    205                   DO_3D_11_11( 1, jpkm1 ) 
    206                      IF( jk <=  nk_rnf(ji,jj)  ) THEN 
    207                          ze3t_f(ji,jj,jk) =   ze3t_f(ji,jj,jk) - zcoef *  ( - rnf_b(ji,jj) + rnf(ji,jj) ) & 
    208                                 &          * ( pe3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) ) * tmask(ji,jj,jk) 
    209                      ENDIF 
    210                   END_3D 
    211                ELSE 
    212                   ze3t_f(:,:,1) = ze3t_f(:,:,1) - zcoef *  ( -rnf_b(:,:) + rnf(:,:))*tmask(:,:,1) 
    213                ENDIF 
    214             END IF 
     200            zwfld(:,:) = emp_b(:,:) - emp(:,:) 
     201            IF ( ln_rnf ) zwfld(:,:) =  zwfld(:,:) - ( rnf_b(:,:) - rnf(:,:) ) 
     202            DO jk = 1, jpkm1 
     203               ze3t_f(:,:,jk) = ze3t_f(:,:,jk) - zcoef * zwfld(:,:) * tmask(:,:,jk) & 
     204                              &                        * pe3t(:,:,jk,Kmm) / ( ht(:,:) + 1._wp - ssmask(:,:) )  
     205            END DO 
    215206            ! 
    216207            ! ice shelf melting (deal separately as it can be in depth) 
     
    254245            ENDIF 
    255246            ! 
    256             DEALLOCATE( ze3t_f ) 
     247            DEALLOCATE( ze3t_f, zwfld ) 
    257248         ENDIF 
    258249         ! 
Note: See TracChangeset for help on using the changeset viewer.