SuperDARN Dynamic Model 

A dynamical model of high-latitude plasma convection based on the CS10 coefficients. (Supported, in part, by NSF Award ATM-0836485.)
- To run the IDL widget tool download the tar file (SDDM_widget.tar), untar the file and follow the instructions for installation and operation in the README file.
- To run the web interface fill in the appropriate information below and
click the plot button to see a figure or click the save button
to obtain an ASCII data file of the potential or velocity values on a latitude/longitude grid.
The file contains one (or multiple, for a series run) blocks of data with the first line of each
block specifying the dimensions (N-columns N-rows) of the data array. Each row lists:
Lat (deg AACGM) Lon (deg AACGM) and [Potential (kV) or V-meridional (m/s, positive Northward)
V-zonal (m/s, positive Eastward)].
SDDM Web Interface
return true; } if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $clientIP = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $clientIP = $_SERVER['REMOTE_ADDR']; } $mon_days = array(0,31,28,31,30,31,30,31,31,30,31,30,31); if (!isset($_POST['plot']) && !isset($_POST['getimf']) && !isset($_POST['step']) && !isset($_POST['save'])) { // if page is not submitted to itself echo the form # default conditions $by = "-5.0"; $bz = "-5.0"; $vsw = "400"; $tilt = "10.0"; $ymd = "20000701"; $tm_hr = "09"; $tm_mn = "00"; $dur_hr = "2"; $del_mn = "5"; $hemi = "north"; $vel_flag = 0; $multi_flag = 0; $date_flag = 0; $magang = 0; $mname = 'null.gif'; $iname = 'null.gif'; $imfname = 'null.dat'; MakeForm($hemi,$vel_flag,$multi_flag,$date_flag,$magang,$by,$bz,$vsw,$tilt, $ymd,$tm_hr,$tm_mn,$dur_hr,$del_mn,$mname,$iname,$imfname); } else { # read input conditions $by = DoStripSlashes( $_POST['by'] ); $bz = DoStripSlashes( $_POST['bz'] ); $vsw = DoStripSlashes( $_POST['vsw'] ); $tilt = DoStripSlashes( $_POST['tilt'] ); $ymd = DoStripSlashes( $_POST['date_ymd']); $tm_hr = DoStripSlashes( $_POST['time_hr']); $tm_mn = DoStripSlashes( $_POST['time_mn']); $dur_hr = DoStripSlashes( $_POST['dur_val']); $del_mn = DoStripSlashes( $_POST['step_val']); $hemi = $_POST['hemi']; $vel_flag = (int)$_POST['vel_flag']; $multi_flag = (int)$_POST['multi_flag']; $date_flag = (int)$_POST['date_flag']; $magang = (int)$_POST['magang']; $mname = $_POST['mname']; $iname = $_POST['iname']; $imfname = $_POST['imfname']; if ($multi_flag == 0) { $plot_ht = 512; } else { $plot_ht = 640; } # Fields Validations $validationFailed = false; if (isset($_POST['plot']) || isset($_POST['save'])) { if ($date_flag == 0) { if ($multi_flag == 1) { $validationFailed = true; $ErrorMessage['opts'] = 'Cannot do series run for single input condition (use Date/Time).'; } if ( !CheckNumber($by) || !CheckNumber($bz) || !CheckNumber($vsw) || !CheckNumber($tilt) ) { $validationFailed = true; $ErrorMessage['inputs'] = 'Please input numbers in all parameter fields (middle box).'; } } else { if ($imfname == 'null.dat') { $validationFailed = true; $ErrorMessage['opts'] = 'No IMF data loaded, use Get IMF'; } } } else { if (!CheckNumber($del_mn)) { $validationFailed = true; $ErrorMessage['opts'] = 'Please input valid number in Step field'; } else { $dt = (int) round((float)$del_mn); if ($dt == 0) $dt = 1; $del_mn = "$dt"; } if (!CheckNumber($dur_hr) || !CheckNumber($ymd) || !CheckNumber($tm_hr) || !CheckNumber($tm_mn)) { $validationFailed = true; $ErrorMessage['inputs0'] = 'Please input valid numbers in Date/Time/Duration fields'; } else { $dur = abs((float)$dur_hr); $dur_hr = "$dur"; $time = ProcDateTimeStrs($ymd,$tm_hr,$tm_mn); if ($time == -1) { $validationFailed = true; $ErrorMessage['inputs1'] = 'Please input valid date/time'; } } } if ($validationFailed === true) { # Include message in error page and dump it to the browser $errorList = @implode("
\n", $ErrorMessage); } else { # Address action buttons one by one if (isset($_POST['plot'])) { # Basic Plotting $mname = date("U").".gif"; if ($multi_flag == 0) { $command = "plot_dynmod.sh $by $bz $vsw $tilt $hemi $mname $vel_flag $magang"; exec($command, $output,$return_var); } else { // Code to deal with getting arrays of IMF data into plot_dynmod $command = "plot_dynmod_mov.sh $hemi $mname $imfname $del_mn $vel_flag"; exec($command, $output,$return_var); } $pageContent[0] = ''; $pageContent[0] = str_replace('',$mname,$pageContent[0]); if ($date_flag == 1) { $pageContent[1] = '
'; $pageContent[1] = str_replace('',$iname,$pageContent[1]); } // $pageContent[2] = '
'."$command".'
'." $output[0] $return_var"; } elseif (isset($_POST['getimf'])) { # Find and plot OMNI data $command = "/user/bin/rm $mname $iname $imfname"; exec($command,$output); $mname = ""; $iname = date("U").".gif"; $imfname = str_replace('.gif','.dat',$iname); $date_flag = 1; $magang = 0; // Code to plot and return IMF data $command = "proc_omni_dat.sh $time[0] $time[1] $time[2] $time[3] $time[4] $dur $hemi $iname 1"; exec($command, $output,$return_var); //$output = '7.82 -0.25 404.1 18.0'; $res = explode(" ",$output[0]); if ($res[0] == '-999') { $pageContent[0] = ' No IMF data found, please try another Date/Time. '; } else { $by = $res[0]; $bz = $res[1]; $vsw = $res[2]; $tilt = $res[3]; $pageContent[0] = ''; $pageContent[0] = str_replace('',$iname,$pageContent[0]); } // $pageContent[2] = '
'."$command".'
'." $output[0]".'
'." $return_var"; } elseif (isset($_POST['step'])) { # Increment time and re-plot OMNI data $command = "/usr/bin/rm $iname"; exec($command,$output); $mname = ""; //$iname = date("U").".gif"; //$imfname = str_replace('.gif','.dat',$iname); $date_flag = 1; $magang = 0; $mo = $time[1]; $dy = $time[2]; $hr = $time[3]; $mn = $time[4]+ $dt; while($mn < 0) { $mn += 60; $hr -= 1; if ($hr < 0) { $hr = 23; $dy -= 1; } } while($mn > 59) { $mn -= 60; $hr += 1; if ($hr > 23) { $hr = 0; $dy +=1; } } if ($dy < 1) $dy = $mon_days[$mo]; if ($dy > $mon_days[$mo]) $dy = 1; $time[2] = $dy; $time[3] = $hr; $time[4] = $mn; $tm_hr = sprintf("%02d",$hr); $tm_mn = sprintf("%02d",$mn); $ymd = sprintf("%4d%02d%02d",$time[0],$time[1],$time[2]); // Code to plot and return IMF data $command = "proc_omni_dat.sh $time[0] $time[1] $time[2] $time[3] $time[4] $dur $hemi $iname"; exec($command, $output,$return_var); //$output = '7.82 -0.25 404.1 18.0'; $res = explode(" ",$output[0]); if ($res[0] == '-999') { $pageContent[0] = ' No IMF data found, please try another Date/Time. '; } else { $by = $res[0]; $bz = $res[1]; $vsw = $res[2]; $tilt = $res[3]; $pageContent[0] = ''; $pageContent[0] = str_replace('',$iname,$pageContent[0]); } // $pageContent[2] = '
'."$command".'
'." $return_var"; } elseif (isset($_POST['save'])) { # Re-make model plot, saving pot/vel data to text file $command = "/usr/bin/rm $mname"; exec($command,$output); $mname = date("U").".gif"; $fname = date("U").".dat"; if ($multi_flag == 0) { $command = "plot_dynmod.sh $by $bz $vsw $tilt $hemi $mname $vel_flag $magang $fname"; exec($command, $output,$return_var); } else { // Code to deal with getting arrays of IMF data into plot_dynmod $command = "plot_dynmod_mov.sh $hemi $mname $imfname $del_mn $vel_flag $fname"; exec($command, $output,$return_var); } $pageContent[0] = 'ASCII data file '; $pageContent[0] = str_replace('',$fname,$pageContent[0]); $pageContent[1] = '
'; $pageContent[1] = str_replace('',$mname,$pageContent[1]); if ($date_flag == 1) { $pageContent[2] = '
'; $pageContent[2] = str_replace('',$iname,$pageContent[2]); } $temp = @implode("
\n", $output); // $pageContent[3] = ''."$command".'
'." $temp $return_var"; } } MakeForm($hemi,$vel_flag,$multi_flag,$date_flag,$magang,$by,$bz,$vsw,$tilt, $ymd,$tm_hr,$tm_mn,$dur_hr,$del_mn,$mname,$iname,$imfname); if ($validationFailed === true) { echo ''.$errorList.''; } else { $pageContentAll = @implode("
\n", $pageContent); echo $pageContentAll; } } ?>