Added functions to take a reservoir model for a full tile and multiple subdomains and split each subdomain out into its own model artifact. The fv3gfs configuration for reservoir models uses a mapping from rank integer -> reservoir model to load for that rank. Since we defined the subdomain division using the tile partitioner it's easy to keep the ranks and subdomain models aligned with the model cpu layout.
Added public API:
adapters.split_multi_subdomain_model: splits a single model object into its component subdomains as models
adapters.generate_subdomain_models_from_all_tiles: take model rank to save path mapping and expand each model into subdomain models saved in an output directory
projects/reservoir/scripts/split-rc-model.py: A script that splits models and uploads them to a new directory using an input yaml (e.g., models.yaml)
Added functions to take a reservoir model for a full tile and multiple subdomains and split each subdomain out into its own model artifact. The fv3gfs configuration for reservoir models uses a mapping from rank integer -> reservoir model to load for that rank. Since we defined the subdomain division using the tile partitioner it's easy to keep the ranks and subdomain models aligned with the model cpu layout.
Added public API:
adapters.split_multi_subdomain_model
: splits a single model object into its component subdomains as modelsadapters.generate_subdomain_models_from_all_tiles
: take model rank to save path mapping and expand each model into subdomain models saved in an output directoryprojects/reservoir/scripts/split-rc-model.py
: A script that splits models and uploads them to a new directory using an input yaml (e.g.,models.yaml
)[x] Tests added
Coverage reports (updated automatically):