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

Changeset 3248


Ignore:
Timestamp:
2012-01-05T11:10:54+01:00 (12 years ago)
Author:
agn
Message:

dev_NEMO_MERGE_2011 Redefine rldf_rat in trcldf.F90 so works with rn_aht_0=0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90

    r3160 r3248  
    137137      !!---------------------------------------------------------------------- 
    138138 
    139       rldf_rat = rn_ahtrc_0 / rn_aht_0 
    140  
     139      IF (ABS(rn_aht_0) < 2._wp*TINY(1.e0)) THEN 
     140         IF (ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0)) THEN 
     141            rldf_rat = 1.0_wp 
     142         ELSE 
     143            CALL ctl_stop( 'STOP', 'ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     144         END IF 
     145      ELSE 
     146         rldf_rat = rn_ahtrc_0 / rn_aht_0 
     147      END IF 
    141148      !  Define the lateral mixing oparator for tracers 
    142149      ! =============================================== 
     
    234241 
    235242      ! ratio between active and passive tracers diffusive coef. 
    236       rldf_rat = rn_ahtrc_0 / rn_aht_0 
     243      IF (ABS(rn_aht_0) < 2._wp*TINY(1.e0)) THEN 
     244         IF (ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0)) THEN 
     245            rldf_rat = 1.0_wp 
     246         ELSE 
     247            CALL ctl_stop( 'STOP', 'ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' ) 
     248         END IF 
     249      ELSE 
     250         rldf_rat = rn_ahtrc_0 / rn_aht_0 
     251      END IF 
    237252      IF( rldf_rat < 0 ) THEN 
    238253         IF( .NOT.lk_offline ) THEN  
Note: See TracChangeset for help on using the changeset viewer.