Skip to content

Palmers does not work in CLI out of the box. #567

@mvdebolskiy

Description

@mvdebolskiy

Describe the bug
CLI process_climate_indices --index all fails on palmers.

To Reproduce
Steps to reproduce the behavior:

  1. pip install climate_indices
  2. git clone https://github.com/monocongo/example_climate_indices
  3. cd example_climate_indices/example
  4. process_climate_indices --index pnp --periodicity monthly --scales 3 6 --netcdf_precip ./input/nclimdiv.nc --netcdf_temp ./input/nclimdiv.nc --netcdf_awc ./input/nclimdiv.nc --output_file_base ./output/nclimdiv --var_name_precip prcp --var_name_temp tavg --var_name_awc awc --calibration_start_year 1951 --calibration_end_year 2010
  5. Get ValueError: Unsupported index: palmers

Expected behavior
This should compute ALL the indices.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.6 LTS

Additional context
Also,

  • forcing to update scipy to 1.13.1 does not break anything.
  • The commad in 4 comes from 1st example in docs
  • Paths in CLI examples with example_climate_indices should be updated /data/* is an absolute path and there is no folder /data/ in the example repo.
Traceback (most recent call last):
  File "/home/matveyd/miniforge3/envs/labs/lib/python3.11/site-packages/climate_indices/__main__.py", line 1776, in process_climate_indices
    _compute_write_index(kwrgs)
  File "/home/matveyd/miniforge3/envs/labs/lib/python3.11/site-packages/climate_indices/__main__.py", line 864, in _compute_write_index
    _parallel_process(
  File "/home/matveyd/miniforge3/envs/labs/lib/python3.11/site-packages/climate_indices/__main__.py", line 1250, in _parallel_process
    raise ValueError("Unsupported index: {index}".format(index=index))
ValueError: Unsupported index: palmers

Seems like palmers is not added as a case in _parallel_process. Is this intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions