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

[develop] Introduce DA data preprocessing to workflow #778

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7cbc445
First draft, doesnt work
mkavulich Mar 23, 2023
340f9ab
Emergency commit, still not working
mkavulich Mar 23, 2023
5aa39f6
Mods to retrieve_data script for retrieving observations
mkavulich Mar 24, 2023
61af001
First draft of get obs exscript. Modified data_locations to look for
mkavulich Mar 25, 2023
01fb25b
First version that makes a correct XML! Still a few kinks to work out:
mkavulich Mar 25, 2023
5429625
It works! Just needed to specify HPSS partition
mkavulich Mar 25, 2023
d0472d8
Start new workflow yaml "warmstart.yaml" that will be used for GSI/DA…
mkavulich Apr 10, 2023
7471a0a
Prevent user from entering empty --tests argument to run_WE2E_tests.py
mkavulich Apr 10, 2023
9d1b37b
Fix incorrect path after rebase, add alternate path for older RAP data
mkavulich Apr 11, 2023
d59885c
Starting to link obs to tasks
mkavulich Apr 20, 2023
158b7e1
Some better design choices after putting some more thought into it
mkavulich Apr 20, 2023
24aac12
Data now successfully staged for process_bufr task!
mkavulich Apr 20, 2023
a99fd5b
Add NLDN lightning data to get_da_obs
mkavulich Apr 20, 2023
6679d59
Adding NLDN lightning to get_da_obs. Not fully tested yet, need to mo…
mkavulich Apr 22, 2023
64dbc63
Use "else" statement in final try block for generate_FV3LAM_wflow.py …
mkavulich Apr 22, 2023
1f1c497
Hot diggity, got the process_bufr and process_lightning tasks working…
mkavulich Apr 22, 2023
252eade
Untested first pass at defining the early workflow
christinaholtNOAA Apr 11, 2023
a612a0f
Partial incorporation of Christina's changes from #725
mkavulich Apr 24, 2023
870722e
CYCLE_TYPE is a run-time arg.
christinaholtNOAA Apr 28, 2023
769c1af
Make paths and data stores configurable.
christinaholtNOAA Apr 28, 2023
de99914
Remove duplicative information from machine files.
christinaholtNOAA Apr 28, 2023
4f56a54
Renaming process_bufr to process_bufrobs.
christinaholtNOAA Apr 28, 2023
412fa6d
Working prepbufr getting and processing workflow.
christinaholtNOAA Apr 28, 2023
5530100
This version of rrfs_beta might work.
christinaholtNOAA Apr 28, 2023
c9fe408
Turn it off since we can't use it.
christinaholtNOAA Apr 29, 2023
ec0eae1
Merge remote-tracking branch 'upstream/develop' into feature/add_get_…
mkavulich May 1, 2023
f2aca37
Updates to fix failing unit tests
mkavulich May 2, 2023
c88704a
Merge remote-tracking branch 'upstream/develop' into feature/add_get_…
mkavulich May 6, 2023
5ab55b8
Update get_da_obs modulefiles for latest develop changes
mkavulich May 8, 2023
5bef9d4
Forgot to add CI sckip for new HPSS tests
mkavulich May 8, 2023
445c003
Remove UFS case study skip, will go with propsal from #776
mkavulich May 8, 2023
54df375
Merge remote-tracking branch 'upstream/develop' into feature/add_get_…
mkavulich May 8, 2023
0c4e3c6
Add command-line instructions for unit tests
mkavulich May 10, 2023
cbccf74
Change "two days ago" tests to "three days ago"...occasionally some d…
mkavulich May 10, 2023
751a11f
Remove references to current working directory; this causes occasiona…
mkavulich May 10, 2023
b158542
Allow this sort of similarity in tests.
christinaholtNOAA May 10, 2023
69c6abd
Merge remote-tracking branch 'upstream/develop' into feature/add_get_…
mkavulich May 15, 2023
a537195
Update wording to reflect that this is not RRFS.
christinaholtNOAA May 16, 2023
c31a0b6
Rename the community config for da cycling.
christinaholtNOAA May 16, 2023
ae8ebc8
Attempt to fix test that only checks the URL.
christinaholtNOAA May 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python_linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
- name: Lint the test directory
run: |
export PYTHONPATH=${PWD}/ush
pylint --ignore-imports=yes tests/test_python/
pylint --min-similarity-lines=15 --ignore-imports=yes tests/test_python/
89 changes: 89 additions & 0 deletions jobs/JREGIONAL_GET_DA_OBS
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/bash

