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 12955 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/SAS/stpctl.F90 – NEMO

Ignore:
Timestamp:
2020-05-20T16:08:51+02:00 (4 years ago)
Author:
smasson
Message:

Clem's branch: merge with trunk@12926

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/SAS/stpctl.F90

    r10603 r12955  
    3232 
    3333   INTEGER  ::   idrun, idtime, idssh, idu, ids, istatus 
    34    LOGICAL  ::   lsomeoce 
    3534   !!---------------------------------------------------------------------- 
    3635   !! NEMO/SAS 4.0 , NEMO Consortium (2018) 
     
    6261      !!---------------------------------------------------------------------- 
    6362      ! 
    64       ll_wrtstp  = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    65       ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR. sn_cfctl%l_runstat ) 
    66       ll_wrtruns = ll_colruns .AND. lwm 
    67       IF( kt == nit000 .AND. lwp ) THEN 
    68          WRITE(numout,*) 
    69          WRITE(numout,*) 'stp_ctl : time-stepping control' 
    70          WRITE(numout,*) '~~~~~~~' 
     63      ll_wrtstp  = ( MOD( kt-nit000, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
     64      ll_colruns = ll_wrtstp .AND. sn_cfctl%l_runstat .AND. jpnij > 1  
     65      ll_wrtruns = ( ll_colruns .OR. jpnij == 1 ) .AND. lwm 
     66      ! 
     67      IF( kt == nit000 ) THEN 
     68         ! 
     69         IF( lwp ) THEN 
     70            WRITE(numout,*) 
     71            WRITE(numout,*) 'stp_ctl : time-stepping control' 
     72            WRITE(numout,*) '~~~~~~~' 
     73         ENDIF 
    7174         !                                ! open time.step file 
    7275         IF( lwm ) CALL ctl_opn( numstp, 'time.step', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    7376         !                                ! open run.stat file(s) at start whatever 
    7477         !                                ! the value of sn_cfctl%ptimincr 
    75          IF( lwm .AND. ( ln_ctl .OR. sn_cfctl%l_runstat ) ) THEN 
     78         IF( ll_wrtruns ) THEN 
    7679            CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    7780            clname = 'run.stat.nc' 
     
    8588         ENDIF 
    8689      ENDIF 
    87       IF( kt == nit000 )   lsomeoce = COUNT( ssmask(:,:) == 1._wp ) > 0 
    8890      ! 
    8991      IF(lwm .AND. ll_wrtstp) THEN        !==  current time step  ==!   ("time.step" file) 
     
    9294      ENDIF 
    9395      !                                   !==  test of extrema  ==! 
    94       IF( ll_colruns ) THEN 
     96      IF( ll_colruns .OR. jpnij == 1 ) THEN 
    9597         zmax(1) = MAXVAL(      vt_i (:,:) )                                           ! max ice thickness 
    9698         zmax(2) = MAXVAL( ABS( u_ice(:,:) ) )                                         ! max ice velocity (zonal only) 
    9799         zmax(3) = MAXVAL(     -tm_i (:,:)+273.15_wp , mask = ssmask(:,:) == 1._wp )   ! min ice temperature 
    98          CALL mpp_max( "stpctl", zmax )                                   ! max over the global domain 
     100         IF( ll_colruns )   CALL mpp_max( "stpctl", zmax )                             ! max over the global domain 
    99101      END IF 
    100102      !                                            !==  run statistics  ==!   ("run.stat" file) 
Note: See TracChangeset for help on using the changeset viewer.