Git Product home page Git Product logo

Comments (5)

Sciprios avatar Sciprios commented on September 15, 2024 1

I found the same issue.

When digging through the code I added a print statement of the data variable before line 228 (in trajectory_generator.py) knowing this variable was the cause of the error. Then, trialling the inputs I knew would throw the error I found the data variable doesn't contain everything that is expected by Pysplit. Instead it only contains the date and time of extraction with the initial lat/lon. Apologies but I didn't copy a broken example but a complete line should look like this: ['1', '1', '96', '1', '12', '6', '0', '0', '-48.0', '37.377', '-26.028', '1547.1', '850.3'] which is the line at the end of a full trajectory file.This led me to the conclusion that there was an issue with the HYSPLIT run rather than a bug with Pysplit.

From here I ran HYSPLIT manually using the same parameters as I passed to PYSPLIT and found that it was throwing an error regarding the meteorological files and the parameters fitting. The problem with HYSPLIT is that it still produces an output file even if there's something wrong with the run. But just to double check I was going down the right path I re-downloaded the meteorological file and behold, it worked perfectly.

Still I believe this bug still persists. If a HYSPLIT generation fails this could cause other unknown issues. @mscross have you considered how you might want Pysplit to handle these occurrences? I have got around this by simply ignoring and then listing all failed runs in an errors folder but this isn't hugely useful for most people.

So after a long ramble my suggestion would be to re-download your meteorological data, just to double check.

from pysplit.

lindecai avatar lindecai commented on September 15, 2024 1

I know how to reproduce the issue.

In the bulk_trajgen_example.py, the params:
years=[2008]
months=[1]
hours=[11,17,23]
get_reverse=True
runtime=-120
monthslice=slice(0, 32, 1)

and if I have gdas datas in the meteo_dir:
gads1.jan08.w1
gads1.jan08.w2
gads1.jan08.w3
gads1.jan08.w4
gads1.jan08.w5

then I run the script. when generate trajectory at jan 31th 23:00 in the code,that is colgatejan1500winter2008013123, the trajectogy points generaged by hysplit is empty,and then _reversetraj_whilegen function throw the exception.

But if I append one gdas data:
gdas1.feb08.w1

then the problem gone.

Hysplit failed to generate traj points because of lacking of the last time session data. Then when we want to reverse traj,it will fail (int data convert).

from pysplit.

mscross avatar mscross commented on September 15, 2024

I've never seen this error before. Can you attach the file that this is occurring on?

from pysplit.

aherrera1721 avatar aherrera1721 commented on September 15, 2024

I was having the same issue. Change int(data[4]) to int(float(data[4])).

from pysplit.

jon-maurer avatar jon-maurer commented on September 15, 2024

Hi I've run into a similar looking issue but none of these fixes seem to work. My error is:
ValueError: invalid literal for int() with base 10: 'n'

I've made sure all my files are named properly (gdas1.jan2013.wk1) but the error still pops up. Does anyone have any ideas? I'm super lost. The only thing I could think of would be the file extension (.bin) but those are just there by default.

Any help would be super appreciated!

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.