Skip to content

Commit

Permalink
Merge pull request #232 from ClimateImpactLab/docs_cleanup
Browse files Browse the repository at this point in the history
Update docs, comments language to be more consistent.
  • Loading branch information
brews authored Jul 25, 2023
2 parents 839601f + 6998e74 commit 3174f8a
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Test coverage for container tests in CI. (PR #188, PR #191, @brews)
- Add `org.opencontainers.image` labels with metadata to container. (PR #195, @brews)
### Changed
- Minor clarifications to docs and comments. (PR #232, @brews)
- Migrate parent container from `miniconda3` to `micromamba`. Note this is a significant change to the container environment which may break scripts run in the container. In addition, the containers entry point has changed, breaking backwards compatibility for Argo Workflows running with Emissary executors. (PR #195, @brews)
- Migrate Python package metadata and dependencies from `setup.cfg` to `pyproject.toml`. Note the runtime environment used in the container is still `environment.yaml`. (PR #195, @brews)
- Minor README updates, improvements. (PR #195, @brews)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# dodola

Containerized application for running individual tasks in a larger, orchestrated CMIP6 bias-correction and downscaling workflow.
Containerized application for running individual tasks in a larger, orchestrated CMIP6 bias-adjustment and downscaling workflow.

This is under heavy development.

Expand Down
6 changes: 3 additions & 3 deletions dodola/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
@click.option("--debug/--no-debug", default=False, envvar="DODOLA_DEBUG")
def dodola_cli(debug):
"""GCM bias-correction and downscaling
"""GCM bias adjustment and downscaling
Authenticate with storage by setting the appropriate environment variables
for your fsspec-compatible URL library.
Expand Down Expand Up @@ -200,7 +200,7 @@ def apply_qdm(
root_attrs_json_file=None,
new_attrs=None,
):
"""Adjust simulation years with QDM bias correction method, outputting Zarr Store"""
"""Adjust simulation years with QDM bias-adjustment method, outputting Zarr Store"""
first_year, last_year = (int(x) for x in years.split(","))

unpacked_attrs = None
Expand Down Expand Up @@ -350,7 +350,7 @@ def train_qdm(
"--wetday-post-correction",
type=bool,
default=False,
help="Whether to apply wet day frequency correction on downscaled data",
help="Whether to apply wet day frequency adjustment on downscaled data",
)
def apply_qplad(
simulation,
Expand Down
8 changes: 4 additions & 4 deletions dodola/core.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Core logic for bias-correction and downscaling
"""Core logic for bias adjustment and downscaling
Math stuff and business logic goes here. This is the "business logic".
"""
Expand Down Expand Up @@ -93,7 +93,7 @@ def adjust_quantiledeltamapping(
out : xr.Dataset
QDM-adjusted values from `simulation`. May be a lazy-evaluated future, not
yet computed. In addition to adjusted original variables, this includes
"sim_q" variable giving quantiles from QDM biascorrection.
"sim_q" variable giving quantiles from QDM biasadjustment.
"""
# This loop is a candidate for dask.delayed. Beware, xclim had issues with saturated scheduler.
qdm_list = []
Expand Down Expand Up @@ -725,11 +725,11 @@ def test_temp_range(ds, var):
def test_dtr_range(ds, var, data_type):
"""
Ensure DTR values are in a valid range
Test polar values separately since some polar values can be much higher post-bias correction.
Test polar values separately since some polar values can be much higher post bias adjustment.
"""
# test that DTR values are greater than 0 or equal to 0 depending on the data type
# note that some CMIP6 DTR will equal 0 at polar latitudes, this will be adjusted
# before bias correction with the DTR small values correction
# before bias adjustment with the DTR small values correction

dtr_min = ds[var].min()
if data_type == "cmip6":
Expand Down
6 changes: 3 additions & 3 deletions dodola/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def apply_qplad(
simulation : str
fsspec-compatible URL containing simulation data to be adjusted.
Dataset must have `variable` as well as a variable, "sim_q", giving
the quantiles from QDM bias-correction.
the quantiles from QDM bias adjustment.
qplad : str
fsspec-compatible URL pointing to Zarr Store containing canned
``xclim.sdba.adjustment.AnalogQuantilePreservingDownscaling`` Dataset.
Expand Down Expand Up @@ -632,8 +632,8 @@ def correct_wet_day_frequency(x, out, process, variable="pr"):
Storage URL to write regridded output to.
process : {"pre", "post"}
Step in pipeline, used in determining how to correct.
"Pre" replaces all zero values with a uniform random value below a threshold (before bias correction).
"Post" replaces all values below a threshold with zeroes (after bias correction).
"Pre" replaces all zero values with a uniform random value below a threshold (before bias adjustment).
"Post" replaces all values below a threshold with zeroes (after bias adjustment).
variable: str
"""
ds = storage.read(x)
Expand Down
2 changes: 1 addition & 1 deletion dodola/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def test_qplad_integration_af_quantiles():
ds_bc[variable].attrs["units"] = "K"

# this is an integration test between QDM and QPLAD, so use QDM services
# for bias correction
# for bias adjustment
target_year = 2005
qdm_model = train_quantiledeltamapping(
reference=ds_ref_coarse, historical=ds_train, variable=variable, kind=kind
Expand Down
2 changes: 1 addition & 1 deletion dodola/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def test_qplad_integration(kind):
repository.write(sim_url, ds_bc)

# this is an integration test between QDM and QPLAD, so use QDM services
# for bias correction
# for bias adjustment
target_year = 2005

train_qdm(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dodola"
description = "GCM bias-correction and downscaling"
description = "GCM bias adjustment and downscaling"
readme = "README.md"
dynamic = ["version"]
classifiers = [
Expand Down

0 comments on commit 3174f8a

Please sign in to comment.