Changeset 5930 for trunk/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
- Timestamp:
- 2015-11-26T17:07:10+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r3294 r5930 16 16 USE oce ! ocean dynamics and tracers variables 17 17 USE dom_oce ! ocean space and time domain variables 18 USE sol_oce ! ocean space and time domain variables19 18 USE in_out_manager ! I/O manager 20 19 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 21 20 USE lib_mpp ! distributed memory computing 22 USE dynspg_oce ! pressure gradient schemes23 21 USE c1d ! 1D vertical configuration 24 22 … … 43 41 !! ** Method : - Save the time step in numstp 44 42 !! - Print it each 50 time steps 45 !! - Print solver statistics in numsol 46 !! - Stop the run IF problem for the solver ( indec < 0 ) 43 !! - Stop the run IF problem ( indic < 0 ) 47 44 !! 48 45 !! ** Actions : 'time.step' file containing the last ocean time-step … … 50 47 !!---------------------------------------------------------------------- 51 48 INTEGER, INTENT( in ) :: kt ! ocean time-step index 52 INTEGER, INTENT( inout ) :: kindic ! indicator of solver convergence49 INTEGER, INTENT( inout ) :: kindic ! error indicator 53 50 !! 54 51 INTEGER :: ji, jj, jk ! dummy loop indices … … 143 140 IF( lk_c1d ) RETURN ! No log file in case of 1D vertical configuration 144 141 145 ! log file (solver or ssh statistics) 146 ! -------- 147 IF( lk_dynspg_flt ) THEN ! elliptic solver statistics (if required) 148 ! 149 IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps ! Solver 150 ! 151 IF( kindic < 0 .AND. zsmin > 0.e0 .AND. zumax <= 20.e0 ) THEN ! create a abort file if problem found 152 IF(lwp) THEN 153 WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode' 154 WRITE(numout,*) ' ====== ' 155 WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps 156 WRITE(numout,*) 157 WRITE(numout,*) ' stpctl: output of last fields' 158 WRITE(numout,*) ' ====== ' 159 ENDIF 160 ENDIF 161 ! 162 ELSE !* ssh statistics (and others...) 163 IF( kt == nit000 .AND. lwp ) THEN ! open ssh statistics file (put in solver.stat file) 164 CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 165 ENDIF 166 ! 167 zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 168 IF( lk_mpp ) CALL mpp_sum( zssh2 ) ! sum over the global domain 169 ! 170 IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin ! ssh statistics 171 ! 142 ! log file (ssh statistics) 143 ! -------- !* ssh statistics (and others...) 144 IF( kt == nit000 .AND. lwp ) THEN ! open ssh statistics file (put in solver.stat file) 145 CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 172 146 ENDIF 147 ! 148 zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 149 IF( lk_mpp ) CALL mpp_sum( zssh2 ) ! sum over the global domain 150 ! 151 IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin ! ssh statistics 152 ! 173 153 174 154 9200 FORMAT('it:', i8, ' iter:', i4, ' r: ',e16.10, ' b: ',e16.10 )
Note: See TracChangeset
for help on using the changeset viewer.