Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • F fluidsim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 25
    • Issues 25
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • fluiddynfluiddyn
  • fluidsim
  • Issues
  • #80
Closed
Open
Issue created May 21, 2021 by Jason Reneuve@jreneuveDeveloper

self.keys_fields is altered when plotting kzkhomega spectra

Calling sim.output.spatiotemporal_spectra.plot_kzkhomega() on a new simulation yields the following error:

In [3]: sim.output.spatiotemporal_spectra.plot_kzkhomega()
Computing spectra...
load times series...
Getting times from rank 0... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
tmin=       0, tmax= 141.633, nit=55
keys: ['vx', 'vy', 'vz', 'b', 'Khd', 'Khr', 'Kp']
Rearranging... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--
Rank 00000...  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   0% -:--:--
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-650eecfaad36> in <module>
----> 1 sim.output.spatiotemporal_spectra.plot_kzkhomega()

~/Dev/fluidsim/fluidsim/base/output/spatiotemporal_spectra.py in plot_kzkhomega(self, key_field, tmin, tmax, dtype, equation, xmax, ymax, cmap, vmin, vmax)
    829         if not path_file.exists():
    830             if self.nb_dim == 3:
--> 831                 self.save_spectra_kzkhomega(
    832                     tmin=tmin, tmax=tmax, dtype=dtype, save_urud=save_urud
    833                 )

~/Dev/fluidsim/fluidsim/base/output/spatiotemporal_spectra.py in save_spectra_kzkhomega(self, tmin, tmax, dtype, save_urud)
    684         # compute spectra
    685         print("Computing spectra...")
--> 686         spectra = self.compute_spectra(tmin=tmin, tmax=tmax, dtype=dtype)
    687 
    688         # get kz, kh

~/Dev/fluidsim/fluidsim/base/output/spatiotemporal_spectra.py in compute_spectra(self, tmin, tmax, dtype)
    629 
    630         # load time series as state_spect arrays + times
--> 631         series = self.load_time_series(tmin=tmin, tmax=tmax, dtype=dtype)
    632 
    633         # compute spectra

~/Dev/fluidsim/fluidsim/base/output/spatiotemporal_spectra.py in load_time_series(self, keys, tmin, tmax, dtype)
    565                         for key in keys:
    566                             skey = key + "_Fourier"
--> 567                             data = file[skey + "_loc"][:, its_file]
    568 
    569                             if self.nb_dim == 3:

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

~/miniconda3/lib/python3.8/site-packages/h5py/_hl/group.py in __getitem__(self, name)
    286                 raise ValueError("Invalid HDF5 object reference")
    287         else:
--> 288             oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
    289 
    290         otype = h5i.get_type(oid)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/h5o.pyx in h5py.h5o.open()

KeyError: "Unable to open object (object 'Khd_Fourier_loc' doesn't exist)"

the problem comes from here, where keys_plot is not a deep copy of self.keys_fields: alteration to the former also change the later, breaking load_time_series.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking