source: CONFIG/UNIFORM/v7/IPSLCM7/define_config.sh @ 6640

Last change on this file since 6640 was 6638, checked in by jgipsl, 9 months ago

Add possiblity to compile a sub-configuration of IPSLCM7. By default, the full configuration is compiled. If only a sub-configuration is installed, the compilation will adapte and only compile what is avaiable. It is also possible to install the full IPSLCM7 configuration but compile a smaller forced configuration by using the argument -subconfig.
Indentation will be done in next commit.

  • Property svn:executable set to *
File size: 2.5 KB
Line 
1#!/bin/bash
2#
3# define_config.sh is called from the main compilation script compile_ipslcm7.sh
4# The script will define which components to compile.
5# By default all availble components are compiled.
6#
7# Step 1: The avaible components are defined.
8# Step 2: Define which components to compile. If argument [-subconfig subconfig] is set
9#         to the main compilation script, a control if the components needed are avaiable.
10#         If argument is subconfig is not set, the components defined in step 1 will be defined.
11
12
13### Step 1: Check available components possible to compile
14# LMDZ, ORCHIDEE and XIOS are considered mandatory and will not be checked.
15
16if [ -d ../../modeles/NEMO ] ; then
17    compnemo=y
18else
19    compnemo=n
20fi
21
22if [ -d ../../modeles/INCA ] ; then
23    compinca=y
24else
25    compinca=n
26fi
27
28if [ -d ../../modeles/DYNAMICO ] ; then
29    compdyna=y
30else
31    compdyna=n
32fi
33
34if [ -d ../../oasis3-mct ] ; then
35    compoasis=y
36else
37    compoasis=n
38fi
39
40
41
42### Step 2: Define which components to compile. Check if the configuration set as argument is possible
43if [ $subconfig == default ] ; then
44    echo ; echo Compilation of all availble components will be done:
45    echo compinca=$compinca compnemo=$compnemo compoasis=$compoasis compdyna=$compdyna complmdz=y comporch=y compxios=y
46elif [ $subconfig == ICOLMDZORINCA ] ; then
47    if [ $compinca == n ] || [ $compdyna == n ] ; then
48        echo ; echo It is not possible to compile ICOLMDZORINCA.
49        echo INCA or DYNAMICO source code is missing
50        exit
51    else
52        echo Compilation of ICOLMDZORINCA configuration will be done
53    fi 
54elif [ $subconfig == ICOLMDZOR ] ; then
55    if [ $compdyna == n ] ; then
56        echo ; echo It is not possible to compile ICOLMDZOR
57        echo DYNAMICO source code is missing
58        exit
59    else
60        echo Compilation of ICOLMDZOR configuration will be done
61    fi
62elif [ $subconfig == LMDZORINCA ] ; then
63    if [ $compinca == n ] ; then
64        echo ;  echo It is not possible to compile LMDZORINCA.
65        echo INCA source code is missing
66        exit
67    else
68        regular_latlon=yes
69        echo Compilation of regular LMDZORINCA configuration for grid $resol_atm will be done
70    fi 
71elif [ $subconfig == LMDZOR ] ; then
72    regular_latlon=yes
73    # We always suppose that LMDZ and ORCHIDEE are extracted. No check needs to be done.
74    echo Compilation of regular LMDZOR configuration for grid $resol_atm will be done
75else
76    echo ; echo The configuration $subconfig is not available
77    echo Choose between ICOLMDZORINCA ICOLMDZOR LMDZORINCA or LMDZOR
78    echo Exit now
79    exit
80fi
81echo ;
82
Note: See TracBrowser for help on using the repository browser.