NUOPC Cap UFS

From WikiROMS
Jump to navigationJump to search
ROMS ESMF/NUOPC Cap for the UFS

Overview

This document describes the stand-alone ROMS ESMF/NUOPC cap module to be used by third-party coupling frameworks, like the Unified Forecast System (UFS). It is a lightweight software layer on top of ROMS that can be used by NUOPC-based packages (CMEPS/CDEPS, NEMS, and others) to couple to other Earth System Models (ESMs). Detailed information about ESMF/NUOPC and its implementation in ROMS can be found on the Earth System Modeling Framework WikiROMS page.

A NUOPC cap is a Fortran module that serves as the interface to a model when it's used in a NUOPC-based coupled system. The term cap is used because it is a lightweight software layer that sits on top of model code, making calls to it and exposing model data structures in a standard way.

Capabilities

The ROMS cap module contains a set of subroutines that are required by NUOPC. These subroutines are called by the NUOPC infrastructure according to a predefined calling sequence. Some subroutines are called during the initialization of the coupled system, some during the run of the coupled system, and some during the finalization of the coupled system.

The initialization sequence is the most complex and is governed by the NUOPC technical rules. Details about the initialization sequence can be found in the NUOPC Reference Manual. The ROMS cap requires ESMF version 8 or higher.

ROMS_SetServices Entry point to the ROMS cap and the only public routine. It sets the ROMS component shared-object entry points for using NUOPC generic methods for initialize, run, and finalize.
ROMS_Create Allocates module internal structures and process configuration from YAML file: roms_cmeps.yaml.
ROMS_SetInitializeP1 ROMS component phase 1 initialization which sets import and export fields long and short names into its respective state.
ROMS_SetInitializeP2 ROMS component phase 2 initialization which initializes the ROMS component (ROMS_Initialize), sets component grid (ROMS_SetGridArrays), and adds fields into import and export into respective states.
ROMS_DataInit Exports ROMS component fields during initialization or restart.
ROMS_SetClock Sets ROMS component date calendar, start and stop times, and coupling interval.
ROMS_SetRunClock Sets ROMS run clock manually to avoid getting zero time stamps at the first regridding call.
ROMS_CheckImport Checks if ROMS component import field is at the correct time.
ROMS_SetGridArrays Sets ROMS component staggered, horizontal grid arrays, grid area, and land/sea mask if any.
ROMS_SetStates Adds ROMS component export and import fields into its respective state.
ROMS_ModelAdvance Advances ROMS component for a coupling interval. It calls ROMS_Import and ROMS_Export routines.
ROMS_SetFinalize Finalizes ROMS component execution.
ROMS_Import Loads import fields into ROMS internal kernel arrays.
ROMS_Export Exports ROMS fields to other gridded components.
Report_TimeStamp Reports coupling time-stamp.