Skip to content

Commit

Permalink
Merge pull request #357 from ekluzek/fixpionml
Browse files Browse the repository at this point in the history
Fixpionml
  • Loading branch information
jedwards4b authored Aug 9, 2016
2 parents db1538e + c9b8910 commit bf02e3e
Show file tree
Hide file tree
Showing 6 changed files with 1,603 additions and 1,637 deletions.
12 changes: 11 additions & 1 deletion driver_cpl/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ my $cfg = Build::Config->new("$CASEROOT/Buildconf/cplconf/config_cache.xml");
# output namelist variables are in the definition file, and are output in the correct
# namelist groups.
my $definition = Build::NamelistDefinition->new( shift(@nl_definition_paths) );
my $modelio_definition;
foreach my $nl_defin_file ( @nl_definition_paths ) {
$definition->add( "$nl_defin_file" );
if ( $nl_defin_file =~ /modio/ ) {
$modelio_definition = Build::NamelistDefinition->new( $nl_defin_file );
} else {
$definition->add( "$nl_defin_file" );
}
}

# Create a namelist defaults object. This object provides default values for variables
Expand Down Expand Up @@ -940,6 +945,8 @@ check_input_files($nl, $DIN_LOC_ROOT, "../cpl.input_data_list");
# (4) Write out model_modelio.nml files
#-----------------------------------------------------------------------------------------------

$definition = $modelio_definition;

