Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
499 commits
Select commit Hold shift + click to select a range
58303ea
Re-factor retrieval scripts;
peterkronenberg-rtx Apr 16, 2025
fddc29a
Re-factor downloading
peterkronenberg-rtx Apr 16, 2025
1f8891f
Base class for downloader programs
peterkronenberg-rtx Apr 16, 2025
f50517c
Display command line arguments
peterkronenberg-rtx Apr 16, 2025
24cd7b1
Disable conda buffering
peterkronenberg-rtx Apr 16, 2025
943fd8b
Change how lock file is named
peterkronenberg-rtx Apr 16, 2025
8eb4e2c
Set default CLI values
peterkronenberg-rtx Apr 17, 2025
bd6b7d1
Set the correct environment for conda runs
peterkronenberg-rtx Apr 18, 2025
e553a28
Update comments
peterkronenberg-rtx Apr 18, 2025
8c523f7
Create conda utility
peterkronenberg-rtx Apr 18, 2025
f67c22f
Correct cleanup
peterkronenberg-rtx Apr 22, 2025
8eb4879
Merge branch 'peter_ngwpc-6093_refactoring_part_2' into 'development'
peterkronenberg-rtx Apr 22, 2025
121be87
1) Added the test case to use the t-route Lower Colorado River domain…
Apr 22, 2025
9ff3ee6
Ensure that lookback and lagback are passed as int
peterkronenberg-rtx Apr 23, 2025
857d88e
Merge branch 'peter_datatypes' into 'development'
peterkronenberg-rtx Apr 23, 2025
aa2fe97
Factor out run_conda_command to separate module; Other cleanup
peterkronenberg-rtx Apr 22, 2025
de60822
Merge branch 'NGWPC-1356' into 'development'
zhengtaocui Apr 25, 2025
c68f6d1
Add Pythonpath to dockerfile
peterkronenberg-rtx Apr 28, 2025
531621c
Merge branch 'peter_refactor' into 'development'
peterkronenberg-rtx Apr 28, 2025
8ac664b
Updated the master script and fixed errors in the OWP makeAtmoHRRR.py…
Apr 29, 2025
5613d9a
Merge branch 'NWGWC6145_full_workflow_for_schism_forecast_use_case' i…
zhengtaocui May 1, 2025
3b312bb
1)Updated Dockerfile.ngencoastal for OE deployment, 2) Added run scri…
May 6, 2025
c5fe874
added updates to nexgen_preprocessing.bash
May 6, 2025
8c288b2
Updated run_forecast_nexgen_preprocessing.bash
May 6, 2025
7a4f750
Merge branch 'NGWPC_6146_OE_Deployment' into 'development'
zhengtaocui May 9, 2025
f1d9782
Fix script name
peterkronenberg-rtx May 10, 2025
806aa30
Merge branch 'peter_script' into 'development'
peterkronenberg-rtx May 10, 2025
03ffbc7
Fix MRMS Radar script
peterkronenberg-rtx May 13, 2025
25baeed
Merge branch 'peter_fix_mrms_radar' into 'development'
peterkronenberg-rtx May 13, 2025
35a678f
1) added new run script for forcing engine BMI and ngen to streamline…
zhengtaocui May 15, 2025
71d1838
SCHISM has a problem when reading the time in sflux_air file when the…
zhengtaocui May 16, 2025
b61d4a4
Merge branch 'NGWPC_6147' into 'development'
zhengtaocui May 20, 2025
db412e5
added --yes flag to conda clean command in Dockerfile.ngencoastal file
miguelp1986 May 22, 2025
77560ac
Update GitLab CI/CD configuration and Dockerfile for coastal forcing
miguelp1986 May 23, 2025
1bd4e0e
Fix path to requirements.txt in Dockerfile for coastal forecast insta…
miguelp1986 May 23, 2025
b1273f3
fixed coastal Dockerfile name
miguelp1986 May 23, 2025
2f929c9
uncommented out bmi and lumped docker builds in gitlab ci file now th…
miguelp1986 May 23, 2025
1874747
Merge branch 'pena-docker-conda-fix' into 'development'
zhengtaocui May 23, 2025
25cb136
changes to bmi_wrapper.py to fix standard_ana bug
May 27, 2025
a9bd0b1
Merge branch 'NGWPC-6335_standard_ana_bug' into 'development'
kyle-larkin May 27, 2025
ca3f64d
Fix filenames
peterkronenberg-rtx Jun 3, 2025
78b7d02
Fix MRMS_RO
peterkronenberg-rtx Jun 4, 2025
578e5de
Fix spelling error of Puerto Rico
peterkronenberg-rtx Jun 5, 2025
9f4c8c3
removing extra subdirectory for MRMS_RO
kyle-larkin Jun 5, 2025
41fc9bc
Merge branch 'peter_mrms_filenames' into 'development'
peterkronenberg-rtx Jun 5, 2025
ab74fb1
Merge branch 'development' into 'release-candidate'
cmaynard-ngwpc Jun 11, 2025
7ac3ae6
Updating LFD for Alaska AORC NetCDF local processing.
Jul 9, 2025
30bcb3e
Merge branch 'ksl_NGWPC-6839_Alaska_AORC' into 'development'
kyle-larkin Jul 10, 2025
b315798
Tweaks and a bugfix for zarr batch processing.
Jul 14, 2025
15b745a
Merge branch 'ksl_NGWPC-6840_AORC_Support' into 'development'
kyle-larkin Jul 14, 2025
0d95261
Adding processing path for conus nwm retrospective data, and associat…
kyle-larkin Aug 19, 2025
a93eaf3
Merge pull request #1 from NGWPC/klarkin_NGWPC-7386_Historical_Forcin…
kyle-larkin Aug 19, 2025
2af7761
WIP for github cicd migration
miguelp1986 Aug 19, 2025
473f270
udpated cicd.yml
miguelp1986 Aug 19, 2025
9e9be39
updated cicd.yml
miguelp1986 Aug 19, 2025
82f304a
updated cicd.yml
miguelp1986 Aug 19, 2025
042a37f
updated cicd.yml
miguelp1986 Aug 19, 2025
663c091
updated cicd file
miguelp1986 Aug 19, 2025
407dec5
updated ngencoastal dockerfile
miguelp1986 Aug 19, 2025
e9ba9dc
updated cicd file
miguelp1986 Aug 19, 2025
64e5086
updated cicd file
miguelp1986 Aug 19, 2025
c5bdb6b
updated cicd file
miguelp1986 Aug 19, 2025
4a226e1
updated cicd file
miguelp1986 Aug 19, 2025
f4b1e21
wip
miguelp1986 Aug 20, 2025
b940d32
updated cmkae booster to match what ngen repo has which builds succes…
miguelp1986 Aug 22, 2025
71c824b
updated cicd file
miguelp1986 Aug 22, 2025
3f97304
updated cicd file
miguelp1986 Aug 22, 2025
6490f0a
updated cicd file
miguelp1986 Aug 22, 2025
c672059
small rename change in cicd file
miguelp1986 Aug 22, 2025
6446934
merge development into pena-github-migration
miguelp1986 Aug 23, 2025
e576b50
fixing Trivy scanning
miguelp1986 Aug 23, 2025
c6642c5
Merge pull request #2 from NGWPC/pena-github-migration
miguelp1986 Aug 26, 2025
05f06dd
fix image size issue
miguelp1986 Aug 26, 2025
0b2b2d1
Merge pull request #3 from NGWPC/pena-sonarqube
miguelp1986 Aug 26, 2025
3e57f5f
added sfincs forcing time series creation scripts
mkarim-rtx Aug 27, 2025
8c587a5
added usescases and glofs
mkarim-rtx Sep 2, 2025
1b335e3
fixing matep issue
mkarim-rtx Sep 2, 2025
dd63139
mateo update
mkarim-rtx Sep 2, 2025
abba9b4
mateo processing
mkarim-rtx Sep 3, 2025
e0fb605
interploting 600 sec
mkarim-rtx Sep 3, 2025
b2904ac
update on getting noaa output
mkarim-rtx Sep 4, 2025
b1ab23b
Changes for forcing-engine
peterkronenberg-rtx Jul 18, 2025
9171fb3
Prevent re-opening the log file
peterkronenberg-rtx Jul 29, 2025
82dfb89
Merge pull request #5 from NGWPC/peter_forcing_engine_rebase
peterkronenberg-rtx Sep 4, 2025
4224a03
comparing outputs
mkarim-rtx Sep 4, 2025
ef60060
combining all together
mkarim-rtx Sep 6, 2025
421bd59
Merge pull request #6 from NGWPC/release-candidate
cmaynard-ngwpc Sep 9, 2025
0d5880e
Enables use of RegridOptSuppPcp, which is important for high-resoluti…
kyle-larkin Sep 11, 2025
29caa3e
Update forcing_extraction and bmi_wrapper to accept input time
jswade-rtx Sep 5, 2025
36b22d2
Modified bmi_wrapper to support modular extraction scheme
jswade-rtx Sep 9, 2025
cb88d44
Add functionality for long_range and standard ana forcing extraction
jswade-rtx Sep 9, 2025
fb5ae28
Testing changes for AnA functionality
jswade-rtx Sep 10, 2025
d7a97ed
Updated forcing extraction workflow for Alaska and Puerto Rico
jswade-rtx Sep 11, 2025
3e30c1f
Added functionality for extended_ana run
jswade-rtx Sep 11, 2025
939bdde
Enables use of RegridOptSuppPcp, which is important for high-resoluti…
kyle-larkin Sep 11, 2025
36225ae
Merge pull request #8 from NGWPC/klarkin_supp_precip_regrid_method
kyle-larkin Sep 12, 2025
6036e89
Continuing integration with nwm-msw-mgr forecast workflow
jswade-rtx Sep 12, 2025
2cfac15
update
mkarim-rtx Sep 14, 2025
26ef48c
update
mkarim-rtx Sep 14, 2025
18f2c47
removed mistakenly added files
mkarim-rtx Sep 16, 2025
e61e152
removed mistakenly added files
mkarim-rtx Sep 16, 2025
5550213
Move esmf_creation to a separate script
jswade-rtx Sep 16, 2025
4c3d290
Move forcing extraction out of bmi_wrapper
jswade-rtx Sep 16, 2025
2110fcf
Updates to forcing_extraction.py for testing
jswade-rtx Sep 16, 2025
bc350cd
Minor fixes for forcing_extration.py after testing
jswade-rtx Sep 16, 2025
ba18963
Updated forcing extraction sources to s3
jswade-rtx Sep 17, 2025
d3f7f69
Update forcing_extraction and bmi_wrapper to accept input time
jswade-rtx Sep 5, 2025
33a7a71
Modified bmi_wrapper to support modular extraction scheme
jswade-rtx Sep 9, 2025
d315a72
Add functionality for long_range and standard ana forcing extraction
jswade-rtx Sep 9, 2025
ba833a9
Testing changes for AnA functionality
jswade-rtx Sep 10, 2025
1dbe4e7
Updated forcing extraction workflow for Alaska and Puerto Rico
jswade-rtx Sep 11, 2025
18400aa
Added functionality for extended_ana run
jswade-rtx Sep 11, 2025
f93e887
Continuing integration with nwm-msw-mgr forecast workflow
jswade-rtx Sep 12, 2025
8c951e0
Move esmf_creation to a separate script
jswade-rtx Sep 16, 2025
7e60291
Move forcing extraction out of bmi_wrapper
jswade-rtx Sep 16, 2025
00b0ad8
Updates to forcing_extraction.py for testing
jswade-rtx Sep 16, 2025
11e35f3
Minor fixes for forcing_extration.py after testing
jswade-rtx Sep 16, 2025
9182c00
Updated forcing extraction sources to s3
jswade-rtx Sep 17, 2025
13ceb28
updates to integrate mesh creation and forcing extraction in FE
kyle-larkin Sep 17, 2025
7e47e7a
merging changes to integrate FE modules
kyle-larkin Sep 17, 2025
0209856
fixing code merge issue - dropped mod_name =
kyle-larkin Sep 18, 2025
09dddb1
Merge pull request #10 from NGWPC/klarkin_forecast_validation
kyle-larkin Sep 18, 2025
716c52a
changes to time-handling for MRMS as well as input_forcings ana_offse…
kyle-larkin Sep 18, 2025
192aca2
Merge pull request #11 from NGWPC/klarkin_forecast_validation
kyle-larkin Sep 18, 2025
c109281
Update Alaska_HRRR_AnA times
jswade-rtx Sep 18, 2025
f4abc53
Merge pull request #12 from NGWPC/jwade_NGWPC-7560_update_AnA_times
jswade-rtx Sep 18, 2025
75ebcfa
Fix args input to esmf_creation
jswade-rtx Sep 18, 2025
45ee868
Fix args input to forcing_extraction
jswade-rtx Sep 18, 2025
59e4edd
Modify bmi_wrapper to support new Docker container
jswade-rtx Sep 18, 2025
670426d
Fixes to forcing_extraction, esmf_creation, and bmi_wrapper for new d…
jswade-rtx Sep 18, 2025
d5d86a7
Merge pull request #13 from NGWPC/jwade_NGWPC-7560_update_bmi_wrapper
jswade-rtx Sep 18, 2025
6847eb0
Moved config template files into repo
jswade-rtx Sep 19, 2025
ce6df61
Update cold_start forcing sources
jswade-rtx Sep 22, 2025
d79c6f8
1) Merged the download data scripts for both sfincs and schism, 2) up…
Sep 23, 2025
32c6e48
Updated the domain yaml files for schism.
Sep 24, 2025
36d8bfa
fixed import of esmf_creation and forcings_extraction
kyle-larkin Sep 23, 2025
d5ef0f4
fixed logic around ensemble parameter
kyle-larkin Sep 26, 2025
5baae82
Adding __init__.py to NextGen_Forcings_Engine_BMI
kyle-larkin Sep 26, 2025
a58188c
updated cicd file to avoid unecessary docker pull and docker push com…
miguelp1986 Sep 29, 2025
5869afe
updated cicd file
miguelp1986 Sep 29, 2025
1e496c4
Merge pull request #18 from NGWPC/pena-update-cicd
miguelp1986 Sep 29, 2025
612356e
Updated data_downloader to skip tpxo downloading.
Sep 29, 2025
3cd070e
Ngwpc 7425 add scm config and NGWPC 7892 use SFINCS config (#16)
zhengtaocui Sep 30, 2025
5428e79
Merge branch 'development' into Sfincs-Forcing-Mohammed
mkarim-rtx Sep 30, 2025
c9cdff3
removed Testing from directory tree
mkarim-rtx Oct 1, 2025
e91cf39
put back Testing directory
mkarim-rtx Oct 1, 2025
04d5daa
Merge branch 'NWGPC_9695_9692_zcui' into Sfincs-Forcing-Mohammed
mkarim-rtx Oct 1, 2025
404e915
removed Testing directory
mkarim-rtx Oct 1, 2025
3075c79
removed coastalforcing/domain_lists/schism/all.yaml.
Oct 1, 2025
307ba42
added missed file
mkarim-rtx Oct 1, 2025
b41fa3b
Merge branch 'Sfincs-Forcing-Mohammed' of github.com:NGWPC/ngen-forci…
mkarim-rtx Oct 1, 2025
3e5d391
Update SCHISM domain config and folders.
Oct 1, 2025
51f31cf
Merge pull request #19 from NGWPC/Sfincs-Forcing-Mohammed
zhengtaocui Oct 1, 2025
a081539
Cleaned up directory coastal/calib.
Oct 1, 2025
25685da
updated forcing_extraction logic for ana runs
kyle-larkin Oct 2, 2025
5d584ac
Updated the path for coastal parameters and the singularity container…
Oct 3, 2025
40593a1
Fix dockerfile to set Pythonpath
peterkronenberg-rtx Sep 28, 2025
4b790d9
updates to ana time handling logic in forcing_extraction.py
kyle-larkin Oct 6, 2025
c46884b
Update forcing engine config templates with root_dir
jswade-rtx Oct 6, 2025
e6c36c3
Update forcing template files for new root
jswade-rtx Oct 8, 2025
9015aaf
Creates InputForcingDirectories if they don't already exist. minor sy…
kyle-larkin Oct 8, 2025
79c47f6
removed problematic debugging
kyle-larkin Oct 8, 2025
fe80988
Merge pull request #20 from NGWPC/cleanup_coastal_calib
zhengtaocui Oct 8, 2025
71a6fa2
updated SFINCS README and created Dockerfile.sfincs
miguelp1986 Oct 2, 2025
56ff110
comment changes to Dockerfile.sfincs
miguelp1986 Oct 3, 2025
d13f1bf
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
3f77c5f
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
3d58a19
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
c385f3d
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
df84670
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
404aa11
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
b6d515d
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
993d819
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
0f3e7c3
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
49ce184
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
5b236f3
added SFINCS build to CICD pipeline
miguelp1986 Oct 8, 2025
337fbf4
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
35d804e
cicd file
miguelp1986 Oct 8, 2025
7cdcf8e
updated cicd file
miguelp1986 Oct 8, 2025
cd748bd
fixing syntax
kyle-larkin Oct 8, 2025
091d122
more path creation
kyle-larkin Oct 8, 2025
1b95eb9
Merge pull request #21 from NGWPC/pena-sfincs
miguelp1986 Oct 8, 2025
68f9863
added sfincs to deploy and release steps in cicd file
miguelp1986 Oct 8, 2025
eac022e
Merge pull request #22 from NGWPC/pena-sfincs
miguelp1986 Oct 8, 2025
620865e
replaced problematic err_handling with simple print statements for now
kyle-larkin Oct 9, 2025
de2e699
Changed the unstructed mesh output to use elements for RAINRATE and n…
zhengtaocui Oct 9, 2025
7656b4f
Added esmf_mesh directory creation if folder does not exist
jswade-rtx Oct 9, 2025
434a1ac
added sfincs forcing time series creation scripts
mkarim-rtx Aug 27, 2025
c416445
added usescases and glofs
mkarim-rtx Sep 2, 2025
02ec38d
fixing matep issue
mkarim-rtx Sep 2, 2025
86db6fa
mateo update
mkarim-rtx Sep 2, 2025
9caf6e8
mateo processing
mkarim-rtx Sep 3, 2025
7238fe3
interploting 600 sec
mkarim-rtx Sep 3, 2025
6e5c163
update on getting noaa output
mkarim-rtx Sep 4, 2025
26800e6
comparing outputs
mkarim-rtx Sep 4, 2025
788fdb7
combining all together
mkarim-rtx Sep 6, 2025
dfd5ca1
update
mkarim-rtx Sep 14, 2025
6a0cf9a
update
mkarim-rtx Sep 14, 2025
94c3d46
removed mistakenly added files
mkarim-rtx Sep 16, 2025
4f09df2
removed mistakenly added files
mkarim-rtx Sep 16, 2025
3ed7923
updated cicd file to avoid unecessary docker pull and docker push com…
miguelp1986 Sep 29, 2025
572bd6c
updated cicd file
miguelp1986 Sep 29, 2025
f50b708
Ngwpc 7425 add scm config and NGWPC 7892 use SFINCS config (#16)
zhengtaocui Sep 30, 2025
393b923
removed Testing from directory tree
mkarim-rtx Oct 1, 2025
58696fa
put back Testing directory
mkarim-rtx Oct 1, 2025
b2e1d59
1) Merged the download data scripts for both sfincs and schism, 2) up…
Sep 23, 2025
fc17ad6
Updated the domain yaml files for schism.
Sep 24, 2025
39ba2e5
Updated data_downloader to skip tpxo downloading.
Sep 29, 2025
f7e41e7
removed Testing directory
mkarim-rtx Oct 1, 2025
71edbc4
added missed file
mkarim-rtx Oct 1, 2025
cfb22a6
removed coastalforcing/domain_lists/schism/all.yaml.
Oct 1, 2025
15dda44
Update SCHISM domain config and folders.
Oct 1, 2025
95d501d
Cleaned up directory coastal/calib.
Oct 1, 2025
e04a58e
Updated the path for coastal parameters and the singularity container…
Oct 3, 2025
f7bfbec
updated SFINCS README and created Dockerfile.sfincs
miguelp1986 Oct 2, 2025
c401cee
comment changes to Dockerfile.sfincs
miguelp1986 Oct 3, 2025
421501b
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
18913fe
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
f880815
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
e1edbc5
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
e2cba7a
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
bf4bd5a
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
d5c4d00
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
0659db5
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
f6a7772
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
973f622
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
38bb04a
added SFINCS build to CICD pipeline
miguelp1986 Oct 8, 2025
8b6e38c
updated Dockerfile.sfincs
miguelp1986 Oct 8, 2025
d8ca49d
cicd file
miguelp1986 Oct 8, 2025
050f69d
updated cicd file
miguelp1986 Oct 8, 2025
6b3a781
removing problematic unicode character from print statement
kyle-larkin Oct 15, 2025
f89c83e
fixed dockerfile for standalone mode, added check for historical forc…
kyle-larkin Oct 15, 2025
6d641d6
adding aorc and nwm config files to repo
kyle-larkin Oct 15, 2025
c23f443
Merge branch 'development' into forecast_validation_root_dir
kyle-larkin Oct 15, 2025
8cdb490
Merge pull request #25 from NGWPC/forecast_validation_root_dir
kyle-larkin Oct 15, 2025
1920a68
Update regird.py to use exception instead of using one processor on r…
zhengtaocui Oct 15, 2025
649d277
Merge pull request #23 from NGWPC/feature/NGWPC_7354_Node_ELE_Fix
PhilMiller Oct 15, 2025
9fd7a63
fixing logic for supplemental radar forcing_extraction time handling
kyle-larkin Oct 16, 2025
b1a58a7
Prevent re-running the model when update_until's future_time is equal…
idtodd Oct 17, 2025
adedf48
Merge pull request #26 from NGWPC/forecast_validation_root_dir
kyle-larkin Oct 20, 2025
d6715ee
Merge pull request #27 from NGWPC/idt-prevent-rerunning-model-on-same…
kyle-larkin Oct 21, 2025
3a4295a
fixed forcing extraction for ana time handling again
kyle-larkin Oct 27, 2025
5d9bf0a
Add hour to supplemental pcp AnA extraction
jswade-rtx Oct 28, 2025
b0f5b51
Move supp pcp time handling to downloader
jswade-rtx Oct 28, 2025
52476af
Add placeholder for supp pcp time handling
jswade-rtx Oct 28, 2025
8db6db8
more ana time handling work
kyle-larkin Oct 31, 2025
3bddcf5
missed some changes, cleaning up push
kyle-larkin Oct 31, 2025
fda145f
Merge pull request #29 from NGWPC/klarkin_ana_times
kyle-larkin Nov 4, 2025
7e92692
Update aorc and nwm paths
jswade-rtx Nov 12, 2025
6768e61
Merge pull request #32 from NGWPC/jwade_update_historical_templates
jswade-rtx Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
444 changes: 444 additions & 0 deletions .github/workflows/cicd.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ dist/

venv
.venv
.idea

/git_info.json
117 changes: 117 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# GitLab CI/CD configuration file for ngen-forcing repository
include:
- template: Jobs/Container-Scanning.gitlab-ci.yml

stages:
- build
- unit_test
- sonarqube
- test
- deploy

image: registry.sh.nextgenwaterprediction.com/infrastructure/docker/docker:latest

variables:
DOCKER_IMAGE_NAME_BMI_FORCING: $CI_REGISTRY_IMAGE/ngen-bmi-forcing
DOCKER_IMAGE_NAME_LUMPED_FORCING: $CI_REGISTRY_IMAGE/ngen-lumped-forcing
DOCKER_IMAGE_NAME_COASTAL: $CI_REGISTRY_IMAGE/ngen-coastal
DOCKER_IMAGE_TAG: $CI_COMMIT_REF_NAME

build:
stage: build
script:
- echo "Logging in to Gitlab Container Registry..."
- echo $CI_JOB_TOKEN | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- echo "Building ${CI_PROJECT_NAME} docker images.. "
- docker build --file=Dockerfile.bmi-forcings --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --tag "$DOCKER_IMAGE_NAME_BMI_FORCING:$DOCKER_IMAGE_TAG" .
- docker push $DOCKER_IMAGE_NAME_BMI_FORCING:$DOCKER_IMAGE_TAG
- docker build --file=Dockerfile.lumped-forcings --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --tag "$DOCKER_IMAGE_NAME_LUMPED_FORCING:$DOCKER_IMAGE_TAG" .
- docker push $DOCKER_IMAGE_NAME_LUMPED_FORCING:$DOCKER_IMAGE_TAG
- docker build --secret id=GITLAB_TOKEN,env=GITLAB_TOKEN --file=Dockerfile.ngencoastal --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --tag "$DOCKER_IMAGE_NAME_COASTAL:$DOCKER_IMAGE_TAG" .
- docker push $DOCKER_IMAGE_NAME_COASTAL:$DOCKER_IMAGE_TAG
- docker logout

