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 7062 for branches/UKMO/AMM15_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90 – NEMO

Ignore:
Timestamp:
2016-10-21T15:02:54+02:00 (7 years ago)
Author:
jgraham
Message:

Bring in changes from previous AMM15 branch.
bdyini.F90: Modify tanh function for changing in rimwidth.
dtatsd.F90: Prevent vert interpolation of initial conditions over S-levels.
tides: Bring in expanded list of constituents for TPXO forcing.
tranxt.F90: Not running with CICE, so need to prevent temperatures dropping below freezing. Rather than -2C limit from previous branch, instead use method similar to that used in CO5.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/AMM15_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r6928 r7062  
    5858 
    5959   REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg 
     60   INTEGER  ::   warn_1, warn_2   ! indicators for warning statement 
    6061 
    6162   !! * Substitutions 
     
    9394      INTEGER, INTENT(in) ::   kt    ! ocean time-step index 
    9495      !! 
    95       INTEGER  ::   jk, jn    ! dummy loop indices 
    96       REAL(wp) ::   zfact     ! local scalars 
     96      INTEGER  ::   jk, jn, ji, jj     ! dummy loop indices 
     97      REAL(wp) ::   zfact, zfreeze     ! local scalars 
    9798      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdt, ztrds 
    9899      !!---------------------------------------------------------------------- 
     
    120121      IF( lk_bdy )   CALL bdy_tra( kt )  ! BDY open boundaries 
    121122#endif 
    122   
     123 
     124#if ( ! defined key_lim3 && ! defined key_lim2 && ! key_cice ) 
     125      IF ( kt == nit000 ) warn_1=0 
     126      warn_2=0 
     127      DO jk = 1, jpkm1 
     128         DO jj = 1, jpj 
     129            DO ji = 1, jpi 
     130               IF ( tsa(ji,jj,jk,jp_tem) .lt. 0.0 ) THEN 
     131                  ! calculate freezing point 
     132                  zfreeze = ( -0.0575_wp + 1.710523E-3 * Sqrt(Abs(tsn(ji,jj,jk,jp_sal)))   &  
     133                            - 2.154996E-4 * tsn(ji,jj,jk,jp_sal) ) * tsn(ji,jj,jk,jp_sal) - 7.53E-4 * ( 10.0_wp + fsdept(ji,jj,jk) ) 
     134                  IF ( tsa(ji,jj,jk,jp_tem) .lt. zfreeze ) THEN 
     135                     tsa(ji,jj,jk,jp_tem)=zfreeze 
     136                     warn_2=1 
     137                  ENDIF 
     138               ENDIF 
     139            END DO 
     140         END DO 
     141      END DO 
     142      CALL mpp_max(warn_1) 
     143      CALL mpp_max(warn_2) 
     144      IF ( (warn_1 == 0) .and. (warn_2 /= 0) ) THEN 
     145         IF(lwp) THEN 
     146            CALL ctl_warn( ' Temperatures dropping below freezing point, ', & 
     147                      &    ' being forced to freezing point, no longer conservative' )  
     148         ENDIF 
     149         warn_1=1 
     150      ENDIF 
     151#endif 
     152 
    123153      ! set time step size (Euler/Leapfrog) 
    124154      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dtra(:) =     rdttra(:)      ! at nit000             (Euler) 
Note: See TracChangeset for help on using the changeset viewer.