Changeset 2715 for trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
- Timestamp:
- 2011-03-30T17:58:35+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
r2528 r2715 31 31 USE dynadv ! advection 32 32 USE solmat ! matrix construction for elliptic solvers 33 USE solver ! solver initialization34 33 USE solpcg ! preconditionned conjugate gradient solver 35 34 USE solsor ! Successive Over-relaxation solver … … 63 62 !! NEMO/OPA 3.3 , NEMO Consortium (2010) 64 63 !! $Id$ 65 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 66 !!---------------------------------------------------------------------- 67 64 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 65 !!---------------------------------------------------------------------- 68 66 CONTAINS 69 67 … … 105 103 !! References : Roullet and Madec 1999, JGR. 106 104 !!--------------------------------------------------------------------- 107 USE oce, ONLY : zub => ta ! ta used as workspace 108 USE oce, ONLY : zvb => sa ! ta used as workspace 105 USE oce, ONLY: zub => ta , zvb => sa ! (ta,sa) used as workspace 109 106 !! 110 107 INTEGER, INTENT(in ) :: kt ! ocean time-step index 111 108 INTEGER, INTENT( out) :: kindic ! solver convergence flag (<0 if not converge) 112 109 !! 113 INTEGER :: ji, jj, jk ! dummy loop indices 114 REAL(wp) :: z2dt, z2dtg ! temporary scalars 115 REAL(wp) :: zgcb, zbtd ! - - 116 REAL(wp) :: ztdgu, ztdgv ! - - 110 INTEGER :: ji, jj, jk ! dummy loop indices 111 REAL(wp) :: z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv ! local scalars 117 112 !!---------------------------------------------------------------------- 118 113 ! … … 123 118 124 119 ! set to zero free surface specific arrays 125 spgu(:,:) = 0.e0 ! surface pressure gradient (i-direction) 126 spgv(:,:) = 0.e0 ! surface pressure gradient (j-direction) 127 CALL solver_init( nit000 ) ! Elliptic solver initialisation 120 spgu(:,:) = 0._wp ! surface pressure gradient (i-direction) 121 spgv(:,:) = 0._wp ! surface pressure gradient (j-direction) 128 122 129 123 ! read filtered free surface arrays in restart file … … 205 199 DO jj = 2, jpjm1 206 200 DO ji = fs_2, fs_jpim1 ! vector opt. 207 spgu(ji,jj) = 0. e0208 spgv(ji,jj) = 0. e0201 spgu(ji,jj) = 0._wp 202 spgv(ji,jj) = 0._wp 209 203 END DO 210 204 END DO … … 282 276 ncut = 0 283 277 ! if rnorme is 0, the solution is 0, the solver is not called 284 IF( rnorme == 0. e0) THEN285 gcx(:,:) = 0. e0286 res = 0. e0278 IF( rnorme == 0._wp ) THEN 279 gcx(:,:) = 0._wp 280 res = 0._wp 287 281 niter = 0 288 282 ncut = 999 … … 356 350 357 351 SUBROUTINE flt_rst( kt, cdrw ) 358 !!---------------------------------------------------------------------359 !! *** ROUTINE ts_rst ***360 !!361 !! ** Purpose : Read or write filtered free surface arrays in restart file362 !!----------------------------------------------------------------------363 INTEGER , INTENT(in) :: kt ! ocean time-step364 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag365 !!----------------------------------------------------------------------366 367 IF( TRIM(cdrw) == 'READ' ) THEN368 IF( iom_varid( numror, 'gcx', ldstop = .FALSE. ) > 0 ) THEN352 !!--------------------------------------------------------------------- 353 !! *** ROUTINE ts_rst *** 354 !! 355 !! ** Purpose : Read or write filtered free surface arrays in restart file 356 !!---------------------------------------------------------------------- 357 INTEGER , INTENT(in) :: kt ! ocean time-step 358 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 359 !!---------------------------------------------------------------------- 360 ! 361 IF( TRIM(cdrw) == 'READ' ) THEN 362 IF( iom_varid( numror, 'gcx', ldstop = .FALSE. ) > 0 ) THEN 369 363 ! Caution : extra-hallow 370 364 ! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) 371 CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) )372 CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) )373 IF( neuler == 0 ) gcxb(:,:) = gcx (:,:)374 ELSE375 gcx (:,:) = 0.e0376 gcxb(:,:) = 0.e0377 ENDIF378 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN365 CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) ) 366 CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) ) 367 IF( neuler == 0 ) gcxb(:,:) = gcx (:,:) 368 ELSE 369 gcx (:,:) = 0.e0 370 gcxb(:,:) = 0.e0 371 ENDIF 372 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 379 373 ! Caution : extra-hallow 380 374 ! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) 381 CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) )382 CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) )383 ENDIF384 !375 CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) ) 376 CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) ) 377 ENDIF 378 ! 385 379 END SUBROUTINE flt_rst 386 380
Note: See TracChangeset
for help on using the changeset viewer.