Often, generating OBC datasets can be done all in one shot, but in longer and larger cases (like running the Northwest Atlantic for a year) we need to start iterating through the generation. Generating open boundary condition (OBC) data is essential for the entire model runtime but can be time-consuming and resource-intensive.
The Extract Forcings Workflow in CrocoDash helps manage this by breaking data access into smaller, more manageable components.
Extract Forcings Workflow Overview¶
The workflow is enabled in all cases. When configure_forcings is called, it triggers copying of a config folder into the case input directory forcing folder
and the generation of a configuration file to download the required boundary condition & other forcing files.
Users can trigger the workflow by running driver.py in the forcing folder and adjusting config options in the config file, which can be done from the command line or in python.
Folder Structure¶
config.json – Defines the region-specific requirements and run parameters.
README – Explains the workflow.
driver.py – Executes all scripts needed to obtain OBC data.
raw_data/, regridded_data/ – Intermediate storage for workflow steps, preventing the need to rerun all scripts at once.
Scripts -> not in the config folder, but in CrocoDash under extract_forcings¶
get_data_piecewise – Retrieves raw, unprocessed data in chunks (size defined by
config["params"]["step"]) and saves it toconfig["raw_data"].regrid_data_piecewise – Processes raw data and stores it in
config["regridded_data"].merge_piecewise_dataset – Combines regridded data into the final dataset for model input.
Specific Forcing Functions - Things like chlorophyll, tides, runoff, bgc, ...
How to Use¶
Identify and allocate available computing resources.
Adjust the
stepparameter in theconfig.jsonto match resource constraints (default: 5 days).Run each step manually or use
driver.pyas a guide.
See more information in the CrocoDash docs¶
(https://
Step 2: Run the iterative OBC processor¶
In a terminal session, locate the extract_forcings folder, which is put in the case input directory under the forcing folder, default called “glorys/extract_forcings”. Then, execute the driver.py to generate boundary conditions. It uses the config.json file to generate the OBCs in a piecewise format before merging. Modify the code as you see fit!
Especially consider adjusting the specific function being used in config.json to download the data. For example, On Derecho? Using the RDA reader. On a local computer? Use the python GLORYS api. You can change the function by changing the respective line in config.json.
You can run the driver with
python driver.py --all. Use the help option to learn more!