FMS Coupler  2022.03
Functions/Subroutines | Variables
ice_ocean_flux_exchange_mod Module Reference

Functions/Subroutines

subroutine, public ice_ocean_flux_exchange_init (Time, Ice, Ocean, Ocean_state, ice_ocean_boundary, ocean_ice_boundary, Dt_cpl_in, debug_stocks_in, do_area_weighted_flux_in, ex_gas_fields_ice, ex_gas_fluxes, do_ocean, slow_ice_ocean_pelist_in)
 
subroutine, public flux_ice_to_ocean (Ice, Ocean, Ice_Ocean_Boundary)
 
subroutine, public flux_ice_to_ocean_finish (Time, Ice_Ocean_Boundary)
 flux_ice_to_ocean_finish carrries out a final set of tasks that should only occur on the ocean processors, including data override and perhaps saving diagnostics. More...
 
subroutine, public flux_ocean_to_ice (Ocean, Ice, Ocean_Ice_Boundary)
 Takes the ocean model state and interpolates it onto the bottom of the ice. More...
 
subroutine, public flux_ocean_to_ice_finish (Time, Ice, Ocean_Ice_Boundary)
 flux_ocean_to_ice_finish carrries out a final set of tasks that should only occur on the slow-ice processors, including data override and perhaps saving diagnostics. More...
 
subroutine, public flux_ice_to_ocean_stocks (Ice)
 Updates Ice and Ocean stocks. More...
 
subroutine, public flux_ocean_from_ice_stocks (ocean_state, Ocean, Ice_Ocean_boundary)
 Updates Ocean stocks due to input that the Ocean model gets. More...
 
subroutine flux_ice_to_ocean_redistribute (ice, ocean, ice_data, ocn_bnd_data, type, do_area_weighted)
 Performs a globally conservative flux redistribution across ICE/OCN. Assumes that the ice/ocn grids are the same. If ocean is present, then assume different mpp domans and redistribute. More...
 
subroutine divide_by_area (data, area)
 Divide data by area while avoiding zero area elements. More...
 
subroutine check_flux_conservation (Ice, Ocean, Ice_Ocean_Boundary)
 Check flux conservation for routine flux_ice_to_ocean_redistribute when do_area_weighted_flux = false and true. More...
 

Variables

integer, parameter regrid =1
 
integer, parameter redist =2
 
integer, parameter direct =3
 
logical debug_stocks = .false.
 
logical do_area_weighted_flux = .false.
 
integer cplocnclock
 
integer fluxoceaniceclock
 
integer fluxiceoceanclock
 
real dt_cpl
 
integer, dimension(:), allocatable slow_ice_ocean_pelist
 

Function/Subroutine Documentation

◆ check_flux_conservation()

subroutine ice_ocean_flux_exchange_mod::check_flux_conservation ( type(ice_data_type), intent(inout)  Ice,
type(ocean_public_type), intent(inout)  Ocean,
type(ice_ocean_boundary_type), intent(inout)  Ice_Ocean_Boundary 
)
private

Check flux conservation for routine flux_ice_to_ocean_redistribute when do_area_weighted_flux = false and true.

◆ divide_by_area()

subroutine ice_ocean_flux_exchange_mod::divide_by_area ( real, dimension(:,:), intent(inout)  data,
real, dimension(:,:), intent(in)  area 
)
private

Divide data by area while avoiding zero area elements.

◆ flux_ice_to_ocean()

subroutine, public ice_ocean_flux_exchange_mod::flux_ice_to_ocean ( type(ice_data_type), intent(in)  Ice,
type(ocean_public_type), intent(in)  Ocean,
type(ice_ocean_boundary_type), intent(inout)  Ice_Ocean_Boundary 
)
Parameters
[in]iceA derived data type to specify ice boundary data
[in]oceanA derived data type to specify ocean boundary data
[in,out]ice_ocean_boundaryA derived data type to specify properties and fluxes passed from ice to ocean

◆ flux_ice_to_ocean_finish()

subroutine, public ice_ocean_flux_exchange_mod::flux_ice_to_ocean_finish ( type(fmstime_type), intent(in)  Time,
type(ice_ocean_boundary_type), intent(inout)  Ice_Ocean_Boundary 
)

flux_ice_to_ocean_finish carrries out a final set of tasks that should only occur on the ocean processors, including data override and perhaps saving diagnostics.

Parameters
[in]timeCurrent time
[in,out]ice_ocean_boundaryA derived data type to specify properties and fluxes passed from ice to ocean

◆ flux_ice_to_ocean_redistribute()

subroutine ice_ocean_flux_exchange_mod::flux_ice_to_ocean_redistribute ( type(ice_data_type), intent(in)  ice,
type(ocean_public_type), intent(in)  ocean,
real, dimension(:,:), intent(in)  ice_data,
real, dimension(:,:), intent(out)  ocn_bnd_data,
integer, intent(in)  type,
logical, intent(in)  do_area_weighted 
)
private

Performs a globally conservative flux redistribution across ICE/OCN. Assumes that the ice/ocn grids are the same. If ocean is present, then assume different mpp domans and redistribute.

Note
Should be invoked by all PEs

◆ flux_ice_to_ocean_stocks()

subroutine, public ice_ocean_flux_exchange_mod::flux_ice_to_ocean_stocks ( type(ice_data_type), intent(in)  Ice)

Updates Ice and Ocean stocks.

Integrate the fluxes over the surface and in time.

Parameters
[in]iceA derived data type to specify ice boundary data

◆ flux_ocean_from_ice_stocks()

