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

Create unit tests for ocean_merge code #944

Open
GeorgeGayno-NOAA opened this issue May 9, 2024 · 10 comments · May be fixed by #997
Open

Create unit tests for ocean_merge code #944

GeorgeGayno-NOAA opened this issue May 9, 2024 · 10 comments · May be fixed by #997
Assignees
Labels

Comments

@GeorgeGayno-NOAA
Copy link
Collaborator

Follow the procedures used in other programs:

  • Place the 'guts' of the program into Fortran modules that are accessed by a simple driver.
  • Modify build to create a library that is linked by the driver.
  • Create unit tests that link to the library.

Unit tests should be created for all major functions of the code:

  • The read of the orography file.
  • The read of the namelist file.
  • The loop that merges the land and ocean masks along coastlines.
  • The write of the updated orography file.
@HenryRWinterbottom
Copy link
Contributor

@GeorgeGayno-NOAA My branch for this issue is #944.

Is there a plan to add the respective test files to the FTP site for the ocean_merge application unit-tests?

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@GeorgeGayno-NOAA My branch for this issue is #944.

Is there a plan to add the respective test files to the FTP site for the ocean_merge application unit-tests?

If your tests require large binary input data, we can host it here:
https://ftp.emc.ncep.noaa.gov/static_files/public/UFS/ufs_utils/unit_tests/

Small ASCII data files can be stored in Github. For example:
https://github.com/ufs-community/UFS_UTILS/tree/develop/tests/chgres_cube/data

@HenryRWinterbottom
Copy link
Contributor

@GeorgeGayno-NOAA I have finished a first cut of the ocean_merge refactor. Please see here.

I implemented the ncio package. This is a NCEP-libs supported package but will require a spack-stack update. Further, some additions to the CMake application are also required. If/when you are OK with the refactoring, I can update the CMake accordingly and finish up the unit-tests.

Please let me know how you'd like to proceed.

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@GeorgeGayno-NOAA I have finished a first cut of the ocean_merge refactor. Please see here.

I implemented the ncio package. This is a NCEP-libs supported package but will require a spack-stack update. Further, some additions to the CMake application are also required. If/when you are OK with the refactoring, I can update the CMake accordingly and finish up the unit-tests.

Please let me know how you'd like to proceed.

This looks fine.

What spack-stack update is required?

@HenryRWinterbottom
Copy link
Contributor

@GeorgeGayno-NOAA We will need to make sure ncio is included in the stack. I can make that PR, I just wanted to make sure we were on the same page before diving in.

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@GeorgeGayno-NOAA We will need to make sure ncio is included in the stack. I can make that PR, I just wanted to make sure we were on the same page before diving in.

I checked Hercules and Hera. ncio was part of the stack. But I did not find ncio on WCOSS2. Getting libraries installed on WCOSS2 is not a quick or simple process. So, I would move forward with the assumption that ncio is not available.

@HenryRWinterbottom
Copy link
Contributor

@GeorgeGayno-NOAA OK, thank you for checking into that.

I will need to rewrite some code, but it shouldn't be too terrible. I will follow-up here once I do.

Thanks again.

@HenryRWinterbottom
Copy link
Contributor

@GeorgeGayno-NOAA I made appropriate updates, including to the relevant CMakeList.txt.

This simplifies things a bit, and as discussed, removes the ncio dependency thus saving a PR into spack-stack and provides WCOSS compatibility.

Please review. Once you are satisfied, I can finish up the respective unit-tests.

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@GeorgeGayno-NOAA I made appropriate updates, including to the relevant CMakeList.txt.

This simplifies things a bit, and as discussed, removes the ncio dependency thus saving a PR into spack-stack and provides WCOSS compatibility.

Please review. Once you are satisfied, I can finish up the respective unit-tests.

This looks fine.

@GeorgeGayno-NOAA
Copy link
Collaborator Author

@HenryWinterbottom-NOAA - please cease work on this issue for now.

GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 26, 2024
routines into their own library.

Write a unit test for the namelist read routine.

Fixes ufs-community#944.
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 26, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 26, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 27, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 27, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 27, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 27, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Sep 30, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Oct 1, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Oct 1, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Oct 9, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Oct 9, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Oct 18, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 14, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 14, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 14, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 14, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 14, 2024
@GeorgeGayno-NOAA GeorgeGayno-NOAA linked a pull request Nov 15, 2024 that will close this issue
6 tasks
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 15, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 15, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 18, 2024
GeorgeGayno-NOAA pushed a commit to GeorgeGayno-NOAA/UFS_UTILS that referenced this issue Nov 18, 2024
@GeorgeGayno-NOAA GeorgeGayno-NOAA moved this to In progress in Version 1.14.0 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants