Open mwtoews opened 1 year ago
I like first option the most bc it jives with the rest of the code. Can we use the existing functionality for setting the error message? @mwtoews , do you have a feel for how much effort it would be to patch these stops to be more amenable to library calls? Im happy to help on this front if you can work a strategy/approach..or we can divide and conquer?
Wrt option 1 to refactor Fortran, I'll take a look at what John as done and see if I can catch "INVALID power variogram" as a start. But also, raise this with John when you get a chance.
So do think most of the stops
are sourced to the power variogram? If so, we can just trap that on the python side...
I've started some data validation strategies with d470ed54c99644022e5072c6ad497d7983356d38 which operate on either scalars or vectors. E.g., here for install_structured_grid
:
https://github.com/pypest/pypestutils/blob/d470ed54c99644022e5072c6ad497d7983356d38/pypestutils/core.py#L187-L194
These will be expanded elsewhere later.
As mention in https://github.com/pypest/pypestutils/issues/3#issuecomment-1679640834 there are potential issues with the Fortran STOP statements, which will exit the Python process.
Find them in
src
with:There are approx. 50 of these in
src
, mostly with gslib's sgsim_code.f90.There are a few strategies: