register_ocean_thermo Subroutine

private subroutine register_ocean_thermo(cfg, schema)

&ocean_thermo_nml: thermodynamics switch + scalar surface fluxes.

Arguments

Type IntentOptional Attributes Name
type(config_t), intent(in), target :: cfg
type(nml_schema_t), intent(inout) :: schema

Calls

proc~~register_ocean_thermo~~CallsGraph proc~register_ocean_thermo register_ocean_thermo proc~group_add nml_group_t%group_add proc~register_ocean_thermo->proc~group_add proc~nml_enum nml_enum proc~register_ocean_thermo->proc~nml_enum proc~nml_logical nml_logical proc~register_ocean_thermo->proc~nml_logical proc~nml_real nml_real proc~register_ocean_thermo->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_ocean_thermo->proc~schema_add_group error error proc~group_add->error proc~lower lower proc~group_add->proc~lower proc~schema_add_group->error proc~schema_add_group->proc~lower proc~move_group move_group proc~schema_add_group->proc~move_group

Called by

proc~~register_ocean_thermo~~CalledByGraph proc~register_ocean_thermo register_ocean_thermo proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_ocean_thermo proc~read_config_from_string_impl read_config_from_string_impl proc~read_config_from_string_impl->proc~build_rdb_schema proc~read_config_impl read_config_impl proc~read_config_impl->proc~build_rdb_schema proc~read_config read_config proc~read_config->proc~read_config_impl proc~read_config_from_string read_config_from_string proc~read_config_from_string->proc~read_config_from_string_impl proc~build_pending_handle build_pending_handle proc~build_pending_handle->proc~read_config_from_string proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~build_pending_handle proc~rdb_ocean_create_pending rdb_ocean_create_pending proc~rdb_ocean_create_pending->proc~build_pending_handle

Variables

Type Visibility Attributes Name Initial
type(nml_group_t), private :: g
logical, private, pointer :: pl
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_ocean_thermo(cfg, schema)
      !! `&ocean_thermo_nml`: thermodynamics switch + scalar surface fluxes.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      logical, pointer :: pl
      real(wp), pointer :: pr
      character(len=:), pointer :: ps

      g%name = "ocean_thermo"
      g%doc = "Thermodynamics master switch + scalar surface fluxes."
      ps => cfg%ocean%thermo%sw_source
      call g%add(nml_enum("sw_source", ps, &
                          "Shortwave irradiance source: net_heat (legacy) or q_sw", &
                          allowed=[character(len=8) :: "net_heat", "q_sw"]))
      ps => cfg%ocean%thermo%kpp_sw_method
      call g%add(nml_enum("kpp_sw_method", ps, &
                          "KPP shortwave-in-BL method: all_sw | mxl_sw | lv1_sw", &
                          allowed=[character(len=8) :: "all_sw", "mxl_sw", "lv1_sw"]))
      pl => cfg%ocean%thermo%epbl_sw_ctke
      call g%add(nml_logical("epbl_sw_ctke", pl, &
                             "Charge the EPBL TKE ledger for penetrating shortwave"))
      pl => cfg%ocean%thermo%enable_thermodynamics
      call g%add(nml_logical("enable_thermodynamics", pl, &
                             "Run EOS + tracer advection + vertical mixing"))
      pr => cfg%ocean%thermo%q_heat
      call g%add(nml_real("q_heat", pr, "Net surface heat flux (positive down)", &
                          units="W/m^2"))
      pr => cfg%ocean%thermo%q_salt
      call g%add(nml_real("q_salt", pr, "Net surface salt flux (positive salinifies)", &
                          units="kg/m^2/s"))
      pr => cfg%ocean%thermo%sw_pen_frac
      call g%add(nml_real("sw_pen_frac", pr, &
                          "Penetrating fraction of q_heat (0 = off, all at surface)"))
      pr => cfg%ocean%thermo%sw_band_ratio
      call g%add(nml_real("sw_band_ratio", pr, &
                          "Two-band shortwave band-1 weight R (Jerlov type I)"))
      pr => cfg%ocean%thermo%sw_zeta1
      call g%add(nml_real("sw_zeta1", pr, &
                          "Shortwave band-1 e-folding depth", units="m"))
      pr => cfg%ocean%thermo%sw_zeta2
      call g%add(nml_real("sw_zeta2", pr, &
                          "Shortwave band-2 e-folding depth", units="m"))
      call schema%add_group(g)
   end subroutine register_ocean_thermo