-
Notifications
You must be signed in to change notification settings - Fork 207
Fix sorc/upp.fd link ordering to prevent broken symlinks #4480
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -140,6 +140,17 @@ if [[ "${LINK_NEST:-OFF}" == "ON" ]]; then | |||||
| done | ||||||
| fi | ||||||
|
|
||||||
| #------------------------------ | ||||||
| #--link source code directories needed by subsequent steps | ||||||
| #------------------------------ | ||||||
| cd "${HOMEgfs}/sorc" || exit 8 | ||||||
| if [[ -d ufs_model.fd ]]; then | ||||||
| if [[ -d upp.fd ]]; then | ||||||
| rm -rf upp.fd | ||||||
| fi | ||||||
| ${LINK} ufs_model.fd/UFSATM/upp upp.fd | ||||||
| fi | ||||||
|
|
||||||
| #--------------------------------------- | ||||||
| #--link sorc/upp.fd before referencing files within it | ||||||
| #--------------------------------------- | ||||||
|
|
@@ -158,18 +169,24 @@ cd "${HOMEgfs}/parm/ufs" || exit 1 | |||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/ufs_model.fd/tests/parm/noahmptable.tbl" . | ||||||
|
|
||||||
| cd "${HOMEgfs}/parm/post" || exit 1 | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/parm/params_grib2_tbl_new" . | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/fix/nam_micro_lookup.dat" . | ||||||
|
|
||||||
| for dir in gfs gcafs gefs sfs; do | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/parm/${dir}" . | ||||||
| done | ||||||
| if [[ -d "${HOMEgfs}/sorc/upp.fd" ]]; then | ||||||
| [[ -f "${HOMEgfs}/sorc/upp.fd/parm/params_grib2_tbl_new" ]] && \ | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/parm/params_grib2_tbl_new" . | ||||||
| [[ -f "${HOMEgfs}/sorc/upp.fd/fix/nam_micro_lookup.dat" ]] && \ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/fix/nam_micro_lookup.dat" . | ||||||
|
|
||||||
| for dir in gfs gcafs gefs sfs; do | ||||||
| [[ -d "${HOMEgfs}/sorc/upp.fd/parm/${dir}" ]] && \ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/parm/${dir}" . | ||||||
| done | ||||||
|
|
||||||
| for file in optics_luts_DUST.dat optics_luts_DUST_nasa.dat optics_luts_NITR_nasa.dat \ | ||||||
| optics_luts_SALT.dat optics_luts_SALT_nasa.dat optics_luts_SOOT.dat optics_luts_SOOT_nasa.dat \ | ||||||
| optics_luts_SUSO.dat optics_luts_SUSO_nasa.dat optics_luts_WASO.dat optics_luts_WASO_nasa.dat; do | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/fix/chem/${file}" . | ||||||
| done | ||||||
| for file in optics_luts_DUST.dat optics_luts_DUST_nasa.dat optics_luts_NITR_nasa.dat \ | ||||||
| optics_luts_SALT.dat optics_luts_SALT_nasa.dat optics_luts_SOOT.dat optics_luts_SOOT_nasa.dat \ | ||||||
| optics_luts_SUSO.dat optics_luts_SUSO_nasa.dat optics_luts_WASO.dat optics_luts_WASO_nasa.dat; do | ||||||
| [[ -f "${HOMEgfs}/sorc/upp.fd/fix/chem/${file}" ]] && \ | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [shfmt] reported by reviewdog 🐶
Suggested change
|
||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/fix/chem/${file}" . | ||||||
| done | ||||||
| fi | ||||||
|
|
||||||
| for file in ice_gfs.csv ice_gefs.csv ocean_gfs.csv ocean_gefs.csv ocnicepost.nml.jinja2; do | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/gfs_utils.fd/parm/ocnicepost/${file}" . | ||||||
|
|
@@ -404,7 +421,9 @@ done | |||||
| if [[ -s "upp.x" ]]; then | ||||||
| rm -f upp.x | ||||||
| fi | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/exec/upp.x" . | ||||||
| if [[ -f "${HOMEgfs}/sorc/upp.fd/exec/upp.x" ]]; then | ||||||
| ${LINK_OR_COPY} "${HOMEgfs}/sorc/upp.fd/exec/upp.x" . | ||||||
| fi | ||||||
|
|
||||||
| for ufs_utilsexe in emcsfc_ice_blend emcsfc_snow2mdl global_cycle fregrid regridStates.x; do | ||||||
| if [[ -s "${ufs_utilsexe}" ]]; then | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[shfmt] reported by reviewdog 🐶