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 11358 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2019-07-26T16:10:19+02:00 (5 years ago)
Author:
smasson
Message:

dev_r10984_HPC-13 : supress output files with nn_stock and nn_write = -1, see #2285

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/src/OCE/DIA/diawri.F90

    r11325 r11358  
    426426      !!      define all the NETCDF files and fields 
    427427      !!      At each time step call histdef to compute the mean if ncessary 
    428       !!      Each nwrite time step, output the instantaneous or mean fields 
     428      !!      Each nn_write time step, output the instantaneous or mean fields 
    429429      !!---------------------------------------------------------------------- 
    430430      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     
    442442      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d       ! 3D workspace 
    443443      !!---------------------------------------------------------------------- 
    444       !  
    445       IF( ln_timing )   CALL timing_start('dia_wri') 
    446444      ! 
    447445      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==! 
     
    450448      ENDIF 
    451449      ! 
     450      IF( nn_write == -1 )   RETURN   ! we will never do any output 
     451      !  
     452      IF( ln_timing )   CALL timing_start('dia_wri') 
     453      ! 
    452454      ! 0. Initialisation 
    453455      ! ----------------- 
     
    459461      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes) 
    460462#if defined key_diainstant 
    461       zsto = nwrite * rdt 
     463      zsto = nn_write * rdt 
    462464      clop = "inst("//TRIM(clop)//")" 
    463465#else 
     
    465467      clop = "ave("//TRIM(clop)//")" 
    466468#endif 
    467       zout = nwrite * rdt 
     469      zout = nn_write * rdt 
    468470      zmax = ( nitend - nit000 + 1 ) * rdt 
    469471 
     
    496498         ! WRITE root name in date.file for use by postpro 
    497499         IF(lwp) THEN 
    498             CALL dia_nam( clhstnam, nwrite,' ' ) 
     500            CALL dia_nam( clhstnam, nn_write,' ' ) 
    499501            CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    500502            WRITE(inum,*) clhstnam 
     
    504506         ! Define the T grid FILE ( nid_T ) 
    505507 
    506          CALL dia_nam( clhstnam, nwrite, 'grid_T' ) 
     508         CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 
    507509         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    508510         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    540542         ! Define the U grid FILE ( nid_U ) 
    541543 
    542          CALL dia_nam( clhstnam, nwrite, 'grid_U' ) 
     544         CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 
    543545         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    544546         CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu 
     
    553555         ! Define the V grid FILE ( nid_V ) 
    554556 
    555          CALL dia_nam( clhstnam, nwrite, 'grid_V' )                   ! filename 
     557         CALL dia_nam( clhstnam, nn_write, 'grid_V' )                   ! filename 
    556558         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    557559         CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv 
     
    566568         ! Define the W grid FILE ( nid_W ) 
    567569 
    568          CALL dia_nam( clhstnam, nwrite, 'grid_W' )                   ! filename 
     570         CALL dia_nam( clhstnam, nn_write, 'grid_W' )                   ! filename 
    569571         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    570572         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    741743      ! donne le nombre d'elements, et ndex la liste des indices a sortir 
    742744 
    743       IF( lwp .AND. MOD( itmod, nwrite ) == 0 ) THEN  
     745      IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN  
    744746         WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 
    745747         WRITE(numout,*) '~~~~~~ ' 
Note: See TracChangeset for help on using the changeset viewer.