subroutine, public ice_ocean_flux_exchange_mod::flux_ocean_from_ice_stocks ( type(ocean_state_type), pointer  ocean_state,
type(ocean_public_type), intent(in)  Ocean,
type(ice_ocean_boundary_type), intent(in)  Ice_Ocean_boundary 
)

Updates Ocean stocks due to input that the Ocean model gets.

This subroutine updates the stocks of Ocean by the amount of input that the Ocean gets from Ice component. Unlike subroutine flux_ice_to_ocean_stocks() that uses Icefluxes to update the stocks due to the amount of output from Ice,this subroutine uses Ice_Ocean_boundaryfluxes to calculate the amount of input to the Ocean. These fluxes are the ones that Ocean model uses internally to calculate its budgets. Hence there should be no difference between this input and what Ocean model internal diagnostics uses. This bypasses the possible mismatch in cell areas between Ice and Ocean in diagnosing the stocks of Ocean and should report a conserving Ocean component regardless of the glitches in fluxes.

The use of this subroutine in conjunction with subroutine flux_ice_to_ocean_stocks() will also allow to directly diagnose the amount "stocks lost in exchange" between Ice and Ocean

◆ flux_ocean_to_ice()

subroutine, public ice_ocean_flux_exchange_mod::flux_ocean_to_ice ( type(ocean_public_type), intent(in)  Ocean,
type(ice_data_type), intent(in)  Ice,
type(ocean_ice_boundary_type), intent(inout)  Ocean_Ice_Boundary 
)

Takes the ocean model state and interpolates it onto the bottom of the ice.

The following quantities are transferred from the Ocean to the ocean_ice_boundary_type:

        t_surf = surface temperature (deg K)
        frazil = frazil fluxes since the last coupling step (J/m2)
        u_surf = zonal ocean current/ice motion (m/s)
        v_surf = meridional ocean current/ice motion (m/s)
        v_surf = meridional ocean current/ice motion (m/s)
       sea_lev = sea level used to drive ice accelerations (m)
 
Exceptions
FATAL,Ocean_Ice_Boundary%xtype must be DIRECT or REDIST.The value of variable xtype of ice_ocean_boundary_type data must be DIRECT or REDIST.
Parameters
[in]oceanA derived data type to specify ocean boundary data
[in]iceA derived data type to specify ice boundary data
[in,out]ocean_ice_boundaryA derived data type to specify properties and fluxes passed from ocean to ice

◆ flux_ocean_to_ice_finish()

subroutine, public ice_ocean_flux_exchange_mod::flux_ocean_to_ice_finish ( type(fmstime_type), intent(in)  Time,
type(ice_data_type), intent(in)  Ice,
type(ocean_ice_boundary_type), intent(inout)  Ocean_Ice_Boundary 
)

flux_ocean_to_ice_finish carrries out a final set of tasks that should only occur on the slow-ice processors, including data override and perhaps saving diagnostics.

Parameters
[in]timeCurrent time
[in]iceA derived data type to specify ice boundary data
[in,out]ocean_ice_boundaryA derived data type to specify properties and fluxes passed from ocean to ice

◆ ice_ocean_flux_exchange_init()

subroutine, public ice_ocean_flux_exchange_mod::ice_ocean_flux_exchange_init ( type(fmstime_type), intent(in)  Time,
type(ice_data_type), intent(inout)  Ice,
type(ocean_public_type), intent(inout)  Ocean,
type(ocean_state_type), pointer  Ocean_state,
type(ice_ocean_boundary_type), intent(inout)  ice_ocean_boundary,
type(ocean_ice_boundary_type), intent(inout)  ocean_ice_boundary,
real, intent(in)  Dt_cpl_in,
logical, intent(in)  debug_stocks_in,
logical, intent(in)  do_area_weighted_flux_in,
type(fmscoupler1dbc_type), intent(in)  ex_gas_fields_ice,
type(fmscoupler1dbc_type), intent(in)  ex_gas_fluxes,
logical, intent(in)  do_ocean,
integer, dimension(:), intent(in)  slow_ice_ocean_pelist_in 
)
Parameters
[in]timeThe model's current time
[in,out]iceA derived data type to specify ice boundary data
[in,out]oceanA derived data type to specify ocean boundary data
[in,out]ice_ocean_boundaryA derived data type to specify properties and fluxes passed from ice to ocean
[in,out]ocean_ice_boundaryA derived data type to specify properties and fluxes passed from ocean to ice

Variable Documentation

◆ cplocnclock

integer ice_ocean_flux_exchange_mod::cplocnclock
private

◆ debug_stocks

logical ice_ocean_flux_exchange_mod::debug_stocks = .false.
private

◆ direct

integer, parameter ice_ocean_flux_exchange_mod::direct =3
private

◆ do_area_weighted_flux

logical ice_ocean_flux_exchange_mod::do_area_weighted_flux = .false.
private

◆ dt_cpl

real ice_ocean_flux_exchange_mod::dt_cpl
private

◆ fluxiceoceanclock

integer ice_ocean_flux_exchange_mod::fluxiceoceanclock
private

◆ fluxoceaniceclock

integer ice_ocean_flux_exchange_mod::fluxoceaniceclock
private

◆ redist

integer, parameter ice_ocean_flux_exchange_mod::redist =2
private

◆ regrid

integer, parameter ice_ocean_flux_exchange_mod::regrid =1
private

◆ slow_ice_ocean_pelist

integer, dimension(:), allocatable ice_ocean_flux_exchange_mod::slow_ice_ocean_pelist
private