Skip to content

Move fixed-file mapping variables out of config_defaults.yaml.#421

Merged
danielabdi-noaa merged 9 commits into
ufs-community:developfrom
danielabdi-noaa:feature/fix_rearrange
Oct 26, 2022
Merged

Move fixed-file mapping variables out of config_defaults.yaml.#421
danielabdi-noaa merged 9 commits into
ufs-community:developfrom
danielabdi-noaa:feature/fix_rearrange

Conversation

@danielabdi-noaa
Copy link
Copy Markdown
Collaborator

@danielabdi-noaa danielabdi-noaa commented Oct 17, 2022

DESCRIPTION OF CHANGES:

This PR mainly addresses issue #367. Fixed files mapping arrays are something that are probably never changed by the user so they don't belog there

  • The fixed file mapping arrays are removed out of default config file and put in a separate file (fixed_files_mapping.yaml)
  • Removed set_extrn_mdl_params.py as it barely does anything
  • Removed LMOD_PATH out of config_defaults because it is not used
  • LBC_SPEC_FCST_HRS moved out of config_defaults
  • WORKFLOW_ID moved out of config_defaults

Other mis-placed variables in config_defaults will be moved as I find them

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

TESTS CONDUCTED:

  • hera.intel
  • orion.intel
  • cheyenne.intel
  • cheyenne.gnu
  • gaea.intel
  • jet.intel
  • wcoss2.intel
  • NOAA Cloud (indicate which platform)
  • Jenkins
  • fundamental test suite
  • comprehensive tests (specify which if a subset was used)

DEPENDENCIES:

None

DOCUMENTATION:

None

ISSUE:

CHECKLIST

  • My code follows the style guidelines in the Contributor's Guide
  • I have performed a self-review of my own code using the Code Reviewer's Guide
  • I have commented my code, particularly in hard-to-understand areas
  • My changes need updates to the documentation. I have made corresponding changes to the documentation
  • My changes do not require updates to the documentation (explain).
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

LABELS (optional):

A Code Manager needs to add the following labels to this PR:

  • Work In Progress
  • bug
  • enhancement
  • documentation
  • release
  • high priority
  • run_ci
  • run_we2e_fundamental_tests
  • run_we2e_comprehensive_tests
  • Needs Cheyenne test
  • Needs Jet test
  • Needs Hera test
  • Needs Orion test
  • help wanted

CONTRIBUTORS (optional):

@gspetro-NOAA

@danielabdi-noaa danielabdi-noaa changed the title Rearrange fixed-file mapping variables location. Move fixed-file mapping variables out of config_defaults.yaml. Oct 17, 2022
@danielabdi-noaa danielabdi-noaa added ci-hera-intel-WE Kicks off automated workflow test on hera with intel ci-jet-intel-WE Kicks off automated workflow test on jet with intel labels Oct 17, 2022
@venitahagerty venitahagerty removed ci-hera-intel-WE Kicks off automated workflow test on hera with intel ci-jet-intel-WE Kicks off automated workflow test on jet with intel labels Oct 17, 2022
@venitahagerty
Copy link
Copy Markdown
Collaborator

venitahagerty commented Oct 17, 2022

Machine: hera
Compiler: intel
Job: WE
Repo location: /scratch1/BMC/zrtrr/rrfs_ci/autoci/pr/1089943228/20221017233518/ufs-srweather-app
Build was Successful
Rocoto jobs started
Long term tracking will be done on 9 experiments
If test failed, please make changes and add the following label back:
ci-hera-intel-WE
Experiment Succeeded on hera: nco_grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_HRRR
Experiment Succeeded on hera: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_HRRR
Experiment Succeeded on hera: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_RRFS_v1beta
Experiment Succeeded on hera: grid_RRFS_CONUS_25km_ics_GSMGFS_lbcs_GSMGFS_suite_GFS_v15p2
Experiment Succeeded on hera: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v16
Experiment Succeeded on hera: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_RAP_suite_HRRR
Experiment Succeeded on hera: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15p2
Experiment Succeeded on hera: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_HRRR_suite_RRFS_v1beta
Experiment Succeeded on hera: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_HRRR_suite_HRRR
All experiments completed

