Hello,
For starters I’m a python developer and no expert regarding telecommunications and struggling to comprehend the information I came across with for this.
I’m trying to design a terrestrial microwave link budget process but I’m stuck in one point.
The idea is for the process to calculate the link budget starting from the lower antenna sizes and its matching ODU and checking if each modulation complies with the minimum avalailability set for each modulation (BPSl, 128QAM, 1024QAM, etc). If the min. avalailability is not met, then we change the antenna sizes to the next one (e.g. from 0.3 m to 0.6), do the link budget calculation again until we meet one that is over the required availability. If the availibility is met, the idea is to decrease the maximum transmission power of each modulation until the minimum availability is met. The transmission system will be Eband, Multiband and Classic; if the link distance can’t be covered by the Eband after checking all antenna sizes, we change to Multiband (checking each antenna sizes combination for each frequency we work with), and if we can’t cover it with Multiband, we change to Classic and do the calculations again.
Where I’m stuck is regarding the availability; I don’t know how to convert the link budget I calculated based on the parameters I have (frequency, antenna gains, distance, possible attenuations like rain or multipath, etc) to a percentage of availability, to be able to check if the calculated link budget complies with the minimum availability required.
Here is an explanation of what I have done so far:

I have a table where I have set the list of antenna combinations and its corresponding ODU for each transmission type (EBand, Multiband, Classic):
a) Eband → Site A: 0.3  Site B: 0.3
b) Eband → Site A: 0.3  Site B: 0.6
c) Eband → Site A: 0.6  Site B: 0.6
d) Multiband → Site A: 0.3  Site B: 0.3
e) Multiband → Site A: 0.3  Site B: 0.6
f) Multiband → Site A: 0.6  Site B: 0.6
g) etc… 
As I have each antenna and ODU model, I have their frequency, the antenna gains provided by the manufacturer, all modulation values of the ODU (the type (BPSK, QPSK, 128QAm, etc), max TX power, receiver sensitivity (BER 106)). With these values, I calculate the Free space loss (FSL = 92.45 + 201og10(f) + 20log10(d))

Currently Im only testing distances below 5 km, so the only attenuation I’m considering is rain attenuation. As I have the coordinates for both sites, I search which one of them has the highest rain rate. I also have the mean sea level (though based on what I read from the ITU recommendations, this part is important for the multipath attenuation but not for rain attenuation, please correct me if I’m wrong) as well as the future antenna height

I start calculating the link budget for each modulation; the received power (Received power = Transmitter output power (Ptx) + Transmitter antenna gain + Receiver antenna gain  FSL) and the fade margin (Fade margin = Receiver sensitivity  Received power). The current formula I’m using the convert the calculated link budget (and I don’t think it’s the correct one though it’s result is very accurate) is 100 x (1  10^(fade margin/10))

I compare the calculated availability in step 4 with the minimum availability set for each modulation (e.g. BPSK 99.995%). If the availability is not met, I calculate the next antenna combination (0.3/0.6) but if it’s met, then I start recalculating the link budget while decreasing the transmission power by 0.1 dBm at a time until the availability is near the set minimum for each modulation.
Here is a calculation example:
 Frequency: 80 Ghz
 Distance: 2.57 km.
 Antenna A diameter: 0.3 m
 Antenna B diameter: 0.6 m
 Antenna A gain: 46 dBm
 Antenna B gain: 50.5 dBm
 Maximum TX power: 18 dBm
 Receiver sensitivity: 68.5 dBm
 Calculate FSL
 Free space loss = 92.45 + 20log10(80) + 20log10(2.57)
 Free space loss = 138.717 dBm
 Calculate received power
 Received power = Transmitter output power (Ptx) + Transmitter antenna gain + Receiver antenna gain  FSL
 Received power = 18 dBm + 46 dBm + 50.5 dBm  138.717 dBm
 Received power = 24.217
 Calculate fade margin
 Fade margin = Receiver sensitivity  Received power
 Fade margin = 68.5  24.217
 Fade margin = 44.283
 By applying the formula mention before 100 x (1  10^(fade margin/10)), the availability for this calculation is 99.9962696%, above the minimum availability of 99.995%. Now I proceed to decrease the TX power to the nearest calculated availability.
This is a screenshot of IQ.link, and what I’m trying to get is the Rain Uptime %/year that I believe is the value I need to compare with the minimum availability in order the verifiy if the link budget complies what we need.
Am I very far off the correct way to calculate it?
Thanks in advance.
PD: In case I’m in the wrong forum, please let me know (I got suggestions from similar topics in Trnasport Networks)