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

implement n_hours_per_met_file #102

Merged
merged 7 commits into from
Oct 3, 2024
Merged

Conversation

jmineau
Copy link
Member

@jmineau jmineau commented Sep 17, 2024

find_met_files is unable to correctly find met files when run in forward - fixes #99 .

I believe this pull request implements n_hours_per_met_file as requested and solves this issue.

Copy link
Contributor

@benfasoli benfasoli left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable approach to me 👍

Does this handle the forward simulation issues in #99? I remember running forward simulations in the past without issues, but this was ~5 years ago so I don't recall the details.

r/src/simulation_step.r Outdated Show resolved Hide resolved
r/src/find_met_files.r Show resolved Hide resolved
r/src/find_met_files.r Outdated Show resolved Hide resolved
@@ -63,6 +63,7 @@ str(receptors)
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `met_path` | Absolute path to ARL compatible meteorological data files |
| `met_file_format` | String detailing file naming convention for meteorological data files using a mixture of datetime and regex syntax. The formatting string accepts `grep` compatible regular expressions (`.\*.arl`), `strftime` compatible datetime strings (`%Y%m%d%H`) or any combination of the two. Datetime syntax is expanded to all unique combinations required for the receptor and simulation duration and the intersection between the requested files and files available in `met_path` is determined with `grep`, allowing partial matching and compatible regular expressions to be used to identify the relevant data. Matching does not require the full format to be specified - e.g. `\*.arl`, `%Y`, `%Y%m%d`, `%Y%m%d_d0.*.arl` would all match with a file named `20180130_d01.arl`. |
| `n_hours_per_met_file` | Number of hours per meteorological data file. Defaults to 6 |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest adding guidance about how to know what value to set, since ARL met files can be a bit of a black box to users

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't had any experience with ARL met files other than the HRRR archive that Lin Group keeps on CHPC. @tartanrunner25 do you have any suggestions for user guidance on determining the number of hours in an ARL met file?

@John-C-Lin
Copy link
Contributor

@jmineau , this is a reasonable solution to the forward simulation time bug mentioned in #99

@John-C-Lin John-C-Lin merged commit 0b81580 into uataq:main Oct 3, 2024
1 check passed
John-C-Lin added a commit that referenced this pull request Oct 3, 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.

Forward mode results in "PARTICLE_STILT.DAT does not contain any trajectory data" while backward mode works
3 participants