FMS  2024.03
Flexible Modeling System
atmos_ocean_fluxes_mod

Implementation of routines to solve the gas fluxes at the ocean surface for a coupled model as outlined in the Biotic-HOWTO documentation below, revision 1.7, 1999/10/05. More...

Functions/Subroutines

integer function, public aof_set_coupler_flux (name, flux_type, implementation, atm_tr_index, param, flag, mol_wt, ice_restart_file, ocean_restart_file, units, caller, verbosity)
 Set the values for a coupler flux. More...
 
subroutine, public atmos_ocean_fluxes_init (gas_fluxes, gas_fields_atm, gas_fields_ice, verbosity, use_r4_kind)
 Initialize gas flux structures. Will allocate to r8_kind unless use_r4_kind is present and true. More...
 
subroutine, public atmos_ocean_type_fluxes_init (verbosity)
 Initialize the coupler type flux tracers Initialize the /coupler_mod/types/ fields in the field manager. These fields include: More...
 

Variables

real(r8_kind), parameter epsln =1.0e-30_r8_kind
 

Detailed Description

Implementation of routines to solve the gas fluxes at the ocean surface for a coupled model as outlined in the Biotic-HOWTO documentation below, revision 1.7, 1999/10/05.

Author
Richard Slater, John Dunne

Ocean Carbon Model Intercomparison Study II: Gas exchange coupler.

This module will take fields from an atmospheric and an oceanic model and calculate ocean surface fluxes for CO2, O2, CFC-11 or CFC-12 as outlined in the various HOWTO documents at the OCMIP2 website. Multiple instances of a given tracer may be given, resulting in multiple surface fluxes. Additionally, data may be overridden at the individual fields, or fluxes. This could be used in the absence of an atmospheric or oceanic model.

Function/Subroutine Documentation

◆ aof_set_coupler_flux()

integer function, public atmos_ocean_fluxes_mod::aof_set_coupler_flux ( character(len=*), intent(in)  name,
character(len=*), intent(in)  flux_type,
character(len=*), intent(in)  implementation,
integer, intent(in), optional  atm_tr_index,
class(*), dimension(:), intent(in), optional  param,
logical, dimension(:), intent(in), optional  flag,
class(*), intent(in), optional  mol_wt,
character(len=*), intent(in), optional  ice_restart_file,
character(len=*), intent(in), optional  ocean_restart_file,
character(len=*), intent(in), optional  units,
character(len=*), intent(in), optional  caller,
integer, intent(in), optional  verbosity 
)

Set the values for a coupler flux.

Returns
its index (0 on error)
Exceptions
FATAL,Empty name givenName is empty
FATAL,Could not get coupler fluxcoupler_index is less than 1
FATAL,Could not set coupler fluxcoupler_index is less than 1
FATAL,Could not get the current listCurrent list is empty
FATAL,Could not change to the new listfm_change_list(coupler_list) returns false
FATAL,Blank flux_type givenflux_type or implementation is empty
FATAL,Undefined flux_type given from field_tableflux_type does not equal flux_type_test
FATAL,Undefined flux_type given as argument to the subroutineflux_type does not equal flux_type_test
FATAL,Undefined flux_type/implementation (implementation given from field_table)flux_type does not equal flux_type_test
FATAL,Undefined flux_type/implementation (flux_type given from field_table)flux_type does not equal flux_type_test
FATAL,Undefined flux_type/implementation (both given from field_table)flux_type does not equal flux_type_test
FATAL,Undefined flux_type/implementation given as argument to the subroutineflux_type does not equal flux_type_test
NOTE,Number of parameters provided for [variable] does not match the number of parameters requiredMismatch between parameter input and the parameters being replaced
FATAL,Could not change back to [current_list]
FATAL,Empty [name] list
Parameters
[in]verbosityA 0-9 integer indicating a level of verbosity.

Definition at line 114 of file atmos_ocean_fluxes.F90.

◆ atmos_ocean_fluxes_init()

subroutine, public atmos_ocean_fluxes_mod::atmos_ocean_fluxes_init ( type(coupler_1d_bc_type), intent(inout)  gas_fluxes,
type(coupler_1d_bc_type), intent(inout)  gas_fields_atm,
type(coupler_1d_bc_type), intent(inout)  gas_fields_ice,
integer, intent(in), optional  verbosity,
logical, intent(in), optional  use_r4_kind 
)

