MOM_streaming_filter module reference

Streaming band-pass filter for detecting the instantaneous tidal signals in the simulation

Data Types

Filter_CS

Control structure for the MOM_streaming_filter module

Functions/Subroutines

Filt_register

This subroutine registers the filter variables given the number of filters and the grid

Filt_init

This subroutine initializes the filters

Filt_accum

This subroutine timesteps the filter equations. Here, u is the broadband input signal from the model, and u1 is the filtered, narrowband output signal, obtained from the solution of the filter equations.

Detailed Description

By Chengzhu Xu (chengzhu.xu@oregonstate.edu) and Edward D. Zaron

The algorithm detects the instantaneous, narrowband tidal signals (u1) from the broadband model output (u) by solving a set of coupled ODEs (the filter equations) at each time step. In the filter equations, u1 is approximately the part of the signal that oscillates at the filter's target frequency, and s1 is approximately the imaginary complement in time of u1.

Major revision on Dec 9, 2024: The filters are no longer hard-coded. Instead, multiple filters with tidal frequencies or arbitrary frequencies as their target frequencies can be turned on. The filter names are specified in MOM_input and must consist of two letters/numbers. If the name of a filter is the same as the name of a tidal constituent, then the corresponding tidal frequency will be used as its target frequency. Otherwise, the user must specify the target frequency. In either case, the target frequency is specified by "FILTER_${FILTER_NAME}_OMEGA".

The restarting capability has also been implemented. Because the filtering is a point-wise operation, all variables are considered as fields, even if they are velocity components.

Xu, C., & Zaron, E. D. (2024). Detecting instantaneous tidal signals in ocean models utilizing streaming band-pass filters. Journal of Advances in Modeling Earth Systems, 16, e2024MS004319. https://doi.org/10.1029/2024MS004319

Type Documentation

type, public :: Filter_CS

Control structure for the MOM_streaming_filter module

Parameters
  • is

    Lower and upper bounds of input data

  • ie

    Lower and upper bounds of input data

  • js

    Lower and upper bounds of input data

  • je

    Lower and upper bounds of input data

  • key

    Identifier of the variable to be filtered

  • filter_names

    Names of filters

  • filter_omega

    Target frequencies of filters [rad T-1 ~> rad s-1]

  • filter_alpha

    Bandwidth parameters of filters [nondim]

  • s1

    A dummy variable for solving the system of ODEs [A]

  • u1

    Filtered data, representing the narrow-band signal oscillating around the target frequency [A]

  • old_time

    The time of the previous accumulating step [T ~> s]

Functions/Subroutine Documentation

subroutine Filt_register(nf, key, grid, HI, CS, restart_CS)

This subroutine registers the filter variables given the number of filters and the grid

Parameters
  • nf [in]

    Number of filters to be used in the simulation

  • key [in]

    Identifier of the variable to be filtered

  • grid [in]

    Horizontal grid location: "h", "u", or "v"

  • HI [in]

    Horizontal index type structure

  • CS [out]

    Control structure of MOM_streaming_filter

  • restart_CS [inout]

    MOM restart control structure

  • n_filters

    Labels of filters [nondim]

Callees call graph
Callees of mom_streaming_filter::filt_register calls cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_restart MOM_restart cluster_mom_streaming_filter MOM_streaming_filter mom_error_handler::mom_error MOM_error mom_io::set_axis_info set_axis_info mom_restart::interface::register_restart_field register_restart_field (interface) mom_streaming_filter::filt_register Filt_register mom_streaming_filter::filt_register->mom_error_handler::mom_error mom_streaming_filter::filt_register->mom_io::set_axis_info mom_streaming_filter::filt_register->mom_restart::interface::register_restart_field
Text view
Callers call graph
Callers of mom_streaming_filter::filt_register calls cluster_mom_barotropic MOM_barotropic cluster_mom_streaming_filter MOM_streaming_filter mom_barotropic::register_barotropic_restarts register_barotropic_restarts mom_streaming_filter::filt_register Filt_register mom_barotropic::register_barotropic_restarts->mom_streaming_filter::filt_register
Text view
subroutine Filt_init(param_file, US, CS, restart_CS)

This subroutine initializes the filters

Parameters
  • param_file [in]

    A structure to parse for run-time parameters

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    Control structure of MOM_streaming_filter

  • restart_CS [in]

    MOM restart control structure

  • mdl

    This module's name

  • filter_name_str

    List of filters to be registered

Callees call graph
Callees of mom_streaming_filter::filt_init calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_restart MOM_restart cluster_mom_streaming_filter MOM_streaming_filter cluster_mom_tidal_forcing MOM_tidal_forcing mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_restart::interface::query_initialized query_initialized (interface) mom_streaming_filter::filt_init Filt_init mom_streaming_filter::filt_init->mom_error_handler::mom_error mom_streaming_filter::filt_init->mom_file_parser::interface::get_param mom_streaming_filter::filt_init->mom_restart::interface::query_initialized mom_tidal_forcing::tidal_frequency tidal_frequency mom_streaming_filter::filt_init->mom_tidal_forcing::tidal_frequency
Text view
Callers call graph
Callers of mom_streaming_filter::filt_init calls cluster_mom_barotropic MOM_barotropic cluster_mom_streaming_filter MOM_streaming_filter mom_barotropic::barotropic_init barotropic_init mom_streaming_filter::filt_init Filt_init mom_barotropic::barotropic_init->mom_streaming_filter::filt_init
Text view
subroutine Filt_accum(u, u1, Time, US, CS)

This subroutine timesteps the filter equations. Here, u is the broadband input signal from the model, and u1 is the filtered, narrowband output signal, obtained from the solution of the filter equations.

Parameters
  • u1 [out]

    Output of the filter [A]

  • Time [in]

    The current model time

  • US [in]

    A dimensional unit scaling type

  • CS [inout]

    Control structure of MOM_streaming_filter

  • u [in]

    Input into the filter [A]

  • now

    The current model time [T ~> s]

  • dt

    Time step size for the filter equations [T ~> s]

  • c1

    Coefficients for the filter equations [nondim]

  • c2

    Coefficients for the filter equations [nondim]

Callees call graph
Callees of mom_streaming_filter::filt_accum calls cluster_mom_streaming_filter MOM_streaming_filter cluster_mom_time_manager MOM_time_manager mom_streaming_filter::filt_accum Filt_accum mom_time_manager::time_to_real time_to_real mom_streaming_filter::filt_accum->mom_time_manager::time_to_real
Text view
Callers call graph
Callers of mom_streaming_filter::filt_accum calls cluster_mom_barotropic MOM_barotropic cluster_mom_streaming_filter MOM_streaming_filter mom_barotropic::btstep btstep mom_streaming_filter::filt_accum Filt_accum mom_barotropic::btstep->mom_streaming_filter::filt_accum
Text view
API generated with Flint · Rendered from reStructuredText