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

fix: enable proper running of backward dispersion models #82

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: don't prepend unnecessary "-" to duration in CONTROL file
The duration is computed as the difference between the start and end
times. If the start time is after the end time, the duration is already
negative, so we don't need to prepend a "-" to it or we have a double
negative before the duration value and HYSPLIT crashes.
  • Loading branch information
AlFontal committed Aug 17, 2023
commit d4ca4192ec8442dae03b00a1d7c25144f2e48535
2 changes: 1 addition & 1 deletion R/utils-disp.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ write_disp_control_file <- function(start_day,
start_day_GMT, " ", start_hour, "\n",
"1\n",
lat, " ", lon, " ", height, "\n",
ifelse(direction == "backward", "-", ""), duration, "\n",
duration, "\n",
vert_motion, "\n",
model_height, "\n",
length(met_files), "\n",
Expand Down