-
Notifications
You must be signed in to change notification settings - Fork 217
Add the repair job for the reforecast #2838
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
Changes from 53 commits
8181536
08f4f81
fbe4688
e8d7fa0
225eab1
e7b5e7f
0afdfbe
e7c3f9b
c969dda
5e25361
3be3217
e447511
092a787
8d03a14
9624baa
faf1c84
22792e3
02d1cf5
bae7d72
5f307ca
8719f90
33391a9
3bde14c
d366fcd
ed47548
416e0bc
e7f0141
9d89ef9
bb436b7
c119f81
251410f
528a2e0
9dda05a
57d24c4
b4387f9
0ceaca9
a43ab9b
92bee3d
cfa75ec
3ccacc9
7669667
d30fdc1
c8c5391
7b416e0
dcc04e7
fef9dd6
f1cb9e7
732fb9c
bf9b792
b9f8024
574ecfe
b523fdb
913c4dd
d88ea83
126d854
02d144e
5bfe5e3
611cabd
6d7d8e6
9b03433
e759f89
1bb8f13
00b7a30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #! /usr/bin/env bash | ||
| # | ||
| # | ||
| ##################################################################### | ||
| source "${HOMEgfs}/ush/preamble.sh" | ||
| source "${HOMEgfs}/ush/jjob_header.sh" -e "repair_replay" -c "base repair_replay" | ||
|
|
||
| #################################### | ||
| # Specify Execution Areas | ||
| #################################### | ||
| # | ||
| # Construct COM variables from templates | ||
| YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \ | ||
| COMIN_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL | ||
| COMOUT_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL | ||
|
|
||
| export COMIN_03=${HOMEgfs}/anl | ||
|
|
||
| ######################################################## | ||
| # Execute the acc script. | ||
| "${SCRgfs}/exgefs_atmos_repair_replay.sh" | ||
| export err=$?; err_chk | ||
| ############################## | ||
| # Remove the Temporary working directory | ||
| ############################## | ||
| if [[ "${KEEPDATA}" != "YES" ]] ; then | ||
| rm -fr "${DATA}" | ||
|
|
||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| source "${HOMEgfs}/ush/preamble.sh" | ||
|
|
||
| ############################################################### | ||
| echo | ||
| echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" | ||
| . "${HOMEgfs}/ush/load_fv3gfs_modules.sh" | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||
|
|
||
| export job="repair_replay" | ||
| export jobid="${job}.$$" | ||
|
|
||
| ############################################################### | ||
| # Execute the JJOB | ||
| "${HOMEgfs}/jobs/JGEFS_ATMOS_ACC" | ||
| status=$? | ||
| [[ ${status} -ne 0 ]] && exit "${status}" | ||
|
|
||
|
|
||
| exit 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| ########## config.repair_replay ######### | ||
| # repair_replay specific | ||
|
|
||
| echo "BEGIN: config.repair_replay" | ||
|
|
||
|
|
||
| export varlist_FLXacc03="${PARMgfs}/product/gefs_parmlist_FLXacc03.parm" # Parameter table for f03 acc/ave/min/max variables (PSL data) | ||
| export varlist_masteracc06="${PARMgfs}/product/gefs_parmlist_masteracc06.parm" # Parameter table for f06 acc/ave/min/max variables | ||
| export varlist_masteracc03="${PARMgfs}/product/gefs_parmlist_masteracc03.parm" # Parameter table for f06 acc/ave/min/max variables | ||
|
|
||
| . "${EXPDIR}/config.resources" repair_replay | ||
|
|
||
| echo "END: config.repair_replay" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| :WATR:surface:0-3 hour acc fcst: | ||
| :SNOWC:surface:0-3 hour ave fcst: | ||
| :SNOHF:surface:0-3 hour ave fcst: | ||
| :DLWRF:surface:0-3 hour ave fcst: | ||
| :ULWRF:surface:0-3 hour ave fcst: | ||
| :DSWRF:surface:0-3 hour ave fcst: | ||
| :USWRF:surface:0-3 hour ave fcst: | ||
| :USWRF:top of atmosphere:0-3 hour ave fcst: | ||
| :ULWRF:top of atmosphere:0-3 hour ave fcst: | ||
| :UFLX:surface:0-3 hour ave fcst: | ||
| :VFLX:surface:0-3 hour ave fcst: | ||
| :SHTFL:surface:0-3 hour ave fcst: | ||
| :LHTFL:surface:0-3 hour ave fcst: | ||
| :PRATE:surface:0-3 hour ave fcst: | ||
| :CPRAT:surface:0-3 hour ave fcst: | ||
| :ALBDO:surface:0-3 hour ave fcst: | ||
| :TCDC:entire atmosphere (considered as a single layer):0-3 hour ave fcst: | ||
| :TCDC:boundary layer cloud layer:0-3 hour ave fcst: | ||
| :GFLUX:surface:0-3 hour ave fcst: | ||
| :U-GWD:surface:0-3 hour ave fcst: | ||
| :V-GWD:surface:0-3 hour ave fcst: | ||
| :TMP:middle cloud top level:0-3 hour ave fcst: | ||
| :TMP:low cloud top level:0-3 hour ave fcst: | ||
| :TMP:high cloud top level:0-3 hour ave fcst: | ||
| :PRES:high cloud top level:0-3 hour ave fcst: | ||
| :PRES:middle cloud top level:0-3 hour ave fcst: | ||
| :PRES:low cloud top level:0-3 hour ave fcst: | ||
| :PRES:high cloud bottom level:0-3 hour ave fcst: | ||
| :PRES:middle cloud bottom level:0-3 hour ave fcst: | ||
| :PRES:low cloud bottom level:0-3 hour ave fcst: | ||
| :CWORK:entire atmosphere (considered as a single layer):0-3 hour ave fcst: | ||
| :DUVB:surface:0-3 hour ave fcst: | ||
| :CDUVB:surface:0-3 hour ave fcst: | ||
| :TMAX:2 m above ground:0-3 hour max fcst: | ||
| :TMIN:2 m above ground:0-3 hour min fcst: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| :TSNOWP | ||
| :DLWRF:surface | ||
| :ULWRF:surface | ||
| :DSWRF:surface | ||
| :USWRF:surface | ||
| :USWRF:top | ||
| :ULWRF:top | ||
| :UFLX | ||
| :VFLX | ||
| :SHTFL | ||
| :LHTFL | ||
| :PRATE | ||
| :CPRAT | ||
| :ALBDO | ||
| :GFLUX | ||
| :U-GWD | ||
| :V-GWD | ||
| :TCDC:entire | ||
| :TCDC:boundary | ||
| :HCDC:high cloud layer:182-185 min | ||
| :LCDC:low cloud layer:182-185 min | ||
| :MCDC:middle cloud layer:182-185 min | ||
| :APCP | ||
| :ACPCP | ||
| :NCPCP | ||
| :TMIN | ||
| :TMAX | ||
| :DUVB | ||
| :CDUVB | ||
| :CWORK | ||
| :SNOHF | ||
| :SNOWC | ||
| :WATR | ||
| :TMP:middle cloud top | ||
| :TMP:low cloud top | ||
| :TMP:high cloud top | ||
| :PRES:high cloud top | ||
| :PRES:middle cloud top | ||
| :PRES:low cloud top | ||
| :PRES:high cloud bottom | ||
| :PRES:middle cloud bottom | ||
| :PRES:low cloud bottom |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| :WATR | ||
| :SNOWC | ||
| :SNOHF | ||
| :DLWRF:surface | ||
| :ULWRF:surface | ||
| :DSWRF:surface | ||
| :USWRF:surface | ||
| :USWRF:top | ||
| :ULWRF:top | ||
| :UFLX:surface | ||
| :VFLX:surface | ||
| :SHTFL:surface | ||
| :LHTFL:surface | ||
| :PRATE:surface:0 | ||
| :CPRAT:surface:0 | ||
| :ALBDO:surface | ||
| :TCDC:entire | ||
| :TCDC:boundary | ||
| :HCDC:high cloud layer:0-6 | ||
| :MCDC:middle cloud layer:0-6 | ||
| :LCDC:low cloud layer:0-6 | ||
| :GFLUX:surface | ||
| :U-GWD:surface | ||
| :V-GWD:surface | ||
| :APCP:surface | ||
| :ACPCP:surface | ||
| :NCPCP:surface | ||
| :TMP:middle cloud top | ||
| :TMP:low cloud top | ||
| :TMP:high cloud top | ||
| :PRES:high cloud top | ||
| :PRES:middle cloud top | ||
| :PRES:low cloud top | ||
| :PRES:high cloud bottom | ||
| :PRES:middle cloud bottom | ||
| :PRES:low cloud bottom | ||
| :CWORK | ||
| :DUVB | ||
| :CDUVB | ||
| :TMAX | ||
| :TMIN |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,113 @@ | ||||
| #! /usr/bin/env bash | ||||
|
|
||||
|
|
||||
|
Comment on lines
+3
to
+4
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| source "${USHgfs}/preamble.sh" | ||||
|
|
||||
| cd "${DATA}" || exit 1 | ||||
|
|
||||
| #COMIN_03 and {COMIN_ATMOS_MASTER} are directory containing the files that we want to extract | ||||
| #Extract c00 files for f003 from PSL reanalysis data | ||||
|
|
||||
| fnh=03 | ||||
| echo "extracting f${fnh}" | ||||
| oufile=${DATA}/gefs.t00z.master.grb2f0${fnh} | ||||
|
|
||||
| infile=${COMIN_03}/GFSPRS.GrbF03 | ||||
| if [[ -f "${infile}" ]]; then #check if input file exists before extraction | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep "TSNOWP" | ${WGRIB2} -i "${infile}" -grib tmp ||true | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really want to continue if the command chain fails for these, or should we be exiting with an error? |
||||
| ${WGRIB2} tmp -for "2:2" -append -grib "${oufile}">/dev/null || true | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep ":APCP:surface" | ${WGRIB2} -i "${infile}" -grib tmp ||true | ||||
| ${WGRIB2} tmp -for "1:1" -append -grib "${oufile}">/dev/null || true | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep ":ACPCP:surface" | ${WGRIB2} -i "${infile}" -grib tmp ||true | ||||
| ${WGRIB2} tmp -for "1:1" -append -grib "${oufile}">/dev/null || true | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep ":NCPCP:surface" | ${WGRIB2} -i "${infile}" -grib tmp ||true | ||||
| ${WGRIB2} tmp -for "1:1" -append -grib "${oufile}">/dev/null || true | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep ":HCDC:high cloud layer:0" | ${WGRIB2} -i "${infile}" -append -grib "${oufile}">/dev/null || true | ||||
| ${WGRIB2} "${infile}" | grep ":MCDC:middle cloud layer:0" | ${WGRIB2} -i "${infile}" -append -grib "${oufile}">/dev/null || true | ||||
| ${WGRIB2} "${infile}" | grep ":LCDC:low cloud layer:0" | ${WGRIB2} -i "${infile}" -append -grib "${oufile}">/dev/null || true | ||||
|
|
||||
| count=$(${WGRIB2} "${oufile}" | wc -l) | ||||
|
|
||||
| if [ ${count} -lt 7 ] ; then | ||||
|
|
||||
| echo "FATAL ERROR: missing input variables" | ||||
| export err=1; err_chk | ||||
| fi | ||||
| rm tmp | ||||
| else | ||||
| echo "FATAL ERROR: ${infile} does not exist" | ||||
| export err=1; err_chk | ||||
|
|
||||
| fi | ||||
|
|
||||
| varlist=${varlist_FLXacc03} # Parameter table for f03 acc/ave/min/max variables (PSL data) | ||||
| infile=${COMIN_03}/GFSFLX.GrbF03 | ||||
| if [[ -f "${infile}" ]]; then #check if input file exists before extraction | ||||
| ${WGRIB2} "${infile}" | grep -F -f "${varlist}" | ${WGRIB2} -i "${infile}" -append -grib "${oufile}">/dev/null || true | ||||
| else | ||||
| echo "FATAL ERROR: ${infile} does not exist" | ||||
| export err=1; err_chk | ||||
|
|
||||
| fi | ||||
| # done | ||||
|
|
||||
|
|
||||
| #Extract individual member files for f006 master data | ||||
| fnh=006 | ||||
|
|
||||
| echo "extracting f${fnh}" | ||||
| infile=${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f${fnh} | ||||
| oufile=${DATA}/gefs.t00z.master.grb2f${fnh} | ||||
|
|
||||
| varlist=${varlist_masteracc06} # Parameter table for f06 acc/ave/min/max variables | ||||
|
|
||||
| if [[ -f "${infile}" ]]; then #check if input file exists before extraction | ||||
|
|
||||
| ${WGRIB2} "${infile}" | grep -F -f "${varlist}" | ${WGRIB2} -i "${infile}" -append -grib "${oufile}" || true | ||||
| ${WGRIB2} "${infile}" | grep "TSNOWP" | ${WGRIB2} -i "${infile}" -grib tmp || true | ||||
|
|
||||
| ${WGRIB2} tmp -for "2:2" -append -grib "${oufile}">/dev/null || true | ||||
| ${WGRIB2} tmp -for "1:1" -grib TSNOWP1.dat || true | ||||
|
|
||||
| else | ||||
| echo "FATAL ERROR: ${infile} does not exist" | ||||
| export err=1; err_chk | ||||
| fi | ||||
|
|
||||
| export sorc_name=gefs_6h_ave_1mem.x | ||||
|
|
||||
| "${EXECgfs}/${sorc_name}" > sorc_name.exe.out | ||||
| cat sorc_name.exe.out | ||||
|
|
||||
| #output f06 | ||||
| infile=${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f006 | ||||
|
|
||||
| ${WGRIB2} "${infile}" -match_inv | grep -v -F -f "$varlist" | ${WGRIB2} -i "${infile}" -grib out1.grb2 || true | ||||
|
|
||||
| ${WGRIB2} out1.grb2 -not "TSNOWP" -grib out2.grb2 | ||||
|
|
||||
| cat out2.grb2 TSNOWP1.dat gefs.t00z.pgrb2af006 > out3.grb2 | ||||
| mv "${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f006" "${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f006_org" | ||||
| mv out3.grb2 "${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f006" | ||||
|
|
||||
| rm -fr out1.grb2 out2.grb2 TSNOWP*.dat | ||||
|
|
||||
| #output f03 | ||||
| varlist=${varlist_masteracc03} # Parameter table for f03 acc/ave/min/max variables | ||||
| infile=${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f003 | ||||
| # | ||||
| ${WGRIB2} "${infile}" | grep "TSNOWP" | ${WGRIB2} -i "${infile}" -grib TSNOWP2.dat || true | ||||
| ${WGRIB2} TSNOWP2.dat -for "1:1" -grib out1.grb2 >/dev/null || true | ||||
| ${WGRIB2} out1.grb2 -set_ftime "0-3 hour acc fcst" -grib TSNOWP1.dat | ||||
|
|
||||
| ${WGRIB2} "${infile}" -match_inv | grep -v -F -f "$varlist" | ${WGRIB2} -i "${infile}" -grib out2.grb2 || true | ||||
|
|
||||
| ${WGRIB2} out2.grb2 -set_ftime "3 hour fcst" -grib out3.grb2 | ||||
|
|
||||
| cat out3.grb2 TSNOWP1.dat gefs.t00z.pgrb2af003 > gefs.t00z.master.grb2f003 | ||||
|
|
||||
| ${NCP} "${COMIN_ATMOS_MASTER}/gefs.t00z.master.grb2f003" "${COMOUT_ATMOS_MASTER}/gefs.t00z.master.grb2f003_org" | ||||
| ${NCP} gefs.t00z.master.grb2f003 "${COMOUT_ATMOS_MASTER}/gefs.t00z.master.grb2f003" | ||||
|
|
||||
| rm -fr out1.grb2 out2.grb2 out3.grb2 | ||||
|
|
||||
| exit | ||||
| +1 −1 | modulefiles/gfsutils_jet.intel.lua | |
| +1 −0 | src/CMakeLists.txt | |
| +19 −0 | src/gefs_6h_ave_1mem.fd/CMakeLists.txt | |
| +473 −0 | src/gefs_6h_ave_1mem.fd/gefs_6h_ave_1mem.f90 | |
| +96 −0 | src/gefs_6h_ave_1mem.fd/printinfr.f90 | |
| +272 −0 | src/gefs_6h_ave_1mem.fd/prlevel.f90 | |
| +3 −5 | src/gfs_bufr.fd/CMakeLists.txt | |
| +3 −1 | src/gfs_bufr.fd/buff.f | |
| +60 −94 | src/gfs_bufr.fd/gfsbufr.f | |
| +100 −294 | src/gfs_bufr.fd/meteorg.f | |
| +457 −0 | src/gfs_bufr.fd/modpr_module.f90 | |
| +2 −1 | src/gfs_bufr.fd/modstuff1.f | |
| +0 −1 | src/gfs_bufr.fd/read_netcdf.f |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,11 +14,14 @@ def _get_app_configs(self): | |||||||||||||
| """ | ||||||||||||||
| Returns the config_files that are involved in gefs | ||||||||||||||
| """ | ||||||||||||||
| configs = ['stage_ic', 'fcst', 'atmos_products', 'arch'] | ||||||||||||||
| configs = ['stage_ic', 'fcst', 'repair_replay', 'atmos_products', 'arch'] | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| if self.nens > 0: | ||||||||||||||
| configs += ['efcs', 'atmos_ensstat'] | ||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| if self.do_repair_replay: | ||||||||||||||
| configs += ['repair_replay'] | ||||||||||||||
|
|
||||||||||||||
| if self.do_wave: | ||||||||||||||
| configs += ['waveinit', 'wavepostsbs', 'wavepostpnt'] | ||||||||||||||
| if self.do_wave_bnd: | ||||||||||||||
|
|
@@ -59,6 +62,9 @@ def get_task_names(self): | |||||||||||||
| if self.nens > 0: | ||||||||||||||
| tasks += ['efcs'] | ||||||||||||||
|
|
||||||||||||||
| if self.do_repair_replay: | ||||||||||||||
| tasks += ['repair_replay'] | ||||||||||||||
|
|
||||||||||||||
| tasks += ['atmos_prod'] | ||||||||||||||
|
|
||||||||||||||
| if self.nens > 0: | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll still need to decide where we are going to store this reanalysis data. It might be stored somewhere outside the global-workflow.