unit-test-bmi:
stage: unit_test
image: $DOCKER_IMAGE_NAME_BMI_FORCING:$DOCKER_IMAGE_TAG
script:
# TODO add unit tests when available
- echo "Running BMI Forcing Unit Tests..."

unit-test-lumped:
stage: unit_test
image: $DOCKER_IMAGE_NAME_LUMPED_FORCING:$DOCKER_IMAGE_TAG
script:
# TODO add unit tests when available
- echo "Running Lumped Forcing Unit Tests..."

unit-test-coastal:
stage: unit_test
image: $DOCKER_IMAGE_NAME_COASTAL:$DOCKER_IMAGE_TAG
script:
# TODO add unit tests when available
- echo "Running Coastal Unit Tests..."

sonarqube:
stage: sonarqube
image:
name: registry.sh.nextgenwaterprediction.com/infrastructure/sonar-scanner-cli/sonar-scanner-cli:5.0.1
entrypoint: [""]
variables:
# Defines the location of the analysis task cache
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar"
# Shallow cloning needs to be disabled.
# See https://docs.sonarqube.org/latest/analysis/gitlab-cicd/.
GIT_DEPTH: 0
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner -X -Dsonar.verbose=true
allow_failure: true # FIXME

container_scanning:
stage: test
needs:
- build
variables:
SECURE_LOG_LEVEL: info
CS_SEVERITY_THRESHOLD: UNKNOWN
CS_IMAGE: $DOCKER_IMAGE_NAME_BMI_FORCING:$DOCKER_IMAGE_TAG

