Skip to content

Commit

Permalink
add use-eva
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Jul 21, 2022
1 parent fcda857 commit 4719cb2
Show file tree
Hide file tree
Showing 13 changed files with 989 additions and 0 deletions.
10 changes: 10 additions & 0 deletions use-eva/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
aircraft/
observation_scatter_plots/
satwind/
scatwind/
sfcship/
sondes/
vadwind/
windprof/
*.yaml
*.png
204 changes: 204 additions & 0 deletions use-eva/amsuacoef.yaml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
diagnostics:

# Data read
# ---------
- data:
type: IodaObsSpace
datasets:
- name: experiment
filenames:
- OBSFILE
groups:
- name: ObsValue
variables: &variables [VARNAME]
- name: hofx_y_mean_xb0
- name: EffectiveQC0
- name: GsiHofX
#- name: GsiEffectiveQC
- name: EffectiveQC1
- name: MetaData

transforms:

# Generate omb for GSI
- transform: arithmetic
new name: experiment::ObsValueMinushofx_y_mean_xb0::${variable}
equals: experiment::ObsValue::${variable}-experiment::hofx_y_mean_xb0::${variable}
for:
variable: *variables

# Generate omb for JEDI
- transform: arithmetic
new name: experiment::ObsValueMinusHofx::${variable}
equals: experiment::ObsValue::${variable}-experiment::GsiHofX::${variable}
for:
variable: *variables

# Generate hofx that passed QC for JEDI
- transform: accept where
new name: experiment::hofxPassedQc::${variable}
starting field: experiment::GsiHofX::${variable}
where:
- experiment::EffectiveQC1::${variable} == 0
for:
variable: *variables

# Generate GSI hofx that passed JEDI QC
- transform: accept where
new name: experiment::hofx_y_mean_xb0PassedQc::${variable}
starting field: experiment::hofx_y_mean_xb0::${variable}
where:
- experiment::EffectiveQC1::${variable} == 0
for:
variable: *variables

# Generate omb that passed QC for JEDI
- transform: accept where
new name: experiment::ObsValueMinushofxPassedQc::${variable}
starting field: experiment::ObsValueMinusHofx::${variable}
where:
- experiment::EffectiveQC1::${variable} == 0
for:
variable: *variables

# Generate omb that passed QC for GSI
- transform: accept where
new name: experiment::ObsValueMinushofx_y_mean_xb0PassedQc::${variable}
starting field: experiment::ObsValueMinushofx_y_mean_xb0::${variable}
where:
- experiment::EffectiveQC1::${variable} == 0
for:
variable: *variables

graphics:

# JEDI h(x) vs Observations
# -------------------------
- batch figure:
variables: *variables
figure:
layout: [1,1]
title: 'Observations vs. JEDI h(x) | CASENAME | ${variable_title}'
output name: PLOTDIR/${variable}/jedi_hofx_vs_obs_${variable}.png
plots:
- add_xlabel: 'Observation Value'
add_ylabel: 'JEDI h(x)'
add_grid:
add_legend:
loc: 'upper left'
layers:
- type: Scatter
x:
variable: experiment::ObsValue::${variable}
y:
variable: experiment::GsiHofX::${variable}
markersize: 5
color: 'black'
label: 'JEDI h(x) versus obs (all obs)'
- type: Scatter
x:
variable: experiment::ObsValue::${variable}
y:
variable: experiment::hofxPassedQc::${variable}
markersize: 5
color: 'red'
label: 'JEDI h(x) versus obs (passed QC in JEDI)'

