Reverse of ocean_state_enter_data. Walk components first,
parent struct last.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_state_t), | intent(inout) | :: | state |
subroutine ocean_state_exit_data(state) !! Reverse of `ocean_state_enter_data`. Walk components first, !! parent struct last. type(ocean_state_t), intent(inout) :: state #ifndef RDB_NO_NETCDF call profiler_start("xd_data_input", nvtx_only=.true.) call state%data_input%exit_data() call profiler_stop("xd_data_input") #endif call profiler_start("xd_sponge", nvtx_only=.true.) if (state%sponge%enable) call state%sponge%exit_data() call profiler_stop("xd_sponge") call profiler_start("xd_bc", nvtx_only=.true.) call ocean_bc_state_exit_data(state%bc) call profiler_stop("xd_bc") call profiler_start("xd_ice", nvtx_only=.true.) if (state%ice%enable) call state%ice%exit_data() call profiler_stop("xd_ice") call profiler_start("xd_psurf", nvtx_only=.true.) call state%p_surf%exit_data() call profiler_stop("xd_psurf") call profiler_start("xd_tides", nvtx_only=.true.) call state%tides%exit_data() call profiler_stop("xd_tides") call profiler_start("xd_diag", nvtx_only=.true.) call state%diag%exit_data() call profiler_stop("xd_diag") call profiler_start("xd_vcoord", nvtx_only=.true.) call state%vcoord%exit_data() call profiler_stop("xd_vcoord") call profiler_start("xd_meke", nvtx_only=.true.) if (state%meke%enable) call state%meke%exit_data() call profiler_stop("xd_meke") call profiler_start("xd_varmix", nvtx_only=.true.) if (state%varmix%enable) call state%varmix%exit_data() call profiler_stop("xd_varmix") call profiler_start("xd_redi", nvtx_only=.true.) if (state%redi%enable) call state%redi%exit_data() call profiler_stop("xd_redi") call profiler_start("xd_gm", nvtx_only=.true.) if (state%gm%enable) call state%gm%exit_data() call profiler_stop("xd_gm") call profiler_start("xd_mle", nvtx_only=.true.) if (state%mle%enable) call state%mle%exit_data() call profiler_stop("xd_mle") call profiler_start("xd_slopes", nvtx_only=.true.) if (state%slopes%enable .or. state%gm%enable) call state%slopes%exit_data() call profiler_stop("xd_slopes") call profiler_start("xd_lateral_mix", nvtx_only=.true.) call state%lateral_mix%exit_data() call profiler_stop("xd_lateral_mix") call profiler_start("xd_vmix_tidal", nvtx_only=.true.) if (state%vmix_tidal%enable) call state%vmix_tidal%exit_data() call profiler_stop("xd_vmix_tidal") call profiler_start("xd_kshear", nvtx_only=.true.) if (state%kshear%enable) call state%kshear%exit_data() call profiler_stop("xd_kshear") call profiler_start("xd_wavespeed", nvtx_only=.true.) call state%wavespeed%exit_data() call profiler_stop("xd_wavespeed") call profiler_start("xd_epbl", nvtx_only=.true.) if (state%epbl%enable) call state%epbl%exit_data() call profiler_stop("xd_epbl") call profiler_start("xd_vmix", nvtx_only=.true.) call state%vmix%exit_data() call profiler_stop("xd_vmix") call profiler_start("xd_vdiff", nvtx_only=.true.) call state%vdiff%exit_data() call profiler_stop("xd_vdiff") call profiler_start("xd_hdiff_tracer", nvtx_only=.true.) call state%hdiff_tracer%exit_data() call profiler_stop("xd_hdiff_tracer") call profiler_start("xd_vert_advect", nvtx_only=.true.) call state%vert_advect%exit_data() call profiler_stop("xd_vert_advect") call profiler_start("xd_surface_flux", nvtx_only=.true.) call state%cavity_flux%exit_data() call state%surface_flux%exit_data() call profiler_stop("xd_surface_flux") call profiler_start("xd_surface_stress", nvtx_only=.true.) call state%surface_stress%exit_data() call profiler_stop("xd_surface_stress") call profiler_start("xd_bdrag", nvtx_only=.true.) call state%tdrag%exit_data() call state%bdrag%exit_data() call profiler_stop("xd_bdrag") call profiler_start("xd_hvisc", nvtx_only=.true.) call state%hvisc%exit_data() call profiler_stop("xd_hvisc") call profiler_start("xd_pressure_force", nvtx_only=.true.) call state%pressure_force%exit_data() call profiler_stop("xd_pressure_force") call profiler_start("xd_coriolis_adv", nvtx_only=.true.) call state%coriolis_adv%exit_data() call profiler_stop("xd_coriolis_adv") call profiler_start("xd_continuity", nvtx_only=.true.) call state%continuity%exit_data() call profiler_stop("xd_continuity") call profiler_start("xd_dyn", nvtx_only=.true.) call state%dyn%exit_data() call profiler_stop("xd_dyn") if (state%use_multilayer) then call profiler_start("xd_multilayer", nvtx_only=.true.) call state%multilayer%exit_data() call profiler_stop("xd_multilayer") end if call profiler_start("xd_metrics", nvtx_only=.true.) call state%metrics%exit_data() call profiler_stop("xd_metrics") call profiler_start("xd_barotropic", nvtx_only=.true.) call state%barotropic%exit_data() call profiler_stop("xd_barotropic") !$acc exit data delete(state) end subroutine ocean_state_exit_data