foreach my $model (qw(cpl atm lnd ice ocn glc rof wav esp)) {

my $LID = "$ENV{'LID'}";
Expand Down Expand Up @@ -1042,6 +1049,9 @@ foreach my $model (qw(cpl atm lnd ice ocn glc rof wav esp)) {
add_default($nlio, 'pio_typename', 'val'=>"$xmlvars{'GLC_PIO_TYPENAME'}");
add_default($nlio, 'pio_rearranger', 'val'=>"$xmlvars{'GLC_PIO_REARRANGER'}");
}
# Validate that the namelist is correct
$definition->validate($nlio);

$nlio->write($modeliofile, 'groups'=>\@iogroup);
if ($print>=2) { print "Writing io namelist to $modeliofile $eol"; }
$inst_index = $inst_index + 1;
Expand Down
164 changes: 66 additions & 98 deletions driver_cpl/bld/testdir/env_build.xml
Original file line number Diff line number Diff line change
@@ -1,103 +1,71 @@
<?xml version="1.0"?>

<config_definition>

<header>

<?xml version="1.0"?>
<file id="env_build.xml">
<header>
These variables SHOULD NOT be changed once the model has been built.
urrently, these variables are not cached.
Note1: users SHOULD NOT modify BUILD_COMPETE below
this is done automatically by the scripts.
</header>

<groups>
<group>build_component_cism</group>
<group>build_component_clm</group>
<group>build_component_mosart</group>
<group>build_def</group>
<group>build_derived</group>
<group>build_grid</group>
<group>build_macros</group>
<group>build_status</group>
</groups>


<entry id="CALENDAR" value="NO_LEAP">
<type>char</type>
<valid_values>NO_LEAP,GREGORIAN</valid_values>
<group>build_def</group>
<desc>calendar type></desc>
</entry>

<entry id="ATM_GRID" value="1.9x2.5">
<type>char</type>
<group>build_grid</group>
<desc>atmosphere grid - DO NOT EDIT (for experts only)</desc>
</entry>

<entry id="GRID" value="a%1.9x2.5_l%1.9x2.5_oi%gx1v6_r%r05_m%gx1v6_g%gland5UM_w%null">
<type>char</type>
<group>build_grid</group>
<desc>Model grid - DO NOT EDIT (for experts only)</desc>
</entry>

<entry id="ICE_GRID" value="gx1v6">
<type>char</type>
<group>build_grid</group>
<desc>ice grid (must equal ocn grid) - DO NOT EDIT (for experts only)</desc>
</entry>

<entry id="ICE_NCAT" value="1">
<type>integer</type>
<group>build_grid</group>
<desc>number of ice thickness categories - DO NOT EDIT (set by CICE configure)</desc>
</entry>

<entry id="LND_GRID" value="1.9x2.5">
<type>char</type>
<group>build_grid</group>
<desc>land grid - DO NOT EDIT (for experts only)</desc>
</entry>

<entry id="OCN_GRID" value="gx1v6">
<type>char</type>
<group>build_grid</group>
<desc>ocn grid - DO NOT EDIT (for experts only)</desc>
</entry>

<entry id="ROF_GRID" value="r05">
<type>char</type>
<group>build_grid</group>
<desc>river runoff (rof) grid</desc>
</entry>

<entry id="WAV_GRID" value="null">
<type>char</type>
<group>build_grid</group>
<desc>wave model (wav) grid</desc>
</entry>

<entry id="MPILIB" value="mpich2">
<type>char</type>
<group>build_macros</group>
<desc>mpi library (must match one of the supported libraries) -
</header>
<group id="build_grid">
<entry id="GRID" value="a%1x1_tropicAtl_l%1x1_tropicAtl_oi%1x1_tropicAtl_r%null_m%reg_g%null_w%null">
<type>char</type>
<desc>Model grid - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="ATM_GRID" value="1x1_tropicAtl">
<type>char</type>
<desc>atmosphere grid - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="LND_GRID" value="1x1_tropicAtl">
<type>char</type>
<desc>land grid - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="OCN_GRID" value="1x1_tropicAtl">
<type>char</type>
<desc>ocn grid - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="ICE_GRID" value="1x1_tropicAtl">
<type>char</type>
<desc>ice grid (must equal ocn grid) - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="ROF_GRID" value="null">
<type>char</type>
<desc>river runoff (rof) grid</desc>
</entry>
<entry id="GLC_GRID" value="null">
<type>char</type>
<valid_values>gland20,gland10,gland5,gland5UM,gland4,null</valid_values>
<desc>glacier (glc) grid - DO NOT EDIT (for experts only)</desc>
</entry>
<entry id="WAV_GRID" value="null">
<type>char</type>
<desc>wave model (wav) grid</desc>
</entry>
<entry id="MASK_GRID" value="UNSET">
<type>char</type>
<desc>grid mask - DO NOT EDIT (for experts only)</desc>
</entry>
</group>
<group id="build_def">
<entry id="CALENDAR" value="NO_LEAP">
<type>char</type>
<valid_values>NO_LEAP,GREGORIAN</valid_values>
<desc>calendar type</desc>
</entry>
</group>
<group id="build_macros">
<entry id="MPILIB" value="mpich2">
<type>char</type>
<valid_values/>
<desc>mpi library (must match one of the supported libraries) -
ignored once Macros has been created
Set in /glade/p/work/erik/clm_gswp3drflds/cime/machines/config_machines.xml for each supported machine.
Must be explicitly set in env_build.xml for userdefined machine.</desc>
</entry>

<entry id="MPILIBS" value="mpich2,pempi,mpi-serial">
<type>char</type>
<group>build_macros</group>
<desc>Supported mpi libraries for target machine - set in config_machines.xml - (DO NOT EDIT)
Set in /glade/p/work/erik/clm_gswp3drflds/cime/machines/config_machines.xml for each supported machine.
Must be explicitly set in env_build.xml for userdefined machine.</desc>
</entry>

<entry id="OS" value="LINUX">
<type>char</type>
<group>build_macros</group>
<desc>Operating system - DO NOT EDIT UNLESS for userdefined machine - ignored once Macros has been created.</desc>
</entry>

</config_definition>
Set in $CIMEROOT/machines/config_machines.xml for each supported machine.
Must be explicitly set in env_build.xml for userdefined machine.</desc>
</entry>
<entry id="PIO_VERSION" value="1">
<type>integer</type>
<valid_values>1,2</valid_values>
<desc>PIO library version</desc>
</entry>

</group>
</file>
48 changes: 16 additions & 32 deletions driver_cpl/bld/testdir/env_case.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
<?xml version="1.0"?>

<config_definition>

<header>

<?xml version="1.0"?>
<file id="env_case.xml">
<header>
These variables CANNOT BE CHANGED once a case has been created.
Invoke create_newcase again if a different grid or component
combination is required.
</header>


<groups>
<group>case_comp</group>
<group>case_cost</group>
<group>case_def</group>
<group>case_der</group>
<group>case_desc</group>
<group>case_last</group>
<group>config_batch</group>
<group>run_machine</group>
</groups>

<entry id="CASE" value="testdir">
<type>char*256</type>
<group>case_def</group>
<desc>case name</desc>
</entry>

<entry id="USER" value="erik">
<type>char</type>
<group>case_desc</group>
<desc>case user name</desc>
</entry>

</config_definition>
<group id="case_def">
<entry id="CASE" value="testdir">
<type>char</type>
<desc>case name</desc>
</entry>
</group>
<group id="case_desc">
<entry id="USER" value="UNSET">
<type>char</type>
<desc>case user name</desc>
</entry>
</group>
</file>
Loading

0 comments on commit bf02e3e

Please sign in to comment.