Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
578 commits
Select commit Hold shift + click to select a range
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
ebfcace
1) fixed the PRVI NWM retrospective forcing files that have wrong val…
zhengtaocui Nov 4, 2025
11cb727
added netcdf4
mkarim-rtx Oct 14, 2025
fdcd148
updated Dockerfile sfincs
miguelp1986 Nov 7, 2025
9e3cc90
added two dockerfiles for hydromt_sfincs and delft dashboard respecti…
zhengtaocui Nov 10, 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
d95ad16
Initial logger updates
cmaynard-ngwpc Oct 23, 2025
5e9c3fb
Use named logger
cmaynard-ngwpc Oct 23, 2025
cce3873
Update err_hanlder.py to try ewts logger first
cmaynard-ngwpc Nov 4, 2025
c9680f3
Fix log entry formatting error.
cmaynard-ngwpc Nov 5, 2025
2f49350
Convert more print to log entries
cmaynard-ngwpc Nov 5, 2025
45ad82f
Set info level msgs to debug where appropriate
cmaynard-ngwpc Nov 11, 2025
0ce663b
Remove duplicate LOC
cmaynard-ngwpc Nov 12, 2025
de42754
Clean up formatting in LOG statements
cmaynard-ngwpc Nov 13, 2025
24a9ac0
fixed long_range config file DownscalingParamDirs
kyle-larkin Nov 13, 2025
fc6bda0
Merge pull request #33 from NGWPC/config_template_fix
kyle-larkin Nov 13, 2025
817903c
Try to address EBUSY failures in some runs
PhilMiller Nov 14, 2025
d2aa908
Add import shapely prior to each import ESMF and import esmpy to avoi…
mxkpp Nov 14, 2025
1918622
Upgrade shapely from 1.x to 2.1.x. Remove version pins for fiona and…
mxkpp Nov 14, 2025
07305b8
Python dependencies: Adjust shapely patch version. Pin minor version …
mxkpp Nov 14, 2025
46ec751
Revert netCDF4 version pin to ~=1.6.3
mxkpp Nov 15, 2025
7bfe260
Pin netCDF4 to exactly 1.6.3
mxkpp Nov 16, 2025
4b7e2e4
Add some detail to comment on ESMF + shapely 2 interaction
mxkpp Nov 19, 2025
bbf5f8b
Merge pull request #35 from NGWPC/maxkipp-ngwpc-8941-upgrade-shapely-2
mxkpp Nov 19, 2025
1c94346
Garbage collect objects deleted in finalize
idtodd Nov 19, 2025
92a633c
fixes a few config_templates misconfigurations
kyle-larkin Nov 21, 2025
e93b6d3
Merge pull request #36 from NGWPC/config_template_fixes
kyle-larkin Nov 21, 2025
8c00cd6
Add ngwpc-candidate and ngwpc-release branches to CI/CD workflow
cnealen Dec 5, 2025
f0e826d
complete fixes for aorc processing efficiency
kyle-larkin Dec 8, 2025
7cfebae
Ignore NFS mount files in cleanup
idtodd Dec 9, 2025
0300ae2
Download to temp file to avoid race conditions
peterkronenberg-rtx Dec 2, 2025
5b503c9
Merge pull request #34 from NGWPC/philmiller-ebusy-failure
idtodd Dec 9, 2025
2dfbaef
Merge pull request #41 from NGWPC/klarkin_aorc_performance
kyle-larkin Dec 12, 2025
7035d9d
correctly assigns unique name to weights files, sets some log message…
kyle-larkin Dec 15, 2025
8e0ada0
Merge pull request #43 from NGWPC/klarkin_weights_file_hash
kyle-larkin Dec 15, 2025
550e5be
Remove diagnostics
peterkronenberg-rtx Dec 15, 2025
7467c47
updated SFINCS readme
miguelp1986 Dec 15, 2025
552b82b
Merge pull request #24 from NGWPC/sfincs_dockerfile_fix_mohammed
miguelp1986 Dec 15, 2025
c7913f6
adds simple hash generation to uniqueify output file
kyle-larkin Dec 18, 2025
f491612
Merge pull request #46 from NGWPC/klarkin_output_hash_code
kyle-larkin Dec 18, 2025
0ec452c
Merge pull request #39 from NGWPC/feature/edit-cicd-workflow
miguelp1986 Dec 18, 2025
f8a58ae
fixes a potential race condition
kyle-larkin Dec 18, 2025
1a05782
Update time_key format in bmi_model.py
kyle-larkin Dec 18, 2025
fdc841b
Merge pull request #47 from NGWPC/klarkin_output_hash_code
kyle-larkin Dec 18, 2025
dec5190
BMI model: fix override of output path
mxkpp Dec 18, 2025
62f9470
Fix one log message
mxkpp Dec 18, 2025
40bbb6c
changing default output file behavior; cleaning up an errant warning …
kyle-larkin Dec 22, 2025
8fe1c26
writes esmf mesh files to temp file before publishing to final location
kyle-larkin Dec 23, 2025
e20347b
Update NextGen_hyfab_to_ESMF_Mesh.py
kyle-larkin Dec 23, 2025
b917915
Merge pull request #49 from NGWPC/klarkin_output_file_bugs
kyle-larkin Dec 23, 2025
02e47e6
Merge pull request #48 from NGWPC/bmi-model-output-path-override
mxkpp Dec 23, 2025
00252ae
Update hydrofabric forcing to support ngen catchment partitioning (mu…
mxkpp Jan 2, 2026
ac5124f
Update standalone forcing script to reflect changes to handling of hy…
mxkpp Jan 2, 2026
decc806
Avoid changing type for CAT-ID array
mxkpp Jan 6, 2026
3419920
Merge pull request #50 from NGWPC/maxkipp-catchment-partitions
mxkpp Jan 6, 2026
bc88346
Revert inadvertent log calls
mxkpp Jan 6, 2026
024135a
Merge pull request #52 from NGWPC/maxkipp-revert-log-calls
mxkpp Jan 7, 2026
3844aa5
strip whitespace/newlines from end of log msg (python logger automati…
cmaynard-ngwpc Jan 3, 2026
3ccbba9
rearranged try block for far fewer cache open calls
kyle-larkin Jan 8, 2026
b280a8f
Disable cache loading by commenting out function
kyle-larkin Jan 8, 2026
f782ceb
Merge pull request #53 from NGWPC/klarkin_aorc_cache_efficiency
kyle-larkin Jan 8, 2026
365198f
Add ewts package and unit tests. New performance log level
cmaynard-ngwpc Jan 7, 2026
ce165a1
Use ewts pacakge
cmaynard-ngwpc Jan 7, 2026
4beb4eb
Update Dockerfile for ewts package
cmaynard-ngwpc Jan 8, 2026
26d48a7
MpiConfig: add random ID string shared by all MPI ranks
mxkpp Jan 9, 2026
28057bc
Refactor construction of name of regridding weight file
mxkpp Jan 9, 2026
549d5f8
Refactor loading of weight files
mxkpp Jan 9, 2026
7119c03
Refactor writing of weight files
mxkpp Jan 9, 2026
3950194
Refactor execution of regrid objects
mxkpp Jan 9, 2026
67bce0f
Weights: add random string to file name (unique per realization). Ref…
mxkpp Jan 9, 2026
3e6cdd5
Fix message and docstring
mxkpp Jan 9, 2026
850a9f3
Type hints, formatting, style
mxkpp Jan 9, 2026
97728fd
Switch to entropy-based RNG instead of clock-based
mxkpp Jan 9, 2026
5cf03dd
Improve placement of program status checks, improve cache file deletion
mxkpp Jan 9, 2026
d2a143c
Merge pull request #55 from NGWPC/maxkipp_weights_io
mxkpp Jan 9, 2026
baa41db
Merge pull request #30 from NGWPC/fix_PRVI_Retrospecive_forcing_error…
zhengtaocui Jan 14, 2026
eb1b74e
Merge pull request #31 from NGWPC/add_hydromt_sfincs_and_delft_dashbo…
zhengtaocui Jan 14, 2026
9fdae8c
remove lumped forcing from build
miguelp1986 Jan 16, 2026
319737c
Merge pull request #58 from NGWPC/pena-remove-lumped
miguelp1986 Jan 16, 2026
4589583
Have rank 0 use the reduced any_error value
mxkpp Jan 26, 2026
6748a16
Merge pull request #61 from NGWPC/mpi-rank0-abort-any-error
mxkpp Jan 26, 2026
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
185 changes: 185 additions & 0 deletions Dockerfile.bmi-forcings
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
## 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 . /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 . ./nextgen_forcings_ewts

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
Loading