Skip to content

Commit

Permalink
preliminary removal of CDATE and GDATE (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Feb 7, 2023
1 parent 9dbc973 commit b349d32
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 29 deletions.
14 changes: 7 additions & 7 deletions parm/atm/obs/config/amsua_n19.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}amsua_n19.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}amsua_n19.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/diag_amsua_n19_${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/diag_amsua_n19_${PDY}${cyc}.nc4
io pool:
max pool size: 1
simulated variables: [brightness_temperature]
Expand All @@ -22,14 +22,14 @@ obs operator:
EndianType: little_endian
CoefficientPath: !ENV ${DATA}/crtm/
obs bias:
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias.${GDATE}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias.${CDATE}.nc4
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias.${gPDY}${gcyc}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias.${PDY}${cyc}.nc4
variational bc:
predictors:
- name: constant
- name: lapse_rate
order: 2
tlapse: &amsua_n19_tlapse !ENV ${DATA}/obs/${GPREFIX}amsua_n19.tlapse.${GDATE}.txt
tlapse: &amsua_n19_tlapse !ENV ${DATA}/obs/${GPREFIX}amsua_n19.tlapse.${gPDY}${gcyc}.txt
- name: lapse_rate
tlapse: *amsua_n19_tlapse
- name: emissivity
Expand All @@ -46,11 +46,11 @@ obs bias:
step size: 1.0e-4
largest analysis variance: 10000.0
prior:
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias_cov.${GDATE}.nc4
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias_cov.${gPDY}${gcyc}.nc4
inflation:
ratio: 1.1
ratio for small dataset: 2.0
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias_cov.${CDATE}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias_cov.${PDY}${cyc}.nc4
obs filters:
- filter: BlackList
filter variables:
Expand Down
14 changes: 7 additions & 7 deletions parm/atm/obs/config/lgetkf_amsua_n19.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ./obs/${OPREFIX}amsua_n19.${CDATE}.nc4
obsfile: !ENV ./obs/${OPREFIX}amsua_n19.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ./diags/diag_amsua_n19_${CDATE}.nc4
obsfile: !ENV ./diags/diag_amsua_n19_${PDY}${cyc}.nc4
io pool:
max pool size: 1
simulated variables: [brightness_temperature]
Expand All @@ -27,14 +27,14 @@ obs operator:
obs error:
covariance model: diagonal
obs bias:
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias.${GDATE}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias.${CDATE}.nc4
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias.${gPDY}${gcyc}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias.${PDY}${cyc}.nc4
variational bc:
predictors:
- name: constant
- name: lapse_rate
order: 2
tlapse: &amsua_n19_tlapse !ENV ${DATA}/obs/${GPREFIX}amsua_n19.tlapse.${GDATE}.txt
tlapse: &amsua_n19_tlapse !ENV ${DATA}/obs/${GPREFIX}amsua_n19.tlapse.${gPDY}${gcyc}.txt
- name: lapse_rate
tlapse: *amsua_n19_tlapse
- name: emissivity
Expand All @@ -51,11 +51,11 @@ obs bias:
step size: 1.0e-4
largest analysis variance: 10000.0
prior:
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias_cov.${GDATE}.nc4
input file: !ENV ${DATA}/obs/${GPREFIX}amsua_n19.satbias_cov.${gPDY}${gcyc}.nc4
inflation:
ratio: 1.1
ratio for small dataset: 2.0
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias_cov.${CDATE}.nc4
output file: !ENV ${DATA}/bc/${APREFIX}amsua_n19.satbias_cov.${PDY}${cyc}.nc4
obs filters:
- filter: Bounds Check
filter variables:
Expand Down
4 changes: 2 additions & 2 deletions parm/atm/obs/config/lgetkf_sondes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ./obs/${OPREFIX}sondes.${CDATE}.nc4
obsfile: !ENV ./obs/${OPREFIX}sondes.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ./diags/diag_sondes_lgetkf_${CDATE}.nc4
obsfile: !ENV ./diags/diag_sondes_lgetkf_${PDY}${cyc}.nc4
io pool:
max pool size: 1
simulated variables: [eastward_wind, northward_wind, air_temperature]
Expand Down
4 changes: 2 additions & 2 deletions parm/atm/obs/config/sondes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}sondes.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}sondes.${PDY}${cyc}.nc4
obsgrouping:
group variables: ["station_id"]
sort variable: "air_pressure"
sort order: "descending"
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/diag_sondes_${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/diag_sondes_${PDY}${cyc}.nc4
io pool:
max pool size: 1
simulated variables: [surface_pressure, air_temperature, eastward_wind, northward_wind, specific_humidity]
Expand Down
3 changes: 3 additions & 0 deletions test/atm/global-workflow/jjob_ens_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export EXPDIR=$bindir/test/atm/global-workflow/testrun/experiments/gdas_test
export PDY=20210323
export cyc=18
export CDATE=${PDY}${cyc}
export gPDY=20210323
export gcyc=12
export GDATE=${gPDY}${gcyc}
export ROTDIR=$bindir/test/atm/global-workflow/testrun/ROTDIRS
export CDUMP=gdas
export DATAROOT=$bindir/test/atm/global-workflow/testrun/RUNDIR
Expand Down
3 changes: 3 additions & 0 deletions test/atm/global-workflow/jjob_var_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export EXPDIR=$bindir/test/atm/global-workflow/testrun/experiments/gdas_test
export PDY=20210323
export cyc=18
export CDATE=${PDY}${cyc}
export gPDY=20210323
export gcyc=12
export GDATE=${gPDY}${gcyc}
export ROTDIR=$bindir/test/atm/global-workflow/testrun/ROTDIRS
export CDUMP=gdas
export DATAROOT=$bindir/test/atm/global-workflow/testrun/RUNDIR
Expand Down
2 changes: 1 addition & 1 deletion test/atm/run_jedi_exe_3dhofx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if [ $rc -ne 0 ]; then
fi

# Check for job submission error
error=$(grep -i "error" stdout.txt | wc -l)
error=$(grep "sbatch: error" stdout.txt | wc -l)
if [ $error -ne 0 ]; then
rc=$error
exit $rc
Expand Down
2 changes: 1 addition & 1 deletion test/atm/run_jedi_exe_3dvar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if [ $rc -ne 0 ]; then
fi

# Check for job submission error
error=$(grep -i "error" stdout.txt | wc -l)
error=$(grep "sbatch: error" stdout.txt | wc -l)
if [ $error -ne 0 ]; then
rc=$error
exit $rc
Expand Down
2 changes: 1 addition & 1 deletion test/atm/run_jedi_exe_letkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if [ $rc -ne 0 ]; then
fi

# Check for job submission error
error=$(grep -i "error" stdout.txt | wc -l)
error=$(grep "sbatch: error" stdout.txt | wc -l)
if [ $error -ne 0 ]; then
rc=$error
exit $rc
Expand Down
2 changes: 2 additions & 0 deletions test/genYAML_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ config:
OBS_LIST: ${srcdir}/parm/atm/obs/lists/gdas_prototype.yaml
OPREFIX: gdas.t00z.
CDATE: '2022033000'
PDY: '20220330'
cyc: '00'
valid_time: '2022-03-30T00:00:00Z'
atm_window_length: PT6H
CASE: 'C48'
Expand Down
12 changes: 6 additions & 6 deletions ush/run_jedi_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def run_jedi_exe(yamlconfig):
prev_cycle = valid_time - dt.timedelta(hours=int(h))
window_begin = valid_time - dt.timedelta(hours=int(h)/2)
cyc = valid_time.strftime("%H")
cdate = valid_time.strftime("%Y%m%d%H")
gcyc = prev_cycle.strftime("%H")
gdate = prev_cycle.strftime("%Y%m%d%H")
gPDY = prev_cycle.strftime("%Y%m%d")
pdy = valid_time.strftime("%Y%m%d")
os.environ['PDY'] = str(pdy)
Expand Down Expand Up @@ -103,13 +101,15 @@ def run_jedi_exe(yamlconfig):
'BIAS_OUT_DIR': os.path.join(workdir, 'bc'),
'CRTM_COEFF_DIR': os.path.join(workdir, 'crtm'),
'BIAS_PREFIX': f"{executable_subconfig['dump']}.t{gcyc}z.",
'BIAS_DATE': f"{gdate}",
'BIAS_DATE': f"{gPDY}{gcyc}",
'DIAG_DIR': os.path.join(workdir, 'diags'),
'OBS_DIR': os.path.join(workdir, 'obs'),
'OBS_PREFIX': f"{executable_subconfig['dump']}.t{cyc}z.",
'OBS_DATE': f"{cdate}",
'CDATE': f"{cdate}",
'GDATE': f"{gdate}",
'OBS_DATE': f"{pdy}{cyc}",
'PDY': f"{pdy}",
'cyc': f"{cyc}",
'gPDY': f"{gPDY}",
'gcyc': f"{gcyc}",
'valid_time': f"{valid_time.strftime('%Y-%m-%dT%H:%M:%SZ')}",
'window_begin': f"{window_begin.strftime('%Y-%m-%dT%H:%M:%SZ')}",
'prev_valid_time': f"{prev_cycle.strftime('%Y-%m-%dT%H:%M:%SZ')}",
Expand Down
5 changes: 4 additions & 1 deletion ush/ufsda/genYAML.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def get_runtime_config(config_dict):
# compute some runtime variables
# this will probably need pulled out somewhere else eventually
# a temporary hack to get UFO evaluation stuff and ATM VAR going again
valid_time = dt.datetime.strptime(config_dict['CDATE'], '%Y%m%d%H')
vpdy = dt.datetime.strptime(config_dict['PDY'], '%Y%m%d')
vcyc = dt.datetime.strptime(config_dict['cyc'], '%H')
vdate = int(config_dict.get('PDY'))*100 + int(config_dict.get('cyc'))
valid_time = dt.datetime.strptime(str(vdate), '%Y%m%d%H')
assim_freq = int(config_dict.get('assim_freq', 6))
window_begin = valid_time - dt.timedelta(hours=assim_freq/2)
window_end = valid_time + dt.timedelta(hours=assim_freq/2)
Expand Down
5 changes: 4 additions & 1 deletion ush/ufsda/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def get_env_config(component='atm'):
valid_time = datetime_from_cdate(cdate)
assim_freq = int(os.environ['assim_freq'])
prev_cycle = valid_time - dt.timedelta(hours=assim_freq)
gPDY = f"{prev_cycle.strftime('%Y%m%d')}"
os.environ['gPDY'] = str(gPDY)
gdate = os.environ['gPDY']+os.environ['gcyc']
window_begin = valid_time - dt.timedelta(hours=assim_freq/2)

config = {
Expand All @@ -135,7 +138,7 @@ def get_env_config(component='atm'):
'OBS_DATE': cdate,
'BIAS_IN_DIR': os.environ['COMOUT'],
'BIAS_PREFIX': f"{os.environ['GDUMP']}.t{os.environ['gcyc']}z.",
'BIAS_DATE': f"{os.environ['GDATE']}",
'BIAS_DATE': gdate,
'experiment': os.getenv('PSLOT', 'test'),
}
config['BKG_YYYYmmddHHMMSS'] = valid_time.strftime('%Y%m%d.%H%M%S')
Expand Down

0 comments on commit b349d32

Please sign in to comment.