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

NetCDF time axis - last touch needed #24

Open
espiritocz opened this issue Nov 24, 2021 · 6 comments
Open

NetCDF time axis - last touch needed #24

espiritocz opened this issue Nov 24, 2021 · 6 comments

Comments

@espiritocz
Copy link

Hi,

first of all - the tool is really useful. I want to recommend it as the primary time series viewer solution after our specific open-source tool.

please improve the viewing of nc files - there is probably a minor (annoying) bug - let me explain:

  1. example of my input file (1 MB): okr_pokus_1km.zip
  2. load the input file to QGIS - select 'cum' as the layer (the cummulative time series)
  3. open the Temporal Profile tool -> Settings -> X-axis as Time -> tick 'Use NetCDF time dimension'
  4. click on some pixel to see temporal plot --- it will give error ending on:
    ...
    File "/home/espi/.local/lib/python3.7/site-packages/numpy/core/_asarray.py", line 83, in asarray
    return array(a, dtype, copy=False, order=order)
    TypeError: float() argument must be a string or a number, not 'real_datetime'
  5. now, the workaround that is working (that I use): Settings->X-axis as Time - just click on a pixel (will work), then tick the 'Use NetCDF time dimension' - click on a pixel - voila, it now shows correct time series dates

My 'plot library' is matplotlib.

I assume this should be some quick-to-fix issue for you. I will then launch your tool for a global awareness (including NASA ;) )

cheers!

@radosuav
Copy link
Contributor

Thanks for the kind words :) Are you using version 2.0.3 of the plugin? Because I couldn't reproduce the problem with your example file. If yes, then could you post the full exception trace.

@espiritocz
Copy link
Author

espiritocz commented Nov 25, 2021 via email

@radosuav
Copy link
Contributor

I never set specific versions of Python packages but use whatever is provided by OSGeo4W. Currently that's matplotlib 3.3.2, numpy 1.20.2. nc_time_axis is bundled together with the plugin and it's version 1.2.

Could you try the changes in https://github.com/DHI-GRAS/qgis-temporal-profile/tree/fix_netcdf_time

@espiritocz
Copy link
Author

espiritocz commented Nov 26, 2021 via email

@radosuav
Copy link
Contributor

The only Python package bundled with the plugin is nc_time_axis because it's small and not installable through OSGeo4W. I work on Windows so all the other package (netCDF4, numpy, etc.) come from OSGeo4W.

Did you have a chance to try the https://github.com/DHI-GRAS/qgis-temporal-profile/tree/fix_netcdf_time branch?

@espiritocz
Copy link
Author

espiritocz commented Nov 29, 2021 via email

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

No branches or pull requests

2 participants