schism-dev / pyschism

Python interface for handling the SCHISM model.
https://schism-dev.github.io/schism/master/getting-started/pre-processing-with-pyschism/overview.html
Apache License 2.0
25 stars 21 forks source link

Add `model_type_pahm` parameter support #62

Closed SorooshMani-NOAA closed 1 year ago

SorooshMani-NOAA commented 1 year ago

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 commented 1 year ago

@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

SorooshMani-NOAA commented 1 year ago

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

cuill commented 1 year ago

@SorooshMani-NOAA done

yunfangsun commented 1 year ago

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

Thank you!

SorooshMani-NOAA commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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