Closed plesager closed 6 years ago
Yes go ahead with (1) removing ALTDIR in hiresclim only (may still be useful in ecmean?) and (2) with adding the -u USER option (in hc.sh and _masterhiresclim.sh) to define a USERexp at the command line.
But I am not 100% sold on using sed
to handle it, when compared to using an env variable in the config file only: export ${USERexp:=$USER}
.
What if somebody wants to change something else than $USER
? With the sed solution, you have to edit the sed
command in _masterhiresclim.sh at the risk of breaking it. With the en variable, you can just decide what USERexp would replace by just changing your config to export ${USERexp:=ANOTHERDEFAULT}
. This is way more flexible. Maybe the USERexp flag needs another easy-to-remember name then: alternate, substitute, replacement, token... none as easy to remember than a "-u USER"?
On the other hand, this "what if" is very hypothetical, a niche case. So if you prefer and want to go ahead with a sed
call, there is no problem.
Hi, I introduced the -u USER using the env variable as you suggested, it seems working fine and we are testing it in https://github.com/oloapinivad/ece3-postproc/commit/9b786d3e3674afd8b1924c26f1237fb61bd9ba1d.
For the moment we kept the export ${USERexp:=$USER}
structure but we can further generalize it later (for different replacements). Once we are sure it is working I will do a pull request. Thanks for the help.
I think we can close this issue if everyone is satisfied with the -u flag
Yes I think it is working as you want. I just committed (cad847b) some minor fixes to correctly handle -u
in timeseries. In any case, this can be close.
@oloapinivad wrote in https://github.com/plesager/ece3-postproc/pull/11#issuecomment-369208141