ai2cm / fv3config

Manipulate FV3GFS run directories
Apache License 2.0
1 stars 0 forks source link

Add a function to move a local config dict and all of it's assets to google cloud storage #47

Open nbren12 opened 4 years ago

nbren12 commented 4 years ago

For the one-step workflows, @oliverwm1 wrote some code which prepares a local configuration dictionary with a mix of local and remote assets. The initial conditions are on GCS, but the diag_table and some other things are local. It would be nice to refactor the manual file-moving code in that workflow to a function in this package. I imagine something like this interface

def upload_config_to_url(config, url):
    """Upload a config dict and all of it's assets to the url
    """

The main difficulty is what the locations of the assets should be. Maybe, url should point to a directory, which will contain the assets and the configuration yaml.

nbren12 commented 4 years ago

Write function to upload a model "config" and it's assets to GCS.

oliverwm1 commented 4 years ago

I would suggest

def upload_config_to_url(config, url) -> config:

where the returned config dict has all of its local paths updated to the appropriate remote urls.