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 7973 for branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90 – NEMO

Ignore:
Timestamp:
2017-04-26T13:57:57+02:00 (7 years ago)
Author:
jchanut
Message:

Allow centred barotropic integration with AGRIF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90

    r7971 r7973  
    487487      INTEGER :: ji, jj 
    488488      LOGICAL :: ll_int_cons 
    489       REAL(wp) :: zrhot, zt 
    490489      !!----------------------------------------------------------------------   
    491490 
     
    495494      ! the forward case only 
    496495 
    497       zrhot = Agrif_rhot() 
    498  
    499       ! "Central" time index for interpolation: 
    500       IF (ln_bt_fw) THEN 
    501          zt = REAL(Agrif_NbStepint()+0.5_wp,wp) / zrhot 
    502       ELSE 
    503          zt = REAL(Agrif_NbStepint(),wp) / zrhot 
    504       ENDIF 
     496      ! Enforce volume conservation if no time refinement:  
     497      IF ( Agrif_rhot()==1 ) ll_int_cons=.TRUE.  
    505498 
    506499      ! Interpolate barotropic fluxes 
     
    524517         ubdy_n(:) = 0.e0 ; vbdy_n(:) = 0.e0  
    525518         ubdy_s(:) = 0.e0 ; vbdy_s(:) = 0.e0  
    526          CALL Agrif_Bc_variable(unb_id,calledweight=zt, procname=interpunb) 
    527          CALL Agrif_Bc_variable(vnb_id,calledweight=zt, procname=interpvnb) 
     519         CALL Agrif_Bc_variable(unb_id, procname=interpunb) 
     520         CALL Agrif_Bc_variable(vnb_id, procname=interpvnb) 
    528521      ENDIF 
    529522      Agrif_UseSpecialValue = .FALSE. 
     
    10991092      !!----------------------------------------------------------------------   
    11001093      IF( before ) THEN 
    1101          DO jj=j1,j2 
    1102             DO ji=i1,i2 
    1103                ptab(ji,jj) = ub2_b(ji,jj) * e2u(ji,jj) 
    1104             END DO 
    1105          END DO 
     1094         IF ( ln_bt_fw ) THEN 
     1095            DO jj=j1,j2 
     1096               DO ji=i1,i2 
     1097                  ptab(ji,jj) = ub2_b(ji,jj) * e2u(ji,jj) 
     1098               END DO 
     1099            END DO 
     1100         ELSE 
     1101            DO jj=j1,j2 
     1102               DO ji=i1,i2 
     1103                  ptab(ji,jj) = un_adv(ji,jj) * e2u(ji,jj) 
     1104               END DO 
     1105            END DO 
     1106         ENDIF 
    11061107      ELSE 
    11071108         western_side  = (nb == 1).AND.(ndir == 1) 
     
    11401141      ! 
    11411142      IF( before ) THEN 
    1142          DO jj=j1,j2 
    1143             DO ji=i1,i2 
    1144                ptab(ji,jj) = vb2_b(ji,jj) * e1v(ji,jj) 
    1145             END DO 
    1146          END DO 
     1143         IF ( ln_bt_fw ) THEN 
     1144            DO jj=j1,j2 
     1145               DO ji=i1,i2 
     1146                  ptab(ji,jj) = vb2_b(ji,jj) * e1v(ji,jj) 
     1147               END DO 
     1148            END DO 
     1149         ELSE 
     1150            DO jj=j1,j2 
     1151               DO ji=i1,i2 
     1152                  ptab(ji,jj) = vn_adv(ji,jj) * e1v(ji,jj) 
     1153               END DO 
     1154            END DO 
     1155         ENDIF 
    11471156      ELSE       
    11481157         western_side  = (nb == 1).AND.(ndir == 1) 
Note: See TracChangeset for help on using the changeset viewer.