Initialize gas flux structures. Will allocate to r8_kind unless use_r4_kind is present and true.

Exceptions
FATAL,Could not get number of fluxesNumber of gas fluxes is not a valid number
NOTE,No gas fluxesNo gas fluxes were found
NOTE,Processing [gas_fluxes%num_bcs] gas fluxesGas fluxes were found
FATAL,[name] is not a listname needs to be a list, or typ is incorrectly defined
FATAL,Flux index, [ind] does not match array index, [n] for [name]
FATAL,Problem changing to [name]
FATAL,Undefined flux_type given for [name]: [gas_fluxes%bc(n)%flux_type]
FATAL,"Undefinedimplementation given for [name]: [gas_fluxesbc(n)flux_type]/implementation/[gas_fluxesbc(n)implementation]" @throw FATAL, "No param for [name]: need [num_parameters]" @throw FATAL, "Wrong number of param for [name]: [size(gas_fluxesbc(n)param(:))] given, need [num_parameters]" @throw FATAL, "No params needed for [name] but has size of [size(gas_fluxesbc(n)param(:))]" @throw FATAL, "Num_parameters is negative for [name]: [num_parameters]" @throw FATAL, "No flag for [name]: need [num_flags]" @throw FATAL, "Wrong number of flag for [name]: [size(gas_fluxesbc(n)flag(:))] given, need [num_flags]" @throw FATAL, "No flags needed for [name] but has size of [size(gas_fluxesbc(n)flag(:))]" @throw FATAL, "Num_flags is negative for [name]: [num_flags]" @throw FATAL, "Problem dumping fluxes tracer tree" @throw FATAL, "Number of fluxes does not match across the processors: [gas_fluxesnum_bcs] fluxes"
Parameters
[in,out]gas_fluxesStructure containing the gas fluxes between the atmosphere and the ocean and parameters related to the calculation of these fluxes. The properties stored in this type are set here, but the actual value arrays are set later.
[in,out]gas_fields_atmStructure containing atmospheric surface variables that are used in the calculation of the atmosphere-ocean gas fluxes. The properties stored in this type are set here, but the actual value arrays are set later.
[in,out]gas_fields_iceStructure containing ice-top and ocean surface variables that are used in the calculation of the atmosphere-ocean gas fluxes. The properties stored in this type are set here, but the actual value arrays are set later.
[in]verbosityA 0-9 integer indicating a level of verbosity.
[in]use_r4_kindAllocate field data to r4 kind instead of r8 kind. Defaults to r8_kind if not present.

Definition at line 448 of file atmos_ocean_fluxes.F90.

◆ atmos_ocean_type_fluxes_init()

subroutine, public atmos_ocean_fluxes_mod::atmos_ocean_type_fluxes_init ( integer, intent(in), optional  verbosity)

