Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
ec8e772
add nexus
bbakernoaa Jul 31, 2025
d064d3a
add fire and nxs configs to config.aero
bbakernoaa Jul 31, 2025
8de8885
seperate out into fire emision process and nexus emission process
bbakernoaa Jul 31, 2025
b4c5982
add input directories and source config.aero
bbakernoaa Jul 31, 2025
4f74323
add COMIN_CHEM_INPUT
bbakernoaa Jul 31, 2025
90c5f80
Add prep_emis for gcdas_half cycle
bbakernoaa Jul 31, 2025
b964997
Add com directories to prep emission
bbakernoaa Jul 31, 2025
ad249ef
Add newly generated data
bbakernoaa Jul 31, 2025
668e91b
add anthropogenic
bbakernoaa Jul 31, 2025
b534a8b
adding finishing touches
bbakernoaa Jul 31, 2025
afa106f
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 1, 2025
c90dd91
add nexus submodule
bbakernoaa Aug 6, 2025
dec6de5
Update fire emissions directory path and adjust GOCART date handling …
bbakernoaa Aug 7, 2025
0e512c9
pycodestyle fixes
bbakernoaa Aug 7, 2025
4bf0a40
shellcheck fixes
bbakernoaa Aug 7, 2025
14d3bd7
more shellcheck fixes
bbakernoaa Aug 7, 2025
7d5dedb
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 7, 2025
3ccdb91
minor syntax fix that didn't cause error
bbakernoaa Aug 7, 2025
5cbb130
update GBBEPX emmissions for new format
bbakernoaa Aug 7, 2025
8ac30ab
Merge branch 'feature/prep_emis_rework' of https://github.com/bbakern…
bbakernoaa Aug 7, 2025
5d44905
update nexus hash for CAMS data config
bbakernoaa Aug 8, 2025
8c39994
update nexus hash
bbakernoaa Aug 8, 2025
8647595
address comments
bbakernoaa Aug 11, 2025
b586abd
fix: correct syntax error in NEXUS_INPUT_DIR retrieval
bbakernoaa Aug 11, 2025
70a300d
remove duplicates
bbakernoaa Aug 11, 2025
fa8d7ee
refactor: remove commented-out code and unnecessary check for NEXUS_T…
bbakernoaa Aug 11, 2025
bab0db3
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 13, 2025
f213807
update nexus hash
bbakernoaa Aug 13, 2025
7caea35
update nexus
bbakernoaa Aug 13, 2025
c340141
remove commented out imports
bbakernoaa Aug 13, 2025
1154998
Refactor NEXUS emissions configuration and update forecast handling
bbakernoaa Aug 15, 2025
e106058
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 15, 2025
b077961
Update aviation emissions data and adjust forecast timing in GOCART a…
bbakernoaa Aug 17, 2025
d282736
Update NEXUS emissions task to use SDATE_GFS for date calculations an…
bbakernoaa Aug 17, 2025
e61516e
Update ChemFireEmissions to use SDATE_GFS for start and end date calc…
bbakernoaa Aug 17, 2025
39e454b
Update subproject commit reference in nexus.fd
bbakernoaa Aug 17, 2025
6ad4adf
Refactor _get_day_indices function to group datetime indices by day, …
bbakernoaa Aug 17, 2025
a3f1c36
Comment out data copying logic in GOCART_predet function for future i…
bbakernoaa Aug 17, 2025
c406f05
Update soil_drylimit_factor to improve emissions calculations
bbakernoaa Aug 18, 2025
ecf691e
change RUN variable in declare_from_tmpl for chemical input
bbakernoaa Aug 18, 2025
b53778c
Enhance ChemFireEmissions class to log forecast period details and ad…
bbakernoaa Aug 18, 2025
fdff907
Add NEXUS_INPUT_DIR for NEXUS emissions data source - temporarily har…
bbakernoaa Aug 18, 2025
e2271cb
Add commented placeholder for NEXUS_INPUT_DIR
bbakernoaa Aug 18, 2025
b374701
Fix formatting in NEXUSEmissions class for better readability
bbakernoaa Aug 18, 2025
a209927
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 19, 2025
eada24d
Fix indentation in nexus_emission.py
bbakernoaa Aug 27, 2025
fa8e35f
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Aug 27, 2025
eac7da7
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 3, 2025
ca69431
Update dev/workflow/rocoto/gcafs_tasks.py
bbakernoaa Sep 3, 2025
d9b62fc
Add SettlingSolver options to resource files
bbakernoaa Sep 3, 2025
68ecfc7
Merge branch 'NOAA-EMC:develop' into feature/prep_emis_rework
bbakernoaa Sep 8, 2025
9179b1e
Update NEXUSEmissions to use CDATE for start and end dates; add loggi…
bbakernoaa Sep 9, 2025
674f67b
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 17, 2025
599f7b0
Update ush/python/pygfs/task/nexus_emission.py
bbakernoaa Sep 18, 2025
5d65aac
Update ush/python/pygfs/task/chem_fire_emission.py
bbakernoaa Sep 18, 2025
b890b78
Refactor emissions task instantiation and enhance build script usage …
bbakernoaa Sep 18, 2025
31aebbd
adding additional comments in the file to give users better descripti…
bbakernoaa Sep 18, 2025
b258a5f
pycodestyle fix W293
bbakernoaa Sep 18, 2025
53b05cd
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 18, 2025
655d327
Merge branch 'NOAA-EMC:develop' into feature/prep_emis_rework
bbakernoaa Sep 23, 2025
e570161
Remove debug print statements from NEXUSEmissions class initializatio…
bbakernoaa Sep 23, 2025
dc18f43
put a check on which launcher is used and adjust arglist
bbakernoaa Sep 23, 2025
af03b78
update chem_fire_emission to use CDATE for start_date
bbakernoaa Sep 23, 2025
31670ea
remove the lookup for gbbepx_vars
bbakernoaa Sep 23, 2025
09e0854
fix error on line 155
bbakernoaa Sep 23, 2025
be3d673
Add gbbepx_vars definition for emissions processing
bbakernoaa Sep 23, 2025
8fe0af0
Remove redundant gbbepx_vars definition in ChemFireEmissions class
bbakernoaa Sep 23, 2025
0d9bdd1
Update AERO_EMIS_FIRE_DIR for NRT forecast emissions processing
bbakernoaa Sep 23, 2025
e9165e3
update gbbepx file pattern as creation date could be different than s…
bbakernoaa Sep 23, 2025
06a29eb
Implement GBBEPx NRT fire file search functionality for wcoss dcom an…
bbakernoaa Sep 23, 2025
2959b03
Add NRT_DIRECTORY configuration and render_template method for GBBEPx…
bbakernoaa Sep 24, 2025
1165914
Fix type hint for tmp_dict parameter in render_template method
bbakernoaa Sep 24, 2025
031f03c
Fix parameter name in render_template method for clarity
bbakernoaa Sep 24, 2025
3d841b9
Refactor _find_gbbepx_nrt_fires call to use single argument for version
bbakernoaa Sep 24, 2025
0293bb5
Fix reference to AERO_EMIS_FIRE_DIR in render_template method to use …
bbakernoaa Sep 24, 2025
3f6a0fc
Update AERO_EMIS_FIRE_DIR in task_config for historical emissions log…
bbakernoaa Sep 24, 2025
7b115cd
Rename variables for clarity in ChemFireEmissions class
bbakernoaa Sep 24, 2025
ec5aeab
Refactor render_template method to return YAML configuration for impr…
bbakernoaa Sep 24, 2025
3beb1d0
Add debug logging for file search in _find_gbbepx_files method
bbakernoaa Sep 24, 2025
fd4d432
Refactor render_template call to directly access AERO_EMIS_FIRE_NRT_D…
bbakernoaa Sep 24, 2025
f5e62d1
Update NRT_DIRECTORY reference to use FIRE_EMIS_NRT_DIR in YAML templ…
bbakernoaa Sep 24, 2025
e57f5c3
Add logging for GBBEPx NRT file discovery in ChemFireEmissions class
bbakernoaa Sep 24, 2025
3d3a3b3
Add logging for historical emissions flag in ChemFireEmissions constr…
bbakernoaa Sep 24, 2025
e1bc13b
Fix GBBEPx NRT fires directory handling in ChemFireEmissions class
bbakernoaa Sep 24, 2025
843ae71
Fix NRT_DIRECTORY access in ChemFireEmissions class to use dot notation
bbakernoaa Sep 24, 2025
4d82538
Add pprint for debugging YAML configuration in ChemFireEmissions class
bbakernoaa Sep 24, 2025
de6b35f
Add pprint for debugging YAML configuration in ChemFireEmissions class
bbakernoaa Sep 24, 2025
21f9043
Add pprint for NRT_DIRECTORY in ChemFireEmissions class
bbakernoaa Sep 24, 2025
33779e0
Fix typo in NRT_DIRECTORY variable name in GBBEPx file search logging
bbakernoaa Sep 24, 2025
e3b04f1
Fix NRT_DIRECTORY variable usage in _find_gbbepx_nrt_fires method
bbakernoaa Sep 24, 2025
000de2f
Refactor GBBEPx processing logic for historical and non-historical ca…
bbakernoaa Sep 24, 2025
cd77e7b
Update end date calculation and enhance logging for GBBEPx processing
bbakernoaa Sep 24, 2025
00d6c6f
Refactor GBBEPx processing logic to use instance variable for histori…
bbakernoaa Sep 24, 2025
b2d3fae
Update time coordinate assignment in ChemFireEmissions to use assign_…
bbakernoaa Sep 24, 2025
68d64bb
Fix time coordinate assignment in ChemFireEmissions to use a list for…
bbakernoaa Sep 24, 2025
1cb4c2a
Fix output filename generation in ChemFireEmissions to use forecast d…
bbakernoaa Sep 24, 2025
96f6fe1
Comment out time coordinate assignment in ChemFireEmissions to preven…
bbakernoaa Sep 24, 2025
4570263
Update time coordinate assignment in ChemFireEmissions to set units b…
bbakernoaa Sep 24, 2025
dcf80a6
Update longitude attributes in ChemFireEmissions to include standard …
bbakernoaa Sep 24, 2025
cd2abc2
Refactor execution command in NEXUSEmissions to use APRUN for launchi…
bbakernoaa Sep 24, 2025
d2df1b1
Fix execution command in NEXUSEmissions to use relative path for nexus.x
bbakernoaa Sep 24, 2025
865baa8
Merge branch 'NOAA-EMC:develop' into feature/prep_emis_rework
bbakernoaa Sep 24, 2025
0691f99
Update aerosol optics file versions and enhance NEXUS emission file r…
bbakernoaa Sep 25, 2025
483f5d7
Fix typo in import statement for Jinja in nexus_emission.py
bbakernoaa Sep 25, 2025
464fa44
pycodestyle fixes
bbakernoaa Sep 25, 2025
cf248f6
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 25, 2025
78aa5e1
Update ush/python/pygfs/task/snowens_analysis.py
bbakernoaa Sep 25, 2025
87d756f
update dust to use drag_partition_option: 1 with the new file
bbakernoaa Sep 25, 2025
1378357
update dust inputs in ExtData.other
bbakernoaa Sep 25, 2025
488b075
rollback and add pycodestyle fix
bbakernoaa Sep 26, 2025
cdc1832
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 26, 2025
cbcb9cd
Enhance GBBEPx file search logic to check for previous dates and impr…
bbakernoaa Sep 26, 2025
40ce24a
update netcdf header for NRT fire emission
bbakernoaa Sep 26, 2025
89b3439
fix linking for nexus.x
bbakernoaa Sep 26, 2025
d748782
Add attributes for time dimension in processed dataset
bbakernoaa Sep 26, 2025
e4f80fb
Add check for NEXUS preprocessor executable availability
bbakernoaa Sep 26, 2025
9903eb8
Refactor NEXUS executable check to use os.path.exists for improved cl…
bbakernoaa Sep 26, 2025
e0fda09
Update NEXUS executable path to use relative path for improved portab…
bbakernoaa Sep 26, 2025
ba7c5ab
Update commented AERO_INPUTS_DIR path for consistency across machines
bbakernoaa Sep 26, 2025
086b91f
Adjust start and end date calculations for fire emissions processing;…
bbakernoaa Sep 26, 2025
4074b99
move the prep_emis to the same dependency as stage_ic in gcdas_fcst
bbakernoaa Sep 29, 2025
35d0d8b
correct variable
bbakernoaa Sep 29, 2025
d25339c
fix gcdas forecast dependencies
bbakernoaa Sep 29, 2025
8e3d0d3
udpate gbbepx processing
bbakernoaa Sep 29, 2025
5da1e6e
change fill value
bbakernoaa Sep 29, 2025
431f15d
change rdrag parameter
bbakernoaa Sep 29, 2025
a990ee2
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Sep 30, 2025
5d8fa73
update nexus hash
bbakernoaa Oct 2, 2025
063da78
updating nexus hash again
bbakernoaa Oct 2, 2025
eb0eb71
Create 'Restarts' directory in task_config.DATA during initialization
bbakernoaa Oct 3, 2025
8c1f152
Merge branch 'NOAA-EMC:develop' into feature/prep_emis_rework
bbakernoaa Oct 3, 2025
3922344
add logging for restarts directory creation
bbakernoaa Oct 3, 2025
47e0e42
add nexus and gsi_utils for gcafs build_compute
bbakernoaa Oct 6, 2025
1132ef8
update nexus restart data directory with updated nexus
bbakernoaa Oct 6, 2025
c3678d2
update nexus hash
bbakernoaa Oct 6, 2025
7c78a09
upating nexus hash
bbakernoaa Oct 7, 2025
5301cca
update nexus hash
bbakernoaa Oct 7, 2025
b6092fe
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Oct 8, 2025
bc96036
Update GCAFS documentation and resource configuration
bbakernoaa Oct 14, 2025
709e435
fix issue with historical gbbepx data
bbakernoaa Oct 14, 2025
1fab3b0
make gbbepx default and add historical FIRE_EMIS_DIR
bbakernoaa Oct 14, 2025
0d2ce2f
pycodestyle changes
bbakernoaa Oct 14, 2025
edd4860
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Oct 14, 2025
73ac752
updating nexus commit
bbakernoaa Oct 15, 2025
382dcb5
updating nexus hash
bbakernoaa Oct 15, 2025
483afe2
Merge branch 'feature/prep_emis_rework' of https://github.com/bbakern…
bbakernoaa Oct 15, 2025
44db5d1
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Oct 15, 2025
57edce1
Update dev/parm/config/gcafs/config.aero.j2
bbakernoaa Oct 15, 2025
14f5674
Update docs/source/gcafs.rst
bbakernoaa Oct 15, 2025
a0a436b
Update scripts/exglobal_stage_ic.py
bbakernoaa Oct 15, 2025
31316c9
Update ush/python/pygfs/task/chem_fire_emission.py
bbakernoaa Oct 15, 2025
069be65
Update ush/python/pygfs/task/chem_fire_emission.py
bbakernoaa Oct 15, 2025
87f320b
Update dev/ush/compare_f90nml.py
bbakernoaa Oct 15, 2025
d9434f1
Merge branch 'develop' into feature/prep_emis_rework
bbakernoaa Oct 20, 2025
492a5b8
address @DavidHuber-NOAA comments
bbakernoaa Oct 20, 2025
c03bc11
add type hinting and move imports to top
bbakernoaa Oct 20, 2025
9c3a444
refactor: clean up whitespace in ChemFireEmissions class
bbakernoaa Oct 20, 2025
cf82fc6
chore: update documentation for _write_txt_file and _get_day_indices …
bbakernoaa Oct 20, 2025
761ad5f
refactor: streamline attribute removal in ChemFireEmissions class
bbakernoaa Oct 20, 2025
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@
[submodule "sorc/gsi_monitor.fd"]
path = sorc/gsi_monitor.fd
url = https://github.com/NOAA-EMC/GSI-Monitor.git
[submodule "sorc/nexus.fd"]
path = sorc/nexus.fd
url = https://github.com/NOAA-OAR-ARL/NEXUS.git
branch = feature/gcafs
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to get this branch into develop before the workflow PR is merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes but that should be very simple to do

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to have this squared away before merging, but I will start reviewing (and testing once reviews are complete).

