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

Changeset 7158


Ignore:
Timestamp:
2016-10-29T01:21:05+02:00 (7 years ago)
Author:
clem
Message:

debug branch

Location:
branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90

    r5385 r7158  
    8383      CALL ice_run_2                   ! read in namelist some run parameters 
    8484      !           
    85       rdt_ice = nn_fsbc * rdttra(1)    ! sea-ice time step 
     85      rdt_ice = nn_fsbc * rdt          ! sea-ice time step 
    8686      numit   = nit000 - 1 
    8787      ! 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/LIM_SRC_3/limrhg.F90

    r6994 r7158  
    157157 
    158158#if defined key_agrif  
    159       CALL agrif_interp_lim3('U')   ! First interpolation of coarse values 
    160       CALL agrif_interp_lim3('V') 
     159      CALL agrif_interp_lim3( 'U', 0, nn_nevp )   ! First interpolation of coarse values 
     160      CALL agrif_interp_lim3( 'V', 0, nn_nevp ) 
    161161#endif 
    162162      ! 
     
    460460             
    461461#if defined key_agrif 
     462!!            CALL agrif_interp_lim3( 'V', jter, nn_nevp ) 
    462463            CALL agrif_interp_lim3( 'V' ) 
    463464#endif 
     
    504505             
    505506#if defined key_agrif 
     507!!            CALL agrif_interp_lim3( 'U', jter, nn_nevp ) 
    506508            CALL agrif_interp_lim3( 'U' ) 
    507509#endif 
     
    550552             
    551553#if defined key_agrif 
     554!!            CALL agrif_interp_lim3( 'U', jter, nn_nevp ) 
    552555            CALL agrif_interp_lim3( 'U' ) 
    553556#endif 
     
    594597             
    595598#if defined key_agrif 
     599!!            CALL agrif_interp_lim3( 'V', jter, nn_nevp ) 
    596600            CALL agrif_interp_lim3( 'V' ) 
    597601#endif 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_interp.F90

    r7069 r7158  
    2424   USE ice 
    2525   USE agrif_ice 
    26  
     26    
    2727   IMPLICIT NONE 
    2828   PRIVATE 
     
    3838CONTAINS 
    3939 
    40    SUBROUTINE agrif_interp_lim3( cd_type ) 
     40   SUBROUTINE agrif_interp_lim3( cd_type, kiter, kitermax ) 
    4141      !!----------------------------------------------------------------------- 
    4242      !!                 *** ROUTINE agrif_rhg_lim3  *** 
    4343      !! 
    4444      !!  ** Method  : simple call to atomic routines using stored values to 
    45       !!  fill the boundaries depending of the position of the point and  
    46       !!  computing factor for time interpolation  
    47       !!----------------------------------------------------------------------- 
    48       CHARACTER(len=1), INTENT( in ) :: cd_type 
    49       !!     
     45      !!  fill the boundaries depending of the position of the point and 
     46      !!  computing factor for time interpolation 
     47      !!----------------------------------------------------------------------- 
     48      CHARACTER(len=1), INTENT( in )           :: cd_type 
     49      INTEGER         , INTENT( in ), OPTIONAL :: kiter, kitermax 
     50      !! 
    5051      REAL(wp) :: zbeta 
    5152      !!----------------------------------------------------------------------- 
     
    5354      IF( Agrif_Root() )  RETURN 
    5455      ! 
    55       zbeta = REAL(lim_nbstep) / ( Agrif_Rhot() * REAL(Agrif_Parent(nn_fsbc)) / REAL(nn_fsbc) ) 
    56       ! 
    57       ! clem: calledweight = zbeta(1/3;2/3;1) => 2/3*var1+1/3*var2 puis 1/3;2/3 puis 0;1 
     56      IF( PRESENT( kiter ) ) THEN  ! interpolation at the child sub-time step (for ice rheology) 
     57         zbeta = ( REAL(lim_nbstep) - REAL(kitermax - kiter) / REAL(kitermax) ) /  & 
     58            &    ( Agrif_Rhot() * REAL(Agrif_Parent(nn_fsbc)) / REAL(nn_fsbc) ) 
     59      ELSE                         ! interpolation at the child time step 
     60         zbeta = REAL(lim_nbstep) / ( Agrif_Rhot() * REAL(Agrif_Parent(nn_fsbc)) / REAL(nn_fsbc) ) 
     61      ENDIF 
     62      ! 
    5863      Agrif_SpecialValue=-9999. 
    5964      Agrif_UseSpecialValue = .TRUE. 
     
    126131 
    127132 
    128    SUBROUTINE interp_tra_ice( ptab, i1, i2, j1, j2, k1, k2, before ) 
     133   SUBROUTINE interp_tra_ice( ptab, i1, i2, j1, j2, k1, k2, before, nb, ndir ) 
    129134      !!----------------------------------------------------------------------- 
    130135      !!                    *** ROUTINE interp_tra_ice ***                            
     
    137142      INTEGER , INTENT(in) :: i1, i2, j1, j2, k1, k2 
    138143      LOGICAL , INTENT(in) :: before 
    139       !! 
    140       INTEGER :: jk, jl, jm 
     144      INTEGER , INTENT(in) :: nb, ndir 
     145      !! 
     146      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: ztab 
     147      INTEGER  ::   ji, jj, jk, jl, jm 
     148      INTEGER  ::   imin, imax, jmin, jmax 
     149      REAL(wp) ::   zrhox, z1, z2, z3, z4, z5, z6, z7 
     150      LOGICAL  ::   western_side, eastern_side, northern_side, southern_side 
     151 
    141152      !!----------------------------------------------------------------------- 
    142153      ! clem: pkoi on n'utilise pas les quantités intégrées ici => before: * e12t ; after: * r1_e12t / rhox / rhoy 
    143154      ! a priori c'est ok comme ca (cf ce qui est fait dans l'ocean). Je ne sais pas pkoi ceci dit 
    144        
     155      ALLOCATE( ztab(SIZE(a_i_b,1),SIZE(a_i_b,2),SIZE(ptab,3)) ) 
     156      
    145157      IF( before ) THEN  ! parent grid 
    146158         jm = 1 
    147159         DO jl = 1, jpl 
    148             ptab(:,:,jm) = a_i_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
    149             ptab(:,:,jm) = v_i_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
    150             ptab(:,:,jm) = v_s_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
    151             ptab(:,:,jm) = smv_i_b(i1:i2,j1:j2,jl) ; jm = jm + 1 
    152             ptab(:,:,jm) = oa_i_b (i1:i2,j1:j2,jl) ; jm = jm + 1 
     160            ptab(i1:i2,j1:j2,jm) = a_i_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
     161            ptab(i1:i2,j1:j2,jm) = v_i_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
     162            ptab(i1:i2,j1:j2,jm) = v_s_b  (i1:i2,j1:j2,jl) ; jm = jm + 1 
     163            ptab(i1:i2,j1:j2,jm) = smv_i_b(i1:i2,j1:j2,jl) ; jm = jm + 1 
     164            ptab(i1:i2,j1:j2,jm) = oa_i_b (i1:i2,j1:j2,jl) ; jm = jm + 1 
    153165            DO jk = 1, nlay_s 
    154                ptab(:,:,jm) = e_s_b(i1:i2,j1:j2,jk,jl) ; jm = jm + 1 
     166               ptab(i1:i2,j1:j2,jm) = e_s_b(i1:i2,j1:j2,jk,jl) ; jm = jm + 1 
    155167            ENDDO 
    156168            DO jk = 1, nlay_i 
    157                ptab(:,:,jm) = e_i_b(i1:i2,j1:j2,jk,jl) ; jm = jm + 1 
     169               ptab(i1:i2,j1:j2,jm) = e_i_b(i1:i2,j1:j2,jk,jl) ; jm = jm + 1 
    158170            ENDDO 
    159171         ENDDO 
    160          !!ptab(:,:,jm) = ato_i(i1:i2,j1:j2) 
    161172          
    162173         DO jk = k1, k2 
    163             WHERE( tmask(i1:i2,j1:j2,1) == 0. )  ptab(:,:,jk) = -9999. 
     174            WHERE( tmask(i1:i2,j1:j2,1) == 0. )  ptab(i1:i2,j1:j2,jk) = -9999. 
    164175         ENDDO 
    165176          
    166177      ELSE               ! child grid 
     178!! ==> The easiest interpolation is the following commented lines 
     179!!         jm = 1 
     180!!         DO jl = 1, jpl 
     181!!            a_i  (i1:i2,j1:j2,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     182!!            v_i  (i1:i2,j1:j2,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     183!!            v_s  (i1:i2,j1:j2,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     184!!            smv_i(i1:i2,j1:j2,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     185!!            oa_i (i1:i2,j1:j2,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     186!!            DO jk = 1, nlay_s 
     187!!               e_s(i1:i2,j1:j2,jk,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     188!!            ENDDO 
     189!!            DO jk = 1, nlay_i 
     190!!               e_i(i1:i2,j1:j2,jk,jl) = ptab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     191!!            ENDDO 
     192!!         ENDDO 
     193 
     194!! ==> this is a more complex interpolation since we mix solutions over a couple of grid points 
     195!!     it is advised to use it for fields modified by high order schemes (e.g. advection UM5...) 
     196         ! record ztab 
    167197         jm = 1 
    168198         DO jl = 1, jpl 
    169             a_i  (i1:i2,j1:j2,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
    170             v_i  (i1:i2,j1:j2,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
    171             v_s  (i1:i2,j1:j2,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
    172             smv_i(i1:i2,j1:j2,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
    173             oa_i (i1:i2,j1:j2,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     199            ztab(:,:,jm) = a_i_b  (:,:,jl) ; jm = jm + 1 
     200            ztab(:,:,jm) = v_i_b  (:,:,jl) ; jm = jm + 1 
     201            ztab(:,:,jm) = v_s_b  (:,:,jl) ; jm = jm + 1 
     202            ztab(:,:,jm) = smv_i_b(:,:,jl) ; jm = jm + 1 
     203            ztab(:,:,jm) = oa_i_b (:,:,jl) ; jm = jm + 1 
    174204            DO jk = 1, nlay_s 
    175                e_s(i1:i2,j1:j2,jk,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     205               ztab(:,:,jm) = e_s_b(:,:,jk,jl) ; jm = jm + 1 
    176206            ENDDO 
    177207            DO jk = 1, nlay_i 
    178                e_i(i1:i2,j1:j2,jk,jl) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     208               ztab(:,:,jm) = e_i_b(:,:,jk,jl) ; jm = jm + 1 
    179209            ENDDO 
    180210         ENDDO 
    181          !!ato_i(i1:i2,j1:j2) = ptab(:,:,jm) * tmask(i1:i2,j1:j2,1) 
     211         ! 
     212         ! borders of the domain 
     213         western_side  = (nb == 1).AND.(ndir == 1)  ;  eastern_side  = (nb == 1).AND.(ndir == 2) 
     214         southern_side = (nb == 2).AND.(ndir == 1)  ;  northern_side = (nb == 2).AND.(ndir == 2) 
     215         ! 
     216         ! spatial smoothing 
     217         zrhox = Agrif_Rhox() 
     218         z1 =      ( zrhox - 1. ) * 0.5  
     219         z3 =      ( zrhox - 1. ) / ( zrhox + 1. ) 
     220         z6 = 2. * ( zrhox - 1. ) / ( zrhox + 1. ) 
     221         z7 =    - ( zrhox - 1. ) / ( zrhox + 3. ) 
     222         z2 = 1. - z1 
     223         z4 = 1. - z3 
     224         z5 = 1. - z6 - z7 
     225         ! 
     226         ! Remove corners 
     227         imin = i1  ;  imax = i2  ;  jmin = j1  ;  jmax = j2 
     228         IF( (nbondj == -1) .OR. (nbondj == 2) )   jmin = 3 
     229         IF( (nbondj == +1) .OR. (nbondj == 2) )   jmax = nlcj-2 
     230         IF( (nbondi == -1) .OR. (nbondi == 2) )   imin = 3 
     231         IF( (nbondi == +1) .OR. (nbondi == 2) )   imax = nlci-2 
     232 
     233         ! smoothed fields 
     234         IF( eastern_side ) THEN 
     235            ztab(nlci,j1:j2,:) = z1 * ptab(nlci,j1:j2,:) + z2 * ptab(nlci-1,j1:j2,:) 
     236            DO jj = jmin, jmax 
     237               rswitch = 0. 
     238               IF( u_ice(nlci-2,jj) > 0._wp ) rswitch = 1. 
     239               ztab(nlci-1,jj,:) = ( 1. - umask(nlci-2,jj,1) ) * ztab(nlci,jj,:)  & 
     240                  &                +      umask(nlci-2,jj,1)   *  & 
     241                  &                ( ( 1. - rswitch ) * ( z4 * ztab(nlci,jj,:)   + z3 * ztab(nlci-2,jj,:) )  & 
     242                  &                  +      rswitch   * ( z6 * ztab(nlci-2,jj,:) + z5 * ztab(nlci,jj,:) + z7 * ztab(nlci-3,jj,:) ) ) 
     243               ztab(nlci-1,jj,:) = ztab(nlci-1,jj,:) * tmask(nlci-1,jj,1) 
     244            END DO 
     245         ENDIF 
     246         !  
     247         IF( northern_side ) THEN 
     248            ztab(i1:i2,nlcj,:) = z1 * ptab(i1:i2,nlcj,:) + z2 * ptab(i1:i2,nlcj-1,:) 
     249            DO ji = imin, imax 
     250               rswitch = 0. 
     251               IF( v_ice(ji,nlcj-2) > 0._wp ) rswitch = 1. 
     252               ztab(ji,nlcj-1,:) = ( 1. - vmask(ji,nlcj-2,1) ) * ztab(ji,nlcj,:)  & 
     253                  &                +      vmask(ji,nlcj-2,1)   *  & 
     254                  &                ( ( 1. - rswitch ) * ( z4 * ztab(ji,nlcj,:)   + z3 * ztab(ji,nlcj-2,:) ) & 
     255                  &                  +      rswitch   * ( z6 * ztab(ji,nlcj-2,:) + z5 * ztab(ji,nlcj,:) + z7 * ztab(ji,nlcj-3,:) ) ) 
     256               ztab(ji,nlcj-1,:) = ztab(ji,nlcj-1,:) * tmask(ji,nlcj-1,1) 
     257            END DO 
     258         END IF 
     259         ! 
     260         IF( western_side) THEN 
     261            ztab(1,j1:j2,:) = z1 * ptab(1,j1:j2,:) + z2 * ptab(2,j1:j2,:) 
     262            DO jj = jmin, jmax 
     263               rswitch = 0. 
     264               IF( u_ice(2,jj) > 0._wp ) rswitch = 1. 
     265               ztab(2,jj,:) = ( 1. - umask(2,jj,1) ) * ztab(1,jj,:)  & 
     266                  &           +      umask(2,jj,1)   *   & 
     267                  &           ( ( 1. - rswitch ) * ( z4 * ztab(1,jj,:) + z3 * ztab(3,jj,:) ) & 
     268                  &             +      rswitch   * ( z6 * ztab(3,jj,:) + z5 * ztab(1,jj,:) + z7 * ztab(4,jj,:) ) ) 
     269               ztab(2,jj,:) = ztab(2,jj,:) * tmask(2,jj,1) 
     270            END DO 
     271         ENDIF 
     272         ! 
     273         IF( southern_side ) THEN 
     274            ztab(i1:i2,1,:) = z1 * ptab(i1:i2,1,:) + z2 * ptab(i1:i2,2,:) 
     275            DO ji = imin, imax 
     276               rswitch = 0. 
     277               IF( v_ice(ji,2) > 0._wp ) rswitch = 1. 
     278               ztab(ji,2,:) = ( 1. - vmask(ji,2,1) ) * ztab(ji,1,:)  & 
     279                  &           +      vmask(ji,2,1)   *  & 
     280                  &           ( ( 1. - rswitch ) * ( z4 * ztab(ji,1,:) + z3 * ztab(ji,3,:) ) & 
     281                  &             +      rswitch   * ( z6 * ztab(ji,3,:) + z5 * ztab(ji,1,:) + z7 * ztab(ji,4,:) ) ) 
     282               ztab(ji,2,:) = ztab(ji,2,:) * tmask(ji,2,1) 
     283            END DO 
     284         END IF 
     285         ! 
     286         ! Treatment of corners 
     287         IF( (eastern_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) )  ztab(nlci-1,2,:)      = ptab(nlci-1,2,:)      ! East south 
     288         IF( (eastern_side) .AND. ((nbondj ==  1).OR.(nbondj == 2)) )  ztab(nlci-1,nlcj-1,:) = ptab(nlci-1,nlcj-1,:) ! East north 
     289         IF( (western_side) .AND. ((nbondj == -1).OR.(nbondj == 2)) )  ztab(2,2,:)           = ptab(2,2,:)           ! West south 
     290         IF( (western_side) .AND. ((nbondj ==  1).OR.(nbondj == 2)) )  ztab(2,nlcj-1,:)      = ptab(2,nlcj-1,:)      ! West north 
     291 
     292         ! retrieve ice tracers 
     293         jm = 1 
     294         DO jl = 1, jpl 
     295            a_i  (i1:i2,j1:j2,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     296            v_i  (i1:i2,j1:j2,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     297            v_s  (i1:i2,j1:j2,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     298            smv_i(i1:i2,j1:j2,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     299            oa_i (i1:i2,j1:j2,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     300            DO jk = 1, nlay_s 
     301               e_s(i1:i2,j1:j2,jk,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     302            ENDDO 
     303            DO jk = 1, nlay_i 
     304               e_i(i1:i2,j1:j2,jk,jl) = ztab(i1:i2,j1:j2,jm) * tmask(i1:i2,j1:j2,1) ; jm = jm + 1 
     305            ENDDO 
     306         ENDDO 
    182307          
    183308      ENDIF 
     309       
     310      DEALLOCATE( ztab ) 
    184311      ! 
    185312   END SUBROUTINE interp_tra_ice 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_lim3_update.F90

    r6746 r7158  
    5252      !!---------------------------------------------------------------------- 
    5353      ! 
    54       IF( ( Agrif_NbStepint() .NE. (Agrif_irhot()-1) ) .AND. (kt /= 0) )  RETURN  ! do not update if nb of child time steps differ from time refinement 
    55                                                                                   ! i.e. update only at the parent time step 
     54!      IF( ( MOD( kt-nit000, Agrif_irhot() * Agrif_Parent(nn_fsbc) ) /=0 ) .AND. (kt /= 0) ) THEN 
     55!         PRINT *, 'clem NOT udpate, kt=',kt,Agrif_NbStepint() 
     56!      ELSE 
     57!         PRINT *, 'clem     UPDATE, kt=',kt,Agrif_NbStepint() 
     58!      ENDIF 
    5659 
     60      !! clem: I think the update should take place each time the ocean sees the surface forcings (but maybe I am wrong and we should update every rhot time steps)  
     61      IF( ( MOD( kt-nit000, Agrif_irhot() * Agrif_Parent(nn_fsbc) ) /=0 ) .AND. (kt /= 0) ) RETURN ! do not update if nb of child time steps differ from time refinement 
     62                                                                                                   ! i.e. update only at the parent time step 
     63      !! clem: this condition is clearly wrong if nn_fsbc/=1 (==> Agrif_NbStepint /= (Agrif_irhot()-1) all the time) 
     64      !!IF( ( Agrif_NbStepint() .NE. (Agrif_irhot()-1) ) .AND. (kt /= 0) )  RETURN 
     65       
    5766      Agrif_UseSpecialValueInUpdate = .TRUE. 
    5867      Agrif_SpecialValueFineGrid = -9999. 
     
    6069      IF( MOD(nbcline,nbclineupdate) == 0) THEN ! update the whole basin at each nbclineupdate (=nn_cln_update) baroclinic parent time steps 
    6170                                                ! nbcline is incremented (+1) at the end of each parent time step from 0 (1st time step) 
    62                                                 ! clem: j'ai l'impression qu'il y a un decalage de 1 mais selon rachid c ok 
    6371         CALL Agrif_Update_Variable( tra_ice_id , procname = update_tra_ice  ) 
    6472         CALL Agrif_Update_Variable( u_ice_id   , procname = update_u_ice    ) 
    6573         CALL Agrif_Update_Variable( v_ice_id   , procname = update_v_ice    ) 
    66       ELSE                                      ! update only the boundaries 
    67                                                 ! defined par locupdate 
     74      ELSE                                      ! update only the boundaries defined par locupdate 
    6875         CALL Agrif_Update_Variable( tra_ice_id , locupdate=(/0,2/), procname = update_tra_ice  ) 
    6976         CALL Agrif_Update_Variable( u_ice_id   , locupdate=(/0,1/), procname = update_u_ice    ) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/NST_SRC/agrif_user.F90

    r7060 r7158  
    241241         WRITE(cl_check2,*)  NINT(rdt) 
    242242         WRITE(cl_check3,*)  NINT(Agrif_Parent(rdt)/Agrif_Rhot()) 
    243          CALL ctl_warn( 'incompatible time step between grids',   & 
     243         CALL ctl_stop( 'incompatible time step between ocean grids',   & 
    244244               &               'parent grid value : '//cl_check1    ,   &  
    245245               &               'child  grid value : '//cl_check2    ,   &  
    246                &               'value on child grid will be changed to : '//cl_check3 ) 
    247          rdt=Agrif_Parent(rdt)/Agrif_Rhot() 
     246               &               'value on child grid should be changed to : '//cl_check3 ) 
    248247      ENDIF 
    249248 
     
    565564   !!---------------------------------------------------------------------- 
    566565   USE Agrif_Util 
     566   USE sbc_oce, ONLY : nn_fsbc  ! clem: necessary otherwise Agrif_Parent(nn_fsbc) = nn_fsbc 
    567567   USE ice 
    568568   USE agrif_ice 
     
    579579   CALL agrif_declare_var_lim3 
    580580 
    581    ! clem: reset nn_fsbc(child) to rhot if rhot * nn_fsbc(parent) /= N * nn_fsbc(child) with N being integer 
     581   ! Controls (clem) 
     582   ! stop if rhot * nn_fsbc(parent) /= N * nn_fsbc(child) with N being integer 
    582583   IF( MOD( Agrif_irhot() * Agrif_Parent(nn_fsbc), nn_fsbc ) /= 0 )  THEN 
    583       nn_fsbc = Agrif_irhot() 
    584       CALL ctl_warn ('rhot * nn_fsbc(parent) /= N * nn_fsbc(child), therefore nn_fsbc(child) is set to rhot') 
    585       WRITE(*,*) 'New nn_fsbc(child) = ', nn_fsbc 
     584      CALL ctl_stop('rhot * nn_fsbc(parent) /= N * nn_fsbc(child), therefore nn_fsbc(child) should be set to 1 or nn_fsbc(parent)') 
    586585   ENDIF 
    587586 
    588    ! clem: reset update frequency if different from nn_fsbc 
    589    IF( nbclineupdate /= nn_fsbc ) THEN 
    590       nbclineupdate = nn_fsbc 
    591       CALL ctl_warn ('With ice model on child grid, nc_cln_update is set to nn_fsbc') 
    592    ENDIF 
     587   ! stop if update frequency is different from nn_fsbc 
     588   IF( nbclineupdate > nn_fsbc )  CALL ctl_stop('With ice model on child grid, nn_cln_update should be set to 1 or nn_fsbc') 
     589 
    593590 
    594591   ! First Interpolations (using "after" ice subtime step => lim_nbstep=1) 
     
    603600   !---------------------- 
    604601   CALL agrif_update_lim3(0) 
     602 
    605603   ! 
    606604END SUBROUTINE Agrif_InitValues_cont_lim3 
     
    613611   !!---------------------------------------------------------------------- 
    614612   USE Agrif_Util 
    615    USE Agrif_ice  !clem useless ? 
    616613   USE ice 
    617614 
     
    703700         WRITE(cl_check2,*)  rdt 
    704701         WRITE(cl_check3,*)  rdt*Agrif_Rhot() 
    705          CALL ctl_warn( 'incompatible time step between grids',   & 
     702         CALL ctl_stop( 'incompatible time step between grids',   & 
    706703               &               'parent grid value : '//cl_check1    ,   &  
    707704               &               'child  grid value : '//cl_check2    ,   &  
    708                &               'value on child grid will be changed to  & 
     705               &               'value on child grid should be changed to  & 
    709706               &               :'//cl_check3  ) 
    710          rdt=rdt*Agrif_Rhot() 
    711707      ENDIF 
    712708 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OFF_SRC/domrea.F90

    r5504 r7158  
    124124         &             nn_write, ln_dimgnnn, ln_mskland  , ln_cfmeta    , ln_clobber, nn_chunksz, nn_euler 
    125125      NAMELIST/namdom/ nn_bathy , rn_bathy, rn_e3zps_min, rn_e3zps_rat, nn_msh    , rn_hmin,   & 
    126          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,            & 
    127          &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea , ln_crs, & 
     126         &             rn_atfp     , rn_rdt  , nn_baro     , nn_closea , ln_crs, & 
    128127         &             jphgr_msh, & 
    129128         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
     
    194193      ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    195194      ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    196       adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     195      adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    197196 
    198197#if defined key_agrif 
     
    239238         WRITE(numout,*) '      asselin time filter parameter        rn_atfp   = ', rn_atfp 
    240239         WRITE(numout,*) '      time-splitting: nb of sub time-step  nn_baro   = ', nn_baro 
    241          WRITE(numout,*) '      acceleration of converge             nn_acc    = ', nn_acc 
    242          WRITE(numout,*) '        nn_acc=1: surface tracer rdt       rn_rdtmin = ', rn_rdtmin 
    243          WRITE(numout,*) '                  bottom  tracer rdt       rdtmax    = ', rn_rdtmax 
    244          WRITE(numout,*) '                  depth of transition      rn_rdth   = ', rn_rdth 
    245240         WRITE(numout,*) '      suppression of closed seas (=0)      nn_closea = ', nn_closea 
    246241         WRITE(numout,*) '      type of horizontal mesh jphgr_msh           = ', jphgr_msh 
     
    268263      e3zps_rat = rn_e3zps_rat 
    269264      nmsh      = nn_msh 
    270       nacc      = nn_acc 
    271265      atfp      = rn_atfp 
    272266      rdt       = rn_rdt 
    273       rdtmin    = rn_rdtmin 
    274       rdtmax    = rn_rdtmin 
    275       rdth      = rn_rdth 
    276267 
    277268      REWIND( numnam_ref )              ! Namelist namcla in reference namelist : Cross land advection 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90

    r5540 r7158  
    208208      ENDIF 
    209209 
    210       IF ( nacc /= 0 ) & 
    211          & CALL ctl_stop( ' nacc /= 0 and key_asminc :',  & 
    212          &                ' Assimilation increments have only been implemented', & 
    213          &                ' for synchronous time stepping' ) 
    214  
    215210      IF ( ( ln_asmdin ).AND.( ln_asmiau ) )   & 
    216211         & CALL ctl_stop( ' ln_asmdin and ln_asmiau :', & 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90

    r5912 r7158  
    325325      ENDIF 
    326326 
    327       IF ( nsec_day == NINT(0.5_wp * rdttra(1)) .AND. zflag==1 ) THEN 
     327      IF ( nsec_day == NINT(0.5_wp * rdt) .AND. zflag==1 ) THEN 
    328328        ! 
    329329        kt_tide = kt 
     
    440440            ! We refresh nodal factors every day below 
    441441            ! This should be done somewhere else 
    442             IF ( nsec_day == NINT(0.5_wp * rdttra(1)) .AND. lk_first_btstp ) THEN 
     442            IF ( nsec_day == NINT(0.5_wp * rdt) .AND. lk_first_btstp ) THEN 
    443443               ! 
    444444               kt_tide = kt                
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/C1D/domc1d.F90

    r5215 r7158  
    4444      !!---------------------------------------------------------------------- 
    4545      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
    46          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
    47          &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    & 
     46         &             rn_atfp     , rn_rdt   , nn_closea , ln_crs,    & 
    4847         &             jphgr_msh, & 
    4948         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90

    r5506 r7158  
    116116          
    117117         ! Conversion in m3 
    118          a_fwf    = a_fwf * rdttra(1) * 1.e-3  
     118         a_fwf    = a_fwf * rdt * 1.e-3  
    119119          
    120120         ! fwf correction to bring back the mean ssh to zero 
     
    404404         WRITE(inum,*) 
    405405         WRITE(inum,*)    'Net freshwater budget ' 
    406          WRITE(inum,9010) '  fwf    = ',a_fwf,   ' m3 =', a_fwf   /(FLOAT(nitend-nit000+1)*rdttra(1)) * 1.e-6,' Sv' 
     406         WRITE(inum,9010) '  fwf    = ',a_fwf,   ' m3 =', a_fwf   /(FLOAT(nitend-nit000+1)*rdt) * 1.e-6,' Sv' 
    407407         WRITE(inum,*) 
    408408         WRITE(inum,9010) '  zarea =',zarea 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DIA/dianam.F90

    r2528 r7158  
    7171      ENDIF 
    7272 
    73       IF( llfsec .OR. kfreq < 0 ) THEN   ;   inbsec = kfreq                       ! output frequency already in seconds 
    74       ELSE                               ;   inbsec = kfreq * NINT( rdttra(1) )   ! from time-step to seconds 
     73      IF( llfsec .OR. kfreq < 0 ) THEN   ;   inbsec = kfreq                 ! output frequency already in seconds 
     74      ELSE                               ;   inbsec = kfreq * NINT( rdt )   ! from time-step to seconds 
    7575      ENDIF 
    7676      iddss = NINT( rday          )                                         ! number of seconds in 1 day 
     
    116116      ! date of the beginning and the end of the run 
    117117 
    118       zdrun = rdttra(1) / rday * REAL( nitend - nit000, wp )                ! length of the run in days 
    119       zjul  = fjulday - rdttra(1) / rday 
     118      zdrun = rdt / rday * REAL( nitend - nit000, wp )                      ! length of the run in days 
     119      zjul  = fjulday - rdt / rday 
    120120      CALL ju2ymds( zjul        , iyear1, imonth1, iday1, zsec1 )           ! year/month/day of the beginning of run 
    121121      CALL ju2ymds( zjul + zdrun, iyear2, imonth2, iday2, zsec2 )           ! year/month/day of the end       of run 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r6348 r7158  
    447447      ! Define frequency of output and means 
    448448      zdt = rdt 
    449       IF( nacc == 1 ) zdt = rdtmin 
    450449      clop = "x"         ! no use of the mask value (require less cpu time, and otherwise the model crashes) 
    451450#if defined key_diainstant 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r5564 r7158  
    2020   !! 
    2121   !!   we suppose that the time step is deviding the number of second of in a day 
    22    !!             ---> MOD( rday, rdttra(1) ) == 0 
     22   !!             ---> MOD( rday, rdt ) == 0 
    2323   !! 
    2424   !!           ----------- WARNING ----------- 
     
    7878            &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 
    7979      ENDIF 
    80       ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0 
    81       IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
    82       IF( MOD( rday     , 2.        ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
    83       IF( MOD( rdttra(1), 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
    84       nsecd   = NINT(rday           ) 
    85       nsecd05 = NINT(0.5 * rday     ) 
    86       ndt     = NINT(      rdttra(1)) 
    87       ndt05   = NINT(0.5 * rdttra(1)) 
     80      ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 
     81      IF( MOD( rday     , rdt ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
     82      IF( MOD( rday     , 2.  ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
     83      IF( MOD( rdt  , 2.      ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
     84      nsecd   = NINT(rday       ) 
     85      nsecd05 = NINT(0.5 * rday ) 
     86      ndt     = NINT(      rdt  ) 
     87      ndt05   = NINT(0.5 * rdt  ) 
    8888 
    8989      IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 
     
    223223      nsec_week  = nsec_week  + ndt 
    224224      nsec_day   = nsec_day   + ndt 
    225       adatrj  = adatrj  + rdttra(1) / rday 
    226       fjulday = fjulday + rdttra(1) / rday 
     225      adatrj  = adatrj  + rdt / rday 
     226      fjulday = fjulday + rdt / rday 
    227227      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    228228      IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error 
     
    334334               ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    335335               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    336                adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     336               adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    337337               ! note this is wrong if time step has changed during run 
    338338            ENDIF 
     
    340340            ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    341341            ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    342             adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     342            adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    343343         ENDIF 
    344344         IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r6796 r7158  
    3535   REAL(wp), PUBLIC ::   rn_e3zps_rat    !: minimum thickness ration for partial steps 
    3636   INTEGER , PUBLIC ::   nn_msh          !: = 1 create a mesh-mask file 
    37    INTEGER , PUBLIC ::   nn_acc          !: = 0/1 use of the acceleration of convergence technique 
    3837   REAL(wp), PUBLIC ::   rn_atfp         !: asselin time filter parameter 
    3938   REAL(wp), PUBLIC ::   rn_rdt          !: time step for the dynamics (and tracer if nacc=0) 
    40    REAL(wp), PUBLIC ::   rn_rdtmin       !: minimum time step on tracers 
    41    REAL(wp), PUBLIC ::   rn_rdtmax       !: maximum time step on tracers 
    42    REAL(wp), PUBLIC ::   rn_rdth         !: depth variation of tracer step 
    4339   INTEGER , PUBLIC ::   nn_closea       !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
    4440   INTEGER , PUBLIC ::   nn_euler        !: =0 start with forward time step or not (=1) 
     
    9490   REAL(wp), PUBLIC ::   e3zps_rat       !: minimum thickness ration for partial steps 
    9591   INTEGER , PUBLIC ::   nmsh            !: = 1 create a mesh-mask file 
    96    INTEGER , PUBLIC ::   nacc            !: = 0/1 use of the acceleration of convergence technique 
    9792   REAL(wp), PUBLIC ::   atfp            !: asselin time filter parameter 
    9893   REAL(wp), PUBLIC ::   rdt             !: time step for the dynamics (and tracer if nacc=0) 
    99    REAL(wp), PUBLIC ::   rdtmin          !: minimum time step on tracers 
    100    REAL(wp), PUBLIC ::   rdtmax          !: maximum time step on tracers 
    101    REAL(wp), PUBLIC ::   rdth            !: depth variation of tracer step 
    10294 
    10395   !                                                  !!! associated variables 
    10496   INTEGER , PUBLIC                 ::   neuler        !: restart euler forward option (0=Euler) 
    10597   REAL(wp), PUBLIC                 ::   atfp1         !: asselin time filter coeff. (atfp1= 1-2*atfp) 
    106    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   rdttra  !: vertical profile of tracer time step 
    107    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dtra  !: = 2*rdttra except at nit000 (=rdttra) if neuler=0 
     98   REAL(wp), PUBLIC                 ::   r2dt          !: = 2*rdt except at nit000 (=rdt) if neuler=0 
    10899 
    109100   !                                         !!* Namelist namcla : cross land advection 
     
    338329      ierr(:) = 0 
    339330      ! 
    340       ALLOCATE( rdttra(jpk), r2dtra(jpk), mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj),  & 
     331      ALLOCATE( mig(jpi), mjg(jpj), nfiimpp(jpni,jpnj),  & 
    341332         &      nfipproc(jpni,jpnj), nfilcit(jpni,jpnj), STAT=ierr(1) ) 
    342333         ! 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r5363 r7158  
    140140         &             nn_write, ln_dimgnnn, ln_mskland  , ln_cfmeta    , ln_clobber, nn_chunksz, nn_euler 
    141141      NAMELIST/namdom/ nn_bathy, rn_bathy , rn_e3zps_min, rn_e3zps_rat, nn_msh, rn_hmin,   & 
    142          &             nn_acc   , rn_atfp     , rn_rdt      , rn_rdtmin ,                  & 
    143          &             rn_rdtmax, rn_rdth     , nn_closea , ln_crs,    & 
     142         &             rn_atfp     , rn_rdt  , nn_closea , ln_crs,    & 
    144143         &             jphgr_msh, & 
    145144         &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m, & 
     
    268267         WRITE(numout,*) '      ocean time step                       rn_rdt    = ', rn_rdt 
    269268         WRITE(numout,*) '      asselin time filter parameter         rn_atfp   = ', rn_atfp 
    270          WRITE(numout,*) '      acceleration of converge              nn_acc    = ', nn_acc 
    271          WRITE(numout,*) '        nn_acc=1: surface tracer rdt        rn_rdtmin = ', rn_rdtmin 
    272          WRITE(numout,*) '                  bottom  tracer rdt        rdtmax    = ', rn_rdtmax 
    273          WRITE(numout,*) '                  depth of transition       rn_rdth   = ', rn_rdth 
    274269         WRITE(numout,*) '      suppression of closed seas (=0)       nn_closea = ', nn_closea 
    275270         WRITE(numout,*) '      online coarsening of dynamical fields ln_crs    = ', ln_crs 
     
    298293      e3zps_rat = rn_e3zps_rat 
    299294      nmsh      = nn_msh 
    300       nacc      = nn_acc 
    301295      atfp      = rn_atfp 
    302296      rdt       = rn_rdt 
    303       rdtmin    = rn_rdtmin 
    304       rdtmax    = rn_rdtmin 
    305       rdth      = rn_rdth 
    306297 
    307298      REWIND( numnam_ref )              ! Namelist namcla in reference namelist : Cross land advection 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90

    r7069 r7158  
    463463         gphi0 = 0._wp 
    464464          
     465#if defined key_agrif  
     466         IF( .NOT. Agrif_Root() ) THEN 
     467            glam0  = Agrif_Parent(glam0) + (Agrif_ix())*Agrif_Parent(ppe1_m) * 1.e-5 
     468            gphi0  = Agrif_Parent(gphi0) + (Agrif_iy())*Agrif_Parent(ppe2_m) * 1.e-5 
     469            ppe1_m = Agrif_Parent(ppe1_m)/Agrif_Rhox() 
     470            ppe2_m = Agrif_Parent(ppe2_m)/Agrif_Rhoy()           
     471         ENDIF 
     472#endif          
     473 
    465474         DO jj = 1, jpj 
    466475            DO ji = 1, jpi 
     
    484493         ! Horizontal scale factors (in meters) 
    485494         !                              ====== 
     495!! ==> EITHER 1) variable scale factors 
    486496         DO jj = 1, jpj 
    487497            DO ji = 1, jpi 
    488                e1t(ji,jj) = ppe1_m * EXP(-0.8/REAL(jpiglo**2)*(mi0(ji)-REAL(jpiglo+1)*0.5)**2) 
    489                e2t(ji,jj) = ppe2_m * EXP(-0.8/REAL(jpjglo**2)*(mj0(jj)-REAL(jpjglo+1)*0.5)**2) 
     498               !!e1t(ji,jj) = ppe1_m * EXP( -0.8/REAL(jpiglo**2) * (mi0(ji)-REAL(jpiglo+1)*0.5)**2 )  ! gaussian shape 
     499               !!e2t(ji,jj) = ppe2_m * EXP( -0.8/REAL(jpjglo**2) * (mj0(jj)-REAL(jpjglo+1)*0.5)**2 )  ! gaussian shape 
     500               e1t(ji,jj) = ppe1_m * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5) ) ! linear shape 
     501               e2t(ji,jj) = ppe2_m * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5) ) ! linear shape 
    490502            END DO 
    491503         END DO 
     504#if defined key_agrif  
     505         IF( .NOT. Agrif_Root() ) THEN ! only works if the zoom is positioned at the center of the parent grid 
     506            DO jj = 1, jpj 
     507               DO ji = 1, jpi 
     508                  e1t(ji,jj) = ppe1_m * ( 1. -0.1 * ABS(REAL(mi0(ji))-REAL(jpiglo+1)*0.5) / (1.-REAL(jpiglo+1)*0.5)  & 
     509                     &                            * REAL(jpiglo) / REAL(Agrif_Parent(jpiglo) * Agrif_Rhox()) )       ! factor to match parent grid 
     510                  e2t(ji,jj) = ppe2_m * ( 1. -0.1 * ABS(REAL(mj0(jj))-REAL(jpjglo+1)*0.5) / (1.-REAL(jpjglo+1)*0.5)  & 
     511                     &                            * REAL(jpjglo) / REAL(Agrif_Parent(jpjglo) * Agrif_Rhoy()) )       ! factor to match parent grid 
     512               END DO 
     513            END DO 
     514         ENDIF 
     515#endif 
     516!! ==> OR 2) constant scale factors 
     517         e1t(:,:) = ppe1_m 
     518         e2t(:,:) = ppe2_m 
     519          
    492520         e1u(:,:) = e1t(:,:)      ;      e2u(:,:) = e2t(:,:) 
    493521         e1v(:,:) = e1t(:,:)      ;      e2v(:,:) = e2t(:,:) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DOM/domstp.F90

    r4292 r7158  
    3434      !!---------------------------------------------------------------------- 
    3535      !!                    ***  ROUTINE dom_stp  *** 
    36       !!           
     36      !!          
    3737      !! ** Purpose :   Intialize ocean time step for the run 
    3838      !! 
     
    4141      !!      filter parameter read in namelist 
    4242      !!              - Model time step: 
    43       !!      nacc = 0 : synchronous time intergration.  
    44       !!      There is one time step only, defined by: rdt, rdttra(k)=rdt 
    45       !!      nacc = 1 : accelerating the convergence. There is 2 different 
    46       !!      time steps for dynamics and tracers: 
    47       !!        rdt      : dynamical part 
    48       !!        rdttra(k): temperature and salinity 
    49       !!      The tracer time step is a function of vertical level. the model 
    50       !!      reference time step ( i.e. for wind stress, surface heat and 
    51       !!      salt fluxes) is the surface tracer time step is rdttra(1). 
    52       !!         N.B. depth dependent acceleration of convergence is not im- 
    53       !!      plemented for s-coordinate. 
     43      !!                synchronous time intergration. 
     44      !!      There is one time step only, defined by: rdt for dynamics and 
     45      !!      tracer,wind stress, surface heat and salt fluxes 
    5446      !! 
    55       !! ** Action  : - rdttra   : vertical profile of tracer time step 
     47      !! ** Action  : [REMOVED - rdttra: vertical profile of tracer time step] 
    5648      !!              - atfp1    : = 1 - 2*atfp 
    5749      !! 
     
    7264      atfp1 = 1. - 2. * atfp 
    7365 
    74       SELECT CASE ( nacc ) 
     66      IF(lwp) WRITE(numout,*)'               synchronous time stepping' 
     67      IF(lwp) WRITE(numout,*)'               dynamics and tracer time step = ',rdt/3600., ' hours' 
    7568 
    76          CASE ( 0 )                ! Synchronous time stepping 
    77             IF(lwp) WRITE(numout,*)'               synchronous time stepping' 
    78             IF(lwp) WRITE(numout,*)'               dynamics and tracer time step = ', rdt/3600., ' hours' 
    79  
    80             rdttra(:) = rdt 
    81  
    82          CASE ( 1 )                ! Accelerating the convergence 
    83             IF(lwp) WRITE(numout,*) '              no tracer damping in the turbocline' 
    84             IF(lwp) WRITE(numout,*)'               accelerating the convergence' 
    85             IF(lwp) WRITE(numout,*)'               dynamics time step = ', rdt/3600., ' hours' 
    86             IF( ln_sco .AND. rdtmin /= rdtmax .AND. lk_vvl )   & 
    87                  & CALL ctl_stop ( ' depth dependent acceleration of convergence not implemented in s-coordinates & 
    88                  &                   nor in variable volume' ) 
    89             IF(lwp) WRITE(numout,*)'         tracers   time step :  dt (hours)  level' 
    90  
    91             DO jk = 1, jpk 
    92                IF( gdept_1d(jk) <= rdth ) rdttra(jk) = rdtmin 
    93                IF( gdept_1d(jk) >  rdth ) THEN 
    94                   rdttra(jk) = rdtmin + ( rdtmax - rdtmin )   & 
    95                                       * ( EXP( ( gdept_1d(jk ) - rdth ) / rdth ) - 1. )   & 
    96                                       / ( EXP( ( gdept_1d(jpk) - rdth ) / rdth ) - 1. ) 
    97                ENDIF 
    98                IF(lwp) WRITE(numout,"(36x,f5.2,5x,i3)") rdttra(jk)/3600., jk 
    99             END DO   
    100  
    101          CASE DEFAULT              ! E R R O R  
    102  
    103             WRITE(ctmp1,*) ' nacc value e r r o r, nacc= ',nacc 
    104             CALL ctl_stop( ctmp1 ) 
    105  
    106       END SELECT 
    10769 
    10870   END SUBROUTINE dom_stp 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf.F90

    r4990 r7158  
    3535 
    3636   INTEGER  ::   nzdf = 0   ! type vertical diffusion algorithm used, defined from ln_zdf... namlist logicals 
    37    REAL(wp) ::   r2dt       ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0 
    3837 
    3938   !! * Substitutions 
     
    6564      !                                          ! set time step 
    6665      IF( neuler == 0 .AND. kt == nit000     ) THEN   ;   r2dt =      rdt   ! = rdtra (restart with Euler time stepping) 
    67       ELSEIF(               kt <= nit000 + 1 ) THEN   ;   r2dt = 2. * rdt   ! = 2 rdttra (leapfrog) 
     66      ELSEIF(               kt <= nit000 + 1 ) THEN   ;   r2dt = 2. * rdt   ! = 2 rdt (leapfrog) 
    6867      ENDIF 
    6968 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r7069 r7158  
    18131813            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
    18141814            DO WHILE ( idx /= 0 )  
    1815                cldate = iom_sdate( fjulday - rdttra(1) / rday ) 
     1815               cldate = iom_sdate( fjulday - rdt / rday ) 
    18161816               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+11:LEN_TRIM(clname)) 
    18171817               idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
     
    18201820            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
    18211821            DO WHILE ( idx /= 0 )  
    1822                cldate = iom_sdate( fjulday - rdttra(1) / rday, ldfull = .TRUE. ) 
     1822               cldate = iom_sdate( fjulday - rdt / rday, ldfull = .TRUE. ) 
    18231823               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+15:LEN_TRIM(clname)) 
    18241824               idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
     
    18271827            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
    18281828            DO WHILE ( idx /= 0 )  
    1829                cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
     1829               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE. ) 
    18301830               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+9:LEN_TRIM(clname)) 
    18311831               idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
     
    18341834            idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
    18351835            DO WHILE ( idx /= 0 )  
    1836                cldate = iom_sdate( fjulday + rdttra(1) / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
     1836               cldate = iom_sdate( fjulday + rdt / rday * REAL( nitend - nit000, wp ), ld24 = .TRUE., ldfull = .TRUE. ) 
    18371837               clname = clname(1:idx-1)//TRIM(cldate)//clname(idx+13:LEN_TRIM(clname)) 
    18381838               idx = INDEX(clname,'@enddatefull@') + INDEX(clname,'@ENDDATEFULL@') 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5407 r7158  
    123123      !!---------------------------------------------------------------------- 
    124124 
    125                      CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rdt       )   ! dynamics time step 
    126                      CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) )   ! surface tracer time step 
     125                     CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rdt       )     ! dynamics and tracer time step 
    127126 
    128127                     CALL iom_rstput( kt, nitrst, numrow, 'ub'     , ub        )     ! before fields 
     
    205204      !! ** Method  :   Read in restart.nc file fields which are necessary for restart 
    206205      !!---------------------------------------------------------------------- 
    207       REAL(wp) ::   zrdt, zrdttra1 
     206      REAL(wp) ::   zrdt 
    208207      INTEGER  ::   jk 
    209208      LOGICAL  ::   llok 
     
    216215         CALL iom_get( numror, 'rdt', zrdt ) 
    217216         IF( zrdt /= rdt )   neuler = 0 
    218       ENDIF 
    219       IF( iom_varid( numror, 'rdttra1', ldstop = .FALSE. ) > 0 )   THEN 
    220          CALL iom_get( numror, 'rdttra1', zrdttra1 ) 
    221          IF( zrdttra1 /= rdttra(1) )   neuler = 0 
    222217      ENDIF 
    223218      !  
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90

    r6204 r7158  
    166166         isecsbc = nsec_year + nsec1jan000 + (kit+it_offset)*NINT( rdt/REAL(nn_baro,wp) ) 
    167167      ELSE                      ! middle of sbc time step 
    168          isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdttra(1)) + it_offset * NINT(rdttra(1)) 
     168         isecsbc = nsec_year + nsec1jan000 + NINT(0.5 * REAL(kn_fsbc - 1,wp) * rdt) + it_offset * NINT(rdt) 
    169169      ENDIF 
    170170      imf = SIZE( sd ) 
     
    193193               CALL fld_rec( kn_fsbc, sd(jf), kt_offset = it_offset, kit = kit )    ! update after record informations 
    194194 
    195                ! if kn_fsbc*rdttra is larger than nfreqh (which is kind of odd), 
     195               ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 
    196196               ! it is possible that the before value is no more the good one... we have to re-read it 
    197197               ! if before is not the last record of the file currently opened and after is the first record to be read 
     
    214214               IF( sd(jf)%ln_tint ) THEN 
    215215                   
    216                   ! if kn_fsbc*rdttra is larger than nfreqh (which is kind of odd), 
     216                  ! if kn_fsbc*rdt is larger than nfreqh (which is kind of odd), 
    217217                  ! it is possible that the before value is no more the good one... we have to re-read it 
    218218                  ! if before record is not just just before the after record... 
     
    245245                        ! year/month/week/day file to be not present. If the run continue further than the current 
    246246                        ! year/month/week/day, next year/month/week/day file must exist 
    247                         isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdttra(1))   ! second at the end of the run  
     247                        isecend = nsec_year + nsec1jan000 + (nitend - kt) * NINT(rdt)   ! second at the end of the run  
    248248                        llstop = isecend > sd(jf)%nrec_a(2)                                   ! read more than 1 record of next year 
    249249                        ! we suppose that the date of next file is next day (should be ok even for weekly files...) 
     
    460460      IF( PRESENT(kt_offset) )   it_offset = kt_offset 
    461461      IF( PRESENT(kit) ) THEN   ;   it_offset = ( kit + it_offset ) * NINT( rdt/REAL(nn_baro,wp) ) 
    462       ELSE                      ;   it_offset =         it_offset   * NINT(       rdttra(1)      ) 
     462      ELSE                      ;   it_offset =         it_offset   * NINT(       rdt            ) 
    463463      ENDIF 
    464464      ! 
     
    537537         ELSE                                           ;   ztmp = REAL(nsec_year ,wp)  ! since 00h on Jan 1 of the current year 
    538538         ENDIF 
    539          ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdttra(1) + REAL( it_offset, wp )  ! centrered in the middle of sbc time step 
    540          ztmp = ztmp + 0.01 * rdttra(1)                                                 ! avoid truncation error  
     539         ztmp = ztmp + 0.5 * REAL(kn_fsbc - 1, wp) * rdt + REAL( it_offset, wp )  ! centrered in the middle of sbc time step 
     540         ztmp = ztmp + 0.01 * rdt                                                 ! avoid truncation error  
    541541         IF( sdjf%ln_tint ) THEN                ! time interpolation, shift by 1/2 record 
    542542            ! 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90

    r7077 r7158  
    44   !! Ocean forcing:  analytical momentum, heat and freshwater forcings 
    55   !!===================================================================== 
    6    !! History :  3.0   ! 2006-06  (G. Madec)  Original code 
    7    !!            3.2   ! 2009-07  (G. Madec)  Style only 
     6   !! History :  3.0   ! 2006-06  (G. Madec)    Original code 
     7   !!            3.2   ! 2009-07  (G. Madec)    Style only 
     8   !!            3.7   ! 2016-10  (C. Rousset)  Add analytic for LIM3 (ana_ice) 
    89   !!---------------------------------------------------------------------- 
    910 
     
    193194 
    194195      ! ice variables deduced from above 
    195       zsnw(:,:) = 0._wp 
    196       CALL lim_thd_snwblow( pfrld, zsnw )  ! snow distribution over ice after wind blowing  
    197       emp_ice  (:,:)   = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw 
    198       emp_oce  (:,:)   = emp_oce(:,:) - sprecip(:,:) * (1._wp - zsnw ) 
     196      zsnw(:,:) = 1._wp 
     197      !!CALL lim_thd_snwblow( pfrld, zsnw )  ! snow distribution over ice after wind blowing  
     198      emp_ice  (:,:)   = SUM( a_i_b(:,:,:) * evap_ice(:,:,:), dim=3 ) - sprecip(:,:) * zsnw(:,:) 
     199      emp_oce  (:,:)   = emp_oce(:,:) - sprecip(:,:) * (1._wp - zsnw(:,:) ) 
    199200      qevap_ice(:,:,:) =   0._wp 
    200201      qprec_ice(:,:)   =   rhosn * ( sst_m(:,:) * cpic - lfus ) * tmask(:,:,1) ! in J/m3 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r6970 r7158  
    844844      LOGICAL  ::   llnewtx, llnewtau      ! update wind stress components and module?? 
    845845      INTEGER  ::   ji, jj, jn             ! dummy loop indices 
    846       INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdttra did not change since nit000) 
     846      INTEGER  ::   isec                   ! number of seconds since nit000 (assuming rdt did not change since nit000) 
    847847      REAL(wp) ::   zcumulneg, zcumulpos   ! temporary scalars      
    848848      REAL(wp) ::   zcoef                  ! temporary scalar 
     
    862862      !                                                      ! Receive all the atmos. fields (including ice information) 
    863863      !                                                      ! ======================================================= ! 
    864       isec = ( kt - nit000 ) * NINT( rdttra(1) )                ! date of exchanges 
     864      isec = ( kt - nit000 ) * NINT( rdt )                      ! date of exchanges 
    865865      DO jn = 1, jprcv                                          ! received fields sent by the atmosphere 
    866866         IF( srcv(jn)%laction )   CALL cpl_rcv( jn, isec, frcv(jn)%z3, xcplmask(:,:,1:nn_cplmodel), nrcvinfo(jn) ) 
     
    17701770      CALL wrk_alloc( jpi,jpj,jpl, ztmp3, ztmp4 ) 
    17711771 
    1772       isec = ( kt - nit000 ) * NINT(rdttra(1))        ! date of exchanges 
     1772      isec = ( kt - nit000 ) * NINT(rdt)        ! date of exchanges 
    17731773 
    17741774      zfr_l(:,:) = 1.- fr_i(:,:) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcdcy.F90

    r3764 r7158  
    9090 
    9191      ! When are we during the day (from 0 to 1) 
    92       zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdttra(1) ) / rday 
    93       zup = zlo + ( REAL(nn_fsbc, wp)     * rdttra(1) ) / rday 
     92      zlo = ( REAL(nsec_day, wp) - 0.5_wp * rdt ) / rday 
     93      zup = zlo + ( REAL(nn_fsbc, wp)     * rdt ) / rday 
    9494      !                                           
    9595      IF( nday_qsr == -1 ) THEN       ! first time step only   
     
    189189         END DO   
    190190         ! 
    191          ztmp = rday / ( rdttra(1) * REAL(nn_fsbc, wp) ) 
     191         ztmp = rday / ( rdt * REAL(nn_fsbc, wp) ) 
    192192         rscal(:,:) = rscal(:,:) * ztmp 
    193193         ! 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r5628 r7158  
    129129         ENDIF    
    130130         !                                         ! Update fwfold if new year start 
    131          ikty = 365 * 86400 / rdttra(1)    !!bug  use of 365 days leap year or 360d year !!!!!!! 
     131         ikty = 365 * 86400 / rdt           !!bug  use of 365 days leap year or 360d year !!!!!!! 
    132132         IF( MOD( kt, ikty ) == 0 ) THEN 
    133133            a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r7077 r7158  
    132132 
    133133# if defined key_agrif 
    134          IF( .NOT. Agrif_Root() ) THEN 
    135             lim_nbstep = MOD( lim_nbstep, Agrif_irhot() * Agrif_Parent(nn_fsbc) / nn_fsbc ) + 1 
    136          ENDIF 
     134         IF( .NOT. Agrif_Root() )  lim_nbstep = MOD( lim_nbstep, Agrif_irhot() * Agrif_Parent(nn_fsbc) / nn_fsbc ) + 1 
    137135# endif 
    138136 
     
    180178                                      CALL lim_rst_opn( kt )   ! Open Ice restart file 
    181179         ! 
    182 #if defined key_agrif 
    183           IF( .NOT. Agrif_Root() )    CALL agrif_interp_lim3('T') 
    184 #endif 
    185180         ! --- zap this if no ice dynamics --- ! 
    186181         IF( .NOT. lk_c1d .AND. ln_limdyn ) THEN 
     
    201196         ! --- 
    202197#if defined key_agrif 
    203           IF( .NOT. Agrif_Root() )    CALL agrif_interp_lim3('T') 
     198         IF( .NOT. Agrif_Root() )     CALL agrif_interp_lim3('T') 
    204199#endif 
    205200#if defined key_bdy 
     
    270265                                      CALL lim_var_agg( 2 )     ! necessary calls (at least for coupling) 
    271266                                      ! 
     267# if defined key_agrif 
     268!!         IF( .NOT. Agrif_Root() )     CALL Agrif_ChildGrid_To_ParentGrid()  ! clem: should be called at the update frequency only (cf agrif_lim3_update) 
     269# endif 
    272270                                      CALL lim_sbc_flx( kt )    ! -- Update surface ocean mass, heat and salt fluxes 
    273                                       ! 
     271# if defined key_agrif 
     272!!         IF( .NOT. Agrif_Root() )     CALL Agrif_ParentGrid_To_ChildGrid()  ! clem: should be called at the update frequency only (cf agrif_lim3_update) 
     273# endif 
    274274         IF( ln_limdiahsb )           CALL lim_diahsb( kt )     ! -- Diagnostics and outputs  
    275275         ! 
     
    438438      ! 
    439439      ! sea-ice timestep and inverse 
    440       rdt_ice   = nn_fsbc * rdttra(1)   
     440      rdt_ice   = REAL(nn_fsbc) * rdt   
    441441      r1_rdtice = 1._wp / rdt_ice  
    442442 
     
    448448      IF( lwp .AND. ln_limdiachk )  CALL ctl_warn('online conservation check activated but it does not work with BDY') 
    449449#endif 
     450      ! 
     451      IF( lwp ) WRITE(numout,*) '   ice timestep rdt_ice  = ', rdt_ice 
    450452      ! 
    451453   END SUBROUTINE ice_run 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90

    r5215 r7158  
    4949      !!---------------------------------------------------------------------- 
    5050 
    51       IF( nsec_day == NINT(0.5_wp * rdttra(1)) ) THEN      ! start a new day 
     51      IF( nsec_day == NINT(0.5_wp * rdt) ) THEN      ! start a new day 
    5252         ! 
    5353         IF( kt == nit000 ) THEN 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90

    r5147 r7158  
    8686      !                                          ! set time step 
    8787      IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000 
    88          r2dtra(:) =  rdttra(:)                          ! = rdtra (restarting with Euler time stepping) 
     88         r2dt =  rdt                                ! = rdt (restarting with Euler time stepping) 
    8989      ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1 
    90          r2dtra(:) = 2._wp * rdttra(:)                   ! = 2 rdttra (leapfrog) 
     90         r2dt = 2._wp * rdt                         ! = 2 rdt (leapfrog) 
    9191      ENDIF 
    9292      ! 
     
    122122    
    123123      SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==! 
    124       CASE ( 1 )   ;    CALL tra_adv_cen2   ( kt, nit000, 'TRA',         zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  2nd order centered 
    125       CASE ( 2 )   ;    CALL tra_adv_tvd    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD  
    126       CASE ( 3 )   ;    CALL tra_adv_muscl  ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )   !  MUSCL  
    127       CASE ( 4 )   ;    CALL tra_adv_muscl2 ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  MUSCL2  
    128       CASE ( 5 )   ;    CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  UBS  
    129       CASE ( 6 )   ;    CALL tra_adv_qck    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  QUICKEST  
    130       CASE ( 7 )   ;    CALL tra_adv_tvd_zts( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD ZTS 
     124      CASE ( 1 )   ;    CALL tra_adv_cen2   ( kt, nit000, 'TRA',       zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  2nd order centered 
     125      CASE ( 2 )   ;    CALL tra_adv_tvd    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD  
     126      CASE ( 3 )   ;    CALL tra_adv_muscl  ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )   !  MUSCL  
     127      CASE ( 4 )   ;    CALL tra_adv_muscl2 ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  MUSCL2  
     128      CASE ( 5 )   ;    CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  UBS  
     129      CASE ( 6 )   ;    CALL tra_adv_qck    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  QUICKEST  
     130      CASE ( 7 )   ;    CALL tra_adv_tvd_zts( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )   !  TVD ZTS 
    131131      ! 
    132132      CASE (-1 )                                      !==  esopa: test all possibility with control print  ==! 
     
    134134         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv0 - Ta: ', mask1=tmask,               & 
    135135            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    136          CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
     136         CALL tra_adv_tvd   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
    137137         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv1 - Ta: ', mask1=tmask,               & 
    138138            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    139          CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )           
     139         CALL tra_adv_muscl ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts, ln_traadv_msc_ups )           
    140140         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv3 - Ta: ', mask1=tmask,               & 
    141141            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    142          CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
     142         CALL tra_adv_muscl2( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
    143143         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv4 - Ta: ', mask1=tmask,               & 
    144144            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    145          CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
     145         CALL tra_adv_ubs   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
    146146         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv5 - Ta: ', mask1=tmask,               & 
    147147            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    148          CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
     148         CALL tra_adv_qck   ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts )           
    149149         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv6 - Ta: ', mask1=tmask,               & 
    150150            &          tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90

    r5147 r7158  
    7272      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    7373      LOGICAL                              , INTENT(in   ) ::   ld_msc_ups      ! use upstream scheme within muscl 
    74       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     74      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    7575      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components 
    7676      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb             ! before tracer field 
     
    176176         !                                             !-- MUSCL horizontal advective fluxes 
    177177         DO jk = 1, jpkm1                                     ! interior values 
    178             zdt  = p2dt(jk) 
     178            zdt  = p2dt 
    179179            DO jj = 2, jpjm1 
    180180               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    259259         ! 
    260260         DO jk = 1, jpkm1                                     ! interior values 
    261             zdt  = p2dt(jk) 
     261            zdt  = p2dt 
    262262            DO jj = 2, jpjm1       
    263263               DO ji = fs_2, fs_jpim1   ! vector opt. 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90

    r5147 r7158  
    6363      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator) 
    6464      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    65       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     65      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    6666      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components 
    6767      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before & now tracer fields 
     
    133133        !                                             !-- MUSCL horizontal advective fluxes 
    134134         DO jk = 1, jpkm1                                     ! interior values 
    135             zdt  = p2dt(jk) 
     135            zdt  = p2dt 
    136136            DO jj = 2, jpjm1 
    137137               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    240240         ! 
    241241         DO jk = 1, jpkm1                                     ! interior values 
    242             zdt  = p2dt(jk) 
     242            zdt  = p2dt 
    243243            DO jj = 2, jpjm1 
    244244               DO ji = fs_2, fs_jpim1   ! vector opt. 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90

    r5147 r7158  
    8888      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator) 
    8989      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    90       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     90      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    9191      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components 
    9292      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields 
     
    125125      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator) 
    126126      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers 
    127       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step 
     127      REAL(wp)                             , INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step 
    128128      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun        ! i-velocity components 
    129129      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields 
     
    170170         ! 
    171171         DO jk = 1, jpkm1   
    172             zdt =  p2dt(jk) 
     172            zdt =  p2dt 
    173173            DO jj = 2, jpjm1 
    174174               DO ji = fs_2, fs_jpim1   ! vector opt.    
     
    246246      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator) 
    247247      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers 
    248       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step 
     248      REAL(wp)                             , INTENT(in   ) ::   p2dt       ! vertical profile of tracer time-step 
    249249      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pvn        ! j-velocity components 
    250250      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn   ! before and now tracer fields 
     
    293293         ! 
    294294         DO jk = 1, jpkm1   
    295             zdt =  p2dt(jk) 
     295            zdt =  p2dt 
    296296            DO jj = 2, jpjm1 
    297297               DO ji = fs_2, fs_jpim1   ! vector opt.    
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90

    r6774 r7158  
    7474      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator) 
    7575      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    76       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     76      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    7777      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components 
    7878      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields 
     
    170170         ! total advective trend 
    171171         DO jk = 1, jpkm1 
    172             z2dtt = p2dt(jk) 
     172            z2dtt = p2dt 
    173173            DO jj = 2, jpjm1 
    174174               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    300300      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator) 
    301301      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    302       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     302      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    303303      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean velocity components 
    304304      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields 
    305305      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta             ! tracer trend  
    306306      ! 
    307       REAL(wp), DIMENSION( jpk )                           ::   zts             ! length of sub-timestep for vertical advection 
    308       REAL(wp), DIMENSION( jpk )                           ::   zr_p2dt         ! reciprocal of tracer timestep 
     307      REAL(wp)                                             ::   zts             ! length of sub-timestep for vertical advection 
     308      REAL(wp)                                             ::   zr_p2dt         ! reciprocal of tracer timestep 
    309309      INTEGER  ::   ji, jj, jk, jl, jn       ! dummy loop indices   
    310310      INTEGER  ::   jnzts = 5       ! number of sub-timesteps for vertical advection 
     
    343343      zwi(:,:,:) = 0._wp 
    344344      z_rzts = 1._wp / REAL( jnzts, wp ) 
    345       zr_p2dt(:) = 1._wp / p2dt(:) 
     345      zr_p2dt = 1._wp / p2dt 
    346346      ! 
    347347      !                                                          ! =========== 
     
    406406         ! total advective trend 
    407407         DO jk = 1, jpkm1 
    408             z2dtt = p2dt(jk) 
     408            z2dtt = p2dt 
    409409            DO jj = 2, jpjm1 
    410410               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    477477            IF( jl == 1 ) THEN              ! Euler forward to kick things off 
    478478              jtb = 1   ;   jtn = 1   ;   jta = 2 
    479               zts(:) = p2dt(:) * z_rzts 
     479              zts = p2dt * z_rzts 
    480480              jtaken = MOD( jnzts + 1 , 2)  ! Toggle to collect every second flux 
    481481                                            ! starting at jl =1 if jnzts is odd;  
     
    483483            ELSEIF( jl == 2 ) THEN          ! First leapfrog step 
    484484              jtb = 1   ;   jtn = 2   ;   jta = 3 
    485               zts(:) = 2._wp * p2dt(:) * z_rzts 
     485              zts = 2._wp * p2dt * z_rzts 
    486486            ELSE                            ! Shuffle pointers for subsequent leapfrog steps 
    487487              jtb = MOD(jtb,3) + 1 
     
    493493                  DO ji = fs_2, fs_jpim1 
    494494                     zwz(ji,jj,jk) = 0.5_wp * pwn(ji,jj,jk) * ( ztrs(ji,jj,jk,jtn) + ztrs(ji,jj,jk-1,jtn) ) 
    495                      IF( jtaken == 0 ) zwzts(ji,jj,jk) = zwzts(ji,jj,jk) + zwz(ji,jj,jk)*zts(jk)           ! Accumulate time-weighted vertcal flux 
     495                     IF( jtaken == 0 ) zwzts(ji,jj,jk) = zwzts(ji,jj,jk) + zwz(ji,jj,jk)*zts           ! Accumulate time-weighted vertcal flux 
    496496                  END DO 
    497497               END DO 
     
    506506                     ! total advective trends 
    507507                     ztra = - zbtr * (  zhdiv(ji,jj,jk) + zwz(ji,jj,jk) - zwz(ji  ,jj  ,jk+1) ) 
    508                      ztrs(ji,jj,jk,jta) = ztrs(ji,jj,jk,jtb) + zts(jk) * ztra 
     508                     ztrs(ji,jj,jk,jta) = ztrs(ji,jj,jk,jtb) + zts * ztra 
    509509                  END DO 
    510510               END DO 
     
    516516            DO jj = 2, jpjm1 
    517517               DO ji = fs_2, fs_jpim1 
    518                   zwz(ji,jj,jk) = zwzts(ji,jj,jk) * zr_p2dt(jk) - zwz_sav(ji,jj,jk) 
     518                  zwz(ji,jj,jk) = zwzts(ji,jj,jk) * zr_p2dt - zwz_sav(ji,jj,jk) 
    519519               END DO 
    520520            END DO 
     
    585585      !!       in-space based differencing for fluid 
    586586      !!---------------------------------------------------------------------- 
    587       REAL(wp), DIMENSION(jpk)         , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     587      REAL(wp)                         , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    588588      REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(in   ) ::   pbef, paft      ! before & after field 
    589589      REAL(wp), DIMENSION (jpi,jpj,jpk), INTENT(inout) ::   paa, pbb, pcc   ! monotonic fluxes in the 3 directions 
     
    614614      DO jk = 1, jpkm1 
    615615         ikm1 = MAX(jk-1,1) 
    616          z2dtt = p2dt(jk) 
     616         z2dtt = p2dt 
    617617         DO jj = 2, jpjm1 
    618618            DO ji = fs_2, fs_jpim1   ! vector opt. 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90

    r5147 r7158  
    8181      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype          ! =TRA or TRC (tracer indicator) 
    8282      INTEGER                              , INTENT(in   ) ::   kjpt            ! number of tracers 
    83       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
     83      REAL(wp)                             , INTENT(in   ) ::   p2dt            ! vertical profile of tracer time-step 
    8484      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pun, pvn, pwn   ! 3 ocean transport components 
    8585      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb, ptn        ! before and now tracer fields 
     
    207207         ! update and guess with monotonic sheme 
    208208         DO jk = 1, jpkm1 
    209             z2dtt = p2dt(jk) 
     209            z2dtt = p2dt 
    210210            DO jj = 2, jpjm1 
    211211               DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    281281      !!       in-space based differencing for fluid 
    282282      !!---------------------------------------------------------------------- 
    283       REAL(wp), INTENT(in   ), DIMENSION(jpk)          ::   p2dt   ! vertical profile of tracer time-step 
     283      REAL(wp), INTENT(in   )                          ::   p2dt   ! vertical profile of tracer time-step 
    284284      REAL(wp),                DIMENSION (jpi,jpj,jpk) ::   pbef   ! before field 
    285285      REAL(wp), INTENT(inout), DIMENSION (jpi,jpj,jpk) ::   paft   ! after field 
     
    340340 
    341341      DO jk = 1, jpkm1 
    342          z2dtt = p2dt(jk) 
     342         z2dtt = p2dt 
    343343         DO jj = 2, jpjm1 
    344344            DO ji = fs_2, fs_jpim1   ! vector opt. 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90

    r6353 r7158  
    334334      ELSE 
    335335         DO jk = 1, jpkm1 
    336             t0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / ( z12 *rdttra(jk) ) 
    337             s0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / ( z12 *rdttra(jk) ) 
     336            t0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / ( z12 *rdt ) 
     337            s0_ldf(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / ( z12 *rdt ) 
    338338         END DO 
    339339      ENDIF 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r6204 r7158  
    122122  
    123123      ! set time step size (Euler/Leapfrog) 
    124       IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dtra(:) =     rdttra(:)      ! at nit000             (Euler) 
    125       ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dtra(:) = 2._wp* rdttra(:)      ! at nit000 or nit000+1 (Leapfrog) 
     124      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =        rdt      ! at nit000             (Euler) 
     125      ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt = 2._wp* rdt      ! at nit000 or nit000+1 (Leapfrog) 
    126126      ENDIF 
    127127 
     
    145145      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
    146146         ! 
    147          IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdttra, 'TRA', tsb, tsn, tsa,   & 
    148            &                                                              sbc_tsc, sbc_tsc_b, jpts )  ! variable volume level (vvl)  
    149          ELSE                 ;   CALL tra_nxt_fix( kt, nit000,         'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level  
     147         IF( lk_vvl )  THEN   ;   CALL tra_nxt_vvl( kt, nit000, rdt, 'TRA', tsb, tsn, tsa,   & 
     148           &                                                           sbc_tsc, sbc_tsc_b, jpts )  ! variable volume level (vvl)  
     149         ELSE                 ;   CALL tra_nxt_fix( kt, nit000,      'TRA', tsb, tsn, tsa, jpts )  ! fixed    volume level  
    150150         ENDIF 
    151151      ENDIF      
     
    154154      IF( l_trdtra ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt      
    155155         DO jk = 1, jpkm1 
    156             zfact = 1._wp / r2dtra(jk)              
     156            zfact = 1._wp / r2dt              
    157157            ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact 
    158158            ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact 
     
    265265      INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index 
    266266      INTEGER         , INTENT(in   )                               ::  kit000   ! first time step index 
    267       REAL(wp)        , INTENT(in   ), DIMENSION(jpk)               ::  p2dt     ! time-step 
     267      REAL(wp)        , INTENT(in   )                               ::  p2dt     ! time-step 
    268268      CHARACTER(len=3), INTENT(in   )                               ::  cdtype   ! =TRA or TRC (tracer indicator) 
    269269      INTEGER         , INTENT(in   )                               ::  kjpt     ! number of tracers 
     
    305305      DO jn = 1, kjpt       
    306306         DO jk = 1, jpkm1 
    307             zfact1 = atfp * p2dt(jk) 
     307            zfact1 = atfp * p2dt 
    308308            zfact2 = zfact1 / rau0 
    309309            DO jj = 1, jpj 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r5385 r7158  
    6666      ! 
    6767      IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000 
    68          r2dtra(:) =  rdttra(:)                          ! = rdtra (restarting with Euler time stepping) 
     68         r2dt =  rdt                                ! = rdtra (restarting with Euler time stepping) 
    6969      ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1 
    70          r2dtra(:) = 2. * rdttra(:)                      ! = 2 rdttra (leapfrog) 
     70         r2dt = 2. * rdt                            ! = 2 rdt (leapfrog) 
    7171      ENDIF 
    7272 
     
    7878 
    7979      SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend 
    80       CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme  
    81       CASE ( 1 )    ;    CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts )  !   implicit scheme  
     80      CASE ( 0 )    ;    CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt, nn_zdfexp, tsb, tsa, jpts )  !   explicit scheme  
     81      CASE ( 1 )    ;    CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt,            tsb, tsa, jpts )  !   implicit scheme  
    8282      CASE ( -1 )                                       ! esopa: test all possibility with control print 
    83          CALL tra_zdf_exp( kt, nit000, 'TRA', r2dtra, nn_zdfexp, tsb, tsa, jpts ) 
     83         CALL tra_zdf_exp( kt, nit000, 'TRA', r2dt, nn_zdfexp, tsb, tsa, jpts ) 
    8484         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf0 - Ta: ', mask1=tmask,               & 
    8585         &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
    86          CALL tra_zdf_imp( kt, nit000, 'TRA', r2dtra,            tsb, tsa, jpts )  
     86         CALL tra_zdf_imp( kt, nit000, 'TRA', r2dt,            tsb, tsa, jpts )  
    8787         CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' zdf1 - Ta: ', mask1=tmask,               & 
    8888         &             tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
     
    9595      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
    9696         DO jk = 1, jpkm1 
    97             ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dtra(jk) ) - ztrdt(:,:,jk) 
    98             ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dtra(jk) ) - ztrds(:,:,jk) 
     97            ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk) 
     98            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk) 
    9999         END DO 
    100100         CALL lbc_lnk( ztrdt, 'T', 1. ) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_exp.F90

    r3294 r7158  
    8181      INTEGER                              , INTENT(in   ) ::   kjpt        ! number of tracers 
    8282      INTEGER                              , INTENT(in   ) ::   kn_zdfexp   ! number of sub-time step 
    83       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt        ! vertical profile of tracer time-step 
     83      REAL(wp)                             , INTENT(in   ) ::   p2dt        ! vertical profile of tracer time-step 
    8484      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb         ! before and now tracer fields 
    8585      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta         ! tracer trend  
     
    136136                  DO ji = fs_2, fs_jpim1   ! vector opt. 
    137137                     ze3tr = zlavmr / fse3t_n(ji,jj,jk) 
    138                      zwx(ji,jj,jk) = zwx(ji,jj,jk) + p2dt(jk) * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) * ze3tr 
     138                     zwx(ji,jj,jk) = zwx(ji,jj,jk) + p2dt * ( zwy(ji,jj,jk) - zwy(ji,jj,jk+1) ) * ze3tr 
    139139                  END DO 
    140140               END DO 
     
    150150                  DO ji = fs_2, fs_jpim1   ! vector opt. 
    151151                     ze3tb = fse3t_b(ji,jj,jk) / fse3t(ji,jj,jk)                          ! before e3t 
    152                      ztra  = zwx(ji,jj,jk) - ptb(ji,jj,jk,jn) + p2dt(jk) * pta(ji,jj,jk,jn)       ! total trends * 2*rdt  
     152                     ztra  = zwx(ji,jj,jk) - ptb(ji,jj,jk,jn) + p2dt * pta(ji,jj,jk,jn)       ! total trends * 2*rdt  
    153153                     pta(ji,jj,jk,jn) = ( ze3tb * ptb(ji,jj,jk,jn) + ztra ) * tmask(ji,jj,jk) 
    154154                  END DO 
     
    159159               DO jj = 2, jpjm1  
    160160                  DO ji = fs_2, fs_jpim1   ! vector opt. 
    161                      pta(ji,jj,jk,jn) = ( zwx(ji,jj,jk) + p2dt(jk) * pta(ji,jj,jk,jn) ) * tmask(ji,jj,jk) 
     161                     pta(ji,jj,jk,jn) = ( zwx(ji,jj,jk) + p2dt * pta(ji,jj,jk,jn) ) * tmask(ji,jj,jk) 
    162162                  END DO 
    163163               END DO 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf_imp.F90

    r5120 r7158  
    8282      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype   ! =TRA or TRC (tracer indicator) 
    8383      INTEGER                              , INTENT(in   ) ::   kjpt     ! number of tracers 
    84       REAL(wp), DIMENSION(        jpk     ), INTENT(in   ) ::   p2dt     ! vertical profile of tracer time-step 
     84      REAL(wp)                             , INTENT(in   ) ::   p2dt     ! vertical profile of tracer time-step 
    8585      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb      ! before and now tracer fields 
    8686      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta      ! tracer trend  
     
    154154                     ze3ta =  ( 1. - r_vvl ) +        r_vvl   * fse3t_a(ji,jj,jk)   ! after scale factor at T-point 
    155155                     ze3tn =         r_vvl   + ( 1. - r_vvl ) * fse3t_n(ji,jj,jk)   ! now   scale factor at T-point 
    156                      zwi(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk  ) / ( ze3tn * fse3w(ji,jj,jk  ) ) 
    157                      zws(ji,jj,jk) = - p2dt(jk) * zwt(ji,jj,jk+1) / ( ze3tn * fse3w(ji,jj,jk+1) ) 
     156                     zwi(ji,jj,jk) = - p2dt * zwt(ji,jj,jk  ) / ( ze3tn * fse3w(ji,jj,jk  ) ) 
     157                     zws(ji,jj,jk) = - p2dt * zwt(ji,jj,jk+1) / ( ze3tn * fse3w(ji,jj,jk+1) ) 
    158158                     zwd(ji,jj,jk) = ze3ta - zwi(ji,jj,jk) - zws(ji,jj,jk) 
    159159                 END DO 
     
    203203               ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t(ji,jj,1) 
    204204               pta(ji,jj,1,jn) = ze3tb * ptb(ji,jj,1,jn)                     & 
    205                   &                      + p2dt(1) * ze3tn * pta(ji,jj,1,jn) 
     205                  &                      + p2dt * ze3tn * pta(ji,jj,1,jn) 
    206206            END DO 
    207207         END DO 
     
    211211                  ze3tb = ( 1. - r_vvl ) + r_vvl * fse3t_b(ji,jj,jk) 
    212212                  ze3tn = ( 1. - r_vvl ) + r_vvl * fse3t  (ji,jj,jk) 
    213                   zrhs = ze3tb * ptb(ji,jj,jk,jn) + p2dt(jk) * ze3tn * pta(ji,jj,jk,jn)   ! zrhs=right hand side  
     213                  zrhs = ze3tb * ptb(ji,jj,jk,jn) + p2dt * ze3tn * pta(ji,jj,jk,jn)   ! zrhs=right hand side  
    214214                  pta(ji,jj,jk,jn) = zrhs - zwi(ji,jj,jk) / zwt(ji,jj,jk-1) * pta(ji,jj,jk-1,jn) 
    215215               END DO 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r4990 r7158  
    3535 
    3636   PUBLIC   trd_tra   ! called by all tra_... modules 
    37  
    38    REAL(wp) ::   r2dt   ! time-step, = 2 rdttra except at nit000 (=rdttra) if neuler=0 
    3937 
    4038   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   trdtx, trdty, trdt   ! use to store the temperature trends 
     
    228226 
    229227      IF( neuler == 0 .AND. kt == nit000    ) THEN   ;   r2dt =      rdt      ! = rdtra (restart with Euler time stepping) 
    230       ELSEIF(               kt <= nit000 + 1) THEN   ;   r2dt = 2. * rdt      ! = 2 rdttra (leapfrog) 
     228      ELSEIF(               kt <= nit000 + 1) THEN   ;   r2dt = 2. * rdt      ! = 2 rdt (leapfrog) 
    231229      ENDIF 
    232230 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/daymod.F90

    r7069 r7158  
    2020   !! 
    2121   !!   we suppose that the time step is deviding the number of second of in a day 
    22    !!             ---> MOD( rday, rdttra(1) ) == 0 
     22   !!             ---> MOD( rday, rdt ) == 0 
    2323   !! 
    2424   !!           ----------- WARNING ----------- 
     
    7676            &           'You must do a restart at higher frequency (or remove this stop and recompile the code in I8)' ) 
    7777      ENDIF 
    78       ! all calendar staff is based on the fact that MOD( rday, rdttra(1) ) == 0 
    79       IF( MOD( rday     , rdttra(1) ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
    80       IF( MOD( rday     , 2.        ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
    81       IF( MOD( rdttra(1), 2.        ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
    82       nsecd   = NINT(rday           ) 
    83       nsecd05 = NINT(0.5 * rday     ) 
    84       ndt     = NINT(      rdttra(1)) 
    85       ndt05   = NINT(0.5 * rdttra(1)) 
     78      ! all calendar staff is based on the fact that MOD( rday, rdt ) == 0 
     79      IF( MOD( rday , rdt ) /= 0. )   CALL ctl_stop( 'the time step must devide the number of second of in a day' ) 
     80      IF( MOD( rday , 2.  ) /= 0. )   CALL ctl_stop( 'the number of second of in a day must be an even number'    ) 
     81      IF( MOD( rdt  , 2.  ) /= 0. )   CALL ctl_stop( 'the time step (in second) must be an even number'           ) 
     82      nsecd   = NINT(rday       ) 
     83      nsecd05 = NINT(0.5 * rday ) 
     84      ndt     = NINT(      rdt  ) 
     85      ndt05   = NINT(0.5 * rdt  ) 
    8686 
    8787      ! ==> clem: here we read the ocean restart for the date (only if it exists) 
     
    224224      nsec_week  = nsec_week  + ndt 
    225225      nsec_day   = nsec_day   + ndt                 
    226       adatrj  = adatrj  + rdttra(1) / rday 
    227       fjulday = fjulday + rdttra(1) / rday 
     226      adatrj  = adatrj  + rdt / rday 
     227      fjulday = fjulday + rdt / rday 
    228228      IF( ABS(fjulday - REAL(NINT(fjulday),wp)) < zprec )   fjulday = REAL(NINT(fjulday),wp)   ! avoid truncation error 
    229229      IF( ABS(adatrj  - REAL(NINT(adatrj ),wp)) < zprec )   adatrj  = REAL(NINT(adatrj ),wp)   ! avoid truncation error 
     
    344344               ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    345345               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    346                adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     346               adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    347347               ! note this is wrong if time step has changed during run 
    348348            ENDIF 
     
    350350            ! parameters correspondting to nit000 - 1 (as we start the step loop with a call to day) 
    351351            ndastp = ndate0 - 1        ! ndate0 read in the namelist in dom_nam, we assume that we start run at 00:00 
    352             adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 
     352            adatrj = ( REAL( nit000-1, wp ) * rdt ) / rday 
    353353         ENDIF 
    354354         IF( ABS(adatrj  - REAL(NINT(adatrj),wp)) < 0.1 / rday )   adatrj = REAL(NINT(adatrj),wp)   ! avoid truncation error 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/SAS_SRC/diawri.F90

    r5217 r7158  
    164164      ! Define frequency of output and means 
    165165      zdt = rdt 
    166       IF( nacc == 1 ) zdt = rdtmin 
    167166      IF( ln_mskland )   THEN   ;   clop = "only(x)"   ! put 1.e+20 on land (very expensive!!) 
    168167      ELSE                      ;   clop = "x"         ! no use of the mask value (require less cpu time) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90

    r6420 r7158  
    9494      ! 
    9595      !                                                                    !   set time step size (Euler/Leapfrog) 
    96       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN   ;    rfact = rdttrc(1)     !  at nittrc000 
    97       ELSEIF( kt <= nittrc000 + nn_dttrc )                          THEN   ;    rfact = 2. * rdttrc(1)   ! at nittrc000 or nittrc000+nn_dttrc (Leapfrog) 
     96      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN   ;    rfact = rdttrc        !  at nittrc000 
     97      ELSEIF( kt <= nittrc000 + nn_dttrc )                          THEN   ;    rfact = 2. * rdttrc   ! at nittrc000 or nittrc000+nn_dttrc (Leapfrog) 
    9898      ENDIF 
    9999      ! 
     
    104104         xstep = rfact2 / rday         ! Time step duration for biology 
    105105         IF(lwp) WRITE(numout,*)  
    106          IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdttra(1) 
     106         IF(lwp) WRITE(numout,*) '    Passive Tracer  time step    rfact  = ', rfact, ' rdt = ', rdt 
    107107         IF(lwp) write(numout,*) '    PISCES  Biology time step    rfact2 = ', rfact2 
    108108         IF(lwp) WRITE(numout,*) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90

    r5385 r7158  
    3232 
    3333   PUBLIC   trc_adv          ! routine called by step module 
    34    PUBLIC   trc_adv_alloc    ! routine called by nemogcm module 
    3534 
    3635   INTEGER ::   nadv   ! choice of the type of advection scheme 
    37    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dt  ! vertical profile time-step, = 2 rdttra 
    38    !                                                    ! except at nitrrc000 (=rdttra) if neuler=0 
     36 
     37   REAL(wp) ::   r2dttrc  ! vertical profile time-step, = 2 rdt 
     38   !                                                    ! except at nitrrc000 (=rdt) if neuler=0 
    3939 
    4040   !! * Substitutions 
     
    4747   !!---------------------------------------------------------------------- 
    4848CONTAINS 
    49  
    50    INTEGER FUNCTION trc_adv_alloc() 
    51       !!---------------------------------------------------------------------- 
    52       !!                  ***  ROUTINE trc_adv_alloc  *** 
    53       !!---------------------------------------------------------------------- 
    54  
    55       ALLOCATE( r2dt(jpk), STAT=trc_adv_alloc ) 
    56  
    57       IF( trc_adv_alloc /= 0 ) CALL ctl_warn('trc_adv_alloc : failed to allocate array.') 
    58  
    59    END FUNCTION trc_adv_alloc 
    6049 
    6150 
     
    8473 
    8574      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    86          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     75         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping) 
    8776      ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    88          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     77         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    8978      ENDIF 
    9079      !                                                   ! effective transport 
     
    112101      ! 
    113102      SELECT CASE ( nadv )                            !==  compute advection trend and add it to general trend  ==! 
    114       CASE ( 1 )   ;    CALL tra_adv_cen2  ( kt, nittrc000, 'TRC',       zun, zvn, zwn, trb, trn, tra, jptra )   !  2nd order centered 
    115       CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  TVD  
    116       CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups )   !  MUSCL  
    117       CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  MUSCL2  
    118       CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  UBS  
    119       CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )   !  QUICKEST  
     103      CASE ( 1 )   ;    CALL tra_adv_cen2  ( kt, nittrc000, 'TRC',          zun, zvn, zwn, trb, trn, tra, jptra )   !  2nd order centered 
     104      CASE ( 2 )   ;    CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  TVD  
     105      CASE ( 3 )   ;    CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups )   !  MUSCL  
     106      CASE ( 4 )   ;    CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  MUSCL2  
     107      CASE ( 5 )   ;    CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  UBS  
     108      CASE ( 6 )   ;    CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )   !  QUICKEST  
    120109      ! 
    121110      CASE (-1 )                                      !==  esopa: test all possibility with control print  ==! 
     
    123112         WRITE(charout, FMT="('adv1')")  ; CALL prt_ctl_trc_info(charout) 
    124113                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
    125          CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )           
     114         CALL tra_adv_tvd   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )           
    126115         WRITE(charout, FMT="('adv2')")  ; CALL prt_ctl_trc_info(charout) 
    127116                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
    128          CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups  )           
     117         CALL tra_adv_muscl ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb,      tra, jptra, ln_trcadv_msc_ups  )           
    129118         WRITE(charout, FMT="('adv3')")  ; CALL prt_ctl_trc_info(charout) 
    130119                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
    131          CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )           
     120         CALL tra_adv_muscl2( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )           
    132121         WRITE(charout, FMT="('adv4')")  ; CALL prt_ctl_trc_info(charout) 
    133122                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
    134          CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )           
     123         CALL tra_adv_ubs   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )           
    135124         WRITE(charout, FMT="('adv5')")  ; CALL prt_ctl_trc_info(charout) 
    136125                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
    137          CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dt, zun, zvn, zwn, trb, trn, tra, jptra )           
     126         CALL tra_adv_qck   ( kt, nittrc000, 'TRC', r2dttrc, zun, zvn, zwn, trb, trn, tra, jptra )           
    138127         WRITE(charout, FMT="('adv6')")  ; CALL prt_ctl_trc_info(charout) 
    139128                                           CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm,clinfo2='trd') 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90

    r6204 r7158  
    4141 
    4242   PUBLIC   trc_nxt          ! routine called by step.F90 
    43    PUBLIC   trc_nxt_alloc    ! routine called by nemogcm.F90 
    4443 
    45    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dt 
     44   REAL(wp) ::   r2dttrc 
    4645 
    4746   !!---------------------------------------------------------------------- 
     
    5150   !!---------------------------------------------------------------------- 
    5251CONTAINS 
    53  
    54    INTEGER FUNCTION trc_nxt_alloc() 
    55       !!---------------------------------------------------------------------- 
    56       !!                   ***  ROUTINE trc_nxt_alloc  *** 
    57       !!---------------------------------------------------------------------- 
    58       ALLOCATE( r2dt(jpk), STAT=trc_nxt_alloc ) 
    59       ! 
    60       IF( trc_nxt_alloc /= 0 )   CALL ctl_warn('trc_nxt_alloc : failed to allocate array') 
    61       ! 
    62    END FUNCTION trc_nxt_alloc 
    6352 
    6453 
     
    117106 
    118107      ! set time step size (Euler/Leapfrog) 
    119       IF( neuler == 0 .AND. kt ==  nittrc000 ) THEN  ;  r2dt(:) =     rdttrc(:)   ! at nittrc000             (Euler) 
    120       ELSEIF( kt <= nittrc000 + nn_dttrc )     THEN  ;  r2dt(:) = 2.* rdttrc(:)   ! at nit000 or nit000+1 (Leapfrog) 
     108      IF( neuler == 0 .AND. kt ==  nittrc000 ) THEN  ;  r2dttrc =     rdttrc   ! at nittrc000             (Euler) 
     109      ELSEIF( kt <= nittrc000 + nn_dttrc )     THEN  ;  r2dttrc = 2.* rdttrc   ! at nit000 or nit000+1 (Leapfrog) 
    121110      ENDIF 
    122111 
     
    147136         DO jn = 1, jptra 
    148137            DO jk = 1, jpkm1 
    149                zfact = 1.e0 / r2dt(jk)  
     138               zfact = 1.e0 / r2dttrc  
    150139               ztrdt(:,:,jk,jn) = ( trb(:,:,jk,jn) - ztrdt(:,:,jk,jn) ) * zfact  
    151140               CALL trd_tra( kt, 'TRC', jn, jptra_atf, ztrdt ) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90

    r6971 r7158  
    2727 
    2828   PUBLIC   trc_sbc   ! routine called by step.F90 
    29  
    30    REAL(wp) ::   r2dt  !  time-step at surface 
    3129 
    3230   !! * Substitutions 
     
    8785 
    8886      IF( ln_top_euler) THEN 
    89          r2dt =  rdttrc(1)              ! = rdttrc (use Euler time stepping) 
     87         r2dt =  rdttrc              ! = rdttrc (use Euler time stepping) 
    9088      ELSE 
    9189         IF( neuler == 0 .AND. kt == nittrc000 ) THEN     ! at nittrc000 
    92             r2dt = rdttrc(1)           ! = rdttrc (restarting with Euler time stepping) 
     90            r2dt = rdttrc            ! = rdttrc (restarting with Euler time stepping) 
    9391         ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    94             r2dt = 2. * rdttrc(1)       ! = 2 rdttrc (leapfrog) 
     92            r2dt = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    9593         ENDIF 
    9694      ENDIF 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90

    r5385 r7158  
    2727 
    2828   PUBLIC   trc_zdf          ! called by step.F90  
    29    PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90  
    3029 
    3130   INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used 
    3231      !                                ! defined from ln_zdf...  namlist logicals) 
    33    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) ::  r2dt   ! vertical profile time-step, = 2 rdttra 
    34       !                                                 ! except at nittrc000 (=rdttra) if neuler=0 
     32   REAL(wp) ::  r2dttrc   ! vertical profile time-step, = 2 rdt 
     33      !                   ! except at nittrc000 (=rdt) if neuler=0 
    3534 
    3635   !! * Substitutions 
     
    4544CONTAINS 
    4645    
    47    INTEGER FUNCTION trc_zdf_alloc() 
    48       !!---------------------------------------------------------------------- 
    49       !!                  ***  ROUTINE trc_zdf_alloc  *** 
    50       !!---------------------------------------------------------------------- 
    51       ALLOCATE( r2dt(jpk) , STAT=trc_zdf_alloc ) 
    52       ! 
    53       IF( trc_zdf_alloc /= 0 )   CALL ctl_warn('trc_zdf_alloc : failed to allocate array.') 
    54       ! 
    55    END FUNCTION trc_zdf_alloc 
    56  
    5746 
    5847   SUBROUTINE trc_zdf( kt ) 
     
    7463 
    7564      IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000 
    76          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping) 
     65         r2dttrc =  rdttrc           ! = rdttrc (use or restarting with Euler time stepping) 
    7766      ELSEIF( kt <= nittrc000 + nn_dttrc ) THEN          ! at nittrc000 or nittrc000+1 
    78          r2dt(:) = 2. * rdttrc(:)       ! = 2 rdttrc (leapfrog) 
     67         r2dttrc = 2. * rdttrc       ! = 2 rdttrc (leapfrog) 
    7968      ENDIF 
    8069 
     
    8675      SELECT CASE ( nzdf )                       ! compute lateral mixing trend and add it to the general trend 
    8776      CASE ( -1 )                                       ! esopa: test all possibility with control print 
    88          CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )  
     77         CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )  
    8978         WRITE(charout, FMT="('zdf1 ')") ;  CALL prt_ctl_trc_info(charout) 
    9079                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    91          CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )  
     80         CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )  
    9281         WRITE(charout, FMT="('zdf2 ')") ;  CALL prt_ctl_trc_info(charout) 
    9382                                            CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm, clinfo2='trd' ) 
    94       CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dt, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
    95       CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dt,                trb, tra, jptra )    !   implicit scheme           
     83      CASE ( 0 ) ;  CALL tra_zdf_exp( kt, nittrc000, 'TRC', r2dttrc, nn_trczdf_exp, trb, tra, jptra )    !   explicit scheme  
     84      CASE ( 1 ) ;  CALL tra_zdf_imp( kt, nittrc000, 'TRC', r2dttrc,                trb, tra, jptra )    !   implicit scheme           
    9685 
    9786      END SELECT 
     
    10089         DO jn = 1, jptra 
    10190            DO jk = 1, jpkm1 
    102                ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dt(jk) ) - ztrtrd(:,:,jk,jn) 
     91               ztrtrd(:,:,jk,jn) = ( ( tra(:,:,jk,jn) - trb(:,:,jk,jn) ) / r2dttrc ) - ztrtrd(:,:,jk,jn) 
    10392            END DO 
    10493            CALL trd_tra( kt, 'TRC', jn, jptra_zdf, ztrtrd(:,:,:,jn) ) 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trc.F90

    r5385 r7158  
    6464   CHARACTER(len = 80) , PUBLIC                                    ::  cn_trcrst_out  !: suffix of pass. tracer restart name (output) 
    6565   CHARACTER(len = 256), PUBLIC                                    ::  cn_trcrst_outdir  !: restart output directory 
    66    REAL(wp)            , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::  rdttrc         !: vertical profile of passive tracer time step 
     66   REAL(wp)            , PUBLIC                                    ::  rdttrc         !: vertical profile of passive tracer time step 
    6767   LOGICAL             , PUBLIC                                    ::  ln_top_euler  !: boolean term for euler integration  
    6868   LOGICAL             , PUBLIC                                    ::  ln_trcdta      !: Read inputs data from files 
     
    211211         &      gtrui(jpi,jpj,jptra)  , gtrvi(jpi,jpj,jptra)                          ,       & 
    212212         &      sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra)                      ,       &   
    213          &      cvol(jpi,jpj,jpk)     , rdttrc(jpk)           , trai(jptra)           ,       & 
     213         &      cvol(jpi,jpj,jpk)     , trai(jptra)           ,                               & 
    214214         &      ctrcnm(jptra)         , ctrcln(jptra)         , ctrcun(jptra)         ,       &  
    215215         &      ln_trc_ini(jptra)     , ln_trc_wri(jptra)     , qsr_mean(jpi,jpj)     ,  STAT = trc_alloc  )   
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcini.F90

    r6971 r7158  
    182182      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules 
    183183      !!---------------------------------------------------------------------- 
    184       USE trcadv        , ONLY:   trc_adv_alloc          ! TOP-related alloc routines... 
    185184      USE trc           , ONLY:   trc_alloc 
    186       USE trcnxt        , ONLY:   trc_nxt_alloc 
    187       USE trczdf        , ONLY:   trc_zdf_alloc 
    188185      USE trdtrc_oce    , ONLY:   trd_trc_oce_alloc 
    189186#if defined key_trdmxl_trc  
     
    194191      !!---------------------------------------------------------------------- 
    195192      ! 
    196       ierr =        trc_adv_alloc()          ! Start of TOP-related alloc routines... 
    197       ierr = ierr + trc_alloc    () 
    198       ierr = ierr + trc_nxt_alloc() 
    199       ierr = ierr + trc_zdf_alloc() 
     193      ierr =        trc_alloc        () 
    200194      ierr = ierr + trd_trc_oce_alloc() 
    201195#if defined key_trdmxl_trc  
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcnam.F90

    r6204 r7158  
    110110 
    111111       
    112       rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc )   ! vertical profile of passive tracer time-step 
     112      rdttrc = rdt * FLOAT( nn_dttrc )   ! vertical profile of passive tracer time-step 
    113113   
    114114      IF(lwp) THEN                   ! control print 
    115115        WRITE(numout,*)  
    116         WRITE(numout,*) '    Passive Tracer  time step    rdttrc  = ', rdttrc(1) 
     116        WRITE(numout,*) '    Passive Tracer  time step    rdttrc  = ', rdttrc 
    117117        WRITE(numout,*)  
    118118      ENDIF 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r7069 r7158  
    132132      !!---------------------------------------------------------------------- 
    133133      ! 
    134       CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc(1) )   ! surface passive tracer time step 
     134      CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc )   ! surface passive tracer time step 
    135135      ! prognostic variables  
    136136      ! --------------------  
     
    236236             ELSE 
    237237               ndastp = ndate0 - 1     ! ndate0 read in the namelist in dom_nam 
    238                adatrj = ( REAL( nittrc000-1, wp ) * rdttra(1) ) / rday 
     238               adatrj = ( REAL( nittrc000-1, wp ) * rdt ) / rday 
    239239               ! note this is wrong if time step has changed during run 
    240240            ENDIF 
  • branches/2016/dev_v3_6_STABLE_r6506_AGRIF_LIM3/NEMOGCM/NEMO/TOP_SRC/trcstp.F90

    r6971 r7158  
    140140            nb_rec_per_day = ncpl_qsr_freq 
    141141         ELSE   
    142             rdt_sampl = MAX( 3600., rdttrc(1) ) 
     142            rdt_sampl = MAX( 3600., rdttrc ) 
    143143            nb_rec_per_day = INT( rday / rdt_sampl ) 
    144144         ENDIF 
     
    157157                            iom_varid( numrtr, 'ktdcy'    , ldstop = .FALSE. ) > 0 ) THEN  
    158158            CALL iom_get( numrtr, 'ktdcy', zkt )   !  A mean of qsr 
    159             rsecfst = INT( zkt ) * rdttrc(1) 
     159            rsecfst = INT( zkt ) * rdttrc 
    160160            IF(lwp) WRITE(numout,*) 'trc_qsr_mean:   qsr_mean read in the restart file at time-step rsecfst =', rsecfst, ' s ' 
    161161            CALL iom_get( numrtr, jpdom_autoglo, 'qsr_mean', qsr_mean )   !  A mean of qsr 
     
    171171         ELSE                                         !* no restart: set from nit000 values 
    172172            IF(lwp) WRITE(numout,*) 'trc_qsr_mean:   qsr_mean set to nit000 values' 
    173             rsecfst  = kt * rdttrc(1) 
     173            rsecfst  = kt * rdttrc 
    174174            ! 
    175175            qsr_mean(:,:) = qsr(:,:) 
     
    181181      ENDIF 
    182182      ! 
    183       rseclast = kt * rdttrc(1) 
     183      rseclast = kt * rdttrc 
    184184      ! 
    185185      llnew   = ( rseclast - rsecfst ) .ge.  rdt_sampl    !   new shortwave to store 
Note: See TracChangeset for help on using the changeset viewer.