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

Add fire blending to GOCART #2883

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

bbakernoaa
Copy link
Contributor

Description

Type of change

  • Bug fix (fixes something broken)
  • New feature (adds functionality)
  • Maintenance (code refactor, clean-up, new CI test, etc.)

Change characteristics

  • Is this a breaking change (a change in existing functionality)? YES/NO
  • Does this change require a documentation update? YES/NO
  • Does this change require an update to any of the following submodules? YES/NO (If YES, please add a link to any PRs that are pending.)
    • EMC verif-global
    • GDAS
    • GFS-utils
    • GSI
    • GSI-monitor
    • GSI-utils
    • UFS-utils
    • UFS-weather-model
    • wxflow

How has this been tested?

Checklist

  • Any dependent changes have been merged and published
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • I have made corresponding changes to the documentation if necessary

@bbakernoaa bbakernoaa marked this pull request as ready for review September 13, 2024 13:05
@bbakernoaa bbakernoaa marked this pull request as draft September 13, 2024 14:03
@WalterKolczynski-NOAA WalterKolczynski-NOAA changed the title [GOCART] Add Fire Blending Add fire blending to GOCART Sep 17, 2024
@aerorahul aerorahul added CI-Gaea-Ready **CM use only** PR is ready for CI testing on Gaea and removed CI-Gaea-Ready **CM use only** PR is ready for CI testing on Gaea labels Sep 19, 2024
As forecast ensemble jobs are added to the global workflow, this PR
ensures the output is being cleaned up properly once it is no longer
needed.
  Resolves NOAA-EMC#833
This PR updates the parm/config/gfs/config.resources and env/WCOSS2.env
files for the BUFR sounding job "postsnd." It includes adjustments to
resource settings such as tasks per node and memory allocations for
various GFS resolutions, including C768, C1152, and others.

Here are the proposed changes:

C768: 7 nodes, 21 tasks per node
C1152: 16 nodes, 9 tasks per node
NCO has requested that each COM variable specify whether it is an input
or an output. This completes that process for the global-workflow
Unified Post Processor (UPP) task.
Refs: NOAA-EMC#2451
This PR updates the `develop` branch to use the newer operational
`obsproc/v1.2.0` and `prepobs/v1.1.0`. The obsproc/prepobs installs in
glopara space on supported platforms use tags cut from the `dev/gfsv17`
branches in the respective repos. The installation of `prepobs/v1.1.0`
on WCOSS2 is called "gfsv17_v1.1.0" to help avoid GFSv16 users using it
instead of the operational module.

Also, the `HOMEobsproc` path is updated to set an empty default for
`obsproc_run_ver`. This both removes the need to set a default (and
constantly update it, which is duplication) and avoid the unset variable
error when the fcst jobs use their own load module script that does not
know `obsproc_run_ver`:
```
export HOMEobsproc="${BASE_GIT:-}/obsproc/v${obsproc_run_ver:-}"
```

This PR also reverts the prepobs and fit2obs installs on MSU back to the
glopara space from the temporary `/work/noaa/global/kfriedma/glopara`
space installs.

Lastly, this PR also includes updates to complete issue NOAA-EMC#2844 (merge
`build.spack.ver` and `run.spack.ver`).

Resolves NOAA-EMC#2291
Resolves NOAA-EMC#2840
Resolves NOAA-EMC#2844
Copy link
Contributor

@aerorahul aerorahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbakernoaa
Please let me know if any of my comments need clarifications

Comment on lines +5 to +30
# TODO: this is duplicated in the config.aero file. Should use a common function
case ${machine} in
"HERA")
AERO_INPUTS_DIR="/scratch1/NCEPDEV/global/glopara/data/gocart_emissions"
;;
"ORION" | "HERCULES")
AERO_INPUTS_DIR="/work2/noaa/global/wkolczyn/noscrub/global-workflow/gocart_emissions"
;;
"S4")
AERO_INPUTS_DIR="/data/prod/glopara/gocart_emissions"
;;
"WCOSS2")
AERO_INPUTS_DIR="/lfs/h2/emc/global/noscrub/emc.global/data/gocart_emissions"
;;
"GAEA")
AERO_INPUTS_DIR="/gpfs/f5/epic/proj-shared/global/glopara/data/gocart_emissions"
;;
"JET")
AERO_INPUTS_DIR="/lfs4/HFIP/hfv3gfs/glopara/data/gocart_emissions"
;;
*)
echo "FATAL ERROR: Machine ${machine} unsupported for aerosols"
exit 2
;;
esac
export AERO_INPUTS_DIR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can/shouldplace AERO_INPUTS_DIR in workflow/hosts/<machine>.yaml and then here, replace this section with:

export AERO_INPUTS_DIR="@AERO_INPUTS_DIR@"

Repeat the same in config.aero.
What do you think @WalterKolczynski-NOAA ?

ps. this can be done in a follow-up PR.

parm/prep/aero_emissions.yaml Outdated Show resolved Hide resolved
parm/prep/aero_emissions.yaml Outdated Show resolved Hide resolved
parm/prep/aero_emissions.yaml Outdated Show resolved Hide resolved
parm/prep/aero_emissions.yaml Outdated Show resolved Hide resolved
Comment on lines +301 to +310
if len(obsfile) > 1:
if "QFED".lower() in obsfile[0].lower():
g = AerosolEmissions.open_qfed(obsfile)
else:
g = xr.open_mfdataset(obsfile, decode_cf=False)
else:
if "QFED".lower() in obsfile.lower():
g = AerosolEmissions.open_qfed(obsfile)
else:
g = xr.open_mfdataset(obsfile, decode_cf=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make obsfile a list, and avoid this duplication.

Suggested change
if len(obsfile) > 1:
if "QFED".lower() in obsfile[0].lower():
g = AerosolEmissions.open_qfed(obsfile)
else:
g = xr.open_mfdataset(obsfile, decode_cf=False)
else:
if "QFED".lower() in obsfile.lower():
g = AerosolEmissions.open_qfed(obsfile)
else:
g = xr.open_mfdataset(obsfile, decode_cf=False)
if isinstance(obsfile, (str, bytes)):
obsfile = [obsfile]
if "QFED".lower() in obsfile[0].lower():
g = AerosolEmissions.open_qfed(obsfile)
else:
g = xr.open_mfdataset(obsfile, decode_cf=False)

climo = climo.sel(lat=g["lat"], lon=g["lon"], method="nearest")

# make weighted climo
gc = g.coarsen(lat=150, lon=150, boundary="trim").sum()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these coarse grid values be configurable in the yaml?

dsets = []
climo_scaled = {}
for tslice in np.arange(len(climos)):
print(tslice)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use logger.info, pleae

"""Perform closing actions of the task.
Copy data back from the DATA/ directory to COM/
"""
print(Config_dict.data_out)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger.info

"""
Generate fire emissions data for a given date and forecast period.

Parameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use numpy documentation formatting.

bbakernoaa and others added 4 commits October 7, 2024 09:40
Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
Co-authored-by: Rahul Mahajan <aerorahul@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants