CORDEX-WRF-community / euro-cordex-cmip6

Configuration files for WRF in EURO-CORDEX-CMIP6
2 stars 0 forks source link

real.exe gives wrfinput file with TSLB=0K along coastline #13

Open yoselita opened 6 months ago

yoselita commented 6 months ago

Rita: hrldas crashes always with the segmentation fault! When looking into wrfinput.d01 files, TSLB (soil temperature) at 4th soil levels had values of zero kelvin around the coast, or even negative values. When changing the values of soil temperature to that of the lowest model level (ncap2 -s 'where(TSLB <= 0) TSLB=TMN' ../wrf_infiles/wrfinput_d01 wrfinput_d01) the model runs.

yoselita commented 6 months ago

Rita: I’ve been running some tests and it seems that there is some projection mismatch in the new geo_em.d01.EUR-12-v3.nc (the one that is on the github). I tried to create new wrfinputs using a geo_em.d01 without any changes and another with the geo_em.d01_EUR-11_newLAI_BlackSea2sea_landmate.nc (right figure) one of the previous versions available). In both the string of strange temperatures does not appear, see soil_temp_ori.png (right figure). The impact of this string of wrong temperatures affects the upper layers of the atmosphere and the runs will have a nice “necklace” of cold temperatures along the coastlines (left figure). image

yoselita commented 6 months ago

Josipa: I am sorry for the bad news, and thank you for sharing this finding this problem. This is probably related to the land-sea mask, as in the new geo_em file, I updated also the land-sea mask to fit the land cover data. As I can understand, you are trying to create wrfinput files using the shared geo_em file, and you have problem getting the correct values for TSLB in the wrfinput. Could you maybe also check the interpolation option that you use for SST in the METGRID.TBL (check here: https://github.com/wrf-model/WPS/commit/32f79fd7321c591e972ce85c11d4be2d97e3cc44). Could this be related to the problem? Does this mean that we all should have the same problem for our runs? What I notice from our wrfinput file in the lower left corner we have around 0 values (Canary islands) , but I would say in our case that this is more related to the forcing GCM than with the static data. After some months of running, this gets into balance).

yoselita commented 6 months ago

Rita: The SST in METGRID.TBL is interpolated according to the information from github. Could please you share a version with the conservative interpolation and without the land-sea mask update.

yoselita commented 6 months ago

Josipa: I put the LANDMASK based on MODIS + lakes land cover data. The file you can download here. Is the file geo_em.d01_EUR-11_newLAI_BlackSea2sea_landmate.nc with LADNMATE data bilinearly interpolated (i.e. geo_em.d01.EUR-12-v2.nc)?

yoselita commented 6 months ago

Rita: Good news, the new file works. Now I don’t expect any strange problems. The file geo_em.d01_EUR-11_newLAI_BlackSea2sea_landmate.nc is with LADNMATE data bilinearly interpolated and the modis landmask.

yoselita commented 6 months ago

Josipa: These are good and bad news, as I find this a bit weird. I was checking and rechecking - LANDMASK in geo_em file should be based on the LANDUSE data that is used. Since we use the new LANDMATE LU data fixed afterwards (not when running the geogrid), I would say that we need to update also the LANDMASK according to the new LANDMATE LU data. I am sorry for bothering you, but could you please test this geo_em file as well (download link) before proceeding with the one I sent you before.

yoselita commented 6 months ago

Rita: Now it’s really good news. I have the simulation running and there are no issues with the soil temperature. I’ve performed a small run (with 1 month of output) for the soil initialisation and it runs smoothly. I’m glad you could fix the landmask, since I agree with you that it should be the one from LANDMATE. What did you do to the landmask?

yoselita commented 6 months ago

Josipa: The landmask in the last file (link) I sent you yesterday evening is the the one based on LANDMATE data and I created it using your fortran code (attached), the same way I created the original file shared in github. But somehiw the file is not the same (I have to check this before continuing) The LANDMASK in the file I sent you earlier (link) is the LANDMASK taken from a geo_em file in which land cover data are from MODIS simply using nco (so LU id from LANDMATE and LANDMASK from MODIS).

yoselita commented 6 months ago

Josipa: Thank you dear Rita for your patience. I finally found what was happening here, and why the file I sent you the last (that works and that we used for our test runs), and the one shared on our github repo are different. The FORTRAN code you shared for recategorization of the LANDMATE data for WRF is using the information also from the original input geo_em file. So, if I use other geo_em file as an input,the output will be different. And exactly that happened. The FORTRAN code extract info from the input geo_em file about tundra and shrublands, and for that reason these categories were different in my last file. So, here it is an explanation of what I do different from what you proposed:

  1. I use higher resolution water-snow-ice information. For that reason I get more water pixels than you. If I just use your script, it happens that I get lakes near the coastal areas:

  2. Lake fix near the coast: I included in he code the lines that fix the weird lakes near the coast by saying - if the pixel is lake and the pixels around it are sea - put it to sea. (Figure 2). This is version coincides completely with he file geo_em.d01.EUR-12-v3.nc that we suppose to use for our run. I updated the file that you can download from our github link geo_em.d01.EUR-12-v3.1.nc You can download it again, and retry the run (it is redone with new libraries).

  3. During this problem investigation, I realized that the category 11 (permanent wetlands) is not present in the LANDMATE data at all, and for that reason there is a lake that is connected directly with the sea (e.g. in Netherlands). If we use the info on category 11 from CORINE (the same way as you do for tundra and shrublands), we get a bit more realistic picture (Figure 3). If we still want to use the LANDMATE data, I would go for this version 4. Here you can download this file: geo_em.d01.EUR-12-v4.nc.

We should keep in mind that this is a quick fix, as recategorization is done outside geogrid and manually, unfortunately more issues may can pop up.