[cig-commits] r11272 - in cs/portal/trunk/seismo/SeismoWebPortal: . templates/SeismoWebPortal

leif at geodynamics.org leif at geodynamics.org
Wed Feb 27 12:44:15 PST 2008


Author: leif
Date: 2008-02-27 12:44:15 -0800 (Wed, 27 Feb 2008)
New Revision: 11272

Added:
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
Removed:
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html
Modified:
   cs/portal/trunk/seismo/SeismoWebPortal/forms.py
   cs/portal/trunk/seismo/SeismoWebPortal/models.py
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/event_list.html
   cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/object_lists.html
   cs/portal/trunk/seismo/SeismoWebPortal/urls.py
   cs/portal/trunk/seismo/SeismoWebPortal/views.py
Log:
Separated Mineos parameters from Specfem parameters.  Factored-out the
concept of a "mode catalog".


Modified: cs/portal/trunk/seismo/SeismoWebPortal/forms.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/forms.py	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/forms.py	2008-02-27 20:44:15 UTC (rev 11272)
@@ -3,11 +3,13 @@
 from django.contrib.auth import authenticate, login
 from django.contrib.auth.models import User
 from django.core import validators
-from models import Mesh, Model, Simulation, Event, DataSource, Region, Source
+from models import Mesh, Model, Event, DataSource, Region, Source
 from models import UserInfo, Invite
 from cmt import CMTSolution
 
+from models import Specfem3DGlobeParameters as Simulation # NYI
 
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Simulation
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Modified: cs/portal/trunk/seismo/SeismoWebPortal/models.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/models.py	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/models.py	2008-02-27 20:44:15 UTC (rev 11272)
@@ -254,7 +254,7 @@
 
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Meshes, Models, Simulations
+# Specfem 3D Globe
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -390,7 +390,7 @@
     raise validators.ValidationError("Please enter a positive number between %.1f and %.1f." % (lower, upper))
 
 
-class Simulation(models.Model):
+class Specfem3DGlobeParameters(models.Model):
     #
     # general information about the simulation
     #
@@ -416,8 +416,6 @@
     movie_surface = models.BooleanField(core=True)
     movie_volume = models.BooleanField(core=True)
 
-    # CMTSOLUTION
-    events = models.ForeignKey(Event, limit_choices_to = {'user__exact': CurrentUser()})
     # STATIONS
     stations = models.ForeignKey(StationList, limit_choices_to = {'user__exact': CurrentUser()})
 
@@ -460,7 +458,7 @@
         self.user = get_current_user()
         self.ntstep_between_output_info = 100
         self.ntstep_between_output_seismos = 5000
-        super(Simulation, self).save()
+        super(Specfem3DGlobeParameters, self).save()
         return
 
     def copy(self, objMap):
@@ -472,7 +470,7 @@
         obj.model = objMap[Model][self.model.id]
         obj.events = objMap[Event][self.events.id]
         obj.stations = objMap[StationList][self.stations.id]
-        super(Simulation, obj).save()
+        super(Specfem3DGlobeParameters, obj).save()
         return obj
 
     def run(self):
@@ -495,17 +493,12 @@
     class Admin:
         pass
 
-    
-    # ~~~~~~ #
-    # Mineos #
-    # ~~~~~~ #
 
-    # jcom
-    radial = models.BooleanField(default=True)
-    toroidal = models.BooleanField(default=True)
-    spheroidal = models.BooleanField(default=True)
-    ictoroidal = models.BooleanField(default=True)
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Mineos
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+class MineosModeCatalog(models.Model):
 
     #------------------------------------------------------------------------
     # minos_bran
@@ -532,6 +525,16 @@
     max_depth = models.FloatField(max_digits=19, decimal_places=10, default=1000.0) # km
     
 
+class MineosParameters(models.Model):
+
+    catalog = models.ForeignKey(MineosModeCatalog)
+
+    # jcom
+    radial = models.BooleanField(default=True)
+    toroidal = models.BooleanField(default=True)
+    spheroidal = models.BooleanField(default=True)
+    ictoroidal = models.BooleanField(default=True)
+
     #------------------------------------------------------------------------
     # green
 
@@ -549,13 +552,27 @@
 
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Request
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+class Request(models.Model):
+    
+    # CMTSOLUTION
+    event = models.ForeignKey(Event, limit_choices_to = {'user__exact': CurrentUser()})
+
+    parametersSpecfem3DGlobe = models.ForeignKey(Specfem3DGlobeParameters, null=True)
+    parametersMineos = models.ForeignKey(MineosParameters, null=True)
+
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Runs, Jobs
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 class Run(models.Model):
-    # each simulation may have multiple runs
-    simulation = models.ForeignKey(Simulation)
+    # each request may have multiple runs
+    simulation = models.ForeignKey(Request)
 
     status = models.CharField(maxlength=100)
     started = models.DateTimeField(auto_now_add=True, editable=False)

Modified: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/event_list.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/event_list.html	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/event_list.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -1,5 +1,5 @@
 
-{% extends "SeismoWebPortal/objects.html" %}
+{% extends "SeismoWebPortal/events.html" %}
 
 {% block content %}
 

