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 11573 for NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/tests/CANAL/MY_SRC/diawri.F90 – NEMO

Ignore:
Timestamp:
2019-09-19T11:18:03+02:00 (5 years ago)
Author:
jchanut
Message:

#2222, merged with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/tests/CANAL/MY_SRC/diawri.F90

    r10425 r11573  
    531531      !!      define all the NETCDF files and fields 
    532532      !!      At each time step call histdef to compute the mean if ncessary 
    533       !!      Each nwrite time step, output the instantaneous or mean fields 
     533      !!      Each nn_write time step, output the instantaneous or mean fields 
    534534      !!---------------------------------------------------------------------- 
    535535      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     
    547547      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d       ! 3D workspace 
    548548      !!---------------------------------------------------------------------- 
    549       !  
    550       IF( ln_timing )   CALL timing_start('dia_wri') 
    551549      ! 
    552550      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==! 
     
    555553      ENDIF 
    556554      ! 
     555      IF( nn_write == -1 )   RETURN   ! we will never do any output 
     556      !  
     557      IF( ln_timing )   CALL timing_start('dia_wri') 
     558      ! 
    557559      ! 0. Initialisation 
    558560      ! ----------------- 
     
    564566      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes) 
    565567#if defined key_diainstant 
    566       zsto = nwrite * rdt 
     568      zsto = nn_write * rdt 
    567569      clop = "inst("//TRIM(clop)//")" 
    568570#else 
     
    570572      clop = "ave("//TRIM(clop)//")" 
    571573#endif 
    572       zout = nwrite * rdt 
     574      zout = nn_write * rdt 
    573575      zmax = ( nitend - nit000 + 1 ) * rdt 
    574576 
     
    601603         ! WRITE root name in date.file for use by postpro 
    602604         IF(lwp) THEN 
    603             CALL dia_nam( clhstnam, nwrite,' ' ) 
     605            CALL dia_nam( clhstnam, nn_write,' ' ) 
    604606            CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    605607            WRITE(inum,*) clhstnam 
     
    609611         ! Define the T grid FILE ( nid_T ) 
    610612 
    611          CALL dia_nam( clhstnam, nwrite, 'grid_T' ) 
     613         CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 
    612614         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    613615         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    645647         ! Define the U grid FILE ( nid_U ) 
    646648 
    647          CALL dia_nam( clhstnam, nwrite, 'grid_U' ) 
     649         CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 
    648650         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    649651         CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu 
     
    658660         ! Define the V grid FILE ( nid_V ) 
    659661 
    660          CALL dia_nam( clhstnam, nwrite, 'grid_V' )                   ! filename 
     662         CALL dia_nam( clhstnam, nn_write, 'grid_V' )                   ! filename 
    661663         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    662664         CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv 
     
    671673         ! Define the W grid FILE ( nid_W ) 
    672674 
    673          CALL dia_nam( clhstnam, nwrite, 'grid_W' )                   ! filename 
     675         CALL dia_nam( clhstnam, nn_write, 'grid_W' )                   ! filename 
    674676         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    675677         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    762764         ENDIF 
    763765 
    764          IF( .NOT. ln_cpl ) THEN 
     766         IF( ln_ssr ) THEN 
    765767            CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    766768               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    770772               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    771773         ENDIF 
    772  
    773          IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    774             CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    775                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    776             CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
    777                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    778             CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping"         , "Kg/m2/s",   &  ! erp * sn 
    779                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    780          ENDIF 
    781           
     774        
    782775         clmx ="l_max(only(x))"    ! max index on a period 
    783776!         CALL histdef( nid_T, "sobowlin", "Bowl Index"                         , "W-point",   &  ! bowl INDEX  
     
    855848      ! donne le nombre d'elements, et ndex la liste des indices a sortir 
    856849 
    857       IF( lwp .AND. MOD( itmod, nwrite ) == 0 ) THEN  
     850      IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN  
    858851         WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 
    859852         WRITE(numout,*) '~~~~~~ ' 
     
    919912      ENDIF 
    920913 
    921       IF( .NOT. ln_cpl ) THEN 
     914      IF( ln_ssr ) THEN 
    922915         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    923916         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    924          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    925          CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    926       ENDIF 
    927       IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    928          CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    929          CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    930          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     917         zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
    931918         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    932919      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.