From c5f9c955ac036c69668ed619fa14e1f74f6b4f81 Mon Sep 17 00:00:00 2001 From: Ed Safford <62339196+EdwardSafford-NOAA@users.noreply.github.com> Date: Thu, 2 May 2024 14:45:16 -0400 Subject: [PATCH] Add some of the control files to parm/cntrl (#29) As per the discussion in #27 I've come around to a hybrid solution for the control files. This PR sets up the mechanism for resolving a yaml tag of `{{CONTRO}}` to the `obs-monitor/src/parm/cntrl` directory. This PR puts 3 new (to obs-monitor) control files there -- 2 minimization control files and the conventional histogram control file. These three files do not contain any assimilation flags or other information that will change over time. In the legacy MinMon and ConMon these files are either stored in a parm directory or generated on-the-fly, so putting them in the `obs-monitor/parm` directory is consistent with that use. Closes #27 --- jobs/JMON_PLOT_OBS | 7 ++++--- parm/cntrl/conHist.ctl | 15 +++++++++++++++ parm/cntrl/minAllGnorm.ctl | 13 +++++++++++++ parm/cntrl/minReduction.ctl | 14 ++++++++++++++ parm/gfs/conTime.yaml | 4 ++-- parm/gfs/conVert.yaml | 2 +- parm/gfs/gfs_plots.yaml | 30 ++++++------------------------ parm/gfs/minGnormFourCycle.yaml | 4 ++-- parm/gfs/minGnormOneCycle.yaml | 4 ++-- parm/gfs/minSummary.yaml | 2 +- parm/gfs/oznHoriz.yaml | 6 +++--- parm/gfs/oznSummary.yaml | 2 +- parm/gfs/oznTime.yaml | 4 ++-- parm/gfs/radAngle.yaml | 4 ++-- parm/gfs/radBcoef.yaml | 2 +- parm/gfs/radTime.yaml | 6 +++--- ush/plotObsMon.py | 3 ++- 17 files changed, 74 insertions(+), 48 deletions(-) create mode 100644 parm/cntrl/conHist.ctl create mode 100644 parm/cntrl/minAllGnorm.ctl create mode 100644 parm/cntrl/minReduction.ctl diff --git a/jobs/JMON_PLOT_OBS b/jobs/JMON_PLOT_OBS index 1e60ad6..84f2c6f 100644 --- a/jobs/JMON_PLOT_OBS +++ b/jobs/JMON_PLOT_OBS @@ -10,9 +10,10 @@ export PDATE="${PDY}${cyc}" # Define package locations ############################ export HOMEobsmon=${HOMEobsmon:-${PACKAGEROOT}/${NET}.${obsmon_ver}} -export SCRIPTSobsmon=${SCRIPTSobsmon:-$HOMEobsmon/scripts} -export PARMobsmon=${PARMobsmon:-$HOMEobsmon/parm} -export USHobsmon=${USHobsmon:-$HOMEobsmon/ush} +export SCRIPTSobsmon=${SCRIPTSobsmon:-${HOMEobsmon}/scripts} +export PARMobsmon=${PARMobsmon:-${HOMEobsmon}/parm} +export CNTRLobsmon=${CNTRLobsmon:-${PARMobsmon}/cntrl} +export USHobsmon=${USHobsmon:-${HOMEobsmon}/ush} ################################ # Define plot output location diff --git a/parm/cntrl/conHist.ctl b/parm/cntrl/conHist.ctl new file mode 100644 index 0000000..0ef3e15 --- /dev/null +++ b/parm/cntrl/conHist.ctl @@ -0,0 +1,15 @@ +dset ^out_t120_00_ges.2024043000 +options big_endian +undef -999.0 +title t120_00 ges +xdef linear 1 1 +ydef 1 linear 1 1 +zdef 1 linear 1 1 +tdef 1 linear 00z30apr2024 1hr +vars 4 +rmark 0 0 the values of each interval +hist1 0 0 number of data for all data +hist2 0 0 number of data not including data rejected by OIQC +hist3 0 0 number of data rejected by OIQC +endvars + diff --git a/parm/cntrl/minAllGnorm.ctl b/parm/cntrl/minAllGnorm.ctl new file mode 100644 index 0000000..61f3340 --- /dev/null +++ b/parm/cntrl/minAllGnorm.ctl @@ -0,0 +1,13 @@ +dset ^%y4%m2%d2%h2.gnorms.ieee_d +options template little_endian +undef -999. +title gsistat gsistat 1 +* +*XDEF is iter +xdef 202 linear 1.0 1.0 +ydef 1 linear 1.0 1.0 +zdef 1 linear 1.0 1.0 +tdef 29 linear 12Z05feb2013 06hr +vars 1 +allgnorm 0 0 allgnorm +endvars diff --git a/parm/cntrl/minReduction.ctl b/parm/cntrl/minReduction.ctl new file mode 100644 index 0000000..41158e7 --- /dev/null +++ b/parm/cntrl/minReduction.ctl @@ -0,0 +1,14 @@ +dset ^%y4%m2%d2%h2.reduction.ieee_d +options template little_endian +undef -999. +title gsistat reductions 1 +* +* +*XDEF is iter +xdef 202 linear 1.0 1.0 +ydef 1 linear 1.0 1.0 +zdef 1 linear 1.0 1.0 +tdef 29 linear 12Z05feb2013 06hr +vars 1 +reduct 0 0 reduct +endvars diff --git a/parm/gfs/conTime.yaml b/parm/gfs/conTime.yaml index a8bfbdd..736543c 100644 --- a/parm/gfs/conTime.yaml +++ b/parm/gfs/conTime.yaml @@ -462,7 +462,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }} \n ${datatype}, Global, All Levels" - output name: line_plots/conmon/time/${datatype}_count.{{ PDATE | to_YMDH }}.png + output name: line_plots/con/time/${datatype}_count.{{ PDATE | to_YMDH }}.png plot logo: which: 'noaa/nws' loc: 'upper left' @@ -586,7 +586,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }}\n ${datatype}, Global, All Levels" - output name: line_plots/conmon/time/${datatype}_bias.{{ PDATE | to_YMDH }}.png + output name: line_plots/con/time/${datatype}_bias.{{ PDATE | to_YMDH }}.png plot logo: which: 'noaa/nws' loc: 'upper left' diff --git a/parm/gfs/conVert.yaml b/parm/gfs/conVert.yaml index 8b20fe2..0a18486 100644 --- a/parm/gfs/conVert.yaml +++ b/parm/gfs/conVert.yaml @@ -69,7 +69,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }} \n ${datatype}, Global" - output name: line_plots/conmon/vert/${datatype}.vert.png + output name: line_plots/con/vert/${datatype}.vert.png plot logo: which: 'noaa/nws' loc: 'upper left' diff --git a/parm/gfs/gfs_plots.yaml b/parm/gfs/gfs_plots.yaml index aa39643..c79f7dc 100644 --- a/parm/gfs/gfs_plots.yaml +++ b/parm/gfs/gfs_plots.yaml @@ -33,6 +33,12 @@ satellites: levels: '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22' component: ges + - plot: ozn time + times: 121 + levels: '1' + component: ges + + - name: ompslp plot_list: - plot: ozn horiz @@ -88,21 +94,6 @@ satellites: levels: '1' component: ges - - name: n20 - instruments: - - name: ompstc8 - plot_list: - - plot: ozn horiz - times: 4 - levels: '1' - component: ges - - - plot: ozn time - times: 121 - levels: '1' - component: ges - - # Radiance - name: g16 @@ -524,15 +515,6 @@ satellites: component: ges - - name: f18 - instruments: - - name: ssmis - plot_list: - - plot: rad time - times: 121 - channels: 'all' - component: ges - minimization: - model: gfs diff --git a/parm/gfs/minGnormFourCycle.yaml b/parm/gfs/minGnormFourCycle.yaml index 62374f6..0084bdc 100644 --- a/parm/gfs/minGnormFourCycle.yaml +++ b/parm/gfs/minGnormFourCycle.yaml @@ -11,7 +11,7 @@ datasets: - name: gnorm type: MonDataSpace control_file: - - {{DATA}}/min_data/glb_allgnorm.ctl + - {{CONTROL}}/minAllGnorm.ctl filenames: - {{DATA}}/min_data/{{ PDATE | to_YMDH }}.gnorms.ieee_d - {{DATA}}/min_data/{{ PDATEm6 | to_YMDH }}.gnorms.ieee_d @@ -96,7 +96,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/minimization/{{MODEL}}_{{RUN}}.4cycle.gnorms.png + output name: line_plots/min/{{MODEL}}_{{RUN}}.4cycle.gnorms.png plot logo: which: 'noaa/nws' loc: 'upper center' diff --git a/parm/gfs/minGnormOneCycle.yaml b/parm/gfs/minGnormOneCycle.yaml index ce34dd0..cdcb2e6 100644 --- a/parm/gfs/minGnormOneCycle.yaml +++ b/parm/gfs/minGnormOneCycle.yaml @@ -12,7 +12,7 @@ datasets: - name: gnorm type: MonDataSpace control_file: - - {{DATA}}/min_data/glb_allgnorm.ctl + - {{CONTROL}}/minAllGnorm.ctl filenames: - {{DATA}}/min_data/{{ PDATE | to_YMDH }}.gnorms.ieee_d - {{DATA}}/min_data/{{ PDATEm24 | to_YMDH }}.gnorms.ieee_d @@ -70,7 +70,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/minimization/{{MODEL}}_{{RUN}}.{{ PDATE | to_YMDH }}.gnorms.png + output name: line_plots/min/{{MODEL}}_{{RUN}}.{{ PDATE | to_YMDH }}.gnorms.png plot logo: which: 'noaa/nws' loc: 'upper right' diff --git a/parm/gfs/minSummary.yaml b/parm/gfs/minSummary.yaml index 4c22eb0..b698f64 100644 --- a/parm/gfs/minSummary.yaml +++ b/parm/gfs/minSummary.yaml @@ -39,7 +39,7 @@ graphics: figure size: [20,18] tight layout: title: "Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/minimization/{{MODEL}}_{{RUN}}.summary.gnorms.png + output name: line_plots/min/{{MODEL}}_{{RUN}}.summary.gnorms.png plot logo: which: 'noaa/nws' loc: 'upper left' diff --git a/parm/gfs/oznHoriz.yaml b/parm/gfs/oznHoriz.yaml index 15e97da..366f8d0 100644 --- a/parm/gfs/oznHoriz.yaml +++ b/parm/gfs/oznHoriz.yaml @@ -180,7 +180,7 @@ graphics: layout: [2,2] figure size: [8,7] title: "Ozone: Observed Values \n {{SENSOR}}_{{SAT}}, \n level ${level}" - output name: map_plots/{{SENSOR}}_{{SAT}}/ozn/horiz/observed_${level}.png + output name: map_plots/ozn/horiz/{{SENSOR}}_{{SAT}}_observed_${level}.png plots: - mapping: @@ -285,7 +285,7 @@ graphics: layout: [2,2] figure size: [8,7] title: "Ozone: Ges Values \n {{SENSOR}}_{{SAT}}, \n level ${level}" - output name: map_plots/{{SENSOR}}_{{SAT}}/ozn/horiz/ges_${level}.png + output name: map_plots/ozn/horiz/{{SENSOR}}_{{SAT}}_ges_${level}.png plots: - mapping: @@ -390,7 +390,7 @@ graphics: layout: [2,2] figure size: [8,7] title: "Ozone: Observed - Guess Values \n {{SENSOR}}_{{SAT}}, \n level ${level}" - output name: map_plots/{{SENSOR}}_{{SAT}}/ozn/horiz/omg_${level}.png + output name: map_plots/ozn/horiz/{{SENSOR}}_{{SAT}}_omg_${level}.png plots: - mapping: diff --git a/parm/gfs/oznSummary.yaml b/parm/gfs/oznSummary.yaml index 23ee205..7729b76 100644 --- a/parm/gfs/oznSummary.yaml +++ b/parm/gfs/oznSummary.yaml @@ -297,7 +297,7 @@ graphics: figure size: [20,18] tight layout: title: "Summary Plot {{SENSOR}}_{{SAT}} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{SENSOR}}_{{SAT}}/ozn/summary/summary.{{SENSOR}}_{{SAT}}.png + output name: line_plots/ozn/summary/{{SENSOR}}_{{SAT}}.summary.png plot logo: which: 'noaa/nws' loc: 'upper left' diff --git a/parm/gfs/oznTime.yaml b/parm/gfs/oznTime.yaml index 7ce19eb..49660b3 100644 --- a/parm/gfs/oznTime.yaml +++ b/parm/gfs/oznTime.yaml @@ -166,7 +166,7 @@ graphics: figure size: [20,18] tight layout: title: "${variable}, {{SENSOR}}_{{SAT}} level ${level} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{SENSOR}}_{{SAT}}/ozn/time/{{SENSOR}}_{{SAT}}.${level}.${variable}.png + output name: line_plots/ozn/time/{{SENSOR}}_{{SAT}}.${level}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper right' @@ -200,7 +200,7 @@ graphics: figure size: [20,18] tight layout: title: "obs-{{COMPONENT}} {{SENSOR}}_{{SAT}} level ${level} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{SENSOR}}_{{SAT}}/ozn/time/{{SENSOR}}_{{SAT}}.${level}.omg.png + output name: line_plots/ozn/time/{{SENSOR}}_{{SAT}}.${level}.omg.png plot logo: which: 'noaa/nws' loc: 'upper right' diff --git a/parm/gfs/radAngle.yaml b/parm/gfs/radAngle.yaml index 55a95d2..cab545c 100644 --- a/parm/gfs/radAngle.yaml +++ b/parm/gfs/radAngle.yaml @@ -254,7 +254,7 @@ graphics: layout: [1,1] figure size: [20,18] title: "${variable}, {{SENSOR}}_{{SAT}} channel ${channel} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/angle/angle.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png + output name: line_plots/rad/angle/angle.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper left' @@ -316,7 +316,7 @@ graphics: layout: [1,1] figure size: [20,18] title: "${variable}, {{SENSOR}}_{{SAT}} channel ${channel} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/angle/angle.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png + output name: line_plots/rad/angle/angle.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper left' diff --git a/parm/gfs/radBcoef.yaml b/parm/gfs/radBcoef.yaml index 11cafcb..8ea5cd2 100644 --- a/parm/gfs/radBcoef.yaml +++ b/parm/gfs/radBcoef.yaml @@ -179,7 +179,7 @@ graphics: figure size: [20,18] tight layout: title: "${variable}, {{SENSOR}}_{{SAT}} channel ${channel} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/bcoef/bcoef.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png + output name: line_plots/rad/bcoef/bcoef.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper right' diff --git a/parm/gfs/radTime.yaml b/parm/gfs/radTime.yaml index 8dd5404..39b8b6a 100644 --- a/parm/gfs/radTime.yaml +++ b/parm/gfs/radTime.yaml @@ -330,7 +330,7 @@ graphics: figure size: [20,18] tight layout: title: "${variable}, {{SENSOR}}_{{SAT}} channel ${channel} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/time/time.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png + output name: line_plots/rad/time/time.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper right' @@ -358,7 +358,7 @@ graphics: figure size: [20,18] tight layout: title: "${variable}, {{SENSOR}}_{{SAT}} channel ${channel} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/time/time.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png + output name: line_plots/rad/time/time.{{SENSOR}}_{{SAT}}.${channel}.${variable}.png plot logo: which: 'noaa/nws' loc: 'upper right' @@ -380,7 +380,7 @@ graphics: figure size: [20,18] tight layout: title: "Summary Plot {{SENSOR}}_{{SAT}} \n Valid: {{ PDATE | to_YMDH }}" - output name: line_plots/{{MODEL}}/{{SENSOR}}_{{SAT}}/summary/summary.{{SENSOR}}_{{SAT}}.png + output name: line_plots/rad/summary/summary.{{SENSOR}}_{{SAT}}.png plot logo: which: 'noaa/nws' loc: 'upper center' diff --git a/ush/plotObsMon.py b/ush/plotObsMon.py index 6d11a41..5b2d166 100755 --- a/ush/plotObsMon.py +++ b/ush/plotObsMon.py @@ -79,7 +79,8 @@ def loadConfig(satname, instrument, obstype, plot, cycle_tm, cycle_interval, 'COMPONENT': plot.get('component'), 'PDATE': cycle_tm, 'PLOT_TEMPLATE': camelCase(plot.get('plot')), - 'DATA': data_location + 'DATA': data_location, + 'CONTROL': os.environ.get('CNTRLobsmon', data_location) } times = int(plot.get('times')) if plot.get('times') else None