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

Change GTG checkout to submodule and remove manage_externals #5

Conversation

KateFriedman-NOAA
Copy link

@KateFriedman-NOAA KateFriedman-NOAA commented Dec 6, 2021

This PR includes the following:

  1. remove manage_externals package and associated files from UPP for GTG checkout
  2. add git submodule to handle GTG checkout

Associated updates are made on the workflow side to update the checkout process to use the submodule for GTG. Here is the build log for the UPP with GTG after testing the clone updates from my fork branch:

/lfs/h2/emc/global/noscrub/Kate.Friedman/git/feature-ops-wcoss2/sorc/logs/build_ncep_post_test7_gtg.log

To test my updates in my fork branch:

git clone --recursive -b post_gfsv16_wcoss2 https://github.com/KateFriedman-NOAA/UPP.git gfs_post.fd

If you do not use --recursive it will NOT invoke the submodule and will NOT clone the GTG.

Kate.Friedman@dlogin02:/lfs/h2/emc/global/noscrub/Kate.Friedman/git/UPP> git clone --recursive -b post_gfsv16_wcoss2 https://github.com/KateFriedman-NOAA/UPP.git gfs_post.fd
Cloning into 'gfs_post.fd'...
remote: Enumerating objects: 6580, done.
remote: Counting objects: 100% (1643/1643), done.
remote: Compressing objects: 100% (273/273), done.
remote: Total 6580 (delta 1535), reused 1371 (delta 1370), pack-reused 4937
Receiving objects: 100% (6580/6580), 35.93 MiB | 17.87 MiB/s, done.
Resolving deltas: 100% (4698/4698), done.
Submodule 'sorc/post_gtg.fd' (https://github.com/NCAR/UPP_GTG) registered for path 'sorc/post_gtg.fd'
Cloning into '/lfs/h2/emc/global/noscrub/Kate.Friedman/git/UPP/gfs_post.fd/sorc/post_gtg.fd'...
remote: Enumerating objects: 4000, done.        
remote: Counting objects: 100% (18/18), done.        
remote: Compressing objects: 100% (14/14), done.        
remote: Total 4000 (delta 7), reused 13 (delta 4), pack-reused 3982        
Receiving objects: 100% (4000/4000), 34.69 MiB | 19.10 MiB/s, done.
Resolving deltas: 100% (2761/2761), done.
Submodule path 'sorc/post_gtg.fd': checked out '95959a1c04ef49452186e4be9d49b0c1d7aba7d9'
Kate.Friedman@dlogin02:/lfs/h2/emc/global/noscrub/Kate.Friedman/git/UPP> cd gfs_post.fd/sorc/post_gtg.fd/
Kate.Friedman@dlogin02:/lfs/h2/emc/global/noscrub/Kate.Friedman/git/UPP/gfs_post.fd/sorc/post_gtg.fd> git branch
* (HEAD detached at 95959a1)
  master
Kate.Friedman@dlogin02:/lfs/h2/emc/global/noscrub/Kate.Friedman/git/UPP/gfs_post.fd/sorc/post_gtg.fd> git log -1
commit 95959a1c04ef49452186e4be9d49b0c1d7aba7d9 (HEAD, tag: ncep_post_gtg.v2.0.4, origin/v16)
Author: Yali Mao <yali.mao@noaa.gov>
Date:   Tue Jun 8 06:07:13 2021 +0000

    If GFS input fields are out of bounds, contintue to calcuate GTG and
    output error messages to logfile instead of quitting the program

Refs: NOAA-EMC#420, NOAA-EMC#363

- remove manage_externals copy from repo
- remove associated Externals.cfg file
- replacing GTG checkout with submodules

Refs: NOAA-EMC#363
- created .gitmodules file via git submodule add command:
git submodule add https://github.com/NCAR/UPP_GTG sorc/post_gtg.fd
- new post_gtg.fd subfolder added (empty before submodule checkout)

Refs: NOAA-EMC#363
@WenMeng-NOAA
Copy link
Owner

@KateFriedman-NOAA I tested on your branch for gtg code checking out as:
git clone --recursive -b post_gfsv16_wcoss2 https://github.com/KateFriedman-NOAA/UPP.git gfs_post.fd
I got failure as:

Wen.Meng@dlogin02 kate$ git clone --recursive -b post_gfsv16_wcoss2 https://github.com/KateFriedman-NOAA/UPP.git gfs_post.fd
Cloning into 'gfs_post.fd'...
remote: Enumerating objects: 6580, done.
remote: Counting objects: 100% (1643/1643), done.
remote: Compressing objects: 100% (273/273), done.
remote: Total 6580 (delta 1535), reused 1371 (delta 1370), pack-reused 4937
Receiving objects: 100% (6580/6580), 35.93 MiB | 13.01 MiB/s, done.
Resolving deltas: 100% (4698/4698), done.
Submodule 'sorc/post_gtg.fd' (https://github.com/NCAR/UPP_GTG) registered for path 'sorc/post_gtg.fd'
Cloning into '/lfs/h2/emc/vpppg/noscrub/Wen.Meng/ncep_post/kate/gfs_post.fd/sorc/post_gtg.fd'...
Username for 'https://github.com': WenMeng-NOAA
Password for 'https://WenMeng-NOAA@github.com': 
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/NCAR/UPP_GTG/'
fatal: clone of 'https://github.com/NCAR/UPP_GTG' into submodule path '/lfs/h2/emc/vpppg/noscrub/Wen.Meng/ncep_post/kate/gfs_post.fd/sorc/post_gtg.fd' failed
Failed to clone 'sorc/post_gtg.fd'. Retry scheduled
Cloning into '/lfs/h2/emc/vpppg/noscrub/Wen.Meng/ncep_post/kate/gfs_post.fd/sorc/post_gtg.fd'...
Username for 'https://github.com'

It seems I can't use the https url for gtg checking out, but the ssh url is working. Do you know anything is missing on my github account?

@KateFriedman-NOAA
Copy link
Author

@WenMeng-NOAA GitHub deprecated the use of passwords in late summer and so users have to use personal access tokens now. This part of the error gives info on that:

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

So you need to set up a personal access token in your GitHub account and add it to a new .git-credentials file on each HPC you work on. See slides 10 and 11 of this slidedeck for more info:
https://docs.google.com/presentation/d/16XIq0mniV1JjhrxGQ2E00mFpnzd_w9CUnpaY4_Ogi2E/edit#slide=id.g6052c2987b_9_42

Generate a token, add it within a .git-credentials file in your /u/$USER area on Dogwood (and other HPCs), and then try that clone again. Let me know how it goes. With a personal access token in place it won't matter what method you use for cloning, it will use your token like a password and you'll have passwordless git actions (push/pull).

@WenMeng-NOAA
Copy link
Owner

@KateFriedman-NOAA Your tips work for me. Now I can clone gtg code. Thanks!

@KateFriedman-NOAA
Copy link
Author

Glad it's working for you now @WenMeng-NOAA ! Thanks for approving this PR, please feel free to submit it into your branch now, I don't have a submit button to do it myself.

@YaliMao-NOAA
Copy link

@KateFriedman-NOAA I was able to checkout GTG code successfully and compiled the code without problems. The only issue is GTG repository. GTG is delivered by tags, and the operational one is https://github.com/NCAR/UPP_GTG/tree/ncep_post_gtg.v2.0.3.
If we checkout https://github.com/NCAR/UPP_GTG, we won't get the exact tag.

@YaliMao-NOAA
Copy link

@KateFriedman-NOAA Please ignore the previous comments. @aerorahul has explained that submodule tracks the hash of the commit.

@WenMeng-NOAA WenMeng-NOAA merged commit ba43ed4 into WenMeng-NOAA:post_gfsv16_wcoss2 Dec 7, 2021
WenMeng-NOAA pushed a commit that referenced this pull request Dec 13, 2021
* Turn on GSD cloud ceiling calculation for RRFS dev.

* Updates to UPP for RRFS applications (#3)

* Updates to UPP for RRFS applications:
1) Adding a RRFS-specific .xml control file and a corresponding .txt flat file.  Note that script changes (pending) are needed to leverage the new flat file.  However, this code will work in current real-time configurations.
2) Adding GSL experimental ceiling diagnostics, GSL visibility diagnostic, and GSL sea-level pressure reduction (MAPS).  Also adding TKE and aerosol number concentrations.
3) Code clean-up for ceiling-related diagnostics; added comments, etc.
4) Removing several non-needed variables, originally inherited from FV3-SAR community configuration.