2 changes: 1 addition & 1 deletion dev/ci/cases/yamls/gcafs_cycled_noDA_defaults_dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults:
!INC {{ HOMEgfs }}/dev/parm/config/sfs/yaml/defaults.yaml
!INC {{ HOMEgfs }}/dev/parm/config/gcafs/yaml/defaults.yaml
base:
DO_TEST_MODE: "NO"
USE_AERO_ANL: "NO"
Expand Down
11 changes: 11 additions & 0 deletions dev/jobs/prep_emissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ status=$?
export job="prep_emissions"
export jobid="${job}.$$"

###############################################################
# Source relevant configs
configs="base aero prep_emissions"
for config in ${configs}; do
source "${EXPDIR}/config.${config}"
status=$?
if [[ ${status} -ne 0 ]]; then
exit "${status}"
fi
done

###############################################################
# Execute the JJOB
"${HOMEgfs}/jobs/JGLOBAL_PREP_EMISSIONS"
Expand Down
222 changes: 217 additions & 5 deletions dev/parm/config/gcafs/config.aero.j2
Original file line number Diff line number Diff line change
@@ -1,23 +1,235 @@
#! /usr/bin/env bash

#================================================================================
# UFS-Aerosols settings
# This configuration file sets up environment variables for aerosol modeling in the UFS (Unified Forecast System) Aerosols component.
# It configures aerosol inputs, diagnostics, emissions, and the NEXUS emissions preprocessor for GCAFS (Global Coupled Aerosol Forecast System).
# Used in GFS (Global Forecast System) workflows for initializing and running aerosol simulations in FV3 (Finite-Volume Cubed-Sphere) dynamical core.
#================================================================================
echo "BEGIN: config.aero"

