Skip to content

Commit

Permalink
clean up repo for minor release v0.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
csyhuang committed Apr 9, 2023
1 parent f211ca1 commit 77daecb
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
# built documents.
#
# The short X.Y version.
version = u'0.6.5'
version = u'0.6.6'
# The full version, including alpha/beta/rc tags.
release = u'0.6.5'
release = u'0.6.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Issues Reporting

Please make inquiries about / report issues / with the package and suggest feature extensions on the `Issues page <https://github.com/csyhuang/hn2016_falwa/issues>`_.

If you need help analyzing output from particular model/analysis with our techniques, feel free to email me *csyhuang@protonmail.com* with sample datasets and I can configure the code for you.
If you need help analyzing output from particular model/analysis with our techniques, feel free to email me *csyhuang@uchicago.edu* with sample datasets and I can configure the code for you.


Indices and tables
Expand Down
2 changes: 1 addition & 1 deletion hn2016_falwa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Author: Clare Huang, Christopher Polster
"""

__version__ = "0.6.5"
__version__ = "0.6.6"
from .interpolate_fields import interpolate_fields
from .interpolate_fields_direct_inv import interpolate_fields_direct_inv
from .compute_qref_and_fawa_first import compute_qref_and_fawa_first
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Python Library: hn2016_falwa (v0.6.5)
## Python Library: hn2016_falwa (v0.6.6)

[![Build Status](https://github.com/csyhuang/hn2016_falwa/actions/workflows/workflow.yml/badge.svg)](https://github.com/csyhuang/hn2016_falwa/actions/workflows/workflow.yml)[![codecov.io](https://codecov.io/gh/csyhuang/hn2016_falwa/branch/master/graph/badge.svg)](https://codecov.io/gh/csyhuang/hn2016_falwa)[![Documentation Status](https://readthedocs.org/projects/hn2016-falwa/badge/?version=latest)](http://hn2016-falwa.readthedocs.io/en/latest/?badge=latest)[![DOI](https://zenodo.org/badge/63908662.svg)](https://zenodo.org/badge/latestdoi/63908662)

Expand Down Expand Up @@ -79,6 +79,6 @@ are added upon users' request on new functionalities to test hypotheses (also se

## Inquiries / Issues reporting

- If you are interested in using the package, please leave your contact [here](https://goo.gl/forms/5L8fv0mUordugq6v2) or email me(csyhuang@protonmail.com) such that I can keep you updated of any changes made.
- If you are interested in using the package, please leave your contact [here](https://goo.gl/forms/5L8fv0mUordugq6v2) or email me(csyhuang@uchicago.edu) such that I can keep you updated of any changes made.
- If you encounter *coding issues/bugs* when using the package, please create an [Issue ticket](https://github.com/csyhuang/hn2016_falwa/issues).
- If you have scientific questions, please contact Clare S. Y. Huang via email(csyhuang@protonmail.com).
- If you have scientific questions, please contact Clare S. Y. Huang via email(csyhuang@uchicago.edu).
18 changes: 18 additions & 0 deletions scripts/nhn_grl2022/env_nhn_grl2022.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: env_nhn_grl2022

dependencies:
- intel::numpy=1.22.3
- intel::scipy=1.7.3
- pytest=7.1.2
- matplotlib=3.6.2
- cartopy=0.21.1
- conda-forge::netCDF4=1.6.0

# 1. To create the environment, run:
# $ conda env create -f scripts/nhn_grl2022/env_nhn_grl2022.yml
# 2. Activate the environment
# $ conda activate env_nhn_grl2022
# 3. Remove any existing compiled fortran modules by:
# $ rm hn2016_falwa/*.so
# 4. Install hn2016_falwa by running in command line:
# $ python setup.py develop
50 changes: 42 additions & 8 deletions scripts/nhn_grl2022/readme.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
## Demo script for the analyses done in Neal et al. (submitted to GRL)
# Demo script for the analyses done in Neal et al. (submitted to GRL)

This repo contains the sample script to reproduce the plots in Neal et al. "The 2021 Pacific Northwest heat wave and
associated blocking: Meteorology and the role of an upstream cyclone as a diabatic source of wave activity".
This directory contains the sample script to reproduce the plots in
Neal, et al. (2022). [The 2021 Pacific Northwest heat wave and associated blocking: meteorology and the role of an upstream cyclone as a diabatic source of wave activity](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021GL097699). *Geophysical Research Letters*, 49(8), e2021GL097699.

To produce all the plots, required ERA5 data (6-hourly, 1° x 1° spatial resolution at all pressure levels
## Data required

To produce all the plots, download ERA5 data files which contain (6-hourly, 1° x 1° spatial resolution at all pressure levels
(37 available levels), from June 1-30, 2021):

- geopotential height (z)
Expand All @@ -16,20 +18,52 @@ To produce all the plots, required ERA5 data (6-hourly, 1° x 1° spatial resolu
- total column water (tcw)
- total column water vapor (tcwv)
- sea level pressure (sp)

## Scripts

The run script `sample_run_script.py` called functions in `QGField` object (see `hn2016_falwa/oopinterface.py`)
to compute LWA and fluxes, while `scripts/graph_plot_module.py` contains the graph plotting functions to reproduce
all the figures in the paper.

Note that there is a difference in computing reference state in this most recent manuscript. In the past, and also
the analysis in NH18 Science, we used equator as the latitudinal boundary. In this current version of the script
## Note on equatorward boundary condition used

Note that there is a difference in computing reference state in this most recent manuscript. In the past (and also
the analysis in NH18 Science), we used equator as the latitudinal boundary. In this current version of the script
(release 0.6.0), we use absolute vorticity at 5°N as boundary condition such that the solution is no longer sensitive
to fields at the equator, which improves the quality of the analysis.

We are in a hurry submitting the manuscript, so this version of code (v0.6.1) has not been properly refactored yet.
## How to create a virtual environment to run this script

Create a conda environment by running:
```bash
conda env create -f scripts/nhn_grl2022/env_nhn_grl2022.yml
```

Activate the environment
```bash
conda activate env_nhn_grl2022
```

Remove any existing compiled fortran modules by:
```bash
rm hn2016_falwa/*.so
```

Install hn2016_falwa by running in command line:
```bash
python setup.py develop
```

You can then run the script to reproduce the graphs in the GRL paper:
```bash
python scripts/nhn_grl2022/sample_run_script.py
```

## Problem solving

If you have any questions, please [submit an issue](https://github.com/csyhuang/hn2016_falwa/issues) or email me.
I'll get back ASAP.

Thanks!

Clare (csyhuang@protonmail.com)
Clare S. Y. Huang (csyhuang@uchicago.edu)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@

setup(
name='hn2016_falwa',
version='0.6.5',
version='0.6.6',
description='python package to compute finite-amplitude local wave activity (Huang and Nakamura 2016, JAS)',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
url='https://github.com/csyhuang/hn2016_falwa',
author='Clare S. Y. Huang',
author_email='csyhuang@protonmail.com',
author_email='csyhuang@uchicago.edu',
license='MIT',
packages=find_packages(),
install_requires=['numpy', 'scipy', 'xarray'],
Expand Down

0 comments on commit 77daecb

Please sign in to comment.