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

Input data overhaul #184

Merged
merged 37 commits into from
Jul 16, 2020
Merged

Conversation

scotthavens
Copy link
Contributor

@scotthavens scotthavens commented Jul 15, 2020

A big issue with SMRF and gridded data is that it must loaded all upfront which does not make sense for a year long run. Refactored the data loading to be more organized and have an easier call in SMRF.

  • The HRRR data can be loaded either upfront or each timestep through a new config option
  • When running threaded, the data is loaded into a data queue that the threads get from
  • All gridded data is used in the same way for thermal radiation, meaning that the clear sky thermal is modeled then adjusted for cloud factor and not distributing thermal radiation from the gridded dataset.
  • Remove MySQL for MySQL data deprecation? #127
  • Removed the last_storm_basin metric what calculated the time since last storm for the whole basin, this is not being used anymore

… last_storm_day_basin wasn't used anywhere so removed all metion of it
@@ -30,7 +30,7 @@ below is the function :mod:`run_smrf <smrf.framework.model_framework.run_smrf>`.
s.loadTopo()

# initialize the distribution
s.initializeDistribution()
s.create_distribution()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will break AWSM. Should be included in AWSM #68

@@ -104,18 +104,11 @@ def readImages(self, f):
# to double or int
for v_smrf in self.IMAGES:

# check to see if the user defined any variables
# e.g. veg_height = veg_length
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has never been used where one can specify different field names in the topo.nc. Most will be generated with basin_setup so it's just making it a little more rigid.

@scotthavens scotthavens requested a review from jomey July 15, 2020 16:41
@scotthavens
Copy link
Contributor Author

@etrujil and @Hedrick-ARS, here is a good overhaul to the input data for SMRF to make it more efficient. This also has removed the MySQL capability since we haven't used it in a few years.

docs/user_guide/input_data.rst Outdated Show resolved Hide resolved
requirements.txt Show resolved Hide resolved
smrf/data/csv.py Outdated Show resolved Hide resolved
smrf/data/csv.py Show resolved Hide resolved
smrf/data/hrrr_grib.py Outdated Show resolved Hide resolved
smrf/distribute/air_temp.py Show resolved Hide resolved
smrf/distribute/solar.py Show resolved Hide resolved
smrf/tests/data/test_wrf.py Show resolved Hide resolved
smrf/tests/data/test_netcdf.py Show resolved Hide resolved
smrf/utils/utils.py Outdated Show resolved Hide resolved
@jomey
Copy link
Collaborator

jomey commented Jul 15, 2020

Some of my comments apply to multiple data loading classes and I did not repeat the message there. Easier to discuss suggestions in one place.

@scotthavens
Copy link
Contributor Author

Some of my comments apply to multiple data loading classes and I did not repeat the message there. Easier to discuss suggestions in one place.

Got it, a lot of the classes are similar so I've applied the comments to all classes that were applicable.

@scotthavens scotthavens requested a review from jomey July 15, 2020 22:12
smrf/data/load_data.py Outdated Show resolved Hide resolved
smrf/data/load_data.py Outdated Show resolved Hide resolved
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.

2 participants