container_scanning_2:
extends: container_scanning
stage: test
needs:
- build
variables:
SECURE_LOG_LEVEL: info
CS_SEVERITY_THRESHOLD: UNKNOWN
CS_IMAGE: $DOCKER_IMAGE_NAME_LUMPED_FORCING:$DOCKER_IMAGE_TAG

container_scanning_3:
extends: container_scanning
stage: test
needs:
- build
variables:
SECURE_LOG_LEVEL: info
CS_SEVERITY_THRESHOLD: UNKNOWN
CS_IMAGE: $DOCKER_IMAGE_NAME_COASTAL:$DOCKER_IMAGE_TAG

deploy:
stage: deploy
script:
- echo "Logging in to Gitlab Container Registry to push the image..."
- echo $CI_JOB_TOKEN | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- echo "Pushing to the docker registry"
- docker tag $DOCKER_IMAGE_NAME_BMI_FORCING:$DOCKER_IMAGE_TAG $DOCKER_IMAGE_NAME_BMI_FORCING:latest
- docker push $DOCKER_IMAGE_NAME_BMI_FORCING:latest
- docker tag $DOCKER_IMAGE_NAME_LUMPED_FORCING:$DOCKER_IMAGE_TAG $DOCKER_IMAGE_NAME_LUMPED_FORCING:latest
- docker push $DOCKER_IMAGE_NAME_LUMPED_FORCING:latest
- docker tag $DOCKER_IMAGE_NAME_COASTAL:$DOCKER_IMAGE_TAG $DOCKER_IMAGE_NAME_COASTAL:latest
- docker push $DOCKER_IMAGE_NAME_COASTAL:latest
- docker logout
rules:
- if: '$CI_COMMIT_BRANCH == "development"'
63 changes: 63 additions & 0 deletions DOCKER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# How to use ngen-forcing Docker containers

