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/solver.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/solver.F90

    r3 r16  
    1818   USE in_out_manager  ! I/O manager 
    1919   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     20   USE lib_mpp 
     21   USE dynspg_rl        
     22   USE dynspg_fsc       
    2023 
    2124   IMPLICIT NONE 
     
    3437      !!       * default option: barotropic stream function system 
    3538      !!         and islands initialization (if l_isl=T) 
    36       !!       * key_dynspg_fsc = T : transport divergence system. No specific 
     39      !!       * lk_dynspg_fsc = T : transport divergence system. No specific 
    3740      !!         treatment of islands. 
    3841      !!       
    3942      !! ** Method : 
    4043      !!       - Compute the local depth of the water column at u- and v-point 
    41       !!      (key_dynspg_fsc = T) or its inverse (key_dynspg_rl = T). 
     44      !!      (lk_dynspg_fsc = T) or its inverse (lk_dynspg_rl = T). 
    4245      !!      The local depth of the water column is computed by summing  
    4346      !!      the vertical scale factors. For its inverse, the thickness of 
     
    5659      !! 
    5760      !! ** Action : - hur, hvr : masked inverse of the local depth at 
    58       !!                                u- and v-point. (key_dynspg_rl = T) 
     61      !!                                u- and v-point. (lk_dynspg_rl = T) 
    5962      !!             - hu, hv   : masked local depth at u- and v- points 
    60       !!                                (key_dynspg_fsc = T) 
     63      !!                                (lk_dynspg_fsc = T) 
     64      !!             - c_solver_pt : nature of the gridpoint at which the 
     65      !!                                solver is applied 
    6166      !! References : 
    6267      !!      Jensen, 1986: adv. phys. oceanogr. num. mod.,ed. o brien,87-110. 
     
    115120      ENDIF 
    116121 
    117 #if defined key_dynspg_fsc  
     122      IF( lk_dynspg_fsc ) THEN 
    118123         IF(lwp) WRITE(numout,*) 
    119124         IF(lwp) WRITE(numout,*) '          *** free surface formulation' 
     
    123128            nstop = nstop + 1 
    124129         ENDIF 
    125 #endif 
    126 #if defined key_dynspg_rl 
     130      ELSEIF( lk_dynspg_rl ) THEN 
    127131         IF(lwp) WRITE(numout,*) 
    128132         IF(lwp) WRITE(numout,*) '          *** Rigid lid formulation' 
    129 #endif 
    130 #if defined key_dynspg_fsc && defined key_dynspg_rl 
     133      ELSE 
     134         IF(lwp) WRITE(numout,cform_err) 
     135         IF(lwp) WRITE(numout,*) '          Chose at least one surface pressure gradient calculation: free surface or rigid-lid' 
     136         nstop = nstop + 1 
     137      ENDIF 
     138      IF( lk_dynspg_fsc .AND. lk_dynspg_rl ) THEN 
    131139         IF(lwp) WRITE(numout,cform_err) 
    132140         IF(lwp) WRITE(numout,*) '          Chose between free surface or rigid-lid, not both' 
    133141         nstop = nstop + 1 
    134 #endif 
     142      ENDIF 
    135143 
    136144      SELECT CASE ( nsolv ) 
     
    144152      CASE ( 3 )                ! FETI solver 
    145153         IF(lwp) WRITE(numout,*) '          use the FETI solver' 
    146 #if ! defined key_mpp 
    147          IF(lwp) WRITE(numout,*) ' The FETI algorithm is used only with the key_mpp option' 
    148          nstop = nstop + 1 
    149 #else 
    150          IF( jpnij == 1 ) THEN 
    151             IF(lwp) WRITE(numout,*) ' The FETI algorithm needs more than one processor' 
     154         IF( .NOT.lk_mpp ) THEN 
     155            IF(lwp) WRITE(numout,*) ' The FETI algorithm is used only with the key_mpp_... option' 
    152156            nstop = nstop + 1 
    153          ENDIF 
    154 #endif 
     157         ELSE 
     158            IF( jpnij == 1 ) THEN 
     159               IF(lwp) WRITE(numout,*) ' The FETI algorithm needs more than one processor' 
     160               nstop = nstop + 1 
     161            ENDIF 
     162         ENDIF 
    155163          
    156164      CASE DEFAULT 
     
    161169      END SELECT 
    162170 
     171      ! Grid-point at which the solver is applied 
     172      ! ----------------------------------------- 
     173 
     174      IF( lk_dynspg_rl ) THEN       ! rigid-lid 
     175         IF( lk_mpp ) THEN 
     176            c_solver_pt = 'G'   ! G= F with special staff ??? which one? 
     177         ELSE 
     178            c_solver_pt = 'F' 
     179         ENDIF 
     180      ELSE                          ! free surface T-point 
     181         IF( lk_mpp ) THEN 
     182            c_solver_pt = 'S'   ! S=T with special staff ??? which one? 
     183         ELSE 
     184            c_solver_pt = 'T' 
     185         ENDIF 
     186      ENDIF 
     187 
    163188 
    164189      ! Construction of the elliptic system matrix 
Note: See TracChangeset for help on using the changeset viewer.