* Updating UPP control files to specify GRIB2 generating center as "noaa_fsl_boulder" and the generating process as "hrrr".  The "hrrr" specification is temporary, and will eventually be switched to "rrfs" once required changes to the "NCEPLIBS-g2tmpl" library are available. (#4)

* Fix some out-of-bounds reads that caused the RRFS UPP to crash. (#5)

* Adding README file (#7)

* Adding README file to describe process of making a "flat" file.

* Updates to README to improve explanation of input/output files.

* Code to read in Flash Flood Guidance (FFG) and Average Recurrence Interval (ARI) precipitation datasets for comparison with model QPF within UPP.

* Fixed a syntax error in SURFCE.f

* Getting rid of GRIB1 output option to be consistent with rest of code.

* Changing field numbers to avoid conflict with existing RRFS-dev1 fields.

* Putting exceedance grids in flat files for testing in RRFS UPP.

* Corrected the 1h and run total precip names for calculating exceedances in SURFCE.f

* Bug fix in SURFCE.f if statements.

* Removing changes to RQSTFLD.F since GRIB1 is no longer used in UPP.

* Merging NOAA-GSL development on top of NOAA-EMC UPP for testing.

* Correcting minor typos in SURFCE.f to allow testing.

* Update code based on testing with RRFS cases.

* Update part of the code based on current EMC develop branch for comparing the test results with the merged version.(#9)

* Fixed several bugs in the code.

* Modifications to SURFCE.f to check for existence of FFG files.

* Bug fixes for FFG file existence check, and changes to handle rotated lat-lon grid interpolation for FFG

* Bug fixes for FFG existence checks in SURFCE.f

* Another bug fix for SURFCE.f

* Updating XML and flat txt files to include a 65th vertical level to be consistent with updated FV3LAM model with higher model top. (NOAA-EMC#13)

* Code cleanup for QPF - FFG comparison.  Comparison put into subroutine.

* Cleanup of SURFCE.f; moving the FFG comparisons into a subroutine.

* Final cleanup of exceedance code for QPF vs FFG.

* Removing some commented out variable declarations.

* Additional cleanup recommended by Ming: we really only need two exceedance variables; one for 1h FFG and one for run total FFG exceedances.

* Further cleanup of FFG code, simplifying to two fields (1h acc and run total acc)

* Adding ARI comparison fields for 2y, 5y, 10y, and 100y ARIs.

* Changes to output 9 soil levels from FV3LAM if we are running 9 level RUC LSM.

* Adding flat txt file for UPP.

* Commenting out the use of the ARI exceedances for now.  We can switch them on later.

* Bug fix in INITPOST_NETCDF.f : need to use both ncid2d and ncid3d in this subroutine!

* Adding NOAA-GSL code changes on top of latest NOAA-EMC UPP.

* Couple of bug fixes in NOAA-EMC code.  Bugs were leading to PRMSL and -10C REFD being all zeroes.

* Cleaning up code to get rid of unnecessary differences from EMC.

* Putting all new GSL variables into EMC's unified post_avblflds.xml.  Note that EMC's unified post_avblflds.xml does not validate using the avblflds Schema.

* Updating postconfig-NT.txt file for GSL RRFS based on merged post_avblflds.xml file.

* Adding RRFS control files to makefile.

* Changing back scale for WEASD_ON_SURFACE to previous default, thanks to suggestion from Wen Meng.

* Reverting name of cldfra based on feedback from Eric Aligo.

* Reverting changes in fv3lam_post_avblflds.xml since GSL new variables are now included in post_avblflds.xml

* Changing experimental ceiling level type from "ceiling" to "cloud_ceilng"

* Updating 3drtma_postcntrl.xml with revised name for GSD_EXP_CEILING.  This also affects postxconfig-NT-3drtma.txt.  postxconfig-NT-fv3lam_rrfs.txt also changed due to changes in post_avblflds.xml

* Introducing if statement for call of NGMSLP, to avoid calling unless it is needed.

Co-authored-by: Ming.Hu <Ming.Hu@noaa.gov>
Co-authored-by: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com>
Co-authored-by: Christina Holt <Christina.Holt@noaa.gov>
Co-authored-by: Jaymes Kenyon <jaymes.kenyon@noaa.gov>
Co-authored-by: Samuel Trahan (NOAA contractor) <39415369+SamuelTrahanNOAA@users.noreply.github.com>
WenMeng-NOAA added a commit that referenced this pull request Jan 11, 2022
* Add changes for building executable on wcoss2.

* Add changes for buding upp lib on wcoss2.

* Add changes for building upp lib on wcoss2.

* Update hdf5 and netcdf modules.

* Upgrade manage_externals to new version which works for python 3.8.5.

* Remove jlogfile in workflow scripts.

* Changes for overriding module versions from upstream setting.

* Changes for overriding module versions from upstream setting for
building upp lib.

* Update for POSTGRB2TBL default setting.

* Update for LMod compliance.

* Remove v8.0.0-wcoss2 and lib-wcoss2; correct typo in upp_wcoss2.lua and
post_wcoss2.lua.

* Remove jflofile per Kate's comments

* Change GTG checkout to submodule and remove manage_externals (#5)

* Retire manage_externals for GTG checkout

- remove manage_externals copy from repo
- remove associated Externals.cfg file
- replacing GTG checkout with submodules

Refs: NOAA-EMC#363

* Add UPP_GTG submodule

- created .gitmodules file via git submodule add command:
git submodule add https://github.com/NCAR/UPP_GTG sorc/post_gtg.fd
- new post_gtg.fd subfolder added (empty before submodule checkout)

Refs: NOAA-EMC#363

* Updating submodule pointer of GTG to ncep_post_gtg.v2.0.4

* Teak makefile_lib.

Co-authored-by: Wen Meng <Wen.Meng@clogin02.cactus.wcoss2.ncep.noaa.gov>
Co-authored-by: Kate Friedman <kate.friedman@noaa.gov>
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.

3 participants