Commit 44e9663a authored by Willi Rath's avatar Willi Rath
Browse files

Add NSIDC sea ice concentration data (#53)

parent 0902b597
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
repo_name: NSIDC_Sea_Ice

people: Willi Rath (<wrath@geomar.de>)

http_path_remote: https://git.geomar.de/data/NSIDC_Sea_Ice

git_path_remote: git@git.geomar.de:data/NSIDC_Sea_Ice

repo_description: |
     NOAA/NSIDC Climate Data Record of Passive Microwave Sea Ice Concentration,
     Version 3

     <http://nsidc.org/data/G02202/versions/3>

prefixes: data doc

data:

    - url: "ftp://sidads.colorado.edu/pub/DATASETS/NOAA/G02202_V3/"
      cut_dirs: 4
      prefix: data
      accept_files: "*.*"
      method: !!python/name:data_repo_renderer.WgetRecursive

doc:

    - url: "http://nsidc.org/sites/nsidc.org/files/technical-references/SeaIce_CDR_CATBD_final_Rev-5.pdf"
      file_name: SeaIce_CDR_CATBD_final_Rev-5.pdf
      prefix: doc
      method: !!python/name:data_repo_renderer.CurlSingleFile

    - url: "https://www.earth-syst-sci-data.net/5/311/2013/essd-5-311-2013.pdf"
      file_name: essd-5-311-2013.pdf
      prefix: doc
      method: !!python/name:data_repo_renderer.CurlSingleFile

    - url: "http://nsidc.org/data/G02202/versions/3/print/"
      file_name: nsidc.org_data_G02202_versions_3_print.html
      prefix: doc
      method: !!python/name:data_repo_renderer.CurlSingleFile

post_processing:

    - util/convert_to_netCDF4_classic.sh
+15 −0
Original line number Diff line number Diff line
#!/bin/bash

# define and export convert function
function convert_to_nc4c {
    file_name=$1
    echo "converting ${file_name}"
    nccopy -7 -d 1 -s -c "time/1,ygrid/100,xgrid/100" \
        ${file_name} ${file_name}_tmp_nc4
    mv ${file_name}_tmp_nc4 ${file_name}
}
export -f convert_to_nc4c

# bunzip and convert using 4 threads
find data/ -type f -iname \*.nc -print0 | \
    xargs -0 -n1 -P4 -I {} bash -c "convert_to_nc4c {}"