The Dockerfiles within this project will allow you to run the scripts from the ngen-forcing repository. There are 2 Docker container images that can be built:
1. NextGen_Forcings_Engine_BMI
1. NextGen_Lumped_Forcings_Driver

## Requirements

To build and run these containers, you will need the following software installed and running on your system:
- Docker Engine

## Building NextGen_Forcings_Engine_BMI

To build the NextGen_Forcings_Engine_BMI container, execute the following command:
```
docker build --file=Dockerfile.bmi-forcings --tag=ngen-bmi-forcing .
```

## Building NextGen_Lumped_Forcings_Driver

To build the NextGen_Lumped_Forcings_Driver container, execute the following command:
```
docker build --file=Dockerfile.lumped-forcings --tag=ngen-lumped-forcing .
```

## Running NextGen_Forcings_Engine_BMI

To run the NextGen_Forcings_Engine_BMI container, execute the following command:
```
docker run -it ngen-bmi-forcing
```
This will drop you to a bash prompt inside the container.

You will next need to activate the required conda environment:
```
conda activate /ngen-app/conda
```
All the ngen-forcing scripts are located at `/ngen-app/ngen-forcing/`.


## Running NextGen_Lumped_Forcings_Driver

To run the NextGen_Lumped_Forcings_Driver container, execute the following command:
```
docker run -it ngen-lumped-forcing
```
This will drop you to a bash prompt inside the container.

