source: BOL/Multi_atlas/atlas/plot_params.py

Last change on this file 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: 31.7 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       'tasmax' : {
136             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
137            'full_field'   : {'colors':'-35 -30 -25 -20 -15 -10 -6 0 6 10 14 18 22 25 28 30 32 34 35 36 37'  , 'offset' : -273.15 },
138            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
139            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
140        },
141       'tasmin' : {
142             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
143            'full_field'   : {'colors':'-60 -50 -40 -35 -30 -24 -18 -12 -8 -4 -2 0  2 4 8 10 12 18 22 26 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       'dtr' : {
148             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
149            'full_field'   : {'colors':' 0 1 2 3 5 8 11 14 18 22 26 30'  , 'offset' : 0},
150            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
151            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
152        },
153
154       'prw' : {
155             'default' : { 'units' : 'kg/m2' , 'color' : 'BlueWhiteOrangeRed' },
156            'full_field'   : {'colors':'0 2 4 6 8 10 14 18 20 24 28 32 36 40 44 48 52 56 58 60'  },
157            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev'},
158            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev'},
159        },
160       'ts' : {
161             'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed' },
162            '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 },
163            'bias'        : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev','offset':0},
164            'model_model' : {'colors': '-8 -4 -2 -1 -0.5 0.5 1 2 4 8' , 'color':'hotcold_18lev' ,'offset':0},
165        },
166       'tauu' : {
167            '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' },
168            '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' },
169            '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.'},
170        },
171       'tauv' : {
172            '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' },
173            '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' },
174            '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.'},
175        },
176       'psl' : {
177             'default' : { 'scale'  : 1. , 'units' : 'hPa', 'color'  : 'matlab_jet' },
178            'full_field'   : {'colors':'980 985 990 995 1000 1005 1010 1015 1020 1025 1030 1040 1050' },
179            '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' },
180            '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'},
181        },
182       'zg500' : {
183            'full_field'   : {'colors':'4900 4950 5000 5050 5100 5150 5200 5250 5300 5350 5400 5450 5500 5550 5600 5650 5700 5750 5800'  },
184            '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' },
185            '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'},
186        },
187       'rsah' : {
188            'full_field'   : {'colors':'10 20 30 40 50 60 70 80 90 100 110 120 130' , 'color':'precip3_16lev' },
189            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
190            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
191        },
192       'rsahcs' : {
193            'full_field'   : {'colors':'10 20 30 40 50 60 70 80 90 100 110 120 130' , 'color':'precip3_16lev' },
194            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
195            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
196        },
197       'rsahcre' : {
198            'full_field'   : {'colors':'-20 -16 -12 -10 -8 -6 -4 -2 2 4 6 8 10 12 16 20'  },
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       'rlah' : {
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':'-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 },
205            #PB OU ?
206            'full_field'   : {'colors':'-280 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -50' },
207            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
208            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
209        },
210       'rlahcs' : {
211            'full_field'   : {'colors':'-260 -250 -240 -230 -220 -210 -200 -190 -180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70' },
212            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
213            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -1 1 5 10 20 30 40 50'},
214        },
215       'rlahcre' : {
216            #'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'  },
217            'full_field'   : {'colors':'220 240 260 280 300 320 340 360 380 400 420 460 480 500 540 580' },
218            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
219            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
220        },
221       'rah' : {
222            #'full_field'   : {'colors':'160 180 200 220 240 260 280 300 320 340 360 380 400 420 460' , 'color':'precip3_16lev'},
223            'full_field'   : {'colors':'-180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0' },
224            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
225            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
226        },
227       'rahcs' : {
228            'full_field'   : {'colors':'-160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20'  },
229            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
230            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
231        },
232       'rahcre' : {
233            #'full_field'   : {'colors':'240 260 280 300 320 340 360 380 400 420 460 480 500 540 580' , 'color':'precip3_16lev'},
234            'full_field'   : {'colors':'-180 -170 -160 -150 -140 -130 -120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0' },
235            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
236            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 0 5 10 20 30 40 50'},
237        },
238       'rsts' : {
239            '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' },
240            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
241            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
242        },
243       'rsut' : {
244            'full_field'   : {'colors':'50 60 70 80 90 100 110 120 130 140 150 160 180'  ,'color':'precip3_16lev'},
245            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
246            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
247        },
248       'rsutcs' : {
249            'full_field'   : {'colors':'10 30 50 60 70 80 90 100 110 120 130 140 150 160 180'  ,'color':'precip3_16lev'},
250            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
251            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
252        },
253       'rlutcs' : {
254            'full_field'   : {'colors':'150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 ' ,'color':'precip3_16lev' },
255            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'hotcold_18lev' },
256            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
257        },
258       'albs' : {
259            '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'
260            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' ,'scale':100},
261            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
262        },
263       'albt' : {
264            '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'},
265            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed','scale':100 },
266            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
267        },
268       'albtcs' : {
269            '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'},
270            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed','scale':100 },
271            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 -1 1 2 5 10 20 30 40 50','scale':100, 'color':'BlueWhiteOrangeRed'},
272        },
273       # -- CRE
274       'cress' : {
275            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
276            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
277            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
278            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
279        },
280       'crels' : {
281            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
282            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
283            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
284            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
285        },
286       'crets' : {
287            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
288            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
289            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
290            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
291        },
292       'crest' : {
293            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
294            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
295            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
296            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
297        },
298       'crelt' : {
299            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
300            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
301            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
302            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
303        },
304       'crett' : {
305            #'full_field'   : {'colors':'-120 -110 -100 -90 -80 -70 -60 -50 -40 -30 -20 -10' ,'color':'precip3_16lev' },
306            'full_field'   : {'colors':'-100 -90 -80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 90 100' },
307            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
308            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
309        },
310       #'crels' : {
311       #     'full_field'   : {'colors':'5 10 15 20 25 30 35 40 45 50 55 60 65 70 75' ,'color':'precip3_16lev' },
312       #     'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
313       #     'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
314       # },
315       #'crets' : {
316       #     'full_field'   : {'colors':'-80 -70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80'  },
317       #     'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
318       #     'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
319       # },
320       'rts' : {
321            'full_field'   : {'colors':'-20 0 20 40 60 80 100 120 140 160 180 200' ,'color':'precip3_16lev' },
322            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
323            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
324        },
325       'crelt' : {
326            'full_field'   : {'colors':'0 5 10 15 20 25 30 35 40 45 50 55 60 65 70' ,'color':'precip3_16lev' },
327            'bias'        : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50' , 'color':'BlueWhiteOrangeRed' },
328            'model_model' : {'colors': '-50 -40 -30 -20 -10 -5 -2 2 5 10 20 30 40 50'},
329        },
330       'cltcalipso' : {
331            'full_field'   : {'colors':'20 25 30 35 40 45 50 55 60 70 80 90 100'  , 'color' : 'precip_11lev'},
332            'bias'        : {'colors': '-70 -40 -30 -20 -10 -5 5 10 20 30 40 70' , 'color':'precip_diff_12lev' },
333            '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'},
334        },
335       'clhcalipso' : {
336            'full_field'   : {'colors':'0 2 4 6 8 10 20 30 40 50 60 70 80 90 100' , 'color' : 'precip_11lev' },
337            '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' },
338            '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'},
339        },
340       'clmcalipso' : {
341            'full_field'   : {'colors':'2 4 6 8 10 20 30 40 50 60'  , 'color' : 'precip_11lev'},
342            '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' },
343            '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'},
344        },
345       'cllcalipso' : {
346            'full_field'   : {'colors':'5 10 20 30 40 50 60 70 80 90 100'  , 'color' : 'precip_11lev'},
347            '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' },
348            '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'},
349        },
350        'ua'  : {
351            'default' : { 'color' : 'ViBlGrWhYeOrRe' , 'units':'m/s'},
352            'full_field'   : {'colors':'-40 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 40'},
353            'bias'   : {'colors':'-20 -15 -10 -5 -2 -1 1 2 5 10 15 20'},
354            'model_model' : {'min':-10,'max':10,'delta':1},
355        },
356        'va'  : {
357            'default' : { 'color' : 'ViBlGrWhYeOrRe' , 'units':'m/s'},
358            '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'},
359            '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'},
360            'model_model' : {'min':-1,'max':1,'delta':0.05},
361        },
362        'ta' : {
363            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
364            'full_field'   : {'colors':'-70 -50 -40 -30 -20 -10 0 5 10 15 20 25 30 25'},
365            'bias'   : {'colors':'-15 -10 -8 -6 -4 -2 -1 1 2 4 6 8 10 15','offset':0},
366            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
367        },
368        'hus'  : {
369            'default' : { 'color' : 'precip_11lev' , 'units':'g/g'},
370            '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'},
371            'bias'        : {'min':-0.005,'max':0.005,'delta':0.0005, 'color':'ViBlGrWhYeOrRe'},
372            'model_model' : {'min':-0.001,'max':0.001,'delta':0.0001 , 'color':'ViBlGrWhYeOrRe'},
373        },
374        'hur'  : {
375            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'1'},
376            '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' },
377            'bias'        : {'colors': '-50 -30 -20 -10 -4 -2 0 2 4 10 20 30 50' , 'color':'precip_diff_12lev' },
378            'model_model' : {'colors': '-50 -30 -20 -10 -4 -2 0 2 4 10 20 30 50' , 'color':'precip_diff_12lev' },
379        },
380        'uas'  : {
381            'default' : { 'color' : 'testcmap' , 'units':'m/s'},
382            'fullfield'   : {'colors':'-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10'},
383            'bias'        : {'min':-10,'max':10,'delta':1},
384            'model_model' : {'min':-5,'max':5,'delta':0.5},
385        },
386        'vas'  : {
387            'default' : { 'color' : 'testcmap' , 'units':'m/s'},
388            'fullfield'   : {'colors':'-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10'},
389            'bias'        : {'min':-10,'max':10,'delta':1},
390            'model_model' : {'min':-5,'max':5,'delta':0.5},
391        },
392        'ua850'  : {
393            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
394            'full_field'   : {'colors':'-20 -15 -10 -5 -2 2 5 10 15 20'},
395            'bias'       :  {'min':-8,'max':8,'delta':1, 'color' :'BlueWhiteOrangeRed'},
396            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
397        },
398        'ua700'  : {
399            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
400            'full_field'   : {'colors':'-20 -15 -10 -5 -2 2 5 10 15 20'},
401            'bias'        : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
402            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
403        },
404        'ua500'  : {
405            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
406            'full_field'   : {'colors':'-25 -20 -15 -10 -5 -2 2 5 10 15 20 25'},
407            'bias'        : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
408            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
409        },
410        'ua200'  : {
411            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
412            'full_field'   : {'colors':'-40 -30 -25 -20 -15 -10 -5 -2 2 5 10 15 20 25 30 40'},
413            'bias'        : {'min':-20,'max':20,'delta':2, 'color' :'BlueWhiteOrangeRed'},
414            'model_model' : {'min':-10,'max':10,'delta':1, 'color' :'BlueWhiteOrangeRed'},
415        },
416        'va850'  : {
417            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
418            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
419            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
420            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
421        },
422        'va700'  : {
423            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
424            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
425            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
426            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
427        },
428        'va500'  : {
429            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
430            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
431            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
432            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
433        },
434        'va200'  : {
435            'default' : { 'color' : 'BlueWhiteOrangeRed' , 'units':'m/s'},
436            'full_field'   : {'colors':'-10 -8 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 8 10'},
437            'bias'        : {'min':5,'max':5,'delta':0.5, 'color' :'BlueWhiteOrangeRed'},
438            'model_model' : {'min':-1,'max':1,'delta':0.05, 'color' :'BlueWhiteOrangeRed'},
439        },
440        'ta850' : {
441            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
442            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
443            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
444            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
445        },
446        'ta700' : {
447            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
448            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
449            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
450            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
451        },
452        'ta500' : {
453            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
454            'full_field'   : {'colors':'-40 -30 -20 -10 0 5 10 15 20 25'},
455            'bias'        : {'min':-5,'max':5,'delta':1,'offset':0},
456            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
457        },
458        'ta200' : {
459            'default' : { 'units' : 'degC' , 'color' : 'BlueWhiteOrangeRed', 'offset':-273.15 },
460            'full_field'   : {'colors':'-70 -65 -60 -58 -56 -54 -52 -50 -45 -40'},
461            'bias'        : {'min':-10,'max':10,'delta':1,'offset':0},
462            'model_model' : {'min':-10,'max':10,'delta':1,'offset':0},
463        },
464
465    }
466    #
467    rep=defaults.copy()
468    if variable in per_variable :
469        var_entry=per_variable[variable]
470        for cont in [ 'default', context ] :
471            if cont in var_entry : rep.update(var_entry[cont])
472    return rep
473
Note: See TracBrowser for help on using the repository browser.