# Path to the input data tree
#================================================================================
# 1. Aerosol settings
#================================================================================
# General settings for aerosol tracers, diagnostics, and scavenging in the GOCART (Goddard Chemistry Aerosol Radiation and Transport) model.
# These are used in the atmospheric model to handle aerosol transport, chemistry, and interaction with radiation/cloud processes.

# Base directory for aerosol input data files (e.g., initial conditions, climatologies).
# This path is mounted or staged in the workflow and referenced by the model for reading aerosol fields.
#---------------------------------------------------------------------------------------------------
export AERO_INPUTS_DIR="{{ AERO_INPUTS_DIR }}"
# Temporary comment until we sync between machines
#export AERO_INPUTS_DIR="/lfs/h2/emc/lam/noscrub/barry.baker/Emissions/gcafs/GCAFS" # WCOSS2 path for GCAFS external data
#export AERO_INPUTS_DIR="/gpfs/f6/bil-fire3/world-shared/Emissions/GEFS_ExtData # GAEA C6 path for GCAFS external data

#-------------------------------------------------
# Diag Table and Field Table for GOCART aerosols
#-------------------------------------------------

# Configuration files defining diagnostic outputs and field registrations for aerosol variables in GOCART.
# diag_table.aero: Specifies which aerosol fields to output and at what frequency (used by FMS diagnostics).
# field_table.aero: Registers prognostic/diagnostic tracers with the FV3 dynamical core (e.g., for advection, diffusion).
#---------------------------------------------------------------------------------------------------
export AERO_DIAG_TABLE="${PARMgfs}/ufs/fv3/diag_table.aero"
export AERO_FIELD_TABLE="${PARMgfs}/ufs/fv3/field_table.aero"
# Biomass burning emission dataset. Choose from: gbbepx, qfed, none
export AERO_EMIS_FIRE="qfed"
# Directory containing GOCART configuration files

