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 11822 for NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2019-10-29T11:41:36+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. Sette tested updates to branch to align with trunk changes between 10721 and 11740. Sette tests are passing but results differ from branch before these changes (except for GYRE_PISCES and VORTEX) and branch results already differed from trunk because of algorithmic fixes. Will need more checks to confirm correctness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90

    r11027 r11822  
    211211      ENDIF 
    212212 
     213      IF( ln_zad_Aimp ) ww = ww + wi               ! Recombine explicit and implicit parts of vertical velocity for diagnostic output 
     214      ! 
    213215      CALL iom_put( "woce", ww )                   ! vertical velocity 
    214216      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
     
    221223         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
    222224      ENDIF 
     225      ! 
     226      IF( ln_zad_Aimp ) ww = ww - wi               ! Remove implicit part of vertical velocity that was added for diagnostic output 
    223227 
    224228      CALL iom_put( "avt" , avt )                  ! T vert. eddy diff. coef. 
     
    427431      !!      define all the NETCDF files and fields 
    428432      !!      At each time step call histdef to compute the mean if ncessary 
    429       !!      Each nwrite time step, output the instantaneous or mean fields 
     433      !!      Each nn_write time step, output the instantaneous or mean fields 
    430434      !!---------------------------------------------------------------------- 
    431435      INTEGER, INTENT( in ) ::   kt   ! ocean time-step index 
     
    444448      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d       ! 3D workspace 
    445449      !!---------------------------------------------------------------------- 
    446       !  
    447       IF( ln_timing )   CALL timing_start('dia_wri') 
    448450      ! 
    449451      IF( ninist == 1 ) THEN     !==  Output the initial state and forcings  ==! 
     
    452454      ENDIF 
    453455      ! 
     456      IF( nn_write == -1 )   RETURN   ! we will never do any output 
     457      !  
     458      IF( ln_timing )   CALL timing_start('dia_wri') 
     459      ! 
    454460      ! 0. Initialisation 
    455461      ! ----------------- 
     
    461467      clop = "x"         ! no use of the mask value (require less cpu time and otherwise the model crashes) 
    462468#if defined key_diainstant 
    463       zsto = nwrite * rdt 
     469      zsto = nn_write * rdt 
    464470      clop = "inst("//TRIM(clop)//")" 
    465471#else 
     
    467473      clop = "ave("//TRIM(clop)//")" 
    468474#endif 
    469       zout = nwrite * rdt 
     475      zout = nn_write * rdt 
    470476      zmax = ( nitend - nit000 + 1 ) * rdt 
    471477 
     
    498504         ! WRITE root name in date.file for use by postpro 
    499505         IF(lwp) THEN 
    500             CALL dia_nam( clhstnam, nwrite,' ' ) 
     506            CALL dia_nam( clhstnam, nn_write,' ' ) 
    501507            CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    502508            WRITE(inum,*) clhstnam 
     
    506512         ! Define the T grid FILE ( nid_T ) 
    507513 
    508          CALL dia_nam( clhstnam, nwrite, 'grid_T' ) 
     514         CALL dia_nam( clhstnam, nn_write, 'grid_T' ) 
    509515         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    510516         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    542548         ! Define the U grid FILE ( nid_U ) 
    543549 
    544          CALL dia_nam( clhstnam, nwrite, 'grid_U' ) 
     550         CALL dia_nam( clhstnam, nn_write, 'grid_U' ) 
    545551         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam    ! filename 
    546552         CALL histbeg( clhstnam, jpi, glamu, jpj, gphiu,           &  ! Horizontal grid: glamu and gphiu 
     
    555561         ! Define the V grid FILE ( nid_V ) 
    556562 
    557          CALL dia_nam( clhstnam, nwrite, 'grid_V' )                   ! filename 
     563         CALL dia_nam( clhstnam, nn_write, 'grid_V' )                   ! filename 
    558564         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    559565         CALL histbeg( clhstnam, jpi, glamv, jpj, gphiv,           &  ! Horizontal grid: glamv and gphiv 
     
    568574         ! Define the W grid FILE ( nid_W ) 
    569575 
    570          CALL dia_nam( clhstnam, nwrite, 'grid_W' )                   ! filename 
     576         CALL dia_nam( clhstnam, nn_write, 'grid_W' )                   ! filename 
    571577         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam 
    572578         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,           &  ! Horizontal grid: glamt and gphit 
     
    659665         ENDIF 
    660666 
    661          IF( .NOT. ln_cpl ) THEN 
     667         IF( ln_ssr ) THEN 
    662668            CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    663669               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     
    667673               &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    668674         ENDIF 
    669  
    670          IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    671             CALL histdef( nid_T, "sohefldp", "Surface Heat Flux: Damping"         , "W/m2"   ,   &  ! qrp 
    672                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    673             CALL histdef( nid_T, "sowafldp", "Surface Water Flux: Damping"        , "Kg/m2/s",   &  ! erp 
    674                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    675             CALL histdef( nid_T, "sosafldp", "Surface salt flux: Damping"         , "Kg/m2/s",   &  ! erp * sn 
    676                &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    677          ENDIF 
    678           
     675        
    679676         clmx ="l_max(only(x))"    ! max index on a period 
    680677!         CALL histdef( nid_T, "sobowlin", "Bowl Index"                         , "W-point",   &  ! bowl INDEX  
     
    752749      ! donne le nombre d'elements, et ndex la liste des indices a sortir 
    753750 
    754       IF( lwp .AND. MOD( itmod, nwrite ) == 0 ) THEN  
     751      IF( lwp .AND. MOD( itmod, nn_write ) == 0 ) THEN  
    755752         WRITE(numout,*) 'dia_wri : write model outputs in NetCDF files at ', kt, 'time-step' 
    756753         WRITE(numout,*) '~~~~~~ ' 
     
    816813      ENDIF 
    817814 
    818       IF( .NOT. ln_cpl ) THEN 
     815      IF( ln_ssr ) THEN 
    819816         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    820817         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    821          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 
    822          CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    823       ENDIF 
    824       IF( ln_cpl .AND. nn_ice <= 1 ) THEN 
    825          CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    826          CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    827          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 
     818         zw2d(:,:) = erp(:,:) * ts(:,:,1,jp_sal,Kmm) * tmask(:,:,1) 
    828819         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    829820      ENDIF 
     
    844835      CALL histwrite( nid_V, "sometauy", it, vtau          , ndim_hV, ndex_hV )   ! j-wind stress 
    845836 
    846       CALL histwrite( nid_W, "vovecrtz", it, ww             , ndim_T, ndex_T )    ! vert. current 
     837      IF( ln_zad_Aimp ) THEN 
     838         CALL histwrite( nid_W, "vovecrtz", it, ww + wi     , ndim_T, ndex_T )    ! vert. current 
     839      ELSE 
     840         CALL histwrite( nid_W, "vovecrtz", it, ww          , ndim_T, ndex_T )    ! vert. current 
     841      ENDIF 
    847842      CALL histwrite( nid_W, "votkeavt", it, avt            , ndim_T, ndex_T )    ! T vert. eddy diff. coef. 
    848843      CALL histwrite( nid_W, "votkeavm", it, avm            , ndim_T, ndex_T )    ! T vert. eddy visc. coef. 
     
    906901      CALL iom_rstput( 0, 0, inum, 'vozocrtx', uu(:,:,:,Kmm)                )    ! now i-velocity 
    907902      CALL iom_rstput( 0, 0, inum, 'vomecrty', vv(:,:,:,Kmm)                )    ! now j-velocity 
    908       CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww                )    ! now k-velocity 
     903      IF( ln_zad_Aimp ) THEN 
     904         CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww + wi        )    ! now k-velocity 
     905      ELSE 
     906         CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww             )    ! now k-velocity 
     907      ENDIF 
    909908      IF( ALLOCATED(ahtu) ) THEN 
    910909         CALL iom_rstput( 0, 0, inum,  'ahtu', ahtu              )    ! aht at u-point 
Note: See TracChangeset for help on using the changeset viewer.