Changeset 16 for trunk/NEMO/OPA_SRC/SOL/solmat.F90
- Timestamp:
- 2004-02-17T09:06:15+01:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/SOL/solmat.F90
r3 r16 18 18 USE obc_oce ! ocean open boundary conditions 19 19 USE lib_mpp ! distributed memory computing 20 USE dynspg_rl 21 USE dynspg_fsc 20 22 21 23 IMPLICIT NONE … … 38 40 !! 39 41 !! ** Method : The matrix depends on the type of free surface: 40 !! * default option: rigid lid and bsf42 !! * lk_dynspg_rl=T: rigid lid formulation 41 43 !! The matrix is built for the barotropic stream function system. 42 44 !! a diagonal preconditioning matrix is also defined. 43 !! * 'key_dynspg_fsc' defined: free surface45 !! * lk_dynspg_fsc=T: free surface formulation 44 46 !! The matrix is built for the divergence of the transport system 45 47 !! a diagonal preconditioning matrix is also defined. … … 67 69 INTEGER :: ii, ij, iiend, ijend ! temporary integers 68 70 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 73 72 !!---------------------------------------------------------------------- 74 73 … … 83 82 84 83 ! initialize to zero 84 zcoef = 0.e0 85 85 gcp(:,:,1) = 0.e0 86 86 gcp(:,:,2) = 0.e0 … … 94 94 95 95 #if defined key_dynspg_fsc && ! defined key_obc 96 !!cr IF( lk_dynspg_fsc .AND. .NOT.lk_obc ) THEN 96 97 97 98 ! defined the coefficients for free surface elliptic system … … 99 100 DO jj = 2, jpjm1 100 101 DO ji = 2, jpim1 101 zcoef = z2dt * z2dt * g * rnu * bmask(ji,jj)102 zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 102 103 zcoefs = -zcoef * hv(ji ,jj-1) * e1v(ji ,jj-1) / e2v(ji ,jj-1) ! south coefficient 103 104 zcoefw = -zcoef * hu(ji-1,jj ) * e2u(ji-1,jj ) / e1u(ji-1,jj ) ! west coefficient … … 109 110 gcp(ji,jj,4) = zcoefn 110 111 gcdmat(ji,jj) = e1t(ji,jj) * e2t(ji,jj) * bmask(ji,jj) & ! diagonal coefficient 111 112 & - zcoefs -zcoefw -zcoefe -zcoefn 112 113 END DO 113 114 END DO 114 115 115 116 # elif defined key_dynspg_fsc && defined key_obc 117 !!cr ELSEIF( lk_dynspg_fsc .AND. lk_obc ) THEN 116 118 117 119 ! defined gcdmat in the case of open boundaries … … 119 121 DO jj = 2, jpjm1 120 122 DO ji = 2, jpim1 121 zcoef = z2dt * z2dt * g * rnu * bmask(ji,jj)123 zcoef = z2dt * z2dt * grav * rnu * bmask(ji,jj) 122 124 ! south coefficient 123 125 IF( ( lpsouthobc ) .AND. ( jj == njs0p1 ) ) THEN … … 159 161 160 162 # else 163 !!cr ELSE 161 164 162 165 ! defined the coefficients for bsf elliptic system … … 173 176 gcp(ji,jj,4) = zcoefn 174 177 gcdmat(ji,jj) = -zcoefs -zcoefw -zcoefe -zcoefn ! diagonal coefficient 175 176 178 END DO 177 179 END DO 178 180 181 !!cr ENDIF 179 182 #endif 180 183 … … 194 197 ! account for the existence of the south symmetric bassin. 195 198 199 !!cr IF( .NOT.lk_dynspg_fsc ) THEN 196 200 #if ! defined key_dynspg_fsc 197 201 IF( nperio == 2 ) THEN … … 203 207 END DO 204 208 ENDIF 209 !!cr ENDIF 205 210 #endif 206 211 … … 225 230 gcp(:,:,3) = gcp(:,:,3) * gcdprc(:,:) 226 231 gcp(:,:,4) = gcp(:,:,4) * gcdprc(:,:) 232 IF( nsolv == 2 ) gccd(:,:) = sor * gcp(:,:,2) 227 233 228 234 ELSE … … 467 473 nnitot = nni 468 474 469 CALL mpp_sum( nnitot,1,numit0ete)475 CALL mpp_sum( nnitot, 1, numit0ete ) 470 476 CALL feti_creadr(malxm,malxmax,nxm,npe*npe,maae,'ae') 471 477
Note: See TracChangeset
for help on using the changeset viewer.