#================================================================================
# Aerosol configuration
#================================================================================

# Directory containing GOCART-specific namelists, parameters, and runtime configs (e.g., namelist.aero).
# Loaded during model initialization to set aerosol scheme parameters like time steps, vertical levels.
#---------------------------------------------------------------------------------------------------
export AERO_CONFIG_DIR="${PARMgfs}/ufs/gocart"

# Aerosol convective scavenging factors (list of string array elements)
# Element syntax: '<tracer_name>:<factor>'. Use <tracer_name> = * to set default factor for all aerosol tracers
# Scavenging factors represent the fraction of aerosol removed by convective precipitation (wet deposition).
# Used in the convection scheme (e.g., SAS or NF_CONV) to compute in-cloud scavenging rates for each tracer.
# * = default for unspecified tracers; specific gases like SO2 have lower factors due to solubility.
# Scavenging factors are set to 0 (no scavenging) if unset
#---------------------------------------------------------------------------------------------------
export fscav_aero="'*:0.3','so2:0.0','msa:0.0','dms:0.0','nh3:0.4','nh4:0.6','bc1:0.6','bc2:0.6','oc1:0.4','oc2:0.4','dust1:0.6','dust2:0.6', 'dust3:0.6','dust4:0.6','dust5:0.6','seas1:0.5','seas2:0.5','seas3:0.5','seas4:0.5','seas5:0.5'"
#

