Skip to content

Commit

Permalink
[doc] Fix typos in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hongyuanjia committed Oct 9, 2022
1 parent f29a7c2 commit b82215b
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 57 deletions.
2 changes: 1 addition & 1 deletion R/dict.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' CMIP6 Controlled Vocabularies (CVs) and Data Request Dictionary
#'
#' The `Cmip6Dict` object provides functionalities to fetch the latested CMIP6
#' The `Cmip6Dict` object provides functionalities to fetch the latest CMIP6
#' Controlled Vocabularies (CVs) and Data Request (DReq) information.
#'
#' The CMIP6 CVs gives a well-defined set of global attributes that are recorded
Expand Down
2 changes: 1 addition & 1 deletion R/epwshiftr-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' i.e. monthly-mean fractional change, when performing morphing operations.
#' The default value is set to `3`. If the morphing methods are set
#' `"stretch"` or `"combined"`, and the absolute alpha exceeds the threshold
#' value, warnings are issued and the morphing method is fallbacked to
#' value, warnings are issued and the morphing method fallbacks to
#' `"shift"` to avoid unrealistic morphed values.
#' * `epwshiftr.dir`: The directory to store package data, including CMIP6
#' model output file index and etc. If not set, the current user data
Expand Down
11 changes: 5 additions & 6 deletions R/esgf.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ RES_FILE <- c(
#'
#' The ESGF search service exposes a RESTful URL that can be used by clients to
#' query the contents of the underlying search index, and return results
#' matching the given constraints. ributed capabilities of the ESGF search, the
#' URL at any Index Node can be used to query that Node only, or all Nodes in
#' the ESGF system. `esgf_query()` uses the [LLNL (Lawrence Livermore National
#' Laboratory)](http://esgf-node.llnl.gov)
#' Index Node.
#' matching the given constraints. With the distributed capabilities of the ESGF
#' search, the URL at any Index Node can be used to query that Node only, or all
#' Nodes in the ESGF system. `esgf_query()` uses the
#' [LLNL (Lawrence Livermore National Laboratory) Index Node](http://esgf-node.llnl.gov).
#'
#' The core Controlled Vocabularies (CVs) for use in CMIP6, including all
#' activities, experiment, sources (GCMs), frequencies can be found at the
Expand Down Expand Up @@ -76,7 +75,7 @@ RES_FILE <- c(
#' * `hursmin`: Minimum near-surface relative humidity, units: `%`.
#' * `psl`: Sea level pressure, units: `Pa`.
#' * `rsds`: Surface downwelling shortwave radiation, units: `W m-2`.
#' * `rlds`: Surface downwelling longware radiation, units: `W m-2`.
#' * `rlds`: Surface downwelling longwave radiation, units: `W m-2`.
#' * `sfcWind`: Near-surface (usually, 10 meters) wind speed, units: `m s-1`.
#' * `pr`: Precipitation, units: `kg m-2 s-1`.
#' * `clt`: Total cloud area fraction for the whole atmospheric column, as
Expand Down
8 changes: 4 additions & 4 deletions R/morph.R
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ remove_units <- function (data, var) {
#' | 15 | `hour` | Integer | The hour of the morphed data |
#' | 16 | `minute` | Integer | The minute of the morphed data |
#' | 17 | **Variable Name** | Double | The morphed data, where `Variable Name` is the corresponding EPW weather variable name |
#' | 18 | `delta` | Double | The shift factor. Will be `NA` for derivied values |
#' | 19 | `alpha` | Double | The stretch factor. Will be `NA` for derivied values |
#' | 18 | `delta` | Double | The shift factor. Will be `NA` for derived values |
#' | 19 | `alpha` | Double | The stretch factor. Will be `NA` for derived values |
#'
#' @references
#' Belcher, S., Hacker, J., Powell, D., 2005. Constructing design weather data
Expand Down Expand Up @@ -322,7 +322,7 @@ morphing_epw <- function (data, years = NULL, labels = NULL, methods = NULL, war
)]
rlds <- data_cmip[J("rlds"), on = "variable", nomatch = NULL]
if (!nrow(rlds)) {
verbose("WARNING: Input does not contain any data of 'surface downwelling longware radiation'. Skip.")
verbose("WARNING: Input does not contain any data of 'surface downwelling longwave radiation'. Skip.")
hor_ir <- data.table()
} else {
hor_ir <- morphing_hor_ir(data_epw, rlds, years, labels = labels, type = methods["hor_ir"], warning = warning)
Expand Down Expand Up @@ -849,7 +849,7 @@ solar_angle <- function (latitude, longitude, day_of_year, hour, timezone) {
#'
#' @param morphed An `epw_cmip6_morphed` object created using [morphing_epw()].
#' @param by A character vector of columns to be used as grouping variables when
#' creating EPW files. Should be a subeset of:
#' creating EPW files. Should be a subset of:
#'
#' * `"experiment"`: root experiment identifiers
#' * `"source"`: model identifiers
Expand Down
14 changes: 7 additions & 7 deletions R/netcdf.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ get_nc_meta <- function (file) {
#' output file index. So the names of NetCDF files do not necessarily follow the
#' CMIP6 file name encoding.
#'
#' `summary_database()` will append 5 columns in the CMIP6 ouput file index:
#' `summary_database()` will append 5 columns in the CMIP6 output file index:
#'
#' - `file_path`: the full path of matched NetCDF file for every case.
#'
Expand All @@ -64,11 +64,11 @@ get_nc_meta <- function (file) {
#' `summary_database()` uses `future::sequential` backend, which runs things in
#' sequential.
#'
#' @param dir A single string indcating the directory where CMIP6 model output
#' @param dir A single string indicating the directory where CMIP6 model output
#' NetCDF files are stored.
#'
#' @param by The grouping column to summary the database status. Should be a
#' subeset of:
#' subset of:
#'
#' * `"experiment"`: root experiment identifiers
#' * `"source"`: model identifiers
Expand All @@ -91,7 +91,7 @@ get_nc_meta <- function (file) {
#' when running current summary. Only applicable when `append` is set to
#' `TRUE`. If `"keep"`, the metadata for the missing output files will
#' be kept. If `"overwrite"`, existing metadata of those output will be
#' first removed from the output file index and overwriten based on the
#' first removed from the output file index and overwritten based on the
#' newly matched files if possible. Default: `"keep"`.
#'
#' @param recursive If `TRUE`, scan recursively into directories. Default:
Expand Down Expand Up @@ -253,7 +253,7 @@ summary_database <- function (
} else if (miss == "overwrite") {
paste(
"Since `miss` is set to `\"overwrite\"`, its metadata has been **removed** from the output file index",
"and will be overwriten by the data from new matched NetCDF file if possible.\n"
"and will be overwritten by the data from new matched NetCDF file if possible.\n"
)
},
paste0(mes, collapse = "\n"),
Expand Down Expand Up @@ -605,10 +605,10 @@ get_nc_data <- function (x, coord, years, unit = TRUE) {
#'
#' @return An `epw_cmip6_data` object, which is basically a list of 3 elements:
#'
#' * `epw`: An [eplusr::Epw] object whose longitude and latitute are used to
#' * `epw`: An [eplusr::Epw] object whose longitude and latitude are used to
#' extract CMIP6 data. It is the same object as created in [match_coord()]
#' * `meta`: A list containing basic metadata of input EPW, including `city`,
#' `state_province`, `country`, `latitute` and `longitude`.
#' `state_province`, `country`, `latitude` and `longitude`.
#' * `data`: An empty [data.table::data.table()] if `keep` is `FALSE` or a
#' [data.table::data.table()] of 14 columns if `keep` is `TRUE`:
#'
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ rd_query_method_param <- function(method, type, negate, default, nullable = TRUE
if (!missing(negate)) {
sprintf(
paste(
"Note that you can put a preceding \\code{!} to negate the facet contraints.",
"Note that you can put a preceding \\code{!} to negate the facet constraints.",
"For example, \\code{$%s(!c(%s))} searches for all \\code{%s}s except for",
"%s."
),
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ extent permitted by law.

If you encounter a clear bug or have questions about the usage, please file an
issue with a minimal reproducible example on
[GitHub](https://github.com/ideas-lab-nus/epwshiftr/issues?q=is%3Aissue+is%3Aopen+sort% 3Aupdated-desc)
[GitHub](https://github.com/ideas-lab-nus/epwshiftr/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
If you have a solution for an existing bug or an implementation for a missing
feature, please send a pull request and let us review.

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,13 @@ morphed <- morphing_epw(data)
#> Morphing 'atmospheric pressure'...
#> WARNING: Input does not contain any data of 'sea level pressure'. Skip.
#> Morphing 'horizontal infrared radiation from the sky'...
#> WARNING: Input does not contain any data of 'surface downwelling longware radiation'. Skip.
#> WARNING: Input does not contain any data of 'surface downwelling longwave radiation'. Skip.
#> Morphing 'global horizontal radiation'...
#> WARNING: Input does not contain any data of 'surface downwelling shortware radiation'. Skip.
#> WARNING: Input does not contain any data of 'surface downwelling shortwave radiation'. Skip.
#> Morphing 'diffuse horizontal radiation'...
#> WARNING: Input does not contain any data of 'surface downwelling shortware radiation'. Skip.
#> WARNING: Input does not contain any data of 'surface downwelling shortwave radiation'. Skip.
#> Morphing 'direct normal radiation'...
#> WARNING: Input does not contain any data of 'surface downwelling shortware radiation'. Skip.
#> WARNING: Input does not contain any data of 'surface downwelling shortwave radiation'. Skip.
#> Morphing 'wind speed'...
#> WARNING: Input does not contain any data of 'near-surface wind speed'. Skip.
#> Morphing 'total sky cover'...
Expand Down Expand Up @@ -493,7 +493,7 @@ extent permitted by law.

If you encounter a clear bug or have questions about the usage, please file an
issue with a minimal reproducible example on
[GitHub](https://github.com/ideas-lab-nus/epwshiftr/issues?q=is%3Aissue+is%3Aopen+sort% 3Aupdated-desc)
[GitHub](https://github.com/ideas-lab-nus/epwshiftr/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
If you have a solution for an existing bug or an implementation for a missing
feature, please send a pull request and let us review.

Expand Down
2 changes: 1 addition & 1 deletion man/CMIP6Dict.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/epwshiftr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions man/esgf_query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/extract_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/future_epw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/init_cmip6_index.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/morphing_epw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/summary_database.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b82215b

Please sign in to comment.