Skip to content

Commit

Permalink
replace nc4 with nc for observation related files in python jedi atm …
Browse files Browse the repository at this point in the history
…scripts, generalize jedi atm layout (#2335)
  • Loading branch information
RussTreadon-NOAA committed Feb 23, 2024
1 parent c67393a commit 62abf88
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions parm/config/gfs/config.atmanl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export STATICB_TYPE="gsibec"
export BERROR_YAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/berror/staticb_${STATICB_TYPE}.yaml
export INTERP_METHOD='barycentric'

export layout_x_atmanl=@LAYOUT_X_ATMANL@
export layout_y_atmanl=@LAYOUT_Y_ATMANL@

export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

Expand Down
3 changes: 3 additions & 0 deletions parm/config/gfs/config.atmensanl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/atm/obs/lists/lgetkf_prototype.yaml
export ATMENSYAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/lgetkf/lgetkf.yaml
export INTERP_METHOD='barycentric'

export layout_x_atmensanl=@LAYOUT_X_ATMENSANL@
export layout_y_atmensanl=@LAYOUT_Y_ATMENSANL@

export io_layout_x=@IO_LAYOUT_X@
export io_layout_y=@IO_LAYOUT_Y@

Expand Down
16 changes: 8 additions & 8 deletions parm/config/gfs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ case ${step} in

"atmanlinit")
# make below case dependent later
export layout_x=8
export layout_y=8
export layout_x=${layout_x_atmanl}
export layout_y=${layout_y_atmanl}

export layout_gsib_x=$(( layout_x * 3 ))
export layout_gsib_y=$(( layout_y * 2 ))
Expand All @@ -212,8 +212,8 @@ case ${step} in

"atmanlrun")
# make below case dependent later
export layout_x=8
export layout_y=8
export layout_x=${layout_x_atmanl}
export layout_y=${layout_y_atmanl}

export wtime_atmanlrun="00:30:00"
export npe_atmanlrun=$(( layout_x * layout_y * 6 ))
Expand Down Expand Up @@ -830,8 +830,8 @@ case ${step} in

"atmensanlinit")
# make below case dependent later
export layout_x=8
export layout_y=8
export layout_x=${layout_x_atmensanl}
export layout_y=${layout_y_atmensanl}

export wtime_atmensanlinit="00:10:00"
export npe_atmensanlinit=1
Expand All @@ -842,8 +842,8 @@ case ${step} in

"atmensanlrun")
# make below case dependent later
export layout_x=8
export layout_y=8
export layout_x=${layout_x_atmensanl}
export layout_y=${layout_y_atmensanl}

export wtime_atmensanlrun="00:30:00"
export npe_atmensanlrun=$(( layout_x * layout_y * 6 ))
Expand Down
4 changes: 4 additions & 0 deletions parm/config/gfs/yaml/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ base:
FHMAX_GFS: 120

atmanl:
LAYOUT_X_ATMANL: 8
LAYOUT_Y_ATMANL: 8
IO_LAYOUT_X: 1
IO_LAYOUT_Y: 1

atmensanl:
LAYOUT_X_ATMENSANL: 8
LAYOUT_Y_ATMENSANL: 8
IO_LAYOUT_X: 1
IO_LAYOUT_Y: 1

Expand Down
6 changes: 3 additions & 3 deletions ush/python/pygfs/task/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def get_bias_dict(self) -> Dict[str, Any]:
obdir = os.path.dirname(obfile)
basename = os.path.basename(obfile)
prefix = '.'.join(basename.split('.')[:-2])
for file in ['satbias.nc4', 'satbias_cov.nc4', 'tlapse.txt']:
for file in ['satbias.nc', 'satbias_cov.nc', 'tlapse.txt']:
bfile = f"{prefix}.{file}"
copylist.append([os.path.join(self.task_config.COM_ATMOS_ANALYSIS_PREV, bfile), os.path.join(obdir, bfile)])

Expand Down Expand Up @@ -311,13 +311,13 @@ def tgz_diags(statfile: str, diagdir: str) -> None:
Parameters
----------
statfile : str | os.PathLike
Path to the output .tar.gz .tgz file that will contain the diag*.nc4 files e.g. atmstat.tgz
Path to the output .tar.gz .tgz file that will contain the diag*.nc files e.g. atmstat.tgz
diagdir : str | os.PathLike
Directory containing JEDI diag files
"""

# get list of diag files to put in tarball
diags = glob.glob(os.path.join(diagdir, 'diags', 'diag*nc4'))
diags = glob.glob(os.path.join(diagdir, 'diags', 'diag*nc'))

logger.info(f"Compressing {len(diags)} diag files to {statfile}")

Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/atm_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def finalize(self: Analysis) -> None:
atmstat = os.path.join(self.task_config.COM_ATMOS_ANALYSIS, f"{self.task_config.APREFIX}atmstat")

# get list of diag files to put in tarball
diags = glob.glob(os.path.join(self.task_config.DATA, 'diags', 'diag*nc4'))
diags = glob.glob(os.path.join(self.task_config.DATA, 'diags', 'diag*nc'))

logger.info(f"Compressing {len(diags)} diag files to {atmstat}.gz")

Expand Down
2 changes: 1 addition & 1 deletion ush/python/pygfs/task/atmens_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def finalize(self: Analysis) -> None:
atmensstat = os.path.join(self.task_config.COM_ATMOS_ANALYSIS_ENS, f"{self.task_config.APREFIX}atmensstat")

# get list of diag files to put in tarball
diags = glob.glob(os.path.join(self.task_config.DATA, 'diags', 'diag*nc4'))
diags = glob.glob(os.path.join(self.task_config.DATA, 'diags', 'diag*nc'))

logger.info(f"Compressing {len(diags)} diag files to {atmensstat}.gz")

Expand Down

0 comments on commit 62abf88

Please sign in to comment.