-
Notifications
You must be signed in to change notification settings - Fork 11
Reconciling ngwpc-3.1.2.3.0 PR Work, NWMv3.1 Updates for Short & Medium Range Configurations #30
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
Draft
jduckerOWP
wants to merge
719
commits into
NOAA-OWP:master
Choose a base branch
from
jduckerOWP:ngwpc-3.1.2.3.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 250 commits
Commits
Show all changes
719 commits
Select commit
Hold shift + click to select a range
e2cba7a
updated Dockerfile.sfincs
miguelp1986 bf4bd5a
updated Dockerfile.sfincs
miguelp1986 d5c4d00
updated Dockerfile.sfincs
miguelp1986 0659db5
updated Dockerfile.sfincs
miguelp1986 f6a7772
updated Dockerfile.sfincs
miguelp1986 973f622
updated Dockerfile.sfincs
miguelp1986 38bb04a
added SFINCS build to CICD pipeline
miguelp1986 8b6e38c
updated Dockerfile.sfincs
miguelp1986 d8ca49d
cicd file
miguelp1986 050f69d
updated cicd file
miguelp1986 6b3a781
removing problematic unicode character from print statement
kyle-larkin f89c83e
fixed dockerfile for standalone mode, added check for historical forc…
kyle-larkin 6d641d6
adding aorc and nwm config files to repo
kyle-larkin c23f443
Merge branch 'development' into forecast_validation_root_dir
kyle-larkin 8cdb490
Merge pull request #25 from NGWPC/forecast_validation_root_dir
kyle-larkin 1920a68
Update regird.py to use exception instead of using one processor on r…
zhengtaocui 649d277
Merge pull request #23 from NGWPC/feature/NGWPC_7354_Node_ELE_Fix
PhilMiller 9fd7a63
fixing logic for supplemental radar forcing_extraction time handling
kyle-larkin b1a58a7
Prevent re-running the model when update_until's future_time is equal…
idtodd adedf48
Merge pull request #26 from NGWPC/forecast_validation_root_dir
kyle-larkin d6715ee
Merge pull request #27 from NGWPC/idt-prevent-rerunning-model-on-same…
kyle-larkin 3a4295a
fixed forcing extraction for ana time handling again
kyle-larkin 5d9bf0a
Add hour to supplemental pcp AnA extraction
jswade-rtx b0f5b51
Move supp pcp time handling to downloader
jswade-rtx 52476af
Add placeholder for supp pcp time handling
jswade-rtx 8db6db8
more ana time handling work
kyle-larkin 3bddcf5
missed some changes, cleaning up push
kyle-larkin fda145f
Merge pull request #29 from NGWPC/klarkin_ana_times
kyle-larkin ebfcace
1) fixed the PRVI NWM retrospective forcing files that have wrong val…
zhengtaocui 11cb727
added netcdf4
mkarim-rtx fdcd148
updated Dockerfile sfincs
miguelp1986 9e3cc90
added two dockerfiles for hydromt_sfincs and delft dashboard respecti…
zhengtaocui 7e92692
Update aorc and nwm paths
jswade-rtx 6768e61
Merge pull request #32 from NGWPC/jwade_update_historical_templates
jswade-rtx d95ad16
Initial logger updates
cmaynard-ngwpc 5e9c3fb
Use named logger
cmaynard-ngwpc cce3873
Update err_hanlder.py to try ewts logger first
cmaynard-ngwpc c9680f3
Fix log entry formatting error.
cmaynard-ngwpc 2f49350
Convert more print to log entries
cmaynard-ngwpc 45ad82f
Set info level msgs to debug where appropriate
cmaynard-ngwpc 0ce663b
Remove duplicate LOC
cmaynard-ngwpc de42754
Clean up formatting in LOG statements
cmaynard-ngwpc 24a9ac0
fixed long_range config file DownscalingParamDirs
kyle-larkin fc6bda0
Merge pull request #33 from NGWPC/config_template_fix
kyle-larkin 817903c
Try to address EBUSY failures in some runs
PhilMiller d2aa908
Add import shapely prior to each import ESMF and import esmpy to avoi…
mxkpp 1918622
Upgrade shapely from 1.x to 2.1.x. Remove version pins for fiona and…
mxkpp 07305b8
Python dependencies: Adjust shapely patch version. Pin minor version …
mxkpp 46ec751
Revert netCDF4 version pin to ~=1.6.3
mxkpp 7bfe260
Pin netCDF4 to exactly 1.6.3
mxkpp 4b7e2e4
Add some detail to comment on ESMF + shapely 2 interaction
mxkpp bbf5f8b
Merge pull request #35 from NGWPC/maxkipp-ngwpc-8941-upgrade-shapely-2
mxkpp 1c94346
Garbage collect objects deleted in finalize
idtodd 92a633c
fixes a few config_templates misconfigurations
kyle-larkin e93b6d3
Merge pull request #36 from NGWPC/config_template_fixes
kyle-larkin 27bcf34
Merge pull request #37 from NGWPC/development
cmaynard-ngwpc 56fbbba
Merge pull request #38 from NGWPC/ngwpc-candidate
cmaynard-ngwpc 8c00cd6
Add ngwpc-candidate and ngwpc-release branches to CI/CD workflow
cnealen f0e826d
complete fixes for aorc processing efficiency
kyle-larkin 7cfebae
Ignore NFS mount files in cleanup
idtodd 0300ae2
Download to temp file to avoid race conditions
peterkronenberg-rtx 5b503c9
Merge pull request #34 from NGWPC/philmiller-ebusy-failure
idtodd 2dfbaef
Merge pull request #41 from NGWPC/klarkin_aorc_performance
kyle-larkin 7035d9d
correctly assigns unique name to weights files, sets some log message…
kyle-larkin 8e0ada0
Merge pull request #43 from NGWPC/klarkin_weights_file_hash
kyle-larkin 550e5be
Remove diagnostics
peterkronenberg-rtx 7467c47
updated SFINCS readme
miguelp1986 552b82b
Merge pull request #24 from NGWPC/sfincs_dockerfile_fix_mohammed
miguelp1986 3552421
1) Updated the download script and the data processing scripts such t…
zhengtaocui c7913f6
adds simple hash generation to uniqueify output file
kyle-larkin f491612
Merge pull request #46 from NGWPC/klarkin_output_hash_code
kyle-larkin 0ec452c
Merge pull request #39 from NGWPC/feature/edit-cicd-workflow
miguelp1986 f8a58ae
fixes a potential race condition
kyle-larkin 1a05782
Update time_key format in bmi_model.py
kyle-larkin fdc841b
Merge pull request #47 from NGWPC/klarkin_output_hash_code
kyle-larkin dec5190
BMI model: fix override of output path
mxkpp 62f9470
Fix one log message
mxkpp 40bbb6c
changing default output file behavior; cleaning up an errant warning …
kyle-larkin 8fe1c26
writes esmf mesh files to temp file before publishing to final location
kyle-larkin e20347b
Update NextGen_hyfab_to_ESMF_Mesh.py
kyle-larkin b917915
Merge pull request #49 from NGWPC/klarkin_output_file_bugs
kyle-larkin 02e47e6
Merge pull request #48 from NGWPC/bmi-model-output-path-override
mxkpp 9b95122
implement formatting
mdeshotel 00252ae
Update hydrofabric forcing to support ngen catchment partitioning (mu…
mxkpp ac5124f
Update standalone forcing script to reflect changes to handling of hy…
mxkpp decc806
Avoid changing type for CAT-ID array
mxkpp 3419920
Merge pull request #50 from NGWPC/maxkipp-catchment-partitions
mxkpp bc88346
Revert inadvertent log calls
mxkpp 024135a
Merge pull request #52 from NGWPC/maxkipp-revert-log-calls
mxkpp 5f50fd6
absolute imports for model.py
mdeshotel c450902
keep full simulation time range of data in memory
mdeshotel d983a09
add nwm_url
mdeshotel d01d9b8
rename read_config to validate_config
mdeshotel 03fc5a8
parse domain name once
mdeshotel a74142c
add ZARR to file types
mdeshotel e18bc8c
break define_product into multiple properties
mdeshotel 82944a2
break methods into combinations of properties and methods
mdeshotel 8f831d5
remove datetime formatting
mdeshotel c5c7dda
formatting
mdeshotel 3718535
remove import
mdeshotel f8e325f
rename args and classes
mdeshotel 81a775a
type hints
mdeshotel 2d92255
absolute imports
mdeshotel 18112c7
type hints
mdeshotel 8e44c07
import error handlers directly
mdeshotel c346c1d
remove properties from init
mdeshotel 3844aa5
strip whitespace/newlines from end of log msg (python logger automati…
cmaynard-ngwpc 3ccbba9
rearranged try block for far fewer cache open calls
kyle-larkin b280a8f
Disable cache loading by commenting out function
kyle-larkin f782ceb
Merge pull request #53 from NGWPC/klarkin_aorc_cache_efficiency
kyle-larkin 365198f
Add ewts package and unit tests. New performance log level
cmaynard-ngwpc ce165a1
Use ewts pacakge
cmaynard-ngwpc 4beb4eb
Update Dockerfile for ewts package
cmaynard-ngwpc 26d48a7
MpiConfig: add random ID string shared by all MPI ranks
mxkpp 28057bc
Refactor construction of name of regridding weight file
mxkpp 549d5f8
Refactor loading of weight files
mxkpp 7119c03
Refactor writing of weight files
mxkpp 3950194
Refactor execution of regrid objects
mxkpp 67bce0f
Weights: add random string to file name (unique per realization). Ref…
mxkpp 3e6cdd5
Fix message and docstring
mxkpp 850a9f3
Type hints, formatting, style
mxkpp 97728fd
Switch to entropy-based RNG instead of clock-based
mxkpp 5cf03dd
Improve placement of program status checks, improve cache file deletion
mxkpp d2a143c
Merge pull request #55 from NGWPC/maxkipp_weights_io
mxkpp fad84db
add data loaders for historical forcings
mdeshotel d0ce0e6
Merge remote-tracking branch 'origin/development' into mdeshotel_NGWP…
mdeshotel 7dfa6ba
fix merge conflict issues
mdeshotel baa41db
Merge pull request #30 from NGWPC/fix_PRVI_Retrospecive_forcing_error…
zhengtaocui eb1b74e
Merge pull request #31 from NGWPC/add_hydromt_sfincs_and_delft_dashbo…
zhengtaocui 3122e6b
Add full MPI barrier to error handler. Improve flexibility and robust…
mxkpp 0aa5d7d
Add optional QoL msg arg to log functions
mxkpp 816f788
Add MPI-aware retry decorator
mxkpp 1f89152
Retry decorator: add type checks
mxkpp bf61e36
Retry decorator: invert first arg from reraise to abort. Add more ret…
mxkpp 8ed15a9
regrid.py: switch direct ESMF function calls to use new retry-decorat…
mxkpp e3ae298
check crs is written to dataset
mdeshotel c78f98f
import NWMv3_Forcing_Engine_BMI_model
mdeshotel 6af0bc1
Add retry-decorated function for calls to input_forcing.regribObj and…
mxkpp 5b7e2d5
regrid.py: switch calls to regridObj() and regridObj_elem() to use ne…
mxkpp 151eb46
extend time slice by 1 fcst_freq
mdeshotel 9fdae8c
remove lumped forcing from build
miguelp1986 319737c
Merge pull request #58 from NGWPC/pena-remove-lumped
miguelp1986 1159e7b
fix procs=>1
mdeshotel 028c438
Use os env var "WAIT_FOR_DEBUGPY" for multiprocessor debug clients
mxkpp 31e67b4
Use anon s3 connection for public NWM data
mxkpp f14c77a
Merge pull request #59 from NGWPC/development
cmaynard-ngwpc 3c64706
fix renaming of cycleFreq
mdeshotel 5d93f07
split run into discrete functions and add timing
mdeshotel 622d0af
add listener for debug environment variable for MPI
mdeshotel b78cacc
fix renaming of cycleFreq
mdeshotel 3851ea0
add timing blocks for debugging
mdeshotel 893f38b
fix the crs reading methods
mdeshotel 766763f
isolate gdf method
mdeshotel 486fcc5
improve MPI data loading strategy
mdeshotel 5bc70ca
Merge branch 'mdeshotel_NGWPC-9178' of github.com:NGWPC/ngen-forcing …
mdeshotel aaa0a9d
Parameterize NWM domain for oCONUS
mxkpp b40673a
Include ewts package in base ngen-forcing installation
mxkpp 4589583
Have rank 0 use the reduced any_error value
mxkpp 37060a9
Use the reduced any_error value
mxkpp 22ef56a
add check_program_status call
mdeshotel a897b50
remove warning call
mdeshotel f69bb28
add caching
mdeshotel 1dca513
set = timing logs to debug
mdeshotel df4d1d6
raise value error when unkown domain is provided
mdeshotel 5bb23c5
Merge branch 'mdeshotel_NGWPC-9178' of github.com:NGWPC/ngen-forcing …
mdeshotel 6748a16
Merge pull request #61 from NGWPC/mpi-rank0-abort-any-error
mxkpp b574602
Reenable err out on dimensionality
mxkpp 7db4a8e
Add retry to check on weights file path existence
mxkpp bb2da53
Fix var name fileType to file_type following refactor
mxkpp 3e45bd1
Fix var name following refactor
mxkpp 63d5491
Merge pull request #56 from NGWPC/mdeshotel_NGWPC-9178
mxkpp 900fd3b
Merge remote-tracking branch 'origin/development' into maxkipp_9391_e…
mxkpp 8acaa44
Merge pull request #57 from NGWPC/maxkipp_9391_esmf_err_handling
mxkpp 07d7cfe
Merge pull request #45 from NGWPC/SFINCS_Hawaii_setup_updates
zhengtaocui ccf756e
Merge pull request #60 from NGWPC/maxkipp-ewts-installation
mxkpp b2acfa4
ana file and time handling logic for Puerto Rico
kyle-larkin 897b4f2
Merge pull request #64 from NGWPC/klarkin_pr_ana
kyle-larkin b6678b1
Remove the data and binary files from the coastal code.
zhengtaocui b94d380
Merge pull request #65 from NGWPC/zcui_remove_uncessary_files
zhengtaocui 27480dd
Fix new properties by adding setters for those that are writeable
mxkpp 71574fa
Merge pull request #66 from NGWPC/maxkipp-add-setters
mxkpp 47be38c
interim solutions for various IO issues - to be rebased and adapted t…
kyle-larkin 00c1b64
more pythonic path constructors
kyle-larkin 7b4769c
retry decorator refactoring, downloading extra GFS timestep for poten…
kyle-larkin d8de88a
Fixed gfs temp file bug by mirroring other processing flows
kyle-larkin 1ba8e7d
Retry decorator: abort directly (avoid the barrier in check_program_s…
mxkpp fafeedb
Updated retry utils, cleaned up some logic and variables
kyle-larkin c5328cd
Updated variable names, removed abort, fixed retry logic
kyle-larkin c7dbaff
fixed variable names
kyle-larkin 98eb1ed
Merge pull request #68 from NGWPC/klarkin_io_and_other_maintenance
kyle-larkin 74362db
Merge pull request #70 from NGWPC/development
cmaynard-ngwpc c27ca75
The NODD AWS Cloud server, https://noaa-nos-ofs-pds.s3.amazonaws.com/…
zhengtaocui b04b4e0
It was assumed that the configuration file, the domain list files and…
zhengtaocui 0d8b863
added absolute domain path
mkarim-rtx 900d294
updated data processing to be in sync with latest version
mkarim-rtx d10ee89
syncing with present directory status and code
mkarim-rtx 33c470e
added Model_tpxo10_atlas
mkarim-rtx 1fafcdc
Update coastal Dockerfile to include wget.
zhengtaocui eda6dfc
The data processor checks for sfincs.nc file when the espg code is no…
zhengtaocui f144def
Merge pull request #73 from NGWPC/FVCOM_download_update
ngwpcareg b9d0cb0
fixed the domain name due to changes in relative path.
zhengtaocui 2597602
updated forcing cicd
miguelp1986 5901820
Merge pull request #77 from NGWPC/pena
miguelp1986 ef30637
updated cicd file
miguelp1986 833eff1
Merge pull request #78 from NGWPC/pena
miguelp1986 4583fdd
Updated the slurm script and the model list yaml file for hawaii.
zhengtaocui 5403713
adds nbm ana supplemental precip functionality for Puerto Rico. fixes…
kyle-larkin 1f4c4ce
cleanup stray diagnostic
kyle-larkin 5d80568
docstrings for download script
kyle-larkin 940749c
Removed should_process code, which had already been disabled/commented
kyle-larkin b638762
Merge pull request #81 from NGWPC/klarkin_pr_ana_nbm_clean
kyle-larkin 2fee363
continuing on FileNotFoundError, else aborting on other OSError
kyle-larkin b48b12b
expands FileNotFound handling to all tmp-file cleanup phases
kyle-larkin 558fbbc
Merge pull request #74 from NGWPC/Update_dataprocessor_for_schism
zhengtaocui 1541db0
added some missing err_handler lines
kyle-larkin 668794b
Merge pull request #85 from NGWPC/klarkin_netcdf_remove_retry
kyle-larkin 58a9870
changing order of supplemental precip for pr_ana
kyle-larkin 7fff49d
Merge pull request #88 from NGWPC/ana_config_hotfix
kyle-larkin 84c3c2b
Merge pull request #95 from NGWPC/ngwpc-candidate
cmaynard-ngwpc 9a0c971
Remove coastal and streamflow scripts and their associated docker fil…
102c1cd
Move ESMF Mesh production scripts, forcing extraction scripts, and th…
213ace9
Update requirments.txt file to include new Python dependencies for Ne…
3a2cfcb
Update ESMF mesh production scripts and forcing extraction scripts to…
3f90f3e
Update environment.yml file to include new Python dependencies for Ne…
d24960d
Update import commands with Python modules to ensure NextGen Forcings…
b343489
Include new project configuration option to allow flexibility for net…
4cf0185
Update CFS bias correction method to enable various domain configurat…
3cebfef
Restructure forcing extraction workflow to include special case of do…
cb6d458
Patch ESMF mesh construction method for peformance over large hydrofa…
0e41b2a
NWMv3.1 Forcing Engine work. This includes upgrades to liquid fractio…
4d08438
Fix syntax bugs in Forcing Engine core repository and fix parquet req…
967ca3f
Revise README.md for improved clarity and detail of new repository st…
jduckerOWP 60a350c
First Iteration of Revising README.md for NextGen Forcings Engine BMI
jduckerOWP fd77e00
Add INSTALL.md for NextGen Forcings Engine setup
jduckerOWP 7a639c2
Revise README.md for improved clarity and details
jduckerOWP 031ca36
Updated README.md file to reflect NGWPC work on AORC data extraction …
jduckerOWP 767511a
Update README.md file to integrate NGWPC work and reconciliation work
jduckerOWP cffd541
Add Geopackage path to sr_config.yml for example usage
jduckerOWP 5dfedb8
Add epoch_start attribute for Time variable to conform with NextGen m…
jduckerOWP e073edc
Patch CONUS RAP AnA forcing file extraction
jduckerOWP d76a491
Remove ESMF mesh creation and forcing extraction in Forcing Engine BM…
jduckerOWP 0dd4e2f
Patch RAP find neighbors forecast hour for ana flag
jduckerOWP 9ef7a1a
Ensure netcdf file creation reflects dimensions for project type
jduckerOWP 335c087
Update Time variable data assignment based on project type
jduckerOWP efd5624
Adjust forcing extraction start time logic for ana_flag to ensure con…
jduckerOWP 890cda3
Restructure Forcing Engine handling of CONUS StageIV Data Fields
jduckerOWP 828bd49
Revert NGWPC Method for Gap Filling Supplementary Precipitation Data
jduckerOWP 9c7c8f6
Fix syntax error in ioMod.py exception handling
jduckerOWP 642a6f9
Update Python version constraint in environment.yml to expand to newe…
jduckerOWP f6be324
Update RAP regridding module to remove new PGRB file dependencies onc…
jduckerOWP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,3 +79,6 @@ dist/ | |
|
|
||
| venv | ||
| .venv | ||
| .idea | ||
|
|
||
| /git_info.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" . | ||
|
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. Where is |
||
| - 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"' | ||
|
christophertubbs marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "iis.configDir": "" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,203 @@ | ||
| ## TODO: replace with base image created under NGWPC-3223 ## | ||
| ## see: https://jira.nextgenwaterprediction.com/browse/NGWPC-3223 | ||
| ARG BASE_IMAGE_NAME="rockylinux:8" | ||
|
|
||
| FROM ${BASE_IMAGE_NAME} | ||
|
|
||
| # OCI Metadata Arguments | ||
| ARG BASE_IMAGE_NAME | ||
| ARG IMAGE_SOURCE="unknown" | ||
| ARG IMAGE_VENDOR="unknown" | ||
| ARG IMAGE_VERSION="unknown" | ||
| ARG IMAGE_REVISION="unknown" | ||
| ARG IMAGE_CREATED="unknown" | ||
|
|
||
| # OCI Standard Labels | ||
| LABEL org.opencontainers.image.base.name="${BASE_IMAGE_NAME}" \ | ||
| org.opencontainers.image.source="${IMAGE_SOURCE}" \ | ||
| org.opencontainers.image.vendor="${IMAGE_VENDOR}" \ | ||
| org.opencontainers.image.version="${IMAGE_VERSION}" \ | ||
| org.opencontainers.image.revision="${IMAGE_REVISION}" \ | ||
| org.opencontainers.image.created="${IMAGE_CREATED}" | ||
|
|
||
| # 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 . | ||
|
|
||
| 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" ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not a valid NOAA OWP image registry