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

Merge e3sm into develop #3

Open
wants to merge 15 commits into
base: develop_e3sm_update
Choose a base branch
from

Conversation

andrewdnolan
Copy link

@andrewdnolan andrewdnolan commented Feb 12, 2025

Pull Request Summary

This PR merges the development that @sbrus89 did on the e3sm branch into E3SM's mirror ofdevelop.

While E3SM's mirror ofdevelop is behind NOAA-EMC version of develop, E3SM's develop branch has switched to CPP preprocessor directives and source code with .F90 filenames. The development on the e3sm, which enables WW3 coupling in E3SM, was done before the switch to .F90 occurred, so all source code was .ftn files. This merge is necessary to use a cmake based build system, which relies on .F90 files and CPP directives.

sbrus89 and others added 15 commits June 10, 2021 10:49
 - Check if log file unit is open before opening log.ww3

 - Allow NDSO to be set explicitly
* origin/e3sm:
  Fix issue undefined variable issue in w3initmd.ftn
  Restrict UOST output to NAPOUT
  Add grid cell area calculation to wmscrpmd.ftn
  Modifications for log file consistency in E3SM
  Fix issue with optional arugment in W3IORS call
  Fix station location bug for RTD unstructured grids
  Add switch_E3SM
  Add unit number input to W3GRID
  Extend length of mesh filename variable
  Fix repeat allocation for unstructred RTD in ww3_ounf.ftn
  Fix RTD switch in w3gridmd.ftn
  Fix RTD bug in w3iopomd.ftn for unstrcutred mesh
  Fix RTD switch bug in ww3_ounf.ftn
@andrewdnolan
Copy link
Author

The merge was done running:

# assuming e3sm fork is origin
git checkout origin/develop
git merge origin/e3sm

After having run the commands above:

$ git status 
HEAD detached at origin/develop
You have unmerged paths.
  (fix conflicts and run "git commit")
  (use "git merge --abort" to abort the merge)

Changes to be committed:
        new file:   model/bin/switch_E3SM
        modified:   model/src/w3triamd.F90
        modified:   model/src/w3uostmd.F90
        modified:   model/src/wmscrpmd.F90
        modified:   model/src/ww3_grid.F90

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
        deleted by us:   model/ftn/w3gridmd.ftn
        deleted by us:   model/ftn/w3initmd.ftn
        both modified:   model/src/w3iopomd.F90
        both modified:   model/src/w3odatmd.F90
        both modified:   model/src/ww3_ounf.F90

Which is worth pointing out because the changes to the w3gridmd and w3initmd files are not registered by the merge. So, the source code changes done in the ftn files have to manually be applied to the matching F90 files.

Comment on lines +4160 to +4161
XUGRDIN(IX) = XGRD(1,IX)
YUGRDIN(IX) = YGRD(1,IX)
Copy link
Author

Choose a reason for hiding this comment

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

In the e3sm branch, the right hand side of this assignment XYB array (not XGRD/YGRD), but the XYB array no longer exists in develop.

WW3/model/ftn/w3gridmd.ftn

Lines 3562 to 3563 in 83ece2b

!/RTD XUGRDIN(IX) = XYB(IX,1)
!/RTD YUGRDIN(IX) = XYB(IX,2)

So I did some searching for other lines that used XYB on the e3sm branch and then looked at what they are using on develop, which is how I ended up with what's above. But, I'm not really sure if this is correct. It complies at least...

@@ -441,7 +441,7 @@ SUBROUTINE READMSH_IOBP(NDS,FNAME)
!/ Parameter list
!/
INTEGER, INTENT(IN) :: NDS
CHARACTER(60), INTENT(IN) :: FNAME
CHARACTER(160), INTENT(IN) :: FNAME
Copy link
Author

Choose a reason for hiding this comment

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

Not sure if the FNAME should also be extended in this subroutine, or kept at 60.

@@ -2812,7 +2812,7 @@ SUBROUTINE SET_UG_IOBP()
REAL(KIND=8), PARAMETER :: THR = TINY(1.)
INTEGER :: I1, I2, I3
INTEGER :: ITMP(NX), NEXTVERT(NX), PREVVERT(NX)
CHARACTER(60) :: FNAME
CHARACTER(160) :: FNAME
Copy link
Author

Choose a reason for hiding this comment

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

Same as above.

Not sure if the FNAME should also be extended in this subroutine, or kept at 60.

@andrewdnolan andrewdnolan marked this pull request as ready for review February 12, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants