Closed oliverwm1 closed 4 years ago
"We should probably move from using gsutil
to gcsfs
but I suggest doing that in a later PR." please open an issue for this, before we forget.
"We should probably move from using
gsutil
togcsfs
but I suggest doing that in a later PR." please open an issue for this, before we forget.
Issued opened. #33
@mcgibbon Can we merge this? It seems like we have both approved it.
(Edited 2019-11-20 to reflect current PR)
Closes #8, closes #23, closes #25.
In order to allow a per-file specification of initial conditions and forcing files (as well as whether to link or copy particular files) this PR introduces a low-level representation of the
config
dictionary calledasset_list
. Thisasset_list
is a list of dicts. Each dict represents one file, and has information about its source name/location, target name and location relative to the root of the run-directory, and whether to copy or link.API changes:
config['patch_files']
(these will overwrite any files specified in initial conditions or forcing)Other notes:
The functions
link_or_copy_directory
,link_directory
have been removed.copy_file
andgsutil_is_installed
have been moved to the new _asset_list.py. Some test refactoring had to be done because of this.I put a few of the tests for
asset_list
intest_forcingdata.py
because they rely on the existence of downloaded input data and lists of forcing/initial condition data, which already exist intest_forcingdata.py
.Added a missing required file (
fv_core.res.nc
) to the restart initial conditions required filenames intest_forcingdata.py
My method for generating an asset_list from a google cloud storage url is not great (some funky string manipulation on output from
gsutil ls
). We should probably move from usinggsutil
togcsfs
but I suggest doing that in a later PR.