59) { $mn -= 60; $hr += 1; } if ($hr < 0) $hr += 24; if ($hr > 23) $hr-=24; $tm_hr = sprintf("%02d",$hr); $tm_mn = sprintf("%02d",$mn); $time = array($yr,$mo,$dy,$hr,$mn); return $time; } function 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 ($hemi == "north") { $n_str = "selected"; $s_str = ""; } else { $n_str = ""; $s_str = "selected"; } if ($vel_flag == 0) { $v0_str = "selected"; $v1_str = ""; } else { $v0_str = ""; $v1_str = "selected"; } if ($date_flag == 0) { $d0_str = "checked"; $d1_str = ""; $c_str = ""; $d_str = "readonly"; } else { $d0_str = ""; $d1_str = "checked"; $d_str = ""; $c_str = "readonly"; } if ($multi_flag == 0) { $m0_str = "checked"; $m1_str = ""; } else { $m0_str = ""; $m1_str = "checked"; $c_str = "readonly"; } if ($magang == 0) { $ma0_str = "checked"; $ma1_str = ""; $bylab = 'By (nT)'; $bzlab = 'Bz (nT)'; } else { $ma0_str = ""; $ma1_str = "checked"; $bylab = 'Bt (nT)'; $bzlab = 'Cang (deg)'; } ?> SuperDARN Dynamic Model

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

    Hemisphere:   Plot:

    Run for: > Single Time > Series

    Specify: > Conds > Date/Time

    IMF: > By/Bz > Bt/ClkAng

    : value=>   : value=>

    Vsw_x (km/s): value=>   Dipole Tilt (deg): value=>

    Date (YYYYMMDD) value=>

    Time (HR:MN) value=> : value=>

    Duration (hrs) value=>

          value=> (min/ind)    

    > > >
    \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; } } ?>