> For the complete documentation index, see [llms.txt](https://swatplus.gitbook.io/io-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swatplus.gitbook.io/io-docs/~/changes/GiVD5ID0WVyRIAumaMy2/weather-generator/precipitation/maximum-half-hour-rainfall/adjustment-for-clear-overcast-conditions-1.md).

# Adjustment for Clear/Overcast Conditions

&#x20;         To incorporate the effect of clear and overcast weather on generated values of relative humidity, monthly average relative humidity values can be adjusted for wet or dry conditions.

&#x20;                 The continuity equation relates average relative humidity adjusted for wet or dry conditions to the average relative humidity for the month:

$$R\_{hmon}\*days\_{tot}=R\_{hWmon}\*days\_{wet}+R\_{hDmon}\*days\_{dry}$$  1:3.5.8

where $$R\_{hmon}$$ is the average relative humidity for the month, $$days\_{tot}$$ are the total number of days in the month, $$R\_{hWmon}$$ is the average relative humidity for the month on wet days, $$days\_{wet}$$ are the number of wet days in the month, $$R\_{hDmon}$$ is the average relative humidity of the month on dry days, and $$days\_{dry}$$ are the number of dry days in the month.

&#x20;         The wet day average relative humidity is assumed to be greater than the dry day average relative humidity by some fraction:

$$R\_{hWmon}=R\_{hDmon}+b\_H\*(1-R\_{hDmon})$$                       1:3.5.9

where $$R\_{hWmon}$$ is the average relative humidity of the month on wet days, $$R\_{hDmon}$$ is the average relative humidity of the month on dry days, and $$b\_H$$ is a scaling factor that controls the degree of deviation in relative humidity caused by the presence or absence of precipitation. The scaling factor, $$b\_H$$, is set to 0.9 in SWAT+.

&#x20;            To calculate the dry day relative humidity, equations 1:3.5.8 and 1:3.5.9 are combined and solved for $$R\_{hDmon}$$:

$$R\_{hDmon}=(R\_{hmon}-b\_H\*\frac{days\_{wet}}{days\_{tot}})*(1.0-b\_H*\frac{days\_{wet}}{days\_{tot}})^{-1}$$     1:3.5.10

To reflect the impact of wet or dry conditions, SWAT+ will replace $$R\_{hmon}$$ with $$R\_{hWmon}$$ on wet days or $$R\_{hDmon}$$ on dry days in equations 1:3.5.4 through 1:3.5.7.

Table 1:3-5: SWAT+ input variables that pertain to generation of relative humidity.

| Variable Name | Definition                                                        | File Name |
| ------------- | ----------------------------------------------------------------- | --------- |
| RHSIM         | Relative humidity input code: 1-measured, 2-generated             | file.cio  |
| TMPMN(mon)    | $$\mu mn\_{mon}$$: average minimum air temperature for month (°C) | .wgn      |
| TMPMX(mon)    | $$\mu mx\_{mon}$$: average maximum air temperature for month (°C) | .wgn      |
| DEWPT(mon)    | $$\mu dew\_{mon}$$: average dew point temperature for month (°C)  | .wgn      |
| PCPD(mon)     | $$days\_{wet}$$: average number of days of precipitation in month | .wgn      |
