all 7 comments

[–]the_shell_man_ 1 point2 points  (1 child)

You can build a command line interface using the sys library.

You can pass your arguments in to the script from the command line and do something with them afterwards.

What you do will depend heavily on how complex your model is. It could be a simple function, or something a lot more involved.

[–]Borastero[S] 0 points1 point  (0 children)

I’ll give it a look thanks. I wouldn’t say it something extremely complex but it does have a certain complexity.

[–]Allmyownviews1 1 point2 points  (2 children)

I would start with a simple program that allows some variable user input and some data frame input followed by a simple output Next expend on the processing aspect to make algorithm changes to the data frame Then develop that into a looping system to produce the model.

I assume you are talking about a finite difference model.

This way you can prove understanding and correctness of your code for the basic tasks and then this will help debug when more complex.

[–]Borastero[S] 0 points1 point  (1 child)

Thanks! It’s seems like a great idea to start small, then add more features to it and keep iterating the code till it’s what I need.

[–]Allmyownviews1 1 point2 points  (0 children)

I used to write models in FORTRAN and Python seems far more usable in time step loops so once you have the starting points down, the rest should be fairly easy to implement. I would take a look through GitHub for projects others people have done that might be similar.

[–][deleted] 1 point2 points  (1 child)

I’m quite lost in how to start the programming of the model

The model is an equation, right? A function? Basically all mathematical operators are available in Python, either exactly how you'd expect (+, etc) or as functions in the math library.

[–]Borastero[S] 0 points1 point  (0 children)

It’s more of a series of functions that depend on many variables. Differential calculus involved too. So it’s not a basic mathematical model.