Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validated aircraft yamls #128

Merged
merged 8 commits into from
Sep 27, 2024
38 changes: 33 additions & 5 deletions rrfs-test/validated_yamls/gen_yaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,44 @@

#use this script to combine the basic config yaml with an obtype config yaml.
basic_config="fv3jedi_hyb3denvar.yaml"
obtype_config="msonet_airTemperature_obtype188.yaml"
obtype_configs="
aircft_airTemperature_130.yaml
aircft_airTemperature_131.yaml
aircft_airTemperature_133.yaml
aircft_airTemperature_134.yaml
aircft_airTemperature_135.yaml

# Don't edit below this line.
aircft_specificHumidity_133.yaml
aircft_specificHumidity_134.yaml

aircft_uv_230.yaml
aircft_uv_231.yaml
aircft_uv_233.yaml
aircft_uv_234.yaml
aircft_uv_235.yaml

msonet_airTemperature_188.yaml
msonet_specificHumidity_188.yaml
msonet_stationPressure_188.yaml
msonet_uv_288.yaml
"

obtype="conv.yaml"

temp_config="combined.yaml"
rm -f $temp_config
echo "catting the following yamls:"
for obtype_config in $obtype_configs; do
echo " $obtype_config"
cat ./templates/obtype_config/$obtype_config >> ./$temp_config
done

# copy the basic configuration yaml into the new yaml
cp -p templates/basic_config/$basic_config ./$obtype_config
cp -p templates/basic_config/$basic_config ./${obtype}

# use the stread editor to replace the instance of @OBSERVATION@ placeholder
# in the basic configuration file with the contents of the obtype config yaml.
sed -i '/@OBSERVATIONS@/{
r templates/obtype_config/'"${obtype_config}"'
r ./'"${temp_config}"'
d
}' ./$obtype_config
}' ./${obtype}
103 changes: 103 additions & 0 deletions rrfs-test/validated_yamls/templates/basic_config/mpasjedi_3dvar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@

# application-agnostic anchors that specify observation errors
# applicable to Variational, HofX3D

# reusable latitude bands for all observation types
_conventional obs localizations: &heightAndHorizObsLoc
_blank: null

_nonconventional obs localizations: &horizObsLoc
_blank: null

_obs space: &ObsSpace
obs perturbations seed: 1
io pool:
max pool size: 10
distribution:
name: RoundRobin

_obs error diagonal: &ObsErrorDiagonal
covariance model: diagonal
# Note: the same 'obs perturbations seed' must be used for all members for the 'zero-mean perturbations' option to work
zero-mean perturbations: true
member: 1
number of members: 1

_get values: &GetValues
nnearest: 3

_multi iteration filter: &multiIterationFilter
apply at iterations: 0,1,2,3,4,5
# ObsAnchors and ObsErrorAnchors are automatically prepended above this line
_iteration: &iterationConfig
geometry:
nml_file: ./namelist.atmosphere
streams_file: ./streams.atmosphere
deallocate non-da fields: true
interpolation type: unstructured
gradient norm reduction: 1e-3
_member: &memberConfig
date: &analysisDate '2024-05-27T00:00:00Z'
state variables: &incvars [spechum,surface_pressure,temperature,uReconstructMeridional,uReconstructZonal]
stream name: ensemble

output:
filename: ./ana.$Y-$M-$D_$h.$m.$s.nc
stream name: analysis
variational:
minimizer:
algorithm: DRPCG
iterations:
- <<: *iterationConfig
diagnostics:
departures: ombg
ninner: 50
- <<: *iterationConfig
ninner: 50
final:
diagnostics:
departures: oman
cost function:
cost type: 3D-Var
time window:
begin: '2024-05-26T21:00:00Z'
length: PT6H
jb evaluation: false
geometry:
nml_file: ./namelist.atmosphere
streams_file: ./streams.atmosphere
deallocate non-da fields: true
interpolation type: unstructured
analysis variables: *incvars
background:
state variables: [spechum,surface_pressure,temperature,uReconstructMeridional,uReconstructZonal,theta,rho,u,qv,pressure,landmask,xice,snowc,skintemp,ivgtyp,isltyp,snowh,vegfra,u10,v10,lai,smois,tslb,pressure_p,qc,qi,qg,qr,qs,cldfrac]
filename: data/restart.2024-05-27_00.00.00.nc
date: *analysisDate
background error:
covariance model: ensemble
localization:
localization method: SABER
saber central block:
saber block name: BUMP_NICAS
active variables: *incvars
read:
io:
data directory: data/bumploc/conus12km-401km11levels
files prefix: bumploc_401km11levels
drivers:
multivariate strategy: duplicated
read local nicas: true
model:
level for 2d variables: last
members from template:
template:
<<: *memberConfig
filename: ./data/ens/mem%iMember%/init.nc
pattern: %iMember%
start: 1
zero padding: 2
nmembers: 30

