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

Clean up how fixed files are staged - remove the ".agent" concept. #583

Open
MatthewPyle-NOAA opened this issue Dec 12, 2024 · 7 comments
Open
Assignees
Labels
EE2-specific Focused on improving EE2 compliance

Comments

@MatthewPyle-NOAA
Copy link
Contributor

The linking from the fix directory in the built workflow to ../../.agent/, which then points at a central location on WCOSS disk may make sense for development work to avoid multiple copies of the same large static files, but we need a cleaner solution for code hand off.

Ideally would have some form of an "install_rrfs_fix.sh" script that could have link and copy options to populate the fix/ space in the workflow (could live alongside the sorc/app_build.sh script).

@JiliDong-NOAA
Copy link
Contributor

@MatthewPyle-NOAA UFS_UTILS has the "link_fixdirs.sh" in fix dir, which provides options for linking or copying fix files on different platforms. Is this something we can borrow and modify for RRFS?

https://github.com/ufs-community/UFS_UTILS/blob/develop/fix/link_fixdirs.sh

@MatthewPyle-NOAA
Copy link
Contributor Author

Yes, I envisioned something like that. A future refinement we may need is to only stage the resolution we need for RRFSv1 (I'm not sure if other domains, like some CONUS or 12 km resolution data still exists in the permanent fix space).

@guoqing-noaa
Copy link
Contributor

@MatthewPyle-NOAA I would assume this discussion only applies to rrfs.v1?

@JiliDong-NOAA
Copy link
Contributor

Yes, I envisioned something like that. A future refinement we may need is to only stage the resolution we need for RRFSv1 (I'm not sure if other domains, like some CONUS or 12 km resolution data still exists in the permanent fix space).

@MatthewPyle-NOAA the current $HOMErrfs/fix is a mix of links and actual files. Given that most of files in the fix dir are links, it would be more convenient to put the actual files in the source directory so that a single link command will handle everything. I can generate a list of the non-link files in fix but I don't have copy access to the source fix dir (e.g. on WCOSS2 /lfs/h2/emc/lam/noscrub/emc.lam/FIX_RRFS). Would someone be able to help with that?

The source fix directory does include other grids not currently used by RRFSv1 (GFDL25km, CONUS13km etc.). It would make sense to remove them for the implementation purpose. If we want to keep these grids, we can create a new fix directory (e.g. FIX_RRFSv1) to only include the grids used in RRFSv1.

@guoqing-noaa
Copy link
Contributor

guoqing-noaa commented Jan 31, 2025

If we only want to provide a clean fix file directory for implementation without the need to track the change history of fix files, we may remove unneeded files under fix/ first, harden those links using cp -rL, and then move the copy as $HOMErrfs/fix.

Something like this:

cd $HOMErrfs
(remove unnecessary files under fix/)
cp -rL fix fix2
mv fix fix_old  (or: rm -rf fix/)
mv fix2 fix

Now the fix/ directory should be a clean copy without any links

@MatthewPyle-NOAA
Copy link
Contributor Author

@JiliDong-NOAA Good idea on creating a new FIX_RRFSv1 kind of space. I'll try to circle back to this next week (got distracted by other stuff today).

@JiliDong-NOAA
Copy link
Contributor

If we only want to provide a clean fix file directory for implementation without the need to track the change history of fix files, we may remove unneeded files under fix/ first, harden those links using cp -rL, and then move the copy as $HOMErrfs/fix.

Something like this:

cd $HOMErrfs
(remove unnecessary files under fix/)
cp -rL fix fix2
mv fix fix_old  (or: rm -rf fix/)
mv fix2 fix

Now the fix/ directory should be a clean copy without any links

thanks for the suggestion @guoqing-noaa I think we want to keep all files as links in $HOMErrfs/fix. I would suggest hardening the links in the source fix directory. Identifying and cleaning up unused fix files may need more efforts, as there are so many files (1300+) in the current fix directory.

@MatthewPyle-NOAA MatthewPyle-NOAA moved this from Backlog to In Progress in rrfs-workflow-1.2.0 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EE2-specific Focused on improving EE2 compliance
Projects
Status: In Progress
Development

No branches or pull requests

3 participants