Git Product home page Git Product logo

Comments (7)

jdegraw avatar jdegraw commented on September 15, 2024

I am having the same problem. I have code that I had been using to create bulk trajectories for quite some time, very similar to the the code provided in the examples on this site. When I ran the code yesterday, this error occurred. The error still occurred after pysplit was uninstalled and reinstalled. I am running the code in a Jupyter Notebook.

from pysplit.

zhx215 avatar zhx215 commented on September 15, 2024

Hi,

I worked with pysplit for a small research project a while ago. I used generate.bulktraj to create 50k trajectories without any issue. Although I am not familiar with debugging, you can find my code at https://github.com/zhx215/Patagonia_HYSPLIT/blob/master/Trajectory%20generation%20and%20preparation.ipynb

I run code on Windows PC so directory format will be different. Hope it could help.

from pysplit.

petegombert avatar petegombert commented on September 15, 2024

zhx215, I tried running your code (with different variables) and got the same error as before.

from pysplit.

petegombert avatar petegombert commented on September 15, 2024

Not sure if this matters but I have noticed that the filename associated with the error is 'examplenov1500spring2017112403' which is odd because I believe the season should be fall?

from pysplit.

mscross avatar mscross commented on September 15, 2024

generate_bulktraj() looks for the current working directory ('/Users/petergombert'), makes the output directory if it doesn't already exist ('/Users/petergombert/traj'), then changes the cwd to the hysplit4 working directory ('/Users/petergombert/hysplit4/working'). From within the hysplit working directory it calls HYSPLIT to make the trajectory, then tries to move it to the output directory.

What I think is happening here: because a relative path is provided for the output directory, shutil.move() is trying to send the file to '/Users/petergombert/hysplit4/working/traj/trajname' instead of '/Users/petergombert/traj/trajname'. Try trajectory generation again using an absolute path for your output directory and let us know if that works, and I will update the documentation for this function to indicate that absolute paths should be used.

The filename indicates 'spring' for November because -63.79 is a southern hemisphere latitude.

Hope this helps!

from pysplit.

petegombert avatar petegombert commented on September 15, 2024

That worked, thanks!

from pysplit.

petegombert avatar petegombert commented on September 15, 2024

I'm actually running into the same error again when running the below code. I had already run roughly 85,000 trajectories on the code and then today it stopped working. I have uninstalled and reinstalled the code on my python 3.7 environment.

Code:

import pysplit as py

hysplit_working = '/Users/petergombert/hysplit4/working'
output_dir = '/Users/petergombert/trajectories'
meteo_dir = '/Volumes/u1113223/Documents/mf'

lat = -62
lon = 137.5
time = 23
year = 2018
month = 1
runtime = -120
altitude = 1000
name = 'test'

py.generate_bulktraj(name, hysplit_working, output_dir, meteo_dir, [year], [month], [time], [altitude], (lat,lon), runtime,
monthslice = slice(28, 29, 1),
get_reverse=False,
get_clipped=False, hysplit='/Users/petergombert/hysplit4/exec/hyts_std')

from pysplit.

Related Issues (20)

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.