DHI-GRAS / senEtSnapSta

:gear: SNAP STA for Sen-ET
GNU General Public License v3.0
11 stars 2 forks source link

Problem with Download ECMWF ERA5 reanalysis data operator #18

Closed rasc1974 closed 4 years ago

rasc1974 commented 4 years ago

Hi, I´m trying to process step 3.3.12 now but unfortunately got the following result:

grafik

Does anybody have an idea, what is the reason for this?

Regards, Rainer

radosuav commented 4 years ago

Hi Rainer, it appears that your input netCDF file does not have a time dimension. Can you open it in SNAP and check if 'time' exists in Metadata > Variable_Attributes: image If it does not exists then something went wrong in the previous step (Download ECWMF ERA5 reanalysis data). Could you repeat that step and post the output text here.

rasc1974 commented 4 years ago

Hi Radoslav, as I understand this is a problem with the CDS API file. I guess the meteodata folder have been created but data has not been downloaded:

Meteo_error

However, the CDS API file is located in my home-folder:

Explorer_2

...but I can´t find a .cdsapirc within my .snap folder, although I was quite sure to have followed this instructions.

radosuav commented 4 years ago

The cdsapi Python package should have been installed with the Sen-ET bundle and should be present in username\.snap\auxdata\sen-et-conda-Win64\Lib\site-packages\cdsapi. The API key (.cdsapirc file) should be in your user folder. So maybe all you need to do is to rename "cdsapi.cdsapirc" to ".cdsapirc".

rasc1974 commented 4 years ago

Ok thanks. After renaming of the *.cdsapirc file and downloading of meteodata I´ve got several warnings and a new error, now - and the preparation of the meteodata (step 3.3.13) aborts:

Meteo_warnings and error

radosuav commented 4 years ago

It looks like a problem with you elevation file. Could try to open it in QGIS.

rasc1974 commented 4 years ago

Hi, here is the elevation in SNAP:

grafik

...and here it is in QGIS:

grafik

However, the data seem to be wrong. It should be around 70 m above sea level, not 102 - 190!

I just executed the Sentinel-2 preprocessing graph and the Add elevation graph once again and got the same result as above

rasc1974 commented 4 years ago

Here´s a screenshot from an online tool to find out the height above sea level:

grafik

In general the pattern produced by SNAP is correct, but the values don´t fit to the reality (if I understand the values correctly?!).

radosuav commented 4 years ago

Hi, the DEM should be SRTM 1sec HGT as downloaded by the SNAP "Add elevation band" operator. You can double check by doing this manually through Raster > DEM Tools > Add elevation band. So it appears that one of the elevation layers is incorrect but this will not have a big impact on the meteorological values.

Regarding the error, I think the hint might be in "1-pixel width/height files not supported" message. How big is the AOI for which you download the SRTM data? The spatial resolution of ERA5 data is 0.25 degrees (around 25-30 km) so if your AOI is smaller then 1-pixel raster is downloaded and it cannot be processed by SNAP geotiff driver. Try expanding the AOI to be at least 1 by 1 degree. When performing the thermal sharpening later it is good to have a larger AOI anyway, at least 50 by 50 S3 pixels (so around 50 by 50 kilometers).

rasc1974 commented 4 years ago

Dear Radoslav, thank You, I see. My point of interest is located in the south west of a Sentinel 2 tile. I can indeed choose a larger AOI to cover at least 1 entire ERA5 pixel, but this entire ERA5 pixel does not contain my point of interest. It is not possible to cover that ERA5 pixel that contains my point of interest in the south west corner of that particular Sentinel 2 tile, completely. A small part of the ERA5 pixel is not covered. I guess the reanalysis of the ERA 5 data is only applied to entire pixels covered by the Sentinel 2 elevation? See this screenshot from QGIS for a better understanding:

grafik

Do I have to combine at least 2 Sentinel 2 tiles in that case (if they are available)?

Best regards Rainer

radosuav commented 4 years ago

Hi Rainer, It's not a problem that the ERA5 dataset extends beyond Sentinel-2 scene. To adjust the air temperature based on elevation we first bring the ERA5 air temperature down to sea level using ERA5 geopotential height, then resample, reproject and subset based on the S2 scene and finally apply the elevation correction using high-resolution DEM.

But looking at the screenshot above, you will have a problem when sharpening the LST because it appears that there is no overlap between your S2 subset and S3 LST. The sharpening only works for areas in which S2 and S3 scenes overlap.

rasc1974 commented 4 years ago

Ok, thank You so far! I´ll close this issue now, because I managed this problem. In the screenshot You can see different overlapping layers. The Sentinel 2 tile covers the Sentinel 3 LST completely.

Best regards, Rainer