da_transfer_xatoanalysis.inc

References to this file elsewhere.
1 subroutine da_transfer_xatoanalysis(it, xbx, grid, config_flags)
2 
3    !---------------------------------------------------------------------------
4    ! Purpose: Transfer xb and xa (increments) to analysis.
5    !---------------------------------------------------------------------------
6 
7    implicit none
8 
9    integer,         intent(in)    :: it    ! outer-loop index
10    type (xbx_type), intent(out)   :: xbx    ! Header & non-gridded vars.
11    type(domain),    intent(inout) :: grid
12 
13    type (grid_config_rec_type), intent(inout) :: config_flags
14 
15    character*4 filnam
16 
17    if (trace_use) call da_trace_entry("da_transfer_xatoanalysis")
18 
19    !---------------------------------------------------------------------------
20    ! Write out analysis in differing formats:
21    !---------------------------------------------------------------------------      
22 
23    if (fg_format == fg_format_wrf) then
24       if (write_increments .and. var4d) then
25          write(unit=filnam,fmt='(a3,i1)') 'inc',it
26          call da_transfer_xatowrftl(grid, config_flags, filnam)
27       end if
28 
29       call da_transfer_xatowrf(grid)
30 
31       if (it < max_ext_its) then
32          if (var4d) then
33             call da_med_initialdata_output(grid , config_flags)
34          end if
35 
36          call da_transfer_wrftoxb(xbx, grid)
37       end if
38    else if (fg_format == fg_format_kma_global) then
39       call da_transfer_xatokma(grid)
40       if (it < max_ext_its) then
41          call da_transfer_kmatoxb(xbx, grid)
42       end if
43    end if
44 
45    if (trace_use) call da_trace_exit("da_transfer_xatoanalysis")
46 
47 end subroutine da_transfer_xatoanalysis
48 
49