1 subroutine da_med_initialdata_output (grid , config_flags, out_filename)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
9 type(domain), intent(in) :: grid
10 type (grid_config_rec_type) , intent(inout) :: config_flags
11 character(*), intent (in), optional :: out_filename
14 character (len=80) :: file_name
16 integer :: julyr, julday
19 if (trace_use) call da_trace_entry("da_med_initialdata_output")
21 if (present(out_filename)) then
22 file_name = trim(out_filename)
24 file_name = 'wrfvar_output'
27 call da_trace ("da_med_initialdata_ouput",Message="Writing wrfvar output")
28 call open_w_dataset (fid, trim(file_name), grid , config_flags , &
29 output_input , "DATASET=INPUT,REAL_OUTPUT_SIZE=4", ierr)
32 write(unit=message(1),fmt=*) 'Error opening ', &
33 trim(file_name),' for writing ierr=',ierr
34 call da_error(__FILE__,__LINE__,message(1:1))
37 start_date=current_date
39 call geth_julgmt(julyr, julday, gmt)
40 config_flags%gmt = gmt
41 config_flags%julyr = julyr
42 config_flags%julday = julday
44 call output_input (fid, grid , config_flags , ierr)
46 call close_dataset (fid , config_flags, "DATASET=INPUT,REAL_OUTPUT_SIZE=4")
48 if (trace_use) call da_trace_exit("da_med_initialdata_output")
50 end subroutine da_med_initialdata_output