Skip to content

Commit

Permalink
Fix for restoring cycling aerosols in fo-mode post COM refactor (NOAA…
Browse files Browse the repository at this point in the history
…-EMC#2179)

- Update to COM reorg aerosol initialization job
- Address bug in joining paths for data dependency in this job

---------

Co-authored-by: Rahul Mahajan <[email protected]>
  • Loading branch information
bbakernoaa and aerorahul committed Dec 21, 2023
1 parent e55a059 commit d125136
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 3 additions & 3 deletions scripts/exgfs_aero_init_aerosol.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
from functools import partial

# Constants
atm_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/atmos/INPUT" # Location of atmosphere ICs
atm_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/model_data/atmos/input" # Location of atmosphere ICs
atm_file_pattern = "{path}/gfs_data.{tile}.nc" # Atm IC file names
atm_ctrl_pattern = "{path}/gfs_ctrl.nc" # Atm IC control file name
restart_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/atmos/RERUN_RESTART" # Location of restart files (time of previous run)
restart_base_pattern = "{rot_dir}/{cdump}.%Y%m%d/%H/model_data/atmos/restart" # Location of restart files (time of previous run)
restart_file_pattern = "{file_base}/{timestamp}fv_core.res.{tile}.nc" # Name of restart data files (time when restart is valid)
tracer_file_pattern = "{file_base}/{timestamp}fv_tracer.res.{tile}.nc" # Name of restart tracer files (time when restart is valid)
dycore_file_pattern = "{file_base}/{timestamp}fv_core.res.nc" # Name of restart dycore file (time when restart is valid)
tracer_list_file_pattern = "{parm_gfs}/chem/gocart_tracer.list" # Text list of tracer names to copy
tracer_list_file_pattern = "{parm_gfs}/ufs/gocart/gocart_tracer.list" # Text list of tracer names to copy
merge_script_pattern = "{ush_gfs}/merge_fv3_aerosol_tile.py"
n_tiles = 6
max_lookback = 4 # Maximum number of past cycles to look for for tracer data
Expand Down
8 changes: 0 additions & 8 deletions ush/merge_fv3_aerosol_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,6 @@ def merge_tile(base_file_name: str, ctrl_file_name: str, core_file_name: str, re
print("FATAL ERROR: Inconsistent size of B(k) arrays: src=", bk.size, ", dst=", bi.size)
sys.exit(108)

if not np.array_equal(ak, ai):
print("FATAL ERROR: A(k) coefficients must be identical")
sys.exit(109)

if not np.array_equal(bk, bi):
print("FATAL ERROR: B(k) coefficients must be identical")
sys.exit(110)

dp = np.zeros(delp.shape)
for k in range(0, dp.shape[0]):
dp[k, :, :] = ak[k + 1] - ak[k] + psfc * (bk[k + 1] - bk[k])
Expand Down
2 changes: 1 addition & 1 deletion workflow/rocoto/gfs_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def aerosol_init(self):
[f'@Y@m@[email protected]_tracer.res.tile{tile}.nc' for tile in range(1, self.n_tiles + 1)]

for file in files:
data = [f'{restart_path}', file]
data = [f'{restart_path}/', file]
dep_dict = {'type': 'data', 'data': data, 'offset': [offset, None]}
deps.append(rocoto.add_dependency(dep_dict))

Expand Down

0 comments on commit d125136

Please sign in to comment.