earthkit.climate.atmos.drought_code

earthkit.climate.atmos.drought_code(tas: xarray.DataArray | str = 'tas', pr: xarray.DataArray | str = 'pr', lat: xarray.DataArray | str = 'lat', snd: xarray.DataArray | str | None = None, dc0: xarray.DataArray | str | None = None, season_mask: xarray.DataArray | str | None = None, ds: xarray.Dataset | Any = None, *, season_method: str | None = None, overwintering: bool = False, dry_start: str | None = None, initial_start_up: bool = True, **kwargs: Any) Any

Daily drought code.

The Drought Index is part of the Canadian Forest-Weather Index system. It is a numerical code that estimates the average moisture content of organic layers.

Units:

  • dc: dimensionless

This function wraps xclim.indicators.atmos.drought_code.

Parameters:
  • tas (xarray.DataArray | str) – Noon temperature.

  • pr (xarray.DataArray | str) – Rain fall in open over previous 24 hours, at noon.

  • lat (xarray.DataArray | str) – Latitude coordinate.

  • snd (xarray.DataArray | str | None) – Noon snow depth.

  • dc0 (xarray.DataArray | str | None) – Initial values of the drought code.

  • season_mask (xarray.DataArray | str | None) – Boolean mask, True where/when the fire season is active.

  • season_method (str | None) – How to compute the start-up and shutdown of the fire season. If “None”, no start-ups or shutdowns are computed, similar to the R fire function. Ignored if season_mask is given.

  • overwintering (bool) – Whether to activate DC overwintering or not. If True, either season_method or season_mask must be given.

  • dry_start (str | None) – Whether to activate the DC and DMC “dry start” mechanism and which method to use. See fire_weather_ufunc().

  • initial_start_up (bool) – If True (default), grid points where the fire season is active on the first timestep go through a start_up phase for that time step. Otherwise, previous codes must be given as a continuing fire season is assumed for those points.

  • ds (xarray.Dataset | Any) – Input dataset.

  • **kwargs (Any) – Additional keyword arguments.

Returns:

The computed index.

Return type:

Any