-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchange-log-of-hacks.txt
50 lines (47 loc) · 3.28 KB
/
change-log-of-hacks.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
diff --git a/dr2xml.py b/dr2xml.py
index 97893f8..4053c6b 100644
--- a/dr2xml.py
+++ b/dr2xml.py
@@ -110,6 +110,8 @@ example_lab_and_model_settings={
'institution_id': "CNRM-CERFACS", # institution should be read in CMIP6_CV, if up-to-date
+ 'path_to_parse': "./", # The path of the directory which contains the iodef.xml, field_def, etc files.
+
# We describe the "CMIP6 source type" (i.e. components assembly) which is the default
# for each model. This value can be changed on a per experiment basis, in experiment_settings file
# However, using a 'configuration' is finer (see below)
@@ -1604,6 +1606,23 @@ def create_output_grid(ssh, grid_defs,domain_defs,target_hgrid_id,margs):
if target_hgrid_id :
# Must create and a use a grid similar to the last one defined
# for that variable, except for a change in the hgrid/domain
+
+ # This hack block is not necessary in case the two lines with "CMIP6_tos" and "CMIP6_sos" are removed from the ocean ping file.
+ #print
+ #print ' THOMAS: ', pingvars
+ print
+ print ' THOMAS pre hack: margs =', margs
+ if margs.values()[1] == "CMIP6_tos": # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ margs={"ping_alias":"sst_pot"} # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ #margs={"ping_alias":"sst"} # Added by Thomas Reerink, seems to solve/circumvent a BUG in the field_def file in the EC-EARTH3 repository only "sst" is available while "sst_pot" not
+ elif margs.values()[1] == "CMIP6_sos": # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ margs={"ping_alias":"sss"} # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ else: # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ print ' \n Unkown exception in hack: ', margs.values()[1] # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ sys.exit(" Program stop\n") # Added by Thomas Reerink, seems to solve/circumvent a BUG
+ print ' THOMAS post hack: margs =', margs
+ print
+
grid_ref=change_domain_in_grid(domain=target_hgrid_id, grid_defs=grid_defs,**margs)
if grid_ref is False or grid_ref is None :
raise dr2xml_error("Fatal: cannot create grid_def for %s with hgrid=%s"%(alias,target_hgrid_id))
@@ -2733,9 +2752,9 @@ def pingFileForRealmsList(settings, context,lrealms,svars,path_special,dummy="fi
if any([ v.modeling_realm == r or r in var_realms
for r in lrealms]) :
lvars.append(v)
- if context in settings['orphan_variables'] and \
- v.label in settings['orphan_variables'][context] :
- lvars.append(v)
+# if context in settings['orphan_variables'] and \
+# v.label in settings['orphan_variables'][context] :
+# lvars.append(v)
lvars.sort(key=lambda x:x.label_without_psuffix)
# Remove duplicates : want to get one single entry for all variables having