Last change
on this file since 2300 was
2300,
checked in by aclsce, 10 years ago
|
- Added possibility to use XIOS as output library for LMDZ and ORCHIDEE as IPSLCM6_rc0 component.
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/ksh |
---|
2 | |
---|
3 | function XIOS_sed_xml |
---|
4 | { |
---|
5 | # Usage : XIOS_sed_xml xml_file attribute value |
---|
6 | # In file xml_file modify at the line containing id="attribute" the attribute value ">value<" |
---|
7 | |
---|
8 | # Test if the fichier exist |
---|
9 | if [ ! -f ${1} ] ; then |
---|
10 | echo "WARNING : ${1} file does not exist. Following will not be done : XIOS_sed_xml : ${1} ${2} ${3}" |
---|
11 | IGCM_debug_PopStack "XIOS_sed_xml" |
---|
12 | return |
---|
13 | fi |
---|
14 | sed -e "s/\(<[^\"]*\"${2}\".*>\)\([^<]*\)\(<[^>]*\)/\1${3}\3/" ${1} > ${1}.tmp |
---|
15 | RET=$? |
---|
16 | echo "XIOS_sed_xml" : ${1} ${2} ${3} |
---|
17 | \mv ${1}.tmp ${1} |
---|
18 | |
---|
19 | return $RET |
---|
20 | } |
---|
21 | |
---|
22 | #----------------------------------- |
---|
23 | function IOS_Initialize |
---|
24 | { |
---|
25 | IGCM_debug_PushStack "IOS_Initialize" |
---|
26 | |
---|
27 | echo INITIALIZE IOS !!! |
---|
28 | |
---|
29 | IGCM_debug_PopStack "IOS_Initialize" |
---|
30 | } |
---|
31 | |
---|
32 | #----------------------------------- |
---|
33 | function IOS_Update |
---|
34 | { |
---|
35 | IGCM_debug_PushStack "IOS_Update" |
---|
36 | |
---|
37 | echo UPDATE IOS !!! |
---|
38 | # Activate server mode |
---|
39 | XIOS_sed_xml iodef.xml using_server true |
---|
40 | # If lmdz_UserChoices_XIOS=y add LMDZ as component id : |
---|
41 | if [ X${lmdz_UserChoices_XIOS} = Xy ] ; then |
---|
42 | XIOS_sed_xml iodef.xml oasis_codes_id LMDZ,oceanx |
---|
43 | fi |
---|
44 | if [ -f namcouple ] ; then |
---|
45 | sed -e "s/2 LMDZ oceanx/3 LMDZ oceanx ${config_Executable_IOS[1]}/" namcouple > namcouple.tmp |
---|
46 | IGCM_sys_Mv namcouple.tmp namcouple |
---|
47 | fi |
---|
48 | |
---|
49 | IGCM_debug_PopStack "IOS_Update" |
---|
50 | } |
---|
51 | |
---|
52 | #----------------------------------- |
---|
53 | function IOS_Finalize |
---|
54 | { |
---|
55 | IGCM_debug_PushStack "IOS_Finalize" |
---|
56 | |
---|
57 | echo FINALIZE IOS !!! |
---|
58 | |
---|
59 | IGCM_debug_PopStack "IOS_Finalize" |
---|
60 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.