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 10425 for NEMO/trunk/src/TOP/TRP – NEMO

Ignore:
Timestamp:
2018-12-19T22:54:16+01:00 (5 years ago)
Author:
smasson
Message:

trunk: merge back dev_r10164_HPC09_ESIWACE_PREP_MERGE@10424 into the trunk

Location:
NEMO/trunk/src/TOP/TRP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/TOP/TRP/trcnxt.F90

    r10097 r10425  
    9797#endif 
    9898      ! Update after tracer on domain lateral boundaries 
    99       CALL lbc_lnk( tra(:,:,:,:), 'T', 1. )    
     99      CALL lbc_lnk( 'trcnxt', tra(:,:,:,:), 'T', 1. )    
    100100 
    101101      IF( ln_bdy )  CALL trc_bdy( kt ) 
     
    164164         ENDIF 
    165165         ! 
    166          CALL lbc_lnk_multi( trb(:,:,:,:), 'T', 1._wp, trn(:,:,:,:), 'T', 1._wp, tra(:,:,:,:), 'T', 1._wp ) 
     166         CALL lbc_lnk_multi( 'trcnxt', trb(:,:,:,:), 'T', 1._wp, trn(:,:,:,:), 'T', 1._wp, tra(:,:,:,:), 'T', 1._wp ) 
    167167      ENDIF 
    168168      ! 
  • NEMO/trunk/src/TOP/TRP/trcrad.F90

    r10068 r10425  
    1919   USE trdtra 
    2020   USE prtctl_trc          ! Print control for debbuging 
     21   USE lib_fortran 
    2122 
    2223   IMPLICIT NONE 
     
    2728 
    2829   LOGICAL , PUBLIC ::   ln_trcrad           !: flag to artificially correct negative concentrations 
     30   REAL(wp), DIMENSION(:,:), ALLOCATABLE::   gainmass 
    2931 
    3032   !!---------------------------------------------------------------------- 
     
    104106         ENDIF 
    105107      ENDIF 
     108      ! 
     109      ALLOCATE( gainmass(jptra,2) ) 
     110      gainmass(:,:) = 0. 
    106111      ! 
    107112   END SUBROUTINE trc_rad_ini 
     
    129134      CHARACTER( len = 1), OPTIONAL          , INTENT(in   ) ::   cpreserv           ! flag to preserve content or not 
    130135      ! 
    131       INTEGER ::   ji, jj, jk, jn     ! dummy loop indices 
    132       LOGICAL ::   lldebug = .FALSE.           ! local logical 
    133       REAL(wp)::   ztrcorb, ztrmasb, zs2rdt    ! temporary scalars 
    134       REAL(wp)::   zcoef  , ztrcorn, ztrmasn   !    -         - 
    135       REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrdb, ztrtrdn   ! workspace arrays 
    136       !!---------------------------------------------------------------------- 
    137       ! 
    138       IF( l_trdtrc )   ALLOCATE( ztrtrdb(jpi,jpj,jpk), ztrtrdn(jpi,jpj,jpk) ) 
     136      INTEGER ::   ji, ji2, jj, jj2, jk, jn     ! dummy loop indices 
     137      INTEGER ::   icnt 
     138      LOGICAL ::   lldebug = .FALSE.            ! local logical 
     139      REAL(wp)::   zcoef, zs2rdt, ztotmass 
     140      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrneg, ztrpos 
     141      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   ztrtrd   ! workspace arrays 
     142      !!---------------------------------------------------------------------- 
     143      ! 
     144      IF( l_trdtrc )   ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 
     145      zs2rdt = 1. / ( 2. * rdt * REAL( nn_dttrc, wp ) ) 
    139146      ! 
    140147      IF( PRESENT( cpreserv )  ) THEN     !==  total tracer concentration is preserved  ==! 
    141148         ! 
    142          DO jn = jp_sms0, jp_sms1 
    143             ! 
    144             ztrcorb = 0._wp   ;   ztrmasb = 0._wp 
    145             ztrcorn = 0._wp   ;   ztrmasn = 0._wp 
    146             ! 
    147             IF( l_trdtrc ) THEN 
    148                ztrtrdb(:,:,:) = ptrb(:,:,:,jn)                        ! save input trb for trend computation 
    149                ztrtrdn(:,:,:) = ptrn(:,:,:,jn)                        ! save input trn for trend computation 
    150             ENDIF 
    151             !                                                         ! sum over the global domain  
    152             ztrcorb = glob_sum( MIN( 0., ptrb(:,:,:,jn) ) * cvol(:,:,:) ) 
    153             ztrcorn = glob_sum( MIN( 0., ptrn(:,:,:,jn) ) * cvol(:,:,:) ) 
    154             ! 
    155             ztrmasb = glob_sum( MAX( 0., ptrb(:,:,:,jn) ) * cvol(:,:,:) ) 
    156             ztrmasn = glob_sum( MAX( 0., ptrn(:,:,:,jn) ) * cvol(:,:,:) ) 
    157             ! 
    158             IF( ztrcorb /= 0 ) THEN 
    159                zcoef = 1. + ztrcorb / ztrmasb 
    160                DO jk = 1, jpkm1 
    161                   ptrb(:,:,jk,jn) = MAX( 0., ptrb(:,:,jk,jn) ) 
    162                   ptrb(:,:,jk,jn) = ptrb(:,:,jk,jn) * zcoef * tmask(:,:,jk) 
    163                END DO 
    164             ENDIF 
    165             ! 
    166             IF( ztrcorn /= 0 ) THEN 
    167                zcoef = 1. + ztrcorn / ztrmasn 
    168                DO jk = 1, jpkm1 
    169                   ptrn(:,:,jk,jn) = MAX( 0., ptrn(:,:,jk,jn) ) 
    170                   ptrn(:,:,jk,jn) = ptrn(:,:,jk,jn) * zcoef * tmask(:,:,jk) 
    171                END DO 
    172             ENDIF 
    173             ! 
    174             IF( l_trdtrc ) THEN 
    175                ! 
    176                zs2rdt = 1. / ( 2. * rdt ) 
    177                ztrtrdb(:,:,:) = ( ptrb(:,:,:,jn) - ztrtrdb(:,:,:) ) * zs2rdt 
    178                ztrtrdn(:,:,:) = ( ptrn(:,:,:,jn) - ztrtrdn(:,:,:) ) * zs2rdt  
    179                CALL trd_tra( kt, 'TRC', jn, jptra_radb, ztrtrdb )       ! Asselin-like trend handling 
    180                CALL trd_tra( kt, 'TRC', jn, jptra_radn, ztrtrdn )       ! standard     trend handling 
    181               ! 
    182             ENDIF 
    183             ! 
    184          END DO 
    185          ! 
    186       ELSE                                !==  total CFC content is NOT strictly preserved  ==! 
    187          ! 
    188          DO jn = jp_sms0, jp_sms1   
    189             ! 
    190             IF( l_trdtrc ) THEN 
    191                ztrtrdb(:,:,:) = ptrb(:,:,:,jn)                        ! save input trb for trend computation 
    192                ztrtrdn(:,:,:) = ptrn(:,:,:,jn)                        ! save input trn for trend computation 
    193             ENDIF 
     149         ALLOCATE( ztrneg(1:jpi,1:jpj,jp_sms0:jp_sms1), ztrpos(1:jpi,1:jpj,jp_sms0:jp_sms1) ) 
     150 
     151         DO jn = jp_sms0, jp_sms1 
     152            ztrneg(:,:,jn) = SUM( MIN( 0., ptrb(:,:,:,jn) ) * cvol(:,:,:), dim = 3 )   ! sum of the negative values 
     153            ztrpos(:,:,jn) = SUM( MAX( 0., ptrb(:,:,:,jn) ) * cvol(:,:,:), dim = 3 )   ! sum of the positive values 
     154         END DO 
     155         CALL sum3x3( ztrneg ) 
     156         CALL sum3x3( ztrpos ) 
     157          
     158         DO jn = jp_sms0, jp_sms1 
     159            ! 
     160            IF( l_trdtrc )   ztrtrd(:,:,:) = ptrb(:,:,:,jn)                            ! save input trb for trend computation            
    194161            ! 
    195162            DO jk = 1, jpkm1 
    196163               DO jj = 1, jpj 
    197164                  DO ji = 1, jpi 
    198                      ptrn(ji,jj,jk,jn) = MAX( 0. , ptrn(ji,jj,jk,jn) ) 
    199                      ptrb(ji,jj,jk,jn) = MAX( 0. , ptrb(ji,jj,jk,jn) ) 
     165                     IF( ztrneg(ji,jj,jn) /= 0. ) THEN                                 ! if negative values over the 3x3 box 
     166                        ! 
     167                        ptrb(ji,jj,jk,jn) = ptrb(ji,jj,jk,jn) * tmask(ji,jj,jk)   ! really needed? 
     168                        IF( ptrb(ji,jj,jk,jn) < 0. ) ptrb(ji,jj,jk,jn) = 0.       ! supress negative values 
     169                        IF( ptrb(ji,jj,jk,jn) > 0. ) THEN                         ! use positive values to compensate mass gain 
     170                           zcoef = 1. + ztrneg(ji,jj,jn) / ztrpos(ji,jj,jn)       ! ztrpos > 0 as ptrb > 0 
     171                           ptrb(ji,jj,jk,jn) = ptrb(ji,jj,jk,jn) * zcoef 
     172                           IF( zcoef < 0. ) THEN                                  ! if the compensation exceed the positive value 
     173                              gainmass(jn,1) = gainmass(jn,1) - ptrb(ji,jj,jk,jn) * cvol(ji,jj,jk)   ! we are adding mass... 
     174                              ptrb(ji,jj,jk,jn) = 0.                              ! limit the compensation to keep positive value 
     175                           ENDIF 
     176                        ENDIF 
     177                        ! 
     178                     ENDIF 
    200179                  END DO 
    201180               END DO 
     
    203182            ! 
    204183            IF( l_trdtrc ) THEN 
    205                ! 
    206                zs2rdt = 1. / ( 2. * rdt * REAL( nn_dttrc, wp ) ) 
    207                ztrtrdb(:,:,:) = ( ptrb(:,:,:,jn) - ztrtrdb(:,:,:) ) * zs2rdt 
    208                ztrtrdn(:,:,:) = ( ptrn(:,:,:,jn) - ztrtrdn(:,:,:) ) * zs2rdt  
    209                CALL trd_tra( kt, 'TRC', jn, jptra_radb, ztrtrdb )       ! Asselin-like trend handling 
    210                CALL trd_tra( kt, 'TRC', jn, jptra_radn, ztrtrdn )       ! standard     trend handling 
    211               ! 
     184               ztrtrd(:,:,:) = ( ptrb(:,:,:,jn) - ztrtrd(:,:,:) ) * zs2rdt 
     185               CALL trd_tra( kt, 'TRC', jn, jptra_radb, ztrtrd )       ! Asselin-like trend handling 
     186            ENDIF 
     187            ! 
     188         END DO 
     189  
     190         IF( kt == nitend ) THEN 
     191            CALL mpp_sum( 'trcrad', gainmass(:,1) ) 
     192            DO jn = jp_sms0, jp_sms1 
     193               IF( gainmass(jn,1) > 0. ) THEN 
     194                  ztotmass = glob_sum( 'trcrad', ptrb(:,:,:,jn) * cvol(:,:,:) ) 
     195                  IF(lwp) WRITE(numout, '(a, i2, a, D23.16, a, D23.16)') 'trcrad ptrb, traceur ', jn  & 
     196                     &        , ' total mass : ', ztotmass, ', mass gain : ',  gainmass(jn,1) 
     197               END IF 
     198            END DO 
     199         ENDIF 
     200 
     201         DO jn = jp_sms0, jp_sms1 
     202            ztrneg(:,:,jn) = SUM( MIN( 0., ptrn(:,:,:,jn) ) * cvol(:,:,:), dim = 3 )   ! sum of the negative values 
     203            ztrpos(:,:,jn) = SUM( MAX( 0., ptrn(:,:,:,jn) ) * cvol(:,:,:), dim = 3 )   ! sum of the positive values 
     204         END DO 
     205         CALL sum3x3( ztrneg ) 
     206         CALL sum3x3( ztrpos ) 
     207          
     208         DO jn = jp_sms0, jp_sms1 
     209            ! 
     210            IF( l_trdtrc )   ztrtrd(:,:,:) = ptrn(:,:,:,jn)                            ! save input trb for trend computation 
     211            ! 
     212            DO jk = 1, jpkm1 
     213               DO jj = 1, jpj 
     214                  DO ji = 1, jpi 
     215                     IF( ztrneg(ji,jj,jn) /= 0. ) THEN                                 ! if negative values over the 3x3 box 
     216                        ! 
     217                        ptrn(ji,jj,jk,jn) = ptrn(ji,jj,jk,jn) * tmask(ji,jj,jk)   ! really needed? 
     218                        IF( ptrn(ji,jj,jk,jn) < 0. ) ptrn(ji,jj,jk,jn) = 0.       ! supress negative values 
     219                        IF( ptrn(ji,jj,jk,jn) > 0. ) THEN                         ! use positive values to compensate mass gain 
     220                           zcoef = 1. + ztrneg(ji,jj,jn) / ztrpos(ji,jj,jn)       ! ztrpos > 0 as ptrb > 0 
     221                           ptrn(ji,jj,jk,jn) = ptrn(ji,jj,jk,jn) * zcoef 
     222                           IF( zcoef < 0. ) THEN                                  ! if the compensation exceed the positive value 
     223                              gainmass(jn,2) = gainmass(jn,2) - ptrn(ji,jj,jk,jn) * cvol(ji,jj,jk)   ! we are adding mass... 
     224                              ptrn(ji,jj,jk,jn) = 0.                              ! limit the compensation to keep positive value 
     225                           ENDIF 
     226                        ENDIF 
     227                        ! 
     228                     ENDIF 
     229                  END DO 
     230               END DO 
     231            END DO 
     232            ! 
     233            IF( l_trdtrc ) THEN 
     234               ztrtrd(:,:,:) = ( ptrn(:,:,:,jn) - ztrtrd(:,:,:) ) * zs2rdt 
     235               CALL trd_tra( kt, 'TRC', jn, jptra_radn, ztrtrd )       ! standard     trend handling 
     236            ENDIF 
     237            ! 
     238         END DO 
     239  
     240         IF( kt == nitend ) THEN 
     241            CALL mpp_sum( 'trcrad', gainmass(:,2) ) 
     242            DO jn = jp_sms0, jp_sms1 
     243               IF( gainmass(jn,2) > 0. ) THEN 
     244                  ztotmass = glob_sum( 'trcrad', ptrn(:,:,:,jn) * cvol(:,:,:) ) 
     245                  WRITE(numout, '(a, i2, a, D23.16, a, D23.16)') 'trcrad ptrn, traceur ', jn  & 
     246                     &        , ' total mass : ', ztotmass, ', mass gain : ',  gainmass(jn,1) 
     247               END IF 
     248            END DO 
     249         ENDIF 
     250 
     251         DEALLOCATE( ztrneg, ztrpos ) 
     252         ! 
     253      ELSE                                !==  total CFC content is NOT strictly preserved  ==! 
     254         ! 
     255         DO jn = jp_sms0, jp_sms1   
     256            ! 
     257            IF( l_trdtrc )   ztrtrd(:,:,:) = ptrb(:,:,:,jn)                        ! save input trb for trend computation 
     258            ! 
     259            WHERE( ptrb(:,:,:,jn) < 0. )   ptrb(:,:,:,jn) = 0. 
     260            ! 
     261            IF( l_trdtrc ) THEN 
     262               ztrtrd(:,:,:) = ( ptrb(:,:,:,jn) - ztrtrd(:,:,:) ) * zs2rdt 
     263               CALL trd_tra( kt, 'TRC', jn, jptra_radb, ztrtrd )       ! Asselin-like trend handling 
     264            ENDIF 
     265            ! 
     266            IF( l_trdtrc )   ztrtrd(:,:,:) = ptrn(:,:,:,jn)                        ! save input trn for trend computation 
     267            ! 
     268            WHERE( ptrn(:,:,:,jn) < 0. )   ptrn(:,:,:,jn) = 0. 
     269            ! 
     270            IF( l_trdtrc ) THEN 
     271               ztrtrd(:,:,:) = ( ptrn(:,:,:,jn) - ztrtrd(:,:,:) ) * zs2rdt 
     272               CALL trd_tra( kt, 'TRC', jn, jptra_radn, ztrtrd )       ! standard     trend handling 
    212273            ENDIF 
    213274            ! 
     
    216277      ENDIF 
    217278      ! 
    218       IF( l_trdtrc )  DEALLOCATE( ztrtrdb, ztrtrdn ) 
     279      IF( l_trdtrc )  DEALLOCATE( ztrtrd ) 
    219280      ! 
    220281   END SUBROUTINE trc_rad_sms 
  • NEMO/trunk/src/TOP/TRP/trcsbc.F90

    r10068 r10425  
    113113 
    114114      ! 0. initialization 
    115       DO jn = 1, jptra 
    116          ! 
    117          IF( l_trdtrc )   ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
    118          ! 
    119          IF( nn_ice_tr == -1 ) THEN    ! No tracers in sea ice (null concentration in sea ice) 
     115      IF( nn_ice_tr == -1 ) THEN    ! No tracers in sea ice (null concentration in sea ice) 
     116         ! 
     117         DO jn = 1, jptra 
    120118            DO jj = 2, jpj 
    121119               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    123121               END DO 
    124122            END DO 
    125          ELSE 
     123         END DO 
     124         ! 
     125       ELSE 
     126         ! 
     127         DO jn = 1, jptra 
    126128            DO jj = 2, jpj 
    127129               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    143145               END DO 
    144146            END DO 
    145          ENDIF 
    146          ! 
    147          CALL lbc_lnk( sbc_trc(:,:,jn), 'T', 1. ) 
    148          !                                       Concentration dilution effect on tracers due to evaporation & precipitation  
     147         END DO 
     148      ENDIF 
     149      ! 
     150      CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. ) 
     151      !                                       Concentration dilution effect on tracers due to evaporation & precipitation  
     152      DO jn = 1, jptra 
     153         ! 
     154         IF( l_trdtrc )   ztrtrd(:,:,:) = tra(:,:,:,jn)  ! save trends 
     155         ! 
    149156         DO jj = 2, jpj 
    150157            DO ji = fs_2, fs_jpim1   ! vector opt. 
  • NEMO/trunk/src/TOP/TRP/trdmxl_trc.F90

    r10068 r10425  
    6464         &      ndextrd1(jpi*jpj), nidtrd(jptra), nh_t(jptra),  STAT=trd_mxl_trc_alloc) 
    6565         ! 
    66       IF( lk_mpp                )   CALL mpp_sum ( trd_mxl_trc_alloc ) 
    67       IF( trd_mxl_trc_alloc /=0 )   CALL ctl_warn('trd_mxl_trc_alloc: failed to allocate arrays') 
     66      CALL mpp_sum ( 'trdmxl_trc', trd_mxl_trc_alloc ) 
     67      IF( trd_mxl_trc_alloc /=0 )   CALL ctl_stop( 'STOP', 'trd_mxl_trc_alloc: failed to allocate arrays' ) 
    6868      ! 
    6969   END FUNCTION trd_mxl_trc_alloc 
     
    290290            IF( ln_trdtrc(jn) ) THEN 
    291291               DO jl = 1, jpltrd_trc 
    292                   CALL lbc_lnk( tmltrd_trc(:,:,jl,jn), 'T', 1. )        ! lateral boundary conditions 
     292                  CALL lbc_lnk( 'trdmxl_trc', tmltrd_trc(:,:,jl,jn), 'T', 1. )        ! lateral boundary conditions 
    293293               END DO 
    294294            ENDIF 
     
    425425         !-- Lateral boundary conditions 
    426426               IF ( cn_cfg .NE. 'gyre' ) THEN 
    427                   CALL lbc_lnk_multi( ztmltot(:,:,jn) , 'T', 1. , ztmlres(:,:,jn) , 'T', 1., & 
     427                  CALL lbc_lnk_multi( 'trdmxl_trc', ztmltot(:,:,jn) , 'T', 1. , ztmlres(:,:,jn) , 'T', 1., & 
    428428                     &                ztmlatf(:,:,jn) , 'T', 1. , ztmlrad(:,:,jn) , 'T', 1. ) 
    429429               ENDIF 
     
    476476         !-- Lateral boundary conditions  
    477477               IF ( cn_cfg .NE. 'gyre' ) THEN            ! other than GYRE configuration     
    478                   CALL lbc_lnk_multi( ztmltot2(:,:,jn), 'T', 1., ztmlres2(:,:,jn), 'T', 1. ) 
     478                  CALL lbc_lnk_multi( 'trdmxl_trc', ztmltot2(:,:,jn), 'T', 1., ztmlres2(:,:,jn), 'T', 1. ) 
    479479                  DO jl = 1, jpltrd_trc 
    480                      CALL lbc_lnk( ztmltrd2(:,:,jl,jn), 'T', 1. )       ! will be output in the NetCDF trends file 
     480                     CALL lbc_lnk( 'trdmxl_trc', ztmltrd2(:,:,jl,jn), 'T', 1. )       ! will be output in the NetCDF trends file 
    481481                  END DO 
    482482               ENDIF 
     
    776776 
    777777      IF( ( lk_trdmxl_trc ) .AND. ( MOD( nitend-nittrc000+1, nn_trd_trc ) /= 0 ) ) THEN 
    778          WRITE(numout,cform_err) 
    779          WRITE(numout,*) '                Your nitend parameter, nitend = ', nitend 
    780          WRITE(numout,*) '                is no multiple of the trends diagnostics frequency        ' 
    781          WRITE(numout,*) '                          you defined, nn_trd_trc   = ', nn_trd_trc 
    782          WRITE(numout,*) '                This will not allow you to restart from this simulation.  ' 
    783          WRITE(numout,*) '                You should reconsider this choice.                        '  
    784          WRITE(numout,*)  
    785          WRITE(numout,*) '                N.B. the nitend parameter is also constrained to be a     ' 
    786          WRITE(numout,*) '                multiple of the sea-ice frequency parameter (typically 5) ' 
    787          nstop = nstop + 1 
     778         WRITE(ctmp1,*) '                Your nitend parameter, nitend = ', nitend 
     779         WRITE(ctmp2,*) '                is no multiple of the trends diagnostics frequency        ' 
     780         WRITE(ctmp3,*) '                          you defined, nn_trd_trc   = ', nn_trd_trc 
     781         WRITE(ctmp4,*) '                This will not allow you to restart from this simulation.  ' 
     782         WRITE(ctmp5,*) '                You should reconsider this choice.                        '  
     783         WRITE(ctmp6,*)  
     784         WRITE(ctmp7,*) '                N.B. the nitend parameter is also constrained to be a     ' 
     785         WRITE(ctmp8,*) '                multiple of the sea-ice frequency parameter (typically 5) ' 
     786         CALL ctl_stop( ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7, ctmp8 ) 
    788787      ENDIF 
    789788 
     
    795794 
    796795      IF( ( ln_trcadv_muscl .OR. ln_trcadv_muscl2 ) .AND. .NOT. ln_trdmxl_trc_instant ) THEN 
    797          WRITE(numout,cform_err) 
    798          WRITE(numout,*) '                Currently, you can NOT use simultaneously tracer MUSCL    ' 
    799          WRITE(numout,*) '                advection and window averaged diagnostics of ML trends.   ' 
    800          WRITE(numout,*) '                WHY? Everything in trdmxl_trc is coded for leap-frog, and ' 
    801          WRITE(numout,*) '                MUSCL scheme is Euler forward for passive tracers (note   ' 
    802          WRITE(numout,*) '                that MUSCL is leap-frog for active tracers T/S).          ' 
    803          WRITE(numout,*) '                In particuliar, entrainment trend would be FALSE. However ' 
    804          WRITE(numout,*) '                this residual is correct for instantaneous ML diagnostics.' 
    805          WRITE(numout,*)  
    806          nstop = nstop + 1 
     796         WRITE(ctmp1,*) '                Currently, you can NOT use simultaneously tracer MUSCL    ' 
     797         WRITE(ctmp2,*) '                advection and window averaged diagnostics of ML trends.   ' 
     798         WRITE(ctmp3,*) '                WHY? Everything in trdmxl_trc is coded for leap-frog, and ' 
     799         WRITE(ctmp4,*) '                MUSCL scheme is Euler forward for passive tracers (note   ' 
     800         WRITE(ctmp5,*) '                that MUSCL is leap-frog for active tracers T/S).          ' 
     801         WRITE(ctmp6,*) '                In particuliar, entrainment trend would be FALSE. However ' 
     802         WRITE(ctmp7,*) '                this residual is correct for instantaneous ML diagnostics.' 
     803         CALL ctl_stop( ctmp1, ctmp2, ctmp3, ctmp4, ctmp5, ctmp6, ctmp7 ) 
    807804      ENDIF 
    808805 
  • NEMO/trunk/src/TOP/TRP/trdmxl_trc_rst.F90

    r10068 r10425  
    5454         IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
    5555         IF(lwp) WRITE(numout,*) '             open ocean restart_mld_trc NetCDF  'TRIM(clpath)//TRIM(clname) 
    56          CALL iom_open( TRIM(clpath)//TRIM(clname), nummldw_trc, ldwrt = .TRUE., kiolib = jprstlib ) 
     56         CALL iom_open( TRIM(clpath)//TRIM(clname), nummldw_trc, ldwrt = .TRUE. ) 
    5757      ENDIF 
    5858 
     
    127127      CHARACTER (len=35) :: charout 
    128128      INTEGER ::  jk, jn, jl     ! loop indice 
    129       INTEGER ::  jlibalt = jprstlib 
    130129      LOGICAL ::  llok 
    131130      CHARACTER(LEN=256)  ::   clpath   ! full path to restart file 
     
    140139      clpath = TRIM(cn_trcrst_indir) 
    141140      IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 
    142       CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_trc_in), inum, kiolib = jlibalt )  
     141      CALL iom_open( TRIM(clpath)//TRIM(cn_trdrst_trc_in), inum )  
    143142       
    144143      IF( ln_trdmxl_trc_instant ) THEN  
  • NEMO/trunk/src/TOP/TRP/trdtrc_oce.F90

    r10068 r10425  
    117117      !!         *** ROUTINE trd_trc_oce_alloc *** 
    118118      !!---------------------------------------------------------------------- 
    119       USE lib_mpp, ONLY: ctl_warn 
     119      USE lib_mpp, ONLY: ctl_stop 
    120120      INTEGER :: ierr(2) 
    121121      !!---------------------------------------------------------------------- 
     
    146146      trd_trc_oce_alloc = MAXVAL(ierr) 
    147147      ! 
    148       IF( trd_trc_oce_alloc /= 0 )   CALL ctl_warn('trd_trc_oce_alloc: failed to allocate arrays') 
     148      IF( trd_trc_oce_alloc /= 0 )   CALL ctl_stop( 'STOP', 'trd_trc_oce_alloc: failed to allocate arrays' ) 
    149149      ! 
    150150# if defined key_trdmxl_trc 
Note: See TracChangeset for help on using the changeset viewer.