Hi!
I'm trying to use the Inference class for a region I exported with a bounding box and the EarthEngineExporter class. For some of the tiff files I get the following error:
RuntimeError: fillna on the test instance returned None; does the test instance contain NaN only bands?
Checking the DataArray returned from Engineer.load_tif I do see that some bands have only NaN values for all pixels at any timestep. Here are the pixel NaN counts per timestep per channel of the tiff (array of shape 12x19). The last 4 bands are always NaN, which if I'm not mistaken are the ERA5 and SRTM bands.
array([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350]]),
Do you know how good is the coverage of the ERA5 and SRTM datasets in land? Maybe this happens at the sea but I'm not sure. Otherwise I was thinking of maybe somehow imputing values that make sense for my region on these bands, but I guess that would require some new functionality in the package. Maybe passing some optional fill_values per band as a dict to the constructor of the Inference class or something like this.
Please let me know your thoughts and if you have any suggestions of what to do in this case.
Thank you very much in advance!
Hi!
I'm trying to use the Inference class for a region I exported with a bounding box and the EarthEngineExporter class. For some of the tiff files I get the following error:
RuntimeError: fillna on the test instance returned None; does the test instance contain NaN only bands?Checking the DataArray returned from Engineer.load_tif I do see that some bands have only NaN values for all pixels at any timestep. Here are the pixel NaN counts per timestep per channel of the tiff (array of shape 12x19). The last 4 bands are always NaN, which if I'm not mistaken are the ERA5 and SRTM bands.
array([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56350, 56350, 56350, 56350]]),Do you know how good is the coverage of the ERA5 and SRTM datasets in land? Maybe this happens at the sea but I'm not sure. Otherwise I was thinking of maybe somehow imputing values that make sense for my region on these bands, but I guess that would require some new functionality in the package. Maybe passing some optional fill_values per band as a dict to the constructor of the Inference class or something like this.
Please let me know your thoughts and if you have any suggestions of what to do in this case.
Thank you very much in advance!