GithubHelp home page GithubHelp logo

climtas's People

Contributors

howol76 avatar scottwales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

climtas's Issues

to_netcdf_throttled fails with newer xarray version.

Since the latest update to the stable conda module, we got two errors with climtas storing files, here's one:

Traceback (most recent call last):
  File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.04/bin/era5grib", line 10, in <module>
    sys.exit(main())
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/era5grib/era5grib.py", line 341, in main
    func(**dargs)
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/era5grib/era5grib.py", line 177, in era5grib_wrf
    save_grib(ds, output, format=format)
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/era5grib/era5grib.py", line 55, in save_grib
    climtas.io.to_netcdf_throttled(ds, tmp_compressed)
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/climtas/io.py", line 89, in to_netcdf_throttled
    f = ds.to_netcdf(str(path), encoding=encoding, compute=False)
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/core/dataset.py", line 1901, in to_netcdf
    return to_netcdf(
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/api.py", line 1072, in to_netcdf
    dump_to_store(
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/api.py", line 1119, in dump_to_store
    store.store(variables, attrs, check_encoding, writer, unlimited_dims=unlimited_dims)
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/common.py", line 265, in store
    self.set_variables(
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/common.py", line 303, in set_variables
    target, source = self.prepare_variable(
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 481, in prepare_variable
    encoding = _extract_nc4_variable_encoding(
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-22.04/lib/python3.9/site-packages/xarray/backends/netCDF4_.py", line 277, in _extract_nc4_variable_encoding
    raise ValueError(
ValueError: unexpected encoding parameters for 'netCDF4' backend: ['szip', 'zstd', 'bzip2', 'blosc']. Valid encodings are: {'fletcher32', 'chunksizes', 'complevel', 'least_significant_digit', 'shuffle', 'contiguous', 'zlib', '_FillValue', 'dtype'}

Error in to_netcdf_throttled graph setup

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-16-7caa70c0c441> in <module>
      1 ds = air_daily.to_dataset()
      2 # Write to netcdf
----> 3 climtas.io.to_netcdf_throttled(ds,"GSWP3_365_Tair.nc")
      4 #ds.to_netcdf("GSWP3_365_Tair.nc",encoding={"temp":{"chunksizes":(360,720,100)}})/g/data3/hh5/public/apps/miniconda3/envs/analysis3-20.01/lib/python3.7/site-packages/climtas/io.py in to_netcdf_throttled(ds, path, complevel, max_tasks, show_progress)
    101     # list
    102     for k, v in old_graph.items():
--> 103         if v[0] == dask.array.core.store_chunk:
    104             store_keys.append(k)
    105             new_graph[k] = None  # Mark the task done in new_graphValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

See /g/data/w35/ccc561/temp/Lina_942/climdata/GSWP3-forScott.ipynb

close climtas?

Is there or does there need to be a way of closing climtas once a client has been started and run?

Eg, I get a message such as:

2023-01-16 09:41:30,695 - distributed.diskutils - INFO - Found stale lock file and directory '/local/p66/rb4844/tmp/dask-worker-space/worker-9nmgxv02', purging

which implies I have an old client still running? Do I need to tell climtas to shut down once a job is completed?

Thanks, Roger

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.