Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken hydrology recipes due to iris.exceptions.NotYetImplementedError: Coord AuxCoord #2021

Closed
SarahAlidoost opened this issue Feb 12, 2021 · 1 comment · Fixed by #2023
Closed
Assignees
Labels

Comments

@SarahAlidoost
Copy link
Contributor

With new version of iris, the hydrology recipes recipe_wflow.yml and recipe_marrmot.yml are broken because the script derive_evspsblpot.py returns the error:

Traceback (most recent call last):
  File "/home/sarah/GitHub/ESMValTool/esmvaltool/diag_scripts/hydrology/marrmot.py", line 172, in <module>
    main(config)
  File "/home/sarah/GitHub/ESMValTool/esmvaltool/diag_scripts/hydrology/marrmot.py", line 118, in main
    pet = debruin_pet(
  File "/home/sarah/GitHub/ESMValTool/esmvaltool/diag_scripts/hydrology/derive_evspsblpot.py", line 94, in debruin_pet
    delta_svp = tetens_derivative(tas)
  File "/home/sarah/GitHub/ESMValTool/esmvaltool/diag_scripts/hydrology/derive_evspsblpot.py", line 35, in tetens_derivative
    exponent = iris.analysis.maths.exp(emp_a * tas / (emp_b + tas))
  File "/home/sarah/anaconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 452, in __add__
    return self.__binary_operator__(other, self._MODE_ADD)
  File "/home/sarah/anaconda3/envs/esmvaltool/lib/python3.8/site-packages/iris/coords.py", line 425, in __binary_operator__
    raise iris.exceptions.NotYetImplementedError(emsg)
iris.exceptions.NotYetImplementedError: Coord + AuxCoord

I explained the bug here SciTools/iris/issues/4000. As a workaround, the script derive_evspsblpot.py needs refactoring.

@SarahAlidoost
Copy link
Contributor Author

I made a PR refactoring derive_evspsblpot.py . Now, both recipes runs are successful. The differences between time series of pet obtained by this PR [and esmvalcore 2.2.1 and iris 3.0.1] and pet obtained by original script [and esmvalcore 2.0.0 and iris 2.4.0] are negligible, shown in this figure
pet_diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant