I am using python as an interface to several fortran files in my model. I want to duplicate a fortran file several times but at each copy, I will change the parameters that describe my model.
For example: I have the fortran file below
!file.f
! This is a fortran code
!Parameters
alpha = 0.5
beta = 100
...
I want to copy file.f several times such that I will have file1.f, file2.f, file3.f, etc. However, at each file duplicated I want to change the parameters alpha and beta automatically. Thanks
EDIT: Let me explain a little further. I am using python to implement data assimilation (kalman filtering) to models that have already been developed in fortran. Basically, how it works is at each specified time step the fortran models stop running, then I integrate real world data to model data and I do this in python. Then after the integration (assimilation), I rerun the same models however this time using new parameters that I obtained from fusing data from model and observations and the new initial conditions. I use python to do everything except run the model which is being done by fortran.