Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified in GEOSdas_App: monthly_means.pl and monthly_tarandclean.j.tmpl #162

Merged
merged 1 commit into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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