From 4faf62ce721b428379fdbf7f0f812b61cc7bddee Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 21 Apr 2020 08:27:46 -0400 Subject: [PATCH 1/4] checkpoint files are geneareted by GEOSldas ( not MAPL) for cubed-sphere grid --- src/Applications/LDAS_App/ldas_setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Applications/LDAS_App/ldas_setup b/src/Applications/LDAS_App/ldas_setup index d543a8e2..5addfef7 100755 --- a/src/Applications/LDAS_App/ldas_setup +++ b/src/Applications/LDAS_App/ldas_setup @@ -1180,7 +1180,7 @@ class LDASsetup: valn = self.catch+ensid+'_internal_checkpoint' ldasrcInp[keyn]= valn - if((self.has_ldassa_pert or self.has_geos_pert) and _perturb == 1): + if('-CF' not in self.rqdExeInp['GRIDNAME'] and _perturb == 1): keyn = 'LANDPERT_INTERNAL_CHECKPOINT_FILE' valn = 'landpert'+ensid+'_internal_checkpoint' ldasrcInp[keyn]= valn From ac0aab10b3a5abd76655983c8701afbf1122d419 Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 21 Apr 2020 12:50:13 -0400 Subject: [PATCH 2/4] 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 From d174fcd66667b270c4cbdb78a5f8066de88dcd7c Mon Sep 17 00:00:00 2001 From: Weiyuan Jiang Date: Tue, 21 Apr 2020 20:11:20 -0400 Subject: [PATCH 3/4] change system to standard Execute_command_line --- .../clsm_ensupd_enkf_update.F90 | 2 +- .../clsm_ensupd_read_obs.F90 | 18 +++++++++--------- .../Shared/LDAS_TileCoordRoutines.F90 | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) 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 03762493..58d2543c 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 @@ -1561,7 +1561,7 @@ subroutine output_ObsFcstAna(date_time, work_path, exp_id, & dir_name=dir_name, ens_id=-1 ) i = index(fname, '/', .true.) - if( i >0) call system('mkdir -p '//fname(1:i)) + if( i >0) call Execute_command_line('mkdir -p '//fname(1:i)) open( 10, file=fname, form='unformatted', action='write') diff --git a/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_read_obs.F90 b/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_read_obs.F90 index 119fcc82..9ac38083 100644 --- a/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_read_obs.F90 +++ b/src/Components/GEOSldas_GridComp/GEOSlandassim_GridComp/clsm_ensupd_read_obs.F90 @@ -524,7 +524,7 @@ subroutine read_obs_ae_l2_sm( & cmd = '/bin/rm -f ' // tmpfname - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) ! identify all files within current assimilation interval ! (list all files within hourly intervals) @@ -554,7 +554,7 @@ subroutine read_obs_ae_l2_sm( & cmd = trim(cmd) // ' >> ' // trim(tmpfname) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) call augment_date_time( 3600, date_time_tmp ) @@ -566,7 +566,7 @@ subroutine read_obs_ae_l2_sm( & cmd = 'wc -w ' // trim(tmpfname) // ' > ' // trim(tmpfname2) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) open(10, file=tmpfname2, form='formatted', action='read') @@ -1037,7 +1037,7 @@ subroutine read_obs_ae_sm_LPRM( & cmd = '/bin/rm -f ' // tmpfname - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) ! identify all files within current assimilation interval ! (list all files within hourly intervals) @@ -1070,7 +1070,7 @@ subroutine read_obs_ae_sm_LPRM( & cmd = trim(cmd) // ' >> ' // trim(tmpfname) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) call augment_date_time( 3600, date_time_tmp ) @@ -1082,7 +1082,7 @@ subroutine read_obs_ae_sm_LPRM( & cmd = 'wc -w ' // trim(tmpfname) // ' > ' // trim(tmpfname2) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) open(10, file=tmpfname2, form='formatted', action='read') @@ -1348,7 +1348,7 @@ subroutine read_obs_sm_ASCAT( & cmd = '/bin/rm -f ' // tmpfname - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) ! identify all files within current assimilation interval ! (list all files within hourly intervals) @@ -1379,7 +1379,7 @@ subroutine read_obs_sm_ASCAT( & cmd = trim(cmd) // ' >> ' // trim(tmpfname) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) call augment_date_time( 3600, date_time_tmp ) @@ -1392,7 +1392,7 @@ subroutine read_obs_sm_ASCAT( & cmd = 'wc -w ' // trim(tmpfname) // ' > ' // trim(tmpfname2) - call system(trim(cmd)) + call Execute_command_line(trim(cmd)) open(10, file=tmpfname2, form='formatted', action='read') diff --git a/src/Components/GEOSldas_GridComp/Shared/LDAS_TileCoordRoutines.F90 b/src/Components/GEOSldas_GridComp/Shared/LDAS_TileCoordRoutines.F90 index 3aea7652..b82a3ccd 100644 --- a/src/Components/GEOSldas_GridComp/Shared/LDAS_TileCoordRoutines.F90 +++ b/src/Components/GEOSldas_GridComp/Shared/LDAS_TileCoordRoutines.F90 @@ -475,7 +475,7 @@ subroutine LDAS_read_land_tile( tile_file,catch_file, tile_grid_g, tile_coord_la i=index(catch_file,'/clsm/') fname = catch_file(1:i)//'topo_DYN_ave_*.data' - call system('ls '//trim(fname) // ' >topo_DYN_ave.file') + call Execute_command_line('ls '//trim(fname) // ' >topo_DYN_ave.file') open(10,file='topo_DYN_ave.file', action='read') fname= '' read(10,'(A)') fname From 5441d5be444fb4ea6ea7e8ae7a9c55f64476e80f Mon Sep 17 00:00:00 2001 From: Rolf Reichle <54944691+gmao-rreichle@users.noreply.github.com> Date: Wed, 22 Apr 2020 10:29:22 -0400 Subject: [PATCH 4/4] added comment to bug fix for LANDPERT checkpoint bug fix: addressed setting up LANDPERT checkpoint file for cube-sphere tile space --- src/Applications/LDAS_App/ldas_setup | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Applications/LDAS_App/ldas_setup b/src/Applications/LDAS_App/ldas_setup index 5addfef7..a0f02b2c 100755 --- a/src/Applications/LDAS_App/ldas_setup +++ b/src/Applications/LDAS_App/ldas_setup @@ -1180,6 +1180,8 @@ class LDASsetup: valn = self.catch+ensid+'_internal_checkpoint' ldasrcInp[keyn]= valn + # for lat/lon and EASE tile space, specify LANDPERT checkpoint file here (via MAPL); + # for cube-sphere tile space, Landpert GC will set up LANDPERT checkpoint file if('-CF' not in self.rqdExeInp['GRIDNAME'] and _perturb == 1): keyn = 'LANDPERT_INTERNAL_CHECKPOINT_FILE' valn = 'landpert'+ensid+'_internal_checkpoint'