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

Setup the snow DA analysis to update to the enkf ensemble members #2033

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
027916a
Initialize the configs and setups for ensemble land DA.
jiaruidong2017 Nov 4, 2023
229d6cc
Add DO_JEDILANDENS to the config.base
jiaruidong2017 Nov 4, 2023
fb9629f
Add the task landensanl for land DA updates to the ensemble members
jiaruidong2017 Nov 5, 2023
057814b
Reverted a change.
jiaruidong2017 Nov 5, 2023
73d748b
Remove the predefined COM variables.
jiaruidong2017 Nov 6, 2023
2c90836
Add jobs/JGLOBAL_LANDENS_ANALYSIS to update ensembles with snow DA.
jiaruidong2017 Nov 19, 2023
27660fe
Revert the change to the land_analysis.py
jiaruidong2017 Nov 19, 2023
dbe75a7
Remove DO_JEDILANDENS
jiaruidong2017 Nov 19, 2023
6e65049
Reuse the config.landanl for config.landensanl
jiaruidong2017 Nov 19, 2023
85311c6
Modify the config.landensanl
jiaruidong2017 Nov 20, 2023
ffd6c59
Reverted changes.
jiaruidong2017 Nov 20, 2023
67313b7
Merge branch 'develop' into feature/ens_landda
jiaruidong2017 Nov 20, 2023
9dc7d53
Address the shell check warning.
jiaruidong2017 Nov 20, 2023
ea58de5
Move the IMS data processing from preplandobs task to landanl task.
jiaruidong2017 Dec 2, 2023
8a20d1a
Remove the comments
jiaruidong2017 Dec 2, 2023
b82dfd7
Create a new get_obs_dict for skipping the IMS data copies.
jiaruidong2017 Dec 11, 2023
d808429
Merge branch 'develop' into feature/ens_landda
jiaruidong2017 Dec 13, 2023
089f3bf
Merge branch 'NOAA-EMC:develop' into feature/ens_landda
jiaruidong2017 Dec 16, 2023
ede3f9f
Add the archive to save the snow analysis to hpss.
jiaruidong2017 Dec 29, 2023
b9b2922
Fix the shell check warning.
jiaruidong2017 Dec 29, 2023
d30517d
Merge branch 'develop' into feature/ens_landda
jiaruidong2017 Dec 29, 2023
5cc3d1b
Remove gdasland list and delete vrfy and comment lines.
jiaruidong2017 Jan 3, 2024
9886210
Merge branch 'develop' into feature/ens_landda
jiaruidong2017 Jan 17, 2024
ed5963b
Merge branch 'develop' into feature/ens_landda
jiaruidong2017 Jan 28, 2024
6394992
Merge to develop to remove the deterministic changes.
jiaruidong2017 Jan 28, 2024
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
Prev Previous commit
Merge to develop to remove the deterministic changes.
  • Loading branch information
jiaruidong2017 committed Jan 28, 2024
commit 6394992a93b42643445e74b251104dae02e874d8
3 changes: 1 addition & 2 deletions jobs/rocoto/landanl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export jobid="${job}.$$"
###############################################################
# setup python path for workflow utilities and tasks
wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src"
gdasappPATH="${HOMEgfs}/sorc/gdas.cd/iodaconv/src:${HOMEgfs}/sorc/gdas.cd/build/lib/python3.7"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}:${gdasappPATH}"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}"
export PYTHONPATH

###############################################################
Expand Down
3 changes: 1 addition & 2 deletions jobs/rocoto/landensanl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export jobid="${job}.$$"
###############################################################
# setup python path for workflow utilities and tasks
wxflowPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/wxflow/src"
gdasappPATH="${HOMEgfs}/sorc/gdas.cd/iodaconv/src:${HOMEgfs}/sorc/gdas.cd/build/lib/python3.7"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}:${gdasappPATH}"
PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${wxflowPATH}"
export PYTHONPATH

###############################################################
Expand Down
6 changes: 0 additions & 6 deletions parm/config/gfs/config.landanl
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ fi
export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/config/
export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/lists/${obs_list_name}

# Prepare IMS snow observations
export FIMS_NML_TMPL="${HOMEgfs}/sorc/gdas.cd/parm/land/prep/fims.nml.j2"
export IMS_OBS_LIST="${HOMEgfs}/sorc/gdas.cd/parm/land/prep/prep_ims.yaml"
export CALCFIMSEXE="${HOMEgfs}/exec/calcfIMS.exe"
export IMS2IODACONV="${HOMEgfs}/ush/imsfv3_scf2ioda.py"

