ocean_fold_begin Subroutine

public subroutine ocean_fold_begin(nslab)

Open a group of nslab (rows x layers) slabs in total (an upper bound is fine). Grows the buffers, with a warning, if the run did not reserve enough. No-op when inactive.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nslab

Sum over the group’s fields of rows x layers.


Calls

proc~~ocean_fold_begin~~CallsGraph proc~ocean_fold_begin ocean_fold_begin proc~grow_buffers grow_buffers proc~ocean_fold_begin->proc~grow_buffers to_string to_string proc~ocean_fold_begin->to_string warning warning proc~ocean_fold_begin->warning

Called by

proc~~ocean_fold_begin~~CalledByGraph proc~ocean_fold_begin ocean_fold_begin proc~barotropic_substep_nonlinear barotropic_substep_nonlinear proc~barotropic_substep_nonlinear->proc~ocean_fold_begin interface~ocean_fold_north_v_face ocean_fold_north_v_face proc~barotropic_substep_nonlinear->interface~ocean_fold_north_v_face proc~fold_centre_2d fold_centre_2d proc~fold_centre_2d->proc~ocean_fold_begin proc~fold_centre_3d fold_centre_3d proc~fold_centre_3d->proc~ocean_fold_begin proc~fold_corner_2d fold_corner_2d proc~fold_corner_2d->proc~ocean_fold_begin proc~fold_u_2d fold_u_2d proc~fold_u_2d->proc~ocean_fold_begin proc~fold_u_3d fold_u_3d proc~fold_u_3d->proc~ocean_fold_begin proc~fold_v_2d fold_v_2d proc~fold_v_2d->proc~ocean_fold_begin proc~fold_v_3d fold_v_3d proc~fold_v_3d->proc~ocean_fold_begin proc~ocean_fold_wrap_centre_3d_state ocean_fold_wrap_centre_3d_state proc~ocean_fold_wrap_centre_3d_state->proc~ocean_fold_begin proc~ocean_fold_wrap_centre_flat ocean_fold_wrap_centre_flat proc~ocean_fold_wrap_centre_flat->proc~ocean_fold_begin proc~ocean_fold_wrap_eta_2d ocean_fold_wrap_eta_2d proc~ocean_fold_wrap_eta_2d->proc~ocean_fold_begin proc~ocean_fold_wrap_state ocean_fold_wrap_state proc~ocean_fold_wrap_state->proc~ocean_fold_begin proc~ocean_fold_wrap_stress ocean_fold_wrap_stress proc~ocean_fold_wrap_stress->proc~ocean_fold_begin proc~ocean_fold_wrap_time_means ocean_fold_wrap_time_means proc~ocean_fold_wrap_time_means->proc~ocean_fold_begin proc~ocean_fold_wrap_visc_rem ocean_fold_wrap_visc_rem proc~ocean_fold_wrap_visc_rem->proc~ocean_fold_begin interface~ocean_fold_north_centre ocean_fold_north_centre interface~ocean_fold_north_centre->proc~fold_centre_2d interface~ocean_fold_north_centre->proc~fold_centre_3d interface~ocean_fold_north_corner ocean_fold_north_corner interface~ocean_fold_north_corner->proc~fold_corner_2d interface~ocean_fold_north_u_face ocean_fold_north_u_face interface~ocean_fold_north_u_face->proc~fold_u_2d interface~ocean_fold_north_u_face->proc~fold_u_3d interface~ocean_fold_north_v_face->proc~fold_v_2d interface~ocean_fold_north_v_face->proc~fold_v_3d proc~barotropic_substep_nonlinear_interior barotropic_substep_nonlinear_interior proc~barotropic_substep_nonlinear_interior->proc~barotropic_substep_nonlinear proc~bt_wide_substep bt_wide_substep proc~bt_wide_substep->proc~barotropic_substep_nonlinear proc~configure_ocean_land_mask configure_ocean_land_mask proc~configure_ocean_land_mask->proc~ocean_fold_wrap_eta_2d proc~continuity_gm_apply continuity_gm_apply proc~continuity_gm_apply->proc~ocean_fold_wrap_centre_3d_state proc~continuity_gm_apply->interface~ocean_fold_north_v_face proc~continuity_tracer_step_split continuity_tracer_step_split proc~continuity_tracer_step_split->proc~ocean_fold_wrap_centre_3d_state proc~continuity_tracer_step_split->interface~ocean_fold_north_v_face proc~engine_setup engine_setup proc~engine_setup->proc~ocean_fold_wrap_eta_2d proc~engine_setup->proc~ocean_fold_wrap_state proc~engine_setup->interface~ocean_fold_north_corner proc~engine_setup->proc~configure_ocean_land_mask proc~ocean_halo_exchange_ice_state ocean_halo_exchange_ice_state proc~engine_setup->proc~ocean_halo_exchange_ice_state proc~configure_ocean_forcing configure_ocean_forcing proc~engine_setup->proc~configure_ocean_forcing proc~ocean_data_forcing_configure ocean_data_forcing_configure proc~engine_setup->proc~ocean_data_forcing_configure proc~ocean_halo_exchange_ice_fluxes ocean_halo_exchange_ice_fluxes proc~ocean_halo_exchange_ice_fluxes->proc~ocean_fold_wrap_centre_flat proc~ocean_halo_exchange_ice_state->proc~ocean_fold_wrap_centre_flat proc~ocean_halo_exchange_ice_transport ocean_halo_exchange_ice_transport proc~ocean_halo_exchange_ice_transport->proc~ocean_fold_wrap_centre_flat proc~ocean_seam_refresh_surface_stress ocean_seam_refresh_surface_stress proc~ocean_seam_refresh_surface_stress->proc~ocean_fold_wrap_stress proc~rdb_ocean_set_bathymetry rdb_ocean_set_bathymetry proc~rdb_ocean_set_bathymetry->proc~ocean_fold_wrap_eta_2d proc~refresh_tracer_ghosts refresh_tracer_ghosts proc~refresh_tracer_ghosts->proc~ocean_fold_wrap_centre_3d_state proc~run_continuity_chain run_continuity_chain proc~run_continuity_chain->proc~ocean_fold_wrap_state proc~run_continuity_chain->proc~continuity_tracer_step_split proc~run_continuity_chain->proc~refresh_tracer_ghosts proc~run_gm_step run_gm_step proc~run_gm_step->proc~ocean_fold_wrap_state proc~run_gm_step->proc~continuity_gm_apply proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_fold_wrap_state proc~run_stage_split->proc~ocean_fold_wrap_time_means proc~run_stage_split->proc~barotropic_substep_nonlinear_interior proc~run_stage_split->proc~bt_wide_substep proc~run_stage_split->proc~refresh_tracer_ghosts proc~run_stage_split->proc~run_continuity_chain proc~visc_rem_precompute visc_rem_precompute proc~run_stage_split->proc~visc_rem_precompute proc~vmix_apply_in_stage vmix_apply_in_stage proc~run_stage_split->proc~vmix_apply_in_stage proc~visc_rem_halo_refresh visc_rem_halo_refresh proc~visc_rem_halo_refresh->proc~ocean_fold_wrap_visc_rem proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~configure_ocean_forcing->proc~ocean_seam_refresh_surface_stress proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~engine_step_ice engine_step_ice proc~driver_run_ocean->proc~engine_step_ice proc~engine_step engine_step proc~driver_run_ocean->proc~engine_step proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~engine_step_ice->proc~ocean_halo_exchange_ice_fluxes proc~engine_step_ice->proc~ocean_halo_exchange_ice_state proc~ice_ocean_stress_flux ice_ocean_stress_flux proc~engine_step_ice->proc~ice_ocean_stress_flux proc~ice_transport_step ice_transport_step proc~engine_step_ice->proc~ice_transport_step proc~ice_ocean_stress_flux->proc~ocean_seam_refresh_surface_stress proc~ice_transport_step->proc~ocean_halo_exchange_ice_transport proc~ocean_data_forcing_apply ocean_data_forcing_apply proc~ocean_data_forcing_apply->proc~ocean_seam_refresh_surface_stress proc~ocean_data_forcing_configure->proc~ocean_seam_refresh_surface_stress proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_gm_step proc~ocean_dyn_step_split->proc~run_stage_split proc~run_stage run_stage proc~run_stage->proc~continuity_tracer_step_split proc~run_stage->proc~vmix_apply_in_stage proc~visc_rem_precompute->proc~visc_rem_halo_refresh proc~vmix_apply_in_stage->proc~visc_rem_halo_refresh proc~vmix_apply_in_stage->proc~visc_rem_precompute proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~engine_step->proc~ocean_data_forcing_apply proc~engine_step->proc~ocean_dyn_step_split proc~ocean_dyn_step ocean_dyn_step proc~engine_step->proc~ocean_dyn_step proc~ocean_dyn_step->proc~run_stage proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice proc~rdb_ocean_step->proc~engine_step

Source Code

   subroutine ocean_fold_begin(nslab)
      !! Open a group of `nslab` (rows x layers) slabs in total (an upper
      !! bound is fine).  Grows the buffers, with a warning, if the run did
      !! not reserve enough.  No-op when inactive.
      integer, intent(in) :: nslab
         !! Sum over the group's fields of rows x layers.

      if (.not. fx_active) return
      if (fx_open) error stop "rdb_ocean_fold_exchange: ocean_fold_begin with a group already open"
      if (nslab > fx_slab_cap) then
         call logger%warning("ocean_fold_begin: growing the fold buffers mid-run ("// &
                             to_string(fx_slab_cap)//" -> "//to_string(nslab)// &
                             " slabs). Call ocean_fold_exchange_reserve at init.")
         call grow_buffers(nslab)
      end if
      fx_poff = 0
      fx_uoff = 0
      fx_open = .true.
      fx_sent = .false.
   end subroutine ocean_fold_begin