Skip to content

Commit c287bc0

Browse files
revisions of ObsFcstAna postprocessing package (#111)
2 parents a3ff296 + 145de6c commit c287bc0

File tree

11 files changed

+701
-472
lines changed

11 files changed

+701
-472
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- Added optional SLURM "constraint".
1515
- Added functionality to run on tile space of stretched cube-sphere grids.
16-
- Added python package for post-processing ObsFcstAna output.
16+
- Added (and later revised) python package for post-processing ObsFcstAna output.
1717

1818

1919
### Changed

GEOSldas_App/util/postproc/ObsFcstAna_stats/Get_ObsFcstAna_stats.py renamed to GEOSldas_App/util/postproc/ObsFcstAna_stats/Get_ObsFcstAna_sums.py

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,21 @@
22

33
"""
44
Sample script for post-processing GEOSldas ObsFcstAna output into data assimilation diagnostics.
5-
First, compute and store monthly sums and sums of squares and cross-products of raw ObsFcstAna output.
5+
Computes and stores monthly sums and sums of squares and cross-products of raw ObsFcstAna output.
66
Data assimilation diagnostics ("stats") such as the mean and std-dev of the observation-minus-forecast
7-
residuals can then be diagnosed quickly from these intermediate "sums" files.
8-
Sample script optionally computes and plots:
9-
- Maps of long-term data assimilation diagnostics (see also Plot_stats_maps.py).
10-
- Monthly time series of spatially averaged data assimilation diagnostics (see also Plot_stats_timeseries.py).
7+
residuals can then be diagnosed quickly from these intermediate "sums" files. See Plot_stats_*.py.
118
129
Usage:
1310
1. Edit "user_config.py" with experiments information.
1411
2. Run this script as follows (on Discover):
1512
$ module load python/GEOSpyD
16-
$ ./Get_ObsFcstAna_stats.py
13+
$ ./Get_ObsFcstAna_sums.py
1714
1815
# Background execution:
19-
$ nohup ./Get_ObsFcstAna_stats.py > out.log &
16+
$ nohup ./Get_ObsFcstAna_sums.py > out.log &
2017
2118
Authors: Q. Liu, R. Reichle, A. Fox
22-
Last Modified: May 2025
19+
Last Modified: June 2025
2320
"""
2421

2522
import sys; sys.path.append('../../shared/python/')
@@ -64,33 +61,6 @@ def main():
6461
# Compute and save monthly sums
6562
postproc.save_monthly_sums()
6663

67-
# --------------------------------------------------------------------------------------
68-
# Optionally compute long-term temporal/spatial statistics and create plots.
69-
# The plotting scripts can also run standalone using the individual Plot_stats_*.py scripts,
70-
# as long as the monthly sum files are available.
71-
72-
plot_maps = False
73-
plot_timeseries = False
74-
75-
if plot_maps: # Compute long-term temporal stats and plot maps
76-
77-
stats_file = out_path + 'temporal_stats_'+exp_list[0]['exptag']+ '_'+start_time.strftime('%Y%m%d')+'_'+ \
78-
(end_time+timedelta(days=-1)).strftime('%Y%m%d')+'.nc4'
79-
80-
# temporal_stats is a dictionary that contains all mean/variances fields for computing long-term O-F/O-A stats
81-
# each field has the dimension [N_tile, N_species]
82-
83-
temporal_stats = postproc.calc_temporal_stats_from_sums(write_to_nc=True, fout_stats=stats_file)
84-
85-
# Example to plot some O-F maps
86-
from Plot_stats_maps import plot_OmF_maps
87-
plot_OmF_maps(postproc, temporal_stats, fig_path=out_path )
88-
89-
if plot_timeseries: # Compute spatially averaged stats and plot monthly time series of stats
90-
91-
from Plot_stats_timeseries import Plot_monthly_OmF_bars
92-
Plot_monthly_OmF_bars(postproc, fig_path=out_path)
93-
9464
if __name__ == '__main__':
9565
main()
9666

0 commit comments

Comments
 (0)