When running real.exe we noticed the following warnings:
"points artificially set to land"
Since version 3.8, the change described below was implemented:
"In V3.8, we changed default surface_input_source option value from 1 to 3, which uses the dominant categories computed in geogrid. But we neglected that when dominant categories for land and soil are recomputed in real, the real program does checks for mismatches, making sure the lower resolution isltyp matches with landmask data. This has two effects: one is the actual isltyp, ivgtyp, and xland can be different from that from surface_input_source = 1 (a check later in real program effectively matched ivgtyp based on isltyp); and the other effect is that for certain cases, the WRF model would stop due to un-matched isltyp and ivgtyp. This change fixes this problem, and isltyp, ivgtyp, and xland are now identical to those coming from surface_input_source = 1."
When using the default soil category (soiltype_top_30s and soitype_bot_30s) dataset, this now creates a problem around coastlines when running at high resolution (2-3km). The default soil category data set says it is 30s resolution, but it is clearly not resolving the coastlines at 2km resolution. However, it does resolve the inland lakes.
Due to the recent implementation described above, real.exe then changes the landmask to have the same coarse, unrepresentative coastlines. Which is not what we want.
We have also tried the bnu_soil_30s soil categories which resolve coastlines much better. however, the inland lakes are not resolved or missing for some reason in this dataset (at least with the default GEOGRID.TBL). So, when real.exe runs, the lakes are removed from the landmask. Which is also not what we want.
After trying many diiferent approaches, we did the following:
To trust the landmask field created from the Landuse dataset (in this case, MODIS30s), we changed the following lines in the module_initialize_real.f90 to:
! BEGIN: SCAPPS 02/2020
IF ( ( grid%landmask(i,j) .LT. 0.5 ) .AND. &
( grid%ivgtyp(i,j) .NE. config_flags%iswater .OR. grid%isltyp(i,j) .NE. 14 ) ) THEN
IF ( grid%tslb(i,1,j) .GT. 1. ) THEN
grid%ivgtyp(i,j) = config_flags%iswater
grid%isltyp(i,j) = 14
ELSE IF ( ( grid%landmask(i,j) .GT. 0.5 ) .AND. &
( grid%ivgtyp(i,j) .EQ. config_flags%iswater .OR. grid%isltyp(i,j) .EQ. 14 ) ) THEN
IF ( grid%tslb(i,1,j) .GT. 1. ) THEN
grid%ivgtyp(i,j) = 5
grid%isltyp(i,j) = 8
! END: SCAPPS 02/2020
Does this sound correct? Or, am I missing another fix such as changing GEOGRID.TBL or METGRID.TBL entries to mask where water? Adding masked=water to the following entries in GEOGRID.TBL results in missing values over water. These pose a problem as SOILCBOT and SOILCTOP 3D fields should have 0s everyhere except where the soil category exists.
"points artificially set to land"
Since version 3.8, the change described below was implemented:
"In V3.8, we changed default surface_input_source option value from 1 to 3, which uses the dominant categories computed in geogrid. But we neglected that when dominant categories for land and soil are recomputed in real, the real program does checks for mismatches, making sure the lower resolution isltyp matches with landmask data. This has two effects: one is the actual isltyp, ivgtyp, and xland can be different from that from surface_input_source = 1 (a check later in real program effectively matched ivgtyp based on isltyp); and the other effect is that for certain cases, the WRF model would stop due to un-matched isltyp and ivgtyp. This change fixes this problem, and isltyp, ivgtyp, and xland are now identical to those coming from surface_input_source = 1."
When using the default soil category (soiltype_top_30s and soitype_bot_30s) dataset, this now creates a problem around coastlines when running at high resolution (2-3km). The default soil category data set says it is 30s resolution, but it is clearly not resolving the coastlines at 2km resolution. However, it does resolve the inland lakes.
Due to the recent implementation described above, real.exe then changes the landmask to have the same coarse, unrepresentative coastlines. Which is not what we want.
We have also tried the bnu_soil_30s soil categories which resolve coastlines much better. however, the inland lakes are not resolved or missing for some reason in this dataset (at least with the default GEOGRID.TBL). So, when real.exe runs, the lakes are removed from the landmask. Which is also not what we want.
After trying many diiferent approaches, we did the following:
To trust the landmask field created from the Landuse dataset (in this case, MODIS30s), we changed the following lines in the module_initialize_real.f90 to:
! BEGIN: SCAPPS 02/2020
IF ( ( grid%landmask(i,j) .LT. 0.5 ) .AND. &
( grid%ivgtyp(i,j) .NE. config_flags%iswater .OR. grid%isltyp(i,j) .NE. 14 ) ) THEN
IF ( grid%tslb(i,1,j) .GT. 1. ) THEN
grid%ivgtyp(i,j) = config_flags%iswater
grid%isltyp(i,j) = 14
ELSE IF ( ( grid%landmask(i,j) .GT. 0.5 ) .AND. &
( grid%ivgtyp(i,j) .EQ. config_flags%iswater .OR. grid%isltyp(i,j) .EQ. 14 ) ) THEN
IF ( grid%tslb(i,1,j) .GT. 1. ) THEN
grid%ivgtyp(i,j) = 5
grid%isltyp(i,j) = 8
! END: SCAPPS 02/2020
Does this sound correct? Or, am I missing another fix such as changing GEOGRID.TBL or METGRID.TBL entries to mask where water? Adding masked=water to the following entries in GEOGRID.TBL results in missing values over water. These pose a problem as SOILCBOT and SOILCTOP 3D fields should have 0s everyhere except where the soil category exists.