0% found this document useful (0 votes)
3 views4 pages

Cyclone Prediction Program Code

read

Uploaded by

deathscope15
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Cyclone Prediction Program Code

read

Uploaded by

deathscope15
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

while(rerun == 'y'||rerun == 'Y')//using sentinel controlled while loop to allow for user to rerun

program

cout<<"Please enter Sea Surface Temperature (°C): ";

cin>>sea_surface_temperature;

cout<<"Please enter Vertical Wind Shear (m/s): ";

cin>>vertical_wind_shear;
cout<<"Please enter Atmospheric Pressure (hPa): ";

cin>>atmospheric_pressure;

cout<<"Please enter Humidity (%) in mid/upper levels: ";

cin>>humidity_percent;

humidity_percent = humidity_percent/100;

cout<<"Please enter Outflow at upper level (200mb): ";

cin>>out_flow;

cout<<"Please enter Latitude (°): ";

cin>>lattitude;

cout<<"Please enter Movement Speed (km/h): ";

cin>>movement_speed;

cout<<"Please enter wind speed(Km/h): ";

cin>>wind_speed;

if (sea_surface_temperature >= SEA_SURFACE_CONST && vertical_wind_shear <=


VERTICAL_WIND_CONST && atmospheric_pressure < ATMOSPHERIC_PRESSURE_CONST &&
humidity_percent >= HUMITIDY_CONST && out_flow > OUT_FLOW_CONST &&
movement_speed <= MOVEMENT_SPEED_CONST && lattitude >= LATITUDE_CONST)

{//Conditions that must be met for the requred outcome of it is a cyclone

cout<<"It will turn into a cyclone"<<endl;


if (wind_speed >= CATEGORY_FIVE) {

cout << "\nCyclone Category: 5 ";

else if (wind_speed >= CATEGORY_FOUR) {

cout << "\nCyclone Category: 4";

else if (wind_speed >= CATEGORY_THREE) {

cout << "\nCyclone Category: 3";

else if (wind_speed >= CATEGORY_TWO) {

cout << "\nCyclone Category: 2";

else if (wind_speed >= CATEGORY_ONE) {

cout << "\nCyclone Category: 1";

else {

cout << "\nWind speed is below cyclone category levels.";

else{

cout<<"It will not turn into a cyclone"<<endl;


}

cout<<"\nWould you like to Enter a newset of data? (Y/N): ";//if user enters y or Y
program reruns if user enters anything else then program ends.

cin>>rerun;

cout<<"Thank you for using the program!"<<endl;

return 0;

Common questions

Powered by AI

Inaccuracies in input data can lead to incorrect predictions about cyclone formation and intensity. If, for instance, the sea surface temperature is underestimated, it might fail to meet the threshold necessary for cyclone formation, thereby giving a false negative. Conversely, overestimation may lead to a false positive, predicting a cyclone when conditions are not favorable. Similarly, inaccuracies in atmospheric pressure, wind shear, or other input variables could critically skew results, highlighting the importance of accurate data entry for reliable predictions .

For a weather system to be classified as a cyclone based on the given program logic, the following conditions must be met: the sea surface temperature must be equal to or greater than a specified constant (SEA_SURFACE_CONST), the vertical wind shear must be equal to or less than another constant (VERTICAL_WIND_CONST), the atmospheric pressure must be less than the ATMOSPHERIC_PRESSURE_CONST, the humidity percentage must be equal to or greater than HUMIDITY_CONST after conversion to a decimal, the outflow at the upper level must be greater than OUT_FLOW_CONST, the movement speed must be equal to or less than MOVEMENT_SPEED_CONST, and the latitude must be equal to or greater than LATITUDE_CONST .

Wind speed is critical as it determines the cyclone's category after being established that a cyclone could develop. The program categorizes the cyclone from Category 1 to Category 5 based on the wind speed meeting or exceeding specific thresholds for each category, thus providing a qualitative measure of cyclone intensity .

The program ensures user-friendly operation by employing a sentinel-controlled loop that allows continuous execution based on the user's choice. After evaluating a set of data, the user is prompted to input 'y' or 'Y' to run the program again with new data, streamlining the process for iterative testing or educational purposes without needing to restart the program manually .

This program has potential for use in real-time cyclone prediction systems, provided it is integrated with real-time data feeds. To be effective, it would require continuous input from reliable sources, such as satellite data for sea surface temperatures and atmospheric conditions. Further refinement could involve integrating additional variables and improving threshold constants based on historical cyclone data. Collaborative use with broader meteorological systems could enhance predictive accuracy and scope, aiding in disaster preparedness and response efforts .

Latitude's significance lies in its role as one of the decisive factors for cyclone formation. The program checks whether the latitude is equal to or greater than a defined constant (LATITUDE_CONST), indicating that certain latitudinal positions are more conducive to cyclone development possibly due to the Coriolis effect, which is necessary for cyclone circulation .

The program determines the category of a cyclone by checking the wind speed against predefined category thresholds. If the wind speed is greater than or equal to the threshold of CATEGORY_FIVE, it is categorized as Category 5; otherwise, it checks sequentially against CATEGORY_FOUR, CATEGORY_THREE, CATEGORY_TWO, and CATEGORY_ONE, assigning the corresponding category based on the wind speed .

The program uses the logical operators '>=' (greater than or equal to), '<=' (less than or equal to), and '>' (greater than) to compare user inputs against predefined constants. These operators ensure that each environmental condition meets the minimum or maximum threshold necessary for cyclone development. Collectively, these create a logical AND relationship where all specified criteria must be met for the program to conclude potential cyclone formation .

User input plays a crucial role as it provides the specific values for sea surface temperature, vertical wind shear, atmospheric pressure, humidity percentage, outflow at the upper level, latitude, movement speed, and wind speed. These inputs are compared against defined threshold constants to evaluate if the conditions are conducive for cyclone formation. Without accurate or appropriate input values reflecting actual environmental conditions, the program's predictions regarding cyclone formation could be incorrect .

The sentinel-controlled loop allows the program to continue running and accepting new sets of data for evaluating cyclone conditions as long as the user inputs 'y' or 'Y' in response to the query about starting another evaluation. This enables multiple assessments in a single execution, providing flexibility for reevaluation or testing different data sets without restarting the program .

You might also like