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 1561 for trunk/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2009-07-30T10:50:07+02:00 (15 years ago)
Author:
ctlod
Message:

Fix output state following an error state trapped by stpctl.F90, see ticket: #496

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DIA/diawri.F90

    r1546 r1561  
    7474   !!---------------------------------------------------------------------- 
    7575# if defined key_iomput 
    76    SUBROUTINE dia_wri( kt, kindic ) 
     76   SUBROUTINE dia_wri( kt ) 
    7777      !!--------------------------------------------------------------------- 
    7878      !!                  ***  ROUTINE dia_wri  *** 
     
    8787      !!---------------------------------------------------------------------- 
    8888      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    89       INTEGER, INTENT( in ) ::   kindic  !  
    9089      !!---------------------------------------------------------------------- 
    9190      !  
     
    112111 
    113112#else 
    114    SUBROUTINE dia_wri( kt, kindic ) 
     113   SUBROUTINE dia_wri( kt ) 
    115114      !!--------------------------------------------------------------------- 
    116115      !!                  ***  ROUTINE dia_wri  *** 
     
    123122      !!      At each time step call histdef to compute the mean if ncessary 
    124123      !!      Each nwrite time step, output the instantaneous or mean fields 
    125       !!      IF kindic <0, output of fields before the model interruption. 
    126       !!      IF kindic =0, time step loop 
    127       !!      IF kindic >0, output of fields before the time step loop 
    128124      !! 
    129125      !! History : 
     
    140136      !! * Arguments 
    141137      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index 
    142       INTEGER, INTENT( in ) ::   kindic  !  
    143138 
    144139      !! * Local declarations 
     
    199194      ! 1. Define NETCDF files and fields at beginning of first time step 
    200195      ! ----------------------------------------------------------------- 
    201  
    202       IF(ll_print) WRITE(numout,*) 'dia_wri kt = ', kt, ' kindic ', kindic 
    203196 
    204197      IF( kt == nit000 ) THEN 
     
    525518      ! 3. Close all files 
    526519      ! --------------------------------------- 
    527       IF( kt == nitend .OR. kindic < 0 ) THEN 
     520      IF( kt == nitend ) THEN 
    528521         CALL histclo( nid_T ) 
    529522         CALL histclo( nid_U ) 
     
    658651      ! ----------------- 
    659652      CALL histclo( id_i ) 
     653#if ! defined key_iomput 
     654      IF( ninist /= 1  ) THEN 
     655         CALL histclo( nid_T ) 
     656         CALL histclo( nid_U ) 
     657         CALL histclo( nid_V ) 
     658         CALL histclo( nid_W ) 
     659      ENDIF 
     660#endif 
    660661 
    661662   END SUBROUTINE dia_wri_state 
Note: See TracChangeset for help on using the changeset viewer.