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 2364 for branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2010-11-05T16:22:12+01:00 (13 years ago)
Author:
acc
Message:

Added basic NetCDF4 chunking and compression support (key_netcdf4). See ticket #754

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r2287 r2364  
    106106      !!              - namdom namelist 
    107107      !!              - namcla namelist 
     108      !!              - namnc4 namelist   ! "key_netcdf4" only 
    108109      !!---------------------------------------------------------------------- 
    109110      USE ioipsl 
     
    115116         &             rn_rdtmax, rn_rdth     , nn_baro     , nn_closea 
    116117      NAMELIST/namcla/ nn_cla 
     118#if defined key_netcdf4 
     119      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 
     120#endif 
    117121      !!---------------------------------------------------------------------- 
    118122 
     
    232236      IF( lk_mpp_rep .AND. n_cla /= 0 )   CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require n_cla = 0' ) 
    233237      ! 
     238 
     239#if defined key_netcdf4 
     240 
     241      REWIND( numnam )              ! Namelist namnc4 : netcdf4 chunking parameters 
     242      READ  ( numnam, namnc4 ) 
     243      IF(lwp) THEN 
     244         WRITE(numout,*) 
     245         WRITE(numout,*) '   Namelist namnc4 - Netcdf4 chunking parameters' 
     246         WRITE(numout,*) '      number of chunks in i-dimension      nn_nchunks_i   = ', nn_nchunks_i 
     247         WRITE(numout,*) '      number of chunks in j-dimension      nn_nchunks_j   = ', nn_nchunks_j 
     248         WRITE(numout,*) '      number of chunks in k-dimension      nn_nchunks_k   = ', nn_nchunks_k 
     249         WRITE(numout,*) '      apply netcdf4/hdf5 chunking & compression ln_nc4zip = ', ln_nc4zip 
     250      ENDIF 
     251 
     252      ! Put the netcdf4 settings into a simple structure (snc4set, defined in in_out_manager module) 
     253      ! Note the chunk size in the unlimited (time) dimension will be fixed at 1 
     254      snc4set%ni   = nn_nchunks_i 
     255      snc4set%nj   = nn_nchunks_j 
     256      snc4set%nk   = nn_nchunks_k 
     257      snc4set%luse = ln_nc4zip 
     258 
     259#else 
     260 
     261      snc4set%luse = .FALSE. 
     262  
     263#endif 
    234264   END SUBROUTINE dom_nam 
    235265 
Note: See TracChangeset for help on using the changeset viewer.