You will next need to activate the required conda environment:
```
conda activate /ngen-app/conda
```
All the ngen-forcing scripts are located at `/ngen-app/ngen-forcing/`.

## Troubleshooting

Troubleshooting information and procedures will be added as we further improve these containers.

## Future Improvements

- Make sure conda environments are activating automatically and don't have to be activated as a separate step
- Add entrypoint scripts that make it easier to execute these scripts
- Replace specialized fork of ExactExtract python package with official release
190 changes: 190 additions & 0 deletions Dockerfile.bmi-forcings
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
## TODO: replace with base image created under NGWPC-3223 ##
## see: https://jira.nextgenwaterprediction.com/browse/NGWPC-3223
FROM rockylinux:8

# ensure local python is preferred over distribution python
ENV PATH="/usr/local/bin:$PATH"

# cannot remove LANG even though https://bugs.python.org/issue19846 is fixed
# last attempted removal of LANG broke many users:
# https://github.com/docker-library/python/pull/570
ENV LANG="C.UTF-8"

## FIXME: Replace installation and build of FOSS dependencies wiith a base image. ##

# runtime dependencies
RUN set -eux; \
dnf install -y dnf-plugins-core; \
dnf install -y epel-release; \
dnf config-manager --set-enabled powertools; \
dnf install -y \
proj proj-devel \
sqlite sqlite-devel \
autoconf \
automake \
bzip2 bzip2-devel \
cmake \
curl curl-devel \
file \
findutils \
git \
jq \
## FIXME: replace GNU compilers with Intel compiler ##
gcc-toolset-10 \
gcc-toolset-10-libasan-devel \
gcc-toolset-10-gcc-gfortran \
jasper-libs jasper-devel \
libaec libaec-devel \
libasan6 \
libffi libffi-devel \
libpng libpng-devel \
m4 \
## FIXME: replace openmpi with Intel MPI libraries ##
openmpi openmpi-devel \
openssl openssl-devel \
python3.11 \
python3.11-devel \
python3.11-pip \
python3.11-pyyaml \
rsync \
uuid uuid-devel \
which \
zlib zlib-devel \
hdf5-devel \
netcdf-devel \
netcdf-fortran-devel \
; \
dnf clean all

