source: BOL/Multi_atlas/atlas/plot_params.py.ref @ 3684

Last change on this file since 3684 was 3684, checked in by idelkadi, 4 years ago

Repository under svn of a first version of Multiatlas diagnostics for LMDZ. This version is adapted to be able to run a LMDZ multiatlas on an individual account on the ciclad machine of the IPSL. In this version, the parts to be modified are identified so as to subsequently adapt it to other machines.
This version is still under development.

File size: 30.4 KB
Line 
1# -*- coding: iso-8859-1 -*-
2# Created : S.Sénési - nov 2015
3
4"""
5Une fonction qui rend des paramètres régissant l'apparence de
6graphiques, en fonction de la variable géophysique et du contexte
7
8Encore au stade de brouilllon ; peu de variables traitées
9
10"""
11
12def plot_params(variable,context) :
13    """
14    Return plot parameters as a dict() , according to LMDZ habits , for a given
15    variable and a context (among full_field, bias, model_model)
16
17    """
18
19    defaults = {
20        'contours' : 1 ,
21        'color'    :'temp_19lev',
22    }
23
24    per_variable = {
25       'pr' : {
26              'default'  : { 'scale' : 86400. , 'color' : 'precip_11lev' , 'contours' : 1 },
27            'full_field'   : {'colors':'0.5 1 2 3 4 6 8 10 12 14'  },
28            'bias'        : {'color':'precip_diff_12lev','colors': '-5 -2 -1 -0.5 -0.2 -0.1 0.1 0.2 0.5 1 2 5' },
29            'model_model' : {'color':'precip_diff_12lev','colors': '-5 -2 -1 -0.5 -0.2 -0.1 0.1 0.2 0.5 1 2 5'},
30        },
31       'pme' : {
32              'default'  : { 'scale' : 86400. , 'color' : 'precip_diff_12lev' , 'contours' : 1 },
33            'full_field'   : {'colors':'-14 -12 -10 -8 -6 -4 -3 -2 -1 -0.5 0.5 1 2 3 4 6 8 10 12 14'  },
34            'bias'        : {'color':'precip_diff_12lev','colors': '-5 -2 -1 -0.5 -0.2 -0.1 0.1 0.2 0.5 1 2 5' },
35            'model_model' : {'color':'precip_diff_12lev','colors': '-5 -2 -1 -0.5 -0.2 -0.1 0.1 0.2 0.5 1 2 5'},
36        },
37       'hurs' : {
38            'full_field'   : {'colors':'72 74 76 78 80 82 84 86 88 90 92' , 'color' : 'precip_11lev' },
39            'bias'        : {'colors': '-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10' , 'color':'precip_diff_12lev' },
40            'model_model' : {'colors': '-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10' , 'color':'precip_diff_12lev' },
41        },
42       'rstt' : {
43            'full_field'   : {'colors':'0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320', 'color':'precip3_16lev' },
44            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
45            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
46        },
47       'rlut' : {
48            'full_field'   : {'colors':'150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310', 'color':'precip3_16lev' },
49            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
50            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
51        },
52       'rlus' : {
53            'full_field'   : {'colors':'120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 440 480' ,'color':'precip3_16lev'},
54            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
55            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
56        },
57       'rsus' : {
58            'full_field'   : {'colors':'10 20 30 40 50 60 70 80 90 100 110 120 130 140 150' ,'color':'precip3_16lev' },
59            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },#BlueWhiteOrangeRed,MPL_bwr,NCV_blu_red
60            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
61        },
62       'rsuscs' : {
63            'full_field'   : {'colors':'20 30 40 50 60 70 80 90 100 110 120 130 140 150' ,'color':'precip3_16lev' },
64            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
65            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
66        },
67       'rsds' : {
68            'full_field'   : {'colors':'80 100 120 140 160 180 200 220 240 260 280 300 320' ,'color':'precip3_16lev' },
69            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
70            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
71        },
72       'rlds' : {
73            'full_field'   : {'colors':'100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 420' ,'color':'precip3_16lev' },
74            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
75            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
76        },
77       'rsdscs' : {
78            'full_field'   : {'colors':'80 100 120 140 160 180 200 220 240 260 280 300 320' ,'color':'precip3_16lev' },
79            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
80            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
81        },
82       'rldscs' : {
83            'full_field'   : {'colors':'100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 420' ,'color':'precip3_16lev' },
84            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
85            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
86        },
87
88       'rtt' : {
89            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50 60 70 80 90 100' , 'color':'BlueWhiteOrangeRed' },
90            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
91            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
92        },
93       'crest' : {
94            'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10'  },
95            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
96            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
97        },
98       'crett' : {
99            'full_field'   : {'colors':'-60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60'  },
100            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
101            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
102        },
103       'hfns' : {
104            'full_field'   : {'colors':'-200 -150 -100 -50 0 50 100 150 200 -75 -25 25 75'  },
105            'bias'        : {'colors': '-80 -60 -40 -20 -10 10 20 40 60 80' , 'color':'BlueWhiteOrangeRed' },
106            'model_model' : {'colors': '-80 -60 -40 -20 -10 10 20 40 60 80'},
107        },
108       'hfss' : {
109            'full_field'   : {'colors':'0 10 20 30 40 50 60 70 80 90 100 110 120' , 'color':'precip3_16lev'},
110            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55' , 'color':'ViBlGrWhYeOrRe' },
111            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55'},
112        },
113       'hfls' : {
114            'full_field'   : {'colors':'0 20 40 60 80 100 120 140 160 180 200' , 'color':'precip3_16lev' },
115            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55' , 'color':'ViBlGrWhYeOrRe' },
116            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55'},
117        },
118       'bil' : {
119            'full_field'   : {'colors':'0 20 40 60 80 100 120 140 160 180 200' , 'color':'precip3_16lev' },
120            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55' , 'color':'ViBlGrWhYeOrRe' },
121            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 15 25 35 45 55'},
122        },
123       'sst' : {
124             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
125            'full_field'   : {'colors':'-60 -50 -40 -35 -30 -25 -20 -15 -10 -6 0 6 10 14 18 22 26 24 27 28 30'  , 'offset' : -273.15 },
126            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
127            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
128        },
129       'tas' : {
130             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
131            'full_field'   : {'colors':'-60 -50 -40 -35 -30 -25 -20 -15 -10 -6 0 6 10 14 18 22 26 24 27 28 30'  , 'offset' : -273.15 },
132            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
133            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
134        },
135       'prw' : {
136             'default' : { 'units' : 'kg/m2' , 'color' : 'BlueWhiteOrangeRed' },
137            'full_field'   : {'colors':'0 2 4 6 8 10 14 18 20 24 28 32 36 40 44 48 52 56 58 60'  },
138            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev'},
139            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev'},
140        },
141       'ts' : {
142             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
143            'full_field'   : {'colors':'-60 -50 -40 -35 -30 -25 -20 -15 -10 -6 0 6 10 14 18 22 26 24 27 28 30'  , 'offset' : -273.15 },
144            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
145            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
146        },
147       'tauu' : {
148            'full_field'   : {'colors':'-.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16' ,'color':'ViBlGrWhYeOrRe' },
149            'bias'        : {'colors': '-1. -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 1.' , 'color':'ViBlGrWhYeOrRe' },
150            'model_model' : {'colors': '-1. -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 1.'},
151        },
152       'tauv' : {
153            'full_field'   : {'colors':'-0.1 -0.08 -0.06 -0.04 -0.02 -0.01 0.01 0.02 0.04 0.06 0.08 0.1' ,'color':'ViBlGrWhYeOrRe' },
154            'bias'        : {'colors': '-0.1 -0.08 -0.06 -0.05 -0.04 -0.03 -0.02 -0.01 0.01 0.02 0.03 0.04 0.05 0.06 0.08 0.1' ,'color':'ViBlGrWhYeOrRe' },
155            'model_model' : {'colors': '-1. -0.16 -0.14 -0.12 -0.1 -0.08 -0.06 -0.04 -0.02 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 1.'},
156        },
157       'psl' : {
158             'default' : { 'scale'  : 1. , 'units' : 'hPa', 'color'  : 'matlab_jet' },
159            'full_field'   : {'colors':'980 985 990 995 1000 1005 1010 1015 1020 1025 1030 1040 1050' },
160            'bias'        : {'colors': '-100 -90 -80 -60 -20 40 -17.5 -15 -12.5 -10 -7.5 -5 -2.5 2.5 5 7.5 10 12.5 15 17.5 20 40 60 80 90 100' , 'color':'testcmap' },
161            'model_model' : {'colors': '-100 -90 -80 -70 -60 -20 -17.5 -15 -12.5 -10 -7.5 -5 -2.5 2.5 5 7.5 10 12.5 15 17.5 20 20 30 40 50 60 70 80 90 100'},
162        },
163       'zg500' : {
164            'full_field'   : {'colors':'4900 4950 5000 5050 5100 5150 5200 5250 5300 5350 5400 5450 5500 5550 5600 5650 5700 5750 5800'  },
165            'bias'        : {'colors': '-260 -230 -200 -180 -160 -140 -120 -100 -80 -60 -40 -20 -10 10 20 40 60 80 100 120 140 160 180 200 230 260' , 'color':'BlueWhiteOrangeRed' },
166            'model_model' : {'colors': '-260 -230 -200 -180 -160 -140 -120 -100 -80 -60 -40 -20 -10 10 20 40 60 80 100 120 140 160 180 200 230 260' , 'color':'BlueWhiteOrangeRed'},
167        },
168       'rsah' : {
169            'full_field'   : {'colors':'10 20 30 40 50 60 70 80 90 100 110 120 130' , 'color':'precip3_16lev' },
170            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
171            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
172        },
173       'rsahcs' : {
174            'full_field'   : {'colors':'10 20 30 40 50 60 70 80 90 100 110 120 130' , 'color':'precip3_16lev' },
175            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
176            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
177        },
178       'rsahcre' : {
179            'full_field'   : {'colors':'-20 -16 -12 -10 -8 -6 -4 -2 2 4 6 8 10 12 16 20'  },
180            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
181            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
182        },
183       'rlah' : {
184            #'full_field'   : {'colors':'160 180 200 220 240 260 280 300 320 340 360 380 400 420 460' , 'color':'precip3_16lev' },
185            #'full_field'   : {'colors':'-280 -270 -260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50' ,'scale':-1 },
186            #PB OU ?
187            'full_field'   : {'colors':'-280 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -50' },
188            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
189            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
190        },
191       'rlahcs' : {
192            'full_field'   : {'colors':'-260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70' },
193            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
194            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50'},
195        },
196       'rlahcre' : {
197            #'full_field'   : {'colors':'-60 -55 -50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0 5 10 15 20 25 30 35 40 45 50 55 60'  },
198            'full_field'   : {'colors':'220 240 260 280 300 320 340 360 380 400 420 460 480 500 540 580' },
199            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
200            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
201        },
202       'rah' : {
203            #'full_field'   : {'colors':'160 180 200 220 240 260 280 300 320 340 360 380 400 420 460' , 'color':'precip3_16lev'},
204            'full_field'   : {'colors':'-180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0' },
205            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
206            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
207        },
208       'rahcs' : {
209            'full_field'   : {'colors':'-160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20'  },
210            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
211            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
212        },
213       'rahcre' : {
214            #'full_field'   : {'colors':'240 260 280 300 320 340 360 380 400 420 460 480 500 540 580' , 'color':'precip3_16lev'},
215            'full_field'   : {'colors':'-180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0' },
216            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
217            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
218        },
219       'rsts' : {
220            'full_field'   : {'colors':'0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330' ,'color':'precip3_16lev' },
221            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
222            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
223        },
224       'rsut' : {
225            'full_field'   : {'colors':'50 60 70 80 90 100 110 120 130 140 150 160 180'  ,'color':'precip3_16lev'},
226            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
227            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
228        },
229       'rsutcs' : {
230            'full_field'   : {'colors':'10 30 50 60 70 80 90 100 110 120 130 140 150 160 180'  ,'color':'precip3_16lev'},
231            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
232            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
233        },
234       'rlutcs' : {
235            'full_field'   : {'colors':'150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 ' ,'color':'precip3_16lev' },
236            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
237            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
238        },
239       'albs' : {
240            'full_field'   : {'colors':'5 10 15 20 25 30 35 40 45 50 55 60 65 70 80 90 100' ,'scale':100 ,'color':'precip3_16lev'},#'precip3_16lev'
241            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' ,'scale':100},
242            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
243        },
244       'albt' : {
245            'full_field'   : {'colors':'5 10 15 20 25 30 35 40 45 50 55 60 65 70 80 90 100' ,'scale':100 ,'color':'precip3_16lev'},
246            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed','scale':100 },
247            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
248        },
249       'albtcs' : {
250            'full_field'   : {'colors':'5 10 15 20 25 30 35 40 45 50 55 60 65 70 80 90 100' ,'scale':100 ,'color':'precip3_16lev'},
251            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed','scale':100 },
252            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
253        },
254       # -- CRE
255       'cress' : {
256            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
257            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
258            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
259            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
260        },
261       'crels' : {
262            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
263            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
264            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
265            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
266        },
267       'crets' : {
268            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
269            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
270            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
271            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
272        },
273       'crest' : {
274            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
275            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
276            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
277            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
278        },
279       'crelt' : {
280            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
281            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
282            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
283            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
284        },
285       'crett' : {
286            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
287            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
288            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
289            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
290        },
291       #'crels' : {
292       #     'full_field'   : {'colors':'5 10 15 20 25 30 35 40 45 50 55 60 65 70 75' ,'color':'precip3_16lev' },
293       #     'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
294       #     'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
295       # },
296       #'crets' : {
297       #     'full_field'   : {'colors':'-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80'  },
298       #     'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
299       #     'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
300       # },
301       'rts' : {
302            'full_field'   : {'colors':'-20 0 20 40 60 80 100 120 140 160 180 200' ,'color':'precip3_16lev' },
303            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
304            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
305        },
306       'crelt' : {
307            'full_field'   : {'colors':'0 5 10 15 20 25 30 35 40 45 50 55 60 65 70' ,'color':'precip3_16lev' },
308            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
309            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
310        },
311       'cltcalipso' : {
312            'full_field'   : {'colors':'20 25 30 35 40 45 50 55 60 70 80 90 100'  , 'color' : 'precip_11lev'},
313            'bias'        : {'colors': '-70 -40 -30 -20 -10 -5 5 10 20 30 40 70' , 'color':'precip_diff_12lev' },
314            'model_model' : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70', 'color':'precip_diff_12lev'},
315        },
316       'clhcalipso' : {
317            'full_field'   : {'colors':'0 2 4 6 8 10 20 30 40 50 60 70 80 90 100' , 'color' : 'precip_11lev' },
318            'bias'        : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70' , 'color':'precip_diff_12lev' },
319            'model_model' : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70', 'color':'precip_diff_12lev'},
320        },
321       'clmcalipso' : {
322            'full_field'   : {'colors':'2 4 6 8 10 20 30 40 50 60'  , 'color' : 'precip_11lev'},
323            'bias'        : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70' , 'color':'precip_diff_12lev' },
324            'model_model' : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70', 'color':'precip_diff_12lev'},
325        },
326       'cllcalipso' : {
327            'full_field'   : {'colors':'5 10 20 30 40 50 60 70 80 90 100'  , 'color' : 'precip_11lev'},
328            'bias'        : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70' , 'color':'precip_diff_12lev' },
329            'model_model' : {'colors': '-70 -40 -35 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 35 40 70', 'color':'precip_diff_12lev'},
330        },
331        'ua'  : {
332            'default' : { 'color' : 'ViBlGrWhYeOrRe' , 'units':'m/s'},
333            'full_field'   : {'colors':'-40 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 40'},
334            'bias'   : {'colors':'-20 -15 -10 -5 -2 -1 1 2 5 10 15 20'},
335            'model_model' : {'min':-10,'max':10,'delta':1},
336        },
337        'va'  : {
338            'default' : { 'color' : 'ViBlGrWhYeOrRe' , 'units':'m/s'},
339            'full_field'   : {'colors':'-1.8 -1.6 -1.4 -1.2 -1 -0.8 -0.6 -0.4 -0.2 -0.1 -0.05 0.05 0.1 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8'},
340            'bias'   : {'colors':'-2 -1.5 -1 -0.5 -0.2 -0.1 -0.05 0.05 0.1 0.2 0.5 1 1.5 2'},
341            'model_model' : {'min':-1,'max':1,'delta':0.05},
342        },
343        'ta' : {
344            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
345            'full_field'   : {'colors':'-70 -50 -40 -30 -20 -10 0 5 10 15 20 25 30 25'},
346            'bias'   : {'colors':'-15 -10 -8 -6 -4 -2 -1 1 2 4 6 8 10 15','offset':0},
347            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
348        },
349        'hus'  : {
350            'default' : { 'color' : 'precip_11lev' , 'units':'g/g'},
351            'full_field'   : {'colors':'0.00001 0.0001 0.0005 0.001 0.002 0.003 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.02'},
352            'bias'        : {'min':-0.005,'max':0.005,'delta':0.0005, 'color':'ViBlGrWhYeOrRe'},
353            'model_model' : {'min':-0.001,'max':0.001,'delta':0.0001 , 'color':'ViBlGrWhYeOrRe'},
354        },
355        'hur'  : {
356            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'1'},
357            'full_field'   : {'colors':'0 0.5 1 2 4 6 8 10 20 30 40 50 60 70 75 80 85 90 95 100.' , 'color' : 'precip_11lev' },
358            'bias'        : {'colors': '-50 -30 -20 -10 -4 -2 0 2 4 10 20 30 50' , 'color':'precip_diff_12lev' },
359            'model_model' : {'colors': '-50 -30 -20 -10 -4 -2 0 2 4 10 20 30 50' , 'color':'precip_diff_12lev' },
360        },
361        'uas'  : {
362            'default' : { 'color' : 'testcmap' , 'units':'m/s'},
363            'fullfield'   : {'colors':'-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10'},
364            'bias'        : {'min':-10,'max':10,'delta':1},
365            'model_model' : {'min':-5,'max':5,'delta':0.5},
366        },
367        'vas'  : {
368            'default' : { 'color' : 'testcmap' , 'units':'m/s'},
369            'fullfield'   : {'colors':'-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10'},
370            'bias'        : {'min':-10,'max':10,'delta':1},
371            'model_model' : {'min':-5,'max':5,'delta':0.5},
372        },
373        'ua850'  : {
374            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
375            'full_field'   : {'colors':'-20 -15 -10 -5 -2 2 5 10 15 20'},
376            'bias'       :  {'min':-8,'max':8,'delta':1, 'color' :'BlueWhiteOrangeRed'},
377            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
378        },
379        'ua700'  : {
380            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
381            'full_field'   : {'colors':'-20 -15 -10 -5 -2 2 5 10 15 20'},
382            'bias'        : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
383            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
384        },
385        'ua500'  : {
386            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
387            'full_field'   : {'colors':'-25 -20 -15 -10 -5 -2 2 5 10 15 20 25'},
388            'bias'        : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
389            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
390        },
391        'ua200'  : {
392            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
393            'full_field'   : {'colors':'-40 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 40'},
394            'bias'        : {'min':-20,'max':20,'delta':2, 'color' :'BlueWhiteOrangeRed'},
395            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
396        },
397        'va850'  : {
398            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
399            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
400            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
401            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
402        },
403        'va700'  : {
404            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
405            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
406            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
407            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
408        },
409        'va500'  : {
410            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
411            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
412            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
413            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
414        },
415        'va200'  : {
416            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
417            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
418            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
419            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
420        },
421        'ta850' : {
422            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
423            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
424            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
425            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
426        },
427        'ta700' : {
428            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
429            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
430            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
431            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
432        },
433        'ta500' : {
434            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
435            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
436            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
437            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
438        },
439        'ta200' : {
440            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
441            'full_field'   : {'colors':'-70 -65 -60 -58 -56 -54 -52 -50 -45 -40'},
442            'bias'        : {'min':-10,'max':10,'delta':1,'offset':0},
443            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
444        },
445
446    }
447    #
448    rep=defaults.copy()
449    if variable in per_variable :
450        var_entry=per_variable[variable]
451        for cont in [ 'default', context ] :
452            if cont in var_entry : rep.update(var_entry[cont])
453    return rep
454
Note: See TracBrowser for help on using the repository browser.