question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with salem when running workflow.init_glacier_directories

See original GitHub issue

Dear fmaussion, Thanks a lot for this nice model. I am trying to run it but I keep on getting error messages related to the salem package. It is installed in my oggm_env, I will try to explain:

When I try:

gdirs = workflow.init_glacier_directories(rgi_ids, from_prepro_level=3, prepro_border=80)

I get the following error message:

_crs = salem.check_crs(rgi_entity.crs)

NameError: name ‘salem’ is not defined_

This happens in workflow.py because salem is not imported, despite it is installed within the environment. Furthermore, I have tried to run the tests within salem package, and all yield the same error:

‘ImportError: cannot import name ‘_MultiFileCloser’ from ‘xarray.backends.api’ (/home/mon/miniconda3/envs/oggm_env/lib/python3.8/site-packages/xarray/backends/api.py)’

I am working in Ubuntu20.04 within a Virtual Box. Thanks a lot for your help.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RPelliterocommented, Mar 22, 2021

Hi, thanks lilianschuster and fmaussion because your suggestion solved the issue with salem: by downgrading xarray 0.17.0 to xarray 0.16.2 Thanks to all

0reactions
fmaussioncommented, Mar 22, 2021

Ah yes ok @TimoRoth had a recent PR on salem to fix that I think: https://github.com/fmaussion/salem/pull/195

Maybe need a salem release soon

Read more comments on GitHub >

github_iconTop Results From Across the Web

OGGM-Shop and Glacier Directories in OGGM
Each OGGM run needs a single folder where to store the results of the computations for all glaciers. This is called a “working...
Read more >
oggm/_workflow.py at master - GitHub
"""Logs a message to the glacier directory. It is usually called by the :py:class:`entity_task` decorator, normally.
Read more >
How to use the oggm.workflow.init_glacier_regions function in ...
Let OGGM do it: gdirs = workflow.init_glacier_regions(rgidf) # We need to know which period we have data for log.info('Process the climate data.
Read more >
API Reference — OGGM 1.5.4.dev37+gde1d901.d20220906 ...
Downloads and copies the reference list of t* to the working directory. workflow.climate_tasks. Run all climate related entity tasks on a list of...
Read more >
Getting started with OGGM: Ötztal case study
In the test-workflow directory you can have a look at the various files we ... The function execute_task can run a task on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found