├── .github ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── main.yml ├── .gitignore ├── .travis.yml ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── README.md ├── doc ├── images │ ├── nappy_logo_anim.gif │ └── nappy_logo_anim.psd ├── nappy.doc └── nasa_ames_format_specification_1998.html ├── example_files ├── 1001.na ├── 1001_cb.na ├── 1001a.na ├── 1001b.na ├── 1010.na ├── 1010a.na ├── 1020.na ├── 1020a.na ├── 1020b.na ├── 2010.na ├── 2010G&H.na ├── 2010a.na ├── 2010b.na ├── 2110.na ├── 2110G&H.na ├── 2110a.na ├── 2160.na ├── 2160_ndacc.na ├── 2310.na ├── 3010.na ├── 4010.na └── README.md ├── nappy ├── __init__.py ├── config │ ├── annotations.ini │ ├── local_attributes.ini │ └── nappy.ini ├── na_file │ ├── __init__.py │ ├── na_core.py │ ├── na_file.py │ ├── na_file_1001.py │ ├── na_file_1010.py │ ├── na_file_1020.py │ ├── na_file_2010.py │ ├── na_file_2110.py │ ├── na_file_2160.py │ ├── na_file_2310.py │ ├── na_file_3010.py │ └── na_file_4010.py ├── nappy_api.py ├── nc_interface │ ├── __init__.py │ ├── na_content_collector.py │ ├── na_to_nc.py │ ├── na_to_xarray.py │ ├── nc_to_na.py │ ├── xarray_objs_to_na_files.py │ ├── xarray_to_na.py │ └── xarray_utils.py ├── script │ ├── __init__.py │ ├── na2nc.py │ ├── nc2csv.py │ └── nc2na.py └── utils │ ├── __init__.py │ ├── common_utils.py │ ├── compare.py │ ├── compare_na.py │ ├── ffi_translator.py │ ├── list_manipulator.py │ ├── parse_config.py │ ├── right_strip.py │ └── text_parser.py ├── requirements.txt ├── requirements_dev.txt ├── setup.py └── tests ├── README.md ├── __init__.py ├── cached_outputs ├── 1001-from-nc-annotated.csv ├── 1001-from-nc-annotated.na ├── 1001-from-nc-as-padded-ints.csv ├── 1001-from-nc-as-padded-ints.na ├── 1001-from-nc-csv.na ├── 1001-from-nc-excludes.csv ├── 1001-from-nc-excludes.na ├── 1001-from-nc-no-header.csv ├── 1001-from-nc-no-header.na ├── 1001-from-nc-overwrite.csv ├── 1001-from-nc-overwrite.na ├── 1001-from-nc.csv ├── 1001-from-nc.na ├── 1001-global-atts.nc ├── 1001-renamed.nc ├── 1001.nc ├── 1010-from-nc.csv ├── 1010-from-nc.na ├── 1010.cdl ├── 1010.nc ├── 2010-from-nc_1.csv ├── 2010-from-nc_1.na ├── 2010-from-nc_2.csv ├── 2010-from-nc_2.na ├── 2010.cdl ├── 2010.nc ├── 3010-from-nc_1.csv ├── 3010-from-nc_1.na ├── 3010-from-nc_2.csv ├── 3010-from-nc_2.na ├── 3010.cdl ├── 3010.nc ├── 4010-from-nc_1.csv ├── 4010-from-nc_1.na ├── 4010-from-nc_2.csv ├── 4010-from-nc_2.na ├── 4010-from-nc_3.csv ├── 4010-from-nc_3.na ├── 4010-renamed.nc ├── 4010.cdl ├── 4010.nc ├── test_1001.csv ├── test_1001.na ├── test_1001_annotated.csv ├── test_1001_cb_rewritten.na ├── test_1010.csv ├── test_1010.na ├── test_1010_annotated.csv ├── test_1020.csv ├── test_1020.na ├── test_1020_annotated.csv ├── test_2010.csv ├── test_2010.na ├── test_2010_annotated.csv ├── test_2110.csv ├── test_2110.na ├── test_2110_annotated.csv ├── test_2160.csv ├── test_2160.na ├── test_2160_annotated.csv ├── test_2160_ndacc.na ├── test_2310.csv ├── test_2310.na ├── test_2310_annotated.csv ├── test_3010.csv ├── test_3010.na ├── test_3010_annotated.csv ├── test_4010.csv ├── test_4010.na └── test_4010_annotated.csv ├── common.py ├── conftest.py ├── quick_tests_na_to_nc.py ├── quick_tests_nc_to_na.py ├── run_cmd_line_tests.py ├── test_1010_to_1020.py ├── test_2010_to_2110.py ├── test_2010_to_2310.py ├── test_na2nc.py ├── test_na_file.py ├── test_na_file_1001.py ├── test_nc2csv.py ├── test_nc2na.py ├── test_outputs ├── 1001-from-nc-annotated.csv ├── 1001-from-nc-annotated.na ├── 1001-from-nc-as-padded-ints.csv ├── 1001-from-nc-as-padded-ints.na ├── 1001-from-nc-csv.na ├── 1001-from-nc-excludes.csv ├── 1001-from-nc-excludes.na ├── 1001-from-nc-no-header.csv ├── 1001-from-nc-no-header.na ├── 1001-from-nc-overwrite.csv ├── 1001-from-nc-overwrite.na ├── 1001-from-nc.csv ├── 1001-from-nc.na ├── 1001-global-atts.nc ├── 1001-renamed.nc ├── 1001.nc ├── 1010-from-nc.csv ├── 1010-from-nc.na ├── 1010.nc ├── 2010-from-nc_1.csv ├── 2010-from-nc_1.na ├── 2010-from-nc_2.csv ├── 2010-from-nc_2.na ├── 2010.nc ├── 3010-from-nc_1.csv ├── 3010-from-nc_1.na ├── 3010-from-nc_2.csv ├── 3010-from-nc_2.na ├── 3010.nc ├── 4010-from-nc_1.csv ├── 4010-from-nc_1.na ├── 4010-from-nc_2.csv ├── 4010-from-nc_2.na ├── 4010-from-nc_3.csv ├── 4010-from-nc_3.na ├── 4010-renamed.nc ├── 4010.nc ├── test_1001.csv ├── test_1001.na ├── test_1001_annotated.csv ├── test_1001_cb_rewritten.na ├── test_1010.csv ├── test_1010.na ├── test_1010_annotated.csv ├── test_1020.csv ├── test_1020.na ├── test_1020_annotated.csv ├── test_2010.csv ├── test_2010.na ├── test_2010_annotated.csv ├── test_2110.csv ├── test_2110.na ├── test_2110_annotated.csv ├── test_2160.csv ├── test_2160.na ├── test_2160_annotated.csv ├── test_2160_ndacc.na ├── test_2310.csv ├── test_2310.na ├── test_2310_annotated.csv ├── test_3010.csv ├── test_3010.na ├── test_3010_annotated.csv ├── test_4010.csv ├── test_4010.na └── test_4010_annotated.csv ├── test_parse_config.py ├── test_var_units.py ├── test_xarray_utils.py ├── testdata ├── 1001.na ├── 1001_cb.na ├── 1001a.na ├── 1001b.na ├── 1010.na ├── 1010a.na ├── 1020.na ├── 1020a.na ├── 1020b.na ├── 2010.na ├── 2010G&H.na ├── 2010a.na ├── 2010b.na ├── 2110.na ├── 2110G&H.na ├── 2110a.na ├── 2160.na ├── 2160_ndacc.na ├── 2310.na ├── 3010.na ├── 4010.na └── README.md ├── tests-na_badc_files.txt └── tests-nc_badc_files.txt /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * roocs-utils version: 2 | * Python version: 3 | * Operating System: 4 | 5 | ### Description 6 | 7 | Describe what you were trying to get done. 8 | Tell us what happened, what went wrong, and what you expected to happen. 9 | 10 | ### What I Did 11 | 12 | ``` 13 | Paste the command(s) you ran and the output. 14 | If there was a crash, please include the traceback here. 15 | ``` 16 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | ### Pull Request Checklist: 3 | - [ ] This PR addresses an already opened issue (for bug fixes / features) 4 | - This PR fixes issue #xyz 5 | - [ ] Tests for the changes have been added (for bug fixes / features) 6 | - [ ] Documentation has been added / updated (for bug fixes / features) 7 | - [ ] HISTORY.rst has been updated (with summary of main changes) 8 | - [ ] I have added my relevant user information to `AUTHORS.md` 9 | 10 | * **What kind of change does this PR introduce?:** 11 | 12 | 13 | * **Does this PR introduce a breaking change?:** 14 | 15 | 16 | * **Other information:** 17 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | python-version: [3.9, "3.10", 3.11] 16 | 17 | steps: 18 | - uses: actions/checkout@main 19 | - name: Set up Python ${{ matrix.python-version }} 20 | uses: actions/setup-python@v2 21 | with: 22 | python-version: ${{ matrix.python-version }} 23 | - name: Install dependencies 24 | run: | 25 | python -m pip install --upgrade pip 26 | pip install flake8 black pytest 27 | if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 28 | if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi 29 | # Install package locally to check pip install works properly 30 | pip install -e . --no-deps 31 | # - name: Lint with flake8 32 | # run: flake8 roocs_utils tests 33 | # if: matrix.python-version == 3.6 34 | # - name: Check formatting with black 35 | # run: black --check --target-version py36 roocs_utils tests 36 | # if: matrix.python-version == 3.6 37 | - name: Test with pytest 38 | run: | 39 | python -m pytest -v tests 40 | # - name: Upload coverage reports to Codecov 41 | # uses: codecov/codecov-action@v4.0.1 42 | # with: 43 | # token: ${{ secrets.CODECOV_TOKEN }} 44 | # slug: cedadev/nappy 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | tests/test_outputs 40 | tests/cached_outputs 41 | htmlcov/ 42 | .tox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | .hypothesis/ 50 | 51 | # Translations 52 | *.mo 53 | *.pot 54 | 55 | # Django stuff: 56 | *.log 57 | local_settings.py 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # dotenv 85 | .env 86 | 87 | # virtualenv 88 | .venv 89 | venv/ 90 | ENV/ 91 | setup_env.sh 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | 106 | # Pycharm files 107 | .idea 108 | 109 | # Mac 110 | **.DS_Store 111 | 112 | # VS Code 113 | .vscode 114 | *.code-workspace 115 | 116 | # linters 117 | .pylint.d -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | 3 | addons: 4 | apt: 5 | packages: 6 | - netcdf-bin 7 | - libnetcdf-dev 8 | - pandoc 9 | 10 | python: 11 | - "2.7" 12 | - "3.4" 13 | 14 | install: 15 | - pip install -r requirements-dev.txt 16 | - pip install coveralls 17 | - python setup.py install 18 | - mkdir test_outputs 19 | 20 | script: 21 | - python setup.py test 22 | - find . -type f -name "*.py" | xargs flake8 23 | - python setup.py --long-description | rst2html5.py 24 | 25 | after_success: 26 | - coverage run --source=nappy -m unittest tests.run_tests 27 | - coverage report -m 28 | - coveralls 29 | -------------------------------------------------------------------------------- /HISTORY.rst: -------------------------------------------------------------------------------- 1 | Version History 2 | =============== 3 | 4 | v2.0.3 (06/02/2024) 5 | ------------------- 6 | 7 | Bug Fixes 8 | ^^^^^^^^^ 9 | * Fixed problem with `pip install` failing (by moving `import numpy` line). 10 | 11 | v2.0.2 (10/03/2022) 12 | ------------------- 13 | 14 | Bug Fixes 15 | ^^^^^^^^^ 16 | * Fixed bugs in `getAuxVariable()` and `getAuxVariables()` 17 | 18 | New Features 19 | ^^^^^^^^^^^^ 20 | * Option to supply a custom parser function to split variable names from units: 21 | * Implemented using ``var_and_units_pattern`` as an attribute with a ``@setter`` which can 22 | be modified after creating the ``NAFile`` object with ``openNAFile``. 23 | 24 | Breaking Changes 25 | ^^^^^^^^^^^^^^^^ 26 | * Removed support for Python3.6. 27 | 28 | v2.0.1 (28/09/2021) 29 | ------------------- 30 | Bug Fixes 31 | ^^^^^^^^^ 32 | * Added ``requirements_dev.txt`` to manifest file because it is read by ``setup.py``. 33 | 34 | v2.0.0 (27/09/2021) 35 | ------------------- 36 | Bug Fixes 37 | ^^^^^^^^^ 38 | N/A 39 | 40 | Breaking Changes 41 | ^^^^^^^^^^^^^^^^ 42 | * Changed ``nc_interface`` sub-package to rely on ``xarray`` instead of ``cdms2``. 43 | 44 | New Features 45 | ^^^^^^^^^^^^ 46 | * Changed ``nc_interface`` sub-package to rely on ``xarray`` instead of ``cdms2``. 47 | * Added unit tests for all new code in ``tests`` 48 | * Run tests with: ``pytest tests`` 49 | 50 | v1.1.4 (2017-10-13) 51 | ------------------- 52 | 53 | Overview 54 | ^^^^^^^^ 55 | 56 | * includes unit tests 57 | * includes ``nc_interface`` to netCDF - using `cdms2` library 58 | 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2017, Centre for Environmental Data Analysis Developers 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE 2 | include requirements.txt 3 | include requirements_dev.txt 4 | recursive-include nappy *.ini 5 | -------------------------------------------------------------------------------- /example_files/1001.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1 -1 -1 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /example_files/1001_cb.na: -------------------------------------------------------------------------------- 1 | 25 1001 {NLHEAD FFI} 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury {INFO} 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 {IVOL NVOL} 7 | 2000 9 20 2003 4 10 8 | 10 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 {NV} 11 | 0.1 1.0 0.1 12 | -1 -1 -1 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 {NNCOML} 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /example_files/1020b.na: -------------------------------------------------------------------------------- 1 | 41 1020 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | BISA 1-D stratospheric model 5 | NERC Data Grid (NDG) project 6 | 5 13 7 | 1976 01 01 2002 10 30 8 | 5 9 | 10 10 | Altitude (km) 11 | 4 12 | 1.E+12 1.E+06 1.E+04 1 13 | 1.E+08 1.E+08 1.E+08 10000 14 | Molecular oxygen concentration (cm-3) 15 | Ozone concentration (cm-3) 16 | O(3P) concentration (cm-3) 17 | O(1D) concentration (cm-3) 18 | 0 19 | 10 20 | Example of FFI 1020 (b). 21 | This example illustrating NASA Ames file format index 1020 is based on results 22 | of a 1-D model quoted in G. Brasseur and S. Solomon, Aeronomy of the Middle 23 | Atmosphere, Reidel, 1984 (p. 211). The first date on line 7 (1st of January 24 | 1976) is fictitious since the parameters are yearly averages. We have signalled 25 | the absence of calculated values at 30 and 105 km by using the "missing value" 26 | flags (see line 13). The missing value flag is also used to give account for the 27 | fact that there is virtually no O(1D) present below the altitude of 20 km. Note 28 | that this example is similar to Example 1020 (a) but has no auxiliary dependent 29 | variable. 30 | 11 31 | The files included in this data set illustrate each of the 9 NASA Ames file 32 | format indices (FFI). A detailed description of the NASA Ames format can be 33 | found on the Web site of the British Atmospheric Data Centre (BADC) at 34 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 35 | E-mail contact: badc@rl.ac.uk 36 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 37 | Exchange, Version 1.3, 1998. This work can be found at 38 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 39 | and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 10 43 | 1.7E+06 8.1E+05 3.6E+05 1.6E+05 1.0E+08 3.5E+04 1.7E+04 8900 4800 2600 44 | 1.0E+06 1.1E+06 2.9E+06 3.2E+06 1.0E+08 2.0E+06 1.0E+06 3.2E+05 1.0E+05 3.2E+04 45 | 1.3 5.5 94 670 1.0E+08 2.4E+04 1.2E+05 3.7E+05 6.5E+05 8.4E+05 46 | 10000 10000 0.9 5 10000 100 330 600 610 440 47 | 60 48 | 1500 820 420 200 90 37 12.5 4.7 1.9 1.E+08 49 | 1000 3200 1000 320 140 100 110 13 1.7 1.E+08 50 | 6.5E+05 5.0E+05 4.0E+05 3.8E+05 1.4E+06 3.0E+06 3.0E+07 3.3E+07 3.2E+07 1.E+08 51 | 260 150 96 67 70 120 420 490 1200 10000 52 | -------------------------------------------------------------------------------- /example_files/2010.na: -------------------------------------------------------------------------------- 1 | 43 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7 13 7 | 1969 01 01 2002 10 31 8 | 10 20 9 | 9 10 | 1 11 | 0 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1 16 | 200 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0 1013.3 45 | -3.0 -2.6 -2.3 2.0 4.8 4.6 4.5 3.0 -0.9 46 | 20 55.30 47 | -15.1 -4.2 6.9 12.8 14.7 20.0 21.5 18.0 8.2 48 | 40 2.30 49 | -29.0 -15.2 3.4 28.2 41.0 39.1 17.9 8.0 0.1 50 | 60 0.22 51 | -10.0 8.4 31.2 59.9 78.5 77.7 47.0 17.6 16.0 52 | 80 0.01 53 | 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 54 | -------------------------------------------------------------------------------- /example_files/2010G&H.na: -------------------------------------------------------------------------------- 1 | 31 2010 2 | Mertz, Fred 3 | Pacific University 4 | NMC analyzed grid data interpolated to DC-8 flight path 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 01 16 1991 01 16 8 | 0.0 30.0 9 | 8 10 | 8 11 | 250 200 150 100 70 50 30 10 12 | Pressure levels (mb) 13 | Time (UT seconds) from 00 hours on launch date 14 | 3 15 | 1.0 0.1 1.0E-09 16 | 99999 9999 9999999 17 | Geopotential height (gpm) 18 | Temperature (K) 19 | Potential vorticity (K m**2/(kg s)) 20 | 2 21 | 1.0 0.1 22 | 99999 9999 23 | Geopotential height (gpm) of the DC-8 24 | Temperature (K) at DC-8's position 25 | 0 26 | 5 27 | The geopotential height, temperature, and potential vorticity 28 | values were interpolated from NMC analyses to a vertical cross- 29 | section along the DC-8 flight path. 30 | NOTE: PRELIMINARY data. 31 | 250mb 200mb 150mb 100mb 70mb 50mb 30mb 10mb 32 | 3350 1127 2682 33 | 9994 11395 13219 15762 17970 20000 23016 29411 34 | 2150 2154 2156 2115 2082 2042 1991 2021 35 | 4119 7050 8030 11300 16200 23500 50300 386000 36 | 3380 1289 2671 37 | 9992 11393 13217 15760 17968 19998 23013 29408 38 | 2151 2154 2156 2115 2081 2041 1990 2020 39 | 4128 7050 8040 11300 16200 23500 50400 386000 40 | 3410 1479 2653 41 | 9990 11392 13215 15759 17966 19996 23010 29404 42 | 2151 2154 2156 2115 2081 2041 1990 2020 43 | 4138 7060 8050 11400 16200 23500 50500 386000 44 | -------------------------------------------------------------------------------- /example_files/2010a.na: -------------------------------------------------------------------------------- 1 | 41 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 6 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | 9 10 | 9 11 | 0 10 20 40 50 60 70 80 90 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1 16 | 200 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000 21 | Pressure (hPa) 22 | 7 23 | Example of FFI 2010 (a). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere. The first date on line 7 (1st of 28 | January 1969) is fictitious. Note that the latitude grid is irregular in this 29 | example, which is reflected by the fact that DX1 = 0 (see line 8). 30 | 11 31 | The files included in this data set illustrate each of the 9 NASA Ames file 32 | format indices (FFI). A detailed description of the NASA Ames format can be 33 | found on the Web site of the British Atmospheric Data Centre (BADC) at 34 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 35 | E-mail contact: badc@rl.ac.uk 36 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 37 | Exchange, Version 1.3, 1998. This work can be found at 38 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 39 | and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 0 1013.3 43 | -3.0 -2.6 -2.3 2.0 4.6 4.5 3.0 -0.9 200.0 44 | 10 265.00 45 | -1.0 5.5 21.7 31.5 21.6 14.9 7.5 3.0 200.0 46 | 20 55.30 47 | -15.1 -4.2 6.9 12.8 20.0 21.5 18.0 8.2 200.0 48 | 30 12.00 49 | -29.1 20.0 -9.3 -6.8 22.0 22.7 18.2 12.0 200.0 50 | 40 2.30 51 | -29.0 -15.2 3.4 28.2 39.1 17.9 8.0 0.1 200.0 52 | 50 0.80 53 | -21.9 -4.0 19.9 40.8 50.1 25.0 8.1 0.0 200.0 54 | 60 0.22 55 | -10.0 8.4 31.2 59.9 77.7 47.0 17.6 16.0 200.0 56 | 70 0.05 57 | 1.2 17.6 39.9 63.3 74.1 61.2 35.0 15.3 200.0 58 | 80 0.01 59 | 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 60 | -------------------------------------------------------------------------------- /example_files/2010b.na: -------------------------------------------------------------------------------- 1 | 31 2010 2 | Mertz, Fred 3 | Pacific University 4 | NMC analyzed grid data interpolated to DC-8 flight path 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 01 16 1991 01 16 8 | 0.0 30.0 9 | 8 10 | 8 11 | 250 200 150 100 70 50 30 10 12 | Pressure levels (mb) 13 | Time (UT seconds) from 00 hours on launch date 14 | 3 15 | 1.0 0.1 1.0E-09 16 | 99999 9999 9999999 17 | Geopotential height (gpm) 18 | Temperature (K) 19 | Potential vorticity (K m**2/(kg s)) 20 | 2 21 | 1.0 0.1 22 | 99999 9999 23 | Geopotential height (gpm) of the DC-8 24 | Temperature (K) at DC-8's position 25 | 0 26 | 5 27 | The geopotential height, temperature, and potential vorticity 28 | values were interpolated from NMC analyses to a vertical cross- 29 | section along the DC-8 flight path. 30 | NOTE: PRELIMINARY data. 31 | 250mb 200mb 150mb 100mb 70mb 50mb 30mb 10mb 32 | 3350 1127 2682 33 | 9994 11395 13219 15762 17970 20000 23016 29411 34 | 2150 2154 2156 2115 2082 2042 1991 2021 35 | 4119 7050 8030 11300 16200 23500 50300 386000 36 | 3380 1289 2671 37 | 9992 11393 13217 15760 17968 19998 23013 29408 38 | 2151 2154 2156 2115 2081 2041 1990 2020 39 | 4128 7050 8040 11300 16200 23500 50400 386000 40 | 3410 1479 2653 41 | 9990 11392 13215 15759 17966 19996 23010 29404 42 | 2151 2154 2156 2115 2081 2041 1990 2020 43 | 4138 7060 8050 11400 16200 23500 50500 386000 44 | -------------------------------------------------------------------------------- /example_files/2110.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 2 16 | 1 1 17 | 100 2000 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.30 40 | 20.0 -2.3 41 | 40.0 4.8 42 | 60.0 4.5 43 | 80.0 -0.9 44 | 10 4 265.00 45 | 30.0 31.5 46 | 40.0 28.0 47 | 50.0 21.6 48 | 60.0 14.9 49 | 20 3 55.30 50 | 40.0 14.7 51 | 60.0 21.5 52 | 70.0 18.0 53 | 30 7 12.00 54 | 20.0 -9.3 55 | 30.0 -6.8 56 | 40.0 15.0 57 | 50.0 22.0 58 | 60.0 22.7 59 | 70.0 18.2 60 | 80.0 12.0 61 | 40 5 2.30 62 | 0.0 -29.0 63 | 20.0 3.4 64 | 30.0 28.2 65 | 50.0 39.1 66 | 80.0 0.1 67 | 50 8 0.80 68 | 0.0 -21.9 69 | 10.0 -4.0 70 | 20.0 19.9 71 | 30.0 40.8 72 | 40.0 55.0 73 | 50.0 50.1 74 | 60.0 25.0 75 | 70.0 8.1 76 | 60 9 0.22 77 | 0.0 -10.0 78 | 10.0 8.4 79 | 20.0 31.2 80 | 30.0 59.9 81 | 40.0 78.5 82 | 50.0 77.7 83 | 60.0 47.0 84 | 70.0 17.6 85 | 80.0 16.0 86 | 70 4 0.05 87 | 0.0 1.2 88 | 30.0 63.3 89 | 60.0 61.2 90 | 70.0 35.0 91 | -------------------------------------------------------------------------------- /example_files/2110G&H.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | Mertz, Fred 3 | Pacific University 4 | ER-2 Microwave Temperature Profiler (MTP) 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 1 16 1991 1 16 8 | 0.0 0.0 9 | Remote sensing "applicable altitude" (meters) 10 | Elapsed UT seconds from 0 hours on day given in DATE 11 | 2 12 | 0.1 0.1 13 | 9999 9999 14 | Brightness temperature (C) 15 | Potential temperature (K) 16 | 15 17 | 1.0 1.0 1.0 1.0 1.0 0.1 1.0 0.1 0.1 0.01 0.001 0.1 0.1 1.0 1.0 18 | 99 99 99 99 99999 999 999 9999 9999 9999 99999 999 999 999 999 19 | Number of "applicable altitudes" recorded in subsequent data records 20 | Hours (UT) 21 | Minutes (UT) 22 | Seconds (UT) 23 | Pressure altitude of ER-2 (ft) 24 | Aircraft pitch (deg) 25 | Aircraft roll (deg) 26 | Horizon brightness temperature (C), ave. of Chan 1 & 2 brightness temp. 27 | Potential temperature (K) from above horizon temp. and ER-2 press.alt. 28 | dT/dz (K/km), from Chan 1 & 2 blended Temperature profile 29 | dTHETA/dp (K/mb); THETA is potential temperature 30 | dT/dz (K/km) from Chan 1 31 | dT/dz (K/km) from Chan 2 32 | Peak downward acceleration (centi-G's) 33 | Peak upward acceleration (centi-G's) 34 | 0 35 | 3 36 | The brightness temperatures are approximately equal to air 37 | temperatures at ER-2 altitudes. 38 | 39 | 29589 5 8 13 9 44890 24 1 -728 3459 40 | 440 996 49 34 53 9 41 | 14060 -729 3516 42 | 13940 -728 3499 43 | 13810 -731 3474 44 | 13680 -728 3459 45 | 13560 -740 3421 46 | 29603 6 8 13 23 45170 24 2 -712 3500 47 | -17 -679 -11 -4 56 10 48 | 15030 -721 3688 49 | 14780 -719 3650 50 | 14770 -718 3640 51 | 14760 -717 3630 52 | 14750 -716 3620 53 | 14740 -715 3610 -------------------------------------------------------------------------------- /example_files/2110a.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 2 16 | 1 1 17 | 100 2000 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.30 40 | 20.0 -2.3 41 | 40.0 4.8 42 | 60.0 4.5 43 | 80.0 -0.9 44 | 10 4 265.00 45 | 30.0 31.5 46 | 40.0 28.0 47 | 50.0 21.6 48 | 60.0 14.9 49 | 20 3 55.30 50 | 40.0 14.7 51 | 60.0 21.5 52 | 70.0 18.0 53 | 30 7 12.00 54 | 20.0 -9.3 55 | 30.0 -6.8 56 | 40.0 15.0 57 | 50.0 22.0 58 | 60.0 22.7 59 | 70.0 18.2 60 | 80.0 12.0 61 | 40 5 2.30 62 | 0.0 -29.0 63 | 20.0 3.4 64 | 30.0 28.2 65 | 50.0 39.1 66 | 80.0 0.1 67 | 50 8 0.80 68 | 0.0 -21.9 69 | 10.0 -4.0 70 | 20.0 19.9 71 | 30.0 40.8 72 | 40.0 55.0 73 | 50.0 50.1 74 | 60.0 25.0 75 | 70.0 8.1 76 | 60 9 0.22 77 | 0.0 -10.0 78 | 10.0 8.4 79 | 20.0 31.2 80 | 30.0 59.9 81 | 40.0 78.5 82 | 50.0 77.7 83 | 60.0 47.0 84 | 70.0 17.6 85 | 80.0 16.0 86 | 70 4 0.05 87 | 0.0 1.2 88 | 30.0 63.3 89 | 60.0 61.2 90 | 70.0 35.0 91 | -------------------------------------------------------------------------------- /example_files/2160.na: -------------------------------------------------------------------------------- 1 | 47 2160 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Chemiluminescence NOX analyser. UV absorption API 400 ozone analyser. 5 | NERC Data Grid (NDG) project 6 | 10 13 7 | 2002 10 10 2002 10 31 8 | 10 9 | 13 10 | Time (minutes) 11 | Site name 12 | 2 13 | 1 1 14 | 100 100 15 | NOX volume mixing ratio (ppbv) 16 | Ozone volume mixing ratio (ppbv) 17 | 5 18 | 2 19 | 1 1 1 20 | 100 1000 1000 21 | 10 7 22 | zzzzzzzzzz 23 | zzzzzzz 24 | Number of measurements 25 | Longitude (degrees from Greenwich meridian) 26 | Latitude (degrees North) 27 | Date 28 | Local time at t = 0 29 | 7 30 | Example of FFI 2160. 31 | This example illustrating NASA Ames file format index 2160 is entirely fictitious. Data 32 | have been made up for the purpose of illustrating the use of the format. They consist in 33 | imaginary simultaneous measurements of tropospheric NOX and ozone mixing ratios at three 34 | sites. A time series is provided for each site and each species. Measurements are 35 | supposed to have taken place every 10 minutes. The 4th and 5th auxiliary variables give 36 | the time of the first measurement of the series. 37 | 10 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | 48 | Belbroughton 49 | 7 -2.148 52.398 50 | 22-10-2002 51 | 12 h 15 52 | 0 2.2 35.0 53 | 10 2.3 35.0 54 | 20 4.5 35.9 55 | 30 4.8 100.0 56 | 40 4.3 36.0 57 | 50 4.2 35.9 58 | 60 4.0 35.9 59 | Coventry 60 | 4 -1.517 52.4 61 | 10-10-2002 62 | 04 h 20 63 | 0 100.0 34.0 64 | 10 1.9 34.1 65 | 20 2.2 35.0 66 | 30 2.8 35.0 67 | Kidderminster 68 | 10 -2.258 52.364 69 | 15-10-2002 70 | 16 h 35 71 | 0 3.9 35.0 72 | 10 3.8 35.1 73 | 20 5.4 36.0 74 | 30 5.9 36.2 75 | 40 100.0 36.8 76 | 50 6.4 37.0 77 | 60 6.4 36.9 78 | 70 6 37.0 79 | 80 5.5 36.8 80 | 90 5.3 36.5 81 | -------------------------------------------------------------------------------- /example_files/2310.na: -------------------------------------------------------------------------------- 1 | 39 2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11 13 7 | 1969 01 01 2002 10 31 8 | 0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 4 16 | 1 1 1 1 17 | 100 1000 1000 2000 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0 7 20 10 1013.3 41 | -2.3 2.0 4.8 4.6 4.5 3.0 -0.9 42 | 10 4 50 10 265.0 43 | 21.6 14.9 7.5 3.0 44 | 20 9 0 10 55.3 45 | -15.1 -4.2 6.9 12.8 14.7 20.0 21.5 18.0 8.2 46 | 30 3 0 30 12.0 47 | -29.1 -6.8 22.7 48 | 50 4 10 20 0.80 49 | -4.0 40.8 50.1 8.1 50 | 60 9 0 10 0.22 51 | -10.0 8.4 31.2 59.9 78.5 77.7 47.0 17.6 16.0 52 | 70 4 0 10 0.052 53 | 1.2 17.6 39.9 63.3 54 | -------------------------------------------------------------------------------- /example_files/3010.na: -------------------------------------------------------------------------------- 1 | 41 3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12 13 7 | 1980 06 21 2002 10 31 8 | 30 -10 0 9 | 7 4 10 | 1 1 11 | -90 12 | 50 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1 18 | 1000 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172 43 | 193 211 224 229 235 245 270 44 | 221 230 254 272 281 289 300 45 | 220 229 244 253 260 263 278 46 | 195 208 217 219 223 230 240 47 | 355 48 | 270 245 235 229 224 211 193 49 | 300 289 281 272 254 230 221 50 | 278 263 260 253 244 229 220 51 | 240 230 223 219 217 208 195 52 | -------------------------------------------------------------------------------- /example_files/README.md: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). 2 | # This software may be distributed under the terms of the 3 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 4 | 5 | Files in this `data_files` directory were taken from the BADC web site examples at: 6 | 7 | http://badc.nerc.ac.uk/help/formats/NASA-Ames/ 8 | 9 | or from "Format Specification for Data Exchange, Version 1.3 (Gaines and Hipskind, 1998)" a copy of which is at: 10 | 11 | http://badc.nerc.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 12 | -------------------------------------------------------------------------------- /nappy/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '2.0.3' 2 | 3 | from nappy.nappy_api import * 4 | -------------------------------------------------------------------------------- /nappy/config/annotations.ini: -------------------------------------------------------------------------------- 1 | [annotations] 2 | NLHEAD_FFI = Number of header lines; NASA Ames sub-format code 3 | ONAME = Name of data creator 4 | ORG = Institute of data creator 5 | SNAME = Instrument or model name 6 | MNAME = Project name 7 | IVOL_NVOL = File number; Total number of files 8 | DATE_RDATE = Starting date of data (YYYY MM DD); File creation date (YYYY MM DD) 9 | DX = Interval between coordinate variable values (zero if not used) 10 | NVPM = Number of extra independent variable points between independent variable values 11 | NX = Length of coordinate variables 12 | NXDEF = Number of coordinate variable values explicity defined in header 13 | X = Values of coordinate variable 14 | LENX = Number of characters in character-based coordinate variable 15 | LENA = Number of characters in character-based auxiliary variable 16 | XNAME = Name of coordinate variable (with units) 17 | NV = Number of primary variables defined 18 | VSCAL = Scale factors for each primary variable 19 | VMISS = Missing values for each primary variable 20 | VNAME = Name of primary variable (with units) 21 | NAUXV = Number of auxiliary variables 22 | NAUXC = Number of character-based auxiliary variables 23 | ASCAL = Scale factors for each auxiliary variable 24 | AMISS = Missing values for each auxiliary variable 25 | ANAME = Name of auxiliary variable (with units) 26 | NSCOML = Number of lines of special comments 27 | SCOM = Special comments line 28 | NNCOML = Number of lines of normal comments 29 | NCOM = Normal comments line 30 | Data = Data section 31 | -------------------------------------------------------------------------------- /nappy/config/local_attributes.ini: -------------------------------------------------------------------------------- 1 | [nc_attributes] 2 | institution = Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 3 | 4 | [na_attributes] 5 | ORG = Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 6 | -------------------------------------------------------------------------------- /nappy/config/nappy.ini: -------------------------------------------------------------------------------- 1 | [main] 2 | ; deprecated: version = 0.3.0 3 | DEBUG = False 4 | default_delimiter = __space____space____space____space__ 5 | default_float_format = %.10g 6 | comment_override_rule = insert 7 | add_column_headers = True 8 | annotations_file = annotations.ini 9 | local_attributes_file = local_attributes.ini 10 | 11 | [header_partitions] 12 | sc_start = ==== Special Comments follow ==== 13 | sc_end = ==== Special Comments end ==== 14 | nc_start = ==== Normal Comments follow ==== 15 | nc_end = ==== Normal Comments end ==== 16 | data_next = === Data Section begins on the next line === 17 | sing_start = == Singleton Variables defined in the source file follow == 18 | sing_end = == Singleton Variables defined in the source file end == 19 | ncatts_start = == Variable attributes from source (NetCDF) file follow == 20 | ncatts_end = == Variable attributes from source (NetCDF) file end == 21 | addl_globals = === Additional Global Attributes defined in the source file === 22 | addl_vatts = === Additional Variable Attributes defined in the source file === 23 | 24 | [na_to_nc_map] 25 | NLHEAD = no_of_nasa_ames_header_lines 26 | FFI = file_format_index 27 | ONAME&ORG = institution 28 | SNAME = source 29 | MNAME = title 30 | IVOL = file_number_in_set 31 | NVOL = total_files_in_set 32 | RDATE = history 33 | DATE = first_valid_date_of_data 34 | SCOM&NCOM = comment 35 | 36 | [nc_to_na_map] 37 | Conventions = None 38 | source = SNAME 39 | title = MNAME 40 | institution = ONAME&ORG 41 | references = None 42 | comment = SCOM&NCOM 43 | history = RDATE 44 | file_format_index = FFI 45 | no_of_nasa_ames_header_lines = NLHEAD 46 | total_files_in_set = NVOL 47 | file_number_in_set = IVOL 48 | first_valid_date_of_data = DATE 49 | 50 | 51 | -------------------------------------------------------------------------------- /nappy/na_file/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/nappy/na_file/__init__.py -------------------------------------------------------------------------------- /nappy/na_file/na_file_3010.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). 2 | # This software may be distributed under the terms of the 3 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 4 | 5 | """ 6 | naFile3010.py 7 | ============= 8 | 9 | Container module for NAFile3010 class. 10 | 11 | """ 12 | 13 | # Imports from python standard library 14 | 15 | # Imports from local package 16 | import nappy.utils.text_parser 17 | import nappy.na_file.na_file_2010 18 | 19 | class NAFile3010(nappy.na_file.na_file_2010.NAFile2010): 20 | """ 21 | Class to read, write and interact with NASA Ames files conforming to the 22 | File Format Index (FFI) 3010. 23 | 24 | Identical class rules to FFI 2010. Sub-classed for neatness. 25 | """ 26 | pass 27 | 28 | -------------------------------------------------------------------------------- /nappy/na_file/na_file_4010.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). 2 | # This software may be distributed under the terms of the 3 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 4 | 5 | """ 6 | naFile4010.py 7 | ============= 8 | 9 | Container module for NAFile4010 class. 10 | 11 | """ 12 | 13 | # Imports from python standard library 14 | 15 | # Imports from local package 16 | import nappy.na_file.na_file_2010 17 | 18 | class NAFile4010(nappy.na_file.na_file_2010.NAFile2010): 19 | """ 20 | Class to read, write and interact with NASA Ames files conforming to the 21 | File Format Index (FFI) 4010. 22 | 23 | Identical class rules to FFI 2010. Sub-classed for neatness. 24 | """ 25 | pass 26 | -------------------------------------------------------------------------------- /nappy/nc_interface/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/nappy/nc_interface/__init__.py -------------------------------------------------------------------------------- /nappy/nc_interface/xarray_objs_to_na_files.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). 2 | # This software may be distributed under the terms of the 3 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 4 | 5 | """ 6 | xarray_objs_to_na_file.py 7 | ========================= 8 | 9 | Holds the class XarrayObjectsToNAFile (sub-classing NCToNA) that converts a 10 | Xarray objects (variables and global atts) to one or more NASA Ames files. 11 | 12 | """ 13 | 14 | # Imports from python standard library 15 | import sys 16 | import logging 17 | 18 | # Import from nappy package 19 | import nappy 20 | import nappy.utils 21 | import nappy.nc_interface.nc_to_na 22 | 23 | 24 | # Define global variables 25 | DEBUG = nappy.utils.getDebug() 26 | default_delimiter = nappy.utils.getDefault("default_delimiter") 27 | default_float_format = nappy.utils.getDefault("default_float_format") 28 | 29 | # Define logger 30 | log = logging.getLogger(__name__) 31 | 32 | 33 | class XarrayObjectsToNAFile(nappy.nc_interface.nc_to_na.NCToNA): 34 | """ 35 | Converts a set of Xarray Objects to one or more NASA Ames files. 36 | """ 37 | 38 | def __init__(self, xr_variables, global_attributes=None, na_items_to_override=None, 39 | only_return_file_names=False, 40 | requested_ffi=None, 41 | ): 42 | """ 43 | Sets up instance variables. 44 | Typical usage is: 45 | >>> import nappy.nc_interface.xr_objs_to_na_file as na_maker 46 | >>> c = na_maker.XarrayObjectsToNAFile(existing_var_list) 47 | >>> c.convert() 48 | >>> c.writeNAFiles("new_file.na", delimiter=",") 49 | """ 50 | self.xr_variables = xr_variables 51 | self.global_attributes = global_attributes or [] 52 | self.na_items_to_override = na_items_to_override or {} 53 | self.only_return_file_names = only_return_file_names 54 | self.requested_ffi = requested_ffi 55 | 56 | self.converted = False 57 | self.output_message = [] 58 | 59 | -------------------------------------------------------------------------------- /nappy/script/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/nappy/script/__init__.py -------------------------------------------------------------------------------- /nappy/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from .parse_config import getConfigDict, getLocalAttributesConfigDict 2 | from .common_utils import getDebug, getVersion, getDefault 3 | -------------------------------------------------------------------------------- /nappy/utils/ffi_translator.py: -------------------------------------------------------------------------------- 1 | """ 2 | ffi_translator.py 3 | ================= 4 | 5 | Provides a set of functions to do simple mappings between FFIs by altering the required 6 | parts of the NASA Ames dictionary (na_dict) sent to them. 7 | 8 | A good example is the translation of 2010 --> 2110 that requires some re-jigging of the 9 | ancillary variables (to include NX in the auxiliary variable rows and X values in the 10 | main data blocks before the actual data). 11 | 12 | """ 13 | 14 | # Import standard library modules 15 | import copy 16 | 17 | # Import local modules 18 | import nappy.utils 19 | 20 | default_missing_value = nappy.utils.getConfigDict()["main"]["default_missing_value"] 21 | 22 | 23 | def translate2010To2110(na_dict): 24 | """ 25 | Takes a valid na_dict for 2010 and returns a valid na_dict 26 | object for 2110. 27 | NOTE: this is a constrained version of 2110 that does not include 28 | the "ragged array" structures that are allowed. 29 | """ 30 | n = copy.deepcopy(na_dict) 31 | 32 | # First need to adjust auxiliary variable definitions and array 33 | nx1 = n.NX[0] 34 | n.NAUXV = n.NAUXV + 1 35 | axis_1_name = n.XNAMES[0] 36 | n.ANAMES = ["Number of %s values recorded in subsequent data records" % axis_1_name] + n.ANAMES 37 | n.ASCAL.insert(0, 1.0) 38 | n.AMISS.insert(0, default_missing_value) 39 | 40 | return n # did it work? 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /nappy/utils/right_strip.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | right_strip.py 5 | ============== 6 | 7 | Holds the rightStripCurlyBraces() function used to right strip any curly braces 8 | annotations from lines in a text file. 9 | 10 | E.g.: 11 | 12 | In: 36 1001 {NLHEAD FFI} 13 | Out: 36 1001 14 | 15 | In: Tout (C) {Out-boarding air temperature} 16 | Out: Tout (C) 17 | 18 | """ 19 | 20 | import re 21 | 22 | rstrip_regex = re.compile(r"^(.+)\{[^{^}]*\}\s*$") 23 | 24 | 25 | def rightStripCurlyBraces(line): 26 | """ 27 | Returns line but with curly braces right stripped off. 28 | """ 29 | match = rstrip_regex.match(line) 30 | if not match: return line 31 | 32 | return match.groups()[0] 33 | 34 | 35 | if __name__ == "__main__": 36 | 37 | test_lines = """ 38 | 36 1001 {NLHEAD FFI} 39 | MDB {remove me} 40 | 34,56,23 {ddfsd {remove me now} 41 | {h3lo} {world} {IVOL NVOL} 42 | 1 1 1 1 1 1 1 1 1 {lots of } 2 2 2 2 2 2 {NUMBERS} 43 | trouble { { sdfsd } } } {} eat food {...} {...} 44 | fairy god {mother} {hello 45 | traffic 2k 2.71 5.32 -14.22 6.55 204.85 -0.41 67.8305 {{{don't worry}}} 46 | will this {erase}} 47 | 21 {NV} 48 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 49 | Tout (C) {Out-boarding air temperature} 50 | Uwind (m/s) {Absolute value of wind velocity} 51 | 1 {NNCOML} 52 | """.split("\n") 53 | 54 | for line in test_lines: 55 | print("INPUT: %s" % line) 56 | print("OUTPUT: %s" % rightStripCurlyBraces(line)) 57 | 58 | 59 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | netCDF4 2 | scipy 3 | numpy 4 | xarray 5 | cf_xarray 6 | cftime 7 | -------------------------------------------------------------------------------- /requirements_dev.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | xarray 3 | cf_xarray 4 | cftime 5 | 6 | # Testing 7 | pytest 8 | gitpython 9 | docutils 10 | flake8 11 | nose 12 | pypandoc 13 | 14 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # BSD Licence 2 | # Copyright (c) 2010, Science & Technology Facilities Council (STFC) 3 | # All rights reserved. 4 | # 5 | # See the LICENSE file in the source distribution of this software for 6 | # the full license text. 7 | 8 | import io 9 | import os 10 | from setuptools import setup, find_packages 11 | 12 | from nappy import __version__ 13 | 14 | 15 | def read(filename, encoding='utf-8'): 16 | """read file contents""" 17 | full_path = os.path.join(os.path.dirname(__file__), filename) 18 | with io.open(full_path, encoding=encoding) as fh: 19 | contents = fh.read().strip() 20 | return contents 21 | 22 | 23 | def license(): 24 | return read('LICENSE') 25 | 26 | 27 | if os.path.exists('MANIFEST'): 28 | os.unlink('MANIFEST') 29 | 30 | try: 31 | import pypandoc 32 | LONG_DESCRIPTION = pypandoc.convert_file('README.md', 'rst') 33 | except(IOError, ImportError, OSError): 34 | LONG_DESCRIPTION='A python package for reading/writing NASA Ames files, writing NASA Ames-style CSV files and converting to/from NetCDF' 35 | 36 | setup( 37 | name='nappy', 38 | version=__version__, 39 | description='NASA Ames Processing in Python', 40 | long_description=LONG_DESCRIPTION, 41 | keywords='Python CSV NASA Ames NetCDF convert xarray', 42 | author='Ag Stephens', 43 | author_email='ag.stephens@stfc.ac.uk', 44 | url='https://github.com/cedadev/nappy', 45 | license=license(), 46 | platforms='all', 47 | 48 | # We make the package non-zip_safe so that we don't need to 49 | # change the way ini files are read too much. 50 | packages=find_packages(exclude=("tests")), 51 | package_data={ 52 | 'nappy': [ 53 | 'config/*.ini' 54 | ] 55 | }, 56 | 57 | include_package_data=True, 58 | zip_safe=False, 59 | install_requires=read('requirements.txt').splitlines(), 60 | extras_require={ 61 | 'netcdf_conversion': ['xarray'] 62 | }, 63 | tests_require=read('requirements_dev.txt').splitlines(), 64 | test_suite='nose.collector', 65 | 66 | entry_points={ 67 | 'console_scripts': [ 68 | 'na2nc=nappy.script.na2nc:na2nc', 69 | 'nc2na=nappy.script.nc2na:nc2na', 70 | 'nc2csv=nappy.script.nc2csv:nc2csv' 71 | ] 72 | }, 73 | classifiers=[ 74 | 'Development Status :: 4 - Beta', 75 | 'Environment :: Console', 76 | 'Intended Audience :: Developers', 77 | 'Intended Audience :: Science/Research', 78 | 'License :: OSI Approved :: BSD License', 79 | 'Operating System :: OS Independent', 80 | 'Programming Language :: Python' 81 | ], 82 | ) 83 | -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | # Nappy Units Tests directory 2 | 3 | Need unit tests as follows: 4 | 5 | 6 | 1. Read tests for all FFIs 7 | 8 | 2. Read and write and diff tests for all FFIs 9 | 10 | 3. Write only tests for all FFIs 11 | 12 | 4. Convert NC to NA tests 13 | 14 | 5. Convert NA to NC tests 15 | 16 | 6. Write tests for CSV format 17 | 18 | 7. Convert NC to CSV format tests 19 | 20 | 8. Testing of individual utility modules 21 | 22 | 9. Error stack needed 23 | 24 | 25 | # Running tests 26 | 27 | nose is handy utility. It allows you to run: 28 | 29 | ```bash 30 | $ nosetests __init__.py 31 | ```` 32 | 33 | and it runs all tests that match `test_*.py` 34 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/__init__.py -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-as-padded-ints.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:31 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,000,030,1017 56 | 79210,004,074,1012 57 | 79220,003,105,1008 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-as-padded-ints.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:44 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 000 030 1017 56 | 79210 004 074 1012 57 | 79220 003 105 1008 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-csv.na: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:46 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-excludes.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:15 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-excludes.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:25 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-no-header.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:36 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-no-header.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:49 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-overwrite.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | See line 2 - my favourite org. 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:28 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc-overwrite.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | See line 2 - my favourite org. 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:42 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:35:39 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-from-nc.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:09 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/cached_outputs/1001-global-atts.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/1001-global-atts.nc -------------------------------------------------------------------------------- /tests/cached_outputs/1001-renamed.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/1001-renamed.nc -------------------------------------------------------------------------------- /tests/cached_outputs/1001.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/1001.nc -------------------------------------------------------------------------------- /tests/cached_outputs/1010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/1010.nc -------------------------------------------------------------------------------- /tests/cached_outputs/2010-from-nc_1.csv: -------------------------------------------------------------------------------- 1 | 58,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1969 1 1,2021 5 10 8 | 10.0,20.0 9 | 9 10 | 3 11 | 0,10,20 12 | time (days since 2008-01-01 00:00:00) 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000.0 21 | Pressure (hPa) 22 | 17 23 | ==== Special Comments follow ==== 24 | Example of FFI 2010 (b). 25 | This example illustrating NASA Ames file format index 2010 is based on results 26 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 27 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 28 | wind distribution in the winter hemisphere as a function of latitude and height. 29 | The first date on line 7 (1st of January 1969) is fictitious. 30 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 31 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 32 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 33 | Variable mean_zonal_wind: Mean zonal wind (m/s) 34 | name = variable_2 35 | title = Mean zonal wind 36 | long_name = Mean zonal wind 37 | units = m/s 38 | == Variable attributes from source (NetCDF) file end == 39 | ==== Special Comments end ==== 40 | 18 41 | ==== Normal Comments follow ==== 42 | Conventions: CF-1.0 43 | === Additional Global Attributes defined in the source file === 44 | The files included in this data set illustrate each of the 9 NASA Ames file 45 | format indices (FFI). A detailed description of the NASA Ames format can be 46 | found on the Web site of the British Atmospheric Data Centre (BADC) at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 48 | E-mail contact: badc@rl.ac.uk 49 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 50 | Exchange, Version 1.3, 1998. This work can be found at 51 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 52 | and a copy of it at 53 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 54 | History: 2021-05-10 15:49:03 - Converted to NASA Ames format using nappy-0.3.0. 55 | 2002-10-31 - NASA Ames File created/revised. 56 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 57 | ==== Normal Comments end ==== 58 | === Data Section begins on the next line === 59 | 0,1013.3 60 | -3,-2.6,-2.3,2,4.8,4.6,4.5,3,-0.9 61 | 20,55.3 62 | -15.1,-4.2,6.9,12.8,14.7,20,21.5,18,8.2 63 | 40,2.3 64 | -29,-15.2,3.4,28.2,41,39.1,17.9,8,0.1 65 | 60,0.22 66 | -10,8.4,31.2,59.9,78.5,77.7,47,17.6,16 67 | 80,0.01 68 | 200,200,200,200,200,200,200,200,200 69 | -------------------------------------------------------------------------------- /tests/cached_outputs/2010-from-nc_2.csv: -------------------------------------------------------------------------------- 1 | 52,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1969 1 1,2021 5 10 8 | 1.0,10.0 9 | 2 10 | 2 11 | 0,1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 2010 (b). 22 | This example illustrating NASA Ames file format index 2010 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 28 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 29 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 18 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file 39 | format indices (FFI). A detailed description of the NASA Ames format can be 40 | found on the Web site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 44 | Exchange, Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 46 | and a copy of it at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 48 | History: 2021-05-10 15:49:03 - Converted to NASA Ames format using nappy-0.3.0. 49 | 2002-10-31 - NASA Ames File created/revised. 50 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 51 | ==== Normal Comments end ==== 52 | === Data Section begins on the next line === 53 | 0 54 | -5,5 55 | 10 56 | 5,15 57 | 20 58 | 15,25 59 | 30 60 | 25,35 61 | 40 62 | 35,45 63 | 50 64 | 45,55 65 | 60 66 | 55,65 67 | 70 68 | 65,75 69 | 80 70 | 75,85 71 | -------------------------------------------------------------------------------- /tests/cached_outputs/2010-from-nc_2.na: -------------------------------------------------------------------------------- 1 | 52 2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1 1 7 | 1969 1 1 2021 5 10 8 | 1.0 10.0 9 | 2 10 | 2 11 | 0 1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 2010 (b). 22 | This example illustrating NASA Ames file format index 2010 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 28 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 29 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 18 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file 39 | format indices (FFI). A detailed description of the NASA Ames format can be 40 | found on the Web site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 44 | Exchange, Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 46 | and a copy of it at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 48 | History: 2021-05-10 15:51:14 - Converted to NASA Ames format using nappy-0.3.0. 49 | 2002-10-31 - NASA Ames File created/revised. 50 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 51 | ==== Normal Comments end ==== 52 | === Data Section begins on the next line === 53 | 0 54 | -5 5 55 | 10 56 | 5 15 57 | 20 58 | 15 25 59 | 30 60 | 25 35 61 | 40 62 | 35 45 63 | 50 64 | 45 55 65 | 60 66 | 55 65 67 | 70 68 | 65 75 69 | 80 70 | 75 85 71 | -------------------------------------------------------------------------------- /tests/cached_outputs/2010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/2010.nc -------------------------------------------------------------------------------- /tests/cached_outputs/3010-from-nc_2.csv: -------------------------------------------------------------------------------- 1 | 51,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1980 6 21,2021 5 10 8 | 1.0,30.0 9 | 2 10 | 2 11 | 0,1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 3010. 22 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 23 | Data have been made up for the purpose of illustrating the use of the format. They 24 | consist in an imaginary calculated temperature distribution over a latitude-altitude 25 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 26 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 27 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 28 | The day number is counted from 1st of January = Day One. 29 | The year of the first date on line 7 (1980) has no particular meaning. 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 17 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | History: 2021-05-10 15:49:06 - Converted to NASA Ames format using nappy-0.3.0. 48 | 2002-10-31 - NASA Ames File created/revised. 49 | 2021-05-10 15:14:42 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 50 | ==== Normal Comments end ==== 51 | === Data Section begins on the next line === 52 | -90 53 | -90,-75 54 | -60 55 | -75,-45 56 | -30 57 | -45,-15 58 | 0 59 | -15,15 60 | 30 61 | 15,45 62 | 60 63 | 45,75 64 | 90 65 | 75,90 66 | -------------------------------------------------------------------------------- /tests/cached_outputs/3010-from-nc_2.na: -------------------------------------------------------------------------------- 1 | 51 2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 1 1 7 | 1980 6 21 2021 5 10 8 | 1.0 30.0 9 | 2 10 | 2 11 | 0 1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 3010. 22 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 23 | Data have been made up for the purpose of illustrating the use of the format. They 24 | consist in an imaginary calculated temperature distribution over a latitude-altitude 25 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 26 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 27 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 28 | The day number is counted from 1st of January = Day One. 29 | The year of the first date on line 7 (1980) has no particular meaning. 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 17 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | History: 2021-05-10 15:51:17 - Converted to NASA Ames format using nappy-0.3.0. 48 | 2002-10-31 - NASA Ames File created/revised. 49 | 2021-05-10 15:14:42 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 50 | ==== Normal Comments end ==== 51 | === Data Section begins on the next line === 52 | -90 53 | -90 -75 54 | -60 55 | -75 -45 56 | -30 57 | -45 -15 58 | 0 59 | -15 15 60 | 30 61 | 15 45 62 | 60 63 | 45 75 64 | 90 65 | 75 90 66 | -------------------------------------------------------------------------------- /tests/cached_outputs/3010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/3010.nc -------------------------------------------------------------------------------- /tests/cached_outputs/4010-renamed.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/4010-renamed.nc -------------------------------------------------------------------------------- /tests/cached_outputs/4010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/cached_outputs/4010.nc -------------------------------------------------------------------------------- /tests/cached_outputs/test_1001.csv: -------------------------------------------------------------------------------- 1 | 25,1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 2000 9 20,2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1,1.0,0.1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200.000000,0.000000,30.000000,10176.000000 27 | 79210.000000,44.000000,74.000000,10125.000000 28 | 79220.000000,37.000000,105.000000,10088.000000 29 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_1001.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_1001_annotated.csv: -------------------------------------------------------------------------------- 1 | Number of header lines; NASA Ames sub-format code,25,1001 2 | Name of data creator,Bryan Lawrence 3 | Institute of data creator,Physics and Astronomy, University of Canterbury 4 | Instrument or model name,Data: NZMS Radiosonde Ascent 5 | Project name,Project: Gravity Wave Processes and their Role in Climate 6 | File number; Total number of files,1,1 7 | Starting date of data (YYYY MM DD); File creation date (YYYY MM DD),2000 9 20,2003 4 10 8 | Interval between coordinate variable values (zero if not used),10.0 9 | Name of coordinate variable (with units),Time in UT Seconds from 0000 hours on the data date 10 | Number of primary variables defined,3 11 | Scale factors for each primary variable,0.1,1.0,0.1 12 | Missing values for each primary variable,-1.0,-1.0,-1.0 13 | Name of primary variable (with units) 1,Ascent Rate (m/s) 14 | Name of primary variable (with units) 2,Height above MSL (m) 15 | Name of primary variable (with units) 3,Pressure (hPa) 16 | Number of lines of special comments,0 17 | Number of lines of normal comments,8 18 | Normal comments line 1,Location : 36.79 S 174.63 E 30 m 19 | Normal comments line 2,RS-number: 002104615 20 | Normal comments line 3,Ground check : Ref RS Corr 21 | Normal comments line 4,Pressure : 1018.0 1017.6 0.4 22 | Normal comments line 5,Temperature : 21.6 21.8 -0.2 23 | Normal comments line 6,Humidity : 0 1 -1 24 | Normal comments line 7,uts asrat hght press 25 | Normal comments line 8,s m/s m hPa 26 | Data section,79200,0,30,10176 27 | Data section,79210,44,74,10125 28 | Data section,79220,37,105,10088 29 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_1001_cb_rewritten.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2010.csv: -------------------------------------------------------------------------------- 1 | 43,2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7,13 7 | 1969 1 1,2002 10 31 8 | 20.0,10.0 9 | 9 10 | 1 11 | 0.000000 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1.0 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1.0 20 | 2000.0 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0.000000,1013.300000 45 | -3.000000,-2.600000,-2.300000,2.000000,4.800000,4.600000,4.500000,3.000000,-0.900000 46 | 20.000000,55.300000 47 | -15.100000,-4.200000,6.900000,12.800000,14.700000,20.000000,21.500000,18.000000,8.200000 48 | 40.000000,2.300000 49 | -29.000000,-15.200000,3.400000,28.200000,41.000000,39.100000,17.900000,8.000000,0.100000 50 | 60.000000,0.220000 51 | -10.000000,8.400000,31.200000,59.900000,78.500000,77.700000,47.000000,17.600000,16.000000 52 | 80.000000,0.010000 53 | 200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000 54 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2010.na: -------------------------------------------------------------------------------- 1 | 43 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7 13 7 | 1969 1 1 2002 10 31 8 | 10.0 20.0 9 | 9 10 | 1 11 | 0 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1.0 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1.0 20 | 2000.0 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0 1013.3 45 | -3 -2.6 -2.3 2 4.8 4.6 4.5 3 -0.9 46 | 20 55.3 47 | -15.1 -4.2 6.9 12.8 14.7 20 21.5 18 8.2 48 | 40 2.3 49 | -29 -15.2 3.4 28.2 41 39.1 17.9 8 0.1 50 | 60 0.22 51 | -10 8.4 31.2 59.9 78.5 77.7 47 17.6 16 52 | 80 0.01 53 | 200 200 200 200 200 200 200 200 200 54 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2110.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 1 1 2002 10 31 8 | 0.0 10.0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 2 16 | 1.0 1.0 17 | 100.0 2000.0 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.3 40 | 20 -2.3 41 | 40 4.8 42 | 60 4.5 43 | 80 -0.9 44 | 10 4 265 45 | 30 31.5 46 | 40 28 47 | 50 21.6 48 | 60 14.9 49 | 20 3 55.3 50 | 40 14.7 51 | 60 21.5 52 | 70 18 53 | 30 7 12 54 | 20 -9.3 55 | 30 -6.8 56 | 40 15 57 | 50 22 58 | 60 22.7 59 | 70 18.2 60 | 80 12 61 | 40 5 2.3 62 | 0 -29 63 | 20 3.4 64 | 30 28.2 65 | 50 39.1 66 | 80 0.1 67 | 50 8 0.8 68 | 0 -21.9 69 | 10 -4 70 | 20 19.9 71 | 30 40.8 72 | 40 55 73 | 50 50.1 74 | 60 25 75 | 70 8.1 76 | 60 9 0.22 77 | 0 -10 78 | 10 8.4 79 | 20 31.2 80 | 30 59.9 81 | 40 78.5 82 | 50 77.7 83 | 60 47 84 | 70 17.6 85 | 80 16 86 | 70 4 0.05 87 | 0 1.2 88 | 30 63.3 89 | 60 61.2 90 | 70 35 91 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2160.csv: -------------------------------------------------------------------------------- 1 | 47,2160 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Chemiluminescence NOX analyser. UV absorption API 400 ozone analyser. 5 | NERC Data Grid (NDG) project 6 | 10,13 7 | 2002 10 10,2002 10 31 8 | 10.0 9 | 13.0 10 | Site name 11 | Time (minutes) 12 | 2 13 | 1.0,1.0 14 | 100.0,100.0 15 | NOX volume mixing ratio (ppbv) 16 | Ozone volume mixing ratio (ppbv) 17 | 5 18 | 2 19 | 1.0,1.0,1.0 20 | 100.0,1000.0,1000.0 21 | 10,7 22 | zzzzzzzzzz 23 | zzzzzzz 24 | Number of measurements 25 | Longitude (degrees from Greenwich meridian) 26 | Latitude (degrees North) 27 | Date 28 | Local time at t = 0 29 | 7 30 | Example of FFI 2160. 31 | This example illustrating NASA Ames file format index 2160 is entirely fictitious. Data 32 | have been made up for the purpose of illustrating the use of the format. They consist in 33 | imaginary simultaneous measurements of tropospheric NOX and ozone mixing ratios at three 34 | sites. A time series is provided for each site and each species. Measurements are 35 | supposed to have taken place every 10 minutes. The 4th and 5th auxiliary variables give 36 | the time of the first measurement of the series. 37 | 10 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | 48 | Belbroughton 49 | 7.000000,-2.148000,52.398000 50 | 22-10-2002 51 | 12 h 15 52 | 0.000000,2.200000,35.000000 53 | 10.000000,2.300000,35.000000 54 | 20.000000,4.500000,35.900000 55 | 30.000000,4.800000,100.000000 56 | 40.000000,4.300000,36.000000 57 | 50.000000,4.200000,35.900000 58 | 60.000000,4.000000,35.900000 59 | Coventry 60 | 4.000000,-1.517000,52.400000 61 | 10-10-2002 62 | 04 h 20 63 | 0.000000,100.000000,34.000000 64 | 10.000000,1.900000,34.100000 65 | 20.000000,2.200000,35.000000 66 | 30.000000,2.800000,35.000000 67 | Kidderminster 68 | 10.000000,-2.258000,52.364000 69 | 15-10-2002 70 | 16 h 35 71 | 0.000000,3.900000,35.000000 72 | 10.000000,3.800000,35.100000 73 | 20.000000,5.400000,36.000000 74 | 30.000000,5.900000,36.200000 75 | 40.000000,100.000000,36.800000 76 | 50.000000,6.400000,37.000000 77 | 60.000000,6.400000,36.900000 78 | 70.000000,6.000000,37.000000 79 | 80.000000,5.500000,36.800000 80 | 90.000000,5.300000,36.500000 81 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2160.na: -------------------------------------------------------------------------------- 1 | 47 2160 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Chemiluminescence NOX analyser. UV absorption API 400 ozone analyser. 5 | NERC Data Grid (NDG) project 6 | 10 13 7 | 2002 10 10 2002 10 31 8 | 10.0 9 | 13.0 10 | Time (minutes) 11 | Site name 12 | 2 13 | 1.0 1.0 14 | 100.0 100.0 15 | NOX volume mixing ratio (ppbv) 16 | Ozone volume mixing ratio (ppbv) 17 | 5 18 | 2 19 | 1.0 1.0 1.0 20 | 100.0 1000.0 1000.0 21 | 10 7 22 | zzzzzzzzzz 23 | zzzzzzz 24 | Number of measurements 25 | Longitude (degrees from Greenwich meridian) 26 | Latitude (degrees North) 27 | Date 28 | Local time at t = 0 29 | 7 30 | Example of FFI 2160. 31 | This example illustrating NASA Ames file format index 2160 is entirely fictitious. Data 32 | have been made up for the purpose of illustrating the use of the format. They consist in 33 | imaginary simultaneous measurements of tropospheric NOX and ozone mixing ratios at three 34 | sites. A time series is provided for each site and each species. Measurements are 35 | supposed to have taken place every 10 minutes. The 4th and 5th auxiliary variables give 36 | the time of the first measurement of the series. 37 | 10 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | 48 | Belbroughton 49 | 7 -2.148 52.398 50 | 22-10-2002 51 | 12 h 15 52 | 0 2.2 35 53 | 10 2.3 35 54 | 20 4.5 35.9 55 | 30 4.8 100 56 | 40 4.3 36 57 | 50 4.2 35.9 58 | 60 4 35.9 59 | Coventry 60 | 4 -1.517 52.4 61 | 10-10-2002 62 | 04 h 20 63 | 0 100 34 64 | 10 1.9 34.1 65 | 20 2.2 35 66 | 30 2.8 35 67 | Kidderminster 68 | 10 -2.258 52.364 69 | 15-10-2002 70 | 16 h 35 71 | 0 3.9 35 72 | 10 3.8 35.1 73 | 20 5.4 36 74 | 30 5.9 36.2 75 | 40 100 36.8 76 | 50 6.4 37 77 | 60 6.4 36.9 78 | 70 6 37 79 | 80 5.5 36.8 80 | 90 5.3 36.5 81 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2310.csv: -------------------------------------------------------------------------------- 1 | 39,2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11,13 7 | 1969 1 1,2002 10 31 8 | 0.0 9 | Altitude (km) 10 | Latitude (degrees North) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 4 16 | 1.0,1.0,1.0,1.0 17 | 100.0,1000.0,1000.0,2000.0 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0.000000,7.000000,20.000000,10.000000,1013.300000 41 | -2.300000,2.000000,4.800000,4.600000,4.500000,3.000000,-0.900000 42 | 10.000000,4.000000,50.000000,10.000000,265.000000 43 | 21.600000,14.900000,7.500000,3.000000 44 | 20.000000,9.000000,0.000000,10.000000,55.300000 45 | -15.100000,-4.200000,6.900000,12.800000,14.700000,20.000000,21.500000,18.000000,8.200000 46 | 30.000000,3.000000,0.000000,30.000000,12.000000 47 | -29.100000,-6.800000,22.700000 48 | 50.000000,4.000000,10.000000,20.000000,0.800000 49 | -4.000000,40.800000,50.100000,8.100000 50 | 60.000000,9.000000,0.000000,10.000000,0.220000 51 | -10.000000,8.400000,31.200000,59.900000,78.500000,77.700000,47.000000,17.600000,16.000000 52 | 70.000000,4.000000,0.000000,10.000000,0.052000 53 | 1.200000,17.600000,39.900000,63.300000 54 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_2310.na: -------------------------------------------------------------------------------- 1 | 39 2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11 13 7 | 1969 1 1 2002 10 31 8 | 0.0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 4 16 | 1.0 1.0 1.0 1.0 17 | 100.0 1000.0 1000.0 2000.0 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0 7 20 10 1013.3 41 | -2.3 2 4.8 4.6 4.5 3 -0.9 42 | 10 4 50 10 265 43 | 21.6 14.9 7.5 3 44 | 20 9 0 10 55.3 45 | -15.1 -4.2 6.9 12.8 14.7 20 21.5 18 8.2 46 | 30 3 0 30 12 47 | -29.1 -6.8 22.7 48 | 50 4 10 20 0.8 49 | -4 40.8 50.1 8.1 50 | 60 9 0 10 0.22 51 | -10 8.4 31.2 59.9 78.5 77.7 47 17.6 16 52 | 70 4 0 10 0.052 53 | 1.2 17.6 39.9 63.3 54 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_3010.csv: -------------------------------------------------------------------------------- 1 | 41,3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12,13 7 | 1980 6 21,2002 10 31 8 | 0.0,-10.0,30.0 9 | 7,4 10 | 1,1 11 | -90.000000 12 | 50.000000 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1.0 18 | 1000.0 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172.000000 43 | 193.000000,211.000000,224.000000,229.000000,235.000000,245.000000,270.000000 44 | 221.000000,230.000000,254.000000,272.000000,281.000000,289.000000,300.000000 45 | 220.000000,229.000000,244.000000,253.000000,260.000000,263.000000,278.000000 46 | 195.000000,208.000000,217.000000,219.000000,223.000000,230.000000,240.000000 47 | 355.000000 48 | 270.000000,245.000000,235.000000,229.000000,224.000000,211.000000,193.000000 49 | 300.000000,289.000000,281.000000,272.000000,254.000000,230.000000,221.000000 50 | 278.000000,263.000000,260.000000,253.000000,244.000000,229.000000,220.000000 51 | 240.000000,230.000000,223.000000,219.000000,217.000000,208.000000,195.000000 52 | -------------------------------------------------------------------------------- /tests/cached_outputs/test_3010.na: -------------------------------------------------------------------------------- 1 | 41 3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12 13 7 | 1980 6 21 2002 10 31 8 | 30.0 -10.0 0.0 9 | 7 4 10 | 1 1 11 | -90 12 | 50 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1.0 18 | 1000.0 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172 43 | 193 211 224 229 235 245 270 44 | 221 230 254 272 281 289 300 45 | 220 229 244 253 260 263 278 46 | 195 208 217 219 223 230 240 47 | 355 48 | 270 245 235 229 224 211 193 49 | 300 289 281 272 254 230 221 50 | 278 263 260 253 244 229 220 51 | 240 230 223 219 217 208 195 52 | -------------------------------------------------------------------------------- /tests/common.py: -------------------------------------------------------------------------------- 1 | import os 2 | from pathlib import Path 3 | 4 | TESTS_HOME = Path(os.path.abspath(os.path.dirname(__file__))) 5 | 6 | MINI_CEDA_CACHE_DIR = Path.home() / ".mini-ceda-archive" 7 | MINI_CEDA_CACHE_BRANCH = "main" 8 | MINI_BADC_DIR = MINI_CEDA_CACHE_DIR / MINI_CEDA_CACHE_BRANCH / "archive" / "badc" 9 | 10 | data_files = TESTS_HOME / "testdata" 11 | test_outputs = TESTS_HOME / "test_outputs" 12 | cached_outputs = TESTS_HOME / "cached_outputs" 13 | 14 | 15 | if not os.path.isdir(test_outputs): 16 | os.makedirs(test_outputs) 17 | 18 | -------------------------------------------------------------------------------- /tests/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pytest 3 | import shutil 4 | 5 | from git import Repo 6 | 7 | from .common import MINI_CEDA_CACHE_DIR, MINI_CEDA_CACHE_BRANCH 8 | 9 | CEDA_TEST_DATA_REPO_URL = "https://github.com/cedadev/mini-ceda-archive" 10 | 11 | 12 | @pytest.fixture 13 | def load_ceda_test_data(): 14 | """ 15 | This fixture ensures that the required test data repository 16 | has been cloned to the cache directory within the home directory. 17 | """ 18 | branch = MINI_CEDA_CACHE_BRANCH 19 | target = os.path.join(MINI_CEDA_CACHE_DIR, branch) 20 | 21 | if not os.path.isdir(MINI_CEDA_CACHE_DIR): 22 | os.makedirs(MINI_CEDA_CACHE_DIR) 23 | 24 | if not os.path.isdir(target): 25 | repo = Repo.clone_from(CEDA_TEST_DATA_REPO_URL, target) 26 | repo.git.checkout(branch) 27 | 28 | elif os.environ.get("NAPPY_AUTO_UPDATE_TEST_DATA", "true").lower() != "false": 29 | repo = Repo(target) 30 | repo.git.checkout(branch) 31 | repo.remotes[0].pull() 32 | 33 | -------------------------------------------------------------------------------- /tests/quick_tests_na_to_nc.py: -------------------------------------------------------------------------------- 1 | import na_to_nc 2 | import nc_to_na 3 | import os 4 | 5 | in_dir = "../../data_files" 6 | out_dir = "../../test_outputs" 7 | 8 | for ffi in (1001, 1010, 1020, 2010, 3010, 4010): 9 | 10 | infile = os.path.join(in_dir, "%s.na" % ffi) 11 | outfile = os.path.join(out_dir, "%s.nc" % ffi) 12 | 13 | print("Reading:", infile) 14 | x = na_to_nc.NAToNC(infile) 15 | 16 | print("Writing:", outfile) 17 | x.writeNCFile(outfile) 18 | -------------------------------------------------------------------------------- /tests/quick_tests_nc_to_na.py: -------------------------------------------------------------------------------- 1 | import na_to_nc 2 | import nc_to_na 3 | import os 4 | 5 | in_dir = "../../data_files" 6 | out_dir = "../../test_outputs" 7 | in_dir = out_dir 8 | 9 | for ffi in (1001, 2010, 3010, 4010): 10 | 11 | infile = os.path.join(in_dir, "%s.nc" % ffi) 12 | outfile = os.path.join(out_dir, "%s_from_nc.na" % ffi) 13 | 14 | print("Reading:", infile) 15 | x = nc_to_na.NCToNA(infile) 16 | 17 | print("Writing:", outfile) 18 | x.writeNAFiles(outfile) 19 | -------------------------------------------------------------------------------- /tests/run_cmd_line_tests.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | run_cmd_line_tests.py 5 | ===================== 6 | 7 | Usage: 8 | 9 | run_cmd_line_tests.py [] [ .... ] 10 | 11 | Where: 12 | 13 | has one cmd line test per line 14 | n and friends are numbers of tests in . 15 | 16 | """ 17 | 18 | 19 | import os 20 | import sys 21 | import subprocess 22 | 23 | args = sys.argv[1:] 24 | 25 | if len(args) == 0: 26 | print("Please provide at least the file arg.") 27 | sys.exit() 28 | 29 | fname = args[0] 30 | with open(fname) as fh: 31 | tests = fh.readlines() 32 | limited_tests = [int(i) for i in args[1:]] 33 | 34 | 35 | for count, test in enumerate(tests): 36 | count = count + 1 37 | if limited_tests and count not in limited_tests: 38 | continue 39 | 40 | test = "python " + test 41 | print("\n\n\n================================================================================") 42 | print(" Test number: %s " % count) 43 | print("===================================================================================") 44 | print("Running: ", test) 45 | ret_code = subprocess.check_call(test.split()) 46 | print("Return code: %s" % ret_code) 47 | 48 | -------------------------------------------------------------------------------- /tests/test_1010_to_1020.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pytest 3 | 4 | from .common import data_files, test_outputs 5 | 6 | import nappy.nc_interface.na_to_nc 7 | import nappy.nc_interface.nc_to_na 8 | import xarray as xr 9 | 10 | 11 | @pytest.mark.xfail(reason="Not sure if this should work at all.") 12 | def test_convert_nafile_to_nc_file_1010(): 13 | "Converting NAFile to NC file 1010.na" 14 | ncfile = os.path.join(test_outputs, "1010.nc") 15 | nafile = os.path.join(data_files, "1010.na") 16 | ncOutFile = os.path.join(test_outputs, "1010_edited_for_1020.nc") 17 | 18 | n = nappy.nc_interface.na_to_nc.NAToNC(nafile) 19 | n.writeNCFile(ncfile) 20 | 21 | # Writing a 1020 file from 1010 already converted to NetCDF... 22 | f = xr.open_dataset(ncfile) 23 | p_new = f['pressure'].sel(altitude=(10,85)) 24 | o_new = f['ozone_concentration'].sel(altitude=slice(0,16,4)) 25 | 26 | ds = xr.Dataset({p_new.name: p_new, o_new.name: o_new}, attrs=f.attrs.copy()) 27 | ds.to_netcdf(ncOutFile) 28 | 29 | ffi_in, ffi_out = (1010, 1020) 30 | 31 | infile = os.path.join(test_outputs, f"{ffi_in}_edited_for_{ffi_out}.nc") 32 | outfile = os.path.join(test_outputs, f"{ffi_out}_from_nc_{ffi_in}.na") 33 | 34 | # Reading infile 35 | x = nappy.nc_interface.nc_to_na.NCToNA(infile, requested_ffi=ffi_out) 36 | 37 | # Writing outfile 38 | x.writeNAFiles(outfile) 39 | 40 | -------------------------------------------------------------------------------- /tests/test_2010_to_2110.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from .common import cached_outputs, data_files, test_outputs 4 | 5 | import nappy.nc_interface.na_to_nc 6 | import nappy.nc_interface.nc_to_na 7 | 8 | 9 | def test_convert_nc_2010_to_na_2110(): 10 | ffi_in, ffi_out = (2010, 2110) 11 | 12 | infile = os.path.join(cached_outputs, f"{ffi_in}.nc") 13 | outfile = os.path.join(test_outputs, f"{ffi_out}_from_nc_{ffi_in}.na") 14 | 15 | # Reading: infile 16 | x = nappy.nc_interface.nc_to_na.NCToNA(infile, requested_ffi=ffi_out) 17 | 18 | # Writing: outfile 19 | x.writeNAFiles(outfile, delimiter=",", float_format="%g") 20 | 21 | -------------------------------------------------------------------------------- /tests/test_2010_to_2310.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from .common import cached_outputs, data_files, test_outputs 4 | 5 | import nappy.nc_interface.na_to_nc 6 | import nappy.nc_interface.nc_to_na 7 | 8 | 9 | def test_convert_nc_2010_to_na_2310(): 10 | ffi_in, ffi_out = (2010, 2310) 11 | 12 | infile = os.path.join(cached_outputs, f"{ffi_in}.nc") 13 | outfile = os.path.join(test_outputs, f"{ffi_out}_from_nc_{ffi_in}.na") 14 | 15 | # Reading: infile 16 | x = nappy.nc_interface.nc_to_na.NCToNA(infile, requested_ffi=ffi_out) 17 | 18 | # Writing: outfile 19 | x.writeNAFiles(outfile, delimiter=",", float_format="%g") 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/test_nc2csv.py: -------------------------------------------------------------------------------- 1 | import os 2 | import xarray as xr 3 | 4 | from .test_nc2na import _generic_nc_to_na_test 5 | from .common import MINI_BADC_DIR, cached_outputs 6 | from nappy.nc_interface.xarray_to_na import XarrayDatasetToNA 7 | 8 | 9 | haduk_grid_nc = MINI_BADC_DIR / ("ukmo-hadobs/data/insitu/MOHC/HadOBS/HadUK-Grid/v1.0.3.0/1km/" 10 | "snowLying/mon/v20210712/snowLying_hadukgrid_uk_1km_mon_197101-197112.nc") 11 | 12 | DELIMITER = "," 13 | EXTENSION = "csv" 14 | 15 | 16 | def test_nc_to_csv_1001(): 17 | _generic_nc_to_na_test(1001, delimiter=DELIMITER, extension=EXTENSION) 18 | 19 | 20 | def test_nc_to_csv_1010(): 21 | _generic_nc_to_na_test(1010, delimiter=DELIMITER, extension=EXTENSION) 22 | 23 | 24 | def test_nc_to_csv_2010(): 25 | _generic_nc_to_na_test(2010, delimiter=DELIMITER, extension=EXTENSION) 26 | 27 | 28 | def test_nc_to_csv_3010(): 29 | _generic_nc_to_na_test(3010, delimiter=DELIMITER, extension=EXTENSION) 30 | 31 | 32 | def test_nc_to_csv_4010(): 33 | _generic_nc_to_na_test(4010, delimiter=DELIMITER, extension=EXTENSION) 34 | 35 | 36 | def test_auxiliary_vars_converted(load_ceda_test_data): 37 | ds = xr.open_dataset(haduk_grid_nc, use_cftime=True) 38 | 39 | output_dir = cached_outputs 40 | output_file_paths = [] 41 | 42 | xr_to_na = XarrayDatasetToNA(ds) 43 | xr_to_na.convert() 44 | 45 | output_file = os.path.join(output_dir, f"output_01.csv") 46 | xr_to_na.writeNAFiles(output_file, delimiter=",") 47 | output_file_paths.extend(xr_to_na.output_files_written) 48 | 49 | expected_var_names = ['projection_x_coordinate_bnds', 'projection_y_coordinate_bnds', 50 | 'snowLying', 'time_bnds', 'transverse_mercator', 51 | 'surface_snow_area_fraction', 'month_number', 'season_year', 52 | 'longitude', 'latitude'] 53 | 54 | content = "" 55 | 56 | for output_file in output_file_paths: 57 | content += open(output_file).read() 58 | 59 | not_found = [] 60 | for var_name in expected_var_names: 61 | if var_name not in content: 62 | not_found.append(var_name) 63 | 64 | if not_found: 65 | raise Exception(f"Expected variables {not_found} not found in CSV files.") 66 | 67 | # Check time bounds are correct and not expontent formatted (requires "%.10g" format) 68 | last_file = output_file_paths[-1] 69 | lines = [l.strip() for l in open(last_file).readlines() if l.strip()] 70 | assert [line.startswith("time_bnds") for line in lines] 71 | assert "1498953,1499673" == lines[-1].strip() 72 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-as-padded-ints.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:31 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,000,030,1017 56 | 79210,004,074,1012 57 | 79220,003,105,1008 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-as-padded-ints.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:44 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 000 030 1017 56 | 79210 004 074 1012 57 | 79220 003 105 1008 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-csv.na: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:46 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-excludes.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:15 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-excludes.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:25 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-no-header.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:36 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-no-header.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:49 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-overwrite.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | See line 2 - my favourite org. 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:49:28 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc-overwrite.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | See line 2 - my favourite org. 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:42 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc.csv: -------------------------------------------------------------------------------- 1 | 54,1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 999 999 999,2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1,1,1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:35:39 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200,0,30,1017.6 56 | 79210,4.4,74,1012.5 57 | 79220,3.7,105,1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-from-nc.na: -------------------------------------------------------------------------------- 1 | 54 1001 2 | Bryan Lawrence 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 999 999 999 2021 5 10 8 | 10.0 9 | time (days since 2008-01-01 00:00:00) 10 | 3 11 | 1 1 1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 20 17 | ==== Special Comments follow ==== 18 | === Additional Variable Attributes defined in the source file === 19 | == Variable attributes from source (NetCDF) file follow == 20 | Variable ascent_rate: Ascent Rate (m/s) 21 | name = variable_1 22 | title = Ascent Rate 23 | long_name = Ascent Rate 24 | units = m/s 25 | Variable height_above_msl: Height above MSL (m) 26 | name = variable_3 27 | title = Height above MSL 28 | long_name = Height above MSL 29 | units = m 30 | Variable pressure: Pressure (hPa) 31 | name = variable_2 32 | title = Pressure 33 | long_name = Pressure 34 | units = hPa 35 | == Variable attributes from source (NetCDF) file end == 36 | ==== Special Comments end ==== 37 | 17 38 | ==== Normal Comments follow ==== 39 | Conventions: CF-1.0 40 | === Additional Global Attributes defined in the source file === 41 | Location : 36.79 S 174.63 E 30 m 42 | RS-number: 002104615 43 | Ground check : Ref RS Corr 44 | Pressure : 1018.0 1017.6 0.4 45 | Temperature : 21.6 21.8 -0.2 46 | Humidity : 0 1 -1 47 | uts asrat hght press 48 | s m/s m hPa 49 | History: 2021-05-10 15:51:09 - Converted to NASA Ames format using nappy-0.3.0. 50 | 2003-04-10 - NASA Ames File created/revised. 51 | 2021-05-10 15:13:29 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 52 | ==== Normal Comments end ==== 53 | === Data Section begins on the next line === 54 | time (days since 2008-01-01 00:00:00),Ascent Rate (m/s),Height above MSL (m),Pressure (hPa) 55 | 79200 0 30 1017.6 56 | 79210 4.4 74 1012.5 57 | 79220 3.7 105 1008.8 58 | -------------------------------------------------------------------------------- /tests/test_outputs/1001-global-atts.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/1001-global-atts.nc -------------------------------------------------------------------------------- /tests/test_outputs/1001-renamed.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/1001-renamed.nc -------------------------------------------------------------------------------- /tests/test_outputs/1001.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/1001.nc -------------------------------------------------------------------------------- /tests/test_outputs/1010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/1010.nc -------------------------------------------------------------------------------- /tests/test_outputs/2010-from-nc_1.csv: -------------------------------------------------------------------------------- 1 | 58,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1969 1 1,2021 5 10 8 | 10.0,20.0 9 | 9 10 | 3 11 | 0,10,20 12 | time (days since 2008-01-01 00:00:00) 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000.0 21 | Pressure (hPa) 22 | 17 23 | ==== Special Comments follow ==== 24 | Example of FFI 2010 (b). 25 | This example illustrating NASA Ames file format index 2010 is based on results 26 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 27 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 28 | wind distribution in the winter hemisphere as a function of latitude and height. 29 | The first date on line 7 (1st of January 1969) is fictitious. 30 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 31 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 32 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 33 | Variable mean_zonal_wind: Mean zonal wind (m/s) 34 | name = variable_2 35 | title = Mean zonal wind 36 | long_name = Mean zonal wind 37 | units = m/s 38 | == Variable attributes from source (NetCDF) file end == 39 | ==== Special Comments end ==== 40 | 18 41 | ==== Normal Comments follow ==== 42 | Conventions: CF-1.0 43 | === Additional Global Attributes defined in the source file === 44 | The files included in this data set illustrate each of the 9 NASA Ames file 45 | format indices (FFI). A detailed description of the NASA Ames format can be 46 | found on the Web site of the British Atmospheric Data Centre (BADC) at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 48 | E-mail contact: badc@rl.ac.uk 49 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 50 | Exchange, Version 1.3, 1998. This work can be found at 51 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 52 | and a copy of it at 53 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 54 | History: 2021-05-10 15:49:03 - Converted to NASA Ames format using nappy-0.3.0. 55 | 2002-10-31 - NASA Ames File created/revised. 56 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 57 | ==== Normal Comments end ==== 58 | === Data Section begins on the next line === 59 | 0,1013.3 60 | -3,-2.6,-2.3,2,4.8,4.6,4.5,3,-0.9 61 | 20,55.3 62 | -15.1,-4.2,6.9,12.8,14.7,20,21.5,18,8.2 63 | 40,2.3 64 | -29,-15.2,3.4,28.2,41,39.1,17.9,8,0.1 65 | 60,0.22 66 | -10,8.4,31.2,59.9,78.5,77.7,47,17.6,16 67 | 80,0.01 68 | 200,200,200,200,200,200,200,200,200 69 | -------------------------------------------------------------------------------- /tests/test_outputs/2010-from-nc_2.csv: -------------------------------------------------------------------------------- 1 | 52,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1969 1 1,2021 5 10 8 | 1.0,10.0 9 | 2 10 | 2 11 | 0,1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 2010 (b). 22 | This example illustrating NASA Ames file format index 2010 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 28 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 29 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 18 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file 39 | format indices (FFI). A detailed description of the NASA Ames format can be 40 | found on the Web site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 44 | Exchange, Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 46 | and a copy of it at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 48 | History: 2021-05-10 15:49:03 - Converted to NASA Ames format using nappy-0.3.0. 49 | 2002-10-31 - NASA Ames File created/revised. 50 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 51 | ==== Normal Comments end ==== 52 | === Data Section begins on the next line === 53 | 0 54 | -5,5 55 | 10 56 | 5,15 57 | 20 58 | 15,25 59 | 30 60 | 25,35 61 | 40 62 | 35,45 63 | 50 64 | 45,55 65 | 60 66 | 55,65 67 | 70 68 | 65,75 69 | 80 70 | 75,85 71 | -------------------------------------------------------------------------------- /tests/test_outputs/2010-from-nc_2.na: -------------------------------------------------------------------------------- 1 | 52 2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 1 1 7 | 1969 1 1 2021 5 10 8 | 1.0 10.0 9 | 2 10 | 2 11 | 0 1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 2010 (b). 22 | This example illustrating NASA Ames file format index 2010 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 28 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 29 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 18 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file 39 | format indices (FFI). A detailed description of the NASA Ames format can be 40 | found on the Web site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 44 | Exchange, Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 46 | and a copy of it at 47 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 48 | History: 2021-05-10 15:51:14 - Converted to NASA Ames format using nappy-0.3.0. 49 | 2002-10-31 - NASA Ames File created/revised. 50 | 2021-05-10 15:14:39 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 51 | ==== Normal Comments end ==== 52 | === Data Section begins on the next line === 53 | 0 54 | -5 5 55 | 10 56 | 5 15 57 | 20 58 | 15 25 59 | 30 60 | 25 35 61 | 40 62 | 35 45 63 | 50 64 | 45 55 65 | 60 66 | 55 65 67 | 70 68 | 65 75 69 | 80 70 | 75 85 71 | -------------------------------------------------------------------------------- /tests/test_outputs/2010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/2010.nc -------------------------------------------------------------------------------- /tests/test_outputs/3010-from-nc_2.csv: -------------------------------------------------------------------------------- 1 | 51,2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 1,1 7 | 1980 6 21,2021 5 10 8 | 1.0,30.0 9 | 2 10 | 2 11 | 0,1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 3010. 22 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 23 | Data have been made up for the purpose of illustrating the use of the format. They 24 | consist in an imaginary calculated temperature distribution over a latitude-altitude 25 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 26 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 27 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 28 | The day number is counted from 1st of January = Day One. 29 | The year of the first date on line 7 (1980) has no particular meaning. 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 17 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | History: 2021-05-10 15:49:06 - Converted to NASA Ames format using nappy-0.3.0. 48 | 2002-10-31 - NASA Ames File created/revised. 49 | 2021-05-10 15:14:42 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 50 | ==== Normal Comments end ==== 51 | === Data Section begins on the next line === 52 | -90 53 | -90,-75 54 | -60 55 | -75,-45 56 | -30 57 | -45,-15 58 | 0 59 | -15,15 60 | 30 61 | 15,45 62 | 60 63 | 45,75 64 | 90 65 | 75,90 66 | -------------------------------------------------------------------------------- /tests/test_outputs/3010-from-nc_2.na: -------------------------------------------------------------------------------- 1 | 51 2010 2 | De Rudder, Anne 3 | Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK. 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 1 1 7 | 1980 6 21 2021 5 10 8 | 1.0 30.0 9 | 2 10 | 2 11 | 0 1 12 | bound 13 | time (days since 2008-01-01 00:00:00) 14 | 1 15 | 1 16 | 1e+20 17 | variable_1 18 | 0 19 | 14 20 | ==== Special Comments follow ==== 21 | Example of FFI 3010. 22 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 23 | Data have been made up for the purpose of illustrating the use of the format. They 24 | consist in an imaginary calculated temperature distribution over a latitude-altitude 25 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 26 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 27 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 28 | The day number is counted from 1st of January = Day One. 29 | The year of the first date on line 7 (1980) has no particular meaning. 30 | Variable bounds_latitude: variable_1 31 | name = variable_1 32 | == Variable attributes from source (NetCDF) file end == 33 | ==== Special Comments end ==== 34 | 17 35 | ==== Normal Comments follow ==== 36 | Conventions: CF-1.0 37 | === Additional Global Attributes defined in the source file === 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | History: 2021-05-10 15:51:17 - Converted to NASA Ames format using nappy-0.3.0. 48 | 2002-10-31 - NASA Ames File created/revised. 49 | 2021-05-10 15:14:42 - Converted to CDMS (NetCDF) format using nappy-0.3.0. 50 | ==== Normal Comments end ==== 51 | === Data Section begins on the next line === 52 | -90 53 | -90 -75 54 | -60 55 | -75 -45 56 | -30 57 | -45 -15 58 | 0 59 | -15 15 60 | 30 61 | 15 45 62 | 60 63 | 45 75 64 | 90 65 | 75 90 66 | -------------------------------------------------------------------------------- /tests/test_outputs/3010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/3010.nc -------------------------------------------------------------------------------- /tests/test_outputs/4010-renamed.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/4010-renamed.nc -------------------------------------------------------------------------------- /tests/test_outputs/4010.nc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cedadev/nappy/109b542469368139a58a2f28452cf6bd34e2a26e/tests/test_outputs/4010.nc -------------------------------------------------------------------------------- /tests/test_outputs/test_1001.csv: -------------------------------------------------------------------------------- 1 | 25,1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1,1 7 | 2000 9 20,2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1,1.0,0.1 12 | -1.0,-1.0,-1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200.000000,0.000000,30.000000,10176.000000 27 | 79210.000000,44.000000,74.000000,10125.000000 28 | 79220.000000,37.000000,105.000000,10088.000000 29 | -------------------------------------------------------------------------------- /tests/test_outputs/test_1001.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/test_outputs/test_1001_annotated.csv: -------------------------------------------------------------------------------- 1 | Number of header lines; NASA Ames sub-format code,25,1001 2 | Name of data creator,Bryan Lawrence 3 | Institute of data creator,Physics and Astronomy, University of Canterbury 4 | Instrument or model name,Data: NZMS Radiosonde Ascent 5 | Project name,Project: Gravity Wave Processes and their Role in Climate 6 | File number; Total number of files,1,1 7 | Starting date of data (YYYY MM DD); File creation date (YYYY MM DD),2000 9 20,2003 4 10 8 | Interval between coordinate variable values (zero if not used),10.0 9 | Name of coordinate variable (with units),Time in UT Seconds from 0000 hours on the data date 10 | Number of primary variables defined,3 11 | Scale factors for each primary variable,0.1,1.0,0.1 12 | Missing values for each primary variable,-1.0,-1.0,-1.0 13 | Name of primary variable (with units) 1,Ascent Rate (m/s) 14 | Name of primary variable (with units) 2,Height above MSL (m) 15 | Name of primary variable (with units) 3,Pressure (hPa) 16 | Number of lines of special comments,0 17 | Number of lines of normal comments,8 18 | Normal comments line 1,Location : 36.79 S 174.63 E 30 m 19 | Normal comments line 2,RS-number: 002104615 20 | Normal comments line 3,Ground check : Ref RS Corr 21 | Normal comments line 4,Pressure : 1018.0 1017.6 0.4 22 | Normal comments line 5,Temperature : 21.6 21.8 -0.2 23 | Normal comments line 6,Humidity : 0 1 -1 24 | Normal comments line 7,uts asrat hght press 25 | Normal comments line 8,s m/s m hPa 26 | Data section,79200,0,30,10176 27 | Data section,79210,44,74,10125 28 | Data section,79220,37,105,10088 29 | -------------------------------------------------------------------------------- /tests/test_outputs/test_1001_cb_rewritten.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10.0 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1.0 -1.0 -1.0 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2010.csv: -------------------------------------------------------------------------------- 1 | 43,2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7,13 7 | 1969 1 1,2002 10 31 8 | 20.0,10.0 9 | 9 10 | 1 11 | 0.000000 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1.0 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1.0 20 | 2000.0 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0.000000,1013.300000 45 | -3.000000,-2.600000,-2.300000,2.000000,4.800000,4.600000,4.500000,3.000000,-0.900000 46 | 20.000000,55.300000 47 | -15.100000,-4.200000,6.900000,12.800000,14.700000,20.000000,21.500000,18.000000,8.200000 48 | 40.000000,2.300000 49 | -29.000000,-15.200000,3.400000,28.200000,41.000000,39.100000,17.900000,8.000000,0.100000 50 | 60.000000,0.220000 51 | -10.000000,8.400000,31.200000,59.900000,78.500000,77.700000,47.000000,17.600000,16.000000 52 | 80.000000,0.010000 53 | 200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000,200.000000 54 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2010.na: -------------------------------------------------------------------------------- 1 | 43 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7 13 7 | 1969 1 1 2002 10 31 8 | 10.0 20.0 9 | 9 10 | 1 11 | 0 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1.0 16 | 200.0 17 | Mean zonal wind (m/s) 18 | 1 19 | 1.0 20 | 2000.0 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0 1013.3 45 | -3 -2.6 -2.3 2 4.8 4.6 4.5 3 -0.9 46 | 20 55.3 47 | -15.1 -4.2 6.9 12.8 14.7 20 21.5 18 8.2 48 | 40 2.3 49 | -29 -15.2 3.4 28.2 41 39.1 17.9 8 0.1 50 | 60 0.22 51 | -10 8.4 31.2 59.9 78.5 77.7 47 17.6 16 52 | 80 0.01 53 | 200 200 200 200 200 200 200 200 200 54 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2110.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 1 1 2002 10 31 8 | 0.0 10.0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 2 16 | 1.0 1.0 17 | 100.0 2000.0 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.3 40 | 20 -2.3 41 | 40 4.8 42 | 60 4.5 43 | 80 -0.9 44 | 10 4 265 45 | 30 31.5 46 | 40 28 47 | 50 21.6 48 | 60 14.9 49 | 20 3 55.3 50 | 40 14.7 51 | 60 21.5 52 | 70 18 53 | 30 7 12 54 | 20 -9.3 55 | 30 -6.8 56 | 40 15 57 | 50 22 58 | 60 22.7 59 | 70 18.2 60 | 80 12 61 | 40 5 2.3 62 | 0 -29 63 | 20 3.4 64 | 30 28.2 65 | 50 39.1 66 | 80 0.1 67 | 50 8 0.8 68 | 0 -21.9 69 | 10 -4 70 | 20 19.9 71 | 30 40.8 72 | 40 55 73 | 50 50.1 74 | 60 25 75 | 70 8.1 76 | 60 9 0.22 77 | 0 -10 78 | 10 8.4 79 | 20 31.2 80 | 30 59.9 81 | 40 78.5 82 | 50 77.7 83 | 60 47 84 | 70 17.6 85 | 80 16 86 | 70 4 0.05 87 | 0 1.2 88 | 30 63.3 89 | 60 61.2 90 | 70 35 91 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2160.na: -------------------------------------------------------------------------------- 1 | 47 2160 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Chemiluminescence NOX analyser. UV absorption API 400 ozone analyser. 5 | NERC Data Grid (NDG) project 6 | 10 13 7 | 2002 10 10 2002 10 31 8 | 10.0 9 | 13.0 10 | Time (minutes) 11 | Site name 12 | 2 13 | 1.0 1.0 14 | 100.0 100.0 15 | NOX volume mixing ratio (ppbv) 16 | Ozone volume mixing ratio (ppbv) 17 | 5 18 | 2 19 | 1.0 1.0 1.0 20 | 100.0 1000.0 1000.0 21 | 10 7 22 | zzzzzzzzzz 23 | zzzzzzz 24 | Number of measurements 25 | Longitude (degrees from Greenwich meridian) 26 | Latitude (degrees North) 27 | Date 28 | Local time at t = 0 29 | 7 30 | Example of FFI 2160. 31 | This example illustrating NASA Ames file format index 2160 is entirely fictitious. Data 32 | have been made up for the purpose of illustrating the use of the format. They consist in 33 | imaginary simultaneous measurements of tropospheric NOX and ozone mixing ratios at three 34 | sites. A time series is provided for each site and each species. Measurements are 35 | supposed to have taken place every 10 minutes. The 4th and 5th auxiliary variables give 36 | the time of the first measurement of the series. 37 | 10 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | 48 | Belbroughton 49 | 7 -2.148 52.398 50 | 22-10-2002 51 | 12 h 15 52 | 0 2.2 35 53 | 10 2.3 35 54 | 20 4.5 35.9 55 | 30 4.8 100 56 | 40 4.3 36 57 | 50 4.2 35.9 58 | 60 4 35.9 59 | Coventry 60 | 4 -1.517 52.4 61 | 10-10-2002 62 | 04 h 20 63 | 0 100 34 64 | 10 1.9 34.1 65 | 20 2.2 35 66 | 30 2.8 35 67 | Kidderminster 68 | 10 -2.258 52.364 69 | 15-10-2002 70 | 16 h 35 71 | 0 3.9 35 72 | 10 3.8 35.1 73 | 20 5.4 36 74 | 30 5.9 36.2 75 | 40 100 36.8 76 | 50 6.4 37 77 | 60 6.4 36.9 78 | 70 6 37 79 | 80 5.5 36.8 80 | 90 5.3 36.5 81 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2310.csv: -------------------------------------------------------------------------------- 1 | 39,2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11,13 7 | 1969 1 1,2002 10 31 8 | 0.0 9 | Altitude (km) 10 | Latitude (degrees North) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 4 16 | 1.0,1.0,1.0,1.0 17 | 100.0,1000.0,1000.0,2000.0 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0.000000,7.000000,20.000000,10.000000,1013.300000 41 | -2.300000,2.000000,4.800000,4.600000,4.500000,3.000000,-0.900000 42 | 10.000000,4.000000,50.000000,10.000000,265.000000 43 | 21.600000,14.900000,7.500000,3.000000 44 | 20.000000,9.000000,0.000000,10.000000,55.300000 45 | -15.100000,-4.200000,6.900000,12.800000,14.700000,20.000000,21.500000,18.000000,8.200000 46 | 30.000000,3.000000,0.000000,30.000000,12.000000 47 | -29.100000,-6.800000,22.700000 48 | 50.000000,4.000000,10.000000,20.000000,0.800000 49 | -4.000000,40.800000,50.100000,8.100000 50 | 60.000000,9.000000,0.000000,10.000000,0.220000 51 | -10.000000,8.400000,31.200000,59.900000,78.500000,77.700000,47.000000,17.600000,16.000000 52 | 70.000000,4.000000,0.000000,10.000000,0.052000 53 | 1.200000,17.600000,39.900000,63.300000 54 | -------------------------------------------------------------------------------- /tests/test_outputs/test_2310.na: -------------------------------------------------------------------------------- 1 | 39 2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11 13 7 | 1969 1 1 2002 10 31 8 | 0.0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1.0 13 | 200.0 14 | Mean zonal wind (m/s) 15 | 4 16 | 1.0 1.0 1.0 1.0 17 | 100.0 1000.0 1000.0 2000.0 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0 7 20 10 1013.3 41 | -2.3 2 4.8 4.6 4.5 3 -0.9 42 | 10 4 50 10 265 43 | 21.6 14.9 7.5 3 44 | 20 9 0 10 55.3 45 | -15.1 -4.2 6.9 12.8 14.7 20 21.5 18 8.2 46 | 30 3 0 30 12 47 | -29.1 -6.8 22.7 48 | 50 4 10 20 0.8 49 | -4 40.8 50.1 8.1 50 | 60 9 0 10 0.22 51 | -10 8.4 31.2 59.9 78.5 77.7 47 17.6 16 52 | 70 4 0 10 0.052 53 | 1.2 17.6 39.9 63.3 54 | -------------------------------------------------------------------------------- /tests/test_outputs/test_3010.csv: -------------------------------------------------------------------------------- 1 | 41,3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12,13 7 | 1980 6 21,2002 10 31 8 | 0.0,-10.0,30.0 9 | 7,4 10 | 1,1 11 | -90.000000 12 | 50.000000 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1.0 18 | 1000.0 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172.000000 43 | 193.000000,211.000000,224.000000,229.000000,235.000000,245.000000,270.000000 44 | 221.000000,230.000000,254.000000,272.000000,281.000000,289.000000,300.000000 45 | 220.000000,229.000000,244.000000,253.000000,260.000000,263.000000,278.000000 46 | 195.000000,208.000000,217.000000,219.000000,223.000000,230.000000,240.000000 47 | 355.000000 48 | 270.000000,245.000000,235.000000,229.000000,224.000000,211.000000,193.000000 49 | 300.000000,289.000000,281.000000,272.000000,254.000000,230.000000,221.000000 50 | 278.000000,263.000000,260.000000,253.000000,244.000000,229.000000,220.000000 51 | 240.000000,230.000000,223.000000,219.000000,217.000000,208.000000,195.000000 52 | -------------------------------------------------------------------------------- /tests/test_outputs/test_3010.na: -------------------------------------------------------------------------------- 1 | 41 3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12 13 7 | 1980 6 21 2002 10 31 8 | 30.0 -10.0 0.0 9 | 7 4 10 | 1 1 11 | -90 12 | 50 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1.0 18 | 1000.0 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172 43 | 193 211 224 229 235 245 270 44 | 221 230 254 272 281 289 300 45 | 220 229 244 253 260 263 278 46 | 195 208 217 219 223 230 240 47 | 355 48 | 270 245 235 229 224 211 193 49 | 300 289 281 272 254 230 221 50 | 278 263 260 253 244 229 220 51 | 240 230 223 219 217 208 195 52 | -------------------------------------------------------------------------------- /tests/test_parse_config.py: -------------------------------------------------------------------------------- 1 | from nappy.utils.parse_config import (getConfigDict, getAnnotationsConfigDict, 2 | getLocalAttributesConfigDict) 3 | 4 | 5 | def test_getConfigDict(): 6 | cd = getConfigDict() 7 | assert cd["main"]["default_float_format"] == "%.10g" 8 | 9 | 10 | def test_getAnnotationsConfigDict(): 11 | ad = getAnnotationsConfigDict() 12 | assert ad["AMISS"] == "Missing values for each auxiliary variable" 13 | 14 | 15 | def test_getLocalAttributesConfigDict(): 16 | 17 | lad = getLocalAttributesConfigDict() 18 | assert lad["na_attributes"]["ORG"] == \ 19 | "Data held at British Atmospheric Data Centre (BADC), Rutherford Appleton Laboratory, UK." 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/test_var_units.py: -------------------------------------------------------------------------------- 1 | """ 2 | test_var_units.py 3 | =============== 4 | 5 | Tests for the var_and_units_callback option 6 | """ 7 | 8 | import os 9 | import re 10 | import pytest 11 | 12 | import nappy 13 | 14 | from .common import data_files 15 | 16 | 17 | 18 | infile = os.path.join(data_files, "2010b.na") 19 | 20 | def custom_parser(string): 21 | """Custom parser for separating variable name from units 22 | Name = Non-greedy match until opening parenthesis + 23 | remainder after closing parenthesis 24 | Units = Greedy match inside parentheses 25 | """ 26 | match = re.match(r'(?P.*?)\((?P.*)\)(?P.*)', string) 27 | if match: 28 | return (match['name']+match['remainder'], match['units']) 29 | else: 30 | return string, '' 31 | 32 | 33 | # Expected output without custom parser - PV units incorrect 34 | expected1 = [('Geopotential height', 'gpm'), 35 | ('Temperature', 'K'), 36 | ('Potential vorticity (K m**2/ )', 'kg s')] 37 | 38 | # Expected output with custom parser - PV units correct 39 | expected2 = expected1.copy() 40 | expected2[2] = ('Potential vorticity', 'K m**2/(kg s)') 41 | 42 | 43 | @pytest.mark.parametrize( 44 | "parser,expected", 45 | [(None, expected1), 46 | (custom_parser, expected2)]) 47 | def test_var_units_callback(parser, expected): 48 | """test the callback function for parsing VNAMEs""" 49 | fin = nappy.openNAFile(infile, var_and_units_callback=parser) 50 | variables = [(v[0], v[1]) for v in fin.getVariables()] 51 | assert variables == expected 52 | 53 | 54 | def test_var_units_pattern(): 55 | """test the possibility to set the regex that is used by default to parse VNAMEs""" 56 | fin = nappy.openNAFile(infile) 57 | default_re = re.compile(r"^\s*(.*)\((.+?)\)(.*)\s*$") 58 | assert fin.var_and_units_pattern == default_re 59 | new_re = re.compile(r'(?P.*)\;\ (?P.*)\;\ (?P.*)', re.UNICODE) 60 | fin.var_and_units_pattern = new_re 61 | assert fin.var_and_units_pattern == new_re 62 | 63 | invalid = ("a string", 555, 3.142, lambda x: x*2) 64 | for i in invalid: 65 | with pytest.raises(TypeError): 66 | fin.var_and_units_pattern = i 67 | -------------------------------------------------------------------------------- /tests/test_xarray_utils.py: -------------------------------------------------------------------------------- 1 | import os 2 | import numpy as np 3 | import xarray as xr 4 | 5 | from .common import MINI_BADC_DIR 6 | from nappy.nc_interface.xarray_to_na import XarrayDatasetToNA 7 | 8 | from nappy.nc_interface.xarray_utils import (getBestName, getMissingValue, isUniformlySpaced, 9 | areAxesIdentical, isAxisRegularlySpacedSubsetOf) 10 | 11 | temp_nc = MINI_BADC_DIR / "cru/data/cru_ts/cru_ts_4.04/data/tmp/cru_ts4.04.1901.2019.tmp.dat.nc" 12 | wet_nc = MINI_BADC_DIR / "cru/data/cru_ts/cru_ts_4.04/data/wet/cru_ts4.04.1901.2019.wet.dat.nc" 13 | 14 | 15 | def test_getBestName(load_ceda_test_data): 16 | ds = xr.open_dataset(temp_nc) 17 | name = getBestName(ds['tmp']) 18 | 19 | assert name == "near-surface temperature (degrees Celsius)" 20 | 21 | 22 | def test_getMissingValue(load_ceda_test_data): 23 | ds = xr.open_dataset(temp_nc) 24 | miss = getMissingValue(ds['tmp']) 25 | 26 | assert np.isclose(miss, 9.96921e+36) 27 | 28 | 29 | def test_isUniformlySpaced(load_ceda_test_data): 30 | ds = xr.open_dataset(temp_nc) 31 | assert isUniformlySpaced(ds['lon']) 32 | 33 | 34 | def test_areAxesIdentical(load_ceda_test_data): 35 | temp = xr.open_dataset(temp_nc) 36 | wet = xr.open_dataset(wet_nc) 37 | 38 | for dim in ('time', 'lat', 'lon'): 39 | assert areAxesIdentical(temp.coords[dim], wet.coords[dim]) 40 | 41 | assert areAxesIdentical(temp.lon, temp.lat) == False 42 | 43 | 44 | def test_isAxisRegularlySpacedSubsetOf(load_ceda_test_data): 45 | temp = xr.open_dataset(temp_nc) 46 | 47 | ax1, ax2 = temp.lon, temp.lon[::2] 48 | assert isAxisRegularlySpacedSubsetOf(ax2, ax1) 49 | 50 | ax1, ax2 = temp.lat, temp.lat[::2] 51 | assert isAxisRegularlySpacedSubsetOf(ax2, ax1) 52 | 53 | ax1, ax2 = temp.time, temp.time[::2] 54 | assert isAxisRegularlySpacedSubsetOf(ax2, ax1) 55 | 56 | ax1, ax2 = temp.lon, temp.lon[:-2] 57 | assert isAxisRegularlySpacedSubsetOf(ax2, ax1) == False 58 | 59 | -------------------------------------------------------------------------------- /tests/testdata/1001.na: -------------------------------------------------------------------------------- 1 | 25 1001 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 7 | 2000 9 20 2003 4 10 8 | 10 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 11 | 0.1 1.0 0.1 12 | -1 -1 -1 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/testdata/1001_cb.na: -------------------------------------------------------------------------------- 1 | 25 1001 {NLHEAD FFI} 2 | Bryan Lawrence 3 | Physics and Astronomy, University of Canterbury {INFO} 4 | Data: NZMS Radiosonde Ascent 5 | Project: Gravity Wave Processes and their Role in Climate 6 | 1 1 {IVOL NVOL} 7 | 2000 9 20 2003 4 10 8 | 10 9 | Time in UT Seconds from 0000 hours on the data date 10 | 3 {NV} 11 | 0.1 1.0 0.1 12 | -1 -1 -1 13 | Ascent Rate (m/s) 14 | Height above MSL (m) 15 | Pressure (hPa) 16 | 0 {NNCOML} 17 | 8 18 | Location : 36.79 S 174.63 E 30 m 19 | RS-number: 002104615 20 | Ground check : Ref RS Corr 21 | Pressure : 1018.0 1017.6 0.4 22 | Temperature : 21.6 21.8 -0.2 23 | Humidity : 0 1 -1 24 | uts asrat hght press 25 | s m/s m hPa 26 | 79200 0 30 10176 27 | 79210 44 74 10125 28 | 79220 37 105 10088 29 | -------------------------------------------------------------------------------- /tests/testdata/1020b.na: -------------------------------------------------------------------------------- 1 | 41 1020 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | BISA 1-D stratospheric model 5 | NERC Data Grid (NDG) project 6 | 5 13 7 | 1976 01 01 2002 10 30 8 | 5 9 | 10 10 | Altitude (km) 11 | 4 12 | 1.E+12 1.E+06 1.E+04 1 13 | 1.E+08 1.E+08 1.E+08 10000 14 | Molecular oxygen concentration (cm-3) 15 | Ozone concentration (cm-3) 16 | O(3P) concentration (cm-3) 17 | O(1D) concentration (cm-3) 18 | 0 19 | 10 20 | Example of FFI 1020 (b). 21 | This example illustrating NASA Ames file format index 1020 is based on results 22 | of a 1-D model quoted in G. Brasseur and S. Solomon, Aeronomy of the Middle 23 | Atmosphere, Reidel, 1984 (p. 211). The first date on line 7 (1st of January 24 | 1976) is fictitious since the parameters are yearly averages. We have signalled 25 | the absence of calculated values at 30 and 105 km by using the "missing value" 26 | flags (see line 13). The missing value flag is also used to give account for the 27 | fact that there is virtually no O(1D) present below the altitude of 20 km. Note 28 | that this example is similar to Example 1020 (a) but has no auxiliary dependent 29 | variable. 30 | 11 31 | The files included in this data set illustrate each of the 9 NASA Ames file 32 | format indices (FFI). A detailed description of the NASA Ames format can be 33 | found on the Web site of the British Atmospheric Data Centre (BADC) at 34 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 35 | E-mail contact: badc@rl.ac.uk 36 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 37 | Exchange, Version 1.3, 1998. This work can be found at 38 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 39 | and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 10 43 | 1.7E+06 8.1E+05 3.6E+05 1.6E+05 1.0E+08 3.5E+04 1.7E+04 8900 4800 2600 44 | 1.0E+06 1.1E+06 2.9E+06 3.2E+06 1.0E+08 2.0E+06 1.0E+06 3.2E+05 1.0E+05 3.2E+04 45 | 1.3 5.5 94 670 1.0E+08 2.4E+04 1.2E+05 3.7E+05 6.5E+05 8.4E+05 46 | 10000 10000 0.9 5 10000 100 330 600 610 440 47 | 60 48 | 1500 820 420 200 90 37 12.5 4.7 1.9 1.E+08 49 | 1000 3200 1000 320 140 100 110 13 1.7 1.E+08 50 | 6.5E+05 5.0E+05 4.0E+05 3.8E+05 1.4E+06 3.0E+06 3.0E+07 3.3E+07 3.2E+07 1.E+08 51 | 260 150 96 67 70 120 420 490 1200 10000 52 | -------------------------------------------------------------------------------- /tests/testdata/2010.na: -------------------------------------------------------------------------------- 1 | 43 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 7 13 7 | 1969 01 01 2002 10 31 8 | 10 20 9 | 9 10 | 1 11 | 0 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1 16 | 200 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000 21 | Pressure (hPa) 22 | 9 23 | Example of FFI 2010 (b). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | From line 10 (NXDEF = 1) we know that the latitude points are defined by 30 | X(i) = X(1) + (i-1)DX1 for i = 1, ..., NX 31 | with X(1) = 0 deg (line 11), DX1 = 10 deg (line 8) and NX = 9 (line 9). 32 | 11 33 | The files included in this data set illustrate each of the 9 NASA Ames file 34 | format indices (FFI). A detailed description of the NASA Ames format can be 35 | found on the Web site of the British Atmospheric Data Centre (BADC) at 36 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 37 | E-mail contact: badc@rl.ac.uk 38 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 39 | Exchange, Version 1.3, 1998. This work can be found at 40 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 41 | and a copy of it at 42 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 43 | 44 | 0 1013.3 45 | -3.0 -2.6 -2.3 2.0 4.8 4.6 4.5 3.0 -0.9 46 | 20 55.30 47 | -15.1 -4.2 6.9 12.8 14.7 20.0 21.5 18.0 8.2 48 | 40 2.30 49 | -29.0 -15.2 3.4 28.2 41.0 39.1 17.9 8.0 0.1 50 | 60 0.22 51 | -10.0 8.4 31.2 59.9 78.5 77.7 47.0 17.6 16.0 52 | 80 0.01 53 | 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 54 | -------------------------------------------------------------------------------- /tests/testdata/2010G&H.na: -------------------------------------------------------------------------------- 1 | 31 2010 2 | Mertz, Fred 3 | Pacific University 4 | NMC analyzed grid data interpolated to DC-8 flight path 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 01 16 1991 01 16 8 | 0.0 30.0 9 | 8 10 | 8 11 | 250 200 150 100 70 50 30 10 12 | Pressure levels (mb) 13 | Time (UT seconds) from 00 hours on launch date 14 | 3 15 | 1.0 0.1 1.0E-09 16 | 99999 9999 9999999 17 | Geopotential height (gpm) 18 | Temperature (K) 19 | Potential vorticity (K m**2/(kg s)) 20 | 2 21 | 1.0 0.1 22 | 99999 9999 23 | Geopotential height (gpm) of the DC-8 24 | Temperature (K) at DC-8's position 25 | 0 26 | 5 27 | The geopotential height, temperature, and potential vorticity 28 | values were interpolated from NMC analyses to a vertical cross- 29 | section along the DC-8 flight path. 30 | NOTE: PRELIMINARY data. 31 | 250mb 200mb 150mb 100mb 70mb 50mb 30mb 10mb 32 | 3350 1127 2682 33 | 9994 11395 13219 15762 17970 20000 23016 29411 34 | 2150 2154 2156 2115 2082 2042 1991 2021 35 | 4119 7050 8030 11300 16200 23500 50300 386000 36 | 3380 1289 2671 37 | 9992 11393 13217 15760 17968 19998 23013 29408 38 | 2151 2154 2156 2115 2081 2041 1990 2020 39 | 4128 7050 8040 11300 16200 23500 50400 386000 40 | 3410 1479 2653 41 | 9990 11392 13215 15759 17966 19996 23010 29404 42 | 2151 2154 2156 2115 2081 2041 1990 2020 43 | 4138 7060 8050 11400 16200 23500 50500 386000 44 | -------------------------------------------------------------------------------- /tests/testdata/2010a.na: -------------------------------------------------------------------------------- 1 | 41 2010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 6 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | 9 10 | 9 11 | 0 10 20 40 50 60 70 80 90 12 | Latitude (degrees North) 13 | Altitude (km) 14 | 1 15 | 1 16 | 200 17 | Mean zonal wind (m/s) 18 | 1 19 | 1 20 | 2000 21 | Pressure (hPa) 22 | 7 23 | Example of FFI 2010 (a). 24 | This example illustrating NASA Ames file format index 2010 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere. The first date on line 7 (1st of 28 | January 1969) is fictitious. Note that the latitude grid is irregular in this 29 | example, which is reflected by the fact that DX1 = 0 (see line 8). 30 | 11 31 | The files included in this data set illustrate each of the 9 NASA Ames file 32 | format indices (FFI). A detailed description of the NASA Ames format can be 33 | found on the Web site of the British Atmospheric Data Centre (BADC) at 34 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 35 | E-mail contact: badc@rl.ac.uk 36 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 37 | Exchange, Version 1.3, 1998. This work can be found at 38 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 39 | and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 0 1013.3 43 | -3.0 -2.6 -2.3 2.0 4.6 4.5 3.0 -0.9 200.0 44 | 10 265.00 45 | -1.0 5.5 21.7 31.5 21.6 14.9 7.5 3.0 200.0 46 | 20 55.30 47 | -15.1 -4.2 6.9 12.8 20.0 21.5 18.0 8.2 200.0 48 | 30 12.00 49 | -29.1 20.0 -9.3 -6.8 22.0 22.7 18.2 12.0 200.0 50 | 40 2.30 51 | -29.0 -15.2 3.4 28.2 39.1 17.9 8.0 0.1 200.0 52 | 50 0.80 53 | -21.9 -4.0 19.9 40.8 50.1 25.0 8.1 0.0 200.0 54 | 60 0.22 55 | -10.0 8.4 31.2 59.9 77.7 47.0 17.6 16.0 200.0 56 | 70 0.05 57 | 1.2 17.6 39.9 63.3 74.1 61.2 35.0 15.3 200.0 58 | 80 0.01 59 | 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 200.0 60 | -------------------------------------------------------------------------------- /tests/testdata/2010b.na: -------------------------------------------------------------------------------- 1 | 31 2010 2 | Mertz, Fred 3 | Pacific University 4 | NMC analyzed grid data interpolated to DC-8 flight path 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 01 16 1991 01 16 8 | 0.0 30.0 9 | 8 10 | 8 11 | 250 200 150 100 70 50 30 10 12 | Pressure levels (mb) 13 | Time (UT seconds) from 00 hours on launch date 14 | 3 15 | 1.0 0.1 1.0E-09 16 | 99999 9999 9999999 17 | Geopotential height (gpm) 18 | Temperature (K) 19 | Potential vorticity (K m**2/(kg s)) 20 | 2 21 | 1.0 0.1 22 | 99999 9999 23 | Geopotential height (gpm) of the DC-8 24 | Temperature (K) at DC-8's position 25 | 0 26 | 5 27 | The geopotential height, temperature, and potential vorticity 28 | values were interpolated from NMC analyses to a vertical cross- 29 | section along the DC-8 flight path. 30 | NOTE: PRELIMINARY data. 31 | 250mb 200mb 150mb 100mb 70mb 50mb 30mb 10mb 32 | 3350 1127 2682 33 | 9994 11395 13219 15762 17970 20000 23016 29411 34 | 2150 2154 2156 2115 2082 2042 1991 2021 35 | 4119 7050 8030 11300 16200 23500 50300 386000 36 | 3380 1289 2671 37 | 9992 11393 13217 15760 17968 19998 23013 29408 38 | 2151 2154 2156 2115 2081 2041 1990 2020 39 | 4128 7050 8040 11300 16200 23500 50400 386000 40 | 3410 1479 2653 41 | 9990 11392 13215 15759 17966 19996 23010 29404 42 | 2151 2154 2156 2115 2081 2041 1990 2020 43 | 4138 7060 8050 11400 16200 23500 50500 386000 44 | -------------------------------------------------------------------------------- /tests/testdata/2110.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 2 16 | 1 1 17 | 100 2000 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.30 40 | 20.0 -2.3 41 | 40.0 4.8 42 | 60.0 4.5 43 | 80.0 -0.9 44 | 10 4 265.00 45 | 30.0 31.5 46 | 40.0 28.0 47 | 50.0 21.6 48 | 60.0 14.9 49 | 20 3 55.30 50 | 40.0 14.7 51 | 60.0 21.5 52 | 70.0 18.0 53 | 30 7 12.00 54 | 20.0 -9.3 55 | 30.0 -6.8 56 | 40.0 15.0 57 | 50.0 22.0 58 | 60.0 22.7 59 | 70.0 18.2 60 | 80.0 12.0 61 | 40 5 2.30 62 | 0.0 -29.0 63 | 20.0 3.4 64 | 30.0 28.2 65 | 50.0 39.1 66 | 80.0 0.1 67 | 50 8 0.80 68 | 0.0 -21.9 69 | 10.0 -4.0 70 | 20.0 19.9 71 | 30.0 40.8 72 | 40.0 55.0 73 | 50.0 50.1 74 | 60.0 25.0 75 | 70.0 8.1 76 | 60 9 0.22 77 | 0.0 -10.0 78 | 10.0 8.4 79 | 20.0 31.2 80 | 30.0 59.9 81 | 40.0 78.5 82 | 50.0 77.7 83 | 60.0 47.0 84 | 70.0 17.6 85 | 80.0 16.0 86 | 70 4 0.05 87 | 0.0 1.2 88 | 30.0 63.3 89 | 60.0 61.2 90 | 70.0 35.0 91 | -------------------------------------------------------------------------------- /tests/testdata/2110G&H.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | Mertz, Fred 3 | Pacific University 4 | ER-2 Microwave Temperature Profiler (MTP) 5 | TAHITI OZONE PROJECT 6 | 1 1 7 | 1991 1 16 1991 1 16 8 | 0.0 0.0 9 | Remote sensing "applicable altitude" (meters) 10 | Elapsed UT seconds from 0 hours on day given in DATE 11 | 2 12 | 0.1 0.1 13 | 9999 9999 14 | Brightness temperature (C) 15 | Potential temperature (K) 16 | 15 17 | 1.0 1.0 1.0 1.0 1.0 0.1 1.0 0.1 0.1 0.01 0.001 0.1 0.1 1.0 1.0 18 | 99 99 99 99 99999 999 999 9999 9999 9999 99999 999 999 999 999 19 | Number of "applicable altitudes" recorded in subsequent data records 20 | Hours (UT) 21 | Minutes (UT) 22 | Seconds (UT) 23 | Pressure altitude of ER-2 (ft) 24 | Aircraft pitch (deg) 25 | Aircraft roll (deg) 26 | Horizon brightness temperature (C), ave. of Chan 1 & 2 brightness temp. 27 | Potential temperature (K) from above horizon temp. and ER-2 press.alt. 28 | dT/dz (K/km), from Chan 1 & 2 blended Temperature profile 29 | dTHETA/dp (K/mb); THETA is potential temperature 30 | dT/dz (K/km) from Chan 1 31 | dT/dz (K/km) from Chan 2 32 | Peak downward acceleration (centi-G's) 33 | Peak upward acceleration (centi-G's) 34 | 0 35 | 3 36 | The brightness temperatures are approximately equal to air 37 | temperatures at ER-2 altitudes. 38 | 39 | 29589 5 8 13 9 44890 24 1 -728 3459 40 | 440 996 49 34 53 9 41 | 14060 -729 3516 42 | 13940 -728 3499 43 | 13810 -731 3474 44 | 13680 -728 3459 45 | 13560 -740 3421 46 | 29603 6 8 13 23 45170 24 2 -712 3500 47 | -17 -679 -11 -4 56 10 48 | 15030 -721 3688 49 | 14780 -719 3650 50 | 14770 -718 3640 51 | 14760 -717 3630 52 | 14750 -716 3620 53 | 14740 -715 3610 -------------------------------------------------------------------------------- /tests/testdata/2110a.na: -------------------------------------------------------------------------------- 1 | 38 2110 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 9 13 7 | 1969 01 01 2002 10 31 8 | 0 10 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 2 16 | 1 1 17 | 100 2000 18 | Number of latitude points 19 | Pressure (hPa) 20 | 6 21 | Example of FFI 2110. 22 | This example illustrating NASA Ames file format index 2110 is based on results 23 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 24 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 25 | wind distribution in the winter hemisphere as a function of latitude and height. 26 | The first date on line 7 (1st of January 1969) is fictitious. 27 | 11 28 | The files incuded in this data set illustrate each of the 9 NASA Ames file 29 | format indices (FFI). A detailed description of the NASA Ames format can be 30 | found on the Web site of the British Atmospheric Data Centre (BADC) at 31 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 32 | E-mail contact: badc@rl.ac.uk 33 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data 34 | Exchange, Version 1.3, 1998. This work can be found at 35 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html 36 | and a copy of it at 37 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 38 | 39 | 0 4 1013.30 40 | 20.0 -2.3 41 | 40.0 4.8 42 | 60.0 4.5 43 | 80.0 -0.9 44 | 10 4 265.00 45 | 30.0 31.5 46 | 40.0 28.0 47 | 50.0 21.6 48 | 60.0 14.9 49 | 20 3 55.30 50 | 40.0 14.7 51 | 60.0 21.5 52 | 70.0 18.0 53 | 30 7 12.00 54 | 20.0 -9.3 55 | 30.0 -6.8 56 | 40.0 15.0 57 | 50.0 22.0 58 | 60.0 22.7 59 | 70.0 18.2 60 | 80.0 12.0 61 | 40 5 2.30 62 | 0.0 -29.0 63 | 20.0 3.4 64 | 30.0 28.2 65 | 50.0 39.1 66 | 80.0 0.1 67 | 50 8 0.80 68 | 0.0 -21.9 69 | 10.0 -4.0 70 | 20.0 19.9 71 | 30.0 40.8 72 | 40.0 55.0 73 | 50.0 50.1 74 | 60.0 25.0 75 | 70.0 8.1 76 | 60 9 0.22 77 | 0.0 -10.0 78 | 10.0 8.4 79 | 20.0 31.2 80 | 30.0 59.9 81 | 40.0 78.5 82 | 50.0 77.7 83 | 60.0 47.0 84 | 70.0 17.6 85 | 80.0 16.0 86 | 70 4 0.05 87 | 0.0 1.2 88 | 30.0 63.3 89 | 60.0 61.2 90 | 70.0 35.0 91 | -------------------------------------------------------------------------------- /tests/testdata/2160.na: -------------------------------------------------------------------------------- 1 | 47 2160 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Chemiluminescence NOX analyser. UV absorption API 400 ozone analyser. 5 | NERC Data Grid (NDG) project 6 | 10 13 7 | 2002 10 10 2002 10 31 8 | 10 9 | 13 10 | Time (minutes) 11 | Site name 12 | 2 13 | 1 1 14 | 100 100 15 | NOX volume mixing ratio (ppbv) 16 | Ozone volume mixing ratio (ppbv) 17 | 5 18 | 2 19 | 1 1 1 20 | 100 1000 1000 21 | 10 7 22 | zzzzzzzzzz 23 | zzzzzzz 24 | Number of measurements 25 | Longitude (degrees from Greenwich meridian) 26 | Latitude (degrees North) 27 | Date 28 | Local time at t = 0 29 | 7 30 | Example of FFI 2160. 31 | This example illustrating NASA Ames file format index 2160 is entirely fictitious. Data 32 | have been made up for the purpose of illustrating the use of the format. They consist in 33 | imaginary simultaneous measurements of tropospheric NOX and ozone mixing ratios at three 34 | sites. A time series is provided for each site and each species. Measurements are 35 | supposed to have taken place every 10 minutes. The 4th and 5th auxiliary variables give 36 | the time of the first measurement of the series. 37 | 10 38 | The files included in this data set illustrate each of the 9 NASA Ames file format 39 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 40 | site of the British Atmospheric Data Centre (BADC) at 41 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 42 | E-mail contact: badc@rl.ac.uk 43 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 44 | Version 1.3, 1998. This work can be found at 45 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 46 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 47 | 48 | Belbroughton 49 | 7 -2.148 52.398 50 | 22-10-2002 51 | 12 h 15 52 | 0 2.2 35.0 53 | 10 2.3 35.0 54 | 20 4.5 35.9 55 | 30 4.8 100.0 56 | 40 4.3 36.0 57 | 50 4.2 35.9 58 | 60 4.0 35.9 59 | Coventry 60 | 4 -1.517 52.4 61 | 10-10-2002 62 | 04 h 20 63 | 0 100.0 34.0 64 | 10 1.9 34.1 65 | 20 2.2 35.0 66 | 30 2.8 35.0 67 | Kidderminster 68 | 10 -2.258 52.364 69 | 15-10-2002 70 | 16 h 35 71 | 0 3.9 35.0 72 | 10 3.8 35.1 73 | 20 5.4 36.0 74 | 30 5.9 36.2 75 | 40 100.0 36.8 76 | 50 6.4 37.0 77 | 60 6.4 36.9 78 | 70 6 37.0 79 | 80 5.5 36.8 80 | 90 5.3 36.5 81 | -------------------------------------------------------------------------------- /tests/testdata/2310.na: -------------------------------------------------------------------------------- 1 | 39 2310 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Anemometer measurements averaged over longitude 5 | NERC Data Grid (NDG) project 6 | 11 13 7 | 1969 01 01 2002 10 31 8 | 0 9 | Latitude (degrees North) 10 | Altitude (km) 11 | 1 12 | 1 13 | 200 14 | Mean zonal wind (m/s) 15 | 4 16 | 1 1 1 1 17 | 100 1000 1000 2000 18 | Number of latitude points 19 | First latitude point (degrees North) 20 | Latitude interval (degrees) 21 | Pressure (hPa) 22 | 6 23 | Example of FFI 2310. 24 | This example illustrating NASA Ames file format index 2310 is based on results 25 | from Murgatroyd (1969) as displayed in Brasseur and Solomon, Aeronomy of the 26 | Middle Atmosphere, Reidel, 1984 (p.36). It is representative of the mean zonal 27 | wind distribution in the winter hemisphere as a function of latitude and height. 28 | The first date on line 7 (1st of January 1969) is fictitious. 29 | 10 30 | The files included in this data set illustrate each of the 9 NASA Ames file format 31 | indices (FFI). A detailed description of the NASA Ames format can be found on the 32 | Web site of the British Atmospheric Data Centre (BADC) at 33 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 34 | E-mail contact: badc@rl.ac.uk 35 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 36 | Version 1.3, 1998. This work can be found at 37 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 38 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 39 | 40 | 0 7 20 10 1013.3 41 | -2.3 2.0 4.8 4.6 4.5 3.0 -0.9 42 | 10 4 50 10 265.0 43 | 21.6 14.9 7.5 3.0 44 | 20 9 0 10 55.3 45 | -15.1 -4.2 6.9 12.8 14.7 20.0 21.5 18.0 8.2 46 | 30 3 0 30 12.0 47 | -29.1 -6.8 22.7 48 | 50 4 10 20 0.80 49 | -4.0 40.8 50.1 8.1 50 | 60 9 0 10 0.22 51 | -10.0 8.4 31.2 59.9 78.5 77.7 47.0 17.6 16.0 52 | 70 4 0 10 0.052 53 | 1.2 17.6 39.9 63.3 54 | -------------------------------------------------------------------------------- /tests/testdata/3010.na: -------------------------------------------------------------------------------- 1 | 41 3010 2 | De Rudder, Anne 3 | Rutherford Appleton Laboratory, Chilton OX11 0QX, UK - Tel.: +44 (0) 1235 445837 4 | Imaginary 2-D stratospheric radiative model 5 | NERC Data Grid (NDG) project 6 | 12 13 7 | 1980 06 21 2002 10 31 8 | 30 -10 0 9 | 7 4 10 | 1 1 11 | -90 12 | 50 13 | Latitude (degrees) 14 | Altitude (km) 15 | Day number 16 | 1 17 | 1 18 | 1000 19 | Temperature (K) 20 | 0 21 | 9 22 | Example of FFI 3010. 23 | This example illustrating NASA Ames file format index 3010 is entirely fictitious. 24 | Data have been made up for the purpose of illustrating the use of the format. They 25 | consist in an imaginary calculated temperature distribution over a latitude-altitude 26 | grid at the two solstices (21 June and 21 December). The grid is defined in lines 8, 27 | 9, 11 and 12. Latitude ranges from -90 to +90 degrees by intervals of 30 degrees. 28 | Altitude ranges from 50 to 20 km by negative increments of 10 km. 29 | The day number is counted from 1st of January = Day One. 30 | The year of the first date on line 7 (1980) has no particular meaning. 31 | 10 32 | The files included in this data set illustrate each of the 9 NASA Ames file format 33 | indices (FFI). A detailed description of the NASA Ames format can be found on the Web 34 | site of the British Atmospheric Data Centre (BADC) at 35 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/ 36 | E-mail contact: badc@rl.ac.uk 37 | Reference: S. E. Gaines and R. S. Hipskind, Format Specification for Data Exchange, 38 | Version 1.3, 1998. This work can be found at 39 | http://cloud1.arc.nasa.gov/solve/archiv/archive.tutorial.html and a copy of it at 40 | http://www.badc.rl.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 41 | 42 | 172 43 | 193 211 224 229 235 245 270 44 | 221 230 254 272 281 289 300 45 | 220 229 244 253 260 263 278 46 | 195 208 217 219 223 230 240 47 | 355 48 | 270 245 235 229 224 211 193 49 | 300 289 281 272 254 230 221 50 | 278 263 260 253 244 229 220 51 | 240 230 223 219 217 208 195 52 | -------------------------------------------------------------------------------- /tests/testdata/README.md: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). 2 | # This software may be distributed under the terms of the 3 | # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt 4 | 5 | Files in this `data_files` directory were taken from the BADC web site examples at: 6 | 7 | http://badc.nerc.ac.uk/help/formats/NASA-Ames/ 8 | 9 | or from "Format Specification for Data Exchange, Version 1.3 (Gaines and Hipskind, 1998)" a copy of which is at: 10 | 11 | http://badc.nerc.ac.uk/help/formats/NASA-Ames/G-and-H-June-1998.html 12 | -------------------------------------------------------------------------------- /tests/tests-na_badc_files.txt: -------------------------------------------------------------------------------- 1 | na2nc.py -i ../../nappy_test_files/bas-2b-o3_halley_20040301.na -o test_outputs/bas-2b-o3_halley_20040301.na.nc 2 | na2nc.py -i ../../nappy_test_files/bas-aerolaser-hcho_halley_20050105_v2.na -o test_outputs/bas-aerolaser-hcho_halley_20050105_v2.na.nc 3 | na2nc.py -i ../../nappy_test_files/cv-met-tower_capeverde_20080201.na -o test_outputs/cv-met-tower_capeverde_20080201.na.nc 4 | na2nc.py -i ../../nappy_test_files/cv-noxy_capeverde_20080301.na -o test_outputs/cv-noxy_capeverde_20080301.na.nc 5 | na2nc.py -i ../../nappy_test_files/leeds-dph_halley_20050110.na -o test_outputs/leeds-dph_halley_20050110.na.nc 6 | na2nc.py -i ../../nappy_test_files/leeds-fage-io_roscoff_20060927.na -o test_outputs/leeds-fage-io_roscoff_20060927.na.nc 7 | na2nc.py -i ../../nappy_test_files/man-ams_faam_20070726_r0_b312.na -o test_outputs/man-ams_faam_20070726_r0_b312.na.nc 8 | na2nc.py -i ../../nappy_test_files/met-sensors_capel-dewi_20080701.na -o test_outputs/met-sensors_capel-dewi_20080701.na.nc 9 | na2nc.py -i ../../nappy_test_files/rdg-pims_weybourne_20040504_pims-geigers.na -o test_outputs/rdg-pims_weybourne_20040504_pims-geigers.na.nc 10 | na2nc.py -i ../../nappy_test_files/synop20000515.na -o test_outputs/synop20000515.na.nc 11 | na2nc.py -i ../../nappy_test_files/uea-gc-ms_halley_20050112_rono2-br-cl-summer05-v1.na -o test_outputs/uea-gc-ms_halley_20050112_rono2-br-cl-summer05-v1.na.nc 12 | na2nc.py -i ../../nappy_test_files/uea-pan_halley_20040706_pan-all-v1.na -o test_outputs/uea-pan_halley_20040706_pan-all-v1.na.nc 13 | na2nc.py -i ../../nappy_test_files/uea-wao-chem_weybourne_20050201_chemistry.na -o test_outputs/uea-wao-chem_weybourne_20050201_chemistry.na.nc 14 | na2nc.py -i ../../nappy_test_files/york-ats-gc-tof_djougou_20060602_r1.na -o test_outputs/york-ats-gc-tof_djougou_20060602_r1.na.nc 15 | -------------------------------------------------------------------------------- /tests/tests-nc_badc_files.txt: -------------------------------------------------------------------------------- 1 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/active-package_arsf-dornier_20051119140000_sd05.nc -o ../test_outputs/active-package_arsf-dornier_20051119140000_sd05.nc.na 2 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/ceh-aws_pobe_20050220.nc -o ../test_outputs/ceh-aws_pobe_20050220.nc.na 3 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/ceh-flux_wankama_20051117.nc -o ../test_outputs/ceh-flux_wankama_20051117.nc.na 4 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/cfarr-lidar-uv_chilbolton_20080520_water-vapour.nc -o ../test_outputs/cfarr-lidar-uv_chilbolton_20080520_water-vapour.nc.na 5 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/cfarr-met-sensors_chilbolton_20080531.nc -o ../test_outputs/cfarr-met-sensors_chilbolton_20080531.nc.na 6 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/cfarr-radar-acrobat_chilbolton_20070206123544_rhi.nc -o ../test_outputs/cfarr-radar-acrobat_chilbolton_20070206123544_rhi.nc.na 7 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/core_faam_20070726_v001_r0_b312_1hz.nc -o ../test_outputs/core_faam_20070726_v001_r0_b312_1hz.nc.na 8 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/gome_ers2_200303190160_o3p.nc -o ../test_outputs/gome_ers2_200303190160_o3p.nc.na 9 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/imk-sodar1_dudou_20060712_backscatter.nc -o ../test_outputs/imk-sodar1_dudou_20060712_backscatter.nc.na 10 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/leeds-sodar1_chilbolton_20050712_backscatter.nc -o ../test_outputs/leeds-sodar1_chilbolton_20050712_backscatter.nc.na 11 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/man-radar-1290mhz_achern_20070613_trt0-15min-1.nc -o ../test_outputs/man-radar-1290mhz_achern_20070613_trt0-15min-1.nc.na 12 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/radar-mst_capel-dewi_20070303_st300_radial_v3.nc -o ../test_outputs/radar-mst_capel-dewi_20070303_st300_radial_v3.nc.na 13 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/radar-mst_capel-dewi_20080504_st300_cartesian_v3.nc -o ../test_outputs/radar-mst_capel-dewi_20080504_st300_cartesian_v3.nc.na 14 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/salford-aws-1_faccombe_20050826_10min.nc -o ../test_outputs/salford-aws-1_faccombe_20050826_10min.nc.na 15 | ../lib/nappy/script/nc2na.py -i ../../nappy_test_files/salford-sonic-2_faccombe_20050825_1hz.nc -o ../test_outputs/salford-sonic-2_faccombe_20050825_1hz.nc.na 16 | --------------------------------------------------------------------------------