Skip to content

update for dev2 realtime run#1498

Open
haiqinli wants to merge 29 commits into
NOAA-EMC:rrfs-mpas-jedifrom
haiqinli:rrfs-mpas-jedi-smoke
Open

update for dev2 realtime run#1498
haiqinli wants to merge 29 commits into
NOAA-EMC:rrfs-mpas-jedifrom
haiqinli:rrfs-mpas-jedi-smoke

Conversation

@haiqinli

Copy link
Copy Markdown
Collaborator

DESCRIPTION OF CHANGES:

  • Update the workflow to run with 4 aerosol tracers: smoke-fine, dust-fine, dust-coarse, and unspc-fine (anthropogenic emission);
  • Use regrid submodule;
  • Use namelist option of "config_mp_aero_emission" to turn on/off aerosol emission for TEMPO MP.

TESTS CONDUCTED:

CONUS12km test run: /scratch4/BMC/acomp/Haiqin.Li/OPSROOT/smoke_12km

Machines/Platforms:

  • WCOSS2
    • Cactus/Dogwood
    • Acorn
  • RDHPCS
    • Hera
    • Ursa
    • Orion
    • Hercules

Test cases:

  • Engineering tests
    • Non-DA engineering test
    • DA engineering test
      • Retro
      • Ensemble
      • Parallel
  • [ X] RRFS fire weather
  • RRFS_A:
  • RRFS_B:
  • RTMA:
  • Others:

ISSUE:

  • Fixes the issue(s) mentioned in #9999

CONTRIBUTORS (optional):

Jordan Schnell

Comment thread scripts/exrrfs_prep_chem.sh Fixed
Comment thread ush/chem_prep_goes_aod.sh Fixed
Comment thread ush/chem_prep_goes_aod.sh Fixed
Comment thread workflow/config_resources/config.chemistry Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_smoke.sh Fixed
Comment thread ush/chem_prep_smoke.sh Fixed
@@ -0,0 +1,19 @@
prepend_path("MODULEPATH", "/gpfs/f6/bil-fire8/world-shared/Benjamin.Koziol/mpas-aerosols/spack-stack/envs/mpas-aerosols/modules/Core")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We usually don't do this way. Let's discuss this first.

Comment thread scripts/exrrfs_fcst.sh Outdated
config_gfl_sub3d = 1/" namelist.atmosphere
fi

