Generally, configure errors are reported to the terminal and should provide some guidance about what caused the error. Most of this section deals with the "-case" option of configure which is the biggest step in setting up a case and the supporting input files and scripts. The configure step is fairly extensive and a brief description of what configure does follows. $CASEROOT is the top level case directory (i.e. the location where the env xml files and the configure script is located for a specific case).
The first thing configure does is load the case environment variables. In general, this is done by sourcing the $CASEROOT/Tools/ccsm_getenv. For more information about the environment variables, see the Section called What's the deal with the CCSM4 env variables and env xml files? in Chapter 11
Then the first major step for configure is to run the script $CASEROOT/Tools/generate_resolved.csh. This cycles through each of the component template files in $CASEROOT/Tools/Templates sequentially. These component template files are copied from locations in the component source code by create_newcase when the case is created. Each component template file generates a component buildnml.csh and buildexe.csh script in $CASEROOT/Buildconf based on the resolution, configuration, and other env settings. Generally, an error in this phase of configure will point to a specific component. Begin by debugging the component template file in $CASEROOT/Tools/Templates. The component template filename will be something like cam.cpl7.template for the cam component. If there is a bug in the component template file, then it's probably important to fix the original copy of the template file. These can be found in the create_newcase scripts (i.e. search for the string, template).
The specific implementation of the component template files is very much component dependent. However, each must generate a buildnml.csh script in the $CASEROOT/Buildconf directory to generate namelist input on-the-fly. Each template file must generate a buildexe.csh script in the same $CASEROOT/Buildconf directory to support the build of that component. And each template file must support generation of input_data_list files in the $CASEROOT/Buildconf directory either at the configure or build step to specify the required input files for that configuration and component.
Next, configure runs the $CASEROOT/Tools/generate_batch.csh script. This script generates the build and run scripts for the case. This is partly accomplished by running the mkbatch.$MACH script for the particular machine. That script is located in $CCSMROOT/scripts/ccsm_utils/Machines. If there are problems with the resulting build or run script, the error can usually be traced to the setup of the mkbatch.$MACH machine file.
For instance an error like this
> create_newcase -case ~/ccsm4/b40.B2000bad \ -res 0.23x0.31_0.23x0.31 \ -mach bluefire \ -compset B > cd ~/ccsm4/b40.B2000bad > configure -case Generating resolved namelist, prestage, and build scripts build-namelist - No default value found for ncdata user defined attributes: key=ic_md val=00010101 Died at /user/ccsmroot/models/atm/cam/bld/build-namelist line 2019. ERROR: generate_resolved.csh error for atm template configure error: configure generated error in attempting to created resolved scripts |
indicates the generate_resolved.csh script failed in the atm template, which
is the cam template for this compset. It also reports that the cam build-namelist step in the
cam template failed at line 2019.
In this case, CAM could not find a valid value of ncdata from its default_namelist.xml file.
To fix this particular problem, the user can supply an alternative initial dataset and the
update the value in either the CAM_CONFIG_OPTS
values or in the
SourceMods/src.cam/user_nl.