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 14127 for NEMO/trunk/src – NEMO

Changeset 14127 for NEMO/trunk/src


Ignore:
Timestamp:
2020-12-08T09:03:03+01:00 (3 years ago)
Author:
jchanut
Message:

#2537, remove checks/corrections if salinity is a passive tracer

Location:
NEMO/trunk/src/OCE
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/TRA/trazdf.F90

    r14072 r14127  
    8383      ! JMM avoid negative salinities near river outlet ! Ugly fix 
    8484      ! JMM : restore negative salinities to small salinities: 
    85       WHERE( pts(A2D(0),:,jp_sal,Kaa) < 0._wp )   pts(A2D(0),:,jp_sal,Kaa) = 0.1_wp 
     85!!jc: discard this correction in case salinity is not used in eos 
     86      IF ( .NOT.(ln_seos.AND.(rn_lambda2==0._wp)) ) THEN 
     87         WHERE( pts(A2D(0),:,jp_sal,Kaa) < 0._wp )   pts(A2D(0),:,jp_sal,Kaa) = 0.1_wp 
     88      ENDIF 
    8689!!gm 
    8790 
  • NEMO/trunk/src/OCE/stpctl.F90

    r14053 r14127  
    2626   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2727   USE lib_mpp         ! distributed memory computing 
     28   USE eosbn2 
     29   ! 
    2830   USE netcdf          ! NetCDF library 
    29  
    3031   IMPLICIT NONE 
    3132   PRIVATE 
     
    6566      INTEGER , DIMENSION(9)          ::   iareasum, iareamin, iareamax 
    6667      INTEGER , DIMENSION(3,4)        ::   iloc                                  ! min/max loc indices 
    67       REAL(wp)                        ::   zzz                                   ! local real  
     68      REAL(wp)                        ::   zzz, zminsal, zmaxsal                 ! local real  
    6869      REAL(wp), DIMENSION(9)          ::   zmax, zmaxlocal 
    6970      LOGICAL                         ::   ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 
     
    7172      CHARACTER(len=20)               ::   clname 
    7273      !!---------------------------------------------------------------------- 
    73       ! 
    7474      IF( nstop > 0 .AND. ngrdstop > -1 )   RETURN   !   stpctl was already called by a child grid 
    7575      ! 
     
    180180         END DO 
    181181         IF( kt == nitend )   istatus = NF90_CLOSE(nrunid) 
    182       ENDIF 
     182      END IF 
    183183      !                                   !==               error handling               ==! 
    184184      !                                   !==  done by all processes at every time step  ==! 
    185185      ! 
     186      IF ( ln_seos.AND.(rn_lambda2==0._wp) ) THEN        ! Discard checks on salinity 
     187         zmaxsal = +1.e38                                ! if not used in eos 
     188         zminsal = -1.e38  
     189      ELSE 
     190         zmaxsal = 100._wp 
     191         zminsal =   0._wp 
     192      ENDIF  
     193      !  
    186194      IF(  zmax(1) >   20._wp .OR.   &                   ! too large sea surface height ( > 20 m ) 
    187195         & zmax(2) >   10._wp .OR.   &                   ! too large velocity ( > 10 m/s) 
    188          & zmax(3) <=   0._wp .OR.   &                   ! negative or zero sea surface salinity 
    189          & zmax(4) >= 100._wp .OR.   &                   ! too large sea surface salinity ( > 100 ) 
    190          & zmax(4) <    0._wp .OR.   &                   ! too large sea surface salinity (keep this line for sea-ice) 
     196         & zmax(3) <= zminsal .OR.   &                   ! negative or zero sea surface salinity 
     197         & zmax(4) >= zmaxsal .OR.   &                   ! too large sea surface salinity ( > 100 ) 
     198         & zmax(4) <  zminsal .OR.   &                   ! too large sea surface salinity (keep this line for sea-ice) 
    191199         & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR.   &               ! NaN encounter in the tests 
    192200         & ABS(   zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN   ! Infinity encounter in the tests 
Note: See TracChangeset for help on using the changeset viewer.