Overview
The nci_hres_eccb task of the RNS suite is failing when NCI_HRES_ECCB is set to barra.
This would result in running:
hres_eccb --mask $MASK --file $FILE --start $START --type barra
which raises the following exception:
Traceback (most recent call last):
File "/g/data/vk83/apps/conda/access-ram/2024.12.0/bin/hres_eccb", line 10, in <module>
sys.exit(main())
^^^^^^
File "/g/data/vk83/apps/conda/access-ram/2024.12.0/lib/python3.11/site-packages/replace_landsurface/hres_eccb.py", line 54, in main
replace_landsurface_with_BARRA2R_IC.swap_land_barra(args.mask, args.file, t)
File "/g/data/vk83/apps/conda/access-ram/2024.12.0/lib/python3.11/site-packages/replace_landsurface/replace_landsurface_with_BARRA2R_IC.py", line 240, in swap_land_barra
data = np.where(np.isnan(data), current_data, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<__array_function__ internals>", line 180, in where
ValueError: operands could not be broadcast together with shapes (428,427) (470,470) (428,427)
Reproduce the error locally
We can reproduce the same error by manually running the script with the proper files, for example:
ROSE_DATA=/g/data/vk83/testing/data/replace_landsurface/integration_tests/driving_data hres_eccb --mask /g/data/vk83/testing/data/replace_landsurface/integration_tests/input_data_copy/test_5/mask --file /g/data/vk83/testing/data/replace_landsurface/integration_tests/input_data_copy/test_5/file.tmp --start 202305040000 --type barra
Nature of the error
I think the error is related to bounding_box() not returning the correct bounds to "cut" the source BARRA2R data.
In any case, by fixing #51 this error might also be fixed.
Overview
The
nci_hres_eccbtask of the RNS suite is failing whenNCI_HRES_ECCBis set tobarra.This would result in running:
which raises the following exception:
Reproduce the error locally
We can reproduce the same error by manually running the script with the proper files, for example:
Tip
A python environment with
replace_landsurfaceinstalled as a dev package is required.For more info, refer to the Development/Testing instructions.
Nature of the error
I think the error is related to bounding_box() not returning the correct bounds to "cut" the source BARRA2R data.
In any case, by fixing #51 this error might also be fixed.