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 16 for trunk/NEMO/OPA_SRC/SOL/solmat.F90 – NEMO

Ignore:
Timestamp:
2004-02-17T09:06:15+01:00 (20 years ago)
Author:
opalod
Message:

CT : UPDATE001 : First major NEMO update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SOL/solmat.F90

    r3 r16  
    1818   USE obc_oce         ! ocean open boundary conditions 
    1919   USE lib_mpp         ! distributed memory computing 
     20   USE dynspg_rl 
     21   USE dynspg_fsc 
    2022 
    2123   IMPLICIT NONE 
     
    3840      !! 
    3941      !! ** Method  :   The matrix depends on the type of free surface: 
    40       !!       * default option: rigid lid and bsf 
     42      !!       * lk_dynspg_rl=T: rigid lid formulation 
    4143      !!      The matrix is built for the barotropic stream function system. 
    4244      !!      a diagonal preconditioning matrix is also defined. 
    43       !!       * 'key_dynspg_fsc' defined: free surface 
     45      !!       * lk_dynspg_fsc=T: free surface formulation 
    4446      !!      The matrix is built for the divergence of the transport system 
    4547      !!      a diagonal preconditioning matrix is also defined. 
     
    6769      INTEGER ::   ii, ij, iiend, ijend      ! temporary integers 
    6870      REAL(wp) ::   zcoefs, zcoefw, zcoefe, zcoefn  ! temporary scalars 
    69       REAL(wp) ::   z2dt 
    70 #if defined key_dynspg_fsc 
    71       REAL(wp) ::   zcoef 
    72 #endif 
     71      REAL(wp) ::   z2dt, zcoef 
    7372      !!---------------------------------------------------------------------- 
    7473 
     
    8382       
    8483      ! initialize to zero 
     84      zcoef = 0.e0 
    8585      gcp(:,:,1) = 0.e0 
    8686      gcp(:,:,2) = 0.e0 
     
    9494 
    9595#if defined key_dynspg_fsc && ! defined key_obc 
     96!!cr      IF( lk_dynspg_fsc .AND. .NOT.lk_obc ) THEN 
    9697 
    9798      ! defined the coefficients for free surface elliptic system 
     
    99100      DO jj = 2, jpjm1 
    100101         DO ji = 2, jpim1 
    101             zcoef = z2dt * z2dt * g * rnu * bmask(ji,jj) 
     102            zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 
    102103            zcoefs = -zcoef * hv(ji  ,jj-1) * e1v(ji  ,jj-1) / e2v(ji  ,jj-1)    ! south coefficient 
    103104            zcoefw = -zcoef * hu(ji-1,jj  ) * e2u(ji-1,jj  ) / e1u(ji-1,jj  )    ! west coefficient 
     
    109110            gcp(ji,jj,4) = zcoefn 
    110111            gcdmat(ji,jj) = e1t(ji,jj) * e2t(ji,jj) * bmask(ji,jj)    &          ! diagonal coefficient 
    111                           - zcoefs -zcoefw -zcoefe -zcoefn 
     112               &          - zcoefs -zcoefw -zcoefe -zcoefn 
    112113         END DO 
    113114      END DO 
    114115       
    115116#  elif defined key_dynspg_fsc && defined key_obc 
     117!!cr      ELSEIF( lk_dynspg_fsc .AND. lk_obc ) THEN 
    116118 
    117119      !   defined gcdmat in the case of open boundaries 
     
    119121      DO jj = 2, jpjm1 
    120122         DO ji = 2, jpim1 
    121             zcoef = z2dt * z2dt * g * rnu * bmask(ji,jj) 
     123            zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 
    122124            !  south coefficient 
    123125            IF( ( lpsouthobc ) .AND. ( jj == njs0p1 ) ) THEN 
     
    159161 
    160162#  else 
     163!!cr      ELSE 
    161164 
    162165      !   defined the coefficients for bsf elliptic system 
     
    173176            gcp(ji,jj,4) = zcoefn 
    174177            gcdmat(ji,jj) = -zcoefs -zcoefw -zcoefe -zcoefn                             ! diagonal coefficient 
    175              
    176178         END DO 
    177179      END DO 
    178180       
     181!!cr  ENDIF 
    179182#endif 
    180183 
     
    194197      ! account for the existence of the south symmetric bassin. 
    195198       
     199!!cr      IF( .NOT.lk_dynspg_fsc ) THEN 
    196200#if ! defined key_dynspg_fsc 
    197201      IF( nperio == 2 ) THEN 
     
    203207         END DO 
    204208      ENDIF 
     209!!cr      ENDIF 
    205210#endif 
    206211       
     
    225230         gcp(:,:,3) = gcp(:,:,3) * gcdprc(:,:) 
    226231         gcp(:,:,4) = gcp(:,:,4) * gcdprc(:,:) 
     232         IF( nsolv == 2 )   gccd(:,:) = sor * gcp(:,:,2) 
    227233 
    228234      ELSE 
     
    467473      nnitot = nni 
    468474 
    469       CALL mpp_sum(nnitot,1,numit0ete) 
     475      CALL mpp_sum( nnitot, 1, numit0ete ) 
    470476      CALL feti_creadr(malxm,malxmax,nxm,npe*npe,maae,'ae') 
    471477 
Note: See TracChangeset for help on using the changeset viewer.