1 | #!/bin/ksh |
---|
2 | ##----------------------------------------------------------------- |
---|
3 | function CHM_Initialize |
---|
4 | { |
---|
5 | IGCM_debug_PushStack "CHM_Initialize" |
---|
6 | |
---|
7 | IGCM_debug_PopStack "CHM_Initialize" |
---|
8 | } |
---|
9 | |
---|
10 | ##----------------------------------------------------------------- |
---|
11 | function CHM_Update |
---|
12 | { |
---|
13 | IGCM_debug_PushStack "CHM_Update" |
---|
14 | |
---|
15 | # Add include of REPROBUS context in iodef.xml |
---|
16 | # In iodef.xml add on next line after "COMPONENT CONTEXT" |
---|
17 | # <context id="reprobus" src="./context_reprobus.xml"/> |
---|
18 | echo '<context id="reprobus" src="./context_reprobus.xml"/>' > add.tmp |
---|
19 | |
---|
20 | # Include xml files for output configuration if running with workflow CMIP6 |
---|
21 | if ( [ X"$( echo ${config_UserChoices_ExpType} | grep CMIP6 )" != "X" ] || [ X${config_Post_dr2xmlIPSL} = XTRUE ] ) ; then |
---|
22 | echo '<context id="reprobus" src="./ping_REPROBUS_CM6.xml"/>' >> add.tmp |
---|
23 | echo '<context id="reprobus" src="./dr2xml_reprobus.xml"/>' >> add.tmp |
---|
24 | fi |
---|
25 | |
---|
26 | |
---|
27 | ## Activate diagnostic output files and set output_level for each file |
---|
28 | |
---|
29 | # reprobus_species |
---|
30 | if [ X${reprobus_UserChoices_output_level_reprobus_species} = X ] || [ X${reprobus_UserChoices_output_level_reprobus_species} = XNONE ] ; then |
---|
31 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml species enabled FALSE |
---|
32 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml species output_level 0 |
---|
33 | else |
---|
34 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml species enabled TRUE |
---|
35 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml species output_level ${reprobus_UserChoices_output_level_reprobus_species} |
---|
36 | fi |
---|
37 | |
---|
38 | # reprobus_speciesm |
---|
39 | if [ X${reprobus_UserChoices_output_level_reprobus_speciesm} = X ] || [ X${reprobus_UserChoices_output_level_reprobus_speciesm} = XNONE ] ; then |
---|
40 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml speciesm enabled FALSE |
---|
41 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml speciesm output_level 0 |
---|
42 | else |
---|
43 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml speciesm enabled TRUE |
---|
44 | IGCM_comp_modifyXmlFile nonblocker file_def_reprobus.xml speciesm output_level ${reprobus_UserChoices_output_level_reprobus_speciesm} |
---|
45 | fi |
---|
46 | |
---|
47 | |
---|
48 | cp iodef.xml iodef.xml.tmp |
---|
49 | sed -e "/COMPONENT CONTEXT/r add.tmp" \ |
---|
50 | iodef.xml.tmp > iodef.xml |
---|
51 | rm iodef.xml.tmp add.tmp |
---|
52 | |
---|
53 | IGCM_debug_PopStack "CHM_Update" |
---|
54 | } |
---|
55 | |
---|
56 | #----------------------------------- |
---|
57 | function CHM_Finalize |
---|
58 | { |
---|
59 | IGCM_debug_PushStack "CHM_Finalize" |
---|
60 | |
---|
61 | IGCM_debug_PopStack "CHM_Finalize" |
---|
62 | } |
---|