shaharkadmiel / pySW4

Setup, run, post process, and visualize numerical simulations. Primarily SW4
http://shaharkadmiel.github.com/pySW4
GNU General Public License v3.0
28 stars 14 forks source link

Cannot read input/output #17

Open Anokhi1994 opened 5 years ago

Anokhi1994 commented 5 years ago

@megies @shaharkadmiel

So I am using sw4 and pysw4 for my thesis. And I am facing some really issue. I am using already installed module on my university workstation by calling out 'module load sw4' Now two things happen:

1)When I use lon_p=lon or proj=utm in the input file and run the input file using the line 'sw4 4 my simulation crashes given me this error: Fatal input error: ERROR: need to configure SW4 with proj=yes to use projections from the Proj4 library This is one thing.

Secondly When I erase lon_p=lon or proj=utm in the input file and try to run it using pysw4, I cannot use the function read_metdata and the program crashes giving me the error


~/anaconda3/lib/python3.7/site-packages/pySW4/sw4_metadata.py in get_Proj4(self) 105 # warn('No lon_p found... ' 106 # 'setting to {}.'.format(self.grid[0]['lon'])) --> 107 proj_dict['lon_0'] = self.grid[0]['lon'] 108 lon_p = False


So, either I can use proj and pysw4 or not use proj but run the simulation. Kindly help me.

megies commented 5 years ago

1) is not a pySW4 issue, but I've replied in private email

2) @shaharkadmiel the parsing seems to not catch all possible cases when proj is not being used. I guess it's understandable since so many different settings can be used.. @Anokhi1994 if we can resolve 1) then maybe it doesn't matter for you, though. When we get SW4 to run with proj support for you..