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 8741 for branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90 – NEMO

Ignore:
Timestamp:
2017-11-17T17:19:55+01:00 (6 years ago)
Author:
jchanut
Message:

AGRIF + vvl Main changes - #1965

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8624_AGRIF3_VVL/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r7831 r8741  
    5252#if defined key_agrif 
    5353   USE agrif_opa_interp ! agrif 
     54   USE agrif_oce 
    5455#endif 
    5556#if defined key_asminc    
     
    7677 
    7778   !! Time filtered arrays at baroclinic time step: 
    78    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   un_adv , vn_adv     !: Advection vel. at "now" barocl. step 
     79   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   un_adv , vn_adv     !: Advection fluxes at "now" barocl. step 
    7980 
    8081   !! * Substitutions 
     
    127128      !!      -Update the filtered free surface at step "n+1"      : ssha 
    128129      !!      -Update filtered barotropic velocities at step "n+1" : ua_b, va_b 
    129       !!      -Compute barotropic advective velocities at step "n" : un_adv, vn_adv 
     130      !!      -Compute barotropic advective fluxes at step "n"    : un_adv, vn_adv 
    130131      !!      These are used to advect tracers and are compliant with discrete 
    131132      !!      continuity equation taken at the baroclinic time steps. This  
     
    10191020      ! 
    10201021      ! Set advection velocity correction: 
    1021       zwx(:,:) = un_adv(:,:) 
    1022       zwy(:,:) = vn_adv(:,:) 
    1023       IF( ( kt == nit000 .AND. neuler==0 ) .OR. .NOT.ln_bt_fw ) THEN      
    1024          un_adv(:,:) = zwx(:,:) * r1_hu_n(:,:) 
    1025          vn_adv(:,:) = zwy(:,:) * r1_hv_n(:,:) 
    1026       ELSE 
    1027          un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zwx(:,:) ) * r1_hu_n(:,:) 
    1028          vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zwy(:,:) ) * r1_hv_n(:,:) 
    1029       END IF 
    1030  
    1031       IF( ln_bt_fw ) THEN ! Save integrated transport for next computation 
     1022      IF (ln_bt_fw) THEN 
     1023         zwx(:,:) = un_adv(:,:) 
     1024         zwy(:,:) = vn_adv(:,:) 
     1025         IF( .NOT.( kt == nit000 .AND. neuler==0 ) ) THEN 
     1026            un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zwx(:,:) )  
     1027            vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zwy(:,:) ) 
     1028         END IF 
     1029         ! Save integrated transport for next computation 
    10321030         ub2_b(:,:) = zwx(:,:) 
    10331031         vb2_b(:,:) = zwy(:,:) 
     
    10651063      DO jk = 1, jpkm1 
    10661064         ! Correct velocities: 
    1067          un(:,:,jk) = ( un(:,:,jk) + un_adv(:,:) - un_b(:,:) ) * umask(:,:,jk) 
    1068          vn(:,:,jk) = ( vn(:,:,jk) + vn_adv(:,:) - vn_b(:,:) ) * vmask(:,:,jk) 
     1065         un(:,:,jk) = ( un(:,:,jk) + un_adv(:,:)*r1_hu_n(:,:) - un_b(:,:) ) * umask(:,:,jk) 
     1066         vn(:,:,jk) = ( vn(:,:,jk) + vn_adv(:,:)*r1_hv_n(:,:) - vn_b(:,:) ) * vmask(:,:,jk) 
    10691067         ! 
    10701068      END DO 
    10711069      ! 
    1072       CALL iom_put(  "ubar", un_adv(:,:)      )    ! barotropic i-current 
    1073       CALL iom_put(  "vbar", vn_adv(:,:)      )    ! barotropic i-current 
     1070      CALL iom_put(  "ubar", un_adv(:,:)*r1_hu_n(:,:) )    ! barotropic i-current 
     1071      CALL iom_put(  "vbar", vn_adv(:,:)*r1_hv_n(:,:) )    ! barotropic i-current 
    10741072      ! 
    10751073#if defined key_agrif 
     
    12971295#if defined key_agrif 
    12981296      ! Restrict the use of Agrif to the forward case only 
    1299       IF( .NOT.ln_bt_fw .AND. .NOT.Agrif_Root() )   CALL ctl_stop( 'AGRIF not implemented if ln_bt_fw=.FALSE.' ) 
     1297!!!      IF( .NOT.ln_bt_fw .AND. .NOT.Agrif_Root() )   CALL ctl_stop( 'AGRIF not implemented if ln_bt_fw=.FALSE.' ) 
    13001298#endif 
    13011299      ! 
Note: See TracChangeset for help on using the changeset viewer.