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 7351 for branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90 – NEMO

Ignore:
Timestamp:
2016-11-28T17:04:10+01:00 (7 years ago)
Author:
emanuelaclementi
Message:

ticket #1805 step 3: /2016/dev_INGV_UKMO_2016 aligned to the trunk at revision 7161

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_INGV_UKMO_2016/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90

    r7350 r7351  
    2727   USE ldftra         ! lateral diffusion: eddy diffusivity & EIV coeff. 
    2828   USE ldfslp         ! Lateral diffusion: slopes of neutral surfaces 
    29    USE c1d            ! 1D vertical configuration 
    3029   ! 
    3130   USE in_out_manager ! I/O manager 
     
    6968    
    7069   !! * Substitutions 
    71 #  include "domzgr_substitute.h90" 
    7270#  include "vectopt_loop_substitute.h90" 
    7371   !!---------------------------------------------------------------------- 
     
    102100      !     
    103101      IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000 
    104          r2dtra(:) =  rdttra(:)                          ! = rdtra (restarting with Euler time stepping) 
     102         r2dt = rdt                                 ! = rdt (restarting with Euler time stepping) 
    105103      ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1 
    106          r2dtra(:) = 2._wp * rdttra(:)                   ! = 2 rdttra (leapfrog) 
     104         r2dt = 2._wp * rdt                         ! = 2 rdt (leapfrog) 
    107105      ENDIF 
    108106      ! 
     
    152150         CALL tra_adv_cen    ( kt, nit000, 'TRA',         zun, zvn, zwn     , tsn, tsa, jpts, nn_cen_h, nn_cen_v ) 
    153151      CASE ( np_FCT )                                    ! FCT scheme      : 2nd / 4th order 
    154          CALL tra_adv_fct    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v ) 
     152         CALL tra_adv_fct    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts, nn_fct_h, nn_fct_v ) 
    155153      CASE ( np_FCT_zts )                                ! 2nd order FCT with vertical time-splitting 
    156          CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_fct_zts ) 
     154         CALL tra_adv_fct_zts( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_fct_zts ) 
    157155      CASE ( np_MUS )                                    ! MUSCL 
    158          CALL tra_adv_mus    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb,      tsa, jpts        , ln_mus_ups )  
     156         CALL tra_adv_mus    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb,      tsa, jpts        , ln_mus_ups )  
    159157      CASE ( np_UBS )                                    ! UBS 
    160          CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_ubs_v   ) 
     158         CALL tra_adv_ubs    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts        , nn_ubs_v   ) 
    161159      CASE ( np_QCK )                                    ! QUICKEST 
    162          CALL tra_adv_qck    ( kt, nit000, 'TRA', r2dtra, zun, zvn, zwn, tsb, tsn, tsa, jpts                     ) 
     160         CALL tra_adv_qck    ( kt, nit000, 'TRA', r2dt, zun, zvn, zwn, tsb, tsn, tsa, jpts                     ) 
    163161      ! 
    164162      END SELECT 
    165163      ! 
    166       !                                              ! print mean trends (used for debugging) 
     164      !                                         ! print mean trends (used for debugging) 
    167165      IF(ln_ctl)   CALL prt_ctl( tab3d_1=tsa(:,:,:,jp_tem), clinfo1=' adv  - Ta: ', mask1=tmask,               & 
    168166         &                       tab3d_2=tsa(:,:,:,jp_sal), clinfo2=       ' Sa: ', mask2=tmask, clinfo3='tra' ) 
     
    192190      ! 
    193191      !                                !==  Namelist  ==! 
    194       ! 
    195192      REWIND( numnam_ref )                   ! Namelist namtra_adv in reference namelist : Tracer advection scheme 
    196193      READ  ( numnam_ref, namtra_adv, IOSTAT = ios, ERR = 901) 
    197 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv in reference namelist', lwp ) 
     194901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in reference namelist', lwp ) 
    198195      ! 
    199196      REWIND( numnam_cfg )                   ! Namelist namtra_adv in configuration namelist : Tracer advection scheme 
    200197      READ  ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 ) 
    201 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv in configuration namelist', lwp ) 
    202       IF(lwm) WRITE ( numond, namtra_adv ) 
    203  
     198902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namtra_adv in configuration namelist', lwp ) 
     199      IF(lwm) WRITE( numond, namtra_adv ) 
     200      ! 
    204201      IF(lwp) THEN                           ! Namelist print 
    205202         WRITE(numout,*) 
     
    220217         WRITE(numout,*) '      QUICKEST scheme                           ln_traadv_qck = ', ln_traadv_qck 
    221218      ENDIF 
    222  
     219      ! 
    223220      ioptio = 0                       !==  Parameter control  ==! 
    224221      IF( ln_traadv_cen )   ioptio = ioptio + 1 
     
    232229         CALL ctl_warn( 'tra_adv_init: You are running without tracer advection.' ) 
    233230      ENDIF 
    234       IF( (ioptio /= 1).AND. (.NOT. lk_c1d ) ) &  
    235         CALL ctl_stop( 'tra_adv_init: Choose ONE advection scheme in namelist namtra_adv' ) 
     231      IF( ioptio /= 1 )   CALL ctl_stop( 'tra_adv_init: Choose ONE advection scheme in namelist namtra_adv' ) 
    236232      ! 
    237233      IF( ln_traadv_cen .AND. ( nn_cen_h /= 2 .AND. nn_cen_h /= 4 )   &          ! Centered 
     
    248244            CALL ctl_stop( 'tra_adv_init: force 2nd order FCT scheme, 4th order does not exist with sub-timestepping' ) 
    249245         ENDIF 
    250          IF( lk_vvl ) THEN 
     246         IF( .NOT.ln_linssh ) THEN 
    251247            CALL ctl_stop( 'tra_adv_init: vertical sub-timestepping not allow in non-linear free surface' ) 
    252248         ENDIF 
     
    260256      ENDIF 
    261257      IF( ln_isfcav ) THEN                                                       ! ice-shelf cavities 
    262          IF(  ln_traadv_cen .AND. nn_cen_v /= 4    .OR.   &                            ! NO 4th order with ISF 
    263             & ln_traadv_fct .AND. nn_fct_v /= 4   )   CALL ctl_stop( 'tra_adv_init: 4th order COMPACT scheme not allowed with ISF' ) 
     258         IF(  ln_traadv_cen .AND. nn_cen_v == 4    .OR.   &                            ! NO 4th order with ISF 
     259            & ln_traadv_fct .AND. nn_fct_v == 4   )   CALL ctl_stop( 'tra_adv_init: 4th order COMPACT scheme not allowed with ISF' ) 
    264260      ENDIF 
    265261      ! 
     
    272268      IF( ln_traadv_ubs                      )   nadv = np_UBS 
    273269      IF( ln_traadv_qck                      )   nadv = np_QCK 
    274  
     270      ! 
    275271      IF(lwp) THEN                           ! Print the choice 
    276272         WRITE(numout,*) 
    277          IF( nadv == np_NO_adv  )   WRITE(numout,*) '         NO T-S advection' 
    278          IF( nadv == np_CEN     )   WRITE(numout,*) '         CEN      scheme is used. Horizontal order: ', nn_cen_h,   & 
    279             &                                                                        ' Vertical   order: ', nn_cen_v 
    280          IF( nadv == np_FCT     )   WRITE(numout,*) '         FCT      scheme is used. Horizontal order: ', nn_fct_h,   & 
    281             &                                                                        ' Vertical   order: ', nn_fct_v 
    282          IF( nadv == np_FCT_zts )   WRITE(numout,*) '         use 2nd order FCT with ', nn_fct_zts,'vertical sub-timestepping' 
    283          IF( nadv == np_MUS     )   WRITE(numout,*) '         MUSCL    scheme is used' 
    284          IF( nadv == np_UBS     )   WRITE(numout,*) '         UBS      scheme is used' 
    285          IF( nadv == np_QCK     )   WRITE(numout,*) '         QUICKEST scheme is used' 
     273         SELECT CASE ( nadv ) 
     274         CASE( np_NO_adv  )   ;   WRITE(numout,*) '         NO T-S advection' 
     275         CASE( np_CEN     )   ;   WRITE(numout,*) '         CEN      scheme is used. Horizontal order: ', nn_cen_h,   & 
     276            &                                                                     ' Vertical   order: ', nn_cen_v 
     277         CASE( np_FCT     )   ;   WRITE(numout,*) '         FCT      scheme is used. Horizontal order: ', nn_fct_h,   & 
     278            &                                                                      ' Vertical   order: ', nn_fct_v 
     279         CASE( np_FCT_zts )   ;   WRITE(numout,*) '         use 2nd order FCT with ', nn_fct_zts,'vertical sub-timestepping' 
     280         CASE( np_MUS     )   ;   WRITE(numout,*) '         MUSCL    scheme is used' 
     281         CASE( np_UBS     )   ;   WRITE(numout,*) '         UBS      scheme is used' 
     282         CASE( np_QCK     )   ;   WRITE(numout,*) '         QUICKEST scheme is used' 
     283         END SELECT 
    286284      ENDIF 
    287285      ! 
Note: See TracChangeset for help on using the changeset viewer.