CESM recommends using the xmlchange tool to modify env variables. xmlchange supports error checking as part of the implementation. Also, using xmlchange will decrease the chance that typographical errors will creep into the xml files. Conversion of the xml files to environment variables can fail silently with certain xml format errors. To use xmlchange, do, for instance,
> cd $CASEROOT > ./xmlchange -file env_run.xml -id STOP_OPTION -val nmonths > ./xmlchange -file env_run.xml -id STOP_N -val 6
which will change the variables STOP_OPTION and STOP_N in the file env_run.xml to the specified values. Use the "-warn" option to warn you so you don't overwrite a field that currently has a value. And use the "-append" option to perserve the current field and add a new bit on the end of it. The xml files can be edited manually, but users should take care not to introduce any formatting errors that could lead to incomplete env settings. See also .