8 This module is used to configure statistical analyses. Those analyses
9 can be intialized either by directly executing AnalyzeStats.py or
10 by submitting a series of jobs for multiple DiagSpaces using
11 SpawnAnalyzeStats.py and AnalyzeStats.csh.
13 Command-line examples:
14 ----------------------
15 + Carry out analyses for all DiagSpaces that contain "amsua"
17 python AnalyzeStats.py -d amsua
19 + Use 12 processes to carry out analyses for all
20 DiagSpaces with anGroup == "conv"
22 python AnalyzeStats.py -n 12 -g conv
24 + Use 12 processes to carry out analyses for all
25 DiagSpaces that contain "abi", and use 30 processes
26 for reading the StatisticsDatabase
28 python AnalyzeStats.py -n 12 -r 30 -d abi
30 + Get info about more options
32 python AnalyzeStats.py --help
34 Job-submission examples:
35 ------------------------
36 + Spawn one job for each DiagSpace that is enabled in config
37 using the anGroupConfig specified therein
39 python SpawnAnalyzeStats.py
41 + Specify that statistics files come from a JEDI hofx application
43 python SpawnAnalyzeStats.py -app hofx
45 + Spawn one job for each DiagSpace that contains "amsua"
47 python SpawnAnalyzeStats.py -d amsua
49 + Spawn one job for the MPAS model DiagSpace
51 python SpawnAnalyzeStats.py -d mpas
53 + Spawn one job for each DiagSpace in the typical MPAS-Workflow hofx application
55 python SpawnAnalyzeStats.py -app hofx -d mhs,amusa,abi_,ahi_,sonde,airc,sfc,gnssroref,satwind
57 + Choose a unique job account number
59 python SpawnAnalyzeStats.py -a NMMM0043
61 + Get info about more options
63 python SpawnAnalyzeStats.py --help
70 analysisStatistics = [
'Count',
'Mean',
'RMS',
'STD']
82 diagnosticGroupings = {}
83 diagnosticGroupings[
'omm'] = [
'omb',
'oma']
84 diagnosticGroupings[
'rltv_omm'] = [
'rltv_omb',
'rltv_oma']
91 dbConf[
'hasFCLenDir'] =
False
97 dbConf[
'expDirectory'] = os.getenv(
'EXP_DIR',
'/glade/scratch/'+user+
'/pandac')
101 dbConf[
'cntrlExpIndex'] = 0
105 dbConf[
'expLongNames'] = []
110 dbConf[
'expNames'] = []
119 dbConf[
'DAMethods'] = []
143 dbConf[
'expLongNames'].append(
'guerrett_3denvar_OIE120km_unstructured/Verification/fc/mean')
144 dbConf[
'expNames'].append(
'benchmark')
145 dbConf[
'DAMethods'].append(
'hofx')
147 dbConf[
'expLongNames'].append(
'guerrett_eda_3denvar_NMEM20_LeaveOneOut_OIE120km/Verification/fc/mean')
148 dbConf[
'expNames'].append(
'eda20-leave')
149 dbConf[
'DAMethods'].append(
'hofx')
151 dbConf[
'expLongNames'].append(
'guerrett_eda_3denvar_NMEM40_LeaveOneOut_OIE120km/Verification/fc/mean')
152 dbConf[
'expNames'].append(
'eda40-leave')
153 dbConf[
'DAMethods'].append(
'hofx')
160 dbConf[
'firstCycleDTime'] = dt.datetime(2018,4,15,0,0,0)
161 dbConf[
'lastCycleDTime'] = dt.datetime(2018,5,14,18,0,0)
162 dbConf[
'cyTimeInc'] = dt.timedelta(hours=12)
165 dbConf[
'fcTDeltaFirst'] = dt.timedelta(days=0)
166 dbConf[
'fcTDeltaLast'] = dt.timedelta(days=0,hours=240)
167 dbConf[
'fcTimeInc'] = dt.timedelta(hours=12)
181 commonFCDirFormat =
"%hhr"
182 dbConf[
'fcDirFormats'] = [commonFCDirFormat]*len(dbConf[
'expNames'])
191 commonStatsFileSubDir =
'diagnostic_stats/obs'
193 dbConf[
'statsFileSubDirs'] = [commonStatsFileSubDir]*len(dbConf[
'expNames'])
202 if dbConf[
'fcTDeltaFirst'] == dbConf[
'fcTDeltaLast']:
206 analysisTypes.append(
'CYAxisExpLines')
209 analysisTypes.append(
'CYAxisBinValLines')
210 analysisTypes.append(
'CYandBinValAxes2D')
216 analysisTypes.append(
'FCAxisExpLines')
217 if len(dbConf[
'expNames']) > 1: analysisTypes.append(
'FCAxisExpLinesDiffCI')
220 analysisTypes.append(
'FCandBinValAxes2D')
226 analysisTypes.append(
'BinValAxisProfile')
227 if len(dbConf[
'expNames']) > 1: analysisTypes.append(
'BinValAxisProfileDiffCI')