1 subroutine da_transfer_xatoanalysis(it, xbx, grid, config_flags)
3 !---------------------------------------------------------------------------
4 ! Purpose: Transfer xb and xa (increments) to analysis.
5 !---------------------------------------------------------------------------
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 type (grid_config_rec_type), intent(inout) :: config_flags
15 character(len=256) :: timestr
17 if (trace_use) call da_trace_entry("da_transfer_xatoanalysis")
19 !---------------------------------------------------------------------------
20 ! Write out analysis in differing formats:
21 !---------------------------------------------------------------------------
23 if (fg_format == fg_format_wrf_arw_regional) then
24 if (write_increments .and. var4d) then
25 write(unit=filnam,fmt='(a3,i1)') 'inc',it
26 call domain_clock_get( grid, current_timestr=timestr )
27 call da_transfer_xatowrftl(grid, config_flags, filnam, timestr)
30 call da_transfer_xatowrf(grid, config_flags)
32 if (it < max_ext_its) then
33 call da_transfer_wrftoxb(xbx, grid, config_flags)
35 call da_transfer_wrftoxb_chem(grid)
38 else if (fg_format == fg_format_wrf_arw_global) then
40 write(unit=message(1),fmt='(A,I5)') &
41 "var4d is not possible with Global WRF fg_format = ",fg_format
42 call da_error(__FILE__,__LINE__,message(1:1))
44 call da_transfer_xatowrf(grid, config_flags)
45 if (it < max_ext_its)call da_transfer_wrftoxb(xbx, grid, config_flags)
47 else if (fg_format == fg_format_wrf_nmm_regional) then
48 call da_transfer_xatowrf_nmm_regional(grid)
49 if (it < max_ext_its) then
51 write(unit=message(1),fmt='(A,I5)') &
52 "var4d is not possible for fg_format = ",fg_format
53 call da_error(__FILE__,__LINE__,message(1:1))
56 call da_transfer_wrf_nmm_regional_toxb(xbx, grid)
58 else if (fg_format == fg_format_kma_global) then
59 call da_transfer_xatokma(grid)
60 if (it < max_ext_its) then
61 call da_transfer_kmatoxb(xbx, grid)
65 if (trace_use) call da_trace_exit("da_transfer_xatoanalysis")
67 end subroutine da_transfer_xatoanalysis