mom_streaming_filter module reference

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

More…

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.

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 mom_streaming_filter/filter_cs

Control structure for the MOM_streaming_filter module.

Type fields:
  • % is [integer] :: Lower and upper bounds of input data.

  • % ie [integer] :: Lower and upper bounds of input data.

  • % js [integer] :: Lower and upper bounds of input data.

  • % je [integer] :: Lower and upper bounds of input data.

  • % nf [integer] :: Number of filters to be used in the simulation.

  • % key [character (len=8)] :: Identifier of the variable to be filtered.

  • % filter_names [character (len=2)(:),allocatable] :: Names of filters.

  • % filter_omega [real(:),allocatable] :: Target frequencies of filters [rad T-1 ~> rad s-1].

  • % filter_alpha [real(:),allocatable] :: Bandwidth parameters of filters [nondim].

  • % s1 [real(:,:,:),allocatable] :: A dummy variable for solving the system of ODEs [A].

  • % u1 [real(:,:,:),allocatable] :: Filtered data, representing the narrow-band signal.

  • % old_time [real] :: The time of the previous accumulating step [T ~> s].

Function/Subroutine Documentation

subroutine mom_streaming_filter/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

Call to:

mom_error_handler::mom_error mom_io::set_axis_info

Called from:

mom_barotropic::register_barotropic_restarts

subroutine mom_streaming_filter/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

Call to:

mom_error_handler::mom_error mom_tidal_forcing::tidal_frequency

Called from:

mom_barotropic::barotropic_init

subroutine mom_streaming_filter/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]

Called from:

mom_barotropic::btstep