[cig-commits] r11887 - in cs/portal/trunk/northridge/SeismoWebPortal: . templates/SeismoWebPortal

leif at geodynamics.org leif at geodynamics.org
Thu May 1 15:15:52 PDT 2008


Author: leif
Date: 2008-05-01 15:15:52 -0700 (Thu, 01 May 2008)
New Revision: 11887

Added:
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html
Removed:
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_list.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulations.html
Modified:
   cs/portal/trunk/northridge/SeismoWebPortal/forms.py
   cs/portal/trunk/northridge/SeismoWebPortal/models.py
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/events.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/meshes.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalogs.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodels.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/settings.html
   cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stations.html
   cs/portal/trunk/northridge/SeismoWebPortal/urls.py
   cs/portal/trunk/northridge/SeismoWebPortal/views.py
Log:
Merged and renamed Specfem model classes.  Cf. r11886, r11272.


Modified: cs/portal/trunk/northridge/SeismoWebPortal/forms.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/forms.py	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/forms.py	2008-05-01 22:15:52 UTC (rev 11887)
@@ -8,7 +8,7 @@
 import models
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Simulation
+# Specfem 3D Globe meshes
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -53,32 +53,37 @@
         return
 
 
-class MeshAddManipulator(models.Mesh.AddManipulator, MeshManipulator):
+class MeshAddManipulator(models.Specfem3DGlobeMesh.AddManipulator, MeshManipulator):
     def __init__(self, nchunks):
-        models.Mesh.AddManipulator.__init__(self)
+        models.Specfem3DGlobeMesh.AddManipulator.__init__(self)
         MeshManipulator.__init__(self, nchunks)
 
     def save(self, new_data):
         MeshManipulator.save(self, new_data)
-        return models.Mesh.AddManipulator.save(self, new_data)
+        return models.Specfem3DGlobeMesh.AddManipulator.save(self, new_data)
 
 
-class MeshChangeManipulator(models.Mesh.ChangeManipulator, MeshManipulator):
+class MeshChangeManipulator(models.Specfem3DGlobeMesh.ChangeManipulator, MeshManipulator):
     def __init__(self, nchunks, object_id):
-        models.Mesh.ChangeManipulator.__init__(self, object_id)
+        models.Specfem3DGlobeMesh.ChangeManipulator.__init__(self, object_id)
         MeshManipulator.__init__(self, nchunks)
 
     def flatten_data(self):
-        new_data = models.Mesh.ChangeManipulator.flatten_data(self)
+        new_data = models.Specfem3DGlobeMesh.ChangeManipulator.flatten_data(self)
         new_data['nproc'] = self.original_object.nproc_xi
         new_data['nex_c'] = self.original_object.nex_xi_c
         return new_data
 
     def save(self, new_data):
         MeshManipulator.save(self, new_data)
-        return models.Mesh.ChangeManipulator.save(self, new_data)
+        return models.Specfem3DGlobeMesh.ChangeManipulator.save(self, new_data)
 
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# Runs
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
 class RunStatusManipulator(forms.Manipulator):
 
     def __init__(self):

Modified: cs/portal/trunk/northridge/SeismoWebPortal/models.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/models.py	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/models.py	2008-05-01 22:15:52 UTC (rev 11887)
@@ -50,19 +50,6 @@
         ss = self.singleSource
         return ss and ss.beachball() or ""
 
-    def copy(self, objMap):
-        from copy import copy
-        obj = copy(self)
-        obj.id = None
-        obj.user = objMap[User][self.user.id]
-        super(Event, obj).save()
-        for source in self.source_set.all():
-            sourceCopy = copy(source)
-            sourceCopy.id = None
-            sourceCopy.event = obj
-            sourceCopy.save()
-        return obj
-
     def delete(self):
         self.source_set.all().delete()
         super(Event, self).delete()
@@ -217,19 +204,6 @@
 
     def __str__(self): return self.name
 
-    def copy(self, objMap):
-        from copy import copy
-        obj = copy(self)
-        obj.id = None
-        obj.user = objMap[User][self.user.id]
-        super(StationList, obj).save()
-        for station in self.station_set.all():
-            stationCopy = copy(station)
-            stationCopy.id = None
-            stationCopy.stationList = obj
-            stationCopy.save()
-        return obj
-
     def delete(self):
         self.station_set.all().delete()
         super(StationList, self).delete()
@@ -253,7 +227,7 @@
 
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-# Meshes, Models, Simulations
+# Specfem 3D Globe
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -271,11 +245,6 @@
 
 MODEL_TYPES = tuple([(num+1, model_types[num][1]) for num in xrange(0, len(model_types))])
 