observations:
observers:
@OBSERVATIONS@
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
- obs space:
name: aircraft
obsdatain:
engine:
type: H5File
obsfile: "obsout/aircraft_tsen_obs_2022052619.nc4"
obsdataout:
engine:
type: H5File
obsfile: AIRCFT_hofxs_airTemperature_130_2022052619.nc4
allow overwrite: true
io pool:
max pool size: 1
observed variables: [airTemperature]
simulated variables: [airTemperature]

obs operator:
name: Composite
components:
- name: VertInterp
vertical coordinate: air_pressure
observation vertical coordinate: pressure
observation vertical coordinate group: MetaData
interpolation method: log-linear
gsi geovals:
filename: "obsout/aircraft_tsen_geoval_2022052619.nc4"
levels_are_top_down: False
variables:
- name: airTemperature

obs error:
covariance model: diagonal

obs filters:
# ------------------
# airTemperature
# ------------------
# Initial error assignment
# 130
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 130
action:
name: assign error
error function:
name: ObsFunction/ObsErrorModelStepwiseLinear
options:
xvar:
name: MetaData/pressure
xvals: [110000, 105000, 100000, 95000, 90000, 85000, 80000, 75000, 70000, 65000, 60000, 55000, 50000, 45000, 40000, 35000, 30000, 25000, 20000, 15000, 10000, 7500, 5000, 4000, 3000, 2000, 1000, 500, 400, 300, 200, 100, 0]
errors: [2.4618, 2.4244, 2.3481, 2.2352, 2.0999, 1.9647, 1.8522, 1.7754, 1.7323, 1.7134, 1.7093, 1.7131, 1.717, 1.7061, 1.655, 1.5397, 1.3754, 1.2567, 1.2116, 1.252, 1.37, 1.501, 1.6004, 1.6588, 1.6865, 1.6969, 1.6998, 1.7001, 1.7, 1.7, 1.7003, 1.6999, 1.6956]
defer to post: true

# Ajusted error after initial assignment (qcmod.f90)
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 130
action:
name: inflate error
inflation variable:
name: ObsFunction/ObsErrorFactorConventional
options:
test QCflag: PreQC
test QCthreshold: 3
inflate variables: [airTemperature]
pressure: MetaData/pressure
distance threshold: -1.
defer to post: true

# error inflation based on pressure check (setupt.f90)
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 130
action:
name: inflate error
inflation variable:
name: ObsFunction/ObsErrorFactorPressureCheck
options:
variable: airTemperature
inflation factor: 8.0
geovar_sfc_geomz: surface_geometric_height
defer to post: true

- filter: Bounds Check
filter variables:
- name: airTemperature
minvalue: 100
maxvalue: 400
defer to post: true

- filter: Background Check
filter variables:
- name: airTemperature
threshold: 7.0
where:
- variable: ObsType/airTemperature
is_in: 130
action:
name: reject
defer to post: true

# Print filter data
- filter: Print Filter Data
message: Printing filter data
summary: true
variables:
- variable: MetaData/latitude
- variable: MetaData/longitude
- variable: MetaData/pressure
- variable: ObsType/airTemperature
- variable: ObsValue/airTemperature
- variable: QCflagsData/airTemperature

- filter: GOMsaver
filename: ./Data/geovals/aircft_geovals_rrfs_2022052619.nc4
Loading
Loading