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

Copy land increments and land DA confs to COM #1797

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protocol = git
required = False

[GDASApp]
hash = 09757ce
hash = 2774a10
local_path = sorc/gdas.cd
repo_url = https://github.com/NOAA-EMC/GDASApp.git
protocol = git
Expand Down
4 changes: 2 additions & 2 deletions jobs/JGLOBAL_LAND_ANALYSIS
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ GDUMP="gdas"
# Begin JOB SPECIFIC work
##############################################
# Generate COM variables from templates
YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS COM_LAND_ANALYSIS
YMD=${PDY} HH=${cyc} generate_com -rx COM_OBS COM_LAND_ANALYSIS COM_CONF

RUN=${GDUMP} YMD=${gPDY} HH=${gcyc} generate_com -rx \
COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL

mkdir -m 775 -p "${COM_LAND_ANALYSIS}"
mkdir -m 775 -p "${COM_LAND_ANALYSIS}" "${COM_CONF}"

###############################################################
# Run relevant script
Expand Down
1 change: 1 addition & 0 deletions parm/config/gfs/config.com
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ COM_BASE='${ROTDIR}/${RUN}.${YMD}/${HH}/${MEMDIR}'

declare -rx COM_TOP_TMPL='${ROTDIR}/${RUN}.${YMD}/${HH}'

declare -rx COM_CONF_TMPL=${COM_BASE}'/conf'
declare -rx COM_ATMOS_INPUT_TMPL=${COM_BASE}'/model_data/atmos/input'
declare -rx COM_ATMOS_RESTART_TMPL=${COM_BASE}'/model_data/atmos/restart'
declare -rx COM_ATMOS_ANALYSIS_TMPL=${COM_BASE}'/analysis/atmos'
Expand Down
2 changes: 1 addition & 1 deletion sorc/checkout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ if [[ ${checkout_gsi} == "YES" ]]; then
fi

if [[ ${checkout_gdas} == "YES" ]]; then
checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "09757ce"; errs=$((errs + $?))
checkout "gdas.cd" "https://github.com/NOAA-EMC/GDASApp.git" "2774a10"; errs=$((errs + $?))
fi

if [[ ${checkout_gsi} == "YES" || ${checkout_gdas} == "YES" ]]; then
Expand Down
25 changes: 23 additions & 2 deletions ush/python/pygfs/task/land_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,10 @@ def execute(self) -> None:
def finalize(self) -> None:
"""Performs closing actions of the Land analysis task
This method:
- copies analysis back to COM/ from DATA/
- tar and gzips the JEDI diagnostic files
- tar and gzip the output diag files and place in COM/
- copy the generated YAML file from initialize to the COM/
- copy the analysis files to the COM/
- copy the increment files to the COM/

Parameters
----------
Expand All @@ -336,6 +338,15 @@ def finalize(self) -> None:
statfile = os.path.join(self.task_config.COM_LAND_ANALYSIS, f"{self.task_config.APREFIX}landstat.tgz")
self.tgz_diags(statfile, self.task_config.DATA)

logger.info("Copy full YAML to COM")
src = os.path.join(self.task_config['DATA'], f"{self.task_config.APREFIX}letkfoi.yaml")
dest = os.path.join(self.task_config.COM_CONF, f"{self.task_config.APREFIX}letkfoi.yaml")
yaml_copy = {
'mkdir': [self.task_config.COM_CONF],
'copy': [[src, dest]]
}
FileHandler(yaml_copy).sync()

logger.info("Copy analysis to COM")
template = f'{to_fv3time(self.task_config.current_cycle)}.sfc_data.tile{{tilenum}}.nc'
anllist = []
Expand All @@ -346,6 +357,16 @@ def finalize(self) -> None:
anllist.append([src, dest])
FileHandler({'copy': anllist}).sync()

logger.info('Copy increments to COM')
template = f'landinc.{to_fv3time(self.task_config.current_cycle)}.sfc_data.tile{{tilenum}}.nc'
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
inclist = []
for itile in range(1, self.task_config.ntiles + 1):
filename = template.format(tilenum=itile)
src = os.path.join(self.task_config.DATA, 'anl', filename)
dest = os.path.join(self.task_config.COM_LAND_ANALYSIS, filename)
inclist.append([src, dest])
FileHandler({'copy': inclist}).sync()

@staticmethod
@logit(logger)
def get_bkg_dict(config: Dict) -> Dict[str, List[str]]:
Expand Down