├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ ├── ci.yaml
│ └── deploy-sdist.yaml
├── .gitignore
├── .pre-commit-config.yaml
├── LICENSE.txt
├── Makefile
├── NEWS.rst
├── NEWS_GEO2GRID.rst
├── README.rst
├── RELEASING.md
├── awips_scmi
├── Polar
│ └── PolarCommonDescription.xml
├── README.txt
└── styleRules
│ └── goesrCMI-ImageryStyleRules.xml
├── build_environment.yml
├── continuous_integration
└── environment.yaml
├── create_conda_software_bundle.sh
├── doc
├── Makefile
└── source
│ ├── NEWS.rst
│ ├── NEWS_GEO2GRID.rst
│ ├── _static
│ ├── 300px_JPSS_Blue_Logo_WEB.png
│ ├── CIMSS_logo_web_multicolor_PNG_1100x800.png
│ ├── CSPP_Logo.png
│ ├── G2G Logo.psd
│ ├── G2G_PDF_Logos.png
│ ├── NOAA_logo_256px.png
│ ├── P2G Logo.psd
│ ├── P2G_PDF_Logos.png
│ ├── SSEC_logo_small24.png
│ ├── favicon.ico
│ └── prettytables.css
│ ├── compositors.rst
│ ├── conf.py
│ ├── custom_config.rst
│ ├── custom_grids.rst
│ ├── data_access.rst
│ ├── design_overview.rst
│ ├── dev_guide
│ ├── adding_readers.rst
│ ├── api
│ │ └── .gitkeep
│ ├── dev_env.rst
│ ├── index.rst
│ ├── json_input.rst
│ └── swbundle.rst
│ ├── doi_role.py
│ ├── enhancements.rst
│ ├── examples
│ ├── abi_example.rst
│ ├── abi_l2_example.rst
│ ├── acspo_example.rst
│ ├── ahi_example.rst
│ ├── amsr2_example.rst
│ ├── asci_example.rst
│ ├── creating_animations_example.rst
│ ├── index.rst
│ ├── modis_example.rst
│ └── viirs_example.rst
│ ├── generate_summary_table.py
│ ├── getting_started.rst
│ ├── grids.rst
│ ├── image_processing_techniques.rst
│ ├── index.rst
│ ├── installation.rst
│ ├── introduction.rst
│ ├── misc_recipes.rst
│ ├── overview.rst
│ ├── readers
│ ├── abi_l1b.rst
│ ├── abi_l2_nc.rst
│ ├── acspo.rst
│ ├── agri_fy4a_l1.rst
│ ├── agri_fy4b_l1.rst
│ ├── ahi_hrit.rst
│ ├── ahi_hsd.rst
│ ├── ami_l1b.rst
│ ├── amsr2_l1b.rst
│ ├── avhrr.rst
│ ├── clavrx.rst
│ ├── fci_l1c_nc.rst
│ ├── glm_l2.rst
│ ├── index.rst
│ ├── mersi2_l1b.rst
│ ├── mersi_ll_l1b.rst
│ ├── mirs.rst
│ ├── modis_l1b.rst
│ ├── nucaps.rst
│ ├── viirs_edr.rst
│ ├── viirs_edr_active_fires.rst
│ ├── viirs_edr_flood.rst
│ ├── viirs_l1b.rst
│ └── viirs_sdr.rst
│ ├── remapping.rst
│ ├── summary_table.rst
│ ├── summary_table_geo2grid_readers.rst
│ ├── summary_table_geo2grid_writers.rst
│ ├── toctree_filter.py
│ ├── utilscripts.rst
│ ├── verification
│ ├── abi_verification.rst
│ ├── index.rst
│ ├── modis_verification.rst
│ └── viirs_verification.rst
│ ├── version3_implementation.rst
│ ├── viirs_day_night_band.rst
│ └── writers
│ ├── awips_tiled.rst
│ ├── binary.rst
│ ├── geotiff.rst
│ ├── hdf5.rst
│ └── index.rst
├── integration_tests
├── README.rst
├── features
│ ├── environment.py
│ ├── geo2grid.feature
│ ├── polar2grid.feature
│ ├── steps
│ │ └── compare_images.py
│ └── utilities.feature
└── run.sh
├── jenkins_environment.yml
├── polar2grid
├── __init__.py
├── __main__.py
├── _glue_argparser.py
├── add_coastlines.py
├── add_colormap.py
├── compare.py
├── composites
│ ├── __init__.py
│ └── enhanced.py
├── core
│ ├── __init__.py
│ ├── containers.py
│ ├── dtype.py
│ └── script_utils.py
├── debug_data.py
├── enhancements
│ ├── __init__.py
│ ├── shared.py
│ └── viirs.py
├── etc
│ ├── colormaps
│ │ ├── IFR_PROB.cmap
│ │ ├── LIFR_PROB.cmap
│ │ ├── MVFR_PROB.cmap
│ │ ├── abi_l2_modified_cloud_top.cmap
│ │ ├── amsr2_36h.cmap
│ │ ├── amsr2_89h.cmap
│ │ ├── gridded_data.cmap
│ │ ├── hsl256_no_black.cmap
│ │ ├── p2g_sst_palette.txt
│ │ ├── tropix_no_white.cmap
│ │ └── viirs_edr_flood_water_detection.cmap
│ ├── composites
│ │ ├── abi.yaml
│ │ ├── ahi.yaml
│ │ ├── mersi-2.yaml
│ │ ├── modis.yaml
│ │ └── viirs.yaml
│ ├── enhancements
│ │ ├── abi.yaml
│ │ ├── agri.yaml
│ │ ├── ahi.yaml
│ │ ├── ami.yaml
│ │ ├── amsr2.yaml
│ │ ├── generic.yaml
│ │ ├── mersi-2.yaml
│ │ ├── modis.yaml
│ │ └── viirs.yaml
│ ├── pyspectral.yaml
│ ├── readers
│ │ └── mirs.yaml
│ ├── resampling.yaml
│ └── writers
│ │ ├── awips_tiled.yaml
│ │ ├── binary.yaml
│ │ └── hdf5.yaml
├── filters
│ ├── __init__.py
│ ├── _base.py
│ ├── _filter_scene.py
│ ├── _utils.py
│ ├── day_night.py
│ └── resample_coverage.py
├── fonts
│ ├── Vera.ttf
│ └── __init__.py
├── glue.py
├── grids
│ ├── __init__.py
│ ├── config_helper.py
│ ├── grids.yaml
│ └── manager.py
├── readers
│ ├── __init__.py
│ ├── _base.py
│ ├── abi_l1b.py
│ ├── abi_l2_nc.py
│ ├── acspo.py
│ ├── agri_fy4a_l1.py
│ ├── agri_fy4b_l1.py
│ ├── ahi_hrit.py
│ ├── ahi_hsd.py
│ ├── ami_l1b.py
│ ├── amsr2_l1b.py
│ ├── amsr2_l2_gaasp.py
│ ├── avhrr_l1b_aapp.py
│ ├── clavrx.py
│ ├── fci_l1c_nc.py
│ ├── glm_l2.py
│ ├── mersi2_l1b.py
│ ├── mersi_ll_l1b.py
│ ├── mirs.py
│ ├── modis_l1b.py
│ ├── modis_l2.py
│ ├── nucaps.py
│ ├── viirs_edr.py
│ ├── viirs_edr_active_fires.py
│ ├── viirs_edr_flood.py
│ ├── viirs_l1b.py
│ ├── viirs_sdr.py
│ └── virr_l1b.py
├── resample
│ ├── __init__.py
│ ├── _resample_scene.py
│ └── resample_decisions.py
├── tests
│ ├── __init__.py
│ ├── _abi_fixtures.py
│ ├── _avhrr_fixtures.py
│ ├── _fixture_utils.py
│ ├── _viirs_fixtures.py
│ ├── conftest.py
│ ├── etc
│ │ ├── colormaps
│ │ │ ├── WV_Chile_Short.cmap
│ │ │ ├── amsr2_36h.cmap
│ │ │ └── reds.cmap
│ │ ├── enhancements
│ │ │ └── generic.yaml
│ │ ├── grids.conf
│ │ └── test_p2g_palettize3.npy
│ ├── test_add_coastlines.py
│ ├── test_add_colormap.py
│ ├── test_compare.py
│ ├── test_configs.py
│ ├── test_dtype.py
│ ├── test_enhancements.py
│ ├── test_filters
│ │ ├── __init__.py
│ │ ├── test_day_night.py
│ │ └── test_utils.py
│ ├── test_glue.py
│ ├── test_grids
│ │ ├── __init__.py
│ │ ├── test_config_helper.py
│ │ └── test_manager.py
│ ├── test_main.py
│ ├── test_readers
│ │ ├── __init__.py
│ │ └── test_base.py
│ ├── test_resample
│ │ ├── __init__.py
│ │ └── test_resample_scene.py
│ ├── test_utils
│ │ ├── __init__.py
│ │ ├── test_convert_grids_conf.py
│ │ └── test_legacy_compat.py
│ └── test_writers
│ │ ├── __init__.py
│ │ ├── test_base.py
│ │ ├── test_binary.py
│ │ └── test_hdf5.py
├── utils
│ ├── __init__.py
│ ├── config.py
│ ├── convert_grids_conf_to_yaml.py
│ ├── create_awips_debug_tiles.py
│ ├── dynamic_imports.py
│ ├── legacy_compat.py
│ └── warnings.py
└── writers
│ ├── __init__.py
│ ├── awips_tiled.py
│ ├── binary.py
│ ├── cf.py
│ ├── geotiff.py
│ └── hdf5.py
├── pyproject.toml
└── swbundle
├── GEO2GRID_README.txt
├── POLAR2GRID_README.txt
├── add_coastlines.sh
├── add_colormap.sh
├── convert_grids_conf_to_yaml.sh
├── download_pyspectral_data.sh
├── env.sh
├── example_enhancements
└── amsr2_png
│ └── enhancements
│ └── generic.yaml
├── geo2grid.sh
├── geocat2scmi.py
├── grid_configs
└── grid_example.yaml
├── gtiff2kmz.sh
├── gtiff2mp4.sh
├── overlay.sh
├── p2g_compare.sh
├── p2g_grid_helper.sh
├── polar2grid.sh
├── polar2grid_env.sh
└── reproject_goes.sh
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.png filter=lfs diff=lfs merge=lfs -text
2 | *.psd filter=lfs diff=lfs merge=lfs -text
3 | *.jpg filter=lfs diff=lfs merge=lfs -text
4 | *.tif filter=lfs diff=lfs merge=lfs -text
5 | *.mp4 filter=lfs diff=lfs merge=lfs -text
6 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "github-actions" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "monthly"
12 |
--------------------------------------------------------------------------------
/.github/workflows/deploy-sdist.yaml:
--------------------------------------------------------------------------------
1 | name: Deploy sdist
2 |
3 | on:
4 | release:
5 | types:
6 | - published
7 |
8 | jobs:
9 | deploysdist:
10 | name: "Deploy sdist"
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - name: Checkout source
15 | uses: actions/checkout@v4
16 |
17 | - name: Create sdist
18 | shell: bash -l {0}
19 | run: |
20 | python -m pip install -U build pip
21 | python -m build
22 |
23 | - name: Publish package to PyPI
24 | # upload to PyPI on every release for a tag starting with 'v'
25 | if: github.event.action == 'published' && startsWith(github.event.release.tag_name, 'v')
26 | uses: pypa/gh-action-pypi-publish@v1.12.4
27 | with:
28 | user: __token__
29 | password: ${{ secrets.pypi_password }}
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ### PYTHON IGNORES ###
2 | *.py[cod]
3 |
4 | # C extensions
5 | *.so
6 |
7 | # Packages
8 | *.egg
9 | *.egg-info
10 | dist
11 | build
12 | eggs
13 | parts
14 | bin
15 | var
16 | sdist
17 | develop-eggs
18 | .installed.cfg
19 | lib
20 | lib64
21 |
22 | # Installer logs
23 | pip-log.txt
24 |
25 | # Unit test / coverage reports
26 | .coverage
27 | .tox
28 | nosetests.xml
29 |
30 | #Translations
31 | *.mo
32 |
33 | #Mr Developer
34 | .mr.developer.cfg
35 |
36 | ### C IGNORES ###
37 | # Object files
38 | *.o
39 |
40 | # Libraries
41 | *.lib
42 | *.a
43 |
44 | # Shared objects (inc. Windows DLLs)
45 | *.dll
46 | *.so
47 | *.so.*
48 | *.dylib
49 |
50 | # Executables
51 | *.exe
52 | *.out
53 | *.app
54 |
55 | # PyCharm configs
56 | .idea
57 |
58 | # Image Editing Tools
59 | *.xcf
60 |
61 | # Example images should not be added to the repository
62 | doc/source/_static/example_images
63 | doc/source/dev_guide/api/*.rst
64 | doc/source/grids_list.rst
65 |
66 | # Polar2Grid Bundles being compared against
67 | polar2grid-swbundle-*
68 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | exclude: '^$'
2 | fail_fast: false
3 | repos:
4 | - repo: https://github.com/astral-sh/ruff-pre-commit
5 | rev: 'v0.11.8'
6 | hooks:
7 | - id: ruff
8 | args: ["--fix"]
9 | - id: ruff-format
10 | - repo: https://github.com/pre-commit/pre-commit-hooks
11 | rev: v5.0.0
12 | hooks:
13 | - id: trailing-whitespace
14 | - id: end-of-file-fixer
15 | - id: check-yaml
16 | args: [--unsafe]
17 | - repo: https://github.com/scop/pre-commit-shfmt
18 | rev: v3.11.0-1
19 | hooks:
20 | - id: shfmt-src # native (requires Go to build)
21 | args: ["-i", "4"]
22 | ci:
23 | # To trigger manually, comment on a pull request with "pre-commit.ci autofix"
24 | autofix_prs: false
25 | autoupdate_schedule: "monthly"
26 |
--------------------------------------------------------------------------------
/NEWS_GEO2GRID.rst:
--------------------------------------------------------------------------------
1 | Release Notes
2 | =============
3 |
4 | Version 1.3.0 (unreleased)
5 | --------------------------
6 |
7 | * Fix resampling coverage calculations
8 |
9 | Version 1.2.0 (2023-05-10)
10 | --------------------------
11 | * Preliminary GOES-19 ABI reader support added
12 | * Preliminary EUMETSAT MTG FCI (fci_l1c_nc) reader support added
13 | * Additional ABI Product readers support added:
14 |
15 | * Aerosol Optical Depth (AOD)
16 | * Low Cloud and Fog (FLS)
17 | * Land Surface Temperature (LST)
18 |
19 | * New 3.9 micron band scaling
20 | * Added ABI AOD product example to documenation
21 | * Support for additional RGBs
22 | * Optimizations
23 | * Bug fixes
24 |
25 | Version 1.1.0 (2022-12-12)
26 | --------------------------
27 | * GOES-18 ABI reader support added
28 | * ABI Level 2 (abi_l2_nc) reader added
29 | * Gridded GLM (glm_l2) reader added
30 | * GEO-KOMPSAT AMI (ami_l1b) reader added
31 | * FY-4A AGRI (agri_fy4a_l1) reader added
32 | * FY-4B AGRI (agri_fy4b_l1) reader added
33 | * Various optimizations
34 | * Support for additional RGBs
35 | * Use of yaml files for grid definitions
36 | * Various bug fixes
37 |
38 | Version 1.0.2 (2020-08-17)
39 | --------------------------
40 |
41 | * Add workaround for threading issue in pyresample
42 |
43 | Version 1.0.1 (2020-03-18)
44 | --------------------------
45 |
46 | * Significantly improved performance by enabling multithreaded geotiff compression
47 | * Improve day/night transition region in day/night composites
48 | * Fix resampling freezing when output grid was larger than 1024x1024
49 | * Fix crash when certain RGBs were created with '--ll-bbox'
50 | * Add missing '--radius-of-influence' flag for nearest neighbor resampling
51 | * Add ability to native resample to lower resolution grids
52 | * Add 'goes_east_Xkm' and 'goes_west_Xkm' grids for easier lower resolution resampling
53 | * Add AHI airmass, ash, dust, fog, and night_microphysics RGBs
54 | * Accept PNG or GeoTIFFs with gtiff2mp4.sh video generation
55 |
56 | Version 1.0.0 (2019-03-01)
57 | --------------------------
58 |
59 | * New Geo2Grid Package!
60 | * ABI L1B (abi_l1b) reader added
61 | * AHI HSD (ahi_hsd) reader added
62 | * AHI HRIT/HimawariCast (ahi_hrit) reader added
63 | * Geotiff (geotiff) writer added
64 | * Multi-threaded (multiple worker) processing
65 | * Sharpened rayleigh-corrected full-resolution true and natural color RGBs
66 | * Command line Lat/Lon defined subsets
67 | * User defined grid capability
68 | * MIN/MAX native resampling possible
69 |
--------------------------------------------------------------------------------
/RELEASING.md:
--------------------------------------------------------------------------------
1 | # Releasing the Polar2Grid Python Package
2 |
3 | 1. Update pyproject.toml with the new version.
4 | 2. Create a git tag for the new version:
5 |
6 | ```bash
7 | git tag -a vX.Y.Z -m "Version X.Y.Z"
8 | ```
9 |
10 | 3. Push the tag to github:
11 |
12 | ```bash
13 | git push --follow-tags
14 | ```
15 |
16 | 4. Create a GitHub release for this tag with name "Version X.Y.Z" and add
17 | release notes to the description.
18 | 5. The GitHub release will trigger various GitHub jobs to run. Make sure they succeed.
19 |
--------------------------------------------------------------------------------
/awips_scmi/Polar/PolarCommonDescription.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/awips_scmi/README.txt:
--------------------------------------------------------------------------------
1 | This directory and it's subdirectories contain configuration files for the
2 | GOES-R netcdf imagery decoder. Each configuration is an xml file that contains
3 | one or more description elements that can be applied to a product. A
4 | description consists of three parts, the match elements, the data elements,
5 | and the descriptive elements.
6 |
7 | The match elements of a description are used to determine if the description
8 | applies to a particular product. It consists of an attribute_name that matches
9 | a global attribute on the netcdf file and a pattern that is a regular
10 | expression matched to the value of that attribute. If all match elements on a
11 | description match attributes in a file then that description will be used to
12 | describe the satellite data in the file.
13 |
14 | A data element is optional in a description, if present there can be only one.
15 | If a data element is specified then it should contain the name of the variable
16 | containing the numeric, gridded data for the satellite image. An
17 | alternative to specifying a variable name within the data element is to specify
18 | a bitset containing multiple variables that will be joined together, one bit per
19 | product. Products containing data in more than 2 directions can include a
20 | verticalDimension attribute which should be the name of the variable describing
21 | the 3rd dimension.
22 |
23 | The descriptive elements are used to specify the physicalElement,
24 | creatingEntity, source, sectorID, satHeight, units, and dataTime of a
25 | SatelliteRecord. Each description can include a constant value, an attribute
26 | name whose value will be stored in the correct attribute, or a format and a
27 | list of attributes whose values will be used within the format. The dataTime
28 | description also requires a date format that will be used to parse a date
29 | from an the specified attribute.
30 |
31 | For netcdf files that contain multiple products a description contaiing a data
32 | element should be created for each product. The descriptive for a description
33 | with a data element will only be applied to products created with the data. Any
34 | description without a data element will be applied to all the satellite records
35 | that are generated from the file.
36 |
37 | The directory structure of this directory is purely for organization, the
38 | decoder does not do anything special with specific files/subdirectories. A
39 | single product can match descriptions in multiple files as easily as multiple
40 | descriptions in a single file.
41 |
--------------------------------------------------------------------------------
/awips_scmi/styleRules/goesrCMI-ImageryStyleRules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | i04
9 | i05
10 | m12
11 | m13
12 | m14
13 | m15
14 | m16
15 |
16 |
17 | C
18 |
19 | 55
20 | -110
21 |
22 | Sat/IR/CIRA (IR Default)
23 |
24 | 55 10 -20 -50 -80
25 |
26 |
27 |
28 |
29 |
30 |
31 | dynamic_dnb
32 | adaptive_dnb
33 | histogram_dnb
34 |
35 |
36 |
37 | 0
38 | 1
39 |
40 | Sat/VIS/Linear
41 |
42 |
43 |
44 |
45 |
46 | i01
47 | i02
48 | i03
49 | m01
50 | m02
51 | m03
52 | m04
53 | m05
54 | m06
55 | m07
56 | m08
57 | m09
58 | m10
59 | m11
60 | viirs_crefl01
61 | viirs_crefl03
62 | viirs_crefl04
63 | viirs_crefl08
64 |
65 |
66 | %
67 |
68 | 0
69 | 100
70 |
71 | GOES-R/VIS/VIS_gray_sq-root-12
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/build_environment.yml:
--------------------------------------------------------------------------------
1 | name: jenkins_p2g_swbundle
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - aggdraw
6 | - appdirs
7 | - cftime
8 | - conda-pack
9 | - configobj
10 | - curl
11 | - dask>=2024.2.1
12 | - distributed>=2022.2.1
13 | - donfig>=0.8.1
14 | - ffmpeg
15 | - fontconfig
16 | - freetype
17 | - gdal
18 | - hdf5plugin
19 | - h5py
20 | - netcdf4
21 | - pillow
22 | - pip
23 | - pooch
24 | - pycoast>=1.7.0
25 | - pydecorate>=0.4.0
26 | - pyhdf
27 | - pykdtree>=1.3.11
28 | - pyorbital>=1.8.2
29 | - pyproj>=3.6.1
30 | - pyresample>=1.28.2
31 | - pyshp>=2.3.1
32 | - pyspectral>=0.13.0
33 | - python=3.11
34 | - python-geotiepoints>=1.7.2
35 | - pyyaml>=6.0.1
36 | - rasterio>=1.3.9
37 | - requests
38 | - setuptools
39 | - trollimage>=1.23.1
40 | - trollsift>=0.5.1
41 | - scipy
42 | - zarr
43 | - xarray>=2024.2.0
44 | - fsspec
45 | - s3fs
46 | - pip:
47 | - git+https://github.com/pytroll/satpy.git
48 |
--------------------------------------------------------------------------------
/continuous_integration/environment.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 | channels:
3 | - conda-forge
4 | dependencies:
5 | - aggdraw
6 | - appdirs
7 | - cftime
8 | - configobj
9 | - curl
10 | - dask
11 | - distributed
12 | - ffmpeg
13 | - fontconfig
14 | - freetype
15 | - gdal
16 | - h5py
17 | - matplotlib
18 | - netcdf4
19 | - pillow
20 | - pycoast
21 | - pydecorate
22 | - pyhdf
23 | - pykdtree
24 | - pyorbital
25 | - pyproj
26 | - pyshp
27 | - pyspectral
28 | - python=3.11
29 | - python-geotiepoints
30 | - pyyaml
31 | - rasterio
32 | - requests
33 | - setuptools
34 | - six
35 | - trollimage
36 | - trollsift
37 | - scipy
38 | - zarr
39 | - xarray
40 | - pytest
41 | - pytest-cov
42 | - sphinx
43 | - pip
44 | - python-graphviz
45 | # - sphinx-argparse
46 | - fsspec
47 | - s3fs
48 | - sphinxcontrib-apidoc
49 | - pip:
50 | - pytest-lazy-fixtures
51 | - git+https://github.com/pytroll/satpy.git
52 | - git+https://github.com/pytroll/pyresample.git
53 | - git+https://github.com/djhoese/sphinx-argparse.git@bugfix-section-nums
54 |
--------------------------------------------------------------------------------
/doc/source/NEWS.rst:
--------------------------------------------------------------------------------
1 | ../../NEWS.rst
--------------------------------------------------------------------------------
/doc/source/NEWS_GEO2GRID.rst:
--------------------------------------------------------------------------------
1 | ../../NEWS_GEO2GRID.rst
--------------------------------------------------------------------------------
/doc/source/_static/300px_JPSS_Blue_Logo_WEB.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:d0a5b4d06e426284d87ae664745b77f9d0e5725edc0d93ea6c073e3cd1142632
3 | size 134842
4 |
--------------------------------------------------------------------------------
/doc/source/_static/CIMSS_logo_web_multicolor_PNG_1100x800.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fa7d9ff780fdb83be58e684e9afc664d0aad00a046ec21395a4656e14827edf8
3 | size 64079
4 |
--------------------------------------------------------------------------------
/doc/source/_static/CSPP_Logo.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:69b128d64b866ab1f123c3165f11c594bb9877313f794ccb376ccea48f663013
3 | size 142577
4 |
--------------------------------------------------------------------------------
/doc/source/_static/G2G Logo.psd:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:c5070e01e344291a4884d2d87754c4b0892a0fadccb54d614234cd7c5fe370a7
3 | size 936667
4 |
--------------------------------------------------------------------------------
/doc/source/_static/G2G_PDF_Logos.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:658c4317da264aacb11ad7978d6aeb35150653188d909dca4c8441c00b93357a
3 | size 172110
4 |
--------------------------------------------------------------------------------
/doc/source/_static/NOAA_logo_256px.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:deadd21089aafb75baf3144f0920ed013b2f8e237621f5618c0f7a28000fcd8d
3 | size 29857
4 |
--------------------------------------------------------------------------------
/doc/source/_static/P2G Logo.psd:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:fe45542d9fab8435e6763546be9e31ae6b7bb9941e2f76dd13bb4126fab06073
3 | size 773172
4 |
--------------------------------------------------------------------------------
/doc/source/_static/P2G_PDF_Logos.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:f8002f327a2a323e11855313a7180bb10750723d817a8d98dc13555c7554f70f
3 | size 227279
4 |
--------------------------------------------------------------------------------
/doc/source/_static/SSEC_logo_small24.png:
--------------------------------------------------------------------------------
1 | version https://git-lfs.github.com/spec/v1
2 | oid sha256:06a6993581e8858eec85b2b9c28976608207edb302717cbab950b7be3fdac30e
3 | size 20094
4 |
--------------------------------------------------------------------------------
/doc/source/_static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssec/polar2grid/0280a81b1998fd226667619a62097d7dd9678a45/doc/source/_static/favicon.ico
--------------------------------------------------------------------------------
/doc/source/_static/prettytables.css:
--------------------------------------------------------------------------------
1 | /* Customization so that all tables have a set width
2 | *
3 | * The default uses colgroup tags with percentages, but it doesn't set a
4 | * definite size for the table so the table's size is an undefined behavior
5 | */
6 |
7 | table.docutils {
8 | border: 0;
9 | border-collapse: collapse;
10 | width: 85%;
11 | }
12 |
13 | /* above is the default, this is the override to go back to normal width */
14 | table.full-width-table {
15 | border: 0;
16 | border-collapse: collapse;
17 | width: inherit;
18 | }
19 |
--------------------------------------------------------------------------------
/doc/source/data_access.rst:
--------------------------------------------------------------------------------
1 | Data Access
2 | ===========
3 |
4 | Geo2Grid software is designed with the direct broadcast community
5 | in mind as the target end user. However, the software can be used
6 | by anyone to create images from standard mission compliant input
7 | files. NOAA GOES ABI data is now freely available from Cloud
8 | Service Providers (CSPs) including Amazon Web Services (AWS),
9 | Google and Microsoft Azure. More information about accessing
10 | data that is part of NOAA's Open Data Dissemination Program
11 | can be found at this website:
12 |
13 | https://www.noaa.gov/nodd/datasets
14 |
15 | And a very nice interface that allows direct downloads from
16 | the AWS can be found here:
17 |
18 | http://home.chpc.utah.edu/~u0553130/Brian_Blaylock/cgi-bin/goes16_download.cgi
19 |
--------------------------------------------------------------------------------
/doc/source/dev_guide/api/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ssec/polar2grid/0280a81b1998fd226667619a62097d7dd9678a45/doc/source/dev_guide/api/.gitkeep
--------------------------------------------------------------------------------
/doc/source/dev_guide/dev_env.rst:
--------------------------------------------------------------------------------
1 | Development Environment
2 | =======================
3 |
4 | Before adding components to polar2grid you will need to set up a polar2grid
5 | development environment. This will make it easier to get the newest updates
6 | from other developers and vice versa. Creating a development environment does
7 | not provide the bash wrapper scripts since they depend on a software bundle.
8 | It is recommended that you contact the Polar2Grid team before adding/developing
9 | any new features to coordinate efforts.
10 |
11 | The main code repository for polar2grid can be found on github at
12 | https://github.com/ssec/polar2grid.
13 | Changes to this repository are done through a
14 | `pull request `_
15 | which will require creating a
16 | `fork `_ of the repository.
17 |
18 | The following instructions will assist in getting an environment up and running
19 | that will allow for easy development of polar2grid. The instructions will use an
20 | existing conda-based Python environment. This isn't strictly required, but is the
21 | easiest way to get going. To avoid possible Terms of Service issues with
22 | Anaconda.org, we recommend using ``miniforge`` or ``mambaforge`` to install
23 | conda on your system. See https://github.com/conda-forge/miniforge#miniforge
24 | for more information.
25 |
26 | 1. Get a copy of the code repository:
27 |
28 | .. code-block:: bash
29 |
30 | mkdir ~/polar2grid
31 | cd ~/polar2grid
32 | git clone https://github.com/ssec/polar2grid.git
33 | cd polar2grid
34 |
35 |
36 | 2. Create a conda environment specifically for Polar2Grid/Geo2Grid work:
37 |
38 | .. code-block:: bash
39 |
40 | conda env create -n p2g_dev --file build_environment.yml
41 |
42 | This script will walk you through a few questions including whether or not to use ShellB3 (linux only), provide
43 | a preinstalled ShellB3, or build and install secondary polar2grid components.
44 |
45 | 3. Active the conda environment and install "polar2grid" in development mode:
46 |
47 | .. code-block:: bash
48 |
49 | conda activate p2g_dev
50 | pip install --no-deps -e .
51 |
52 | 4. Run "polar2grid.sh" or "geo2grid.sh" to run example commands. These scripts
53 | are made available because you installed the python package above. Any
54 | changes made to the source code should be automatically reflected when you
55 | run these scripts. There are also "polar2grid" and "geo2grid" helper
56 | scripts when on non-bash environments. All of these scripts are simple
57 | wrappers around calling `python -m polar2grid.glue ...` which can be used
58 | as an alternative.
59 |
--------------------------------------------------------------------------------
/doc/source/dev_guide/index.rst:
--------------------------------------------------------------------------------
1 | :orphan:
2 |
3 | Developer's Guide
4 | =================
5 |
6 | This guide is intended to ease the development of additional readers,
7 | writers, or other components to the polar2grid package.
8 |
9 | If you would like to contribute to either Polar2Grid or the Pytroll Satpy
10 | package or have any questions about the collaboration please contact the
11 | CSPP/Polar2Grid team.
12 |
13 | Code repository: https://github.com/ssec/polar2grid
14 |
15 | **Developer's Guide Components:**
16 |
17 | .. toctree::
18 | :maxdepth: 1
19 |
20 | dev_env
21 | swbundle
22 | json_input
23 | adding_readers
24 | Python API
25 |
26 | Prerequisites
27 | -------------
28 |
29 | These polar2grid topics should be understood to get the most out of this
30 | guide:
31 |
32 | - The general :doc:`design <../design_overview>` of Polar2Grid
33 | - The responsibilities of a reader
34 | - The responsibilities of a writer
35 | - Package hierarchy and dependencies
36 |
37 | A developer should be familiar with these concepts to develop a new component
38 | for polar2grid:
39 |
40 | - python and numpy programming
41 | - remapping/regridding satellite imagery swaths (including types of projections)
42 | - python packaging, specifically `distribute `_ (setuptools)
43 | - git source code management system and the 'forking' and 'pull request'
44 | features of http://github.com
45 | - Xarray and dask programming and how it is used by the Satpy library
46 |
--------------------------------------------------------------------------------
/doc/source/dev_guide/swbundle.rst:
--------------------------------------------------------------------------------
1 | Software Bundle
2 | ===============
3 |
4 | Software bundles are the preferred method of distributing polar2grid by
5 | the |ssec|. Software bundles are gzipped tarballs with a binary installation
6 | of polar2grid and all of its dependencies. Software bundles distributed by
7 | the |ssec| are built for RHEL7 x86_64 systems.
8 |
9 | Note that normal development of Polar2Grid and Geo2Grid does not require
10 | building a software bundle. Building the bundle is generally an automated
11 | processing done by CI services running on the development servers.
12 |
13 | Creating a Software Bundle
14 | --------------------------
15 |
16 | A conda environment with all necessary dependencies must be activated before running the build process. To create
17 | this environment run the following using the "build_environment.yml" file from the git repository::
18 |
19 | conda env create -n p2g_build -f build_environment.yml
20 | conda activate p2g_build
21 |
22 | To create a software bundle tarball run the software bundle creation script::
23 |
24 | cd /path/to/repos/polar2grid/
25 | ./create_conda_software_bundle.sh /path/to/swbundle
26 |
--------------------------------------------------------------------------------
/doc/source/doi_role.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """Create sphinx roles for referencing the DOI of a published paper.
3 |
4 | Extension to add links to DOIs. With this extension you can use e.g.
5 | :doi:`10.1016/S0022-2836(05)80360-2` in your documents. This will
6 | create a link to a DOI resolver
7 | (``https://doi.org/10.1016/S0022-2836(05)80360-2``).
8 | The link caption will be the raw DOI.
9 | You can also give an explicit caption, e.g.
10 | :doi:`Basic local alignment search tool <10.1016/S0022-2836(05)80360-2>`.
11 |
12 | :copyright: Copyright 2015 Jon Lund Steffensen. Based on extlinks by
13 | the Sphinx team.
14 | :license: BSD.
15 |
16 | """
17 |
18 | from docutils import nodes, utils
19 | from sphinx.util.nodes import split_explicit_title
20 |
21 |
22 | def doi_role(typ, rawtext, text, lineno, inliner, options=None, content=None):
23 | text = utils.unescape(text)
24 | has_explicit_title, title, part = split_explicit_title(text)
25 | full_url = "https://doi.org/" + part
26 | if not has_explicit_title:
27 | title = "DOI:" + part
28 | pnode = nodes.reference(title, title, internal=False, refuri=full_url)
29 | return [pnode], []
30 |
31 |
32 | def arxiv_role(typ, rawtext, text, lineno, inliner, options=None, content=None):
33 | text = utils.unescape(text)
34 | has_explicit_title, title, part = split_explicit_title(text)
35 | full_url = "https://arxiv.org/abs/" + part
36 | if not has_explicit_title:
37 | title = "arXiv:" + part
38 | pnode = nodes.reference(title, title, internal=False, refuri=full_url)
39 | return [pnode], []
40 |
41 |
42 | def setup_link_role(app):
43 | app.add_role("doi", doi_role, override=True)
44 | app.add_role("DOI", doi_role, override=True)
45 | app.add_role("arXiv", arxiv_role, override=True)
46 | app.add_role("arxiv", arxiv_role, override=True)
47 |
48 |
49 | def setup(app):
50 | app.connect("builder-inited", setup_link_role)
51 | return {"version": "0.1", "parallel_read_safe": True}
52 |
--------------------------------------------------------------------------------
/doc/source/enhancements.rst:
--------------------------------------------------------------------------------
1 | :orphan:
2 |
3 | Enhancements
4 | ============
5 |
6 | Enhancing is the process where data is scaled to prepare the data for
7 | an output image format. These "enhancements" range from basic linear
8 | scaling for the data to fit in the output image format (ex. unsigned 8-bit
9 | integers), but can also scale the data to bring out certain areas of the
10 | data (ex. brighten dark regions of the image). The enhancement step is
11 | typically embedded as part of the writing process. They are configured
12 | in their own YAML configuration files with logical defaults to produce
13 | high quality images.
14 |
15 | Customizing enhancements is considered an advanced feature. You can find more
16 | information on customizing enhancements in the :doc:`custom_config` section.
17 | For more information on what Python enhancement functions are available see
18 | the :doc:`satpy:enhancements` documentation from Satpy.
19 |
20 | There are additionally some |project| specific enhancements that are used
21 | in special cases or for special products. The enhancements that |project|
22 | actually ends up using is dependent on the builtin YAML configuration files
23 | and any customizations made by the user.
24 |
25 | .. currentmodule:: polar2grid.enhancements
26 |
27 | .. autosummary::
28 |
29 | ~shared.temperature_difference
30 |
--------------------------------------------------------------------------------
/doc/source/examples/abi_example.rst:
--------------------------------------------------------------------------------
1 | Working with ABI Files
2 | ----------------------
3 |
4 | This example walks through the creation of GOES ABI
5 | GeoTIFF subset image files and adding overlays.
6 |
7 | The Basics of Geo2Grid for ABI GeoTIFF File Creation
8 | ****************************************************
9 |
10 | Find the options available when creating GOES-16, -17 and -18
11 | GeoTIFFs:
12 |
13 | ``geo2grid.sh -r abi_l1b -w geotiff -h``
14 |
15 | List the products that can be created from your ABI dataset:
16 |
17 | ``geo2grid.sh -r abi_l1b -w geotiff --list-products -f ``
18 |
19 | To create GeoTIFF output files of all bands found in your data set,
20 | including true and natural color full resolution sharpened 24 bit
21 | RGBs in standard satellite projection using 8 worker threads:
22 |
23 | ``geo2grid.sh -r abi_l1b -w geotiff --num-workers 8 -f ``
24 |
25 | Create a subset of ABI band output Geotiff image files for Channels 1, 2, 3 and 5:
26 |
27 | ``geo2grid.sh -r abi_l1b -w geotiff -p C01 C02 C03 C05 true_color -f ``
28 |
29 | Create ABI images over the given latitude/longitude region:
30 |
31 | ``geo2grid.sh -r abi_l1b -w geotiff --ll-bbox -f ``
32 |
33 |
34 | Create a natural color full resolution GeoTIFF from GOES-18 ABI
35 | observations acquired on 15 November 2022, 18:30 UTC over a latitude/
36 | longitude bounding box of 128W,30N to -118W,40N . This command
37 | assumes that all bands required to create the false color image are available:
38 |
39 | .. code-block:: bash
40 |
41 | geo2grid.sh -r abi_l1b -w geotiff -p natural_color --ll-bbox -128 30 -118 40 -f OR_ABI-L1b-RadF-M6C*_G18_s20223191830*.nc
42 |
43 | The resulting image is displayed below.
44 |
45 | .. raw:: latex
46 |
47 | \newpage
48 |
49 | .. figure:: ../_static/example_images/GOES-18_ABI_RadF_natural_color_20221115_183020_GOES-West_cutout.png
50 | :width: 100%
51 | :align: center
52 |
53 | ABI Natural color subset GeoTIFF image (GOES-18_ABI_RadF_natural_color_20221115_183020_GOES-West.tif)
54 |
55 | .. raw:: latex
56 |
57 | \newpage
58 |
59 | Add coastlines, borders and latitude/longitude grid lines to the image, and write the output to the file "my_goes18_abi_naturalcolor.png":
60 |
61 | .. code-block:: bash
62 |
63 | add_coastlines.sh --add-coastlines --add-borders --borders-resolution=h --borders-outline='red' --add-grid GOES-18_ABI_RadF_natural_color_20221115_183020_GOES-West.tif -o my_goes18_abi_naturalcolor.png
64 |
65 | .. figure:: ../_static/example_images/my_goes18_abi_naturalcolor.png
66 | :width: 100%
67 | :align: center
68 |
69 | GOES-18 natural color image with overlays (my_goes18_abi_naturalcolor.png).
70 |
71 | Convert the natural color GeoTIFF file into a Google Earth compatible
72 | Keyhole Markup language Zipped (KMZ) file.
73 |
74 | .. code-block:: bash
75 |
76 | gtiff2kmz.sh GOES-18_ABI_RadF_natural_color_20221115_183020_GOES-West.tif
77 |
78 | which creates the `GOES-18_ABI_RadF_natural_color_20221115_183020_GOES-West.kmz`
79 | file which can then be displayed easily in the Google Earth GeoBrowser.
80 |
--------------------------------------------------------------------------------
/doc/source/examples/ahi_example.rst:
--------------------------------------------------------------------------------
1 | Working with AHI Files
2 | ----------------------
3 |
4 | This example walks through the creation of Himawari AHI
5 | GeoTIFF subset image files and adding overlays.
6 |
7 | The Basics of Geo2Grid for AHI GeoTIFF File Creation
8 | ****************************************************
9 |
10 | Find the options available when creating AHI HSD
11 | GeoTIFFs:
12 |
13 | ``geo2grid.sh -r ahi_hsd -w geotiff -h``
14 |
15 | List the products that can be created from your AHI HSD dataset:
16 |
17 | ``geo2grid.sh -r ahi_hsd -w geotiff --list-products -f ``
18 |
19 | To create GeoTIFF output files of all bands found in your data set,
20 | including true and natural color full resolution sharpened 24 bit
21 | RGBs in standard satellite projection using 8 worker threads:
22 |
23 | ``geo2grid.sh -r ahi_hsd -w geotiff --num-workers 8 -f ``
24 |
25 | Create a subset of AHI band output Geotiff image files for Bands 1, 2, 3, 4 and 5:
26 |
27 | ``geo2grid.sh -r ahi_hsd -w geotiff -p B01 B02 B03 B04 B05 natural_color -f ``
28 |
29 | Create AHI images over a Lambert Conic Conformal (LCC) grid centered over
30 | Perth, Australia.
31 |
32 | Run the grid helper script to define the grid center, areal extent, spatial
33 | resolution and projection .
34 |
35 | ``p2g_grid_helper.sh perth 117.9 -32.4 500 500 1500 1500``
36 |
37 | .. code-block:: bash
38 |
39 | perth:
40 | projection:
41 | proj: lcc
42 | lat_1: -32.4
43 | lat_0: -32.4
44 | lon_0: 117.9
45 | datum: WGS84
46 | units: m
47 | no_defs: null
48 | type: crs
49 | shape:
50 | height: 1500
51 | width: 1500
52 | center:
53 | x: 117.9
54 | y: -32.4
55 | units: degrees
56 | resolution:
57 | dx: 500.0
58 | dy: 500.0
59 |
60 | Copy the output grid projection information into a grid configuration
61 | yaml file (my_grid.yaml). Use the grid to create an HSD AHI true color image from
62 | data observed on 12 November 2017, at 23:30 UTC.
63 |
64 | .. code-block:: bash
65 |
66 | geo2grid.sh -r ahi_hsd -w geotiff -p true_color --grid-configs /geo/hsd/my_grid.yaml -g perth --method nearest -f /data/ahi8/hsd/2330/*FLDK*.DAT
67 |
68 | The resulting image is displayed beow.
69 |
70 | .. raw:: latex
71 |
72 | \newpage
73 |
74 | .. figure:: ../_static/example_images/HIMAWARI-8_AHI_true_color_20181112_233020_perth_example.png
75 | :width: 100%
76 | :align: center
77 |
78 | AHI True color GeoTIFF image centered on Perth, Australia (HIMAWARI-8_AHI_true_color_20181112_233020_perth.tif).
79 |
80 | .. raw:: latex
81 |
82 | \newpage
83 |
84 | Add coastlines, borders and latitude/longitude grid lines and rivers to the image.
85 |
86 | .. code-block:: bash
87 |
88 | add_coastlines.sh --add-coastlines --add-rivers --rivers-resolution=h --add-grid HIMAWARI-8_AHI_true_color_20181112_233020_perth.tif
89 |
90 | .. figure:: ../_static/example_images/HIMAWARI-8_AHI_true_color_20181112_233020_perth.png
91 | :width: 100%
92 | :align: center
93 |
94 | Himawari-8 AHI true color image with overlays (HIMAWARI-8_AHI_true_color_20181112_233020_perth.png)
95 |
--------------------------------------------------------------------------------
/doc/source/examples/creating_animations_example.rst:
--------------------------------------------------------------------------------
1 | Using Geo2Grid to Create Animations
2 | -----------------------------------
3 |
4 | The advantage of Geostationary Satellites is the temporal resolution of the
5 | observations. Geo2Grid offers an easy interface for creating animations from
6 | Geo2Grid GeoTIFF and PNG files. The following example demonstrates how
7 | Geo2Grid software can be used to create an animation of
8 | files from a latitude/longitude subset of GOES-16 ABI CONUS GeoTIFF images
9 | located over the Southeastern United States.
10 |
11 | Create a series of GOES-16 ABI GeoTIFF files from a time sequence of data. In
12 | the bash shell script example below, I use the ABI CONUS Band 1 files to
13 | search for all files we have available from 4 January 2019. The files for
14 | this day are all located in the same directory. I then create true and
15 | natural color images from all time periods that are available.
16 |
17 | .. code-block:: bash
18 |
19 | #!/bin/bash
20 |
21 | # Set GEO2GRID environment variables
22 |
23 | export GEO2GRID_HOME=/home/g2g/geo2grid_v_1_2
24 | export PATH=$PATH:$GEO2GRID_HOME/bin
25 |
26 | # Get input list of files/times based upon ABI Band 1 files
27 |
28 | ls -1 /data/abi16/20190104/OR_ABI-L1b-RadC-M3C01_G16_s2019004*.nc > file_list.txt
29 |
30 | sort_list=$(cat file_list.txt | sort)
31 |
32 | # Make images for each time period available
33 | for file in ${sort_list} ; do
34 |
35 | echo ${file}
36 | # get date/time for geo2grid file search
37 | datetime=`basename $file | cut -c27-38`
38 | echo "datetime :"$datetime
39 |
40 | # Cut out a box with lat/lon bounds of 23N, 105W to 37N 75W
41 | geo2grid.sh -r abi_l1b -w geotiff --ll-bbox -105 23 -75 37 --num-workers 8 -p true_color natural_color -f /data/abi16/20190104/*${datetime}*.nc
42 |
43 | done
44 |
45 | exit 0
46 |
47 | This script created 120 GeoTIFF images for my time period 10:00 UTC through 20:00 UTC,
48 | with a time step of every 5 minutes.
49 |
50 | To create a 120 image animation, I use the Geo2Grid utility script
51 | ``gtiff2mp4.sh``.
52 |
53 | .. code-block:: bash
54 |
55 | gtiff2mp4.sh my_true_color_animation.mp4 *true_color*.tif
56 |
57 | The script wraps the ``ffmpeg`` video software, and combines all of the
58 | ``*true_color*.tif`` files found in the directory into an animation
59 | based upon defaults that make the output animations most compatible
60 | with modern video players. The output frame rate is 24 frames per
61 | second. The images will automatically be resized if they are
62 | large in order to ensure a smooth animation. I chose an output
63 | filename of ``my_true_color_animation.mp4``. The software can also
64 | create animations from input ``.png`` files.
65 |
66 | The figure below is the last image in the 120 loop sequence. The
67 | output MP4 animation is available for viewing at `this site `_.
68 |
69 | .. figure:: ../_static/example_images/GOES-16_ABI_RadC_true_color_20190104_195718_GOES-East.png
70 | :width: 100%
71 | :align: center
72 |
73 | The last GOES-16 ABI image from the 120 frame loop created with data from 4 January 2019. The image observations are from 19:57 UTC.
74 |
--------------------------------------------------------------------------------
/doc/source/examples/index.rst:
--------------------------------------------------------------------------------
1 | Examples
2 | ========
3 |
4 | .. toctree-filt::
5 | :maxdepth: 1
6 |
7 | :polar2grid:viirs_example
8 | :polar2grid:modis_example
9 | :polar2grid:acspo_example
10 | :polar2grid:asci_example
11 | :polar2grid:amsr2_example
12 | :geo2grid:abi_example
13 | :geo2grid:abi_l2_example
14 | :geo2grid:ahi_example
15 | :geo2grid:creating_animations_example
16 |
--------------------------------------------------------------------------------
/doc/source/examples/modis_example.rst:
--------------------------------------------------------------------------------
1 | .. raw:: latex
2 |
3 | \newpage
4 |
5 | Creating MODIS AWIPS Compatible Files
6 | -------------------------------------
7 |
8 | This example walks through the creation of MODIS
9 | NetCDF files for display in AWIPS.
10 |
11 | Basic MODIS Level 1B AWIPS compatible file creation
12 | ***************************************************
13 |
14 | Find the options available when creating MODIS AWIPS files:
15 |
16 | ``polar2grid.sh -r modis -w awips_tiled -h``
17 |
18 | List the products that can be created from your MODIS L1B dataset. For
19 | the new Sectorized Cloud and Moisture Imagery (SCMI) AWIPS writer, include
20 | the sector name (see Section 6.1.3) either Lambert Conformal Conic (LCC),
21 | Pacific, Mercator, or Polar:
22 |
23 | ``polar2grid.sh -r modis -w awips_tiled --sector-id LCC --list-products -f ``
24 |
25 | Follow the command below to create MODIS AWIPS NetCDF files of all
26 | Level 1B products found in your data set for your sector. When
27 | using the ``awips_tiled`` scmi server, it is advised that a specific grid be chosen, and
28 | that the ``--letters`` and ``--compress`` options are used.
29 | In our LCC example, we will use the 1km grid:
30 |
31 | ``polar2grid.sh -r modis -w awips_tiled --sector-id LCC --letters --compress -g lcc_conus_1km -f ``
32 |
33 | Create a subset of MODIS reprojected AWIPS products for a specfic AWIPS grid:
34 |
35 | .. code-block:: bash
36 |
37 | polar2grid.sh -r modis -w awips_tiled -p bt27 vis02 --sector-id LCC --letters --compress -g lcc_conus_1km -f
38 |
39 |
40 | .. figure:: ../_static/example_images/modis_vis02_example.png
41 | :width: 100%
42 | :align: center
43 |
44 | AWIPS display of Aqua MODIS Band 2 (.86 micron) reflectances from 20:52 UTC, 16 October 2022.
45 |
46 |
47 | Create true color and false color Aqua MODIS AWIPS NetCDF files from the 1000m, 500m, 250m and geolocation pass files acquired on 16 October 2022 at 20:52 UTC, reprojected onto the LCC 300m lettered grid.
48 |
49 | .. code-block:: bash
50 |
51 | polar2grid.sh -r modis -w awips_tiled --awips-true-color --awips-false-color --sector-id LCC --letters --compress -g lcc_conus_300 -f l1b/a1.22289.2052.1000m.hdf l1b/a1.22289.2052.250m.hdf l1b/a1.22289.2052.500m.hdf l1b/a1.22289.2052.geo.hdf
52 |
53 | .. figure:: ../_static/example_images/modis_true_color_example.png
54 | :width: 100%
55 | :align: center
56 |
57 | AWIPS display of Polar2Grid MODIS corrected reflectances combined to create a 24 bit true color image. Data was collected from a Aqua MODIS pass at 20:52 UTC, 16 October 2022.
58 |
--------------------------------------------------------------------------------
/doc/source/examples/viirs_example.rst:
--------------------------------------------------------------------------------
1 | Creating VIIRS SDR GeoTIFF Files
2 | --------------------------------
3 |
4 | This example walks through the creation of VIIRS
5 | GeoTIFF output files and adding overlays.
6 |
7 | Basic VIIRS SDR GeoTIFF file creation
8 | *************************************
9 |
10 | Find the options available when creating VIIRS SDR GeoTIFFs:
11 |
12 | polar2grid.sh -r viirs_sdr -w geotiff -h
13 |
14 | List the supported products that can be created from your VIIRS SDR dataset:
15 |
16 | .. code-block:: bash
17 |
18 | polar2grid.sh -r viirs_sdr -w geotiff --list-products -f
19 |
20 | This will provide a list of standard products that can be created
21 | from the files that are provided to polar2grid.sh.
22 |
23 | To create VIIRS GeoTIFF files of all default products (including true
24 | and false color) found in your data set
25 | and reprojected in default Platte Carrée projection using the default
26 | 4 workers, execute the following command:
27 |
28 | polar2grid.sh -r viirs_sdr -w geotiff -f
29 |
30 | Create a subset of VIIRS I- and M-Band reprojected GeoTIFFs using 8 workers:
31 |
32 | .. code-block:: bash
33 |
34 | polar2grid.sh -r viirs_sdr -w geotiff -p i01 i05 m09 m14 --num-workers 8 -f
35 |
36 | Create only true color and false color GeoTIFFs with a black background (no alpha channel):
37 |
38 | .. code-block:: bash
39 |
40 | polar2grid.sh -r viirs_sdr -w geotiff -p true_color false_color --fill-value 0 -f
41 |
42 | Create a true color image from a S-NPP VIIRS pass acquired on
43 | 19 September 2022, 17:53 UTC, in a US Centric Lambert Conformal Conic
44 | (LCC) projection:
45 |
46 | .. code-block:: bash
47 |
48 | polar2grid.sh -r viirs_sdr -w geotiff -p true_color -g lcc_fit -f /data/viirs_sdr
49 |
50 | .. raw:: latex
51 |
52 | \newpage
53 |
54 | .. figure:: ../_static/example_images/noaa20_viirs_true_color_20220919_175331_lcc_fit.jpg
55 | :width: 80%
56 | :align: center
57 | :class: with-border
58 |
59 | VIIRS True color image in Lambert Conformal Conic (LCC) projection (noaa20_viirs_true_color_20220919_175331_lcc_fit.tif).
60 |
61 | .. raw:: latex
62 |
63 | \newpage
64 |
65 | Add coastlines, borders and latitude/longitude grid lines to the true color image, and write the output to the file "myfile.png".
66 |
67 | .. code-block:: bash
68 |
69 | add_coastlines.sh --add-coastlines --add-borders --borders-resolution=h --borders-outline='red' --add-grid noaa20_viirs_true_color_20220919_175331_lcc_fit.tif -o myfile.png
70 |
71 | .. figure:: ../_static/example_images/noaa20_viirs_true_color_20220919_175331_lcc_fit_overlay.png
72 | :width: 80%
73 | :align: center
74 |
75 | VIIRS True color image with overlays (myfile.png).
76 |
77 | Convert the true color GeoTIFF file into a Google Earth compatible Keyhole Markup language Zipped (KMZ) file.
78 |
79 | .. code-block:: bash
80 |
81 | gtiff2kmz.sh noaa20_viirs_true_color_20220919_175331_lcc_fit.tif
82 |
83 | which creates the `noaa20_viirs_true_color_20220919_175331_lcc_fit.kmz`
84 | file. When displayed in Google Earth this image appears as:
85 |
86 | .. raw:: latex
87 |
88 | \newpage
89 |
90 | .. figure:: ../_static/example_images/noaa20_viirs_true_color_20220919_175331_lcc_fit_in_google_earth.jpg
91 | :width: 100%
92 | :align: center
93 |
94 | VIIRS True color KMZ image displayed in the Google Earth Geobrowser.
95 |
96 | .. raw:: latex
97 |
98 | \newpage
99 |
--------------------------------------------------------------------------------
/doc/source/grids.rst:
--------------------------------------------------------------------------------
1 | Grids
2 | =====
3 |
4 | |project| allows users to remap to one or more projected grids. A grid
5 | defines the uniform geographic area that an output image covers. |project|
6 | comes with various grids to choose from that should suit most users and their
7 | use cases. Some grids are provided for specific writers (like Tiled AWIPS), but
8 | can be used for other writers as well. Users can also specify their own
9 | custom grids. See the :doc:`custom_grids` documentation for help with this.
10 |
11 | Provided Grids
12 | --------------
13 |
14 | Below are descriptions for a few of the grids provided with |project|.
15 | For information on all of the grids provided by |project| see the
16 | `Grids Configuration YAML File
17 | `_.
18 |
19 | The grids' projections are defined using PROJ.4. Go to
20 | the `PROJ documentation `_
21 | for more information on what each projection parameter means.
22 |
23 | .. note::
24 |
25 | If the grid does not have a parameter specified it will be derived from the
26 | data during remapping. This allows for grids that fit to the data (dynamic
27 | grids).
28 |
29 | .. include:: grids_list.rst
30 |
--------------------------------------------------------------------------------
/doc/source/index.rst:
--------------------------------------------------------------------------------
1 | |project|
2 | =========
3 |
4 | .. include:: overview.rst
5 |
6 | .. toctree-filt::
7 | :maxdepth: 1
8 | :numbered:
9 |
10 | introduction
11 | installation
12 | getting_started
13 | readers/index
14 | :geo2grid:compositors
15 | remapping
16 | writers/index
17 | utilscripts
18 | verification/index
19 | examples/index
20 | :geo2grid:data_access
21 | grids
22 | custom_grids
23 | image_processing_techniques
24 |
25 | .. toctree-filt::
26 | :caption: Additional Details
27 | :maxdepth: 1
28 | :numbered:
29 | :excludebuilder: latex
30 |
31 | dev_guide/index
32 | :polar2grid:NEWS
33 | :geo2grid:NEWS_GEO2GRID
34 | enhancements
35 | :polar2grid:viirs_day_night_band
36 | :polar2grid:version3_implementation
37 | custom_config
38 |
39 | .. toctree-filt::
40 | :hidden:
41 | :excludebuilder: latex
42 |
43 | design_overview
44 | :polar2grid:misc_recipes
45 |
--------------------------------------------------------------------------------
/doc/source/misc_recipes.rst:
--------------------------------------------------------------------------------
1 | :orphan:
2 |
3 | Third-Party Recipes
4 | ===================
5 |
6 | Third-party tools like those provided by
7 | the Geospatial Data Abstraction Library (GDAL) can be
8 | found in the ``libexec/python_runtime/bin`` directory alongside the Python
9 | executable used by |project|.
10 |
11 | Combining GeoTIFF Images
12 | ------------------------
13 |
14 | When working with polar orbiter satellite data, it is often
15 | useful to stitch images of neighboring passes together.
16 | The GDAL merge tool can do this easily using |project|
17 | GeoTIFF output files.
18 |
19 | Suppose we have two VIIRS GeoTIFF files created from
20 | two sequential Suomi NPP overpasses. The GeoTIFF
21 | files we use in this example are
22 | false color images from data acquired at 20:43 and
23 | 22:22 UTC on 23 March 2017 created in a
24 | WGS84 projection. The individual images are
25 | displayed side by side below.
26 |
27 | .. raw:: latex
28 |
29 | \newpage
30 | \begin{landscape}
31 |
32 | .. figure:: _static/example_images/VIIRS_False_Color_Side_by_Side_Example_P2G.png
33 | :width: 100%
34 | :align: center
35 |
36 | Suomi-NPP VIIRS False Color Images from two separate passes
37 | (Red:VIIRS M-Band 11 (2.25 μm), Green:VIIRS M-Band 7 (.87 μm)
38 | and Blue:VIIRS M-Band 5 (.67μm)) observed on 23 March 2017.
39 |
40 | .. raw:: latex
41 |
42 | \end{landscape}
43 | \newpage
44 |
45 | To combine these images into a single output GeoTIFF image
46 | I can use the `gdal_merge.py` command that is packaged as
47 | part of |project|:
48 |
49 | .. code-block:: bash
50 |
51 | gdal_merge.py -n 0 -o my_false_color.tif npp_viirs_false_color_20170323_204320_wgs84_fit.tif npp_viirs_false_color_20170323_222255_wgs84_fit.tif
52 |
53 | The `-n 0` is used to set the background data value so
54 | it will not be included in the merge. This is required
55 | because without it, the black regions that border
56 | the second WGS84 GeoTIFF will be overlaid on top of the first
57 | image.
58 |
59 | The resulting image is displayed below.
60 |
61 | .. figure:: _static/example_images/my_false_color.jpg
62 | :width: 100%
63 | :align: center
64 |
65 | Merged S-NPP VIIRS False Color Images created from a pair
66 | of images acquired and processed from two different orbits.
67 |
68 | More than one image can be combined. There are more options
69 | available to `gdal_merge.py`. Execute
70 |
71 | .. code-block:: bash
72 |
73 | gdal_merge.py -h
74 |
75 | for a complete list of options.
76 |
--------------------------------------------------------------------------------
/doc/source/overview.rst:
--------------------------------------------------------------------------------
1 |
2 | .. ifconfig:: not is_geo2grid
3 |
4 | |project| is a set of command line tools for extracting data
5 | from earth-observing satellite instrument files,
6 | remapping it to uniform grids if needed, and writing that
7 | gridded data to a new file format. It provides an easy way
8 | to create high quality projected images. |project| was
9 | created by scientists and software developers at the
10 | `SSEC `_. It is distributed as
11 | part of the `CSPP LEO `_
12 | project for processing of data received via direct broadcast
13 | antennas. Although |project| was created to serve the direct
14 | broadcast community, it can be used on most archived data files.
15 |
16 | .. ifconfig:: is_geo2grid
17 |
18 | |project| is a set of command line tools for extracting data
19 | from earth-observing satellite instrument files,
20 | remapping it to uniform grids if needed, and writing that
21 | gridded data to a new file format. It provides an easy way
22 | to create high quality projected images. |project| was
23 | created by scientists and software developers at the
24 | `SSEC `_. It is distributed as
25 | part of the `CSPP Geo `_
26 | project for processing of data received via direct broadcast
27 | antennas. Although |project| was created to serve the direct
28 | broadcast community, it can be used on most archived data files.
29 |
30 | The features provided by |project| are accessible via bash scripts and binary
31 | command line tools. This is meant to give scientists an easy way to use and
32 | access features that typically involve complicated programming interfaces.
33 | Linux terminal commands included in these instructions assume the bash shell
34 | is used.
35 |
36 | .. ifconfig:: is_geo2grid
37 |
38 | .. only:: not html
39 |
40 | `Documentation Website `__
41 |
42 | `GitHub Repository `__
43 |
44 | `CSPP Geo2Grid Forum `_
45 |
46 | .. ifconfig:: not is_geo2grid
47 |
48 | .. only:: not html
49 |
50 | `Documentation Website `__
51 |
52 | `Contact Us `__
53 |
54 | `GitHub Repository `__
55 |
56 | `CSPP LEO Forum `_
57 |
--------------------------------------------------------------------------------
/doc/source/readers/abi_l2_nc.rst:
--------------------------------------------------------------------------------
1 | ABI L2 NetCDF Reader
2 | ====================
3 |
4 | .. automodule:: polar2grid.readers.abi_l2_nc
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.abi_l2_nc
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r abi_l2_nc -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r abi_l2_nc -h
21 |
22 | geo2grid.sh -r abi_l2_nc -w geotiff --list-products -f abi/full_disk/CG_ABI-L2-ACHAF-M6_G17_*.nc
23 |
24 | geo2grid.sh -r abi_l2_nc -w geotiff -p TEMP -f CG_ABI-L2-ACHTF-M6_G17_s20223271830316_e20223271839394_c20223271842100.nc
25 |
26 | geo2grid.sh -r abi_l2_nc -w geotiff -p MVFR_Fog_Prob LIFR_Fog_Prob IFR_Fog_Prob -f ABI-L2-GFLSF-M6_v3r1_g16_s202404231820204_e202404231829524_c202404231836180.nc
27 |
28 | geo2grid.sh -r abi_l2_nc -w geotiff -f /data/conus/CG_ABI-L2-*-M6_G18_s20241141826172*.nc
29 |
30 | geo2grid.sh -r abi_l2_nc -w geotiff -p AOD LST -f /abi/meso1/CG_ABI-L2-AODM1-M6_G18_s2024114182*.nc CG_ABI-L2-LSTM1-M6_G18_s2024114182*.nc
31 |
--------------------------------------------------------------------------------
/doc/source/readers/acspo.rst:
--------------------------------------------------------------------------------
1 | ACSPO SST Reader
2 | ================
3 |
4 | .. automodule:: polar2grid.readers.acspo
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.acspo
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r acspo -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | polar2grid.sh -r aspo -w geotiff -h
21 |
22 | polar2grid.sh -r acspo -w geotiff --list-products -f /noaa20/20220526060927-CSPP-L2P_GHRSST-SSTskin-VIIRS_N20-ACSPO_V2.80-v02.0-fv01.0.nc
23 |
24 | polar2grid.sh -r acspo -w geotiff --grid-coverage=0.0 -f /aqua/20220524205044-CSPP-L2P_GHRSST-SSTskin-MODIS_A-ACSPO_V2.80-v02.0-fv01.0.nc
25 |
26 | mpolar2grid.sh -r acspo -w hdf5 -p sst sea_ice_fraction --compress gzip --add-geolocation -g lcc_fit --grid-coverage=.02 -f /metopc/20220803024121-CSPP-L2P_GHRSST-SSTskin-AVHRRF_MC*.nc
27 |
28 | polar2grid.sh -r acspo -w awips_tiled --num-workers 4 --grid-coverage 0 -g lcc_conus_750 --sector-id LCC --letters --compress -f 20220526060927-CSPP-L2P_GHRSST-SSTskin-VIIRS_N20*.nc
29 |
30 | polar2grid.sh -r acspo -w awips_tiled -g merc_pacific_300 --sector-id Pacific --letters --compress -f *CSPP-L2P_GHRSST-SSTskin-VIIRS_NPP-ACSPO*.nc
31 |
--------------------------------------------------------------------------------
/doc/source/readers/agri_fy4a_l1.rst:
--------------------------------------------------------------------------------
1 | AGRI FY-4A L1 Reader
2 | ====================
3 |
4 | .. automodule:: polar2grid.readers.agri_fy4a_l1
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.agri_fy4a_l1
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r agri_fy4a_l1 -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r agri_fy4a_l1 -h
21 |
22 | geo2grid.sh -r agri_fy4a_l1 -w geotiff --list-products -f /data/fy4a/agri
23 |
24 | geo2grid.sh -r agri_fy4a_l1 -w geotiff --num-workers 8 -f /data/fy4a/agri
25 |
26 | geo2grid.sh -r agri_fy4a_l1 -w geotiff -p C02 C03 C08 C10 C12 -f FY4A-_AGRI--*.HDF
27 |
28 | geo2grid.sh -r agri_fy4a_l1 -w geotiff --ll-bbox 100 20 120 40 -p true_color -f /data/*.HDF
29 |
--------------------------------------------------------------------------------
/doc/source/readers/agri_fy4b_l1.rst:
--------------------------------------------------------------------------------
1 | AGRI FY-4B L1 Reader
2 | ====================
3 |
4 | .. automodule:: polar2grid.readers.agri_fy4b_l1
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.agri_fy4b_l1
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r agri_fy4b_l1 -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r agri_fy4b_l1 -h
21 |
22 | geo2grid.sh -r agri_fy4b_l1 -w geotiff --list-products -f /data/fy4b/agri
23 |
24 | geo2grid.sh -r agri_fy4b_l1 -w geotiff --num-workers 8 -f /data/fy4b/agri
25 |
26 | geo2grid.sh -r agri_fy4b_l1 -w geotiff -p C02 C03 C08 C10 C12 -f FY4B-_AGRI--*.HDF
27 |
28 | geo2grid.sh -r agri_fy4b_l1 -w geotiff --ll-bbox 100 20 120 40 -p true_color -f /data/*.HDF
29 |
--------------------------------------------------------------------------------
/doc/source/readers/ahi_hrit.rst:
--------------------------------------------------------------------------------
1 | AHI HimawariCast (HRIT) Reader
2 | ==============================
3 |
4 | .. automodule:: polar2grid.readers.ahi_hrit
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.ahi_hrit
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r ahi_hrit -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r ahi_hrit -h
21 |
22 | geo2grid.sh -r ahi_hrit -w geotiff --list-products -f /ahi8/hcast/2330
23 |
24 | geo2grid.sh -r ahi_hrit -w geotiff -f /ahi8/hcast/IMG_DK01IR4_201811122330
25 |
26 | geo2grid.sh -r ahi_hrit -w geotiff -p B03 B04 B05 B06 B16 natural_color --num-workers 8 -f /hrit/ahi/
27 |
28 | geo2grid.sh -r ahi_hrit -w geotiff --ll-bbox 125 -15 160 10 -f /data/IMG_DK01*
29 |
--------------------------------------------------------------------------------
/doc/source/readers/ahi_hsd.rst:
--------------------------------------------------------------------------------
1 | AHI Himawari Standard Data (HSD) Reader
2 | =======================================
3 |
4 | .. automodule:: polar2grid.readers.ahi_hsd
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.ahi_hsd
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r ahi_hsd -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r ahi_hsd -h
21 |
22 | geo2grid.sh -r ahi_hsd -w geotiff --list-products -f /ahi8/data/
23 |
24 | geo2grid.sh -r ahi_hsd -w geotiff -f HS_H08_20181112_2330_B01_R301_R10_S0101.DAT
25 |
26 | geo2grid.sh -r ahi_hsd -w geotiff -p B02 B03 B04 B05 B06 true_color --num-workers 8 -f /data/hsd/2330/*FLDK*.DAT
27 |
28 | geo2grid.sh -r ahi_hsd -w geotiff -p B09 B10 B11 B12 B13 natural_color -f /ahi8/HS_H08_20181112_2330_*R303*.DAT
29 |
30 | geo2grid.sh -r ahi_hsd -w geotiff --ll-bbox 125 -15 160 10 -f /data/hsd/*FLDK*.DAT
31 |
32 | geo2grid.sh -r ahi_hsd -w geotiff -p true_color natural_color --num-workers 4 \
33 | --grid-configs=/geo/my_grid.conf -g perth --method nearest -f /data/hsd/*FLDK*.DAT
34 |
--------------------------------------------------------------------------------
/doc/source/readers/ami_l1b.rst:
--------------------------------------------------------------------------------
1 | AMI L1B Reader
2 | ==============
3 |
4 | .. automodule:: polar2grid.readers.ami_l1b
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.ami_l1b
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r ami_l1b -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r ami_l1b -h
21 |
22 | geo2grid.sh -r ami_l1b -w geotiff --list-products -f /data/gk2a/ami
23 |
24 | geo2grid.sh -r ami_l1b -w geotiff --num-workers 8 -f /data/gk2a/ami
25 |
26 | geo2grid.sh -r ami_l1b -w geotiff -p VI005 VI006 VI008 NR013 NR016 true_color -f gk2a_ami*.nc
27 |
28 | geo2grid.sh -r ami_l1b -w geotiff --ll-bbox 125 -15 160 10 -f /ami_data
29 |
--------------------------------------------------------------------------------
/doc/source/readers/amsr2_l1b.rst:
--------------------------------------------------------------------------------
1 | AMSR2 L1B Reader
2 | ================
3 |
4 | .. automodule:: polar2grid.readers.amsr2_l1b
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.amsr2_l1b
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r amsr2_l1b -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | polar2grid.sh -r amsr2_l1b -w geotiff --list-products-all -f ../data/*L1DLBTBR*.h5
21 |
22 | polar2grid.sh -r amsr2_l1b -w geotiff -f /
23 |
24 | polar2grid.sh -r amsr2_l1b -w geotiff -g lcc_fit --fill-value 0 -f ../data/GW1AM2_202209121053_051D_L1DLBTBR_1110110.h5
25 |
26 | polar2grid.sh -r amsr2_l1b -w geotiff --extra-config-path $POLAR2GRID_HOME/example_enhancements/amsr2_png --fill-value 0 -f ../gcom_data/
27 |
28 | polar2grid.sh -r amsr2_l1b -w awips_tiled --list-products -f /amsr2/GW1AM2_202209120729_019D_L1DLBTBR_2220220.h5
29 |
30 | polar2grid.sh -r amsr2_l1b -w awips_tiled -g lcc_conus_1km -p btemp_36.5h btemp_89.0av --sector-id LCC --letters --compress -f GW1AM2_201607191903_137A_L1DLBTBR_1110110.h5
31 |
--------------------------------------------------------------------------------
/doc/source/readers/avhrr.rst:
--------------------------------------------------------------------------------
1 | AVHRR Reader
2 | ============
3 |
4 | .. automodule:: polar2grid.readers.avhrr_l1b_aapp
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.avhrr_l1b_aapp
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r avhrr_l1b_aapp -w
14 | :passparser:
15 |
16 | Execution Examples
17 | -----------------------
18 |
19 | .. code-block:: bash
20 |
21 | polar2grid.sh -r avhrr_l1b_aapp -w awips_tiled --list-products -f /l1b/
22 |
23 | polar2grid.sh -r avhrr_l1b_aapp -w geotiff -f ../input/hrpt_noaa19_20220917_1236_70145.l1b
24 |
25 | polar2grid.sh -r avhrr -w geotiff -p band3a_vis band4_bt -f /data/hrpt_M03*.l1b
26 |
27 | polar2grid.sh -r avhrr -w awips_tiled -p band3b_bt -g lcc_conus_1km --sector-id LCC --letters --compress -f hrpt_noaa18_20220918_1708_89324.l1b
28 |
29 | polar2grid.sh -r avhrr_l1b_aapp -w awips_tiled --num-workers 6 --grid-coverage .002 -g polar_alaska_1km --sector-id Polar --letters --compress -f /avhrr
30 |
31 | polar2grid.sh -r avhrr -w hdf5 --add-geolocation --grid-configs /home/avhrr/grids/local_grid.yaml -g my_grid -f ../input/hrpt_M01*.l1b
32 |
33 | polar2grid.sh -r avhrr -w binary --num-workers 8 -p band1_vis band4_bt -g lcc_eu -f /data/avhrr/metoba
34 |
--------------------------------------------------------------------------------
/doc/source/readers/clavrx.rst:
--------------------------------------------------------------------------------
1 | CLAVR-x Cloud Product Reader
2 | ============================
3 |
4 | .. automodule:: polar2grid.readers.clavrx
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.clavrx
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r clavrx -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | polar2grid.sh -r clavrx -w geotiff -h
21 |
22 | polar2grid.sh -r clavrx -w awips_tiled --sector-id LCC --list-products -f clavrx_npp_d20220902_t0742031_e0756141_b56210.level2.hdf
23 |
24 | polar2grid.sh -r clavrx -w geotiff -p cld_height_acha cloud_phase cloud_type -f noaa20/clavrx_j01*.hdf
25 |
26 | polar2grid.sh -r clavrx -w hdf5 --grid-coverage 0.002 -p cld_opd_nlcomp cld_reff_nlcomp refl_lunar_dnb_nom -f snpp/night/clavrx_npp*.hdf
27 |
28 | polar2grid.sh -r clavrx -w binary -f clavrx_a1.22245.0759.1000m.level2.hdf
29 |
30 | polar2grid.sh -r clavrx -w awips_tiled --num-workers 6 -g lcc_conus_300 --sector-id LCC --letters --compress --grid-coverage 0.002 -p cld_temp_acha cld_height_acha cloud_phase cld_opd_dcomp -f noaa19/clavrx_hrpt_noaa19_*.hdf
31 |
--------------------------------------------------------------------------------
/doc/source/readers/fci_l1c_nc.rst:
--------------------------------------------------------------------------------
1 | FCI L1c NetCDF Reader
2 | =====================
3 |
4 | .. automodule:: polar2grid.readers.fci_l1c_nc
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.fci_l1c_nc
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r fci_l1c_nc -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r fci_l1c_nc -h
21 |
22 | geo2grid.sh -r fci_l1c_nc -w geotiff --list-products -f /data/mtg/fci
23 |
24 | geo2grid.sh -r fci_l1c_nc -w geotiff --num-workers 8 -f /data/mtg/fci
25 |
26 | geo2grid.sh -r fci_l1c_nc -w geotiff -p vis_04 vis_05 vis_06 vis_08 nir_13 nir_16 true_color -f *_N_JLS_C_0072*.nc
27 |
28 | geo2grid.sh -r fci_l1c_nc -w geotiff --ll-bbox 10 -15 40 10 -f /fci_data
29 |
--------------------------------------------------------------------------------
/doc/source/readers/glm_l2.rst:
--------------------------------------------------------------------------------
1 | GLM L2 Reader
2 | =============
3 |
4 | .. automodule:: polar2grid.readers.glm_l2
5 | :noindex:
6 |
7 | Command Line Usage
8 | ------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.glm_l2
12 | :func: add_reader_argument_groups
13 | :prog: geo2grid.sh -r glm_l2 -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | geo2grid.sh -r glm_l2 -h
21 |
22 | geo2grid.sh -r glm_l2 -w geotiff --list-products -f /data/goes16/glm
23 |
24 | geo2grid.sh -r glm_l2 -w geotiff --num-workers 8 -f /data/goes16/glm
25 |
26 | geo2grid.sh -r glm_l2 -w geotiff -p flash_extent_density minimum_flash_area -f OR_GLM-L2-GLMC*.nc
27 |
28 | geo2grid.sh -r glm_l2 -w geotiff --ll-bbox -175 -2 -155 18 -f CG_GLM-L2-GLMF-M3_G18*.nc
29 |
30 | geo2grid.sh -r glm_l2 -w geotiff -p average_flash_area total_energy --num-workers 4 --grid-configs=/home/g2g/my_grid.conf -g madison --method nearest -f /data/goes16/glm
31 |
--------------------------------------------------------------------------------
/doc/source/readers/index.rst:
--------------------------------------------------------------------------------
1 | Readers
2 | =======
3 |
4 | Readers are the first component used in |project| processing. Their main
5 | responsibility is to extract input satellite imager data and the associated
6 | metadata from user provided input files.
7 | The data that readers distribute to other |project| components are called
8 | "products" ("datasets" in SatPy terminology).
9 |
10 | The number and type of products that can be created is dependent upon
11 | the input datasets that are provided. Composites, such as RGBs, require a
12 | specific set of band combinations to be present. All products that
13 | can be created for a given input dataset can be determined by
14 | using the ``--list-products`` option.
15 |
16 | .. toctree-filt::
17 | :maxdepth: 1
18 |
19 | :polar2grid:viirs_sdr
20 | :polar2grid:viirs_l1b
21 | :polar2grid:modis_l1b
22 | :polar2grid:avhrr
23 | :polar2grid:amsr2_l1b
24 | :polar2grid:nucaps
25 | :polar2grid:mirs
26 | :polar2grid:acspo
27 | :polar2grid:clavrx
28 | :polar2grid:viirs_edr_active_fires
29 | :polar2grid:viirs_edr
30 | :polar2grid:mersi2_l1b
31 | :polar2grid:mersi_ll_l1b
32 | :geo2grid:abi_l1b
33 | :geo2grid:abi_l2_nc
34 | :geo2grid:agri_fy4a_l1
35 | :geo2grid:agri_fy4b_l1
36 | :geo2grid:ahi_hsd
37 | :geo2grid:ahi_hrit
38 | :geo2grid:ami_l1b
39 | :geo2grid:glm_l2
40 | :geo2grid:fci_l1c_nc
41 |
--------------------------------------------------------------------------------
/doc/source/readers/mersi2_l1b.rst:
--------------------------------------------------------------------------------
1 | MERSI-2 L1B Reader
2 | ==================
3 |
4 | .. automodule:: polar2grid.readers.mersi2_l1b
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.mersi2_l1b
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r mersi2_l1b -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | $POLAR2GRID_HOME/bin/polar2grid.sh -r mersi2_l1b -w geotiff -h
21 |
22 | polar2grid.sh -r mersi2_l1b -w geotiff --list-products -f tf2019259173245.FY3D-X_MERSI*.HDF
23 |
24 | polar2grid.sh -r mersi2_l1b -w geotiff -p 1 2 3 4 6 7 20 25 -f tf2019233172521.FY3D-X_MERSI_0250M_L1B.HDF tf2019233172521.FY3D-X_MERSI_1000M_L1B.HDF tf2019233172521.FY3D-X_MERSI_GEOQK_L1B.HDF tf2019233172521.FY3D-X_MERSI_GEO1K_L1B.HDF
25 |
26 | polar2grid.sh -r mersi2_l1b -w geotiff -p true_color false_color -g lcc_fit -f ../mersi/tf2019259173245.FY3D-X_MERSI*.HDF
27 |
28 | polar2grid.sh -r mersi2_l1b -w hdf5 -p 20 21 22 23 24 25 --grid-configs ${HOME}/my_grid.yaml -g shanghai seoul -f ../data/*.HDF
29 |
30 | polar2grid.sh -r mersi2_l1b -w binary --sza-threshold=90 -p 1 2 3 4 6 7 20 25 -f tf2019226095418.FY3D-X_MERSI_*.HDF
31 |
--------------------------------------------------------------------------------
/doc/source/readers/mersi_ll_l1b.rst:
--------------------------------------------------------------------------------
1 | MERSI-LL L1B Reader
2 | ===================
3 |
4 | .. automodule:: polar2grid.readers.mersi_ll_l1b
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.mersi_ll_l1b
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r mersi_ll_l1b -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | $POLAR2GRID_HOME/bin/polar2grid.sh -r mersi_ll_l1b -w geotiff -h
21 |
22 | polar2grid.sh -r mersi_ll_l1b -w geotiff --list-products -f tf2019259173245.FY3E-X_MERSI*.HDF
23 |
24 | polar2grid.sh -r mersi_ll_l1b -w geotiff -p 1 2 3 4 6 7 -f tf2019233172521.FY3E-X_MERSI_0250M_L1B.HDF tf2019233172521.FY3E-X_MERSI_1000M_L1B.HDF tf2019233172521.FY3E-X_MERSI_GEOQK_L1B.HDF tf2019233172521.FY3E-X_MERSI_GEO1K_L1B.HDF
25 |
26 | polar2grid.sh -r mersi_ll_l1b -w geotiff -p 1 2 -g lcc_fit -f ../mersi/tf2019259173245.FY3E-X_MERSI*.HDF
27 |
28 | polar2grid.sh -r mersi_ll_l1b -w hdf5 -p 3 4 5 --grid-configs ${HOME}/my_grid.yaml -g shanghai seoul -f ../data/*.HDF
29 |
30 | polar2grid.sh -r mersi_ll_l1b -w binary --sza-threshold=90 -p 1 -f tf2019226095418.FY3E-X_MERSI_*.HDF
31 |
--------------------------------------------------------------------------------
/doc/source/readers/mirs.rst:
--------------------------------------------------------------------------------
1 | MIRS Reader
2 | ===========
3 |
4 | .. automodule:: polar2grid.readers.mirs
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.mirs
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r mirs -w
14 | :passparser:
15 |
16 | Execution Examples
17 | -----------------------
18 |
19 | .. raw:: latex
20 |
21 | \begin{minipage}{\linewidth}
22 |
23 | .. code-block:: bash
24 |
25 | polar2grid.sh -r mirs -w geotiff --list-products -f /atms/NPR-MIRS-IMG_v11r8_n20_s202208250741413_e202208250753249_c202208250817490.nc
26 |
27 | polar2grid.sh -r mirs -w geotiff --list-products-all -f /atms/NPR-MIRS-IMG_v11r8_npp_s202208250653413_e202208250704529_c202208250730310.nc
28 |
29 | polar2grid.sh -r mirs -w geotiff -p btemp_88v btemp_183h3 swe -g lcc_fit -f /atms/
30 |
31 | polar2grid.sh -r mirs -w awips_tiled --num-workers 4 --grid-coverage 0 -g merc_pacific_1km --sector-id Pacific --letters --compress -p swe tpw sea_ice rain_rate btemp_89v1 -f /noaa19/NPR-MIRS-IMG_v11r8_n19_s202208250310331_e202208250314143_c202208251718490.nc
32 |
33 | polar2grid.sh -r mirs -w awips_tiled --bt-channels -g lcc_conus_750 --sector-id LCC --letters --compress -f ../input/NPR-MIRS-IMG_v11r1_NPP_s201611111032500_e201611111044016_c201611111121100.nc
34 |
35 | polar2grid.sh -r mirs -w hdf5 --add-geolocation --dtype float32 -f ../metopc/NPR-MIRS-IMG_v11r8_ma3_s202208251542209_e202208251554261_c202208251742030.nc
36 |
37 | .. raw:: latex
38 |
39 | \end{minipage}
40 |
--------------------------------------------------------------------------------
/doc/source/readers/nucaps.rst:
--------------------------------------------------------------------------------
1 | NUCAPS Reader
2 | =============
3 |
4 | .. automodule:: polar2grid.readers.nucaps
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.nucaps
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r nucaps -w
14 | :passparser:
15 |
--------------------------------------------------------------------------------
/doc/source/readers/viirs_edr.rst:
--------------------------------------------------------------------------------
1 | VIIRS EDR Reader
2 | ================
3 |
4 | .. automodule:: polar2grid.readers.viirs_edr
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.viirs_edr
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r viirs_edr -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | polar2grid.sh -r viirs_edr -w geotiff -f /
21 |
22 | polar2grid.sh -r viirs_edr -w geotiff -h
23 |
24 | polar2grid.sh -r viirs_edr -w geotiff --list-products -f ../edr/*.nc
25 |
26 | polar2grid.sh -r viirs_edr -w geotiff -p true_color_surf false_color_surf --num-workers 8 -f ../edr/edr/SurfRefl*.nc
27 |
28 | polar2grid.sh -r viirs_edr -w hdf5 --add-geolocation --dtype float32 -p NDVI EVI --maximum-weight-mode -f SurfRefl*.nc
29 |
30 | polar2grid.sh -r viirs_edr -w awips_tiled -p AOD550 CldTopHght CldTopTemp -g lcc_conus_300 --sector-id LCC --letters --compress -f /viirs/JRR-AOD_v3r0_j01_s202406051854471_e202406051856116_c202406052204237.nc /viirs/JRR-CloudHeight_v3r0_j01_s202406051854471_e202406051856116_c202406052204237.nc
31 |
--------------------------------------------------------------------------------
/doc/source/readers/viirs_edr_active_fires.rst:
--------------------------------------------------------------------------------
1 | VIIRS EDR Active Fires Reader
2 | =============================
3 |
4 | .. automodule:: polar2grid.readers.viirs_edr_active_fires
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.viirs_edr_active_fires
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r viirs_edr_active_fires -w
14 | :passparser:
15 |
16 | Some output GeoTIFF fire products are color enhanced:
17 |
18 | AFIMG
19 |
20 | confidence_cat - Low (Yellow), Nominal (Orange), High (Red)
21 |
22 | power - 1 - 250 and above (MW) Yellow->Red
23 |
24 | AFMOD
25 |
26 | confidence_pct - 1-100% Yellow->Red
27 |
28 | power - 1 - 250 and above (MW) Yellow->Red
29 |
30 | Examples:
31 |
32 | .. code-block:: bash
33 |
34 | $POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_edr_active_fires -w geotiff -h
35 |
36 | polar2grid.sh -r viirs_edr_active_fires -w geotiff --list-products -f ../active_fire_edr/AFIMG*.nc
37 |
38 | polar2grid.sh -r viirs_edr_active_fires -w geotiff --list-products -f ../active_fire_edr/AFMOD*.nc
39 |
40 | polar2grid.sh -r viirs_edr_active_fires -w geotiff -p confidence_cat T4 img_edr/AFIMG*.nc
41 |
42 | polar2grid.sh -r viirs_edr_active_fires -w geotiff -g lcc_aus -p confidence_pct T13 -f AFMOD_j01_d20191120_t1513353_e1514581_b10389_c20191121192444396115_cspp_dev.nc
43 |
44 | **NOTE:** The active fire images can be overlaid onto another GeoTIFF.
45 | See :ref:`util_script_fireoverlay` for instructions.
46 |
--------------------------------------------------------------------------------
/doc/source/readers/viirs_edr_flood.rst:
--------------------------------------------------------------------------------
1 | VIIRS EDR Flood Reader
2 | ======================
3 |
4 | .. automodule:: polar2grid.readers.viirs_edr_flood
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.viirs_edr_flood
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r viirs_edr_flood -w
14 | :passparser:
15 |
16 | The end product GeoTIFF file is color enhanced using the color map
17 | described in the CSPP VIIRS Flood Detection Software Version 1.1 and
18 | shown below.
19 |
20 | .. figure:: ../_static/example_images/Flood_Legend.png
21 | :width: 30%
22 | :align: center
23 |
24 | Please note that since the CSPP VIIRS Flood Detection Product is
25 | a gridded product that has already been reprojected
26 | (cylindrical equidistant), it requires more time to reproject the
27 | data onto any other grid. It is recommended that if users want
28 | to re-grid the output Flood HDF4 product, that they choose small
29 | sections of data.
30 |
31 | Examples:
32 |
33 | .. code-block:: bash
34 |
35 | $POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_edr_flood -w geotiff -h
36 |
37 | polar2grid.sh -r viirs_edr_flood -w geotiff -g lcc_fit -f
38 |
--------------------------------------------------------------------------------
/doc/source/readers/viirs_l1b.rst:
--------------------------------------------------------------------------------
1 | VIIRS L1B Reader
2 | ================
3 |
4 | .. automodule:: polar2grid.readers.viirs_l1b
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.readers.viirs_l1b
12 | :func: add_reader_argument_groups
13 | :prog: polar2grid.sh -r viirs_l1b -w
14 | :passparser:
15 |
16 | Examples:
17 |
18 | .. code-block:: bash
19 |
20 | $POLAR2GRID_HOME/bin/polar2grid.sh -r viirs_l1b -w geotiff -h
21 |
22 | polar2grid.sh -r viirs_l1b -w geotiff --list-products -f ../data/*.nc
23 |
24 | polar2grid.sh -r viirs_l1b -w geotiff -p m01 -f /l1b/VJ102MOD.A2022257.1748.001.2022258055009.nc l1b/VJ103MOD.A2022257.1748.001.2022258054957.nc
25 |
26 | polar2grid.sh -r viirs_l1b -w hdf5 -g lcc_fit --add-geolocation -p i01 i02 -f VNP02IMG.A2022257.1842*.nc VNP03MOD.A2022257.1842*.nc
27 |
28 | polar2grid.sh -r viirs_l1b -w geotiff -p true_color false_color -f VNP02*.A2022257.1842*.nc VNP03*.A2022257.1842*.nc
29 |
--------------------------------------------------------------------------------
/doc/source/summary_table.rst:
--------------------------------------------------------------------------------
1 | .. File auto-generated by ``generate_summary_table.py``
2 |
3 | .. tabularcolumns:: |L|L|L|l|l|
4 |
5 | .. list-table:: Reader/Writer Summary Table (**NOTE: This is Not a Complete List Available Readers**)
6 | :header-rows: 1
7 |
8 | * - **Input Source**
9 | - **Input Filename Pattern**
10 | - **Output Type**
11 | - **Reader Name**
12 | - **Writer Name**
13 | * - **Suomi-NPP VIIRS Sensor Data Records**
14 | - SVI01_npp_*.h5
15 | GITCO_npp_*.h5
16 | - 8-bit single band GeoTIFF
17 | - viirs_sdr
18 | - geotiff
19 | * - "
20 | - "
21 | - AWIPS NetCDF
22 | - viirs_sdr
23 | - awips_tiled
24 | * - "
25 | - "
26 | - HDF5
27 | - viirs_sdr
28 | - hdf5
29 | * - "
30 | - "
31 | - Binary
32 | - viirs_sdr
33 | - binary
34 | * - "
35 | - "
36 | - 24-bit true and false color GeoTIFF
37 | - viirs_sdr
38 | - geotiff
39 | * - **Aqua and Terra MODIS Level 1b (IMAPP or NASA archive files)**
40 | - MOD021KM*.hdf
41 | MOD03*.hdf
42 |
43 | or
44 |
45 | t1.*1000m.hdf
46 | t1.*.geo.hdf
47 | - 8 bit single band GeoTIFF
48 | - modis_l1b
49 | - geotiff
50 | * - "
51 | - "
52 | - AWIPS NetCDF
53 | - modis_l1b
54 | - awips_tiled
55 | * - "
56 | - "
57 | - HDF5
58 | - modis_l1b
59 | - hdf5
60 | * - "
61 | - "
62 | - Binary
63 | - modis_l1b
64 | - binary
65 | * - "
66 | - "
67 | - 24-bit true and false color GeoTIFF
68 | - modis_l1b
69 | - geotiff
70 | * - **NOAA-18, NOAA-19,Metop-A,-B,-C AVHRR AAPP Level 1b**
71 | - hrpt_noaa18_*.l1b
72 | - 8 bit single band GeoTIFF
73 | - avhrr_l1b
74 | - geotiff
75 | * - "
76 | - "
77 | - AWIPS NetCDF
78 | - avhrr_l1b
79 | - awips_tiled
80 | * - "
81 | - "
82 | - HDF5
83 | - avhrr_l1b
84 | - hdf5
85 | * - "
86 | - "
87 | - Binary
88 | - avhrr_l1b
89 | - binary
90 | * - **GCOM-W1 ASMR2 L1B**
91 | - GW1AM2\*L1DLBTBR\*.h5
92 | - 8 bit single band GeoTIFF
93 | - amsr2_l1b
94 | - geotiff
95 | * - "
96 | - "
97 | - AWIPS NetCDF
98 | - amsr2_l1b
99 | - awips_tiled
100 | * - "
101 | - "
102 | - HDF5
103 | - amsr2_l1b
104 | - hdf5
105 | * - "
106 | - "
107 | - Binary
108 | - amsr2_l1b
109 | - binary
110 | * - **CLAVR-x Cloud Retrievals**
111 | - clavrx*.hdf
112 | - 8 bit single band GeoTIFF
113 | - clavrx
114 | - geotiff
115 | * - "
116 | - "
117 | - AWIPS NetCDF
118 | - clavrx
119 | - awips_tiled
120 | * - "
121 | - "
122 | - HDF5
123 | - clavrx
124 | - hdf5
125 | * - "
126 | - "
127 | - Binary
128 | - clavrx
129 | - binary
130 | * - **ACSPO Sea Surface Temperatures**
131 | - \*-STAR-L2P_GHRSST-SSTskin-\*.nc
132 | - 8 bit single band GeoTIFF
133 | - acspo
134 | - geotiff
135 | * - "
136 | - "
137 | - AWIPS NetCDF
138 | - acspo
139 | - awips_tiled
140 | * - "
141 | - "
142 | - HDF5
143 | - acspo
144 | - hdf5
145 | * - "
146 | - "
147 | - Binary
148 | - acspo
149 | - binary
150 |
--------------------------------------------------------------------------------
/doc/source/summary_table_geo2grid_readers.rst:
--------------------------------------------------------------------------------
1 | .. File auto-generated by ``generate_summary_table.py``
2 |
3 | .. tabularcolumns:: |p{2cm}|p{3cm}|p{15cm}|
4 |
5 | .. list-table:: Geo2Grid Reader Summary Table
6 | :header-rows: 1
7 |
8 | * - **Reader Name**
9 | - **Input Source**
10 | - **Input Filename Pattern**
11 | * - abi_l1b
12 | - ABI L1B
13 | - ``OR_ABI-L1b-Rad?-M?C??_G??_s -w awips_tiled
16 | :passparser:
17 |
18 | .. raw:: latex
19 |
20 | \newpage
21 |
22 | Lettered Sectors
23 | ----------------
24 |
25 | .. figure:: ../_static/example_images/scmi_grid_LCC.png
26 | :width: 100%
27 | :align: center
28 |
29 | `"LCC" Sector Lettered Grid `_
30 |
31 | .. figure:: ../_static/example_images/scmi_grid_Pacific.png
32 | :width: 100%
33 | :align: center
34 |
35 | `"Pacific" Sector Lettered Grid `_
36 |
37 | .. figure:: ../_static/example_images/scmi_grid_Mercator.png
38 | :width: 100%
39 | :align: center
40 |
41 | `"Mercator" Sector Lettered Grid `_
42 |
43 | .. figure:: ../_static/example_images/scmi_grid_Polar.png
44 | :width: 100%
45 | :align: center
46 |
47 | `"Polar" Sector Lettered Grid `_
48 |
49 | .. raw:: latex
50 |
51 | \newpage
52 |
53 | Examples:
54 |
55 | .. ifconfig:: not is_geo2grid
56 |
57 | .. code-block:: bash
58 |
59 | polar2grid.sh -r viirs_sdr -w awips_tiled --awips-true-color --awips-false-color --num-workers 8 -g lcc_conus_300 --sector-id LCC --letters --compress -f viirs/*.h5
60 |
61 | polar2grid.sh -r modis_l1b -w awips_tiled -p vis01 bt31 -g lcc_conus_1km --sector-id LCC --letters --compress -f a1.22261.1857.250m.hdf a1.22261.1857.1000m.hdf a1.22261.1857.geo.hdf
62 |
63 | polar2grid.sh -r amsr2_l1b -w awips_tiled --num-workers 4 -grid-coverage 0.002 -g polar_alaska_1km --sector-id Polar --letters --compress -f $data_dir/GW1AM2_202209102335_181A_L1DLBTBR_1110110.h5
64 |
65 | polar2grid.sh -r amsr2_l1b -w awips_tiled --grid-coverage 0 -g merc_pacific_1km --sector-id Pacific --letters --compress -f GW1AM2_202209120018_188A_L1DLBTBR_1110110.h5
66 |
67 | polar2grid.sh -r viirs_edr -w awips_tiled -p AOD -g lcc_conus_300 --sector-id LCC --letters --compress --grid-coverage 0.002 -f JRR-AOD_*.nc
68 |
69 | polar2grid.sh -r viirs_edr -w awips_tiled -p NDVI -g lcc_conus_300 --sector-id LCC --letters --compress --grid-coverage 0.002 --maximum-weight-mode -f SurfRefl*.nc
70 |
71 | polar2grid.sh -r acspo -w awips_tiled --num-workers 8 --grid-coverage 0 -g lcc_conus_750 --sector-id LCC --letters --compress --method ewa --weight-delta-max 40.0 --weight-distance-max 1.0 -f $data_dir/202*VIIRS_NPP-ACSPO_V2.80*.nc
72 |
73 |
74 | .. ifconfig:: is_geo2grid
75 |
76 | .. code-block:: bash
77 |
78 | geo2grid.sh -r abi_l1b -w awips_tiled --letters --compress --sector-id GOES_EAST -f /path/to/files*.nc
79 |
--------------------------------------------------------------------------------
/doc/source/writers/binary.rst:
--------------------------------------------------------------------------------
1 | Binary Writer
2 | =============
3 |
4 | .. automodule:: polar2grid.writers.binary
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.writers.binary
12 | :func: add_writer_argument_groups
13 | :prog: polar2grid.sh -r -w binary
14 | :passparser:
15 |
--------------------------------------------------------------------------------
/doc/source/writers/geotiff.rst:
--------------------------------------------------------------------------------
1 | GeoTIFF Writer
2 | ==============
3 |
4 | .. automodule:: polar2grid.writers.geotiff
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.writers.geotiff
12 | :func: add_writer_argument_groups
13 | :prog: |script| -r -w geotiff
14 | :passparser:
15 | :nodefaultconst:
16 |
--------------------------------------------------------------------------------
/doc/source/writers/hdf5.rst:
--------------------------------------------------------------------------------
1 | HDF5 Writer
2 | ===========
3 |
4 | .. automodule:: polar2grid.writers.hdf5
5 | :noindex:
6 |
7 | Command Line Arguments
8 | ----------------------
9 |
10 | .. argparse::
11 | :module: polar2grid.writers.hdf5
12 | :func: add_writer_argument_groups
13 | :prog: polar2grid.sh -r -w hdf5
14 | :passparser:
15 |
--------------------------------------------------------------------------------
/doc/source/writers/index.rst:
--------------------------------------------------------------------------------
1 | Writers
2 | =======
3 |
4 | Writers are the final step in the |project| processing chain. They take
5 | gridded data, scale it to fit in an output format, and write the data to
6 | one or more output files. These files can then be provided to a visualization
7 | tool that is optimized for viewing the data.
8 |
9 | .. toctree-filt::
10 | :maxdepth: 1
11 |
12 | :polar2grid:awips_tiled
13 | :polar2grid:binary
14 | :polar2grid:geotiff
15 | :polar2grid:hdf5
16 | :geo2grid:geotiff
17 |
--------------------------------------------------------------------------------
/integration_tests/README.rst:
--------------------------------------------------------------------------------
1 | How to run the tests in your own environment
2 | ============================================
3 |
4 | Navigate to your Polar2Grid directory, then run::
5 |
6 | conda env update -n jenkins_p2g_docs -f build_environment.yml
7 | conda env update -n jenkins_p2g_docs -f jenkins_environment.yml
8 | conda activate jenkins_p2g_docs
9 | pip install .
10 | conda env update -n jenkins_p2g_swbundle -f build_environment.yml
11 | conda activate jenkins_p2g_swbundle
12 | # Creates a folder with the necessary scripts to run the tests.
13 | ./create_conda_software_bundle.sh polar2grid-`date +%Y%m%d-%H%M%S`
14 | conda activate jenkins_p2g_docs
15 | export POLAR2GRID_HOME=polar2grid-`date +%Y%m%d-%H%M%S`
16 | cd integration_tests
17 | # Runs the tests.
18 | behave --no-logcapture --no-capture --no-color -D datapath=/path/to/test/data
19 |
20 | To run a specific test, add the argument ``--name TESTNAME`` when running behave. The test names can be
21 | found in the feature files (for example: ``--name VIIRS_L1B`` would skip all tests except VIIRS_L1B).
22 |
23 | How to add tests
24 | ================
25 | Tests are found under ``integration_tests/features/``. There are two test files, ``geo2grid.feature`` and
26 | ``polar2grid.feature``. Each is composed hierarchically in this way: A ``Feature`` which contains a
27 | name and description, a ``Scenario Outline`` which details how the tests are ran, and finally ``Examples``
28 | with each containing a name and the specifics to pass into ``Scenario Outline`` (command, source, output).
29 | `command` should be the full shell command that you want to run with the `-f` flag last. source and output are
30 | directories containing input and expected output files respectively. To add a test, simply add another line to
31 | an existing ``Examples`` block or make a new ``Examples`` block following the format that is already there.
32 | For more information please see the official behave documentation:
33 | https://behave.readthedocs.io/en/latest/tutorial.html
34 |
35 | How Jenkins runs the tests
36 | ==========================
37 |
38 | Jenkins runs a script that follows similar steps as above. The script can be found in ``integration_tests/run.sh``.
39 |
40 | Jenkins home is on bumi.ssec.wisc.edu using port 8080, and data can be found in bumi:/data/test_data
41 |
42 | How to upgrade the version of Python used by Jenkins
43 | ====================================================
44 |
45 | Jenkins and the released software bundle are based on two conda
46 | environments: ``jenkins_p2g_docs`` and ``jenkins_p2g_docs``. Both
47 | of these environments currently live in:
48 | ``/var/lib/jenkins/mambaforge/envs/``. In order to upgrade the version of
49 | Python that the software bundle will use we must upgrade these environments.
50 | However, a simple ``conda update`` rarely works with an update of Python
51 | itself. To work around this we must delete the environments.
52 |
53 | 1. Update the version of python in the ``build_environment.yml`` file in the
54 | root of this repository.
55 | 2. Login to ``bumi`` and switch to the root account (``sudo -iu root``).
56 | 3. Run ``sudo -u jenkins /var/lib/jenkins/mambaforge/bin/conda update -n base conda``
57 | to update conda itself.
58 | 4. Run ``sudo -u jenkins /var/lib/jenkins/mambaforge/bin/conda env remove -n jenkins_p2g_docs``.
59 | 5. Run ``sudo -u jenkins /var/lib/jenkins/mambaforge/bin/conda env remove -n jenkins_p2g_swbundle``.
60 | 6. Rerun the CI jobs from the Jenkins web UI.
61 |
--------------------------------------------------------------------------------
/integration_tests/features/environment.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # encoding: utf-8
3 | # Copyright (C) 2021 Space Science and Engineering Center (SSEC),
4 | # University of Wisconsin-Madison.
5 | #
6 | # This program is free software: you can redistribute it and/or modify
7 | # it under the terms of the GNU General Public License as published by
8 | # the Free Software Foundation, either version 3 of the License, or
9 | # (at your option) any later version.
10 | #
11 | # This program is distributed in the hope that it will be useful,
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | # GNU General Public License for more details.
15 | #
16 | # You should have received a copy of the GNU General Public License
17 | # along with this program. If not, see .
18 | #
19 | # This file is part of the polar2grid software package. Polar2grid takes
20 | # satellite observation data, remaps it, and writes it to a file format for
21 | # input into another program.
22 | # Documentation: http://www.ssec.wisc.edu/software/polar2grid/
23 | """Configure behave tests."""
24 |
25 | import os
26 | import shutil
27 | import sys
28 | import tempfile
29 |
30 |
31 | def before_all(context):
32 | context.html_dst = context.config.userdata.get("html_dst", None)
33 | if context.html_dst is not None:
34 | context.html_dst = os.path.join(context.html_dst, "test_status")
35 | context.datapath = context.config.userdata["datapath"]
36 | if not context.datapath.startswith(os.sep):
37 | context.datapath = os.path.join(os.getcwd(), context.datapath)
38 | os.environ["DATA_PATH"] = context.datapath # for test command replacement
39 | p2g_home = os.environ.get("POLAR2GRID_HOME")
40 | # if POLAR2GRID_HOME isn't defined, assume things are installed in the python prefix
41 | context.p2g_path = os.path.join(p2g_home, "bin") if p2g_home is not None else os.path.join(sys.prefix, "bin")
42 | if p2g_home is None:
43 | # assume development/editable install
44 | import polar2grid
45 |
46 | os.environ["POLAR2GRID_HOME"] = os.path.join(os.path.dirname(polar2grid.__file__), "..", "swbundle")
47 |
48 |
49 | def before_feature(context, feature):
50 | tmpdir = tempfile.gettempdir()
51 | feature_name = os.path.basename(feature.filename).replace("<", "").replace(">", "").replace(".feature", "")
52 | context.base_temp_dir = os.path.join(tmpdir, "p2g_integration_tests", feature_name)
53 |
54 | # remove any previous test results
55 | if os.path.isdir(context.base_temp_dir):
56 | shutil.rmtree(context.base_temp_dir, ignore_errors=True)
57 | os.makedirs(context.base_temp_dir, exist_ok=True)
58 |
59 |
60 | def after_all(context):
61 | pass
62 |
--------------------------------------------------------------------------------
/integration_tests/features/geo2grid.feature:
--------------------------------------------------------------------------------
1 | Feature: Test geo2grid output images
2 | This takes test data from source and runs it through the command provided.
3 | It then compares the new image with the expected output.
4 |
5 | Scenario Outline: Test geo2grid images
6 | Given input data from
7 | Given an empty working directory
8 | When runs
9 | Then the output matches with the files in