diff --git a/driver_cpl/bld/build-namelist b/driver_cpl/bld/build-namelist index f98787b45f2..34b214f59a0 100755 --- a/driver_cpl/bld/build-namelist +++ b/driver_cpl/bld/build-namelist @@ -47,7 +47,7 @@ OPTIONS NOTE: The precedence for setting the values of namelist variables is (highest to lowest): 1. values read from the file specified by -infile, - 2. values from the namelist defaults file + 2. values from the namelist defaults file EOF } @@ -192,7 +192,7 @@ EOF (-f "$perl5lib_dir/Build/Namelist.pm") or die <<"EOF"; ** $ProgName - Cannot find perl module \"Build/Namelist.pm\" in directory \"$perl5lib_dir\" ** EOF -my @nl_definition_filenames = ( "namelist_definition_drv.xml", +my @nl_definition_filenames = ( "namelist_definition_drv.xml", "namelist_definition_drv_flds.xml", "namelist_definition_modio.xml" ); my @nl_definition_paths; @@ -287,14 +287,11 @@ foreach my $file (@files) { my @e = $xml->elements_by_name('entry'); while ( my $e = shift @e ) { my %a = $e->get_attributes(); + my $val = $a{value}; $xmlvars{$a{'id'}} = $a{'value'}; } } -my $DIN_LOC_ROOT = $xmlvars{'DIN_LOC_ROOT'}; -if ($print>=2) { print "inputdata root directory: $DIN_LOC_ROOT$eol"; } -# Note - $USER is not in the config_defintion.xml file - it is only in the environment -$xmlvars{'USER'} = $ENV{'USER'}; unshift @INC, "${CIMEROOT}/utils/perl5lib"; require Config::SetupTools; @@ -304,6 +301,9 @@ foreach my $attr (keys %xmlvars) { $xmlvars{$attr} = SetupTools::expand_xml_var($xmlvars{$attr}, \%xmlvars); } +my $DIN_LOC_ROOT = $xmlvars{'DIN_LOC_ROOT'}; +if ($print>=2) { print "inputdata root directory: $DIN_LOC_ROOT$eol"; } + #----------------------------------------------------------------------------------------------- # Read in versions fo the drv_flds_in file from different components and merge them together # Abort if there is a conflict @@ -324,14 +324,14 @@ foreach my $fldsin ( @fldsinfiles ) { if ($@) { die "$ProgName - ERROR: Invalid namelist variable in '-infile' $opts{'infile'}.\n $@"; } - + # Merge input values into namelist. Die if a conflict is found. $nl->merge_nl($nl_infile_valid, die_on_conflict=>1); } } #----------------------------------------------------------------------------------------------- -# Determine drv namelist +# Determine drv namelist #----------------------------------------------------------------------------------------------- ############################################# @@ -882,7 +882,7 @@ $definition->validate($nl); # (1) Write output namelist files (drv_in, and drv_flds_in) #----------------------------------------------------------------------------------------------- -# Write out drv_in namelist groups +# Write out drv_in namelist groups my @groups = qw(seq_cplflds_inparm seq_cplflds_userspec seq_infodata_inparm @@ -901,7 +901,7 @@ if ($print>=2) { print "Writing driver namelist to $outfile $eol"; } my $outfile = "./drv_flds_in"; $nl->write($outfile, 'groups'=>\@groups); if ($print>=2) { print "Writing driver fields namelist to $outfile $eol"; } - + #----------------------------------------------------------------------------------------------- # (2) Write out seq_map.rc file #----------------------------------------------------------------------------------------------- @@ -925,7 +925,7 @@ print $fh <<"EOF"; # if necessary # # NOTE: For bfb on different processor counts, set all maptypes to "X". -################################################################## +################################################################## EOF $fh->close();