Ignore:
Timestamp:
2017-03-06T18:58:35+01:00 (4 years ago)
Author:
clem
Message:

make AGRIF and LIM3 fully compatible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/NST_SRC/agrif_lim3_update.F90

    r7646 r7761  
    5252      !!---------------------------------------------------------------------- 
    5353      ! 
    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 
    59  
    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        
     54      !! clem: I think the update should take place each time the ocean sees the surface forcings 
     55      !!       (but maybe I am wrong and we should update every rhot time steps)  
     56      IF( ( MOD( (kt-nit000)/nn_fsbc + 1, Agrif_irhot() * Agrif_Parent(nn_fsbc) / nn_fsbc ) /=0 ) .AND. (kt /= 0) ) RETURN ! do not update if nb of child time steps differ from time refinement 
     57                                                                                                                           ! i.e. update only at the parent time step 
    6658      Agrif_UseSpecialValueInUpdate = .TRUE. 
    6759      Agrif_SpecialValueFineGrid = -9999. 
     
    9890      INTEGER  :: jk, jl, jm 
    9991      !!----------------------------------------------------------------------- 
    100       ! clem: it is ok not to multiply by e1 e2 since we conserve tracers here (cf ce qui est fait dans opa). 
     92      ! it is ok not to multiply by e1*e2 since we conserve tracers here (same as in the ocean). 
    10193      IF( before ) THEN 
    10294         jm = 1 
     
    135127         ENDDO 
    136128 
     129         ! integrated values 
     130         vt_i (i1:i2,j1:j2) = SUM( v_i(i1:i2,j1:j2,:), dim=3 ) 
     131         vt_s (i1:i2,j1:j2) = SUM( v_s(i1:i2,j1:j2,:), dim=3 ) 
     132         at_i (i1:i2,j1:j2) = SUM( a_i(i1:i2,j1:j2,:), dim=3 ) 
     133         et_s(i1:i2,j1:j2)  = SUM( SUM( e_s(i1:i2,j1:j2,:,:), dim=4 ), dim=3 ) 
     134         et_i(i1:i2,j1:j2)  = SUM( SUM( e_i(i1:i2,j1:j2,:,:), dim=4 ), dim=3 ) 
     135          
    137136      ENDIF 
    138137      ! 
Note: See TracChangeset for help on using the changeset viewer.