@venitahagerty
Copy link
Copy Markdown
Collaborator

venitahagerty commented Oct 18, 2022

Machine: jet
Compiler: intel
Job: WE
Repo location: /lfs1/BMC/nrtrr/rrfs_ci/autoci/pr/1089943228/20221017233519/ufs-srweather-app
Build was Successful
Rocoto jobs started
Long term tracking will be done on 9 experiments
If test failed, please make changes and add the following label back:
ci-jet-intel-WE
Experiment Succeeded on jet: nco_grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_HRRR
Experiment Succeeded on jet: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_HRRR
Experiment Succeeded on jet: grid_RRFS_CONUS_25km_ics_GSMGFS_lbcs_GSMGFS_suite_GFS_v15p2
Experiment Succeeded on jet: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_RAP_suite_RRFS_v1beta
Experiment Succeeded on jet: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v15p2
Experiment Succeeded on jet: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_RAP_suite_HRRR
Experiment Succeeded on jet: grid_RRFS_CONUS_25km_ics_FV3GFS_lbcs_FV3GFS_suite_GFS_v16
Experiment Succeeded on jet: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_HRRR_suite_RRFS_v1beta
Experiment Succeeded on jet: grid_RRFS_CONUScompact_25km_ics_HRRR_lbcs_HRRR_suite_HRRR

Also, move other variables that are unlikely/never changed by user.
Copy link
Copy Markdown
Collaborator

@MichaelLueken MichaelLueken left a comment

Choose a reason for hiding this comment

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

@danielabdi-noaa Nice work! I have some comments, but everything looks good.

Comment thread ush/UFS_plot_domains.py Outdated
Comment thread ush/UFS_plot_domains.py Outdated
Comment thread ush/python_utils/config_parser.py Outdated
Comment on lines +219 to +221
f'''
The specified configuration file does not exist:
"{config_file}"'''
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 consistency, would it be better to convert the single quotes to double quotes, then convert the double quotes around {config_file} to single quotes?

Copy link
Copy Markdown
Collaborator Author

@danielabdi-noaa danielabdi-noaa Oct 25, 2022

Choose a reason for hiding this comment

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

Note that I did not make these changes by hand, but run a python code formatter on all python files usingblack --safe. I do this from time to time but we should probably apply this on the client/server side and force a coding/formatting standard. Black has a preference for double quotes (single or triple) over single quotes which is why you are seeing those changes.

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.

Thanks for the information about the black python code formatter. From StackOverflow, using Git hooks, it looks like it would be possible to run black on the python scripts before committing changes. Is this python code formatter available on RDHPCS machines, or is this something that you run on your own machine before creating the PR? If it is available on RDHPCS, then it should be fairly easy to set up a Git hook to run before committing (create a .git/hooks/pre-commit hook to use the formatter on the python files).

Do we want to use black, or is there another python code formatter that might be better? Do we want to enforce what black recommends, or create our own standard?

I think this would be a good topic for the SRW meeting this week.

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.

@MichaelLueken I think that is a good idea! black is not available on RDHPCS machines as far as I know but we can use flake8 or something similar.

Comment thread ush/set_FV3nml_ens_stoch_seeds.py Outdated
Comment thread ush/set_ozone_param.py Outdated
Comment thread ush/setup.py Outdated
Comment thread ush/setup.py Outdated
Comment thread ush/setup.py Outdated
Comment thread ush/setup.py Outdated
Copy link
Copy Markdown
Collaborator

@MichaelLueken MichaelLueken left a comment

Choose a reason for hiding this comment

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

Thanks, @danielabdi-noaa, for addressing my concerns. I approve of this update.

@MichaelLueken MichaelLueken added the run_we2e_coverage_tests Run the coverage set of SRW end-to-end tests label Oct 25, 2022
Copy link
Copy Markdown
Collaborator

@christinaholtNOAA christinaholtNOAA left a comment

Choose a reason for hiding this comment

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

LGTM!

@danielabdi-noaa danielabdi-noaa merged commit 6668873 into ufs-community:develop Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run_we2e_coverage_tests Run the coverage set of SRW end-to-end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants