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 6140 for trunk/NEMOGCM/NEMO/NST_SRC/agrif_top_update.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

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

    r5656 r6140  
    33 
    44MODULE agrif_top_update 
     5   !!====================================================================== 
     6   !!                ***  MODULE agrif_top_update  *** 
     7   !! AGRIF :    
     8   !!---------------------------------------------------------------------- 
     9   !! History :   
     10   !!---------------------------------------------------------------------- 
    511 
    612#if defined key_agrif && defined key_top 
    713   USE par_oce 
    814   USE oce 
     15   USE par_trc 
     16   USE trc 
    917   USE dom_oce 
    1018   USE agrif_oce 
    11    USE par_trc 
    12    USE trc 
    1319   USE wrk_nemo   
    1420 
     
    1824   PUBLIC Agrif_Update_Trc 
    1925 
    20    INTEGER, PUBLIC :: nbcline_trc = 0 
     26   INTEGER, PUBLIC ::   nbcline_trc = 0   !: ??? 
    2127 
    2228   !!---------------------------------------------------------------------- 
    23    !! NEMO/NST 3.3 , NEMO Consortium (2010) 
     29   !! NEMO/NST 3.7 , NEMO Consortium (2015) 
    2430   !! $Id$ 
    2531   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    2632   !!---------------------------------------------------------------------- 
    27  
    2833CONTAINS 
    2934 
    3035   SUBROUTINE Agrif_Update_Trc( kt ) 
    31       !!--------------------------------------------- 
    32       !!   *** ROUTINE Agrif_Update_Trc *** 
    33       !!--------------------------------------------- 
    34       INTEGER, INTENT(in) :: kt 
    35       !!--------------------------------------------- 
     36      !!---------------------------------------------------------------------- 
     37      !!                   *** ROUTINE Agrif_Update_Trc *** 
     38      !!---------------------------------------------------------------------- 
     39      INTEGER, INTENT(in) ::   kt 
     40      !!---------------------------------------------------------------------- 
    3641      !  
    3742      IF((Agrif_NbStepint() .NE. (Agrif_irhot()-1)).AND.(kt /= 0)) RETURN 
    3843#if defined TWO_WAY    
    3944      Agrif_UseSpecialValueInUpdate = .TRUE. 
    40       Agrif_SpecialValueFineGrid = 0. 
     45      Agrif_SpecialValueFineGrid    = 0._wp 
    4146      !  
    42       IF (MOD(nbcline_trc,nbclineupdate) == 0) THEN 
     47      IF( MOD(nbcline_trc,nbclineupdate) == 0 ) THEN 
    4348# if ! defined DECAL_FEEDBACK 
    44          CALL Agrif_Update_Variable(trn_id, procname=updateTRC) 
     49         CALL Agrif_Update_Variable(trn_id, procname=updateTRC ) 
    4550# else 
    46          CALL Agrif_Update_Variable(trn_id, locupdate=(/1,0/),procname=updateTRC) 
     51         CALL Agrif_Update_Variable(trn_id, locupdate=(/1,0/),procname=updateTRC ) 
    4752# endif 
    4853      ELSE 
    4954# if ! defined DECAL_FEEDBACK 
    50          CALL Agrif_Update_Variable(trn_id,locupdate=(/0,2/), procname=updateTRC) 
     55         CALL Agrif_Update_Variable( trn_id, locupdate=(/0,2/), procname=updateTRC ) 
    5156# else 
    52          CALL Agrif_Update_Variable(trn_id,locupdate=(/1,2/), procname=updateTRC) 
     57         CALL Agrif_Update_Variable( trn_id, locupdate=(/1,2/), procname=updateTRC ) 
    5358# endif 
    5459      ENDIF 
     
    6065   END SUBROUTINE Agrif_Update_Trc 
    6166 
     67 
    6268   SUBROUTINE updateTRC( ptab, i1, i2, j1, j2, k1, k2, n1, n2, before ) 
    63       !!--------------------------------------------- 
    64       !!           *** ROUTINE updateT *** 
    65       !!--------------------------------------------- 
    66 #  include "domzgr_substitute.h90" 
    67       INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,n1,n2 
    68       REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) :: ptab 
    69       LOGICAL, INTENT(in) :: before 
     69      !!---------------------------------------------------------------------- 
     70      !!                      *** ROUTINE updateT *** 
     71      !!---------------------------------------------------------------------- 
     72      INTEGER                                    , INTENT(in   ) ::   i1, i2, j1, j2, k1, k2, n1, n2 
     73      REAL(wp),DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2), INTENT(inout) ::   ptab 
     74      LOGICAL                                    , INTENT(in   ) ::   before 
    7075      !! 
    71       INTEGER :: ji,jj,jk,jn 
    72       !!--------------------------------------------- 
     76      INTEGER ::   ji, jj, jk, jn 
     77      !!---------------------------------------------------------------------- 
    7378      ! 
    74       IF (before) THEN 
    75          DO jn = n1,n2 
    76             DO jk=k1,k2 
    77                DO jj=j1,j2 
    78                   DO ji=i1,i2 
    79                      ptab(ji,jj,jk,jn) = trn(ji,jj,jk,jn) 
     79      IF( before ) THEN 
     80         ptab(i1:i2,j1:j2,k1:k2,n1:n2) = trn(i1:i2,j1:j2,k1:k2,n1:n2) 
     81      ELSE 
     82         IF( .NOT.(lk_agrif_fstep.AND.(neuler==0)) ) THEN 
     83            ! Add asselin part 
     84            DO jn = n1,n2 
     85               DO jk = k1, k2 
     86                  DO jj = j1, j2 
     87                     DO ji = i1, i2 
     88                        IF( ptab(ji,jj,jk,jn) /= 0._wp ) THEN 
     89                           trb(ji,jj,jk,jn) = trb(ji,jj,jk,jn)             &  
     90                              &             + atfp * ( ptab(ji,jj,jk,jn)   & 
     91                                 &                    - trn(ji,jj,jk,jn) ) * tmask(ji,jj,jk) 
     92                        ENDIF 
     93                     END DO 
    8094                  END DO 
    8195               END DO 
    8296            END DO 
    83          END DO 
    84       ELSE 
    85          IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN 
    86             ! Add asselin part 
    87             DO jn = n1,n2 
    88                DO jk=k1,k2 
    89                   DO jj=j1,j2 
    90                      DO ji=i1,i2 
    91                         IF( ptab(ji,jj,jk,jn) .NE. 0. ) THEN 
    92                            trb(ji,jj,jk,jn) = trb(ji,jj,jk,jn) &  
    93                                  & + atfp * ( ptab(ji,jj,jk,jn) & 
    94                                  &             - trn(ji,jj,jk,jn) ) * tmask(ji,jj,jk) 
    95                         ENDIF 
    96                      ENDDO 
    97                   ENDDO 
    98                ENDDO 
    99             ENDDO 
    10097         ENDIF 
    101          DO jn = n1,n2 
    102             DO jk=k1,k2 
    103                DO jj=j1,j2 
    104                   DO ji=i1,i2 
    105                      IF( ptab(ji,jj,jk,jn) .NE. 0. ) THEN  
     98         DO jn = n1, n2 
     99            DO jk = k1, k2 
     100               DO jj = j1, j2 
     101                  DO ji = i1, i2 
     102                     IF( ptab(ji,jj,jk,jn) /= 0._wp ) THEN  
    106103                        trn(ji,jj,jk,jn) = ptab(ji,jj,jk,jn) * tmask(ji,jj,jk) 
    107104                     END IF 
     
    123120   END SUBROUTINE agrif_top_update_empty 
    124121#endif 
     122 
     123   !!====================================================================== 
    125124END MODULE agrif_top_update 
Note: See TracChangeset for help on using the changeset viewer.