Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation to ush/HWP_tools.py #515

Merged
merged 33 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ec78cac
adding API rst files
edwardhartnett Oct 6, 2024
8b437eb
moved files
edwardhartnett Oct 6, 2024
5a393e2
more docs work
edwardhartnett Oct 6, 2024
5e185f3
more docs work
edwardhartnett Oct 6, 2024
5cb7f8d
more docs work
edwardhartnett Oct 6, 2024
b86dce1
more docs work
edwardhartnett Oct 6, 2024
60843d5
more docs work
edwardhartnett Oct 6, 2024
5b8e852
more docs work
edwardhartnett Oct 6, 2024
7bb62e4
more docs work
edwardhartnett Oct 6, 2024
e7575ce
more docs work
edwardhartnett Oct 6, 2024
3c4d4ad
more docs work
edwardhartnett Oct 6, 2024
1e37abc
more docs work
edwardhartnett Oct 6, 2024
11df1de
more
edwardhartnett Oct 6, 2024
dd745b7
adding files
edwardhartnett Oct 6, 2024
51afbcb
more work
edwardhartnett Oct 7, 2024
9d1abe3
more work
edwardhartnett Oct 7, 2024
4dcb01d
more work
edwardhartnett Oct 7, 2024
2bb5cc6
renamed directory
edwardhartnett Oct 7, 2024
cc014c0
moving stuff
edwardhartnett Oct 7, 2024
fc587ec
more moving
edwardhartnett Oct 7, 2024
9e4051c
more moving
edwardhartnett Oct 7, 2024
016153f
more work simplifing build
edwardhartnett Oct 7, 2024
4867639
changed workflow
edwardhartnett Oct 7, 2024
1803e53
changed workflow
edwardhartnett Oct 7, 2024
c6a6882
added some docs
edwardhartnett Oct 7, 2024
3a91031
added some docs
edwardhartnett Oct 7, 2024
2afd5b8
added some docs
edwardhartnett Oct 7, 2024
b100b68
added some docs
edwardhartnett Oct 7, 2024
813047d
added some docs
edwardhartnett Oct 7, 2024
ae52034
merged
edwardhartnett Oct 8, 2024
0edb0af
more docs
edwardhartnett Oct 8, 2024
2ebb0b1
more docs
edwardhartnett Oct 8, 2024
d6289af
more docs
edwardhartnett Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
sphinxcontrib-bibtex
sphinx_rtd_theme
docutils==0.16
docutils==0.16
numpy
xarray
matplotlib
netCDF4
matplotlib
34 changes: 34 additions & 0 deletions ush/HWP_tools.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
This file provides HWP tools.

edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
"""

import numpy as np
import os
import datetime as dt
Expand All @@ -7,6 +12,14 @@
import fnmatch

def check_restart_files(hourly_hwpdir, fcst_dates):
"""Check the restart files.

Args:
hourly_hwpdir: Hourly ??? directory
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
fcst_dates: Forecast dates
Returns:
list of hwp_avail_hours, hwp_non_avail_hours
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
"""
hwp_avail_hours = []
hwp_non_avail_hours = []

Expand All @@ -25,6 +38,15 @@ def check_restart_files(hourly_hwpdir, fcst_dates):
return(hwp_avail_hours, hwp_non_avail_hours)

def copy_missing_restart(nwges_dir, hwp_non_avail_hours, hourly_hwpdir):
"""Check the restart files.

Args:
nwges_dir: directory
hwp_non_avail_hours: ???
hourly_hwpdir: ???
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
Returns:
list of (restart_avail_hours, restart_nonavail_hours_test)
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
"""
restart_avail_hours = []
restart_nonavail_hours_test = []

Expand Down Expand Up @@ -79,6 +101,18 @@ def copy_missing_restart(nwges_dir, hwp_non_avail_hours, hourly_hwpdir):
return(restart_avail_hours, restart_nonavail_hours_test)

def process_hwp(fcst_dates, hourly_hwpdir, cols, rows, intp_dir, rave_to_intp):
"""Check the restart files.

Args:
fcst_dates: Forecast dates
hourly_hwpdir: ???
cols: number of columns
rows: number of rowa
intp_dir: directory
rave_to_intp: ???
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
Returns:
list of (hwp_ave_arr, xarr_hwp, totprcp_ave_arr, xarr_totprcp)
"""
edwardhartnett marked this conversation as resolved.
Show resolved Hide resolved
hwp_ave = []
totprcp = np.zeros((cols*rows))
var1, var2 = 'rrfs_hwp_ave', 'totprcp_ave'
Expand Down
Loading