<p><b>dwj07@fsu.edu</b> 2013-03-15 09:49:27 -0600 (Fri, 15 Mar 2013)</p><p><br>
        -- BRANCH COMMIT --<br>
<br>
        Some small updates to script.<br>
        Better error handling.<br>
</p><hr noshade><pre><font color="gray">Modified: branches/tools/python_scripts/namelist_generation/parse_xml_registry.py
===================================================================
--- branches/tools/python_scripts/namelist_generation/parse_xml_registry.py        2013-03-15 15:49:13 UTC (rev 2620)
+++ branches/tools/python_scripts/namelist_generation/parse_xml_registry.py        2013-03-15 15:49:27 UTC (rev 2621)
@@ -113,8 +113,12 @@
 
         for nml_opt in nml_rec.iter(&quot;nml_option&quot;):
                 opt_name = nml_opt.attrib['name']
-                opt_description = nml_opt.attrib['description']
 
+                try:
+                        opt_description = nml_opt.attrib['description']
+                except:
+                        opt_description = latex_missing_string
+
                 if opt_description == &quot;&quot;:
                         opt_description = latex_missing_string
 
@@ -141,10 +145,22 @@
                 opt_name = nml_opt.attrib[&quot;name&quot;]
                 opt_type = nml_opt.attrib[&quot;type&quot;]
                 opt_value = nml_opt.attrib[&quot;default_value&quot;]
-                opt_possible_values = nml_opt.attrib[&quot;possible_values&quot;]
-                opt_units = nml_opt.attrib[&quot;units&quot;]
-                opt_descrption = nml_opt.attrib[&quot;description&quot;]
 
+                try:
+                        opt_possible_values = nml_opt.attrib[&quot;possible_values&quot;]
+                except:
+                        opt_possible_values = latex_missing_string
+
+                try:
+                        opt_units = nml_opt.attrib[&quot;units&quot;]
+                except:
+                        opt_units = latex_missing_string
+
+                try:
+                        opt_description = nml_opt.attrib[&quot;description&quot;]
+                except:
+                        opt_description = latex_missing_string
+
                 if opt_possible_values == &quot;&quot;:
                         opt_possible_values = latex_missing_string
 
@@ -154,6 +170,8 @@
                 if opt_description == &quot;&quot;:
                         opt_description = latex_missing_string
 
+                latex.write('\subsection[%s]{\hyperref[sec:nm_tab_%s]{%s}}</font>
<font color="blue">'%(opt_name.replace('_','\_'),rec_name,opt_name.replace('_','\_')))
+                latex.write('\label{subsec:nm_sec_%s}</font>
<font color="black">'%opt_name)
                 latex.write('\\begin{center}</font>
<font color="black">')
                 latex.write('\\begin{longtable}{| p{2.0in} | p{4.0in} |}</font>
<font color="black">')
                 latex.write('    \hline</font>
<font color="gray">')
@@ -270,10 +288,10 @@
                                 var_streams = &quot;None&quot;
 
                         if int(struct_time_levs) &gt; 1:
-                                var_index = &quot;domain %% blocklist %% %s %% index_%s&quot;%(struct_name, var_name)
+                                var_index = &quot;domain %% blocklist %% %s %% index_%s&quot;%(struct_name, var_name_in_code)
                                 var_path = &quot;domain %% blocklist %% %s %% time_levs(:) %% %s %% %s&quot;%(struct_name, struct_name, var_arr_name)
                         else:
-                                var_index = &quot;domain %% blocklist %% %s %% index_%s&quot;%(struct_name, var_name)
+                                var_index = &quot;domain %% blocklist %% %s %% index_%s&quot;%(struct_name, var_name_in_code)
                                 var_path = &quot;domain %% blocklist %% %s %% %s&quot;%(struct_name, var_arr_name)
 
                         if var_units == &quot;&quot;:
@@ -344,9 +362,9 @@
                                 var_streams = &quot;None&quot;
 
                         if int(struct_time_levs) &gt; 1:
-                                var_path = &quot;domain %% blocklist %% %s %% time_levs(:) %% %s %% %s&quot;%(struct_name, struct_name, var_name)
+                                var_path = &quot;domain %% blocklist %% %s %% time_levs(:) %% %s %% %s&quot;%(struct_name, struct_name, var_name_in_code)
                         else:
-                                var_path = &quot;domain %% blocklist %% %s %% %s&quot;%(struct_name, var_name)
+                                var_path = &quot;domain %% blocklist %% %s %% %s&quot;%(struct_name, var_name_in_code)
 
                         if var_units == &quot;&quot;:
                                 var_units = latex_missing_string

</font>
</pre>