Closed sum1lim closed 4 years ago
Overall, looks very good. I ran generate_climos
on a bunch of files with weird history attributes, like date-last lines, histories with no dates at all, every kind of weirdness I can remember seeing in our data. It worked well on all of them.
However, if I run generate_climos
on a file with no history attribute at all, the start and end lines do not appear. We hope any data files we process will have a history attribute, but they don't always, and it would be nice to support that case.
(If you would like to make a data file with no history attribute for testing, you can use the update_metadata
script in this project to remove the history attribute from an existing file.)
Also, a very small formatting change; there's no space between -o
and the output directory:
Mon May 25 11:49:10 2020: end : generate_climos -ooutput/ streamflow_peace_CanESM2_rcp85_r1i1p1.nc -p mean
I would like to hear any suggestion if there are more necessary arguments to be shown in history attribute.
It would be nice to have the -g
argument if the user has specified one. The longitude normalization code possibly generates files that some tools can't read, though investigating that issue has been a low priority. It might be useful to know which files are affected by checking their history.
…nded
As described in issue #82,
generate_climos
did not update history attribute for its own command(while it still updatedcdo
commands ran insidegenerate_climos
). For example:the last 3
cdo
commands ran as a part ofgenerate_climos
command, but it is almost impossible to know the information(time & arguments) ofgenerate_climos
was performed on. Therefore, additional lines that describe `generate_climos' command were desired to be present in the history attribute. This commit satisfies the desired functionality by generating the following result:Yet, the command line arguments shown in the history only include
-o; --outdir
filepaths
. Adding more arguments would require passingargs
or more parameters whencreate_climo_files
is called ingenerate_climos
script. I would like to hear any suggestion if there are more necessary arguments to be shown in history attribute.For the record,
black
command has not been applied to the changed files yet.