## FIXME: replace GNU compilers with Intel compiler ##
SHELL [ "/usr/bin/scl", "enable", "gcc-toolset-10"]
## FIXME: replace openmpi with Intel MPI libraries ##
ENV PATH="${PATH}:/usr/lib64/openmpi/bin/"

RUN set -eux; \
curl --location --output wgrib2.tgz "https://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz" ; \
mkdir --parents /usr/src/wgrib2 ; \
tar --extract --directory /usr/src/wgrib2 --strip-components=1 --file wgrib2.tgz ; \
rm wgrib2.tgz ; \
cd /usr/src/wgrib2 ; \
export CC=gcc ; \
export FC=gfortran ; \
make \
USE_IPOLATES=3 \
USE_PNG=1 \
USE_AEC=0 \
USE_JASPER=1 \
USE_OPENJPEG=0 \
USE_G2CLIB=0 \
PREFIX=/usr/local ; \
make lib ; \
cp /usr/src/wgrib2/wgrib2/wgrib2 /usr/local/bin/ ; \
chmod +x /usr/local/bin/wgrib2 ; \
rm --recursive --force /usr/src/wgrib2

# Build and install ESMF 8.8.0
RUN set -eux; \
curl --location --output esmf-8.8.0.tar.gz "https://github.com/esmf-org/esmf/archive/refs/tags/v8.8.0.tar.gz"; \
tar --extract --gzip --file esmf-8.8.0.tar.gz; \
rm esmf-8.8.0.tar.gz; \
cd esmf-8.8.0; \
export ESMF_DIR=/esmf-8.8.0; \
export ESMF_INSTALL_PREFIX=/usr/local/esmf; \
export ESMF_COMPILER=gfortran; \
export ESMF_COMM=openmpi; \
export ESMF_NETCDF="nc-config"; \
export ESMF_F90COMPILEPATHS="-I/usr/lib64/gfortran/modules"; \
export ESMF_BOPT=O; \
make all; \
make install; \
cd ..; \
rm -rf esmf-8.8.0