# GSI h(x) vs Observations
# -------------------------
- batch figure:
variables: *variables
figure:
layout: [1,1]
title: 'Observations vs. GSI h(x) | CASENAME | ${variable_title}'
output name: PLOTDIR/${variable}/gsi_hofx_vs_obs_${variable}.png
plots:
- add_xlabel: 'Observation Value'
add_ylabel: 'GSI h(x)'
add_grid:
add_legend:
loc: 'upper left'
layers:
- type: Scatter
x:
variable: experiment::ObsValue::${variable}
y:
variable: experiment::hofx_y_mean_xb0::${variable}
markersize: 5
color: 'black'
label: 'GSI h(x) versus obs (all obs)'
- type: Scatter
x:
variable: experiment::ObsValue::${variable}
y:
variable: experiment::hofx_y_mean_xb0PassedQc::${variable}
markersize: 5
color: 'red'
label: 'GSI h(x) versus obs (passed QC in JEDI)'

# JEDI h(x) vs GSI h(x)
# ---------------------

- batch figure:
variables: *variables
figure:
layout: [1,1]
title: 'JEDI h(x) vs. GSI h(x) | CASENAME | ${variable_title}'
output name: PLOTDIR/${variable}/gsi_hofx_vs_jedi_hofx_${variable}.png
bbox_inches: 'tight'
plots:
- add_xlabel: 'GSI h(x)'
add_ylabel: 'JEDI h(x)'
add_grid:
add_legend:
loc: 'upper left'
layers:
- type: Scatter
x:
variable: experiment::hofx_y_mean_xb0::${variable}
y:
variable: experiment::GsiHofX::${variable}
markersize: 5
color: 'black'
label: 'JEDI h(x) versus GSI h(x)'
- type: Scatter
x:
variable: experiment::hofx_y_mean_xb0PassedQc::${variable}
y:
variable: experiment::hofxPassedQc::${variable}
markersize: 5
color: 'red'
label: 'JEDI h(x) versus GSI h(x) (passed QC in JEDI)'

# JEDI omb vs GSI omb
# ---------------------

- batch figure:
variables: *variables
figure:
layout: [1,1]
title: 'JEDI omb vs. GSI omb| CASENAME | ${variable_title}'
output name: PLOTDIR/${variable}/gsi_omb_vs_jedi_omb_${variable}.png
plots:
- add_xlabel: 'GSI observation minus h(x)'
add_ylabel: 'JEDI observation minus h(x)'
add_grid:
add_legend:
loc: 'upper left'
layers:
- type: Scatter
x:
variable: experiment::ObsValueMinushofx_y_mean_xb0::${variable}
y:
variable: experiment::ObsValueMinusHofx::${variable}
markersize: 5
color: 'black'
label: 'GSI omb vs JEDI omb (all obs)'
- type: Scatter
x:
variable: experiment::ObsValueMinushofx_y_mean_xb0PassedQc::${variable}
y:
variable: experiment::ObsValueMinushofxPassedQc::${variable}
markersize: 5
color: 'red'
label: 'GSI omb vs JEDI omb (passed QC in JEDI)'
37 changes: 37 additions & 0 deletions use-eva/brt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

set -x

casedir=/work2/noaa/gsienkf/weihuang/jedi/case_study
run_dir=run_80.40t1n_36p

#caselist=(amsua_n19 iasi)
caselist=(amsua)
namelist=(brightness_temperature)

#---------------------------------------------------------------------------
for i in ${!namelist[@]}
do
echo "element $i is ${namelist[$i]}"
varname=${namelist[$i]}
for j in ${!caselist[@]}
do
plotdir=${caselist[$j]}
#obsfile=${casedir}/${caselist[$j]}/${run_dir}/obsout/${caselist[$j]}_n19_obs_2020011006_m_0000.nc4
obsfile=${casedir}/${caselist[$j]}/${run_dir}/obsout/${caselist[$j]}_n19_obs_2020121500_m_0000.nc4

if [ -f ${obsfile} ]
then
#if [ ! -d ${casename}/${varname} ]
#then
sed -e "s?OBSFILE?${obsfile}?g" \
-e "s?VARNAME?${varname}?g" \
-e "s?PLOTDIR?${plotdir}?g" \
amsuacoef.yaml.template > amsuacoef.yaml

eva amsuacoef.yaml
#fi
fi
done
done

71 changes: 71 additions & 0 deletions use-eva/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash

set -x

