SalishSeaCast / SalishSeaNowcast

Python package associated with running the SalishSeaCast NEMO and other ocean models in near-real-time to produce daily nowcasts/forecasts
https://salishsea.eos.ubc.ca/nemo/
Apache License 2.0
4 stars 3 forks source link

Add single variable-hour file cropping to crop_gribs worker #195

Closed douglatornell closed 1 year ago

douglatornell commented 1 year ago

Allow the crop_gribs worker to crop a specific forecast variable for a specific forecast hour. This is primarily intended for recovery from crop_gribs stalls when only 1 or a few files need to be cropped to finish processing. The feature is added through the use of optional --var-hour and --var arguments. Test cases for this new functionality are included.

codecov[bot] commented 1 year ago

Codecov Report

Merging #195 (b0e9b38) into main (6f60191) will increase coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
+ Coverage   77.58%   77.65%   +0.06%     
==========================================
  Files         133      133              
  Lines       18601    18655      +54     
  Branches     1967     1969       +2     
==========================================
+ Hits        14432    14486      +54     
  Misses       4111     4111              
  Partials       58       58              
Flag Coverage Δ
unittests 77.65% <100.00%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
nowcast/workers/crop_gribs.py 93.91% <100.00%> (+0.84%) :arrow_up:
tests/workers/test_crop_gribs.py 99.60% <100.00%> (+0.07%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

douglatornell commented 1 year ago

Successfully tested in production on skookum for uncropped PRATE_Sfc hour 001 file in 18aug23 18Z forecast.