#
#-----------------------------------------------------------------------
#
# Source the variable definitions file and the bash utility functions.
#
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
source_config_for_task "task_run_anl|task_run_enkf" ${GLOBAL_VAR_DEFNS_FP}
. $USHdir/job_preamble.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
#-----------------------------------------------------------------------
#
{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1
#
#-----------------------------------------------------------------------
#
# Get the full path to the file in which this script/function is located
# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in
# which the file is located (scrfunc_dir).
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
#-----------------------------------------------------------------------
#
# Print message indicating entry into script.
#
#-----------------------------------------------------------------------
#
print_info_msg "
========================================================================
Entering script: \"${scrfunc_fn}\"
In directory: \"${scrfunc_dir}\"

This script retrieves observation data for RRFS data assimilation tasks.
========================================================================"

#
#-----------------------------------------------------------------------
#
# Create the directory where the GSI obs files should be stored
#
#-----------------------------------------------------------------------
#
export DATA="${COMIN}/obs"
mkdir_vrfy -p "${DATA}"

# Set needed date/time variables
export START_DATE=$(echo "${PDY} ${cyc}")
export YYYYMMDDHH=$(date +%Y%m%d%H -d "${START_DATE}")

#
#-----------------------------------------------------------------------
#
# Call the ex-script for this J-job
#
#-----------------------------------------------------------------------
#
$SCRIPTSdir/exregional_get_da_obs.sh || \
print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
#
# Run job postamble.
#
#-----------------------------------------------------------------------
#
job_postamble
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/function.
#
#-----------------------------------------------------------------------
#
{ restore_shell_opts; } > /dev/null 2>&1

2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_EXTRN_MDL_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ esac
#
#-----------------------------------------------------------------------
#
# Create the directory where the exetrnal model files should be stored
# Create the directory where the external model files should be stored
#
#-----------------------------------------------------------------------
#
Expand Down
13 changes: 9 additions & 4 deletions jobs/JREGIONAL_PROCESS_BUFR → jobs/JREGIONAL_PROCESS_BUFROBS
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#-----------------------------------------------------------------------
#
. $USHdir/source_util_funcs.sh
source_config_for_task "task_process_bufr" ${GLOBAL_VAR_DEFNS_FP}
source_config_for_task "task_process_bufrobs" ${GLOBAL_VAR_DEFNS_FP}
. $USHdir/job_preamble.sh "TRUE"
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -75,11 +75,16 @@ the specified cycle.
#-----------------------------------------------------------------------
#
if [ ${CYCLE_TYPE} == "spinup" ]; then
DATA="${DATA:-${COMIN}/process_bufr_spinup}"
DATA="${DATA:-${COMIN}/process_bufrobs_spinup}"
else
DATA="${DATA:-${COMIN}/process_bufr}"
DATA="${DATA:-${COMIN}/process_bufrobs}"
fi
mkdir_vrfy -p ${DATA}

# Set needed date/time variables
export START_DATE=$(echo "${PDY} ${cyc}")
export YYYYMMDDHH=$(date +%Y%m%d%H -d "${START_DATE}")

#
#-----------------------------------------------------------------------
#
Expand All @@ -88,7 +93,7 @@ mkdir_vrfy -p ${DATA}
#
#-----------------------------------------------------------------------
#
$SCRIPTSdir/exregional_process_bufr.sh || print_err_msg_exit "\
$SCRIPTSdir/exregional_process_bufrobs.sh || print_err_msg_exit "\
Call to ex-script corresponding to J-job \"${scrfunc_fn}\" failed."
#
#-----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_PROCESS_LIGHTNING
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#-----------------------------------------------------------------------
#
. ${USHdir}/source_util_funcs.sh
source_config_for_task "task_process_lightning" ${GLOBAL_VAR_DEFNS_FP}
source_config_for_task "task_process_bufrobs" ${GLOBAL_VAR_DEFNS_FP}
. ${USHdir}/job_preamble.sh "TRUE"
#
#-----------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions modulefiles/tasks/hera/get_da_obs.local.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
load("hpss")
load("python_srw")
2 changes: 2 additions & 0 deletions modulefiles/tasks/jet/get_da_obs.local.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
load("hpss")
load("python_srw")
11 changes: 10 additions & 1 deletion parm/data_locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,12 @@ RAP_obs:
archive_format: zip
archive_path:
- /BMC/fdr/Permanent/{yyyy}/{mm}/{dd}/data/grids/rap/obs
- /BMC/fdr/Permanent/{yyyy}/{mm}/{dd}/data/grids/rap/prepbufr
archive_internal_dir:
- ./
- ""
archive_file_names:
- "{yyyymmddhh}00.zip"
- "{yyyymmddhh}00.zip"
file_names:
obs:
- "{yyyymmddhh}.rap.t{hh}z.prepbufr.tm00"
Expand Down Expand Up @@ -358,6 +360,13 @@ RAP_obs:
- "{yyyymmddhh}.rap.t{hh}z.satwnd.tm00.bufr_d"
- "{yyyymmddhh}.rap.t{hh}z.sevasr.tm00.bufr_d"
- "{yyyymmddhh}.rap.t{hh}z.ssmisu.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.prepbufr.tm00"
- "{yyyymmddhh}.rap_e.t{hh}z.1bamua.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.1bhrs4.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.1bmhs.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.lgycld.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.nexrad.tm00.bufr_d"
- "{yyyymmddhh}.rap_e.t{hh}z.satwnd.tm00.bufr_d"
aws:
protocol: download
url: https://noaa-rap-pds.s3.amazonaws.com/rap.{yyyymmdd}
Expand Down
1 change: 0 additions & 1 deletion parm/wflow/coldstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,3 @@ metatask_run_ensemble:
taskdep:
attrs:
task: aqm_lbcs

102 changes: 102 additions & 0 deletions parm/wflow/da_data_preproc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# This group contains all the tasks needed for preprocessing tasks for
# RRFS DA.

default_data_preproc_task: &default_preproc
account: '&ACCOUNT;'
attrs:
cycledefs: #cycledefs_type#
maxtries: '1'
envars: &default_envars
GLOBAL_VAR_DEFNS_FP: '&GLOBAL_VAR_DEFNS_FP;'
USHdir: '&USHdir;'
PDY: !cycstr "@Y@m@d"
cyc: !cycstr "@H"
subcyc: !cycstr "@M"
LOGDIR: !cycstr "&LOGDIR;"
CYCLE_TYPE: '#cycle_type#'
native: '{{ platform.SCHED_NATIVE_CMD }}'
nodes: '{{ nnodes }}:ppn={{ ppn }}'
nnodes: 1
nodesize: "&NCORES_PER_NODE;"
ppn: 1
partition: '{% if platform.get("PARTITION_DEFAULT") %}&PARTITION_DEFAULT;{% else %}None{% endif %}'
queue: '&QUEUE_DEFAULT;'
walltime: 00:25:00


task_get_da_obs:
<<: *default_preproc
command: '&LOAD_MODULES_RUN_TASK_FP; "get_da_obs" "&JOBSdir;/JREGIONAL_GET_DA_OBS"'
attrs:
cycledefs: forecast
maxtries: '1'
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
partition: '&PARTITION_HPSS;'
queue: '&QUEUE_HPSS;'
dependency:
timedep: '<cyclestr offset="&START_TIME_CONVENTIONAL;">@Y@m@d@H@M00</cyclestr>'

metatask_process_obs_cycle_type:
var:
cycledefs_type: forecast,long_forecast
cycle_type: prod

task_process_radarref_#cycle_type#:
<<: *default_preproc
command: '&LOAD_MODULES_RUN_TASK_FP; "process_obs" "&JOBSdir;/JREGIONAL_PROCESS_RADARREF"'
ppn: 24
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
dependency:
or:
taskdep:
attrs:
task: get_da_obs
and:
not:
taskvalid:
attrs:
task: get_da_obs
streq:
left: do_real_time
right: '{% if workflow.DO_REAL_TIME %}do_real_time{% endif %}'
timedep: '<cyclestr offset="&START_TIME_NSSLMOSAIC;">@Y@m@d@H@M00</cyclestr>'

task_process_lightning_#cycle_type#:
<<: *default_preproc
command: '&LOAD_MODULES_RUN_TASK_FP; "process_obs" "&JOBSdir;/JREGIONAL_PROCESS_LIGHTNING"'
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
dependency:
or:
taskdep:
attrs:
task: get_da_obs
and:
not:
taskvalid:
attrs:
task: get_da_obs
streq:
left: do_real_time
right: '{% if workflow.DO_REAL_TIME %}do_real_time{% endif %}'
timedep: '<cyclestr offset="&START_TIME_LIGHTNING;">@Y@m@d@H@M00</cyclestr>'


task_process_bufrobs_#cycle_type#:
<<: *default_preproc
command: '&LOAD_MODULES_RUN_TASK_FP; "process_obs" "&JOBSdir;/JREGIONAL_PROCESS_BUFROBS"'
join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;'
dependency:
or:
taskdep:
attrs:
task: get_da_obs
and:
not:
taskvalid:
attrs:
task: get_da_obs
streq:
left: do_real_time
right: '{% if workflow.DO_REAL_TIME %}do_real_time{% endif %}'
timedep: '<cyclestr offset="&START_TIME_CONVENTIONAL;">@Y@m@d@H@M00</cyclestr>'

Loading