<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("nml_option"):
                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 == "":
                        opt_description = latex_missing_string
@@ -141,10 +145,22 @@
                opt_name = nml_opt.attrib["name"]
                opt_type = nml_opt.attrib["type"]
                opt_value = nml_opt.attrib["default_value"]
-                opt_possible_values = nml_opt.attrib["possible_values"]
-                opt_units = nml_opt.attrib["units"]
-                opt_descrption = nml_opt.attrib["description"]
+                try:
+                        opt_possible_values = nml_opt.attrib["possible_values"]
+                except:
+                        opt_possible_values = latex_missing_string
+
+                try:
+                        opt_units = nml_opt.attrib["units"]
+                except:
+                        opt_units = latex_missing_string
+
+                try:
+                        opt_description = nml_opt.attrib["description"]
+                except:
+                        opt_description = latex_missing_string
+
                if opt_possible_values == "":
                        opt_possible_values = latex_missing_string
@@ -154,6 +170,8 @@
                if opt_description == "":
                        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 = "None"
                        if int(struct_time_levs) > 1:
-                                var_index = "domain %% blocklist %% %s %% index_%s"%(struct_name, var_name)
+                                var_index = "domain %% blocklist %% %s %% index_%s"%(struct_name, var_name_in_code)
                                var_path = "domain %% blocklist %% %s %% time_levs(:) %% %s %% %s"%(struct_name, struct_name, var_arr_name)
                        else:
-                                var_index = "domain %% blocklist %% %s %% index_%s"%(struct_name, var_name)
+                                var_index = "domain %% blocklist %% %s %% index_%s"%(struct_name, var_name_in_code)
                                var_path = "domain %% blocklist %% %s %% %s"%(struct_name, var_arr_name)
                        if var_units == "":
@@ -344,9 +362,9 @@
                                var_streams = "None"
                        if int(struct_time_levs) > 1:
-                                var_path = "domain %% blocklist %% %s %% time_levs(:) %% %s %% %s"%(struct_name, struct_name, var_name)
+                                var_path = "domain %% blocklist %% %s %% time_levs(:) %% %s %% %s"%(struct_name, struct_name, var_name_in_code)
                        else:
-                                var_path = "domain %% blocklist %% %s %% %s"%(struct_name, var_name)
+                                var_path = "domain %% blocklist %% %s %% %s"%(struct_name, var_name_in_code)
                        if var_units == "":
                                var_units = latex_missing_string
</font>
</pre>