# Name of the JEDI executable and its yaml template
export JEDIEXE="${HOMEgfs}/exec/fv3jedi_letkf.x"
export JEDIYAML="${HOMEgfs}/sorc/gdas.cd/parm/land/letkfoi/letkfoi.yaml"
Expand Down
4 changes: 4 additions & 0 deletions parm/config/gfs/config.preplandobs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ echo "BEGIN: config.preplandobs"

export GTS_OBS_LIST="${HOMEgfs}/sorc/gdas.cd/parm/land/prep/prep_gts.yaml"
export BUFR2IODAX="${HOMEgfs}/exec/bufr2ioda.x"
export FIMS_NML_TMPL="${HOMEgfs}/sorc/gdas.cd/parm/land/prep/fims.nml.j2"
export IMS_OBS_LIST="${HOMEgfs}/sorc/gdas.cd/parm/land/prep/prep_ims.yaml"
export CALCFIMSEXE="${HOMEgfs}/exec/calcfIMS.exe"
export IMS2IODACONV="${HOMEgfs}/ush/imsfv3_scf2ioda.py"

echo "END: config.preplandobs"
2 changes: 2 additions & 0 deletions scripts/exglobal_prep_land_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
# Instantiate the land prepare task
LandAnl = LandAnalysis(config)
LandAnl.prepare_GTS()
if f"{ LandAnl.runtime_config.cyc }" == '18':
LandAnl.prepare_IMS()
47 changes: 2 additions & 45 deletions ush/python/pygfs/task/land_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, config):
'npz': self.config.LEVS - 1,
'LAND_WINDOW_BEGIN': _window_begin,
'LAND_WINDOW_LENGTH': f"PT{self.config['assim_freq']}H",
'OPREFIX': f"{self.runtime_config.CDUMP}.t{self.runtime_config.cyc:02d}z.",
'OPREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.",
'APREFIX': f"{self.runtime_config.RUN}.t{self.runtime_config.cyc:02d}z.",
'jedi_yaml': _letkfoi_yaml
}
Expand Down Expand Up @@ -187,7 +187,6 @@ def prepare_IMS(self) -> None:
os.symlink(exe_src, exe_dest)

# execute CALCFIMSEXE to calculate IMS snowdepth
os.chdir(localconf.DATA)
exe = Executable(self.task_config.APRUN_CALCFIMS)
exe.add_default_arg(os.path.join(localconf.DATA, os.path.basename(exe_src)))
logger.info(f"Executing {exe}")
Expand Down Expand Up @@ -245,12 +244,7 @@ def initialize(self) -> None:
Instance of the LandAnalysis object
"""

# Stage observations
obs_dict = self.get_obs_dict()
FileHandler(obs_dict).sync()

# link jedi executable to run directory
self.link_jediexe()
super().initialize()

# create a temporary dict of all keys needed in this method
localconf = AttrDict()
Expand Down Expand Up @@ -313,10 +307,6 @@ def execute(self) -> None:
for key in keys:
localconf[key] = self.task_config[key]

logger.info("Generating IMS snow OBS")
if f"{ self.runtime_config.cyc }" == '18':
self.prepare_IMS()

logger.info("Creating ensemble")
self.create_ensemble(localconf.SNOWDEPTHVAR,
localconf.BESTDDEV,
Expand Down Expand Up @@ -379,39 +369,6 @@ def finalize(self) -> None:
inclist.append([src, dest])
FileHandler({'copy': inclist}).sync()

@logit(logger)
def get_obs_dict(self) -> None:
"""Compile a dictionary of observation files to copy

This method uses the OBS_LIST configuration variable to generate a dictionary
from a list of YAML files that specify what observation files are to be
copied to the run directory from the observation input directory

Parameters
----------

Returns
----------
obs_dict: Dict
a dictionary containing the list of observation files to copy for FileHandler
"""
logger.debug(f"OBS_LIST: {self.task_config['OBS_LIST']}")
obs_list_config = parse_j2yaml(self.task_config["OBS_LIST"], self.task_config)
logger.debug(f"obs_list_config: {obs_list_config}")
# get observers from master dictionary
observers = obs_list_config['observers']
copylist = []
for ob in observers:
obfile = ob['obs space']['obsdatain']['engine']['obsfile']
basename = os.path.basename(obfile)
if 'ims_snow' not in obfile:
copylist.append([os.path.join(self.task_config['COM_OBS'], basename), obfile])
obs_dict = {
'mkdir': [os.path.join(self.runtime_config['DATA'], 'obs')],
'copy': copylist
}
return obs_dict

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