register_grid Subroutine

private subroutine register_grid(cfg, schema)

&grid_nml: structured-grid geometry.

Arguments

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

Calls

proc~~register_grid~~CallsGraph proc~register_grid register_grid proc~group_add nml_group_t%group_add proc~register_grid->proc~group_add proc~nml_int nml_int proc~register_grid->proc~nml_int proc~nml_real nml_real proc~register_grid->proc~nml_real proc~schema_add_group nml_schema_t%schema_add_group proc~register_grid->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_grid~~CalledByGraph proc~register_grid register_grid proc~build_rdb_schema build_rdb_schema proc~build_rdb_schema->proc~register_grid 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
integer, private, pointer :: pi
real(kind=wp), private, pointer :: pr
character(len=:), private, pointer :: ps

Source Code

   subroutine register_grid(cfg, schema)
      !! `&grid_nml`: structured-grid geometry.
      type(config_t), target, intent(in) :: cfg
      type(nml_schema_t), intent(inout) :: schema
      type(nml_group_t) :: g
      integer, pointer :: pi
      real(wp), pointer :: pr
      character(len=:), pointer :: ps

      g%name = "grid"
      g%doc = "Structured-grid geometry."
      pi => cfg%nx
      call g%add(nml_int("nx", pi, "Number of physical cells in x", min=1))
      pi => cfg%ny
      call g%add(nml_int("ny", pi, "Number of physical cells in y", min=1))
      pr => cfg%dx
      call g%add(nml_real("dx", pr, "Cell size in x", units="m"))
      pr => cfg%dy
      call g%add(nml_real("dy", pr, "Cell size in y", units="m"))
      pi => cfg%nghost
      call g%add(nml_int("nghost", pi, "Ghost cells on each side", min=1))
      call schema%add_group(g)
   end subroutine register_grid