Conversation
These QC rules are still very ad hoc -- more work needed.
| function(site_id, start_date, end_date, ens_id, ...) { | ||
| PEcAn.SIPNET::met2model.SIPNET( | ||
| in.path = file.path( | ||
| args$site_era5_path, | ||
| paste("ERA5", site_id, ens_id, sep = "_") | ||
| ), | ||
| start_date = args$start_date, | ||
| end_date = args$end_date, |
There was a problem hiding this comment.
function signature binds start_date and end_date from file_info, but lines 87-88 ignore them and use args$start_date / args$end_date instead; this works but is misleading, consider using the function parameter or removing it from the signature. (same pattern exists in 2a_grass/01_ERA5_nc_to_clim.R was this intentionally inherited?)
| # start from scratch if no continue is passed in | ||
| status_file <- file.path(settings$outdir, "STATUS") | ||
| if (args$continue && file.exists(status_file)) { | ||
| file.remove(status_file) | ||
| } |
There was a problem hiding this comment.
comment says "start from scratch if no continue is passed" but the code removes STATUS when continue=TRUE; which means --continue causes a restart. This looks opposite, should the condition be !args$continue?
is this a pre-existing bug being carried forward?
There was a problem hiding this comment.
This is copied straight from the venerable/long-in-tooth web/workflow.R, where "continue" meant "attempt to come back to a workflow that errored out before" and never worked as intended. It's probably time to just delete the whole block from this file.
| export NCPUS=8 | ||
| ln -s [your/path/to]/sipnet/sipnet sipnet.git | ||
| [host_args] ./05_run_model.R --settings=val_out/pecan.CONFIGS.xml | ||
|
|
There was a problem hiding this comment.
missing closing ```for the code block
5 and 6 will render incorrectly
| ```{sh} | ||
| [host_args] ./validate.R \ | ||
| --model_dir=val_out \ | ||
| --output_dir=validation_results_$(date'+%s') |
There was a problem hiding this comment.
missing space shell will try to find a command called date'+%s'
| --output_dir=validation_results_$(date'+%s') | |
| --output_dir=validation_results_$(date '+%s') |
| facet_wrap(~site) + | ||
| theme_bw() + | ||
| ylab("LAI") + | ||
| xlab("DOY") + |
There was a problem hiding this comment.
trailing + on the last ggplot layer save_gg(...) will be parsed as a ggplot layer addition and throw an error
| xlab("DOY") + | |
| xlab("DOY") |
| # for any CA location(s) in site_info | ||
|
|
||
| set.seed(6824625) | ||
| library(tidyverse) |
There was a problem hiding this comment.
would be lighter and more explicit (not blocker, just suggestion)
| library(tidyverse) | |
| library(dplyr); library(tidyr); library(purrr) |
| `./01_ERA4_nc_to_clim.R --start_date=2016-01-01` on my machine becomes | ||
| `sbatch -n16 --mem=12G --mail-type=ALL --uid=jdoe \ | ||
| ./01_ERA4_nc_to_clim.R --start_date=2016-01-01` on yours. |
There was a problem hiding this comment.
| `./01_ERA4_nc_to_clim.R --start_date=2016-01-01` on my machine becomes | |
| `sbatch -n16 --mem=12G --mail-type=ALL --uid=jdoe \ | |
| ./01_ERA4_nc_to_clim.R --start_date=2016-01-01` on yours. | |
| `./01_ERA5_nc_to_clim.R --start_date=2016-01-01` on my machine becomes | |
| `sbatch -n16 --mem=12G --mail-type=ALL --uid=jdoe \ | |
| ./01_ERA5_nc_to_clim.R --start_date=2016-01-01` on yours. |
| lon = seq(from = -124.5, to = -114, by = 0.5), | ||
| lat = seq(from = 32.5, to = 42, by = 0.5) | ||
| ) |> | ||
| mutate(id = paste0(lat, "N_", abs(lon), "W")) |
There was a problem hiding this comment.
need library(dplyr) or dplyr::mutate()
| intersect(ca_shp) |> | ||
| _$id | ||
| ca_grid <- ca_bboxgrid |> | ||
| filter(id %in% ca_gridcell_ids) |
| pft = dplyr::case_when( | ||
| crop_class %in% c("G", "F", "P", "T") ~ "grass", | ||
| crop_class %in% c("D", "C", "V", "YP") ~ "temperate.deciduous", |
There was a problem hiding this comment.
since this PR introduces an annual_crop pft for the lebauer analysis , should "T" map there instead? also, "G" includes grain crops which are annual, should those also be annual_crop ?
No description provided.