ccht-ncsu / Kalpana

Visualization of ADCIRC Model Data in Vector Formats
GNU General Public License v3.0
26 stars 22 forks source link

Did files get renamed? Scripts reference kalpanaExport - does this refer to export.py? #46

Closed david-b-project closed 1 year ago

david-b-project commented 1 year ago

Hello, I'm a student attempting to visualize some ADCIRC data, and I've been looking through this package for a day. I'm using a windows machine and I'm following the installation instructions for windows. I have some prior experience with python, conda, and command line, but I'm having a few issues.

In the scripts, the py and ipynb files refer to "Path of the github repository." - should this be directed toward the github folder called kalpana containing backup.py, downscaling.py, and export.py?

The scripts also call "from kalpanaExport import [functions]" - should this refer to the file export.py above? When I attempt to run the scripts they don't find kalpanaExport - not sure if there is an issue with windows/anaconda prompt, directory structure, or naming.

I tried modifying the import call to "from export import [functions]" to reference the export.py, and that was able to at least find the file and functions. However, python said it needed dask and cmocean packages. I installed these and I'm now getting a different import issue for geopandas, and I'm wondering if I'm heading in the wrong direction.

There is documentation online for using Kalpana here: https://ccht.ccee.ncsu.edu/how-to-run-kalpana/ This documentation refers to the kalpana.py script that is in the backup.zip. Is this script still relevant? Is the NCSU website documentation outdated?

tomas19 commented 1 year ago

Hi David, we changed the entire repo and I haven't found the time yet to update the examples.

Yes, you need to clone the repository and then add that directory to the path with "sys.path.append".

I changed the name of the file from kalpanaExport.py to export.py, I think it is only related to the naming.

The code uses "dask" to run some parts in parallel, and "cmocean" is used if you want to export the bathymetry as kmz. I'll upload later today a new .yml file with all the packages needed.

The documentation on the website is for running the old version of kalpana. As part of my MS, I'm updating the code, but I'll start working on the documentation and examples later this semester.

Please let me know if it works or not Tomas

david-b-project commented 1 year ago

Thanks for the quick response. I'll grab the new yml when its uploaded, update the packages, and try again.

tomas19 commented 1 year ago

I updated the yml file for windows. I also tested the function "nc2shp" to export the ADCIRC outputs as shapefiles with a conda environment created with the provided yml, and it is working. The function to export the files as kmz has a bug that can be due to the new version of the packages. Let me know how it goes.

david-b-project commented 1 year ago

Can you clarify - the install has 2 yml files, I should be using kalpana_windows.yml and not env_kalpanaH2.yml?

The installation readme has the comment: 3. Open the yml file with a text editor and modify last line (prefix) with the path of your miniconda folder. but the new yml has no path like the old one.

How are you running the code? Command line or jupyter?

tomas19 commented 1 year ago

Hi, use the *windows.yml, the other one is for the HPC we are using to run the code.

I typically use jupyter notebooks, but it also works if you call the "nc2shp" function from a .py script.