//Code for creating fort.22 wind file in NWS=5 format //Convention is Nautical for PARAM, SWAN, and ADCIRC (0 deg=North, 90 deg=East, 180 deg=South, 270 deg=West) //PARAM and ADCIRC use Meteorlogical convention (wind from North is WVY= -value) //SWAN uses Oceanographis convention (wind from North is WVY = +value) // //By: Samuel Carter Boyd #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main(){ int IWTIME; //time of the wind field int IREFYR = 19; //start time (year,month,day,hr,min) int IREFMO = 11; int IREFDAY = 13; int IREFHR = 00; int IREFMIN = 00; int NDSETSE; int NSPOOLGE = 3600; //the number of time steps at which information is written to fort.63 int dims = 2; //dimension of the wind dataset double pi = 4*atan(1); double umax; double dir,u; int theta_res; double wind_converge=0.0001; int hr_count = 0; int day_count = 0; double xwind,ywind,WVX,WVY,PRN=0; double WVXa[NDSETSE],WVYa[NDSETSE],WVXb[NDSETSE],WVYb[NDSETSE],WVXAD[NDSETSE],WVYAD[NDSETSE]; int index=0; int wind_type; bool check; cout<>wind_type; cout<>NDSETSE; if(wind_type==1){ check=false; if(360%NDSETSE == 0){ check=true; cout<>NDSETSE; if(360%NDSETSE == 0){ check=true; } } } //double WVXAD[NDSETSE]; //double WVYAD[NDSETSE]; cout<<"Enter max wind speed (m/s): "; cin>>umax; cout<>theta_res; cout<