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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/SOL – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (14 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

Location:
trunk/NEMOGCM/NEMO/OPA_SRC/SOL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/SOL/sol_oce.F90

    • Property svn:eol-style deleted
    r1601 r2528  
    5050 
    5151   !!---------------------------------------------------------------------- 
    52    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     52   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    5353   !! $Id$  
    54    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     54   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    5555   !!---------------------------------------------------------------------- 
    5656END MODULE sol_oce 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90

    • Property svn:eol-style deleted
    r2031 r2528  
    1515   !!             3.2  ! 2009-06  (S. Masson)  distributed restart using iom 
    1616   !!              -   ! 2009-07  (R. Benshila)  suppression of rigid-lid option 
     17   !!             3.3  ! 2010-09  (D. Storkey) update for BDY module. 
    1718   !!---------------------------------------------------------------------- 
    1819 
     
    2627   USE phycst          ! physical constants 
    2728   USE obc_oce         ! ocean open boundary conditions 
     29   USE bdy_oce         ! unstructured open boundary conditions 
    2830   USE lbclnk          ! lateral boudary conditions 
    2931   USE lib_mpp         ! distributed memory computing 
     
    3638 
    3739   !!---------------------------------------------------------------------- 
    38    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     40   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3941   !! $Id$  
    40    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)  
     42   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4143   !!---------------------------------------------------------------------- 
    4244 
     
    8082      ENDIF 
    8183 
    82 #if defined key_dynspg_flt  
     84#if defined key_dynspg_flt && ! defined key_bdy 
    8385#   if ! defined key_obc 
    8486 
     
    158160    ENDIF 
    159161#   endif 
     162 
     163#  elif defined key_dynspg_flt && defined key_bdy  
     164 
     165      !   defined gcdmat in the case of unstructured open boundaries 
     166      DO jj = 2, jpjm1 
     167         DO ji = 2, jpim1 
     168            zcoef = z2dt * z2dt * grav * bmask(ji,jj) 
     169 
     170            !  south coefficient 
     171            zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1) 
     172            zcoefs = zcoefs * bdyvmask(ji,jj-1) 
     173            gcp(ji,jj,1) = zcoefs 
     174 
     175            !  west coefficient 
     176            zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj) 
     177            zcoefw = zcoefw * bdyumask(ji-1,jj) 
     178            gcp(ji,jj,2) = zcoefw 
     179 
     180            !  east coefficient 
     181            zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj) 
     182            zcoefe = zcoefe * bdyumask(ji,jj) 
     183            gcp(ji,jj,3) = zcoefe 
     184 
     185            !  north coefficient 
     186            zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj) 
     187            zcoefn = zcoefn * bdyvmask(ji,jj) 
     188            gcp(ji,jj,4) = zcoefn 
     189 
     190            ! diagonal coefficient 
     191            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) & 
     192                            - zcoefs -zcoefw -zcoefe -zcoefn 
     193         END DO 
     194      END DO 
     195 
    160196#endif 
    161197 
     
    297333         SELECT CASE ( cd_type ) 
    298334         !  
    299          CASE ( 'T', 'S', 'U', 'W' ) 
     335         CASE ( 'T' , 'U', 'W' ) 
    300336            DO jk = 1, 4 
    301337               DO ji = 1-jpr2di, nlci+jpr2di 
     
    311347            END DO 
    312348            ! 
    313          CASE ( 'F' ,'G' , 'I', 'V' ) 
     349         CASE ( 'F' , 'I', 'V' ) 
    314350            DO jk =1, 4 
    315351               DO ji = 1-jpr2di, nlci+jpr2di 
     
    325361         SELECT CASE (cd_type ) 
    326362         ! 
    327          CASE ( 'T'  ,'S', 'U', 'W') 
     363         CASE ( 'T' , 'U', 'W') 
    328364            DO jk =1, 4 
    329365               DO ji = 1-jpr2di, nlci+jpr2di 
     
    332368            END DO 
    333369            ! 
    334          CASE ( 'F' ,'G' , 'I', 'V' ) 
     370         CASE ( 'F' , 'I', 'V' ) 
    335371            DO jk =1, 4 
    336372               DO ji = 1-jpr2di, nlci+jpr2di 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solpcg.F90

    • Property svn:eol-style deleted
    r1601 r2528  
    1414   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    1515   USE in_out_manager  ! I/O manager 
     16   USE lib_fortran 
    1617 
    1718   IMPLICIT NONE 
     
    2324#  include "vectopt_loop_substitute.h90" 
    2425   !!---------------------------------------------------------------------- 
    25    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     26   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    2627   !! $Id$  
    27    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     28   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    2829   !!---------------------------------------------------------------------- 
    2930CONTAINS 
     
    9596      ! Initialization of the algorithm with standard PCG 
    9697      ! ------------------------------------------------- 
     98      zgcr = 0.e0  
     99      gcr  = 0.e0  
    97100 
    98101      CALL lbc_lnk( gcx, c_solver_pt, 1. )   ! lateral boundary condition 
     
    100103      ! gcr   = gcb-a.gcx 
    101104      ! gcdes = gcr 
    102  
    103105      DO jj = 2, jpjm1 
    104106         DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    114116 
    115117      ! rnorme = (gcr,gcr) 
    116       rnorme = SUM(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    117       IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain 
     118      rnorme = glob_sum(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    118119 
    119120      CALL lbc_lnk( gcdes, c_solver_pt, 1. )   ! lateral boundary condition 
     
    129130 
    130131      ! alph = (gcr,gcr)/(gcdes,gccd) 
    131       radd = SUM(  gcdes(:,:) * gcdmat(:,:) * gccd(:,:)  ) 
    132       IF( lk_mpp )   CALL mpp_sum( radd )   ! sum over the global domain 
     132      radd = glob_sum(  gcdes(:,:) * gcdmat(:,:) * gccd(:,:)  ) 
    133133      alph = rnorme /radd 
    134134 
     
    162162         ! rnorme = (gcr,gcr) 
    163163         rr = rnorme 
    164          zsum(1) = SUM(  gcr(:,:) * gcdmat(:,:) * gcr(:,:)  ) 
    165164 
    166165         ! zgcad = (zgcr,gcr)  
    167          zsum(2) = SUM( gcr(2:jpim1,2:jpjm1) * gcdmat(2:jpim1,2:jpjm1) * zgcr(2:jpim1,2:jpjm1) ) 
    168  
    169          IF( lk_mpp )   CALL mpp_sum( zsum, 2 )   ! sum over the global domain 
     166         zsum(1) = glob_sum(gcr(:,:) * gcdmat(:,:) * gcr(:,:)) 
     167         zsum(2) = glob_sum(gcr(:,:) * gcdmat(:,:) * zgcr(:,:) * bmask(:,:)) 
     168 
     169         !!RB we should gather the 2 glob_sum 
    170170         rnorme = zsum(1)   
    171171         zgcad  = zsum(2) 
    172  
    173172         ! test of convergence 
    174173         IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solsor.F90

    • Property svn:eol-style deleted
    r1601 r2528  
    2222   USE lib_mpp         ! distributed memory computing 
    2323   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     24   USE lib_fortran 
    2425 
    2526   IMPLICIT NONE 
     
    2930 
    3031   !!---------------------------------------------------------------------- 
    31    !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
     32   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3233   !! $Id$  
    33    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     34   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3435   !!---------------------------------------------------------------------- 
    3536 
     
    6465      INTEGER  ::   ijmppodd, ijmppeven, ijpr2d 
    6566      REAL(wp) ::   ztmp, zres, zres2 
     67      REAL(wp), DIMENSION(jpi,jpj) ::ztab 
    6668      !!---------------------------------------------------------------------- 
    6769       
     
    131133               ENDIF 
    132134            CASE ( 1 )                 ! relative precision 
    133                rnorme = SUM( gcr(2:nlci-1,2:nlcj-1) ) 
    134                IF( lk_mpp )   CALL mpp_sum( rnorme )   ! sum over the global domain 
     135               ztab = 0. 
     136               ztab(:,:) = gcr(2:nlci-1,2:nlcj-1) 
     137               rnorme = glob_sum( ztab)    ! sum over the global domain 
    135138               ! test of convergence 
    136139               IF( rnorme < epsr .OR. jn == nn_nmax ) THEN 
  • trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90

    • Property svn:eol-style deleted
    r1601 r2528  
    3131 
    3232   !!---------------------------------------------------------------------- 
    33    !! NEMO/OPA 9.0 , LOCEAN-IPSL (2009)  
     33   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    3434   !! $Id$  
    35    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     35   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    3636   !!---------------------------------------------------------------------- 
    3737 
     
    102102      END SELECT 
    103103      ! 
    104       IF( nbit_cmp == 1 ) THEN            ! reproductibility test SOR required 
    105          IF( nn_solv /= 2 ) THEN 
    106             CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require the SOR solver: nn_solv = 2' ) 
    107          ELSE IF( MAX( jpr2di, jpr2dj ) > 0 ) THEN 
    108             CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require jpr2di = jpr2dj = 0' ) 
    109          END IF  
    110       END IF 
    111104 
    112105      !                             !* Grid-point at which the solver is applied 
    113106!!gm  c_solver_pt should be removed: nomore bsf, only T-point is used 
    114       IF( lk_mpp ) THEN   ;    c_solver_pt = 'S'   ! S=T with special staff ??? which one? 
    115       ELSE                ;    c_solver_pt = 'T' 
    116       ENDIF 
     107      c_solver_pt = 'T'                   ! always T-point (ssh solver only, not anymore bsf) 
    117108 
    118109      CALL sol_mat( kt )            !* Construction of the elliptic system matrix 
Note: See TracChangeset for help on using the changeset viewer.