#!/usr/bin/env perl use strict; my @dirs = ('../../ccsm_utils/Tools/per5lib', '../../ccsm_utils/Tools/perl5lib/Build'); unshift @INC, @dirs; require XML::Lite; use lib "../../ccsm_utils/Tools/perl5lib"; my $image_dir = "./images"; print <<"END_of_Start"; CESM Component Models Namelist Definitions

Search or Browse env_mach_pes.xml

This page contains the complete list of xml variables in env_mach_pes.xml. They are grouped by categories designed to aid browsing. Clicking on the name of a variable will display descriptive information. If search terms are entered in the text box below, the list will be condensed to contain only matched variables.


(separate search terms with spaces)

END_of_Start my ($file) = "../../ccsm_utils/Case.template/config_definition.xml"; my $xml = XML::Lite->new( $file ); my $root = $xml->root_element(); # Check for valid root node my $name = $root->get_name(); $name eq "config_definition" or die "file $file is not a config definitions file\n"; # Print table for env_mach_pes.xml print_start_table("env_mach_pes.xml variables (locked after cesm_setup called)"); my @e = $xml->elements_by_name( "entry" ); my %a = (); while ( my $e = shift @e ) { %a = $e->get_attributes(); my $var = $a{'id'}; my $doc = $a{'sdesc'}; my $valid_values = $a{'valid_values'}; if ($valid_values ne "") { $doc = $doc . "\nValid Values: $valid_values "; } my $grp = $a{'group'}; $grp =~ m/([^_]*)_(.*)/; $grp = "env_$1.xml"; if ($grp eq 'env_mach.xml') {$grp = "env_mach_pes.xml";} if ($grp eq "env_mach_pes.xml") { print_row($var, $doc, $grp, $valid_values); } } print_end_table(); # Finish print <<"END_of_html"; END_of_html #-------------------------------------------------------------------------------------------- sub print_start_table { my $hdr = shift; print <<"START_table";

$hdr

START_table } #-------------------------------------------------------------------------------------------- sub print_row { my $name = shift; my $doc = shift; my $grp = shift; print <<"END_of_row"; END_of_row } #-------------------------------------------------------------------------------------------- sub print_end_table { print <<"END_table";
Variable Name File Name
$name $grp
END_table } #--------------------------------------------------------------------------------------------