# Number of diagnostic aerosol tracers (default: 0)
# Specifies how many additional diagnostic (non-prognostic) aerosol tracers to include in the model output.
# Used in GOCART to control verbosity of diagnostics; higher values add more fields for analysis/post-processing.
#---------------------------------------------------------------------------------------------------
export dnats_aero=2

#================================================================================
# 2. Aerosol emissions settings
#================================================================================
# Configuration for surface emissions of aerosols and precursors (e.g., from fires, anthropogenic sources).
# These drive the source terms in the GOCART continuity equation for each tracer.
# Biomass burning emission dataset. Choose from: gbbepx, qfed, none
# Dataset for wildfire and biomass burning emissions (e.g., black/organic carbon, CO).
# qfed: Quick Fire Emission Dataset (near-real-time, version specified below).
# gbbepx: Global Biomass Burning Emissions Product (alternative).
# none: Disable fire emissions.
# Used in prep_emissions scripts to fetch/interpolate data to model grid.
#---------------------------------------------------------------------------------------------------
export AERO_EMIS_FIRE="gbbepx"
# Version of the selected fire emissions dataset (e.g., for QFEDv2.5, version 061).
# Determines which historical or NRT files to load from input directories.
export AERO_EMIS_FIRE_VERSION="061"

# Flag to enable historical (climatological) fire emissions instead of NRT for testing/spin-up.
# When true, uses fixed-year data; false uses real-time from FIRE_EMIS_NRT_DIR.
# Path to near-real-time (NRT) fire emissions data, updated daily (e.g., from satellites like MODIS).
# On WCOSS2, points to DCOM (Data Communication) root for operational runs; empty for testing.
# Processed by scripts like exglobal_prep_emissions.py to generate input files for GOCART.
#---------------------------------------------------------------------------------------------------
export AERO_EMIS_FIRE_HIST=1 # Use historical fire emissions | 1 = true 0 = false

