.. _model_config_component: CONFIG_*_FILE ============= .. contents:: :local: Overview -------- This variables defines the configuration XML for each component. Entry ----- The following is an example entry for ``CONFIG__FILE`` in ``config_files.xml``. The ```` is replaced by the name of the component. There will be multiple ``entry`` elements, one for each component supported by the model. .. code-block:: xml char $COMP_ROOT_DIR_ATM/cime_config/config_component.xml case_last env_case.xml file containing specification of component specific definitions and values(for documentation only - DO NOT EDIT) $CIMEROOT/CIME/data/config/xml_schemas/entry_id.xsd $CIMEROOT/CIME/data/config/xml_schemas/entry_id_version3.xsd Schema Definition ----------------- The configuration is stored in ``config_component.xml`` under the components ``cime_config`` directory e.g. ``mosart/cime_config/config_component.xml``. This file will store multiple variables for the component defined using :ref:`*entry*` elements. Example contents of ``config_component.xml``. =================== ================================== Element/Attribute Description =================== ================================== desc Description for the component. entry XML variable entries. help Help text for the component. =================== ================================== .. code-block:: xml Stub atm component char satm satm case_comp env_case.xml Name of atmosphere component ========================================= SATM naming conventions in compset name ========================================= Define support libraries ------------------------ This variable is a list of support libraries that should be built by the case. It is defined by the driver and component buildnml scripts and is used with ``BUILD_LIB_FILE`` to locate required buildlib scripts. It is a list of libraries which will be built in list order so it is important that dependent libraries are identified. The ``CASE_SUPPORT_LIBRARIES`` variable should be defined in the drivers ``config_component.xml`` file as .. code-block:: xml char gptl,pio,csm_share,FTorch,CDEPS build_def env_build.xml Support libraries required The components ``buildnml`` script can modify the variable and add a list of libraries needed by the given component. The list should be ordered so that a library comes after all of the libraries it depends on. The following is a small example of a ``buildnml`` script modifying ``CASE_SUPPORT_LIBRARIES``. .. code-block:: python def buildnml(case, caseroot, component): ... libs = case.get_value("CASE_SUPPORT_LIBRARIES") mpilib = case.get_value("MPILIB") if mpilib == "mpi-serial": libs.insert(0, mpilib) case.set_value("CASE_SUPPORT_LIBRARIES", ",".join(libs)) ... Triggering a rebuild -------------------- It's the responsibility of a component to define which settings will require a component to be rebuilt. These triggers can be defined as follows. .. code-block:: xml char NTASKS,NTHREADS,NINST rebuild_triggers env_build.xml Settings that will trigger a rebuild If a user was to change `NTASKS`, `NTHREADS`, or `NINST` in a case using the component, then a rebuild would be required before the case could be submitted again.