<p><b>mhoffman@lanl.gov</b> 2013-01-30 20:45:05 -0700 (Wed, 30 Jan 2013)</p><p>BRANCH COMMIT - land ice<br>
<br>
Modifications to grid setup scripts to handle the new basal mass balance time series input field.<br>
(Note: Existing input files will need this field added in order to work with the modifications to the land ice core in my last commit.)<br>
</p><hr noshade><pre><font color="gray">Modified: branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py
===================================================================
--- branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py        2013-01-31 03:40:57 UTC (rev 2400)
+++ branches/land_ice_projects/grid_tools/add_land_ice_variables_to_mpas_grid.py        2013-01-31 03:45:05 UTC (rev 2401)
@@ -70,6 +70,7 @@
 fileout.createDimension('nSfcMassBalTimeSlices', 1)
 fileout.createDimension('nSfcAirTempTimeSlices', 1)
 fileout.createDimension('nBasalHeatFluxTimeSlices', 1)
+fileout.createDimension('nMarineBasalMassBalTimeSlices', 1)
 
 
 # Copy over all of the required grid variables to the new file
@@ -117,6 +118,8 @@
 newvar[:] = numpy.zeros(newvar.shape)
 newvar = fileout.createVariable('basalHeatFluxTimeSeries', datatype, ( 'nCells', 'nBasalHeatFluxTimeSlices',))
 newvar[:] = numpy.zeros(newvar.shape)
+newvar = fileout.createVariable('marineBasalMassBalTimeSeries', datatype, ( 'nCells', 'nMarineBasalMassBalTimeSlices',))
+newvar[:] = numpy.zeros(newvar.shape)
 
 # Assign the global attributes
 # Copy over the two attributes that are required by MPAS.  If any others exist in the input file, give a warning.

Modified: branches/land_ice_projects/test_cases/dome/setup_dome_initial_conditions.py
===================================================================
--- branches/land_ice_projects/test_cases/dome/setup_dome_initial_conditions.py        2013-01-31 03:40:57 UTC (rev 2400)
+++ branches/land_ice_projects/test_cases/dome/setup_dome_initial_conditions.py        2013-01-31 03:45:05 UTC (rev 2401)
@@ -51,6 +51,7 @@
     SMB = gridfile.variables['sfcMassBalTimeSeries'][:]
     Tsfc = gridfile.variables['sfcAirTempTimeSeries'][:]
     G = gridfile.variables['basalHeatFluxTimeSeries'][:]
+    BMB = gridfile.variables['marineBasalMassBalTimeSeries'][:]
 except:
     sys.exit('Error: The grid file specified is either missing or lacking needed dimensions/variables.')
 
@@ -82,8 +83,8 @@
 #SMB[:] = 2.0/1000.0 * (thickness[:] + bedTopography[:]) - 1.0  # units: m/yr, lapse rate of 1 m/yr with 0 at 500 m
 Tsfc[:,0] = -5.0/1000.0 * (thickness[0,:] + bedTopography[0,:]) # lapse rate of 5 deg / km
 G = 0.01
+#BMB[:] = -20.0  # units: m/yr
 
-
 # Reassign the modified numpy array values back into netCDF variable objects 
 gridfile.variables['thickness'][:] = thickness
 gridfile.variables['normalVelocity'][:] = normalVelocity
@@ -94,6 +95,7 @@
 gridfile.variables['sfcMassBalTimeSeries'][:] = SMB
 gridfile.variables['sfcAirTempTimeSeries'][:] = Tsfc
 gridfile.variables['basalHeatFluxTimeSeries'][:] = G
+gridfile.variables['marineBasalMassBalTimeSeries'][:] = BMB
 
 gridfile.close()
 print 'Successfully added dome initial conditions to ', gridfilename

</font>
</pre>