Ignore:
Timestamp:
2019-09-11T15:54:18+02:00 (18 months ago)
Author:
smasson
Message:

trunk: merge dev_r10984_HPC-13 into the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/DIA/diawri.F90

    r11418 r11536  
    430430      !!      define all the NETCDF files and fields 
    431431      !!      At each time step call histdef to compute the mean if ncessary 
    432       !!      Each nwrite time step, output the instantaneous or mean fields 
     432      !!      Each nn_write time step, output the instantaneous or mean fields 
    433433      !!---------------------------------------------------------------------- 
    434434      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     
    446446      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d       ! 3D workspace 
    447447      !!---------------------------------------------------------------------- 
    448       !  
    449       IF( ln_timing )   CALL timing_start('dia_wri') 
    450448      ! 
    451449      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==! 
     
    454452      ENDIF 
    455453      ! 
     454      IF( nn_write == -1 )   RETURN   ! we will never do any output 
     455      !  
     456      IF( ln_timing )   CALL timing_start('dia_wri') 
     457      ! 
    456458      ! 0. Initialisation 
    457459      ! ----------------- 
     
    463465      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes) 
    464466#if defined key_diainstant 
    465       zsto = nwrite * rdt 
     467      zsto = nn_write * rdt 
    466468      clop = "inst("//TRIM(clop)//")" 
    467469#else 
     
    469471      clop = "ave("//TRIM(clop)//")" 
    470472#endif 
    471       zout = nwrite * rdt 
     473      zout = nn_write * rdt 
    472474      zmax = ( nitend - nit000 + 1 ) * rdt 
    473475 
     
    500502         ! WRITE root name in date.file for use by postpro 
    501503         IF(lwp) THEN 
    502             CALL dia_nam( clhstnam, nwrite,' ' ) 
     504            CALL dia_nam( clhstnam, nn_write,' ' ) 
    503505            CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    504506            WRITE(inum,*) clhstnam 
     
    508510         ! Define the T grid FILE ( nid_T ) 
    509511 
    510          CALL dia_nam( clhstnam, nwrite, 'grid_T' ) 
     512         CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 
    511513         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    512514         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    544546         ! Define the U grid FILE ( nid_U ) 
    545547 
    546          CALL dia_nam( clhstnam, nwrite, 'grid_U' ) 
     548         CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 
    547549         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    548550         CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu 
     
    557559         ! Define the V grid FILE ( nid_V ) 
    558560 
    559          CALL dia_nam( clhstnam, nwrite, 'grid_V' )                   ! filename 
     561         CALL dia_nam( clhstnam, nn_write, 'grid_V' )                   ! filename 
    560562         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    561563         CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv 
     
    570572         ! Define the W grid FILE ( nid_W ) 
    571573 
    572          CALL dia_nam( clhstnam, nwrite, 'grid_W' )                   ! filename 
     574         CALL dia_nam( clhstnam, nn_write, 'grid_W' )                   ! filename 
    573575         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    574576         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    661663         ENDIF 
    662664 
    663          IF( .NOT. ln_cpl ) THEN 
     665         IF( ln_ssr ) THEN 
    664666            CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    665667               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    669671               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    670672         ENDIF 
    671  
    672          IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    673             CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    674                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    675             CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
    676                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    677             CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping"         , "Kg/m2/s",   &  ! erp * sn 
    678                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    679          ENDIF 
    680           
     673        
    681674         clmx ="l_max(only(x))"    ! max index on a period 
    682675!         CALL histdef( nid_T, "sobowlin", "Bowl Index"                         , "W-point",   &  ! bowl INDEX  
     
    754747      ! donne le nombre d'elements, et ndex la liste des indices a sortir 
    755748 
    756       IF( lwp .AND. MOD( itmod, nwrite ) == 0 ) THEN  
     749      IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN  
    757750         WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 
    758751         WRITE(numout,*) '~~~~~~ ' 
     
    818811      ENDIF 
    819812 
    820       IF( .NOT. ln_cpl ) THEN 
     813      IF( ln_ssr ) THEN 
    821814         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    822815         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    823          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    824          CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    825       ENDIF 
    826       IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    827          CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    828          CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    829          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     816         zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    830817         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    831818      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.