Copied: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html (from rev 11262, cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html)
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	                        (rev 0)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalog_form.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -0,0 +1,88 @@
+
+{% extends "SeismoWebPortal/objects.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>{% if object %}edit{% else %}new{% endif %} mode catalog</h2>
+
+<div class=toolbar>
+    <form method="post" action="/specfem3dglobe/help/toggle/">
+        <input type="hidden" name="post_toggle_redirect" value="{{ action }}">
+        {% if help_visible %}
+        <input type="submit" name="hide_help" value="Hide Help" />
+        {% else %}
+        <input type="submit" name="show_help" value="Show Help" />
+        {% endif %}
+    </form>
+
+    {% if object %}
+    <form action="../delete/" method="get"><input type="submit" value="Delete" /></form>
+    {% endif %}
+
+</div>
+
+<form method="post" action="{{ action }}">
+
+    {% if form.has_errors %}
+    <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
+    {% endif %}
+
+{% if form.has_errors %}
+<dl class=error>
+    {% for f in form.error_dict.iteritems %}
+    <dt>{{ f.0 }}</dt>
+    <dd>
+        <ul class=error>
+        {% for e in f.1 %}
+            <li>{{ e }}</li>
+        {% endfor %}
+        </ul>
+    </dd>
+    {% endfor %}
+</dl>
+{% endif %}
+
+    <div>
+        <label for="id_eps" class=before>eps</label>
+        {{ form.eps }}
+        {% if form.eps.errors %}<span class=error>{{ form.eps.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
+of an eigenfrequency is a factor 2 to 3 times <code>eps</code>. Parameter <code>eps</code> also controls the precision with which 
+a root is found and the minimum relative separation of two roots with the same angular order. It is 
+safe to set eps = 10<span style="vertical-align: super">-7</span> for periods greater than 10 seconds. For periods between 5 and 10 seconds, it 
+has to be set to 10<span style="vertical-align: super">-12</span>&mdash;10<span style="vertical-align: super">-10</span>.</span>{% endif %}
+    </div>
+
+    <p>Neglect gravitational terms above {{ form.wgrav }} mHz. {% if form.wgrav.errors %}<span class=error>{{ form.wgrav.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>This gives about a factor of 3 increase in speed.</span>{% endif %}
+
+    <p><label for="id_lmin" class=before>angular orders</label> {{ form.lmin }} <= l < {{ form.lmax }}
+       {% if form.lmin.errors %}<span class=error>{{ form.lmin.errors|join:", " }}</span>{% endif %}
+       {% if form.lmax.errors %}<span class=error>{{ form.lmax.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>The range of angular orders l to be computed. For radial modes, this range is not used.</span>{% endif %}
+
+    <p><label for="id_wmin" class=before>frequency range</label> {{ form.wmin }} <= w < {{ form.wmax }} mHz
+       {% if form.wmin.errors %}<span class=error>{{ form.wmin.errors|join:", " }}</span>{% endif %}
+       {% if form.wmax.errors %}<span class=error>{{ form.wmax.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>The frequency range to be computed (in millihertz).</span>{% endif %}
+
+    <p><label for="id_nmin" class=before>dispersion branch numbers</label> {{ form.nmin }} <= n < {{ form.nmax }}
+       {% if form.nmin.errors %}<span class=error>{{ form.nmin.errors|join:", " }}</span>{% endif %}
+       {% if form.nmax.errors %}<span class=error>{{ form.nmax.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</span>{% endif %}
+
+    <p><label for="id_max_depth" class=before>maximum depth</label> {{ form.max_depth }} km
+       {% if form.max_depth.errors %}<span class=error>{{ form.max_depth.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
+(r<span style="vertical-align: sub">n</span>, r<span style="vertical-align: sub">n</span> - d<span style="vertical-align: sub">max</span>) only, where r<span style="vertical-align: sub">n</span> is the radius of the free surface in km.</span>{% endif %}
+
+    <div class=tab30ex>
+
+    <div><input class=submit type="submit" name="save" value="Save" />
+    </div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
+{% endblock %}

Copied: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html (from rev 11262, cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html)
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	                        (rev 0)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters_form.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -0,0 +1,102 @@
+
+{% extends "SeismoWebPortal/objects.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>{% if object %}edit{% else %}new{% endif %} mineos parameters</h2>
+
+<div class=toolbar>
+    <form method="post" action="/specfem3dglobe/help/toggle/">
+        <input type="hidden" name="post_toggle_redirect" value="{{ action }}">
+        {% if help_visible %}
+        <input type="submit" name="hide_help" value="Hide Help" />
+        {% else %}
+        <input type="submit" name="show_help" value="Show Help" />
+        {% endif %}
+    </form>
+
+    {% if object %}
+    <form action="../delete/" method="get"><input type="submit" value="Delete" /></form>
+    {% endif %}
+
+</div>
+
+<form method="post" action="{{ action }}">
+
+    {% if form.has_errors %}
+    <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
+    {% endif %}
+
+{% if form.has_errors %}
+<dl class=error>
+    {% for f in form.error_dict.iteritems %}
+    <dt>{{ f.0 }}</dt>
+    <dd>
+        <ul class=error>
+        {% for e in f.1 %}
+            <li>{{ e }}</li>
+        {% endfor %}
+        </ul>
+    </dd>
+    {% endfor %}
+</dl>
+{% endif %}
+
+    <p>1D synthetics are generated using the PREM earth model, both with and without an ocean.
+
+    <div>
+        <label for="id_catalog" class=before>catalog</label>
+        {{ form.catalog }}
+        {% if form.catalog.errors %}<span class=error>{{ form.catalog.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <fieldset><legend>oscillations</legend>
+
+    <div class=checkbox>
+        {{ form.radial }}
+        <label for="id_radial" class=after>radial</label>
+        {% if form.radial.errors %}<span class=error>{{ form.radial.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div class=checkbox>
+        {{ form.toroidal }}
+        <label for="id_toroidal" class=after>toroidal</label>
+        {% if form.toroidal.errors %}<span class=error>{{ form.toroidal.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div class=checkbox>
+        {{ form.spheroidal }}
+        <label for="id_spheroidal" class=after>spheroidal</label>
+        {% if form.spheroidal.errors %}<span class=error>{{ form.spheroidal.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div class=checkbox>
+        {{ form.ictoroidal }}
+        <label for="id_ictoroidal" class=after>inner core toroidal</label>
+        {% if form.ictoroidal.errors %}<span class=error>{{ form.ictoroidal.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    </fieldset> <!-- oscillations -->
+
+    <p><label for="id_fmin" class=before>select frequency range</label> {{ form.fmin }} <= f < {{ form.fmax }} mHz
+       {% if form.fmin.errors %}<span class=error>{{ form.fmin.errors|join:", " }}</span>{% endif %}
+       {% if form.fmax.errors %}<span class=error>{{ form.fmax.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>The frequency range to be selected from the input eigenfunction databases. All 
+modes with frequencies out of this range are rejected.</span>{% endif %}
+
+    <p><label for="id_step" class=before>sampling period</label> {{ form.step }} s
+       {% if form.step.errors %}<span class=error>{{ form.step.errors|join:", " }}</span>{% endif %}
+       {% if help_visible %}<span class=help>This determines the number of samples in the synthetic seismograms. All synthetic seismograms start from the 
+source time.</span>{% endif %}
+
+
+    <div class=tab30ex>
+
+    <div><input class=submit type="submit" name="save" value="Save" />
+    </div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
+{% endblock %}

Modified: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/object_lists.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/object_lists.html	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/object_lists.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -6,6 +6,8 @@
 
 <div class=toolbar>
     <form action="../simulations/create/" method="get"><input type="submit" value="New Simulation..." /></form>
+    <form action="mineos/modes/create/" method="get"><input type="submit" value="New Mode Catalog..." /></form>
+    <form action="mineos/parameters/create/" method="get"><input type="submit" value="Mineos..." /></form>
     <form action="../stations/upload/" method="get"><input type="submit" value="Upload Station List..." /></form>
     <form action="../meshes/create/" method="post">
         <select name="nchunks" size="1">
@@ -24,34 +26,21 @@
     <table rules=groups>
         <caption>simulations</caption>
         
-        <colgroup><col class=odd><col class=even><col class=odd><col class=even><col class=odd><col class=even><col class=odd></colgroup>
+        <colgroup><col class=odd><col class=even><col class=odd><col class=even><col class=odd></colgroup>
 
         <thead>
-        <tr><th>name</th><th>event</th><th>mesh</th><th>model</th><th>station list</th><th>record length</th><th>status</th></tr>
+        <tr><th>name</th><th>mesh</th><th>model</th><th>station list</th><th>record length</th></tr>
         </thead>
         
         <tbody>
         {% for sim in simulation_list %}
         <tr>
             <th><a href="/specfem3dglobe/simulations/{{ sim.id }}/">{{ sim.name }}</a></th>
-
-            <td>{{ sim.events.icon }}<a href="/specfem3dglobe/events/{{ sim.events.id }}/">{{ sim.events }}</a>
-                <br>
-                <span class=inlineInfo>
-                    {% if sim.events.singleSource %}
-                        M<sub>w</sub> &cong; {{ sim.events.singleSource.momentMagnitude|stringformat:".2f" }}
-                    {% else %}
-                        finite-source
-                    {% endif %}
-                </span>
-            </td>
-
             <td><a href="/specfem3dglobe/meshes/{{ sim.mesh.id }}/">{{ sim.mesh }}</a><br>
                 <span class=inlineInfo>shortest period &cong; {{ sim.mesh.shortestPeriod|stringformat:".0f" }}s</span></td>
             <td><a href="/specfem3dglobe/models/{{ sim.model.id }}/">{{ sim.model }}</a></td>
             <td><a href="/specfem3dglobe/stations/{{ sim.stations.id }}/">{{ sim.stations }}</a></td>
             <td>{{ sim.record_length }} minutes</td>
-            <td>{{ sim.status }}</td>
         </tr>
         {% endfor %}
         </tbody>
@@ -63,40 +52,6 @@
 
 
 <p>
-{% if station_lists %}
-    <table border=0 rules=groups>
-        <caption>stations</caption>
-
-        <colgroup><col class=odd><col class=even><col class=odd></colgroup>
-
-        <thead>
-        <tr>
-            <th>name</th>
-            <th>number of stations</th>
-            <th>downloads</th>
-        </tr>
-        </thead>
-
-        <tbody>
-        {% for station_list in station_lists %}
-        <tr>
-            <td><a href="../stations/{{ station_list.id }}/">{{ station_list.name }}</a></td>
-            <td>{{ station_list.station_set.count }}</td>
-            <td>
-                <a href="../stations/{{ station_list.id }}/gearth.kml"><img src="/specfem3dglobe/pics/kml.icon.gif" title="View in Google Earth" alt="View in Google Earth"></a>
-                [<a href="../stations/{{ station_list.id }}/stations.txt">text</a>]
-            </td>
-        </tr>
-        {% endfor %}
-        </tbody>
-
-    </table>
-{% else %}
-    <p>You have no stations.
-{% endif %}
-
-
-<p>
 {% if mesh_list %}
     <table border=1 rules=groups>
         <caption>meshes</caption>
@@ -214,4 +169,121 @@
     <p>You have no models.
 {% endif %}
 
+
+<p>
+{% if mode_catalog_list %}
+    <table rules=groups>
+        <caption>mode catalogs</caption>
+
+        <thead>
+        <tr>
+            <th>name</th>
+            <th>eps</th>
+            <th>wgrav</th>
+            <th>lmin</th>
+            <th>lmax</th>
+            <th>wmin</th>
+            <th>wmax</th>
+            <th>nmin</th>
+            <th>nmax</th>
+        </tr>
+        </thead>
+
+        <tbody>
+        {% for object in mode_catalog_list %}
+        <tr>
+            <th><a href="mineos/modes/{{ object.id }}/">XXXX</a></th>
+            <td>{{ object.eps }}</td>
+            <td>{{ object.wgrav }}</td>
+            <td>{{ object.lmin }}</td>
+            <td>{{ object.lmax }}</td>
+            <td>{{ object.wmin }}</td>
+            <td>{{ object.wmax }}</td>
+            <td>{{ object.nmin }}</td>
+            <td>{{ object.nmax }}</td>
+        </tr>
+        {% endfor %}
+        </tbody>
+
+    </table>
+{% else %}
+    <p>You have no mode catalogs.
+{% endif %}
+
+
+<p>
+{% if mineos_parameters_list %}
+    <table rules=groups>
+        <caption>mineos parameters</caption>
+
+        <thead>
+        <tr>
+            <th>name</th>
+            <th>catalog</th>
+            <th>radial</th>
+            <th>toroidal</th>
+            <th>spheroidal</th>
+            <th>ictoroidal</th>
+            <th>fmin</th>
+            <th>fmax</th>
+            <th>step</th>
+        </tr>
+        </thead>
+
+        <tbody>
+        {% for object in mineos_parameters_list %}
+        <tr>
+            <th><a href="mineos/parameters/{{ object.id }}/">XXXX</a></th>
+            <td>{{ object.catalog }}</td>
+            <td><span class={{ object.radial }}>{{ object.radial }}</span></td>
+            <td><span class={{ object.toroidal }}>{{ object.toroidal }}</span></td>
+            <td><span class={{ object.spheroidal }}>{{ object.spheroidal }}</span></td>
+            <td><span class={{ object.ictoroidal }}>{{ object.ictoroidal }}</span></td>
+            <td>{{ object.fmin }}</td>
+            <td>{{ object.fmax }}</td>
+            <td>{{ object.step }}</td>
+        </tr>
+        {% endfor %}
+        </tbody>
+
+    </table>
+{% else %}
+    <p>You have no Mineos parameters.
+{% endif %}
+
+
+<p>
+{% if station_lists %}
+    <table border=0 rules=groups>
+        <caption>stations</caption>
+
+        <colgroup><col class=odd><col class=even><col class=odd></colgroup>
+
+        <thead>
+        <tr>
+            <th>name</th>
+            <th>number of stations</th>
+            <th>downloads</th>
+        </tr>
+        </thead>
+
+        <tbody>
+        {% for station_list in station_lists %}
+        <tr>
+            <td><a href="../stations/{{ station_list.id }}/">{{ station_list.name }}</a></td>
+            <td>{{ station_list.station_set.count }}</td>
+            <td>
+                <a href="../stations/{{ station_list.id }}/gearth.kml"><img src="/specfem3dglobe/pics/kml.icon.gif" title="View in Google Earth" alt="View in Google Earth"></a>
+                [<a href="../stations/{{ station_list.id }}/stations.txt">text</a>]
+            </td>
+        </tr>
+        {% endfor %}
+        </tbody>
+
+    </table>
+{% else %}
+    <p>You have no stations.
+{% endif %}
+
+
 {% endblock %}

Deleted: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -1,13 +0,0 @@
-
-{% extends "SeismoWebPortal/objects.html" %}
-
-{% block content %}
-
-<h2 class=titlebar>delete simulation</h2>
-
-<form method="post" action="/specfem3dglobe/simulations/{{ object.id }}/delete/">
-    <p>Are you sure you want to delete the simulation "{{ object }}"?
-    <p><input type="submit" value="Delete" />
-</form>
-{% endblock %}
-

Deleted: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -1,126 +0,0 @@
-
-{% extends "SeismoWebPortal/objects.html" %}
-
-{% block content %}
-
-<h2 class=titlebar>{{ object.name }}</h2>
-
-<div class=toolbar>
-    <form action="edit/" method="get"><input type="submit" value="Edit..." /></form>
-
-    <form action="run/" method="post">
-        {% if user.userinfo.approved %}
-        <input type="submit" value="Run" />
-        {% else %}
-        <input type="submit" value="Run" DISABLED />
-        {% endif %}
-    </form>
-
-    <form action="delete/" method="get"><input type="submit" value="Delete" /></form>
-</div>
-
-<h3>runs</h3>
-
-{% if object.run_set.count %}
-
-<table rules=groups>
-
-    <colgroup><col class=odd><col class=even><col class=odd><col class=even><col class=odd></colgroup>
-
-    <thead>
-    <tr><th>#</th><th>status</th><th>started</th><th>finished</th><th>output</th></tr>
-    </thead>
-        
-    <tbody>
-    {% for run in object.run_set.all %}
-    <tr>
-        <th class=int>{{ forloop.counter }}</th>
-        <td>{{ run.status }}</td>
-        <td>{{ run.started|date }} {{ run.started|time }}</td>
-        <td>{{ run.finished|date }} {{ run.finished|time }}</td>
-        <td>
-        {% for job in run.job_set.all %}
-            <ul class=output>
-            {% for file in job.outputfile_set.all %}
-                <li><a href="{{ file.url }}">{{ file.name }}</a>
-            {% endfor %}
-            </ul>
-        {% endfor %}
-        </td>
-    </tr>
-    {% endfor %}
-    </tbody>
-
-</table>
-
-{% else %}
-
-<p>This simulation has never been run.</p>
-
-{% endif %}
-
-<div class=properties>
-
-    <div class=box>
-    <dl>
-        <dt>type</dt><dd>{% ifequal object.mesh.nchunks 6 %}global{% else %}regional{% endifequal %}</dd>
-        <dt>created</dt><dd>{{ object.created|date }} {{ object.created|time }}</dd>
-        <dt>modified</dt><dd>{{ object.modified|date }} {{ object.modified|time }}</dd>
-    </dl>
-    </div>
-
-    <div class=box>
-    <h3>general</h3>
-
-    <dl>
-        <dt>name</dt><dd>{{ object.name }}</dd>
-        <dt>event</dt><dd><a href="../../events/{{ object.events.id }}/">{{ object.events.name }}</a></dd>
-        <dt>station list</dt><dd><a href="../../stations/{{ object.stations.id }}/">{{ object.stations.name }}</a></dd>
-        <dt>record length</dt><dd>{{ object.record_length }} minutes</dd>
-    </dl>
-    </div>
-
-    <div class=box>
-    <h3>3D synthetics</h3>
-
-    <dl>
-        <dt>mesh</dt><dd><a href="../../meshes/{{ object.mesh.id }}/">{{ object.mesh.name }}</a></dd>
-        <dt>model</dt><dd><a href="../../models/{{ object.model.id }}/">{{ object.model.name }}</a></dd>
-        <dt>zero half duration</dt><dd>{{ object.zero_half_duration }}</dd>
-        <dt>receivers at depth</dt><dd>{{ object.receivers_can_be_buried }}</dd>
-    </dl>
-    </div>
-
-    {% if 0 %}
-    <div class=box>
-    <h3>movie</h3>
-    <dl>
-        <dt>create movie</dt><dd>{{ object.movie_surface }}</dd>
-        <dt>time steps between frames</dt><dd>{{ object.ntstep_between_frames }}</dd>
-        <dt>convolve source time function by Gaussian with half duration</dt><dd>{{ object.hdur_movie }}</dd>
-    </dl>
-    </div>
-    {% endif %}
-
-    <div class=box>
-    <h3>1D synthetics</h3>
-
-    <dl>
-        <dt>radial</dt><dd>{{ object.radial }}</dd>
-        <dt>toroidal</dt><dd>{{ object.toroidal }}</dd>
-        <dt>spheroidal</dt><dd>{{ object.spheroidal }}</dd>
-        <dt>inner core toroidal</dt><dd>{{ object.ictoroidal }}</dd>
-        <dt>eps</dt><dd>{{ object.eps }}</dd>
-        <dt>wgrav</dt><dd>{{ object.wgrav }} mHz (Neglect gravitational terms above {{ object.wgrav }} mHz.)</dd>
-        <dt>angular orders</dt><dd>{{ object.lmin }} <= l < {{ object.lmax }}</dd>
-        <dt>compute frequency range</dt><dd>{{ object.wmin }} <= w < {{ object.wmax }} mHz</dd>
-        <dt>dispersion branch numbers</dt><dd>{{ object.nmin }} <= n < {{ object.nmax }}</dd>
-        <dt>maximum depth</dt><dd>{{ object.max_depth }} km</dd>
-        <dt>select frequency range</dt><dd>{{ object.fmin }} <= f < {{ object.fmax }} mHz</dd>
-        <dt>sampling period</dt><dd>{{ object.step }} s</dd>
-    </dl>
-    </div>
-
-</div>
-
-{% endblock %}

Deleted: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -1,233 +0,0 @@
-
-{% extends "SeismoWebPortal/objects.html" %}
-
-{% block content %}
-
-<h2 class=titlebar>{% if object %}edit{% else %}new{% endif %} simulation</h2>
-
-<div class=toolbar>
-    <form method="post" action="/specfem3dglobe/help/toggle/">
-        <input type="hidden" name="post_toggle_redirect" value="{{ action }}">
-        {% if help_visible %}
-        <input type="submit" name="hide_help" value="Hide Help" />
-        {% else %}
-        <input type="submit" name="show_help" value="Show Help" />
-        {% endif %}
-    </form>
-
-    {% if object %}
-    <form action="../delete/" method="get"><input type="submit" value="Delete" /></form>
-    {% endif %}
-
-</div>
-
-<form method="post" action="{{ action }}">
-
-    {% if form.has_errors %}
-    <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
-    {% endif %}
-
-{% if form.has_errors %}
-<dl class=error>
-    {% for f in form.error_dict.iteritems %}
-    <dt>{{ f.0 }}</dt>
-    <dd>
-        <ul class=error>
-        {% for e in f.1 %}
-            <li>{{ e }}</li>
-        {% endfor %}
-        </ul>
-    </dd>
-    {% endfor %}
-</dl>
-{% endif %}
-
-    <div class=tab30ex>
-
-    <div>
-        <label for="id_name" class=before>name</label>
-        {{ form.name }}
-        {% if form.name.errors %}<span class=error>{{ form.name.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <input type="hidden" name="simulation_type" value="1">
-
-    <div>
-        <label for="id_events" class=before>event</label>
-        {{ form.events }}
-        {% if form.events.errors %}<span class=error>{{ form.events.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_stations" class=before>station list</label>
-        {{ form.stations }}
-        {% if form.stations.errors %}<span class=error>{{ form.stations.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_record_length" class=before>record length</label>
-        {{ form.record_length }} minutes
-        {% if form.record_length.errors %}<span class=error>{{ form.record_length.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Choose the desired record length of the synthetic seismograms (in minutes). This controls the length of the numerical simulation, i.e., twice the record length requires twice as much CPU time. This must be 100 minutes or less for simulations run via the web.</span>{% endif %}
-    </div>
-
-
-    <fieldset><legend>3D synthetics</legend>
-
-    <div>
-        <label for="id_mesh" class=before>mesh</label>
-        {{ form.mesh }}
-        {% if form.mesh.errors %}<span class=error>{{ form.mesh.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_model" class=before>model</label>
-        {{ form.model }}
-        {% if form.model.errors %}<span class=error>{{ form.model.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div class=checkbox>
-        {{ form.zero_half_duration }}
-        <label for="id_zero_half_duration" class=after>zero half duration</label>
-        {% if form.zero_half_duration.errors %}<span class=error>{{ form.zero_half_duration.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    {% if help_visible %}
-    <dl class=help><dt>zero half duration</dt><dd>For point-source simulations, we recommend setting the source half-duration parameter <code>half duration</code> equal to zero, which corresponds to simulating a step source-time function, i.e., a moment-rate function that is a delta function. If <code>half duration</code> is not set to zero, the code will use a Gaussian (i.e., a signal with a shape similar to a 'smoothed triangle', as explained in Komatitsch and Tromp [2002a]) source-time function with half-width <code>half duration</code>. We prefer to run the solver with <code>half duration</code> set to zero and convolve the resulting synthetic seismograms in post-processing after the run, because this way it is easy to use a variety of source-time functions. Komatitsch and Tromp [2002a] determined that the noise generated in the simulation by using a step source time function may be safely filtered out afterward based upon a convolution with the desired source time function and/or low-pass filtering. Use the script <code>process_syn.pl</code> for this purpose by specifying the <code>-h</code> option (the <code>process_syn.pl</code> script can be found in the <a href="/specfem3dglobe/samples/UTILS.tar.gz">utilities package</a>). Alternatively, use signal-processing software packages such as <a href="http://www.llnl.gov/sac/">SAC</a>.<p>For finite fault simulations, it is usually not advisable to use a zero half duration and convolve afterwards, since the half duration is generally fixed by the finite fault model.</dd></dl>
-    {% endif %}
-
-    <div class=checkbox>
-        {{ form.receivers_can_be_buried }}
-        <label for="id_receivers_can_be_buried" class=after>receivers at depth</label>
-        {% if form.receivers_can_be_buried.errors %}<span class=error>{{ form.receivers_can_be_buried.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>This flag accommodates stations with instruments that are buried, i.e., the solver will calculate seismograms at the burial depth specified in the station list.</span>{% endif %}
-    </div>
-
-    </fieldset> <!-- 3D synthetics-->
-
-    {% if 0 %}
-    <fieldset><legend>movie</legend>
-
-    <div class=checkbox>
-        {{ form.movie_surface }}
-        <label for="id_movie_surface" class=after>create movie</label>
-        {% if form.movie_surface.errors %}<span class=error>{{ form.movie_surface.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>If selected, a movie of seismic wave propagation on the Earth's surface is created. Turning this option on generates large output files.</span>{% endif %}
-    </div>
-
-    <input type="hidden" name="movie_volume" value="False">
-
-    <div>
-        <label for="id_ntstep_between_frames" class=before>time steps between frames</label>
-        {{ form.ntstep_between_frames }}
-        {% if form.ntstep_between_frames.errors %}<span class=error>{{ form.ntstep_between_frames.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Determines the number of timesteps between movie frames. Typically you want to  save a snapshot every 100 timesteps. The smaller you make this number, the more output will be generated!</span>{% endif %}
-    </div>
-
-    <div>
-        <label for="id_hdur_movie" class=before>convolve source time function by Gaussian with half duration</label>
-        {{ form.hdur_movie }}
-        {% if form.hdur_movie.errors %}<span class=error>{{ form.hdur_movie.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>Determines the half duration of the source time function for the movie simulations. When this parameter is set to zero, a default half duration that corresponds to the accuracy of the simulation is provided.</span>{% endif %}
-    </div>
-
-    </fieldset> <!-- movie -->
-
-    {% else %}
-    <input type="hidden" name="ntstep_between_frames" value="100">
-    <input type="hidden" name="hdur_movie" value="0">
-    {% endif %}
-
-    </div> <!-- tab30ex -->
-
-    <fieldset><legend>1D synthetics</legend>
-
-    <p>1D synthetics are generated using the PREM earth model, both with and without an ocean.
-
-    <fieldset><legend>oscillations</legend>
-
-    <div class=checkbox>
-        {{ form.radial }}
-        <label for="id_radial" class=after>radial</label>
-        {% if form.radial.errors %}<span class=error>{{ form.radial.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div class=checkbox>
-        {{ form.toroidal }}
-        <label for="id_toroidal" class=after>toroidal</label>
-        {% if form.toroidal.errors %}<span class=error>{{ form.toroidal.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div class=checkbox>
-        {{ form.spheroidal }}
-        <label for="id_spheroidal" class=after>spheroidal</label>
-        {% if form.spheroidal.errors %}<span class=error>{{ form.spheroidal.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    <div class=checkbox>
-        {{ form.ictoroidal }}
-        <label for="id_ictoroidal" class=after>inner core toroidal</label>
-        {% if form.ictoroidal.errors %}<span class=error>{{ form.ictoroidal.errors|join:", " }}</span>{% endif %}
-    </div>
-
-    </fieldset> <!-- oscillations -->
-
-    <div>
-        <label for="id_eps" class=before>eps</label>
-        {{ form.eps }}
-        {% if form.eps.errors %}<span class=error>{{ form.eps.errors|join:", " }}</span>{% endif %}
-        {% if help_visible %}<span class=help>The parameter <code>eps</code> controls the accuracy of the Runge-Kutta integration scheme. The relative accuracy 
-of an eigenfrequency is a factor 2 to 3 times <code>eps</code>. Parameter <code>eps</code> also controls the precision with which 
-a root is found and the minimum relative separation of two roots with the same angular order. It is 
-safe to set eps = 10<span style="vertical-align: super">-7</span> for periods greater than 10 seconds. For periods between 5 and 10 seconds, it 
-has to be set to 10<span style="vertical-align: super">-12</span>&mdash;10<span style="vertical-align: super">-10</span>.</span>{% endif %}
-    </div>
-
-    <p>Neglect gravitational terms above {{ form.wgrav }} mHz. {% if form.wgrav.errors %}<span class=error>{{ form.wgrav.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>This gives about a factor of 3 increase in speed.</span>{% endif %}
-
-    <p><label for="id_lmin" class=before>angular orders</label> {{ form.lmin }} <= l < {{ form.lmax }}
-       {% if form.lmin.errors %}<span class=error>{{ form.lmin.errors|join:", " }}</span>{% endif %}
-       {% if form.lmax.errors %}<span class=error>{{ form.lmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The range of angular orders l to be computed. For radial modes, this range is not used.</span>{% endif %}
-
-    <p><label for="id_wmin" class=before>compute frequency range</label> {{ form.wmin }} <= w < {{ form.wmax }} mHz
-       {% if form.wmin.errors %}<span class=error>{{ form.wmin.errors|join:", " }}</span>{% endif %}
-       {% if form.wmax.errors %}<span class=error>{{ form.wmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The frequency range to be computed (in millihertz).</span>{% endif %}
-
-    <p><label for="id_nmin" class=before>dispersion branch numbers</label> {{ form.nmin }} <= n < {{ form.nmax }}
-       {% if form.nmin.errors %}<span class=error>{{ form.nmin.errors|join:", " }}</span>{% endif %}
-       {% if form.nmax.errors %}<span class=error>{{ form.nmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The range of dispersion branch numbers n to be computed; n = 0 is the fundamental mode.</span>{% endif %}
-
-    <p><label for="id_max_depth" class=before>maximum depth</label> {{ form.max_depth }} km
-       {% if form.max_depth.errors %}<span class=error>{{ form.max_depth.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>Maximum depth, d<span style="vertical-align: sub">max</span>, to cut all output eigenfunctions (in km). All output values exist in the interval 
-(r<span style="vertical-align: sub">n</span>, r<span style="vertical-align: sub">n</span> - d<span style="vertical-align: sub">max</span>) only, where r<span style="vertical-align: sub">n</span> is the radius of the free surface in km.</span>{% endif %}
-
-    <p><label for="id_fmin" class=before>select frequency range</label> {{ form.fmin }} <= f < {{ form.fmax }} mHz
-       {% if form.fmin.errors %}<span class=error>{{ form.fmin.errors|join:", " }}</span>{% endif %}
-       {% if form.fmax.errors %}<span class=error>{{ form.fmax.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>The frequency range to be selected from the input eigenfunction databases. All 
-modes with frequencies out of this range are rejected.</span>{% endif %}
-
-    <p><label for="id_step" class=before>sampling period</label> {{ form.step }} s
-       {% if form.step.errors %}<span class=error>{{ form.step.errors|join:", " }}</span>{% endif %}
-       {% if help_visible %}<span class=help>This determines the number of samples in the synthetic seismograms. All synthetic seismograms start from the 
-source time.</span>{% endif %}
-
-    </fieldset> <!-- 1D synthetics -->
-
-
-    <div class=tab30ex>
-
-    <div><input class=submit type="submit" name="save" value="Save" />
-         <input class=submit type="submit" name="save_and_run" value="Save & Run" {% if not user.userinfo.approved %}DISABLED{% endif %} />
-    </div>
-
-    </div> <!-- tab30ex -->
-
-</form>
-
-{% endblock %}

Copied: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html (from rev 11262, cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html)
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	                        (rev 0)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -0,0 +1,13 @@
+
+{% extends "SeismoWebPortal/objects.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>delete simulation</h2>
+
+<form method="post" action="/specfem3dglobe/simulations/{{ object.id }}/delete/">
+    <p>Are you sure you want to delete the simulation "{{ object }}"?
+    <p><input type="submit" value="Delete" />
+</form>
+{% endblock %}
+

Copied: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html (from rev 10909, seismo/3D/SeismoWebPortal/branches/cig-spice-iris-2007/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html)
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	                        (rev 0)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -0,0 +1,56 @@
+
+{% extends "SeismoWebPortal/objects.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>{{ object.name }}</h2>
+
+<div class=toolbar>
+    <form action="edit/" method="get"><input type="submit" value="Edit..." /></form>
+    <form action="delete/" method="get"><input type="submit" value="Delete" /></form>
+</div>
+
+<div class=properties>
+
+    <div class=box>
+    <dl>
+        <dt>type</dt><dd>{% ifequal object.mesh.nchunks 6 %}global{% else %}regional{% endifequal %}</dd>
+        <dt>created</dt><dd>{{ object.created|date }} {{ object.created|time }}</dd>
+        <dt>modified</dt><dd>{{ object.modified|date }} {{ object.modified|time }}</dd>
+    </dl>
+    </div>
+
+    <div class=box>
+    <h3>general</h3>
+
+    <dl>
+        <dt>name</dt><dd>{{ object.name }}</dd>
+        <dt>mesh</dt><dd><a href="../../meshes/{{ object.mesh.id }}/">{{ object.mesh.name }}</a></dd>
+        <dt>model</dt><dd><a href="../../models/{{ object.model.id }}/">{{ object.model.name }}</a></dd>
+        <dt>record length</dt><dd>{{ object.record_length }} minutes</dd>
+    </dl>
+    </div>
+
+    <div class=box>
+    <h3>stations</h3>
+
+    <dl>
+        <dt>station list</dt><dd><a href="../../stations/{{ object.stations.id }}/">{{ object.stations.name }}</a></dd>
+        <dt>receivers at depth</dt><dd>{{ object.receivers_can_be_buried }}</dd>
+    </dl>
+    </div>
+
+    {% if 0 %}
+    <div class=box>
+    <h3>movie</h3>
+    <dl>
+        <dt>create movie</dt><dd>{{ object.movie_surface }}</dd>
+        <dt>time steps between frames</dt><dd>{{ object.ntstep_between_frames }}</dd>
+        <dt>convolve source time function by Gaussian with half duration</dt><dd>{{ object.hdur_movie }}</dd>
+    </dl>
+    </div>
+    {% endif %}
+
+</div>
+
+{% endblock %}

Copied: cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html (from rev 10909, seismo/3D/SeismoWebPortal/branches/cig-spice-iris-2007/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html)
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	                        (rev 0)
+++ cs/portal/trunk/seismo/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-02-27 20:44:15 UTC (rev 11272)
@@ -0,0 +1,129 @@
+
+{% extends "SeismoWebPortal/objects.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>{% if object %}edit{% else %}new{% endif %} simulation</h2>
+
+<div class=toolbar>
+    <form method="post" action="/specfem3dglobe/help/toggle/">
+        <input type="hidden" name="post_toggle_redirect" value="{{ action }}">
+        {% if help_visible %}
+        <input type="submit" name="hide_help" value="Hide Help" />
+        {% else %}
+        <input type="submit" name="show_help" value="Show Help" />
+        {% endif %}
+    </form>
+
+    {% if object %}
+    <form action="../delete/" method="get"><input type="submit" value="Delete" /></form>
+    {% endif %}
+
+</div>
+
+<form method="post" action="{{ action }}">
+
+    {% if form.has_errors %}
+    <p><span class=error>Please correct the following error{{ form.error_dict|pluralize }}.</span>
+    {% endif %}
+
+    <div class=tab30ex>
+
+    <div>
+        <label for="id_name" class=before>name</label>
+        {{ form.name }}
+        {% if form.name.errors %}<span class=error>{{ form.name.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <input type="hidden" name="simulation_type" value="1">
+
+    <div class=checkbox>
+        {{ form.zero_half_duration }}
+        <label for="id_zero_half_duration" class=after>zero half duration</label>
+        {% if form.zero_half_duration.errors %}<span class=error>{{ form.zero_half_duration.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    {% if help_visible %}
+    <dl class=help><dt>zero half duration</dt><dd>For point-source simulations, we recommend setting the source half-duration parameter <code>half duration</code> equal to zero, which corresponds to simulating a step source-time function, i.e., a moment-rate function that is a delta function. If <code>half duration</code> is not set to zero, the code will use a Gaussian (i.e., a signal with a shape similar to a 'smoothed triangle', as explained in Komatitsch and Tromp [2002a]) source-time function with half-width <code>half duration</code>. We prefer to run the solver with <code>half duration</code> set to zero and convolve the resulting synthetic seismograms in post-processing after the run, because this way it is easy to use a variety of source-time functions. Komatitsch and Tromp [2002a] determined that the noise generated in the simulation by using a step source time function may be safely filtered out afterward based upon a convolution with the desired source time function and/or low-pass filtering. Use the script <code>process_syn.pl</code> for this purpose by specifying the <code>-h</code> option (the <code>process_syn.pl</code> script can be found in the <a href="/specfem3dglobe/samples/UTILS.tar.gz">utilities package</a>). Alternatively, use signal-processing software packages such as <a href="http://www.llnl.gov/sac/">SAC</a>.<p>For finite fault simulations, it is usually not advisable to use a zero half duration and convolve afterwards, since the half duration is generally fixed by the finite fault model.</dd></dl>
+    {% endif %}
+
+    <div>
+        <label for="id_mesh" class=before>mesh</label>
+        {{ form.mesh }}
+        {% if form.mesh.errors %}<span class=error>{{ form.mesh.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_model" class=before>model</label>
+        {{ form.model }}
+        {% if form.model.errors %}<span class=error>{{ form.model.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_record_length" class=before>record length</label>
+        {{ form.record_length }} minutes
+        {% if form.record_length.errors %}<span class=error>{{ form.record_length.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>Choose the desired record length of the synthetic seismograms (in minutes). This controls the length of the numerical simulation, i.e., twice the record length requires twice as much CPU time. This must be 100 minutes or less for simulations run via the web.</span>{% endif %}
+    </div>
+
+
+    <fieldset><legend>stations</legend>
+
+    <div>
+        <label for="id_stations" class=before>station list</label>
+        {{ form.stations }}
+        {% if form.stations.errors %}<span class=error>{{ form.stations.errors|join:", " }}</span>{% endif %}
+    </div>
+
+    <div class=checkbox>
+        {{ form.receivers_can_be_buried }}
+        <label for="id_receivers_can_be_buried" class=after>receivers at depth</label>
+        {% if form.receivers_can_be_buried.errors %}<span class=error>{{ form.receivers_can_be_buried.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>This flag accommodates stations with instruments that are buried, i.e., the solver will calculate seismograms at the burial depth specified in the station list.</span>{% endif %}
+    </div>
+
+
+    </fieldset> <!-- stations -->
+
+    {% if 0 %}
+    <fieldset><legend>movie</legend>
+
+    <div class=checkbox>
+        {{ form.movie_surface }}
+        <label for="id_movie_surface" class=after>create movie</label>
+        {% if form.movie_surface.errors %}<span class=error>{{ form.movie_surface.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>If selected, a movie of seismic wave propagation on the Earth's surface is created. Turning this option on generates large output files.</span>{% endif %}
+    </div>
+
+    <input type="hidden" name="movie_volume" value="False">
+
+    <div>
+        <label for="id_ntstep_between_frames" class=before>time steps between frames</label>
+        {{ form.ntstep_between_frames }}
+        {% if form.ntstep_between_frames.errors %}<span class=error>{{ form.ntstep_between_frames.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>Determines the number of timesteps between movie frames. Typically you want to  save a snapshot every 100 timesteps. The smaller you make this number, the more output will be generated!</span>{% endif %}
+    </div>
+
+    <div>
+        <label for="id_hdur_movie" class=before>convolve source time function by Gaussian with half duration</label>
+        {{ form.hdur_movie }}
+        {% if form.hdur_movie.errors %}<span class=error>{{ form.hdur_movie.errors|join:", " }}</span>{% endif %}
+        {% if help_visible %}<span class=help>Determines the half duration of the source time function for the movie simulations. When this parameter is set to zero, a default half duration that corresponds to the accuracy of the simulation is provided.</span>{% endif %}
+    </div>
+
+    </fieldset> <!-- movie -->
+
+    {% else %}
+    <input type="hidden" name="ntstep_between_frames" value="100">
+    <input type="hidden" name="hdur_movie" value="0">
+    {% endif %}
+
+
+    <div><input class=submit type="submit" name="save" value="Save" />
+    </div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
+{% endblock %}

Modified: cs/portal/trunk/seismo/SeismoWebPortal/urls.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/urls.py	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/urls.py	2008-02-27 20:44:15 UTC (rev 11272)
@@ -2,7 +2,8 @@
 import os
 
 from django.conf.urls.defaults import *
-from models import Mesh, Model, Simulation, UserInfo
+from models import Mesh, Model, Specfem3DGlobeParameters, UserInfo
+from models import MineosModeCatalog, MineosParameters
 from models import Event, Source
 from models import Station, StationList, StationNetwork
 from models import Run, Job, OutputFile
@@ -22,7 +23,7 @@
 
 mesh_delete_args = {
     'model': Mesh,
-    'post_delete_redirect': '/specfem3dglobe/meshes/',
+    'post_delete_redirect': '/specfem3dglobe/objects/',
 }
 
 
@@ -31,7 +32,7 @@
 
 model_delete_args = {
     'model': Model,
-    'post_delete_redirect': '/specfem3dglobe/models/',
+    'post_delete_redirect': '/specfem3dglobe/objects/',
 }
 
 
@@ -39,8 +40,8 @@
 # Simulation
 
 simulation_delete_args = {
-    'model': Simulation,
-    'post_delete_redirect': '/specfem3dglobe/simulations/',
+    'model': Specfem3DGlobeParameters,
+    'post_delete_redirect': '/specfem3dglobe/objects/',
 }
 
 
@@ -136,14 +137,18 @@
     (r'^registration/password/$', 'SeismoWebPortal.views.password_change', password_change_args),
 
     (r'^objects/$', 'SeismoWebPortal.views.object_list'),
+    (r'^objects/mineos/modes/create/$', 'SeismoWebPortal.views.create', dict(ModelClass = MineosModeCatalog)),
+    (r'^objects/mineos/modes/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.update', dict(ModelClass = MineosModeCatalog)),
+    (r'^objects/mineos/parameters/create/$', 'SeismoWebPortal.views.create', dict(ModelClass = MineosParameters)),
+    (r'^objects/mineos/parameters/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.update', dict(ModelClass = MineosParameters)),
 
     (r'^meshes/create/$', 'SeismoWebPortal.views.create_mesh'),
     (r'^meshes/create/(?P<nchunks>\d+)/$', 'SeismoWebPortal.views.manipulate_mesh', dict(action='create')),
     (r'^meshes/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.manipulate_mesh', dict(action='edit')),
     (r'^meshes/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', mesh_delete_args),
 
-    (r'^models/create/$', 'SeismoWebPortal.views.create_model'),
-    (r'^models/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.update_model'),
+    (r'^models/create/$', 'SeismoWebPortal.views.create', dict(ModelClass = Model)),
+    (r'^models/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.update', dict(ModelClass = Model)),
     (r'^models/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', model_delete_args),
 
     (r'^simulations/create/$', 'SeismoWebPortal.views.create_simulation'),

Modified: cs/portal/trunk/seismo/SeismoWebPortal/views.py
===================================================================
--- cs/portal/trunk/seismo/SeismoWebPortal/views.py	2008-02-27 19:58:44 UTC (rev 11271)
+++ cs/portal/trunk/seismo/SeismoWebPortal/views.py	2008-02-27 20:44:15 UTC (rev 11272)
@@ -10,7 +10,8 @@
 from django.template.context import RequestContext
 from create_update import create_object, update_object
 from forms import RegistrationAddManipulator, RegistrationChangeManipulator
-from models import Simulation, Model, Mesh, Station, StationList, StationNetwork, DataSource, Region
+from models import Model, Mesh, Station, StationList, StationNetwork, DataSource, Region
+from models import MineosModeCatalog, MineosParameters
 from models import Run, Job, OutputFile
 from cmt import CMTSolution
 
@@ -18,6 +19,9 @@
 from HTMLParser import HTMLParser
 
 
+from models import Specfem3DGlobeParameters as Simulation # NYI
+
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Meshes, Models, Simulations
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -43,9 +47,11 @@
 def object_list(request):
     return render_to_response('SeismoWebPortal/object_lists.html',
                               {'simulation_list': Simulation.objects.filter(user=request.user),
-                               'station_lists': StationList.objects.filter(user__exact=request.user),
                                'mesh_list': Mesh.user_objects.all(),
                                'model_list': Model.user_objects.all(),
+                               'mode_catalog_list': MineosModeCatalog.objects.all(),
+                               'mineos_parameters_list': MineosParameters.objects.all(),
+                               'station_lists': StationList.objects.filter(user__exact=request.user),
                                },
                               RequestContext(request, {}))
 object_list = login_required(object_list)
@@ -504,10 +510,10 @@
 def create_mesh(request):
 
     if request.method != 'POST':
-        return HttpResponseRedirect('/specfem3dglobe/meshes/')
+        return HttpResponseRedirect('/specfem3dglobe/objects/')
         
     nchunks = int(request.POST['nchunks'])
-    return HttpResponseRedirect('/specfem3dglobe/meshes/create/%d/' % nchunks)
+    return HttpResponseRedirect('/specfem3dglobe/objects/create/%d/' % nchunks)
 
 create_mesh = login_required(create_mesh)
 
@@ -558,7 +564,7 @@
                 manipulator.do_html2python(new_data)
                 manipulator.save(new_data)
                 if not errors:
-                    return HttpResponseRedirect('/specfem3dglobe/meshes/')
+                    return HttpResponseRedirect('/specfem3dglobe/objects/')
     else:
         # Populate new_data with a 'flattened' version of the current data.
         new_data = manipulator.flatten_data()
@@ -579,25 +585,28 @@
 manipulate_mesh = login_required(manipulate_mesh)
 
 
-def create_model(request):
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# generic
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+def create(request, ModelClass):
     return create_object(request,
-                         Model,
-                         #post_save_redirect = '/specfem3dglobe/models/%(id)d/',
-                         post_save_redirect = '/specfem3dglobe/models/',
+                         ModelClass,
+                         post_save_redirect = '/specfem3dglobe/objects/',
                          follow = { 'user': False },
                          )
-create_model = login_required(create_model)
+create = login_required(create)
 
 
-def update_model(request, object_id):
+def update(request, object_id, ModelClass):
     return update_object(request,
-                         Model,
+                         ModelClass,
                          object_id,
-                         #post_save_redirect = '/specfem3dglobe/models/%(id)d/',
-                         post_save_redirect = '/specfem3dglobe/models/',
+                         post_save_redirect = '/specfem3dglobe/objects/',
                          follow = { 'user': False },
                          )
-update_model = login_required(update_model)
+update = login_required(update)
 
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the cig-commits mailing list