Skip to content

Commit

Permalink
Modified in GEOSdas_App: monthly_means.pl and monthly_tarandclean.j.tmpl
Browse files Browse the repository at this point in the history
New file in GEOSdas_App/testsuites: update_input_IDs.pl
See issue #161
  • Loading branch information
gmao-jstassi committed Mar 1, 2022
1 parent b54952f commit f79ada2
Show file tree
Hide file tree
Showing 3 changed files with 426 additions and 14 deletions.
7 changes: 2 additions & 5 deletions src/Applications/GEOSdas_App/monthly_means.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ sub init {
use File::Basename qw(basename dirname);
use File::Path qw(mkpath);
use Getopt::Long (":config", "no_ignore_case");
use Manipulate_time qw(get_hours num_days_in_month token_resolve);
use Manipulate_time qw(get_htype get_hours num_days_in_month token_resolve);
use Remote_utils qw(splitrfile);
use Perl_Config qw(perl_config);
my ($filestring, $help, $null, $SILO_DIR);
Expand Down Expand Up @@ -179,10 +179,7 @@ sub init {

# get $htype from $ftype, unless alternate htype value given
#-----------------------------------------------------------
unless ($htype) {
if ($ftype =~ /\./) { $htype = $ftype }
else { $htype = (split(/_/, $ftype))[0] }
}
$htype = get_htype($ftype) unless $htype;

$archive = "$fvarch/$expid/$fpathToken";
$silo_dir = "$fvhome/$fpathToken";
Expand Down
18 changes: 9 additions & 9 deletions src/Applications/GEOSdas_App/monthly_tarandclean.j.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ else
echo "-----"
endif
set echo
set filestring = __FILESTRING__
set yyyymm = __YYYYMM__
set rundir = __RUNDIR__
set workdir = __WORKDIR__
set do_tar = __DO_TAR__
set lastFLG = __LASTFLG__
set filestring = __FILESTRING__
set fileTemplate = "__FILETEMPLATE__"
set yyyymm = __YYYYMM__
set rundir = __RUNDIR__
set workdir = __WORKDIR__
set do_tar = __DO_TAR__
set lastFLG = __LASTFLG__
unset echo
echo

Expand Down Expand Up @@ -112,9 +113,8 @@ endif
# get list of workdir inputs
#---------------------------
chdir $workdir
set suffix = $filestring:e

set workdir_inputs = ( `ls $EXPID.$ftype.$yyyymm*.$suffix` )
set workdir_inputs = ( $fileTemplate )
set workdir_status = $status

if ($workdir_status) then
Expand All @@ -128,7 +128,7 @@ if ($do_tar) then

# get list of archived inputs
#----------------------------
set archive_inputs = ( $remote_dir/$EXPID.$ftype.$yyyymm*.$suffix )
set archive_inputs = ( $remote_dir/$fileTemplate )
set no_inputs_found = $status

if ($no_inputs_found) then
Expand Down
Loading

0 comments on commit f79ada2

Please sign in to comment.