Initialize the coupler type flux tracers Initialize the /coupler_mod/types/ fields in the field manager. These fields include:

 air_sea_gas_flux_generic/
                          implementation/
                                         ocmip2/
                                                num_parameters = 2
                          num_flags = 0
                          use_atm_pressure = t
                          use_10m_wind_speed = t
                          pass_through_ice = f
                          atm/
                              name/
                                   pcair, u10, psurf
                              long_name/
                                        'Atmospheric concentration'
                                        'Wind speed at 10 m'
                                        'Surface atmospheric pressure'
                              units/
                                    'mol/mol', 'm/s', 'Pa'
                          ice/
                              name/
                                   alpha, csurf, sc_no
                              long_name/
                                        'Solubility from atmosphere'
                                        'Surface concentration from ocean'
                                        'Schmidt number'
                              units/
                                    'mol/m^3/atm', 'mol/m^3', 'dimensionless'
                          flux/
                               name/
                                    flux, deltap, kw
                               long_name/
                                         'Surface gas flux'
                                         'ocean-air delta pressure'
                                         'piston velocity'
                               units/
                                     'mol/m^2/s', 'uatm', 'm/s'
 air_sea_gas_flux/
                  implementation/
                                 ocmip2/
                                        num_parameters = 2
                                 ocmip2_data/
                                             num_parameters = 2
                                 linear/
                                        num_parameters = 3
                  num_flags = 0
                  use_atm_pressure = t
                  use_10m_wind_speed = t
                  pass_through_ice = f
                  atm/
                      name/
                           pcair, u10, psurf
                      long_name/
                                'Atmospheric concentration'
                                'Wind speed at 10 m'
                                'Surface atmospheric pressure'
                      units/
                            'mol/mol', 'm/s', 'Pa'
                  ice/
                      name/
                           alpha, csurf
                      long_name/
                                'Solubility from atmosphere'
                                'Surface concentration from ocean'
                      units/
                            'mol/m^3/atm', 'mol/m^3'
                  flux/
                       name/
                            flux
                       long_name/
                                 'Surface gas flux'
                       units/
                             'mol/m^2/s'
 air_sea_deposition/
                    implementation/
                                   dry/
                                       num_parameters = 1
                                   wet/
                                       num_parameters = 1
                    num_flags = 0
                    use_atm_pressure = f
                    use_10m_wind_speed = f
                    pass_through_ice = t
                    atm/
                        name/
                             depostion
                        long_name/
                                  'Atmospheric deposition'
                        units/
                              'kg/m^2/s'
                    ice/
                        name/
                        long_name/
                        units/
                    flux/
                         name/
                              flux
                         long_name/
                                   'Surface deposition'
                         units/
                               'mol/m^2/s'
 land_sea_runoff/
                 implementation/
                                river/
                                      num_parameters = 1
                 num_flags = 0
                 use_atm_pressure = f
                 use_10m_wind_speed = f
                 pass_through_ice = t
                 atm/                  ! really land (perhaps should change this?)
                     name/
                          runoff
                     long_name/
                               'Concentration in land runoff'
                     units/
                           'kg/m^3'
                 ice/
                     name/
                     long_name/
                     units/
                 flux/
                      name/
                           flux
                      long_name/
                                'Concentration in land runoff'
                      units/
                            'mol/m^3'
Exceptions
FATAL,Couldnot set the \coupler_mod\ list
FATAL,Couldnot set the \GOOD\ list
FATAL,Couldnot set the \/coupler_mod/fluxes\ list
FATAL,Couldnot set the \/coupler_mod/types\ list
FATAL,Couldnot change to \/coupler_mod/types\
FATAL,Couldnot set the \air_sea_gas_flux_generic\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic/implementation\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic/implementation/ocmip2\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic/atm\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic/ice\ list
FATAL,Couldnot set the \air_sea_gas_flux_generic/flux\ list
FATAL,Couldnot set the \air_sea_gas_flux\ list
FATAL,Couldnot set the \air_sea_gas_flux/implementation\ list
FATAL,Couldnot set the \air_sea_gas_flux/implementation/ocmip2\ list
FATAL,Couldnot set the \air_sea_gas_flux/implementation/ocmip2_data\ list
FATAL,Couldnot set the \air_sea_gas_flux/implementation/linear\ list
FATAL,Couldnot set the \air_sea_gas_flux/atm\ list
FATAL,Couldnot set the \air_sea_gas_flux/ice\ list
FATAL,Couldnot set the \air_sea_gas_flux/flux\ list
FATAL,Couldnot set the \air_sea_deposition\ list
FATAL,Couldnot set the \air_sea_deposition/implementation\ list
FATAL,Couldnot set the \air_sea_deposition/implementation/dry\ list
FATAL,Couldnot set the \air_sea_deposition/implementation/wet\ list
FATAL,Couldnot set the \air_sea_deposition/atm\ list
FATAL,Couldnot set the \air_sea_deposition/ice\ list
FATAL,Couldnot set the \air_sea_deposition/flux\ list
FATAL,Couldnot set the \land_sea_runoff\ list
FATAL,Couldnot set the \land_sea_runoff/implementation\ list
FATAL,Couldnot set the \land_sea_runoff/implementation/river\ list
FATAL,Couldnot set the \land_sea_runoff/atm\ list
FATAL,Couldnot set the \land_sea_runoff/ice\ list
FATAL,Couldnot set the \land_sea_runoff/flux\ list
FATAL,Couldnot change to \/\
FATAL,Problemdumping /coupler_mod/types tree
Parameters
[in]verbosityA 0-9 integer indicating a level of verbosity.

Definition at line 1103 of file atmos_ocean_fluxes.F90.