#---------------------------------------------------------------------------------------------------
export FIRE_EMIS_NRT_DIR="" #TODO: set to DCOM for WCOSS2 "${DCOMROOT}/YYYYMMDD/firewx" # Directory containing NRT fire emissions
export FIRE_EMIS_DIR="" # Directory containing historical fire emissions


#===============================================================================
# 3. NEXUS settings
#===============================================================================
# NEXUS (Next-generation Emissions eXchange Utility System) is a preprocessor for anthropogenic/biogenic emissions.
# Generates time-varying, gridded emission inputs for GOCART from inventories like CEDS, HTAP, CAMS.
# Runs offline before the forecast, outputting netCDF files read by the model via AERO_INPUTS_DIR.
# NEXUS aerosol emissions dataset. Choose from: gocart, none
# Specifies the emission species set for NEXUS processing (gocart for GOCART-compatible tracers like SO2, BC, OC, dust).
# none: Skip NEXUS entirely, use other emission sources or zero emissions.

# NEXUS configuration set
#-------------------------
export NEXUS_CONFIG="{{ NEXUS_CONFIG | default('gocart') }}" # Options: gocart, none

# Runtime choice of NEXUS config variant; defaults to gocart for standard aerosol tracers.
# Overrides via Jinja2 templating in workflow (e.g., for different chemistry schemes).
#---------------------------------------------------------------------------------------------------
export NEXUS_CONFIG_DIR="${PARMgfs}/chem/nexus/${NEXUS_CONFIG}" # Directory containing NEXUS configuration files

# NEXUS Inputs
#---------------
# TODO: when this is merged this will point to AERO_INPUTS_DIR for operations
# export NEXUS_INPUT_DIR="${AERO_INPUTS_DIR}/nexus"
# Directory for static/dynamic input data used by NEXUS (e.g., emission inventories, masks, meteo fields).
# Currently hardcoded for development; will use shared AERO_INPUTS_DIR in production for consistency.
# Specific path for GCAFS external data on this filesystem.
# Contains emission datasets (e.g., CEDS2019/2024, HTAPv2, CAMS) processed by NEXUS.
#---------------------------------------------------------------------------------------------------
export NEXUS_INPUT_DIR=${AERO_INPUTS_DIR}/nexus



#--------------------------
# NEXUS Time Step (seconds)
#--------------------------
# Temporal resolution for emission interpolation in NEXUS (e.g., hourly outputs).
# Must align with model coupling time; used in HEMCO time management for diurnal/seasonal scaling.
# 3600s = 1 hour; adjustable for finer/coarser emission updates (e.g., 1800s for sub-hourly).
#---------------------------------------------------------------------------------------------------
export NEXUS_TSTEP="{{ NEXUS_TSTEP | default(3600) }}" # Default NEXUS time step in seconds

