Git Product home page Git Product logo

Comments (6)

xigrug avatar xigrug commented on September 15, 2024

I try to run the bulk_trajgen_example.py on linux system
:
years = [2013]
months = [8]
hours = [5]
altitudes = [10, 3000, 6000]
location = (32.04, 118.78)
runtime = -120

the data is :

gdas1.aug2013.w1 gdas1.aug2013.w3 gdas1.aug2013.w5
gdas1.aug2013.w2 gdas1.aug2013.w4
gdas1.jul2013.w4 gdas1.jul2013.w5
gdas1.sep2013.w1


pysplit.generate_bulktraj(basename, working_dir, storage_dir, meteo_dir,
years, months, hours, altitudes, location, runtime,
monthslice=slice(0, 32, 2), get_reverse=True,
get_clipped=True,hysplit='/public/home/hysplit/hysplit_study/trunk/exec/hyts_std')

hysplit@admin[examples]$ python bulk_trajgen_example.py
HYSPLIT4 - Initialization
USE: svn info | tail -n3
to fill in these three records
with the version information!
Calculation Started ... please be patient
ERROR sfcinp: ASCDATA.CFG file not found!
See MESSAGE file for more information
['13', '8', '1', '5', '32.040', '118.780', '10.0'] I print the data[4] is the latitude not the day
Traceback (most recent call last):
File "bulk_trajgen_example.py", line 174, in
get_clipped=True,hysplit='/public/home/hysplit/hysplit_study/trunk/exec/hyts_std')
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/pysplit/trajectory_generator.py", line 170, in generate_bulktraj
meteo_dir, meteofiles, controlfname)
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/pysplit/trajectory_generator.py", line 230, in _reversetraj_whilegen
day = int(data[4])
ValueError: invalid literal for int() with base 10: '32.040'

from pysplit.

xigrug avatar xigrug commented on September 15, 2024

Windows also has the same problem, when I change the code, it didn't work.

year = int(data[0])
 mon  = int(data[1])
 day  = int(data[2])
 hour = int(data[3])
 lat  = float(data[4])
 lon  = float(data[5])
 alt  = float(data[6])

hysplit@admin[examples]$ python bulk_trajgen_example.py
HYSPLIT4 - Initialization
USE: svn info | tail -n3
to fill in these three records
with the version information!
Calculation Started ... please be patient
ERROR sfcinp: ASCDATA.CFG file not found!
See MESSAGE file for more information
xigrugaug0010summer2013080105
[' 8 1\n', ' GDAS 13 7 22 0 0\n', ' GDAS 13 7 29 0 0\n', ' GDAS 13 8 1 0 0\n', ' GDAS 13 8 8 0 0\n', ' GDAS 13 8 15 0 0\n', ' GDAS 13 8 22 0 0\n', ' GDAS 13 8 29 0 0\n', ' GDAS 13 9 1 0 0\n', ' 1 BACKWARD OMEGA \n', ' 13 8 1 5 32.040 118.780 10.0\n', ' 1 PRESSURE\n']
['13', '8', '1', '5', '32.040', '118.780', '10.0']
HYSPLIT4 - Initialization
USE: svn info | tail -n3
to fill in these three records
with the version information!
Calculation Started ... please be patient
ERROR sfcinp: ASCDATA.CFG file not found!
See MESSAGE file for more information
[' 8 1\n', ' GDAS 13 7 22 0 0\n', ' GDAS 13 7 29 0 0\n', ' GDAS 13 8 1 0 0\n', ' GDAS 13 8 8 0 0\n', ' GDAS 13 8 15 0 0\n', ' GDAS 13 8 22 0 0\n', ' GDAS 13 8 29 0 0\n', ' GDAS 13 9 1 0 0\n', ' 1 BACKWARD OMEGA \n', ' 13 8 1 5 32.040 118.780 10.0\n', ' 1 PRESSURE\n']
Traceback (most recent call last):
File "bulk_trajgen_example.py", line 174, in
get_clipped=True,hysplit='/public/home/hysplit/hysplit_study/trunk/exec/hyts_std')
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/pysplit/trajectory_generator.py", line 173, in generate_bulktraj
_cliptraj(output_cdir, trajname)
File "/public/home/hysplit/software/anaconda3/lib/python3.6/site-packages/pysplit/trajectory_generator.py", line 308, in _cliptraj
if len(contents[ind + 1]) > len(contents[ind + 2]):
IndexError: list index out of range

from pysplit.

nicrie avatar nicrie commented on September 15, 2024

Hey xigrug,

I am definitely not an expert on that sort of stuff, but I just had the same error and solved it in my case by following the hint of the error message.

It says

ERROR sfcinp: ASCDATA.CFG file not found!

In my case I found this file in the HySPLIT GUI\working directory. Running pysplit.generate_bulktraj() with the correct working directory parameter (hysplit_working = your/path/to/HySPLIT GUI/working) solved the problem.

Good luck!

from pysplit.

mscross avatar mscross commented on September 15, 2024

I have not yet tested PySPLIT on Linux.

ValueError: invalid literal for int() with base 10: '32.040' Looks like #54. What version of HYSPLIT are you using and can you attach the file that is throwing the error?

from pysplit.

mariajmolina avatar mariajmolina commented on September 15, 2024

I have used PySPLIT successfully on Linux, with HYSPLIT revision version 868 (back in 2017). I have not used it with the latest HYSPLIT version yet though.

from pysplit.

wjjxjd avatar wjjxjd commented on September 15, 2024

Can you give you HYSPLIT revision version 868 on Linux?

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.