Closed madDipanjan closed 2 months ago
What is the intended method to set expnr if not using the bash script and only the matlab script?
Yeah, I guess this requires having expnr defined globally before write_inputs.m is run. Given that write_inputs.m is run as a script, and so runs in the global scope anyway, it doesn't seem too problematic an approach?
This does make me slightly uneasy with the error message though, suggesting that expnr should be provided as an input argument, which doesn't make sense for a script.
Since we wanted the write_inputs.m script to be not being edited by general/new users (as they will be running it using the shell script), we have gone with this approach where expnr gets passed as an input argument. This is also useful for running the script entirely from terminal.
Unfortunately, while running only the write_inputs.m matlab script one needs to source the EXPDIR and TOOLS path explicitly, and then run matlab -r "expnr=
Ok, it's not pretty but I guess no worse than before. Just make sure to add to the documentation because I do think it is use the GUI sometimes.
This pull request allow running write_inputs.m on terminal with a simple run command being consistent with other uDALES tool calls.
u-dales/tools/write_inputs.sh experiment/
There is no need to edit or set any variables explicitly other than setting them once inside config.sh and namoptions file inside the case directory.
Partially resolves
194
198