-SIMULATION_TYPES = (
-    (1, 'forward'),
-)
-
-
 NCHUNKS_CHOICES = (
     (1, 'regional with 1 chunk'),
     (2, 'regional with 2 chunks'),
@@ -288,13 +257,8 @@
 NEX_C_CHOICES = oneThruNine
 
 
-class Mesh(models.Model):
+class Specfem3DGlobeMesh(models.Model):
 
-    user = models.ForeignKey(User, blank=True)
-    name = models.CharField(maxlength=100)
-    created = models.DateTimeField(auto_now_add=True, editable=False)
-    modified = models.DateTimeField(auto_now=True, editable=False)
-    
     nchunks = models.IntegerField(core=True, choices=NCHUNKS_CHOICES, default=1)
     nproc_xi = models.IntegerField(core=True, choices=NPROC_CHOICES, default=5)
     nproc_eta = models.IntegerField(core=True, choices=NPROC_CHOICES, default=5)
@@ -302,8 +266,6 @@
     nex_eta_c = models.IntegerField(core=True, choices=NEX_C_CHOICES, default=2)
     def nex_xi(self): return 8 * self.nex_xi_c * self.nproc_xi
     def nex_eta(self): return 8 * self.nex_eta_c * self.nproc_eta
-    #save_files = models.BooleanField(core=True)
-    def save_files(self): return False
 
     # this is for regional only (when type == 2), and when global, all these values are fixed
     angular_width_eta = models.FloatField(max_digits=19, decimal_places=10, core=True)
@@ -314,7 +276,7 @@
 
     # managers
     objects = models.Manager()
-    user_objects = CurrentUserManager()
+    user_objects = objects #CurrentUserManager()
 
     def shortestPeriod(self):
         if self.nchunks == 6:
@@ -322,64 +284,7 @@
         # regional
         return (256.0 / float(self.nex_xi())) * (self.angular_width_xi / 90.0) * 17.0
 
-    def __str__(self): return self.name
 
-    def save(self):
-        self.user = get_current_user()
-        super(Mesh, self).save()
-
-    def copy(self, objMap):
-        from copy import copy
-        obj = copy(self)
-        obj.id = None
-        obj.user = objMap[User][self.user.id]
-        super(Mesh, obj).save()
-        return obj
-
-    class Admin:
-        pass
-
-
-class Model(models.Model):
-    
-    user = models.ForeignKey(User, blank=True)
-    name = models.CharField(maxlength=100)
-    created = models.DateTimeField(auto_now_add=True, editable=False)
-    modified = models.DateTimeField(auto_now=True, editable=False)
-    
-    type = models.IntegerField(choices=MODEL_TYPES, core=True, default=False)
-    oceans = models.BooleanField(core=True, default=False)
-    gravity = models.BooleanField(core=True, default=False)
-    attenuation = models.BooleanField(core=True, default=False)
-    topography = models.BooleanField(core=True, default=False)
-    rotation = models.BooleanField(core=True, default=False)
-    ellipticity = models.BooleanField(core=True, default=False)
-
-    # managers
-    objects = models.Manager()
-    user_objects = CurrentUserManager()
-
-    def __str__(self): return self.name
-
-    def save(self):
-        self.user = get_current_user()
-        super(Model, self).save()
-
-    def copy(self, objMap):
-        from copy import copy
-        obj = copy(self)
-        obj.id = None
-        obj.user = objMap[User][self.user.id]
-        super(Model, obj).save()
-        return obj
-
-    def get_type_id(self):
-        return model_types[self.type-1][0]
-
-    class Admin:
-        pass
-
-
 def isValidRecordLength(field_data, all_data):
     lower = 0.0
     upper = 100.0
@@ -389,56 +294,21 @@
     raise validators.ValidationError("Please enter a positive number between %.1f and %.1f." % (lower, upper))
 
 
-class Simulation(models.Model):
-    #
-    # general information about the simulation
-    #
-    user = models.ForeignKey(User)
-    name = models.CharField(maxlength=100, core=True)
-    created = models.DateTimeField(auto_now_add=True, editable=False)
-    modified = models.DateTimeField(auto_now=True, editable=False)
-    
-    mesh = models.ForeignKey(Mesh, limit_choices_to = {'user__exact': CurrentUser()})
-    model = models.ForeignKey(Model, limit_choices_to = {'user__exact': CurrentUser()})
+class Specfem3DGlobeParameters(models.Model):
+    mesh = models.ForeignKey(Specfem3DGlobeMesh)
 
-    zero_half_duration = models.BooleanField(default=True)
-    
-    #
-    # specific information starts here
-    #
-    record_length = models.FloatField(max_digits=19, decimal_places=10, core=True, default=20.0,
-                                      validator_list=[isValidRecordLength])
-    receivers_can_be_buried = models.BooleanField(core=True)
-    print_source_time_function = models.BooleanField(core=True)
-    save_forward = models.BooleanField(core=True, default=False)
+    model = models.IntegerField(choices=MODEL_TYPES, core=True, default=2)
+    oceans = models.BooleanField(core=True, default=True)
+    gravity = models.BooleanField(core=True, default=True)
+    attenuation = models.BooleanField(core=True, default=True)
+    topography = models.BooleanField(core=True, default=True)
+    rotation = models.BooleanField(core=True, default=True)
+    ellipticity = models.BooleanField(core=True, default=True)
 
-    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()})
-
-    # hdur_movie:
-    hdur_movie = models.FloatField(max_digits=19, decimal_places=10, core=True, default=0.0, blank=True)
-    # absorbing_conditions: set to true for regional, and false for global
-    absorbing_conditions = models.BooleanField(core=True)
-    # ntstep_between_frames: typical value is 100 time steps
-    ntstep_between_frames = models.IntegerField(core=True, default=100)
-    # ntstep_between_output_info: typical value is 100 time steps
-    ntstep_between_output_info = models.IntegerField(core=True, default=100, blank=True)
-    # ntstep_between_output_seismos : typical value is 5000
-    ntstep_between_output_seismos = models.IntegerField(core=True, default=5000, blank=True)
-    # simulation_type:
-    simulation_type = models.IntegerField(choices=SIMULATION_TYPES, default=1)
-
     # managers
     objects = models.Manager()
-    user_objects = CurrentUserManager()
+    user_objects = objects #CurrentUserManager()
 
-    def __str__(self): return self.name
-    
     def nodes(self):
         """Return the number of processors required for this simulation."""
         mesh = self.mesh
@@ -446,55 +316,19 @@
 
     def auto_absorbing_conditions(self):
         """Return 'True' for regional, 'False' for global."""
-        # The corresponding data field, 'absorbing_conditions', is
-        # currently unused.  Instead, we always turn on absorbing
-        # conditions, except for global simulations (absorbing
-        # conditions are not permitted in the full earth).
-        # Presumably, one might have reason to set it to 'False' for
-        # regional simulations, since it does exist as a separate
-        # input to the code.
+        # Absorbing conditions must be disabled for global simulations
+        # (otherwise the code bombs with an error message).  For
+        # regional simulations, we always turn on absorbing
+        # conditions.  Presumably, one might have reason to set it to
+        # 'False' for regional simulations, since it does exist as a
+        # separate input to the code... but currently the UI does not
+        # allow this.
         return not self.mesh.nchunks == 6
 