if [[ "${MESH_NAME^^}" == "FWX1.25km" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We don't use if switches based on MESH_NAME inside j-jobs and ex-scripts.

Also config_lbc_w = 'zero' should be a standard option now, right?

Comment thread scripts/exrrfs_fcst.sh Outdated
-e "${mpasout_replacement}" "${PARMrrfs}"/streams.atmosphere > streams.atmosphere
#
if [[ "${mpasout_interval,,}" == "none" ]]; then # remove the da_state stream for coldstart only forecasts
#if [[ "${mpasout_interval,,}" == "none" ]]; then # remove the da_state stream for coldstart only forecasts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We cannot comment out this part. Let us talk about a better way to address the Chem needs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree. When I run with rrfsx/MPAS-Model, we don't need to comment out this part. However, we have to comment out this when run with ufs-community/MPAS-Model

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed as suggested. Thanks!

Comment thread scripts/exrrfs_prep_chem.sh Outdated
# 3. CHEM_INPUT -- location of interpolated files, ready to be used
# 4. MESH_NAME -- name of the MPAS domain, required to know if we have weights or data intepolated to the domain
# 4. MESH_NAME -- name of the MPAS domain, required to know if we have weights or data intepolated to the domain
# TEST COMMIT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Line 18 can be removed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will remove line 18. Thanks!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed as suggested.

Comment thread sorc/MPAS-Model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We cannot use the ufs-community/MPAS-Model directly as it misses the output_timelevels and output_done_marker

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have a pending PR (ufs-community/MPAS-Model#240). Should I update the PR with output_timelevels and output_done_marker? Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have two routes:
(1) We get ufs-community/MPAS-Model#240 merged first; then merge the changes to rrfsx/MPAS-Model which already has output_timelevels and output_done_marker
(2) If you need the above PR #240 change earlier, you can create a PR to rrfsx/MPAS-Model.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I just submitted a PR (RRFSx/MPAS-Model#25) to rrfsx/MPAS-Model. Thanks!

Comment thread ush/chem_fcst.sh Outdated
if [[ "${CHEM_GROUPS,,}" == *pollen* ]]; then
if [[ -s "${UMBRELLA_PREP_CHEM_DATA}/bio.init.nc" ]]; then
sed -i "\${e} cat ${PARMrrfs}/chemistry/streams.atmosphere.pollen" streams.atmosphere # append before the last line (i.e. </stream>)
sed -i "\$e cat ${PARMrrfs}/chemistry/streams.atmosphere.pollen" streams.atmosphere # append before the last line (i.e. </stream>)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why change ${e} to $e?

@haiqinli haiqinli May 19, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Will change $e back to ${e}. Thanks!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

for some reason the brackets cause this command to fail

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I cannot remember exactly, but I think I manually tested ${e} in this command and it worked.
I will double check this. If it fails, we are fine to use $e. Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I misunderstood here. $e is actually $ and then e. So changing it to $ e still works but is more readable. Thanks!

Comment thread ush/chem_ic_update.sh
# if [[ "${CHEM_GROUPS,,}" == *ssalt* ]]; then
# ncap2 -O -s "ssalt_fine=1.e-12*qv" init.nc init.nc
# ncap2 -O -s "ssalt_coarse=1.e-12*qv" init.nc init.nc
# fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lines 35-61: Are they still needed? If not, we can remove them

Comment thread ush/chem_prep_anthro.sh
fi # Is GRA2PES listed as one of the anthro inventories?


# Now for NEMO emissions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

there are additional helper scripts needed for the NEMO implemetnation
chem_create_merge_dates_ann.py
chem_get_merge_date.py
chem_merge_emissions.py
chem_merge_pt_emissions.py

source "${USHrrfs}"/chem_prep_goes_aod.sh
fi

if [[ "${CHEM_GROUP}" == "dust" ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we will need to update the FIX files for dust based on the name changes in MPAS-Model

Comment thread ush/chem_prep_smoke.sh Outdated
err_exit
fi
fi
ncap2 -O -s 'frp_in=frp_in.ttl($nkwildfire)' -s 'fre_in=fre_in.ttl($nkwildfire)' "${EMISFILE}" "${EMISFILE}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please see latest commits - this dimension summing should only occur for the actual RAVE files, the dummy files will already have the correct dimensions

Comment thread .gitmodules Outdated
url = https://github.com/RRFSx/MPAS-Model
branch = gsl/develop
url = https://github.com/haiqinli/MPAS-Model
branch = gsl/develop-mp-emission

@guoqing-noaa guoqing-noaa May 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@haiqinli Could you merge the latest rrfs-mpas-jedi branch and then revert changes in lines 8-9? Thanks!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Updated as suggested. Thanks!

Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_smoke.sh Fixed
Comment thread ush/chem_prep_smoke.sh Fixed
export MPASSIT_DX=1000.0
export MPASSIT_REF_LAT=37.0
export MPASSIT_REF_LON=-119.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lines 100-111: remove the "garnetSm1km" section

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed as suggested. Thanks!

Comment thread workflow/sideload/launch.sh Outdated
}
trap cleanup SIGINT SIGTERM
else
echo "Info: Not slurm nor PBS"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

merge the latest rrfs-mpas-jedi branch so that the changes on the left side are not overwritten accidentally.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Merged the latest rrfs-mpas-jedi branch.

#!/usr/bin/env python3
import argparse
import numpy as np

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add some documentation here about what this is.

Comment thread .gitmodules Outdated
url = https://github.com/pyDAmonitor/pyDAmonitor.git
ignore = all
[submodule "sorc/regrid-wrapper"]
path = sorc/regrid-wrapper

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sorc/chem-regrid-wrapper

Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread ush/chem_prep_anthro.sh Fixed
Comment thread scripts/exrrfs_fcst.sh Outdated
config_apply_lbcs = true\n\
config_lbc_w = 'zero'/" namelist.atmosphere
fi

@guoqing-noaa guoqing-noaa Jun 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@haiqinli and @sudheer-bh
As discussed, we would like to remove lines 66 to line 71, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are correct. Will remove lines 66 to line 71 in the next commit. Thanks!

Comment thread .gitmodules Outdated
[submodule "sorc/chem-regrid-wrapper"]
path = sorc/chem-regrid-wrapper
url = https://github.com/RRFSx/regrid-wrapper.git
branch = mpas_aero_v0

@guoqing-noaa guoqing-noaa Jun 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@haiqinli I am working on a patch PR to your branch to resolve the remain PR issues.
I will add comments for reference purpose, you don't need to address them immediately. I will talk with you offline.

Line 49: if possible, the main branch will be preferred here as mpas_aero_v0 does not look like a permanent branch.

@@ -0,0 +1,64 @@
NH4SO4_IF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All txt files under workflow/tools/prep_for_optics have been moved to fix/chemistry as discussed.
So we will remove them here.

Comment thread workflow/rocoto_funcs/prep_chem.py Outdated

dcTaskEnv['KEEPDATA'] = get_cascade_env(f"KEEPDATA_{task_id}".upper()).upper()
if "anthro" in chem_groups:
dcTaskEnv['KEEPDATA'] = 'YES'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we always keep data for the anthropogenic group?

Comment thread workflow/rocoto_funcs/prep_chem.py Outdated
dcTaskEnv['ANTHRO_EMISINV'] = 'GRA2PES'
dcTaskEnv['EXTRA_CHEMICAL_TRACERS'] = os.getenv('EXTRA_CHEMICAL_TRACERS','')
dcTaskEnv['ANTHRO_EMISINV'] = os.getenv('ANTHRO_EMISINV','GRA2PES')
dcTaskEnv['EBB_DCYCLE'] = os.getenv('EBB_DCYCLE', 0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lines 34-36 can be put inside the lines 23-28 block directly.

Comment thread scripts/exrrfs_prep_chem.sh Outdated
#
fcst_len_hrs_cycles=${FCST_LEN_HRS_CYCLES:-"01 01"}
my_fcst_length=$("${USHrrfs}/find_fcst_length.sh" "${fcst_len_hrs_cycles}" "${cyc}" )
export FCST_LENGTH="${my_fcst_length}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like FCST_LENGTH is not used anywhere. Did I miss anything?

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.

5 participants