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 9267 for branches/2017/dev_merge_2017/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2018-01-19T14:21:35+01:00 (6 years ago)
Author:
clem
Message:

add a run.stat for sas containing ice diagnostics

Location:
branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90

    r9213 r9267  
    511511      ! 
    512512      IF( numstp          /= -1 )   CLOSE( numstp          )   ! time-step file       
     513      IF( numrun          /= -1 )   CLOSE( numrun          )   ! run statistics file 
    513514      IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist 
    514515      IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist 
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/SAS_SRC/stpctl.F90

    r5215 r9267  
    1111   !!            2.0  ! 2009-07  (G. Madec)  Add statistic for time-spliting 
    1212   !!            3.5  ! 2012-03  (S. Alderson) 
     13   !!            4.0  ! 2017-04  (G. Madec)  regroup global communications 
    1314   !!---------------------------------------------------------------------- 
    1415 
     
    1819   USE oce             ! ocean dynamics and tracers variables 
    1920   USE dom_oce         ! ocean space and time domain variables  
     21   USE ice      , ONLY : vt_i, u_ice, tm_i 
     22   ! 
    2023   USE in_out_manager  ! I/O manager 
    2124   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     
    2730   PUBLIC stp_ctl           ! routine called by step.F90 
    2831   !!---------------------------------------------------------------------- 
    29    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     32   !! NEMO/OPA 4.0 , NEMO Consortium (2017) 
    3033   !! $Id$ 
    3134   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     
    4346      !!              - Print it each 50 time steps 
    4447      !! 
    45       !! ** Actions :   'time.step' file containing the last ocean time-step 
     48      !! ** Actions :   "time.step" file = last ocean time-step 
     49      !!                "run.stat"  file = run statistics 
    4650      !!                 
    4751      !!---------------------------------------------------------------------- 
    48       INTEGER, INTENT( in ) ::   kt         ! ocean time-step index 
    49       INTEGER, INTENT( inout ) ::   kindic  ! indicator of solver convergence 
     52      INTEGER, INTENT( in    ) ::   kt       ! ocean time-step index 
     53      INTEGER, INTENT( inout ) ::   kindic   ! indicator of solver convergence 
     54      !! 
     55      REAL(wp), DIMENSION(3) ::   zmax 
    5056      !!---------------------------------------------------------------------- 
    5157 
     
    5460         WRITE(numout,*) 'stp_ctl : time-stepping control' 
    5561         WRITE(numout,*) '~~~~~~~' 
    56          ! open time.step file 
     62         !                                ! open time.step file 
    5763         CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
     64         !                                ! open run.stat file 
     65         CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
     66      ENDIF 
     67      ! 
     68      IF(lwp) THEN                        !==  current time step  ==!   ("time.step" file) 
     69         WRITE ( numstp, '(1x, i8)' )   kt 
     70         REWIND( numstp ) 
     71      ENDIF 
     72      !                                   !==  test of extrema  ==! 
     73      zmax(1) = MAXVAL(      vt_i (:,:) )                                           ! max ice thickness 
     74      zmax(2) = MAXVAL( ABS( u_ice(:,:) ) )                                         ! max ice velocity (zonal only) 
     75      zmax(3) = MAXVAL(     -tm_i (:,:)+273.15_wp , mask = ssmask(:,:) == 1._wp )   ! min ice temperature 
     76      ! 
     77      IF( lk_mpp ) THEN 
     78         CALL mpp_max_multiple( zmax(:), 3 )    ! max over the global domain 
     79      ENDIF 
     80      ! 
     81      IF( MOD( kt, nwrite ) == 1 .AND. lwp ) THEN 
     82         WRITE(numout,*) ' ==>> time-step= ', kt, ' vt_i max: ',  zmax(1), ' |u_ice| max: ', zmax(2), ' tm_i min: ', -zmax(3) 
    5883      ENDIF 
    5984 
    60       IF(lwp) WRITE ( numstp, '(1x, i8)' )   kt      !* save the current time step in numstp 
    61       IF(lwp) REWIND( numstp )                       !  -------------------------- 
    62  
     85      !                                            !==  run statistics  ==!   ("run.stat" file) 
     86      IF(lwp) WRITE(numrun,9400) kt, zmax(1), zmax(2), -zmax(3) 
     87      ! 
     889400  FORMAT(' it :', i8, '    vt_i_max: ', e16.10, ' |u_ice|_max: ',e16.10,' tm_i_min: ',e16.10) 
     89      ! 
    6390   END SUBROUTINE stp_ctl 
    6491 
Note: See TracChangeset for help on using the changeset viewer.