pygac-fdr


Namepygac-fdr JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://github.com/pytroll/pygac-fdr
SummaryPython package for creating a Fundamental Data Record (FDR) of AVHRR GAC data using pygac
upload_time2023-11-28 10:17:18
maintainer
docs_urlNone
authorThe Pytroll Team
requires_python>=3.10
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # pygac-fdr
Python package for creating a Fundamental Data Record (FDR) of AVHRR GAC data using pygac


[![Build](https://github.com/pytroll/pygac-fdr/actions/workflows/ci.yaml/badge.svg)](https://github.com/pytroll/pygac-fdr/actions/workflows/ci.yaml)
[![Coverage](https://codecov.io/gh/pytroll/pygac-fdr/branch/main/graph/badge.svg?token=LC55GL9GXN)](https://codecov.io/gh/pytroll/pygac-fdr)
[![PyPI version](https://badge.fury.io/py/pygac-fdr.svg)](https://badge.fury.io/py/pygac-fdr)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5762183.svg)](https://doi.org/10.5281/zenodo.5762183)

Installation
============

To install the latest release:
```
pip install pygac-fdr
```

To install the latest development version:
```
pip install git+https://github.com/pytroll/pygac-fdr
```

Usage
=====

To read and calibrate AVHRR GAC level 1b data, adapt the config template in `etc/pygac-fdr.yaml`, then
run:
```
pygac-fdr-run --cfg=my_config.yaml /data/avhrr_gac/NSS.GHRR.M1.D20021.S0*
```

Results are written into the specified output directory in netCDF format. Afterwards, collect and
complement metadata of the generated netCDF files:

```
pygac-fdr-mda-collect --dbfile=test.sqlite3 /data/avhrr_gac/output/*
```

This might take some time, so the results are saved into a database. You can specify files from
multiple platforms; the metadata are analyzed for each platform separately. With a large number
of files you might run into limitations on the size of the command line argument ("Argument list
too long"). In this case use the following command to read the list of filenames from a file
(one per line):

```
pygac-fdr-mda-collect --dbfile=test.sqlite3 @myfiles.txt
```

Finally, update the netCDF metadata inplace:

```
pygac-fdr-mda-update --dbfile=test.sqlite3
```

Tips for AVHRR GAC FDR Users
============================

Checking Global Quality Flag
----------------------------

The global quality flag can be checked from the command line as follows:

```
ncks -CH -v global_quality_flag -s "%d" myfile.nc
```

Cropping Overlap
----------------

Due to the data reception mechanism consecutive AVHRR GAC files often partly contain the same information. This is what
we call overlap. For example some scanlines in the end of file A also occur in the beginning of file B. The
`overlap_free_start` and `overlap_free_end` attributes in `pygac-fdr` output files indicate that overlap. There are two
ways to remove it:

- Cut overlap with subsequent file: Select scanlines `0:overlap_free_end`
- Cut overlap with preceding file: Select scanlines `overlap_free_start:-1`

If, in addition, users want to create daily composites, a file containing observations from two days has to be used
twice: Once only the part before UTC 00:00, and once only the part after UTC 00:00. Cropping overlap and day together
is a little bit more complex, because the overlap might cover UTC 00:00. That is why the `pygac-fdr-crop` utility is
provided:

```
$ pygac-fdr-crop AVHRR-GAC_FDR_1C_N06_19810330T225108Z_19810331T003506Z_...nc --date 19810330
0 8260
$ pygac-fdr-crop AVHRR-GAC_FDR_1C_N06_19810330T225108Z_19810331T003506Z_...nc --date 19810331
8261 12472
```

The returned numbers are start- and end-scanline (0-based).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pytroll/pygac-fdr",
    "name": "pygac-fdr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "The Pytroll Team",
    "author_email": "pytroll@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/28/4833025da9e5c06123100225599ba081eceb24f054695923c8e1bf6c17a4/pygac-fdr-0.2.3.tar.gz",
    "platform": null,
    "description": "# pygac-fdr\nPython package for creating a Fundamental Data Record (FDR) of AVHRR GAC data using pygac\n\n\n[![Build](https://github.com/pytroll/pygac-fdr/actions/workflows/ci.yaml/badge.svg)](https://github.com/pytroll/pygac-fdr/actions/workflows/ci.yaml)\n[![Coverage](https://codecov.io/gh/pytroll/pygac-fdr/branch/main/graph/badge.svg?token=LC55GL9GXN)](https://codecov.io/gh/pytroll/pygac-fdr)\n[![PyPI version](https://badge.fury.io/py/pygac-fdr.svg)](https://badge.fury.io/py/pygac-fdr)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5762183.svg)](https://doi.org/10.5281/zenodo.5762183)\n\nInstallation\n============\n\nTo install the latest release:\n```\npip install pygac-fdr\n```\n\nTo install the latest development version:\n```\npip install git+https://github.com/pytroll/pygac-fdr\n```\n\nUsage\n=====\n\nTo read and calibrate AVHRR GAC level 1b data, adapt the config template in `etc/pygac-fdr.yaml`, then\nrun:\n```\npygac-fdr-run --cfg=my_config.yaml /data/avhrr_gac/NSS.GHRR.M1.D20021.S0*\n```\n\nResults are written into the specified output directory in netCDF format. Afterwards, collect and\ncomplement metadata of the generated netCDF files:\n\n```\npygac-fdr-mda-collect --dbfile=test.sqlite3 /data/avhrr_gac/output/*\n```\n\nThis might take some time, so the results are saved into a database. You can specify files from\nmultiple platforms; the metadata are analyzed for each platform separately. With a large number\nof files you might run into limitations on the size of the command line argument (\"Argument list\ntoo long\"). In this case use the following command to read the list of filenames from a file\n(one per line):\n\n```\npygac-fdr-mda-collect --dbfile=test.sqlite3 @myfiles.txt\n```\n\nFinally, update the netCDF metadata inplace:\n\n```\npygac-fdr-mda-update --dbfile=test.sqlite3\n```\n\nTips for AVHRR GAC FDR Users\n============================\n\nChecking Global Quality Flag\n----------------------------\n\nThe global quality flag can be checked from the command line as follows:\n\n```\nncks -CH -v global_quality_flag -s \"%d\" myfile.nc\n```\n\nCropping Overlap\n----------------\n\nDue to the data reception mechanism consecutive AVHRR GAC files often partly contain the same information. This is what\nwe call overlap. For example some scanlines in the end of file A also occur in the beginning of file B. The\n`overlap_free_start` and `overlap_free_end` attributes in `pygac-fdr` output files indicate that overlap. There are two\nways to remove it:\n\n- Cut overlap with subsequent file: Select scanlines `0:overlap_free_end`\n- Cut overlap with preceding file: Select scanlines `overlap_free_start:-1`\n\nIf, in addition, users want to create daily composites, a file containing observations from two days has to be used\ntwice: Once only the part before UTC 00:00, and once only the part after UTC 00:00. Cropping overlap and day together\nis a little bit more complex, because the overlap might cover UTC 00:00. That is why the `pygac-fdr-crop` utility is\nprovided:\n\n```\n$ pygac-fdr-crop AVHRR-GAC_FDR_1C_N06_19810330T225108Z_19810331T003506Z_...nc --date 19810330\n0 8260\n$ pygac-fdr-crop AVHRR-GAC_FDR_1C_N06_19810330T225108Z_19810331T003506Z_...nc --date 19810331\n8261 12472\n```\n\nThe returned numbers are start- and end-scanline (0-based).\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python package for creating a Fundamental Data Record (FDR) of AVHRR GAC data using pygac",
    "version": "0.2.3",
    "project_urls": {
        "Homepage": "https://github.com/pytroll/pygac-fdr"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce284833025da9e5c06123100225599ba081eceb24f054695923c8e1bf6c17a4",
                "md5": "b881bd34ffd3c5ebbc0fab61e1c8ec40",
                "sha256": "0247375f2e42dc69c541ab88e113a829977521046c79667c753dc7f204c6f24b"
            },
            "downloads": -1,
            "filename": "pygac-fdr-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b881bd34ffd3c5ebbc0fab61e1c8ec40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 55708,
            "upload_time": "2023-11-28T10:17:18",
            "upload_time_iso_8601": "2023-11-28T10:17:18.472935Z",
            "url": "https://files.pythonhosted.org/packages/ce/28/4833025da9e5c06123100225599ba081eceb24f054695923c8e1bf6c17a4/pygac-fdr-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 10:17:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pytroll",
    "github_project": "pygac-fdr",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "pygac-fdr"
}
        
Elapsed time: 0.19118s