[GCAFSv1] Inherit HOMEgcafs in ecf scripts and set HOMEglobal#4666
[GCAFSv1] Inherit HOMEgcafs in ecf scripts and set HOMEglobal#4666CoryMartin-NOAA merged 7 commits intodev/gcafs.v1from
Conversation
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
|
@copilot please revert the changes to the files that were previously just symbolic links |
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
Done in commit c1a3104. All 46 files that were previously symlinks ( |
|
@copilot can you revert the export model=gcafs changes back to just be model=gcafs? |
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
|
|
||
| model=gcafs | ||
| %include <head.h> | ||
| export HOMEglobal=${HOMEgcafs} |
There was a problem hiding this comment.
This looks good. I just have one question: when should ${} be used instead of %...%?
There was a problem hiding this comment.
Good question. I also wasn't sure if this was the appropriate place in the script for this inclusion.
There was a problem hiding this comment.
If there is a desire to move this around, I may suggest moving this down a few lines where NET and RUN get exported. I feel like it might be better there to have exports all grouped together instead of include,export,include,export unless there is something in the env that has a HOMEglobal call. Thinking long-term gw having it below NET could also allow for a future of HOMEglobal=HOME%NET% type call if needed, but for this specific implementation I don't know if this minor change is necessary.
I'm not an expert on the % % vs ${ } usage either. @CarlosMDiaz-NCO would probably have the best knowledge on the what the syntax for variables in the ecf scripts should be
There was a problem hiding this comment.
% % variables are defined at the ecflow level and are usually used to keep the ecf scripts general. For example in hourly models we will set CYC at the hourly family level so all the jobs under it can export cyc=%CYC% and use the same job names and ecf scripts. Sometimes they can be used to set different resources in case different cycles of the same job have different usage.
If it's available you should use${ }because adding too many variables to the ecflow definition is more complicated to follow. But if there's some need to add NET and RUN at that level we can do it. This re-use of the ecf scripts this way only works if the jobs are really similar. Otherwise, if they need different modules or different variables it should be it's own ecf script.
|
@copilot instead of adding this line around line 13, can you add it around line 28? |
Co-authored-by: CoryMartin-NOAA <6354668+CoryMartin-NOAA@users.noreply.github.com>
CoryMartin-NOAA
left a comment
There was a problem hiding this comment.
Do we all agree that this location makes more sense? Thanks @TravisElless-NOAA for the suggestion
TravisElless-NOAA
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks @CoryMartin-NOAA
Description
All non-symlink
.ecfscripts underecf/scripts/gcafs/andecf/scripts/gcdas/did not exposeHOMEglobal, causing any job scripts that reference${HOMEglobal}to fail.One change applied to the 18 non-symlink scripts:
export HOMEglobal=${HOMEgcafs}inserted afterexport EXPDIR=%EXPDIR%, grouping it with the other exports —head.hsetsHOMEgcafsviaeval "export HOME${model}=$modelhome"; this aliases it toHOMEglobalfor compatibility with sharedJGLOBAL_*job scriptsResulting export block in every modified gcafs/gcdas script:
Note: files that are symbolic links (e.g.
jgcafs_atmos_post_f*.ecfandjgcdas_atmos_post_*.ecf) are left unchanged as they inherit content from their symlink targets (jgcafs_atmos_post_master.ecfandjgcdas_atmos_post_master.ecfrespectively), which are themselves modified.Type of change
Change characteristics
How has this been tested?
Not yet tested on a live system.
Checklist
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.