#------------------
# NEXUS Grid
#------------------
# Defines the emission grid for NEXUS processing (0.5x0.5 degree global lat-lon).
# Emissions are interpolated from this grid to the FV3 cubed-sphere grid during prep.
# Number of longitude points (1440 for 0.25-degree resolution; here 1440 ~0.25deg).
#-----------------------------------------------------
export NEXUS_NX="{{ NEXUS_NX | default(1440) }}"

# Number of latitude points (720 for 0.25-degree).
#--------------------------------------------------
export NEXUS_NY="{{ NEXUS_NY | default(720) }}"

# Western boundary longitude (global coverage).
#-------------------------------------------------
export NEXUS_XMIN="{{ NEXUS_XMIN | default(-180.0) }}"

# Eastern boundary longitude.
#--------------------------------------------------
export NEXUS_XMAX="{{ NEXUS_XMAX | default(180.0) }}"

# Southern boundary latitude.
#--------------------------------------------------
export NEXUS_YMIN="{{ NEXUS_YMIN | default(-90.0) }}"

# Northern boundary latitude.
#---------------------------------------------------
export NEXUS_YMAX="{{ NEXUS_YMAX | default(90.0) }}"

# Number of vertical levels (1 for surface emissions; higher for vertical profiles if needed).
#--------------------------------------------------
export NEXUS_NZ="{{ NEXUS_NZ | default(1) }}"

#-------------------
# NEXUS Config Files
#-------------------
# HEMCO (Harmonized Emissions Component) runtime configuration files used by NEXUS.
# These define species mappings, time scales, grid alignments, and diagnostic flags.

# Grid definition file: Specifies emission grid (lat-lon bounds, resolution) and interpolation options to model grid.
export NEXUS_GRID_NAME="{{ NEXUS_GRID_NAME | default('HEMCO_sa_Grid.rc') }}"
# Time management file: Defines temporal patterns (diurnal, weekly, monthly) for scaling emissions.
export NEXUS_TIME_NAME="{{ NEXUS_TIME_NAME | default('HEMCO_sa_Time.rc') }}"
# Diagnostics file: Controls which emission fields to output for verification (e.g., total SO2, BC emissions).
export NEXUS_DIAG_NAME="{{ NEXUS_DIAG_NAME | default('HEMCO_sa_Diag.rc') }}"
# Species mapping file: Links emission inventories to GOCART tracers (e.g., CEDS SO2 to model SO2).
export NEXUS_SPEC_NAME="{{ NEXUS_SPEC_NAME | default('HEMCO_sa_Spec.rc') }}"
# Master config file: Orchestrates all HEMCO components, emission sources, and runtime flags for NEXUS.
export NEXUS_CONFIG_NAME="{{ NEXUS_CONFIG_NAME | default('NEXUS_Config.rc') }}"

#------------------
# NEXUS Diagnostics
#------------------
# Settings for outputting NEXUS-processed emissions for model input and verification.
# Outputs are netCDF files with gridded, time-varying sources read by GOCART at each time step.

# Base filename prefix for diagnostic output files (e.g., NEXUS_DIAG_YYYYMMDD.nc).
export NEXUS_DIAG_PREFIX="{{ NEXUS_DIAG_PREFIX | default('NEXUS_DIAG') }}"
# Frequency of diagnostic emission outputs; Hourly for detailed analysis, coarser for storage efficiency.
export NEXUS_DIAG_FREQ="{{ NEXUS_DIAG_FREQ | default('Hourly') }}" # Options: Hourly, Daily, Monthly

#------------------
# NEXUS Logging
#------------------
# Controls NEXUS execution logs for debugging and monitoring in the workflow.

# Output log file for NEXUS run; captures errors, warnings, and processing summaries.
# Reviewed in post-processing or if emissions fail to generate.
export NEXUS_LOGFILE="{{ NEXUS_LOGFILE | default('NEXUS.log') }}"

#------------------
# NEXUS Emissions
#------------------
# Flags to enable/disable specific emission inventories processed by NEXUS.
# Multiple can be true for blended emissions; used in NEXUS_Config.rc to select sources.
# Emissions are scaled by region, sector (e.g., industry, transport), and time.

# Flag for MEGAN (Model of Emissions of Gases and Aerosols from Nature) biogenic VOC/PM emissions.
# Currently disabled; future integration for isoprene, terpenes affecting secondary organic aerosols.
export NEXUS_DO_MEGAN=.false # TODO: Add MEGAN biogenic emissions in the furture

