Skip to content

Commit 5d42392

Browse files
committed
additional cleanup of stats_file name (Get_ObsFcstAna_stats.py, Plot_stats_maps.py, Plot_stats_timeseries.py)
1 parent f2427fb commit 5d42392

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

GEOSldas_App/util/postproc/ObsFcstAna_stats/Get_ObsFcstAna_stats.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ def main():
7272
plot_maps = False
7373
plot_timeseries = False
7474

75-
if plot_maps:
76-
# Compute long-term temporal stats and plot maps
75+
if plot_maps: # Compute long-term temporal stats and plot maps
7776

78-
# Get output file name
79-
stats_file = out_path + 'tmp_stats_'+exp_list[0]['exptag']+ '_'+start_time.strftime('%Y%m%d')+'_'+ \
77+
stats_file = out_path + 'temporal_stats_'+exp_list[0]['exptag']+ '_'+start_time.strftime('%Y%m%d')+'_'+ \
8078
(end_time+timedelta(days=-1)).strftime('%Y%m%d')+'.nc4'
8179

8280
# temporal_stats is a dictionary that contains all mean/variances fields for computing long-term O-F/O-A stats
@@ -88,9 +86,8 @@ def main():
8886
from Plot_stats_maps import plot_OmF_maps
8987
plot_OmF_maps(postproc, temporal_stats, fig_path=out_path )
9088

89+
if plot_timeseries: # Compute spatially averaged stats and plot monthly time series of stats
9190

92-
if plot_timeseries:
93-
# Compute spatially averaged stats and plot monthly time series of stats
9491
from Plot_stats_timeseries import Plot_monthly_OmF_bars
9592
Plot_monthly_OmF_bars(postproc, fig_path=out_path)
9693

GEOSldas_App/util/postproc/ObsFcstAna_stats/Plot_stats_maps.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,8 @@ def plot_OmF_maps(postproc_obj, stats, fig_path='./'):
184184
postproc = postproc_ObsFcstAna(exp_list, start_time, end_time, sum_path=sum_path)
185185

186186
# Compute long-term temporal stats and plot maps
187-
if len(exp_list) >1 :
188-
stats_file = out_path + 'tmp_stats_'+exp_list[0]['exptag']+'_obsfrom_'+ \
189-
exp_list[postproc.obs_from]['exptag']+'_'+start_time.strftime('%Y%m%d')+'_'+ \
190-
(end_time+timedelta(days=-1)).strftime('%Y%m%d')+'.nc4'
191-
else:
192-
stats_file = out_path + 'tmp_stats_'+exp_list[0]['exptag']+'_'+ start_time.strftime('%Y%m%d')+'_'+ \
193-
(end_time+timedelta(days=-1)).strftime('%Y%m%d')+'.nc4'
187+
stats_file = out_path + 'temporal_stats_'+exp_list[0]['exptag']+'_'+ start_time.strftime('%Y%m%d')+'_'+ \
188+
(end_time+timedelta(days=-1)).strftime('%Y%m%d')+'.nc4'
194189

195190
# temporal_stats is a dictionary that contains all mean/variances fields for computing long-term O-F/O-A stats
196191
# each field has the dimension [N_tile, N_species]

GEOSldas_App/util/postproc/ObsFcstAna_stats/Plot_stats_timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def Plot_monthly_OmF_bars(postproc_obj, fig_path='./'):
2121
start_month = postproc_obj.start_time
2222
end_month = postproc_obj.end_time
2323

24-
stats_file = fig_path + 'spa_stats_'+expid+'_'+start_month.strftime('%Y%m')+ \
24+
stats_file = fig_path + 'spatial_stats_'+expid+'_'+start_month.strftime('%Y%m')+ \
2525
'_'+(end_month+timedelta(days=-1)).strftime('%Y%m')+'.pkl'
2626

2727
if os.path.isfile(stats_file):

0 commit comments

Comments
 (0)