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 10131 for NEMO/branches/UKMO/dev_rebuild_nemo_compression/REBUILD_NEMO/rebuild_nemo – NEMO

Ignore:
Timestamp:
2018-09-14T15:58:40+02:00 (6 years ago)
Author:
mathiot
Message:

add option to manage compression in rebuild_nemo, add compression and chunking in rebuild_nemo.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_rebuild_nemo_compression/REBUILD_NEMO/rebuild_nemo

    r9048 r10131  
    1010   echo "  ************" 
    1111   echo 
    12    echo "  usage: ${0##*/} [-l -t -c -m -n] filebase ndomain [rebuild dimensions]" 
     12   echo "  usage: ${0##*/} [-l -p -s -m -n -r -d -x -y -z -t -s] filebase ndomain [rebuild dimensions]" 
    1313   echo 
    1414   echo "  flags:    -l                 submit to compute node" 
    15    echo "            -t num             use num threads" 
    16    echo "            -c num             split 4D vars into time chuncks of size num" 
     15   echo "            -p num             use num threads" 
     16   echo "            -s num             split 4D vars into time slice of size num" 
    1717   echo "            -m                 force masking of global arrays (zero if no mdi)" 
    18    echo "            -d deflate_level   deflate level for output files (key_netcdf4 only)" 
    1918   echo "            -n namelist        full path to namelist file to be created (otherwise default nam_rebuild+_process_id is used)" 
    2019   echo "            -r memory          Memory to request on compute node including units (Default = 10Gb)" 
     20   echo "" 
     21   echo "      key_netcdf4 only " 
     22   echo "            -d deflate_level     deflate level for output files" 
     23   echo "            -x chunsize along x "  
     24   echo "            -y chunsize along y "  
     25   echo "            -z chunsize along z "  
     26   echo "            -t chunsize along t "  
     27   echo "            -s chunsize " 
    2128   echo 
    2229   exit 1 
    2330} 
    2431 
    25 while getopts c:n:t:d:r:lm opt 
     32while getopts l:p:s:m:n:r:d:x:y:z:t:s opt 
    2633do 
    2734  case ${opt} in 
     
    3239         echo "Submitting job to compute node" 
    3340      ;; 
    34       t) 
     41      p) 
    3542         OMP_NUM_THREADS=${OPTARG} 
    3643      ;; 
    37       c) 
    38          NCHUNKSIZE=${OPTARG} 
     44      s) 
     45         NSLICESIZE=${OPTARG} 
    3946      ;; 
    4047      m)  
     
    5057      r) 
    5158         MEMORY=${OPTARG} 
     59      ;; 
     60      x) 
     61         NXCHUNK=${OPTARG} 
     62      ;; 
     63      y) 
     64         NYCHUNK=${OPTARG} 
     65      ;; 
     66      z) 
     67         NZCHUNK=${OPTARG} 
     68      ;; 
     69      t) 
     70         NTCHUNK=${OPTARG} 
     71      ;; 
     72      s) 
     73         CHUNKSIZE=${OPTARG} 
    5274      ;; 
    5375  esac 
     
    90112   echo ${dims} >> $nam_rebuild 
    91113fi 
    92 if [[ -n ${NCHUNKSIZE} ]] ; then 
    93    echo " nchunksize=${NCHUNKSIZE}" >> $nam_rebuild 
     114if [[ -n ${NCSLICESIZE} ]] ; then 
     115   echo " nslicesize=${NCSLICESIZE}" >> $nam_rebuild 
    94116fi 
    95117if [[ -n ${NMASK} ]] ; then 
     
    99121   echo " deflate_level=${DEFLATE}" >> $nam_rebuild 
    100122fi 
     123if [[ -n ${NXCHUNK} ]] ; then 
     124   echo " nc4_xchunk=${NXCHUNK}" >> $nam_rebuild 
     125fi 
     126if [[ -n ${NYCHUNK} ]] ; then 
     127   echo " nc4_ychunk=${NYCHUNK}" >> $nam_rebuild 
     128fi 
     129if [[ -n ${NZCHUNK} ]] ; then 
     130   echo " nc4_zchunk=${NZCHUNK}" >> $nam_rebuild 
     131fi 
     132if [[ -n ${NTCHUNK} ]] ; then 
     133   echo " nc4_tchunk=${NTCHUNK}" >> $nam_rebuild 
     134fi 
     135if [[ -n ${CHUNKSIZE} ]] ; then 
     136   echo " fchunksize=${CHUNKSIZE}" >> $nam_rebuild 
     137fi 
     138 
     139 
    101140 
    102141echo "/" >> $nam_rebuild 
Note: See TracChangeset for help on using the changeset viewer.