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 model_type_pahm parameter support #62

Merged
merged 2 commits into from
Mar 30, 2023

Conversation

SorooshMani-NOAA
Copy link
Contributor

@SorooshMani-NOAA SorooshMani-NOAA commented Mar 29, 2023

Fix #63
Fix #61

Recently a new parameter was introduced in param.nml in 90a67ff. This will control what model is used by integrated PaHM code, GAHM: 10 vs Symmetric: 1

@SorooshMani-NOAA
Copy link
Contributor Author

@cuill this pull request also includes a bugfix for NWM. The bug (fixed at a3b6a5b) causes problems in automated testing for all packages relying on pyschism such as coupledmodeldriver and ensembleperturbation

@@ -334,7 +334,7 @@ def safe_extract(tar, path=".", members=None, *, numeric_owner=False):
if not is_within_directory(path, member_path):
raise Exception("Attempted Path Traversal in Tar File")

tar.extractall(path, members, numeric_owner)
tar.extractall(path, members, numeric_owner=numeric_owner)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

numeric_owner is a keyword-only argument

@SorooshMani-NOAA
Copy link
Contributor Author

@cuill thanks for merging. Would it be possible that you please create a new release from the latest code as well?

@SorooshMani-NOAA SorooshMani-NOAA deleted the enhance/besttrack branch March 30, 2023 16:19
@cuill
Copy link
Member

cuill commented Mar 30, 2023

@SorooshMani-NOAA done

@yunfangsun
Copy link

@SorooshMani-NOAA
Hi Soroosh,
Could I know how to add model_type_pahm in the Pyschism script?

Thank you!

@SorooshMani-NOAA
Copy link
Contributor Author

@yunfangsun when creating BestTrackForcing you can pass the model type as hurricane_model that should be either equal to "gahm" or "symmetric". e.g.:

meteo = BestTrackForcing(..., hurricane_model="symmetric", ...)

@yunfangsun
Copy link

Hi @SorooshMani-NOAA
My Pyschism vision is Version: 0.1.5.
And I get the following error when adding hurricane_model:

TypeError Traceback (most recent call last)
Cell In[21], line 5
2 dramp = timedelta(days=10.)
4 atmospheric = BestTrackForcing.from_nhc_bdeck(nhc_bdeck='hurricane-track.dat')
----> 5 atmospheric = BestTrackForcing(hurricane_model="symmetric")
7 #storm_id="Ian2022"
9 fgrid = pyschism.mesh.ManningsN.linear_with_depth(
10 hgrid,
11 min_value=0.02, max_value=0.05,
12 min_depth=-1.0, max_depth=-3.0)

TypeError: init() got an unexpected keyword argument 'hurricane_model'

@SorooshMani-NOAA
Copy link
Contributor Author

@yunfangsun you need to have version 0.1.6 or higher for the hurricane_model parameter

mansurjisan pushed a commit to mansurjisan/pyschism that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NWM bug: keyword-only argument passed as positional Add PaHM model parameter to pyschsim BestTrackForcing
3 participants