<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_READ_BASICSTATES'><A href='../../html_code/minimisation/da_read_basicstates.inc.html#DA_READ_BASICSTATES' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_read_basicstates ( xbx, grid, config_flags, timestr, fgat ) 11,5

   !-------------------------------------------------------------------------
   ! Purpose: Read basic state at time = timestr
   !
   ! History: 10/01/2010  Creation (Xin Zhang )
   !
   !-------------------------------------------------------------------------

   implicit none

   character(len=256),         intent(in)    ::   timestr
   type(domain),               intent(inout) ::   grid
   type(xbx_type),             intent(inout) ::   xbx
   type(grid_config_rec_type), intent(inout) ::   config_flags
   character(len=120), intent(in), optional  ::   fgat

#ifdef VAR4D
   if ( grid%var4d ) then
      if ( grid%trajectory_io ) then
         call input_nl_xtraj (timestr)
         call da_swap_xtraj (grid)
      else
         config_flags%auxinput6_inname = "auxhist6_d&lt;domain&gt;_&lt;date&gt;"
         call med_auxinput_in ( grid, auxinput6_only, config_flags )
      endif
      call da_transfer_wrftoxb(xbx, grid, config_flags)
   endif
#endif
! Following codes are for FGAT
   if ( .not. grid%var4d .and. grid%num_fgat_time &gt; 1 .and. present(fgat) ) then
      call da_med_initialdata_input (grid, config_flags, trim(fgat))
      call da_transfer_wrftoxb(xbx, grid, config_flags)
   end if
   return

end subroutine da_read_basicstates