mscross / pysplit

A package for HYSPLIT air parcel trajectory analysis.
BSD 3-Clause "New" or "Revised" License
149 stars 80 forks source link

Problem with running Pysplit #45

Closed hernandezcortes closed 5 years ago

hernandezcortes commented 5 years ago

Hello Melissa,

I hope that you are doing well. I am trying to use Pysplit. I am using Jupyter with Python 2.7 and I have the following problem. I tried very hard to follow your steps in the Github repository examples but when I am not able to make it work.

  1. I am running the following command: import pysplit pysplit.generate_bulktraj("Example", hysplit_working="C:/hysplit4/working", output_dir="C:/Users/dell/Dropbox/Pysplit/trajectories/facilityexample", meteo_dir="C:/Users/dell/Dropbox/Pysplit/gdas", years=[2005], months=[6], hours= [6,12,18], altitudes=[500,1500], coordinates=(34.4326157, -119.9028486), run=48, monthslice=slice(0, 32, 1), meteo_bookends=([0]), get_reverse=False, get_clipped=False, hysplit="C:/hysplit4/exec/hyts_std")

  2. I get the following error:

    AttributeError Traceback (most recent call last)

    in () 1 import pysplit ----> 2 pysplit.generate_bulktraj("Example", hysplit_working="C:/hysplit4/working", output_dir="C:/Users/dell/Dropbox/Pysplit/trajectories/facilityexample", meteo_dir="C:/Users/dell/Dropbox/Pysplit/gdas", years=[2005], months=[6], hours= [6,12,18], altitudes=[500,1500], coordinates=(34.4326157, -119.9028486), run=48, monthslice=slice(0, 32, 1), meteo_bookends=([0]), get_reverse=False, get_clipped=False, hysplit="C:/hysplit4/exec/hyts_std")

AttributeError: 'module' object has no attribute 'generate_bulktraj'

I was wondering if you think this is due to an installation problem or something. I hope that you can help me and sorry if the question is too basic.

Best, Danae

mscross commented 5 years ago

Hi Danae,

Only one thing immediately comes to mind- are you using PySPLIT 0.3.4, the most current version (to check, run pysplit.__version__)? This function had a different name in early versions.

Mellissa

hernandezcortes commented 5 years ago

Hi Melissa,

Thanks for the quick response. I am using PySPLIT 0.3.3. Should I change to 0.3.4? Is there any documentation available for 0.3.3 I can refer to?

hernandezcortes commented 5 years ago

Just as a clarification comment. The problem (I think) was that I had installed pysplit in python 3.7... I specified the environment as python 3.5, installed pysplit again and I was able to import pysplit and run bulk trajectories perfectly (with Pysplit 0.3.4).