# Enable Community Emissions Data System 2019 inventory for anthropogenic aerosols/gases (e.g., SO2, NOx, PM2.5).
# Global, gridded data for 1750-2019; used for historical and recent baseline emissions.
export NEXUS_DO_CEDS2019=.true. # Use CEDS2019 emissions

# Enable newer CEDS 2024 update (if available); mutually exclusive with 2019 for consistency.
export NEXUS_DO_CEDS2024=.false. # Use CEDS2024 emissions

# Hemispheric Transport of Air Pollution version 2: Regional anthropogenic emissions for Europe/Asia/N. America.
# Focuses on transboundary pollution; supplements CEDS for finer regional detail.
export NEXUS_DO_HTAPv2=.true. # Use HTAPv2 emissions

# HTAP version 3 flag; disabled pending updates to datasets and NEXUS compatibility.
export NEXUS_DO_HTAPv3=.false. # TODO: Currently only uses HTAPv2 for this.

# Copernicus Atmosphere Monitoring Service global reanalysis emissions.
# Alternative to CEDS/HTAP for consistent meteo-coupled emissions; disabled here.
export NEXUS_DO_CAMS=.false. # Use CAMS global emissions

# CAMS temporal disaggregation (e.g., hourly profiles for CAMS data).
# Enables time-varying scaling when CAMS is active.
export NEXUS_DO_CAMSTEMPO=.false. # Use CAMS temporal emissions

#================================================================================
echo "END: config.aero"
2 changes: 2 additions & 0 deletions dev/parm/config/gcafs/config.prep_emissions
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ echo "BEGIN: config.prep_emissions"
# Get task specific resources
source "${EXPDIR}/config.resources" prep_emissions

source "${EXPDIR}/config.aero"

echo "END: config.prep_emissions"
7 changes: 4 additions & 3 deletions dev/parm/config/gcafs/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -816,10 +816,11 @@ case ${step} in
;;

"prep_emissions")
export walltime="00:10:00"
export walltime="00:20:00"
export ntasks=1
export threads_per_task=1
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
export threads_per_task=$(( max_tasks_per_node / 2 ))
export tasks_per_node=1
export OMP_NUM_THREADS="${threads_per_task}"
;;

"fcst" | "efcs")
Expand Down
4 changes: 4 additions & 0 deletions dev/parm/config/gcafs/config.resources.URSA
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ case ${step} in
export tasks_per_node=$(( max_tasks_per_node / threads_per_task ))
fi
;;

"offlineanl")
export memory="240GB"
;;

"eupd")
case "${CASE}" in
Expand Down
2 changes: 2 additions & 0 deletions dev/parm/config/gfs/config.com
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,7 @@ declare -rx COM_CHEM_HISTORY_TMPL=${COM_BASE}'/model/chem/history'
declare -rx COM_CHEM_ANALYSIS_TMPL=${COM_BASE}'/analysis/chem'
declare -rx COM_CHEM_BMAT_TMPL=${COM_CHEM_ANALYSIS_TMPL}'/bmatrix'
declare -rx COM_CHEM_ANLMON_TMPL=${COM_BASE}'/products/chem/anlmon'
declare -rx COM_CHEM_INPUT_TMPL=${COM_BASE}'/model/chem/input'
declare -rx COM_CHEM_RESTART_TMPL=${COM_BASE}'/model/chem/restart'

declare -rx COM_MED_RESTART_TMPL=${COM_BASE}'/model/med/restart'
3 changes: 1 addition & 2 deletions dev/ush/compare_f90nml.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ def _print_diffs(diff_dict: Dict) -> None:
max_len = len(max(diff_dict[path], key=len))
for kk in diff_dict[path].keys():
items = diff_dict[path][kk]
print(
f"{kk:>{max_len+2}} : {' | '.join(map(str, diff_dict[path][kk]))}")
print(f"{kk:>{max_len + 2}} : {' | '.join(map(str, diff_dict[path][kk]))}")

_print_diffs(result)

Expand Down
7 changes: 7 additions & 0 deletions dev/workflow/build_opts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ systems:
- "gefs_ww3_prepost"
gcafs:
- "gcafs_model"
- "nexus"
- "gsi_utils"
build:
gfs_model:
command: "./build_ufs.sh -e gfs_model.x"
Expand Down Expand Up @@ -97,3 +99,8 @@ build:
command: "./build_gdas.sh"
cores: 40
walltime: "01:45:00"

nexus:
command: "./build_nexus.sh"
cores: 8
walltime: "00:20:00"
Loading