casedir=/work2/noaa/gsienkf/weihuang/jedi/case_study
run_dir=run_80.40t1n_36p

#caselist=(aircraft amsua iasi satwind scatwind sondes sfcship vadwind windprof)
caselist=(aircraft sondes sfcship)
var_list=(tsen tv uv q )
namelist=(air_temperature virtual_temperature eastward_wind,northward_wind specific_humidity)

#---------------------------------------------------------------------------
for i in ${!var_list[@]}
do
echo "element $i is ${var_list[$i]}"
varname=${namelist[$i]}
for j in ${!caselist[@]}
do
plotdir=${caselist[$j]}
if [ "${plotdir}" == "vadwind" ]
then
obsfile=${casedir}/${caselist[$j]}/${run_dir}/obsout/${caselist[$j]}_obs_2020011006_0000.nc4
else
obsfile=${casedir}/${caselist[$j]}/${run_dir}/obsout/${caselist[$j]}_${var_list[$i]}_obs_2020011006_0000.nc4
fi

if [ -f ${obsfile} ]
then
#if [ ! -d ${casename}/${varname} ]
#then
sed -e "s?OBSFILE?${obsfile}?g" \
-e "s?VARNAME?${varname}?g" \
-e "s?PLOTDIR?${plotdir}?g" \
obscoef.yaml.template > obscoef.yaml

eva obscoef.yaml
#fi
fi
done
done

caselist=(satwind scatwind vadwind windprof)
var_list=(uv)
namelist=(eastward_wind,northward_wind)

#---------------------------------------------------------------------------
for i in ${!var_list[@]}
do
echo "element $i is ${var_list[$i]}"
varname=${namelist[$i]}
for j in ${!caselist[@]}
do
plotdir=${caselist[$j]}
obsfile=${casedir}/${caselist[$j]}/${run_dir}/obsout/${caselist[$j]}_obs_2020011006_0000.nc4

if [ -f ${obsfile} ]
then
if [ ! -d ${casename}/eastward_wind ]
then
sed -e "s?OBSFILE?${obsfile}?g" \
-e "s?VARNAME?${varname}?g" \
-e "s?PLOTDIR?${plotdir}?g" \
obscoef.yaml.template > obscoef.yaml

eva obscoef.yaml
fi
fi
done
done

29 changes: 29 additions & 0 deletions use-eva/genone
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -x

output=1

caselist=(sfc-letkf_sfc_ps sfc-letkf_sfcship_ps sfc-letkf_sondes_ps sfc_ps sfcship_ps sondes_ps)
namelist=(surface_pressure)

#---------------------------------------------------------------------------
for i in ${!caselist[@]}
do
casename=${caselist[$i]}
for j in ${!namelist[@]}
do
varname=${namelist[$j]}
if [ -d ${casename}/${varname} ]
then
if [ ! -f panel-${casename}-${varname} ]
then
python make-panel.py --debug=1 \
--output=${output} \
--casename=${casename} \
--varname=${varname}
fi
fi
done
done

34 changes: 34 additions & 0 deletions use-eva/genpanel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

set -x

output=1

caselist=(aircraft amsua iasi_metop-a iasi_metop-b sondes satwind scatwind vadwind windprof \
sfc-letkf_sfc_ps sfc-letkf_sfcship_ps sfc-letkf_sondes_ps \
sfc_ps sfcship_ps sondes_ps)
namelist=(brightness_temperature air_temperature \
eastward_wind northward_wind \
surface_pressure \
specific_humidity virtual_temperature)

#---------------------------------------------------------------------------
for i in ${!caselist[@]}
do
casename=${caselist[$i]}
for j in ${!namelist[@]}
do
varname=${namelist[$j]}
if [ -d ${casename}/${varname} ]
then
if [ ! -f panel-${casename}-${varname} ]
then
python make-panel.py --debug=1 \
--output=${output} \
--casename=${casename} \
--varname=${varname}
fi
fi
done
done

Loading

0 comments on commit 4719cb2

Please sign in to comment.