-    def save(self):
-        self.user = get_current_user()
-        self.ntstep_between_output_info = 100
-        self.ntstep_between_output_seismos = 5000
-        super(Simulation, self).save()
-        return
+    def get_model_id(self):
+        return model_types[self.model-1][0]
 
-    def copy(self, objMap):
-        from copy import copy
-        obj = copy(self)
-        obj.id = None
-        obj.user = objMap[User][self.user.id]
-        obj.mesh = objMap[Mesh][self.mesh.id]
-        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()
-        return obj
 
-    def run(self):
-        r = Run()
-        r.simulation = self
-        r.save()
-        return r
-
-    def _getStatus(self):
-        if not hasattr(self, '_status'):
-            self._status = "new"
-            for run in self.run_set.all():
-                self._status = run.status
-        return self._status
-    status = property(_getStatus)
-
-    def get_simulation_type_id(self):
-        return {1: 'forward', 2: 'adjoint', 3: 'both'}[self.simulation_type]
-
-    class Admin:
-        pass
-
-
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Mineos
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -577,14 +411,14 @@
 
 class Run(models.Model):
     # each simulation may have multiple runs
-    simulation = models.ForeignKey(Simulation)
+    #simulation = models.ForeignKey(Simulation)
 
     status = models.CharField(maxlength=100)
     started = models.DateTimeField(auto_now_add=True, editable=False)
     finished = models.DateTimeField(null=True, blank=True)
 
     class Admin:
-        list_display = ('simulation', 'status', 'started', 'finished')
+        list_display = ('status', 'started', 'finished')
 
     def __str__(self):
         return "%s r%d" % (self.simulation.name, self.id)

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/events.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/events.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/events.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li class=selected><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/home.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class="first selected"><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_confirm_delete.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_confirm_delete.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,13 +0,0 @@
-
-{% extends "SeismoWebPortal/meshes.html" %}
-
-{% block content %}
-
-<h2 class=titlebar>delete mesh</h2>
-
-<form method="post" action="/specfem3dglobe/meshes/{{ object.id }}/delete/">
-    <p>Are you sure you want to delete the mesh "{{ object }}"?
-    <p><input type="submit" value="Delete" />
-</form>
-
-{% endblock %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_form_base.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -29,12 +29,6 @@
 
     <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>
-
     <fieldset><legend>chunks</legend>
 
     <p>Nchunks = {{ nchunks }}

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_list.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_list.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,90 +0,0 @@
-
-{% extends "SeismoWebPortal/meshes.html" %}
-
-{% block content %}
-
-<div class=toolbar>
-            <form action="create/" method="post">
-                <select name="nchunks" size="1">
-                    <option value="1">regional with 1 chunk</option>
-                    <option value="2">regional with 2 chunks</option>
-                    <option value="3">regional with 3 chunks</option>
-                    <option value="6" selected="selected">global (6 chunks)</option>
-                </select>
-                <input type="submit" value="New..." />
-            </form>
-</div>
-
-{% if object_list %}
-    <table border=1 rules=groups>
-        <colgroup><col class=odd></colgroup>
-        <colgroup><col class=even></colgroup>
-        <colgroup><col class=odd><col class=even></colgroup>
-        <colgroup><col class=odd><col class=even></colgroup>
-        <colgroup><col class=odd><col class=even></colgroup>
-        <colgroup><col class=odd><col class=even></colgroup>
-        <colgroup><col class=odd></colgroup>
-        <colgroup><col class=even></colgroup>
-        <colgroup><col class=odd></colgroup>
-
-        <thead>
-        <tr>
-            <th></th>
-            <th></th>
-            <th colspan=2 class=colgroup>nproc</th>
-            <th colspan=2 class=colgroup>nex</th>
-            <th colspan=2 class=colgroup>angular width</th>
-            <th colspan=2 class=colgroup>center</th>
-            <th></th>
-            <th></th>
-        </tr>
-
-        <tr>
-            <th>name</th>
-            <th>nchunks</th>
-            <th>&eta;</th>
-            <th>&xi;</th>
-            <th>&eta;</th>
-            <th>&xi;</th>
-            <th>&eta;</th>
-            <th>&xi;</th>
-            <th>latitude</th>
-            <th>longitude</th>
-            <th>gamma rotation azimuth</th>
-            <th>shortest period (s)</th>
-        </tr>
-        </thead>
-
-        <tbody>
-        {% for object in object_list %}
-        <tr>
-            <th><a href="{{ object.id }}/">{{ object.name }}</a></th>
-            <td class=int>{{ object.nchunks }}</td>
-            <td class=int>{{ object.nproc_eta }}</td>
-            <td class=int>{{ object.nproc_xi }}</td>
-            <td class=int>{{ object.nex_eta }}</td>
-            <td class=int>{{ object.nex_xi }}</td>
-            {% ifequal object.nchunks 6 %}
-            <td class=notApplicable>n/a</td>
-            <td class=notApplicable>n/a</td>
-            <td class=notApplicable>n/a</td>
-            <td class=notApplicable>n/a</td>
-            <td class=notApplicable>n/a</td>
-            {% else %}
-            <td class=float>{{ object.angular_width_eta }}&deg;</td>
-            <td class=float>{{ object.angular_width_xi }}&deg;</td>
-            <td class=float>{{ object.center_latitude }}&deg;</td>
-            <td class=float>{{ object.center_longitude }}&deg;</td>
-            <td class=float>{{ object.gamma_rotation_azimuth }}&deg;</td>
-            {% endifequal %}
-            <td class=int>{{ object.shortestPeriod|stringformat:".0f" }}</td>
-        </tr>
-        {% endfor %}
-        </tbody>
-
-    </table>
-{% else %}
-    <p>You have no meshes.
-{% endif %}
-
-{% endblock %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/meshes.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/meshes.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/meshes.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/pecfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li class=selected><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li class=selected><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalogs.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalogs.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodecatalogs.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li class=selected><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodels.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodels.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosmodels.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li class=selected><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mineosparameters.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li class=selected><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/settings.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/settings.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/settings.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li class=selected><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,13 +0,0 @@
-
-{% extends "SeismoWebPortal/simulations.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/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,126 +0,0 @@
-
-{% extends "SeismoWebPortal/simulations.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/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,150 +0,0 @@
-
-{% extends "SeismoWebPortal/simulations.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><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 %}

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_list.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_list.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_list.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,50 +0,0 @@
-
-{% extends "SeismoWebPortal/simulations.html" %}
-
-{% block content %}
-
-<div class=toolbar>
-    <form action="create/" method="get"><input type="submit" value="New..." /></form>
-</div>
-
-{% if object_list %}
-    <table rules=groups>
-        
-        <colgroup><col class=odd><col class=even><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>
-        </thead>
-        
-        <tbody>
-        {% for sim in object_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>
-
-    </table>
-{% else %}
-    <p>You have no simulations.
-{% endif %}
-
-{% endblock %}

Deleted: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulations.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulations.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulations.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -1,26 +0,0 @@
-
-{% extends "SeismoWebPortal/base.html" %}
-
-{% block desktop %}
-
-<div class=taskbar>
-    <ul>
-        <li class=first><a href="/specfem3dglobe/">home</a>
-        <li class=selected><a href="/specfem3dglobe/simulations/">3D</a>
-        <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
-        <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
-        <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
-        <li><a href="/specfem3dglobe/events/">events</a>
-        <li><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
-        <li><a href="/specfem3dglobe/registration/">profile</a>
-    </ul>
-</div>
-
-<h1 class=titlebar>simulations</h1>
-
-{% block content %}
-{% endblock %}
-
-{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html (from rev 11876, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_confirm_delete.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_confirm_delete.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,13 @@
+
+{% extends "SeismoWebPortal/meshes.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>delete mesh</h2>
+
+<form method="post" action="/specfem3dglobe/specfem3dglobemeshes/{{ object.id }}/delete/">
+    <p>Are you sure you want to delete the mesh "{{ object }}"?
+    <p><input type="submit" value="Delete" />
+</form>
+
+{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html (from rev 11876, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/mesh_list.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobemesh_list.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,86 @@
+
+{% extends "SeismoWebPortal/meshes.html" %}
+
+{% block content %}
+
+<div class=toolbar>
+            <form action="create/" method="post">
+                <select name="nchunks" size="1">
+                    <option value="1">regional with 1 chunk</option>
+                    <option value="2">regional with 2 chunks</option>
+                    <option value="3">regional with 3 chunks</option>
+                    <option value="6" selected="selected">global (6 chunks)</option>
+                </select>
+                <input type="submit" value="New..." />
+            </form>
+</div>
+
+{% if object_list %}
+    <table border=1 rules=groups>
+        <colgroup><col class=even></colgroup>
+        <colgroup><col class=odd><col class=even></colgroup>
+        <colgroup><col class=odd><col class=even></colgroup>
+        <colgroup><col class=odd><col class=even></colgroup>
+        <colgroup><col class=odd><col class=even></colgroup>
+        <colgroup><col class=odd></colgroup>
+        <colgroup><col class=even></colgroup>
+        <colgroup><col class=odd></colgroup>
+
+        <thead>
+        <tr>
+            <th></th>
+            <th colspan=2 class=colgroup>nproc</th>
+            <th colspan=2 class=colgroup>nex</th>
+            <th colspan=2 class=colgroup>angular width</th>
+            <th colspan=2 class=colgroup>center</th>
+            <th></th>
+            <th></th>
+        </tr>
+
+        <tr>
+            <th>nchunks</th>
+            <th>&eta;</th>
+            <th>&xi;</th>
+            <th>&eta;</th>
+            <th>&xi;</th>
+            <th>&eta;</th>
+            <th>&xi;</th>
+            <th>latitude</th>
+            <th>longitude</th>
+            <th>&gamma; rotation azimuth</th>
+            <th>shortest period (s)</th>
+        </tr>
+        </thead>
+
+        <tbody>
+        {% for object in object_list %}
+        <tr>
+            <td class=int>{{ object.nchunks }}</td>
+            <td class=int>{{ object.nproc_eta }}</td>
+            <td class=int>{{ object.nproc_xi }}</td>
+            <td class=int>{{ object.nex_eta }}</td>
+            <td class=int>{{ object.nex_xi }}</td>
+            {% ifequal object.nchunks 6 %}
+            <td class=notApplicable>n/a</td>
+            <td class=notApplicable>n/a</td>
+            <td class=notApplicable>n/a</td>
+            <td class=notApplicable>n/a</td>
+            <td class=notApplicable>n/a</td>
+            {% else %}
+            <td class=float>{{ object.angular_width_eta }}&deg;</td>
+            <td class=float>{{ object.angular_width_xi }}&deg;</td>
+            <td class=float>{{ object.center_latitude }}&deg;</td>
+            <td class=float>{{ object.center_longitude }}&deg;</td>
+            <td class=float>{{ object.gamma_rotation_azimuth }}&deg;</td>
+            {% endifequal %}
+            <td class=int>{{ object.shortestPeriod|stringformat:".0f" }}</td>
+        </tr>
+        {% endfor %}
+        </tbody>
+
+    </table>
+{% else %}
+    <p>You have no meshes.
+{% endif %}
+
+{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters.html (from rev 11879, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulations.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,25 @@
+
+{% extends "SeismoWebPortal/base.html" %}
+
+{% block desktop %}
+
+<div class=taskbar>
+    <ul>
+        <li class=first><a href="/specfem3dglobe/">home</a>
+        <li class=selected><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
+        <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
+        <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
+        <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
+        <li><a href="/specfem3dglobe/events/">events</a>
+        <li><a href="/specfem3dglobe/stations/">stations</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
+        <li><a href="/specfem3dglobe/registration/">profile</a>
+    </ul>
+</div>
+
+<h1 class=titlebar>specfem 3d globe parameters</h1>
+
+{% block content %}
+{% endblock %}
+
+{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html (from rev 11876, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_confirm_delete.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_confirm_delete.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,13 @@
+
+{% extends "SeismoWebPortal/specfem3dglobeparameters.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>delete specfem 3d globe parameters</h2>
+
+<form method="post" action="/specfem3dglobe/specfem3dglobeparameters/{{ object.id }}/delete/">
+    <p>Are you sure you want to delete the parameters "{{ object }}"?
+    <p><input type="submit" value="Delete" />
+</form>
+{% endblock %}
+

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html (from rev 11877, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_detail.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_detail.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,25 @@
+
+{% extends "SeismoWebPortal/specfem3dglobeparameters.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>mesh</dt><dd><a href="../../specfem3dglobemeshes/{{ object.mesh.id }}/">{{ object.mesh }}</a></dd>
+        <dt>model</dt><dd>{{ object.get_model_display }}</dd>
+    </dl>
+    </div>
+
+</div>
+
+{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html (from rev 11879, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_form.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_form.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,67 @@
+
+{% extends "SeismoWebPortal/specfem3dglobeparameters.html" %}
+
+{% block content %}
+
+<h2 class=titlebar>{% if object %}edit{% else %}new{% endif %} Specfem 3D Globe 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 %}
+
+    <div class=tab30ex>
+
+    <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><input class=submit type="submit" name="save" value="Save" />
+    </div>
+
+    </div> <!-- tab30ex -->
+
+</form>
+
+{% endblock %}

Copied: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html (from rev 11876, cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/simulation_list.html)
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html	                        (rev 0)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/specfem3dglobeparameters_list.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -0,0 +1,34 @@
+
+{% extends "SeismoWebPortal/specfem3dglobeparameters.html" %}
+
+{% block content %}
+
+<div class=toolbar>
+    <form action="create/" method="get"><input type="submit" value="New..." /></form>
+</div>
+
+{% if object_list %}
+    <table rules=groups>
+        
+        <colgroup><col class=odd><col class=even><col class=odd><col class=even><col class=odd><col class=even><col class=odd></colgroup>
+
+        <thead>
+        <tr><th>mesh</th><th>model</th></tr>
+        </thead>
+        
+        <tbody>
+        {% for object in object_list %}
+        <tr>
+            <td><a href="/specfem3dglobe/specfem3dglobemeshes/{{ object.mesh.id }}/">{{ object.mesh }}</a><br>
+                <span class=inlineInfo>shortest period &cong; {{ object.mesh.shortestPeriod|stringformat:".0f" }}s</span></td>
+            <td>{{ object.get_model_display }}</td>
+        </tr>
+        {% endfor %}
+        </tbody>
+
+    </table>
+{% else %}
+    <p>You have no Specfem 3D Globe parameters.
+{% endif %}
+
+{% endblock %}

Modified: cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stations.html
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stations.html	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/templates/SeismoWebPortal/stations.html	2008-05-01 22:15:52 UTC (rev 11887)
@@ -6,14 +6,13 @@
 <div class=taskbar>
     <ul>
         <li class=first><a href="/specfem3dglobe/">home</a>
-        <li><a href="/specfem3dglobe/simulations/">3D</a>
+        <li><a href="/specfem3dglobe/specfem3dglobeparameters/">3D</a>
         <li><a href="/specfem3dglobe/mineosparameters/">1D</a>
         <li><a href="/specfem3dglobe/mineosmodecatalogs/">modes</a>
         <li><a href="/specfem3dglobe/mineosmodels/">1D models</a>
         <li><a href="/specfem3dglobe/events/">events</a>
         <li class=selected><a href="/specfem3dglobe/stations/">stations</a>
-        <li><a href="/specfem3dglobe/meshes/">meshes</a>
-        <li><a href="/specfem3dglobe/models/">models</a>
+        <li><a href="/specfem3dglobe/specfem3dglobemeshes/">meshes</a>
         <li><a href="/specfem3dglobe/registration/">profile</a>
     </ul>
 </div>

Modified: cs/portal/trunk/northridge/SeismoWebPortal/urls.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/urls.py	2008-05-01 22:15:52 UTC (rev 11887)
@@ -106,31 +106,26 @@
     (r'^registration/$', 'SeismoWebPortal.views.registration'),
     (r'^registration/password/$', 'SeismoWebPortal.views.password_change', password_change_args),
 
-    (r'^meshes/$', 'django.views.generic.list_detail.object_list', list_detail_args(models.Mesh)),
-    (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', delete_args(models.Mesh, 'meshes')),
+    (r'^specfem3dglobemeshes/$', 'django.views.generic.list_detail.object_list', list_detail_args(models.Specfem3DGlobeMesh)),
+    (r'^specfem3dglobemeshes/create/$', 'SeismoWebPortal.views.create_mesh'),
+    (r'^specfem3dglobemeshes/create/(?P<nchunks>\d+)/$', 'SeismoWebPortal.views.manipulate_mesh', dict(action='create')),
+    (r'^specfem3dglobemeshes/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.manipulate_mesh', dict(action='edit')),
+    (r'^specfem3dglobemeshes/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', delete_args(models.Specfem3DGlobeMesh, 'specfem3dglobemeshes')),
 
-    (r'^models/$', 'django.views.generic.list_detail.object_list', list_detail_args(models.Model)),
-    (r'^models/create/$', 'SeismoWebPortal.views.create_model'),
-    (r'^models/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.update_model'),
-    (r'^models/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', delete_args(models.Model, 'models')),
+    (r'^specfem3dglobeparameters/$', 'django.views.generic.list_detail.object_list', list_detail_args(models.Specfem3DGlobeParameters)),
+    (r'^specfem3dglobeparameters/create/$', 'django.views.generic.create_update.create_object', cu_args(models.Specfem3DGlobeParameters, 'specfem3dglobeparameters')),
+    (r'^specfem3dglobeparameters/(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', {'queryset': models.Specfem3DGlobeParameters.user_objects.all()}),
+    (r'^specfem3dglobeparameters/(?P<object_id>\d+)/edit/$', 'django.views.generic.create_update.update_object', cu_args(models.Specfem3DGlobeParameters, 'specfem3dglobeparameters')),
+    (r'^specfem3dglobeparameters/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', delete_args(models.Specfem3DGlobeParameters, 'specfem3dglobeparameters')),
 
-    (r'^simulations/$', 'SeismoWebPortal.views.simulation_index'),
-    (r'^simulations/create/$', 'SeismoWebPortal.views.create_simulation'),
-    (r'^simulations/(?P<object_id>\d+)/$', 'SeismoWebPortal.views.simulation_detail'),
-    (r'^simulations/(?P<object_id>\d+)/edit/$', 'SeismoWebPortal.views.update_simulation'),
-    (r'^simulations/(?P<object_id>\d+)/delete/$', 'django.views.generic.create_update.delete_object', delete_args(models.Simulation, 'simulations')),
-    (r'^simulations/(?P<object_id>\d+)/run/$', 'SeismoWebPortal.views.run_simulation'),
-    (r'^simulations/(?P<sim_id>\d+)/par_file\.txt$', 'SeismoWebPortal.views.par_file'),
-    (r'^simulations/(?P<sim_id>\d+)/parameters\.pml$', 'SeismoWebPortal.views.parameters_pml'),
-    (r'^simulations/(?P<sim_id>\d+)/stations\.txt$', 'SeismoWebPortal.views.stations_txt'),
-    (r'^simulations/(?P<sim_id>\d+)/events\.txt$', 'SeismoWebPortal.views.events_txt'),
-    (r'^simulations/(?P<sim_id>\d+)/mineos/parameters\.pml$', 'SeismoWebPortal.views.mineos_parameters_pml'),
-    (r'^simulations/(?P<sim_id>\d+)/mineos/event\.txt$', 'SeismoWebPortal.views.mineos_event_txt'),
-    (r'^simulations/(?P<sim_id>\d+)/mineos/stations\.site$', 'SeismoWebPortal.views.mineos_stations_site'),
-    (r'^simulations/(?P<sim_id>\d+)/mineos/stations\.sitechan$', 'SeismoWebPortal.views.mineos_stations_sitechan'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/par_file\.txt$', 'SeismoWebPortal.views.par_file'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/parameters\.pml$', 'SeismoWebPortal.views.parameters_pml'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/stations\.txt$', 'SeismoWebPortal.views.stations_txt'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/events\.txt$', 'SeismoWebPortal.views.events_txt'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/mineos/parameters\.pml$', 'SeismoWebPortal.views.mineos_parameters_pml'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/mineos/event\.txt$', 'SeismoWebPortal.views.mineos_event_txt'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/mineos/stations\.site$', 'SeismoWebPortal.views.mineos_stations_site'),
+    (r'^specfem3dglobeparameters/(?P<sim_id>\d+)/mineos/stations\.sitechan$', 'SeismoWebPortal.views.mineos_stations_sitechan'),
 
     (r'^mineosparameters/$', 'django.views.generic.list_detail.object_list', list_detail_args(models.MineosParameters)),
     (r'^mineosparameters/create/$', 'django.views.generic.create_update.create_object', cu_args(models.MineosParameters, 'mineosparameters')),

Modified: cs/portal/trunk/northridge/SeismoWebPortal/views.py
===================================================================
--- cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-01 20:19:02 UTC (rev 11886)
+++ cs/portal/trunk/northridge/SeismoWebPortal/views.py	2008-05-01 22:15:52 UTC (rev 11887)
@@ -9,11 +9,9 @@
 from django.shortcuts import render_to_response, get_object_or_404
 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 Run, Job, OutputFile
 
 import cmt
+import models
 
 import os, os.path
 from HTMLParser import HTMLParser
@@ -40,85 +38,13 @@
                               {},
                               RequestContext(request, {}))
 
-def simulation_index(request):
-    from django.views.generic.list_detail import object_list
-    return object_list(request, Simulation.objects.filter(user=request.user),
-                       allow_empty=True)
-simulation_index = login_required(simulation_index)
-
-
-def create_simulation(request):
-    def post_save(object):
-        user = request.user
-        if request.POST.has_key('save_and_run'):
-            if user.userinfo.approved:
-                object.run()
-            else:
-                user.message_set.create(message=disapproval)
-        return None
-    return create_object(request,
-                         Simulation,
-                         post_save_redirect = '/specfem3dglobe/simulations/%(id)d/',
-                         follow = { 'user': False },
-                         post_save_hook=post_save,
-                         )
-create_simulation = login_required(create_simulation)
-
-
-def update_simulation(request, object_id):
-    def post_save(object):
-        user = request.user
-        if request.POST.has_key('save_and_run'):
-            if user.userinfo.approved:
-                object.run()
-            else:
-                user.message_set.create(message=disapproval)
-        return None
-    return update_object(request,
-                         Simulation,
-                         object_id,
-                         post_save_redirect = '/specfem3dglobe/simulations/%(id)d/',
-                         follow = { 'user': False },
-                         post_save_hook=post_save,
-                         )
-update_simulation = login_required(update_simulation)
-
-
-def run_simulation(request, object_id):
-    from django.views.generic.list_detail import object_detail
-    
-    user = request.user
-    object_id = int(object_id)
-    
-    if not user.userinfo.approved:
-        user.message_set.create(message=disapproval)
-        return HttpResponseRedirect('/specfem3dglobe/simulations/%d/' % object_id)
-    
-    simulation = get_object_or_404(Simulation, id=object_id)
-    
-    if request.method == 'POST':
-        run = simulation.run()
-        user.message_set.create(message="A new run has been started.")
-        return HttpResponseRedirect('/specfem3dglobe/simulations/%d/' % object_id)
-
-    raise Http404
-
-run_simulation = login_required(run_simulation)
-
-
-def simulation_detail(request, object_id):
-    from django.views.generic.list_detail import object_detail
-    return object_detail(request, Simulation.user_objects.all(), object_id)
-simulation_detail = login_required(simulation_detail)
-
-
 def par_file(request, sim_id):
     from django.template import loader, Context
 
     response = HttpResponse(mimetype='text/plain')
     #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     t = loader.get_template('SeismoWebPortal/par_file.txt')
     c = Context({
@@ -133,7 +59,7 @@
     response = HttpResponse(mimetype='text/xml')
     #response['Content-Disposition'] = 'attachment; filename=parameters.xml'
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     t = loader.get_template('SeismoWebPortal/parameters.pml')
     c = Context({
@@ -192,7 +118,7 @@
 
     response = HttpResponse(mimetype='text/plain')
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     count = simulation.events.source_set.count()
     for event in simulation.events.source_set.all():
@@ -225,7 +151,7 @@
 def stations_txt(request, sim_id):
     response = HttpResponse(mimetype='text/plain')
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
     stations = simulation.stations.station_set.all()
 
     write_stations(stations, response)
@@ -236,7 +162,7 @@
 def stationlist_detail_txt(request, object_id):
     response = HttpResponse(mimetype='text/plain')
 
-    l = get_object_or_404(StationList, id=object_id)
+    l = get_object_or_404(models.StationList, id=object_id)
     stations = l.station_set.all()
 
     write_stations(stations, response)
@@ -250,7 +176,7 @@
 
     manipulator = RunStatusManipulator()
 
-    run = get_object_or_404(Run, id=object_id)
+    run = get_object_or_404(models.Run, id=object_id)
 
     if request.method == 'POST':
         response = HttpResponse(mimetype='text/plain')
@@ -335,18 +261,18 @@
 def daemon_post(request, modelName=None, action=None, object_id=None):
 
     if modelName == "Job":
-        Model = Job
+        ModelClass = models.Job
         template = 'SeismoWebPortal/job_form.html'
     elif modelName == "OutputFile":
-        Model = OutputFile
+        ModelClass = models.OutputFile
         template = 'SeismoWebPortal/outputfile_form.html'
     else:
         raise Http404
     
     if action == "create":
-        manipulator = Model.AddManipulator()
+        manipulator = ModelClass.AddManipulator()
     elif action == "update":
-        manipulator = Model.ChangeManipulator(object_id)
+        manipulator = ModelClass.ChangeManipulator(object_id)
     else:
         raise Http404
 
@@ -373,6 +299,8 @@
                               RequestContext(request, {}))
 
 def registration(request):
+    from forms import RegistrationAddManipulator, RegistrationChangeManipulator
+    
     isNewUser = request.user.is_anonymous()
     if isNewUser:
         manipulator = RegistrationAddManipulator(request)
@@ -391,7 +319,6 @@
                 if isNewUser:
                     request.session.delete_test_cookie()
                     help_login_hook(request, user)
-                    set_up_user_defaults(user)
                     notify_managers_of_new_user(request, user)
                     user.message_set.create(message="Welcome to the SPECFEM 3D GLOBE web portal!")
                 else:
@@ -411,38 +338,6 @@
     return render_to_response(template, { 'form': form }, RequestContext(request, {}))
 
 
-def set_up_user_defaults(newUser):
-    from django.contrib.auth.models import User
-    from models import Event, Source, StationList, Mesh, Model, Simulation
-
-    if newUser.username == 'template':
-        return
-
-    try:
-        templateUser = User.objects.get(username = 'template')
-    except User.DoesNotExist:
-        return
-
-    # map template objects to the new user's objects
-    objMap = {
-        User: {templateUser.id: newUser}
-        }
-
-    # The order of model classes is significant: Simulations must be
-    # copied last.
-    
-    for ModelClass in [Event, StationList, Mesh, Model, Simulation]:
-
-        queryset = ModelClass.objects.filter(user = templateUser)
-        
-        for template in queryset:
-            obj = template.copy(objMap)
-            objMap.setdefault(ModelClass, {})
-            objMap[ModelClass][template.id] = obj
-            
-    return
-
-
 def notify_managers_of_new_user(request, user):
     from django.core.mail import mail_managers
 
@@ -500,10 +395,10 @@
 def create_mesh(request):
 
     if request.method != 'POST':
-        return HttpResponseRedirect('/specfem3dglobe/meshes/')
+        return HttpResponseRedirect('/specfem3dglobe/specfem3dglobemeshes/')
         
     nchunks = int(request.POST['nchunks'])
-    return HttpResponseRedirect('/specfem3dglobe/meshes/create/%d/' % nchunks)
+    return HttpResponseRedirect('/specfem3dglobe/specfem3dglobemeshes/create/%d/' % nchunks)
 
 create_mesh = login_required(create_mesh)
 
@@ -513,7 +408,7 @@
     from forms import MeshAddManipulator, MeshChangeManipulator
     
     if nchunks is None:
-        mesh = get_object_or_404(Mesh, id=object_id, user__exact=request.user)
+        mesh = get_object_or_404(models.Specfem3DGlobeMesh, id=object_id)
         nchunks = mesh.nchunks
     else:
         mesh = None
@@ -554,7 +449,7 @@
                 manipulator.do_html2python(new_data)
                 manipulator.save(new_data)
                 if not errors:
-                    return HttpResponseRedirect('/specfem3dglobe/meshes/')
+                    return HttpResponseRedirect('/specfem3dglobe/specfem3dglobemeshes/')
     else:
         # Populate new_data with a 'flattened' version of the current data.
         new_data = manipulator.flatten_data()
@@ -575,27 +470,6 @@
 manipulate_mesh = login_required(manipulate_mesh)
 
 
-def create_model(request):
-    return create_object(request,
-                         Model,
-                         #post_save_redirect = '/specfem3dglobe/models/%(id)d/',
-                         post_save_redirect = '/specfem3dglobe/models/',
-                         follow = { 'user': False },
-                         )
-create_model = login_required(create_model)
-
-
-def update_model(request, object_id):
-    return update_object(request,
-                         Model,
-                         object_id,
-                         #post_save_redirect = '/specfem3dglobe/models/%(id)d/',
-                         post_save_redirect = '/specfem3dglobe/models/',
-                         follow = { 'user': False },
-                         )
-update_model = login_required(update_model)
-
-
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 # Events
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -627,14 +501,14 @@
         # The try-get()-except shouldn't be necessary, but simply
         # using save() causes Django to die in the database backend.
         try:
-            ds = DataSource.objects.get(name=event.dataSource)
-        except DataSource.DoesNotExist:
-            ds = DataSource(event.dataSource)
+            ds = models.DataSource.objects.get(name=event.dataSource)
+        except models.DataSource.DoesNotExist:
+            ds = models.DataSource(event.dataSource)
             ds.save()
         try:
-            ds = Region.objects.get(name=event.regionName)
+            ds = models.Region.objects.get(name=event.regionName)
         except:
-            r = Region(event.regionName)
+            r = models.Region(event.regionName)
             r.save()
     
     return render_to_response('SeismoWebPortal/event_search_results.html',
@@ -644,18 +518,17 @@
 
 
 def manipulate_event(request, action=None, object_id=None):
-    from models import Event
     from forms import SingleSourceEventAddManipulator, SingleSourceEventChangeManipulator
 
     if action == "create":
         manipulator = SingleSourceEventAddManipulator()
         event = None
     elif action == "edit":
-        event = get_object_or_404(Event, id=object_id, user__exact=request.user)
+        event = get_object_or_404(models.Event, id=object_id, user__exact=request.user)
         if not event.singleSource:
             return update_object(
                 request,
-                Event,
+                models.Event,
                 object_id,
                 post_save_redirect = '/specfem3dglobe/events/',
                 follow = { 'user': False },
@@ -722,8 +595,7 @@
 
 
 def event_detail_gearth(request, object_id):
-    from models import Event
-    event = get_object_or_404(Event, id=object_id)
+    event = get_object_or_404(models.Event, id=object_id)
     return gearth_object_list(request,
                               queryset = event.source_set.all(),
                               template_name = 'SeismoWebPortal/event_detail_gearth.kml',
@@ -731,13 +603,11 @@
                               )
 
 def beachball_gif(request, object_id):
-    from models import Source
-    source = get_object_or_404(Source, id=object_id)
+    source = get_object_or_404(models.Source, id=object_id)
     return HttpResponseRedirect(source.beachballUrl())
 
 def cmtsolution_txt(request, object_id):
-    from models import Source
-    source = get_object_or_404(Source, id=object_id)
+    source = get_object_or_404(models.Source, id=object_id)
     response = HttpResponse(mimetype='text/plain')
     response.write(str(source.cmtSolution()))
     return response
@@ -746,8 +616,7 @@
 
     response = HttpResponse(mimetype='text/plain')
 
-    from models import Event
-    event = get_object_or_404(Event, id=object_id)
+    event = get_object_or_404(models.Event, id=object_id)
 
     count = event.source_set.count()
     for event in event.source_set.all():
@@ -808,7 +677,7 @@
 
 
 def station_index(request):
-    station_lists = StationList.objects.filter(user__exact=request.user)
+    station_lists = models.StationList.objects.filter(user__exact=request.user)
     return render_to_response('SeismoWebPortal/station_index.html',
                               {'station_lists': station_lists },
                               RequestContext(request, {}))
@@ -816,7 +685,7 @@
 
 
 def stationlist_detail_gearth(request, object_id):
-    stationList = get_object_or_404(StationList, id=object_id)
+    stationList = get_object_or_404(models.StationList, id=object_id)
     kwds = dict(queryset = stationList.station_set.all(),
                 extra_context = {'name': stationList.name})
     return station_list_gearth(request, **kwds)
@@ -845,8 +714,6 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-from models import UserInfo
-
 def help_toggle(request):
     if request.method != 'POST':
         raise Http404
@@ -862,7 +729,7 @@
         userInfo = request.user.userinfo
         userInfo.help_visible = help_visible
         userInfo.save()
-    except UserInfo.DoesNotExist:
+    except models.UserInfo.DoesNotExist:
         pass
 
     post_toggle_redirect = data['post_toggle_redirect']
@@ -876,7 +743,7 @@
         try:
             userInfo = request.user.userinfo
             help_visible = userInfo.help_visible
-        except UserInfo.DoesNotExist:
+        except models.UserInfo.DoesNotExist:
             pass
         request.session['help_visible'] = help_visible
     return help_visible
@@ -886,7 +753,7 @@
     try:
         userInfo = user.userinfo
         request.session['help_visible'] = userInfo.help_visible
-    except UserInfo.DoesNotExist:
+    except models.UserInfo.DoesNotExist:
         request.session['help_visible'] = False
     return
 
@@ -900,7 +767,7 @@
 
     response = HttpResponse(mimetype='text/xml')
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     t = loader.get_template('SeismoWebPortal/mineos_parameters.pml')
     c = Context({
@@ -915,7 +782,7 @@
     
     response = HttpResponse(mimetype='text/plain')
 
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
     
     for source in simulation.events.source_set.all():
         cmt = cmt.CMTSolution.createFromDBModel(source)
@@ -946,7 +813,7 @@
 def mineos_stations_site(request, sim_id):
     response = HttpResponse(mimetype='text/plain')
     
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     stations = simulation.stations.station_set.all()
     ondate = 0
@@ -968,7 +835,7 @@
 def mineos_stations_sitechan(request, sim_id):
     response = HttpResponse(mimetype='text/plain')
     
-    simulation = get_object_or_404(Simulation, id=sim_id)
+    simulation = get_object_or_404(models.Specfem3DGlobeParameters, id=sim_id)
 
     stations = simulation.stations.station_set.all()
     chanid = -1



More information about the cig-commits mailing list