11 | | * f90nml [https://github.com/marshallward/f90nml] |
12 | | * nmltab [https://github.com/aekiss/nmltab] |
| 11 | * 'f90nml' [https://github.com/marshallward/f90nml] |
| 12 | * 'nmltab' [https://github.com/aekiss/nmltab] (uses 'f90nml') |
| 13 | |
| 14 | 'f90nml' may be used to change entries in the jobcard. You may use the program within own python scripts, or use its cli at the prompt. |
| 15 | |
| 16 | In the later case, |
| 17 | with the option "--patch" it keeps the formatting and the comments of the original input unchanged! |
| 18 | |
| 19 | With the option '-g XXX' you have to specify the namelist in the jobcard you want to change, then you can specify new values for input variables by '-v "variable=VAL"'. |
| 20 | If in the original namelist 'variable' is already defined, its value is replaced, otherwise a line with the new assignment is added. |
| 21 | |
| 22 | '''Attention:''' |
| 23 | * Not setting the right namelist with the option '-g ...' adds the variable to a wrong namelist and leads to a crash of GiBUU.x |
| 24 | * One can give multiple '-v ...' arguments, but all changes are done in the namelist you specified with '-g ...' (no multiple '-g ...' are possible!). |
| 25 | |
| 26 | So, if one wants to change multiple variables in different namelists, one has to call the program again and again for every namelist (or use a short python program, where one can define the patch including differences in multiple namelists.) |
| 27 | |
| 28 | |
| 29 | ''Examples:'' |
| 30 | |
| 31 | * `f90nml -g "input" -v "numTimeSteps=42" --patch in.job out.job` [[BR]]will (correctly) change the number of timesteps to the value '42' and produce the output jobcard 'out.job', which is unchanged otherwise. |
| 32 | |
| 33 | * `f90nml -g "input" -v "numTimeSteps=42" -g "baryonPotential" -v "EQS_Type=42" --patch in.job out.job` [[BR]] will (correctly) change the value of 'EQS_Type' in the namelist 'baryonPotential', but will also (incorrectly) add the line "numTimeSteps=42" in the same namelist. |