da_esmf_finalize.inc
References to this file elsewhere.
1 subroutine da_wrfvar_finalize( gcomp, importState, exportState, clock, rc )
2
3 !-----------------------------------------------------------------------
4 ! Purpose: WRFVAR finalize routine.
5 !
6 ! The arguments are:
7 ! gcomp Component
8 ! importState Importstate
9 ! exportState Exportstate
10 ! clock External clock
11 ! rc Return code; equals ESMF_SUCCESS if there are no
12 ! errors, otherwise ESMF_FAILURE
13 !-----------------------------------------------------------------------
14
15 implicit none
16
17 type(ESMF_GridComp), intent(inout) :: gcomp
18 type(ESMF_State), intent(inout) :: importState, exportState
19 type(ESMF_Clock), intent(inout) :: clock
20 integer, intent(out) :: rc
21
22 ! output wrfvar analysis
23
24 if ((config_flags%real_data_init_type == 1) .OR. &
25 (config_flags%real_data_init_type == 3)) then
26 call da_med_initialdata_output( head_grid , config_flags )
27
28 call med_shutdown_io ( head_grid , config_flags )
29 end if
30
31 call da_message((/"wrfvar: SUCCESS COMPLETE WRFVAR"/))
32 call wrf_shutdown
33
34 ! return success status
35 rc = ESMF_SUCCESS
36
37 end subroutine da_wrfvar_finalize
38
39