From ac0aab10b3a5abd76655983c8701afbf1122d419 Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 21 Apr 2020 12:50:13 -0400 Subject: [PATCH] create directory for ldas_ObsFcstAna --- .../GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90 b/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90 index 9e46c25f..03762493 100644 --- a/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90 +++ b/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90 @@ -1416,7 +1416,7 @@ subroutine output_ObsFcstAna(date_time, work_path, exp_id, & integer, dimension(numprocs) :: N_obsl_vec, tmp_low_ind character(300) :: fname - + integer :: i #ifdef LDAS_MPI integer :: this_species, ind_tmp, j @@ -1559,7 +1559,10 @@ subroutine output_ObsFcstAna(date_time, work_path, exp_id, & fname = get_io_filename( work_path, exp_id, file_tag, date_time=date_time, & dir_name=dir_name, ens_id=-1 ) + i = index(fname, '/', .true.) + if( i >0) call system('mkdir -p '//fname(1:i)) + open( 10, file=fname, form='unformatted', action='write') ! write header