cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
52 stars 30 forks source link

Typo in aws2cosipy #78

Open benatouba opened 1 day ago

benatouba commented 1 day ago

When aggregate is turned on in utilities_config.

cosipy-aws2cosipy \
    -i ./data/input/Zhadang/Zhadang_ERA5_2009_2018.csv \
    -o ./data/input/Zhadang/Zhadang_ERA5_2009.nc \
    -s ./data/static/Zhadang_static.nc \
-------------------------------------------
Create input
Read input file ./data/input/Zhadang/Zhadang_ERA5_2009_2018.csv
/home/ben/projects/cosipy/cosipy/utilities/aws2cosipy/aws2cosipy.py:68: FutureWarning: The argument 'date_parser' is deprecated and will be removed in a future version. Please use 'date_format' instead, or read your data in as 'object' dtype and then call 'to_datetime'.
  dataframe = pd.read_csv(
Traceback (most recent call last):
  File "/home/ben/.pyenv/versions/cosipy312/bin/cosipy-aws2cosipy", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ben/projects/cosipy/cosipy/utilities/aws2cosipy/aws2cosipy.py", line 1038, in main
    create_2D_input(
  File "/home/ben/projects/cosipy/cosipy/utilities/aws2cosipy/aws2cosipy.py", line 489, in create_2D_input
    df = df.resample(_cfg.coords["aggregation_step"].agg(aggregates))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'agg'

The parenthesis is left open.