# Build GDAL from source
RUN --mount=type=cache,target=/root/.cache/gdal,id=gdal-build \
set -eux && \
curl --location --output gdal.tar.gz https://github.com/OSGeo/gdal/releases/download/v3.7.3/gdal-3.7.3.tar.gz && \
mkdir --parents /usr/src/gdal && \
tar --extract --directory /usr/src/gdal --strip-components=1 --file gdal.tar.gz && \
cd /usr/src/gdal && \
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && \
cmake --build build --parallel "$(nproc)" && \
cmake --build build --target install && \
ldconfig && \
rm --recursive --force /usr/src/gdal gdal.tar.gz

# -------------------------------
# Create a self-contained venv for ngen-forcing
# -------------------------------
ENV VIRTUAL_ENV="/ngen-app/ngen-python"
RUN python3.11 -m venv ${VIRTUAL_ENV}
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}" \
PYTHONPATH="${VIRTUAL_ENV}/lib/python3.11/site-packages"

# Install ESMPy
ENV ESMFMKFILE=/usr/local/esmf/lib/libO/Linux.gfortran.64.openmpi.default/esmf.mk
RUN set -eux; \
pip3.11 install setuptools-git-versioning; \
git clone --depth 1 --branch v8.8.0 https://github.com/esmf-org/esmf.git; \
cd esmf/src/addon/esmpy; \
python3.11 -m pip install .; \
cd /; \
rm -rf esmf


ENV PATH="/usr/local/bin:${PATH}"

ENV WGRIB2=/usr/local/bin/wgrib2

# Fix OpenMPI transport for containers
ENV OMPI_MCA_btl_vader_single_copy_mechanism=none
ENV OMPI_MCA_btl=^openib,ofi
ENV OMPI_MCA_pml=ob1
ENV OMPI_MCA_btl_base_warn_component_unused=0

################################################

# Reset SHELL so we're not locked into the gcc-10 build environment
SHELL ["/bin/bash", "-c"]

COPY ./docker/run-ngen-forcing.sh /ngen-app/bin/
RUN set -eux; \
\
chmod +x /ngen-app/bin/run-ngen-forcing.sh

COPY . /ngen-app/ngen-forcing/

# Install ngen-forcing as a Python package
WORKDIR /ngen-app/ngen-forcing
RUN set -eux; \
pip install --upgrade pip setuptools wheel; \
pip install --no-cache-dir mpi4py .

ARG CI_COMMIT_REF_NAME

RUN set -eux; \
# Get the remote URL from Git configuration
repo_url=$(git config --get remote.origin.url); \
# Extract the repo name (everything after the last slash) and remove any trailing .git
key=${repo_url##*/}; \
key=${key%.git}; \
# ngen-forcing is different from the other repos. We don't use the repo name directly
GIT_INFO_PATH="/ngen-app/ngen-bmi-forcing_git_info.json"; \
# Determine branch name: use CI_COMMIT_REF_NAME if set; otherwise, use git's current branch
branch=$( [ -n "${CI_COMMIT_REF_NAME:-}" ] && echo "${CI_COMMIT_REF_NAME}" || git rev-parse --abbrev-ref HEAD ); \
jq -n \
--arg commit_hash "$(git rev-parse HEAD)" \
--arg branch "$branch" \
--arg tags "$(git tag --points-at HEAD | tr '\n' ' ')" \
--arg author "$(git log -1 --pretty=format:'%an')" \
--arg commit_date "$(date -u -d @$(git log -1 --pretty=format:'%ct') +'%Y-%m-%d %H:%M:%S UTC')" \
--arg message "$(git log -1 --pretty=format:'%s' | tr '\n' ';')" \
--arg build_date "$(date -u +'%Y-%m-%d %H:%M:%S UTC')" \
"{\"ngen-bmi-forcing\": {commit_hash: \$commit_hash, branch: \$branch, tags: \$tags, author: \$author, commit_date: \$commit_date, message: \$message, build_date: \$build_date}}" \
> $GIT_INFO_PATH

WORKDIR /

ENV LD_LIBRARY_PATH="/usr/lib64/openmpi/lib/"

ENTRYPOINT [ "/bin/bash" ]
Loading