#!/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_run.xml variables

This page contains the complete list of xml variables in env_run.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_run.xml my @groups = ("run_desc", "run_start", "run_stop", "run_rest", "run_flags", "run_pio", "run_mpi", "run_cplhist", "run_coupling", "run_defpts", "run_domain", "run_din", "run_dout", "run_cesm", "run_component_cam", "run_component_clm", "run_component_cice", "run_component_pop2", "run_component_cism", "run_component_datm", "run_component_dice", "run_component_docn", "run_component_dlnd", "run_component_drof", "run_sstice", ); my %cat_headings = ("run_desc" => 'Run description variables ', "run_start" => 'Run start control variables ', "run_stop" => 'Run stop control variables', "run_rest" => 'Run restart control variables', "run_pio" => 'Parallel I/O (PIO) control variables', "run_mpi" => 'MPI library setting', "run_cplhist" => 'Coupler history output control variables', "run_coupling" => 'Component coupling frequency variables', "run_flags" => 'Coupler performance/diagnostic flags', "run_defpts" => 'Domain - single point settings', "run_domain" => 'Domain - global settings', "run_din" => 'Input data control', "run_dout" => 'Output data control (short and long term archiving)', "run_cesm" => 'Component wide run-time settings', "run_component_cam" => 'CAM run-time settings', "run_component_clm" => 'CLM run-time settings', "run_component_cice" => 'CICE run-time settings', "run_component_pop2" => 'POP2 run-time settings', "run_component_cism" => 'CISM run-time settings', "run_component_datm" => 'DATM run-time settings', "run_component_dice" => 'DICE run-time settings', "run_component_docn" => 'DOCN run-time settings', "run_component_dlnd" => 'DLND run-time settings', "run_component_drof" => 'DROF run-time settings', "run_sstice" => 'PRESCRIBED SST/ICE run-time settings', ); foreach my $group (@groups) { print_start_table($group, $cat_headings{$group}); 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'}; if ($a{'ldesc'}) { $doc = "$doc . $a{'ldesc'}"; } 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_run.xml") && ($a{'group'} eq "$group")) { print_row($var, $doc, $grp, $valid_values); } } print_end_table(); } # Finish print <<"END_of_html"; END_of_html #-------------------------------------------------------------------------------------------- sub print_start_table { my $category = shift; 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 } #--------------------------------------------------------------------------------------------