The create-ras-tmp action is designed to prepare a plan RAS model input file for execution by copying the necessary structure and data from an existing RAS hdf file.
-
Input Validation:
- Verifies that both
srcandlocal_destattributes are provided - Parses
save_to_remoteto boolean value - Checks for remote destination name if remote saving is requested
- Verifies that both
-
File Creation:
- Creates a new temporary file at the specified location
- Copies core RAS datasets: "Geometry", "Plan Data", "Event Conditions"
- Preserves essential file metadata attributes:
- File Type
- File Version
- Projection
- Units System
-
Remote Storage:
- If
save_to_remoteis true, copies the temporary file to the specified remote destination
- If
| Attribute | Type | Required | Description |
|---|---|---|---|
src |
string | Yes | Name of the source RAS file in the model directory |
local_dest |
string | Yes | Name of the temporary file to create |
save_to_remote |
string | No | Whether to save the temporary file to a remote destination (default: "false") |
remote_dest |
string | No | Name of the remote data source if save_to_remote is true |
{
"action": "create-ras-tmp",
"attributes": {
"src": "source_model.ras",
"local_dest": "temp_model.ras",
"save_to_remote": "true",
"remote_dest": "remote_storage"
}
}The action returns descriptive error messages for:
- Missing required attributes
- File I/O errors during creation or copying
- Invalid boolean conversion for
save_to_remote - Remote storage failures
- The temporary file is created in the model directory specified by
actions.MODEL_DIR(/sim/model) - All copied datasets and attributes maintain their original structure and data types