Skip to content

ED: Make met2model entirely skip complete years#2363

Merged
tonygardella merged 1 commit intoPecanProject:developfrom
ashiklom:ed-met2model-refactor
May 30, 2019
Merged

ED: Make met2model entirely skip complete years#2363
tonygardella merged 1 commit intoPecanProject:developfrom
ashiklom:ed-met2model-refactor

Conversation

@ashiklom
Copy link
Copy Markdown
Member

@ashiklom ashiklom commented May 28, 2019

Description

Unless overwrite = TRUE, don't extract met for years for which every required target file is present. This should make met2model.ED2 run much faster when extending an existing met record.

Tagging @istfer, @mdietze, @serbinsh, and @femeunier as major ED users.

Motivation and Context

When updating existing ED met, met2model would extract variables, etc. for all years, including those for which files are already present. This can add up to a lot of wasted time.

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Unless `overwrite = TRUE`, don't extract met for years for which every
required target file is present. This should make `met2model.ED2` run
much faster when extending an existing met record.
@ashiklom ashiklom force-pushed the ed-met2model-refactor branch from 41e5f00 to 8fb70d2 Compare May 28, 2019 16:08
Copy link
Copy Markdown
Member

@serbinsh serbinsh left a comment

Choose a reason for hiding this comment

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

Looks good. So we can still force an update if we think the source data has changed by using overwrite=TRUE, seems reasonable to me!!

Does this mean this functionality has to be implemented on a model by model basis instead of at the level of the met process?? Or I guess what this means is that when met process calls the model specific code that is where we need to make sure we recycle existing data

@ashiklom
Copy link
Copy Markdown
Member Author

So we can still force an update if we think the source data has changed by using overwrite=TRUE

Yup -- with overwrite = TRUE, this should work exactly as it did before, except that it will list all of the files to be overwritten before launching into the loop over inputs/years.

Does this mean this functionality has to be implemented on a model by model basis instead of at the level of the met process?

I think it has to be because of how different met formats are across models. For example, Something like this is conceptually impossible for SiPNET because its met driver is a single text file.

@tonygardella tonygardella merged commit 504b798 into PecanProject:develop May 30, 2019
@ashiklom ashiklom deleted the ed-met2model-refactor branch June 11, 2019 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants