forked from YvZheng/pycwr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyart_default_config.py
1455 lines (1243 loc) · 55.6 KB
/
pyart_default_config.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
Configuration file for the Python ARM Radar Toolkit (Py-ART)
The values for a number of Py-ART parameters and the default metadata created
when reading files, correcting fields, etc. is controlled by this single
Python configuration file.
Py-ART's configuration can be modified by setting the environment variable
PYART_CONFIG to point to a configuration file with formatting similar to this
file.
The recommended method for changing these defaults is for users to copy this
file into their home directory, rename it to .pyart_config.py, make any
desired changes, and adjust their login scripts to set the PYART_CONFIG
environment variable to point to .pyart_config.py in their home directory.
Py-ART's configuration can also be modified within a script or shell session
using the load_config functions, such modification will last until the end of
the script/session or until a new configuration is loaded.
"""
##############################################################################
##############################################################################
# Simple configuration
#
# Adjust the values of the variable (right hand side of the equal sign) in
# this section for an easy method of customizing Py-ART. Do not change the
# variable names (the left hand side of the equal sign). More advanced
# settings are based upon these variables. Most users will find that
# adjusting this section is all that is needed.
##############################################################################
##############################################################################
# The default fill value for masked arrays and _FillValue keys
fill_value = -9999.0
# Field names used when reading in radar files and in the various correction
# and retrieval algorithms. The comments in this section provide additional
# information about the fields in that section.
# Radar reflectivity fields, DZ
reflectivity = 'reflectivity'
corrected_reflectivity = 'corrected_reflectivity'
total_power = 'total_power'
# Mean Doppler velocity fields, VEL
velocity = 'velocity'
corrected_velocity = 'corrected_velocity'
simulated_velocity = 'simulated_velocity'
# Spectral width fields, SW
spectrum_width = 'spectrum_width'
# Differential reflectivity fields, ZDR
differential_reflectivity = 'differential_reflectivity'
corrected_differential_reflectivity = 'corrected_differential_reflectivity'
# Cross correlation ratio, correlation coefficient, RhoHV
cross_correlation_ratio = 'cross_correlation_ratio'
# Normalized coherent power, signal quality index, SQI, NCP
normalized_coherent_power = 'normalized_coherent_power'
# Differential phase shift, PhiDP
differential_phase = 'differential_phase'
unfolded_differential_phase = 'unfolded_differential_phase'
corrected_differential_phase = 'corrected_differential_phase'
# Specific differential phase shift, KDP
specific_differential_phase = 'specific_differential_phase'
corrected_specific_differential_phase = 'corrected_specific_differential_phase'
# Linear depolarization ration (h - horizontal, v - vertical), LDR
linear_depolarization_ratio = 'linear_polarization_ratio'
linear_depolarization_ratio_h = 'linear_depolarization_ratio_h'
linear_depolarization_ratio_v = 'linear_depolarization_ratio_v'
# Misc fields
signal_to_noise_ratio = 'signal_to_noise_ratio'
rain_rate = 'rain_rate'
radar_estimated_rain_rate = 'radar_estimated_rain_rate'
radar_echo_classification = 'radar_echo_classification'
specific_attenuation = 'specific_attenuation'
specific_differential_attenuation = 'specific_differential_attenuation'
# Textures
differential_phase_texture = 'differential_phase_texture'
# Wind retrieval fields
eastward_wind_component = 'eastward_wind_component'
northward_wind_component = 'northward_wind_component'
vertical_wind_component = 'vertical_wind_component'
# profile variables
height = 'height'
interpolated_profile = 'interpolated_profile'
height_over_iso0 = 'height_over_iso0'
# path integrated attenuation
path_integrated_attenuation = 'path_integrated_attenuation'
path_integrated_differential_attenuation = ('path_integrated' +
'differential_attenuation')
# End of Simple Configuration section
##############################################################################
##############################################################################
# Advanced Configuration
#
# Most users will not want to make any changes in this section. For users
# who want a more fine-grained control over Py-ART's configuration this
# section provides access to these controls. The layout of this section can
# be changed, the only requirement for a valid configuration file is that
# the ALL CAPITALIZED variable must must be present with the formatting
# present in this file. These required variables are:
#
# FILL_VALUE, DEFAULT_METADATA, FILE_SPECIFIC_METADATA, FIELD_MAPPINGS,
# DEFAULT_FIELD_NAMES
#
# This section makes generous use of the variables in the Simple Configuration
# section, this is not required, but simplifies and enforces uniformity on
# the configuration.
##############################################################################
##############################################################################
##############################################################################
# Parameters
#
# Various parameters used in Py-ART.
##############################################################################
# the default fill value for masked arrays and the _FillValue key
FILL_VALUE = fill_value
# The DEFAULT_FIELD_NAMES controls the field names which are used in the
# correction and retrieval algorithms in Py-ART. The keys of the dictionary
# are "internal" names which cannot change, the values are the field names
# which will be used in the algorithms by default. For best results use the
# names defined by the variables in simple configuration section which are
# also used in the DEFAULT_METADATA and FIELD_MAPPINGS variable. If you
# choose to change a field name the names should also be changed in the
# DEFAULT_METADATA and FIELD_MAPPINGS variable. This is not required but
# highly suggested.
DEFAULT_FIELD_NAMES = {
# Internal field name (do not change): field name used (can change)
'reflectivity': reflectivity,
'corrected_reflectivity': corrected_reflectivity,
'total_power': total_power,
'velocity': velocity,
'corrected_velocity': corrected_velocity,
'simulated_velocity': simulated_velocity,
'spectrum_width': spectrum_width,
'differential_reflectivity': differential_reflectivity,
'corrected_differential_reflectivity':
corrected_differential_reflectivity,
'cross_correlation_ratio': cross_correlation_ratio,
'normalized_coherent_power': normalized_coherent_power,
'differential_phase': differential_phase,
'unfolded_differential_phase': unfolded_differential_phase,
'corrected_differential_phase': corrected_differential_phase,
'specific_differential_phase': specific_differential_phase,
'corrected_specific_differential_phase':
corrected_specific_differential_phase,
'linear_depolarization_ratio': linear_depolarization_ratio,
'linear_depolarization_ratio_h': linear_depolarization_ratio_h,
'linear_depolarization_ratio_v': linear_depolarization_ratio_v,
'signal_to_noise_ratio': signal_to_noise_ratio,
'rain_rate': rain_rate,
'radar_estimated_rain_rate': radar_estimated_rain_rate,
'radar_echo_classification': radar_echo_classification,
'specific_attenuation': specific_attenuation,
'differential_phase_texture': differential_phase_texture,
'eastward_wind_component': eastward_wind_component,
'northward_wind_component': northward_wind_component,
'vertical_wind_component': vertical_wind_component,
'height': height,
'height_over_iso0': height_over_iso0,
'interpolated_profile': interpolated_profile,
'path_integrated_attenuation': path_integrated_attenuation,
'specific_differential_attenuation': specific_differential_attenuation,
'path_integrated_differential_attenuation':
path_integrated_differential_attenuation
}
##############################################################################
# Default metadata
#
# The DEFAULT_METADATA dictionary contains dictionaries which provide the
# default radar attribute and field metadata. When reading in a file with
# Py-ART the FILE_SPECIFIC_METADATA variable is first queued for a metadata
# dictionary, if it is not found then the metadata in DEFAULT_METADATA is
# utilized.
##############################################################################
DEFAULT_METADATA = {
# Metadata for radar attributes. These closely follow the CF/Radial
# standard
'azimuth': {
'units': 'degrees',
'standard_name': 'beam_azimuth_angle',
'long_name': 'azimuth_angle_from_true_north',
'axis': 'radial_azimuth_coordinate',
'comment': 'Azimuth of antenna relative to true north'},
'elevation': {
'units': 'degrees',
'standard_name': 'beam_elevation_angle',
'long_name': 'elevation_angle_from_horizontal_plane',
'axis': 'radial_elevation_coordinate',
'comment': 'Elevation of antenna relative to the horizontal plane'},
'scan_rate': {
'units': 'degrees_per_second',
'long_name': 'Antenna angle scan rate'},
'range': {
'units': 'meters',
'standard_name': 'projection_range_coordinate',
'long_name': 'range_to_measurement_volume',
'axis': 'radial_range_coordinate',
'spacing_is_constant': 'true',
'comment': (
'Coordinate variable for range. Range to center of each bin.')},
'time': {
'units': 'seconds',
'standard_name': 'time',
'long_name': 'time_in_seconds_since_volume_start',
'calendar': 'gregorian',
'comment': ('Coordinate variable for time. '
'Time at the center of each ray, in fractional seconds '
'since the global variable time_coverage_start')},
'metadata': {
'Conventions': 'CF/Radial instrument_parameters',
'version': '1.3',
'title': '',
'institution': '',
'references': '',
'source': '',
'history': '',
'comment': '',
'instrument_name': ''},
# Metadata for radar sweep information dictionaries
'sweep_number': {
'units': 'count',
'standard_name': 'sweep_number',
'long_name': 'Sweep number'},
'sweep_mode': {
'units': 'unitless',
'standard_name': 'sweep_mode',
'long_name': 'Sweep mode',
'comment': ('Options are: "sector", "coplane", "rhi", '
'"vertical_pointing", "idle", "azimuth_surveillance", '
'"elevation_surveillance", "sunscan", "pointing", '
'"manual_ppi", "manual_rhi"')},
'fixed_angle': {
'long_name': 'Target angle for sweep',
'units': 'degrees',
'standard_name': 'target_fixed_angle'},
'sweep_start_ray_index': {
'long_name': 'Index of first ray in sweep, 0-based',
'units': 'count'},
'sweep_end_ray_index': {
'long_name': 'Index of last ray in sweep, 0-based',
'units': 'count'},
'rays_per_sweep': {
'long_name': 'Number of rays in each sweep',
'units': 'count'},
'target_scan_rate': {
'long_name': 'Target scan rate for sweep',
'units': 'degrees_per_second',
},
'rays_are_indexed': {
'long_name': 'Flag for indexed rays',
'units': 'unitless',
'options': ('true: rays are indexed to a regular grid, ' +
'false: rays are not indexed to a regular grid'),
},
'ray_angle_res': {
'long_name': 'Angular resolution between rays',
'units': 'degrees',
'comment': 'Only applicable when rays_are_indexed variable is true',
},
# Metadata for radar location attributes
'latitude': {
'long_name': 'Latitude',
'standard_name': 'Latitude',
'units': 'degrees_north'},
'longitude': {
'long_name': 'Longitude',
'standard_name': 'Longitude',
'units': 'degrees_east'},
'altitude': {
'long_name': 'Altitude',
'standard_name': 'Altitude',
'units': 'meters',
'positive': 'up'},
'gate_x': {
'long_name': 'Cartesian x location of gate with origin at the radar',
'units': 'meters'},
'gate_y': {
'long_name': 'Cartesian y location of gate with origin at the radar',
'units': 'meters'},
'gate_z': {
'long_name': 'Cartesian z location of gate with origin at the radar',
'units': 'meters'},
'gate_edge_x': {
'long_name': 'Cartesian x location of the edges of each gate',
'units': 'meters'},
'gate_edge_y': {
'long_name': 'Cartesian y location of the edges of each gate',
'units': 'meters'},
'gate_edge_z': {
'long_name': 'Cartesian z location of the edges of each gate',
'units': 'meters'},
'gate_longitude': {
'long_name': 'Longitude of radar gate.',
'units': 'degrees_north'},
'gate_latitude': {
'long_name': 'Latitude of radar gate',
'units': 'degrees_east'},
'gate_altitude': {
'long_name': 'Altitude of radar gate',
'units': 'meters'},
# Metadata for instrument_parameter dictionary
'prt_mode': {
'comments': ('Pulsing mode Options are: "fixed", "staggered", '
'"dual". Assumed "fixed" if missing.'),
'meta_group': 'instrument_parameters',
'long_name': 'Pulsing mode',
'units': 'unitless'},
'nyquist_velocity': {
'units': 'meters_per_second',
'comments': "Unambiguous velocity",
'meta_group': 'instrument_parameters',
'long_name': 'Nyquist velocity'},
'prt': {
'units': 'seconds',
'comments': ("Pulse repetition time. For staggered prt, "
"also see prt_ratio."),
'meta_group': 'instrument_parameters',
'long_name': 'Pulse repetition time'},
'unambiguous_range': {
'units': 'meters',
'comments': 'Unambiguous range',
'meta_group': 'instrument_parameters',
'long_name': 'Unambiguous range'},
'pulse_width': {
'units': 'seconds',
'comments': 'Pulse width',
'meta_group': 'instrument_parameters',
'long_name': 'Pulse width'},
'prt_ratio': {
'units': 'unitless',
'meta_group': 'instrument_parameters',
'long_name': 'Pulse repetition frequency ratio'},
'frequency': {
'units': 's-1',
'meta_group': 'instrument_parameters',
'long_name': 'Radiation frequency'},
'n_samples': {
'units': 'unitless',
'meta_group': 'instrument_parameters',
'long_name': 'Number of samples used to compute moments'},
# non-standard parameter for specifying the PRF high/low for each ray
'prf_flag': {
'units': 'unitless',
'comments': "PRF used to collect ray. 0 for high PRF, 1 for low PRF.",
'meta_group': 'instrument_parameters',
'long_name': 'PRF flag'},
# Metadata for radar_parameter sub-convention
'radar_beam_width_h': {
'units': 'degrees',
'meta_group': 'radar_parameters',
'long_name': 'Antenna beam width H polarization'},
'radar_beam_width_v': {
'units': 'degrees',
'meta_group': 'radar_parameters',
'long_name': 'Antenna beam width V polarization'},
# Metadata for airborne radar parameters
'rotation': {
'units': 'degrees',
'standard_name': 'ray_rotation_angle_relative_to_platform',
'long_name': 'Ray rotation angle relative to platform'},
'tilt': {
'units': 'degrees',
'standard_name': 'ray_tilt_angle_relative_to_platform',
'long_name': 'Ray tilt angle relative to platform'},
'roll': {
'units': 'degrees',
'standard_name': 'platform_roll_angle',
'long_name': 'Platform roll angle'},
'drift': {
'units': 'degrees',
'standard_name': 'platform_drift_angle',
'long_name': 'Platform drift angle'},
'heading': {
'units': 'degrees',
'standard_name': 'platform_heading_angle',
'long_name': 'Platform heading angle'},
'pitch': {
'units': 'degrees',
'standard_name': 'platform_pitch_angle',
'long_name': 'Platform pitch angle'},
'georefs_applied': {
'units': 'unitless',
'standard_name': 'georefs_have_been_applied_to_ray',
'long_name': 'Geoferences have been applied to ray',
'comment': '1 if georefs have been applied, 0 otherwise'},
# Reflectivity fields
reflectivity: {
'units': 'dBZ',
'standard_name': 'equivalent_reflectivity_factor',
'long_name': 'Reflectivity',
'coordinates': 'elevation azimuth range'},
corrected_reflectivity: {
'units': 'dBZ',
'standard_name': 'corrected_equivalent_reflectivity_factor',
'long_name': 'Corrected reflectivity',
'coordinates': 'elevation azimuth range'},
total_power: {
'units': 'dBZ',
'standard_name': 'equivalent_reflectivity_factor',
'long_name': 'Total power',
'coordinates': 'elevation azimuth range'},
# Velocity fields
velocity: {
'units': 'meters_per_second',
'standard_name': 'radial_velocity_of_scatterers_away_from_instrument',
'long_name': 'Mean dopper velocity',
'coordinates': 'elevation azimuth range'},
corrected_velocity: {
'units': 'meters_per_second',
'standard_name': (
'corrected_radial_velocity_of_scatterers_away_from_instrument'),
'long_name': 'Corrected mean doppler velocity',
'coordinates': 'elevation azimuth range'},
simulated_velocity: {
'units': 'meters_per_second',
'standard_name': (
'radial_velocity_of_scatterers_away_from_instrument'),
'long_name': 'Simulated mean doppler velocity',
'coordinates': 'elevation azimuth range'},
# Spectrum width fields
spectrum_width: {
'units': 'meters_per_second',
'standard_name': 'doppler_spectrum_width',
'long_name': 'Doppler spectrum width',
'coordinates': 'elevation azimuth range'},
# Dual-polarization fields
differential_reflectivity: {
'units': 'dB',
'standard_name': 'log_differential_reflectivity_hv',
'long_name': 'Differential reflectivity',
'coordinates': 'elevation azimuth range'},
corrected_differential_reflectivity: {
'units': 'dB',
'standard_name': 'corrected_log_differential_reflectivity_hv',
'long_name': 'Corrected differential reflectivity',
'coordinates': 'elevation azimuth range'},
cross_correlation_ratio: {
'units': 'ratio',
'standard_name': 'cross_correlation_ratio_hv',
'long_name': 'Cross correlation ratio (RHOHV)',
'valid_max': 1.0,
'valid_min': 0.0,
'coordinates': 'elevation azimuth range'},
normalized_coherent_power: {
'units': 'ratio',
'standard_name': 'normalized_coherent_power',
'long_name': 'Normalized coherent power',
'valid_max': 1.0,
'valid_min': 0.0,
'comment': 'Also know as signal quality index (SQI)',
'coordinates': 'elevation azimuth range'},
differential_phase: {
'units': 'degrees',
'standard_name': 'differential_phase_hv',
'long_name': 'Differential phase (PhiDP)',
'valid_max': 180.0,
'valid_min': -180.0,
'coordinates': 'elevation azimuth range'},
unfolded_differential_phase: {
'units': 'degrees',
'standard_name': 'differential_phase_hv',
'long_name': 'Unfolded differential phase',
'coordinates': 'elevation azimuth range'},
corrected_differential_phase: {
'units': 'degrees',
'standard_name': 'differential_phase_hv',
'long_name': 'Corrected differential phase',
'coordinates': 'elevation azimuth range'},
specific_differential_phase: {
'units': 'degrees/km',
'standard_name': 'specific_differential_phase_hv',
'long_name': 'Specific differential phase (KDP)',
'coordinates': 'elevation azimuth range'},
corrected_specific_differential_phase: {
'units': 'degrees/km',
'standard_name': 'specific_differential_phase_hv',
'long_name': 'Corrected specific differential phase (KDP)',
'coordinates': 'elevation azimuth range'},
# Depolarization ratio fields
linear_depolarization_ratio: {
'units': 'dB',
'standard_name': 'log_linear_depolarization_ratio_hv',
'long_name': 'Linear depolarization ratio',
'coordinates': 'elevation azimuth range'},
linear_depolarization_ratio_h: {
'units': 'dB',
'standard_name': 'log_linear_depolarization_ratio_h',
'long_name': 'Linear depolarization ratio horizontal',
'coordinates': 'elevation azimuth range'},
linear_depolarization_ratio_v: {
'units': 'dB',
'standard_name': 'log_linear_depolarization_ratio_v',
'long_name': 'Linear depolarization ratio vertical',
'coordinates': 'elevation azimuth range'},
# Misc fields
signal_to_noise_ratio: {
'units': 'dB',
'standard_name': 'signal_to_noise_ratio',
'long_name': 'Signal to noise ratio',
'coordinates': 'elevation azimuth range'},
rain_rate: {
'units': 'kg/m2/s',
'standard_name': 'rain_rate',
'long_name': 'Rain rate',
'coordinates': 'elevation azimuth range'},
radar_estimated_rain_rate: {
'units': 'mm/hr',
'standard_name': 'radar_estimated_rain_rate',
'long_name': 'Radar estimated rain rate',
'coordinates': 'elevation azimuth range'},
radar_echo_classification: {
'units': 'legend',
'standard_name': 'radar_echo_classification',
'long_name': 'Radar Echo classification',
'coordinates': 'elevation azimuth range'},
'clutter_flag':{
'standard_name': 'clutter_flag',},
specific_attenuation: {
'units': 'dB/km',
'standard_name': 'specific_attenuation',
'long_name': 'Specific attenuation',
'valid_min': 0.0,
'valid_max': 1.0,
'coordinates': 'elevation azimuth range'},
# Textures
differential_phase_texture: {
'units': 'degrees',
'standard_name': 'differential_phase_hv_texture',
'long_name': 'Texture of differential phase (PhiDP)',
'coordinates': 'elevation azimuth range'},
# Wind retrieval fields
eastward_wind_component: {
'units': 'meters_per_second',
'standard_name': 'eastward_wind_component',
'long_name': 'Eastward wind component'},
northward_wind_component: {
'units': 'meters_per_second',
'standard_name': 'northward_wind_component',
'long_name': 'Northward wind component'},
vertical_wind_component: {
'units': 'meters_per_second',
'standard_name': 'vertical_wind_component',
'long_name': 'Vertical wind component'},
# profile variables
height: {
'long_name': 'Height of radar beam',
'standard_name': 'height',
'units': 'meters'},
interpolated_profile: {
'long_name': 'Interpolated profile',
'standard_name': 'interpolated_profile',
'units': 'unknown'},
# Grid metadata
'grid_time': {
'units': 'seconds',
'standard_name': 'time',
'long_name': 'Time of grid',
'calendar': 'gregorian'},
'origin_longitude': {
'long_name': 'Longitude at grid origin',
'units': 'degrees_east',
'standard_name': 'longitude',
'valid_min': -180.,
'valid_max': 180.},
'origin_latitude': {
'long_name': 'Latitude at grid origin',
'units': 'degrees_north',
'standard_name': 'latitude',
'valid_min': -90.,
'valid_max': 90.},
'origin_altitude': {
'long_name': 'Altitude at grid origin',
'units': 'm',
'standard_name': 'altitude'},
'x': {
'standard_name': 'projection_x_coordinate',
'long_name': 'X distance on the projection plane from the origin',
'axis': 'X',
'units': 'm'},
'y': {
'standard_name': 'projection_y_coordinate',
'long_name': 'Y distance on the projection plane from the origin',
'axis': 'Y',
'units': 'm'},
'z': {
'standard_name': 'projection_z_coordinate',
'long_name': 'Z distance on the projection plane from the origin',
'axis': 'Z',
'units': 'm',
'positive': 'up'},
'point_x': {
'long_name': 'Cartesian x distance of each grid point from the origin',
'units': 'meters'},
'point_y': {
'long_name': 'Cartesian y distance of each grid point from the origin',
'units': 'meters'},
'point_z': {
'long_name': 'Cartesian z distance of each grid point from the origin',
'positive': 'up',
'units': 'meters'},
'point_longitude': {
'long_name': 'Longitude of each grid point',
'units': 'degrees_north'},
'point_latitude': {
'long_name': 'Latitude of each grid point',
'units': 'degrees_east'},
'point_altitude': {
'long_name': 'Altitude of each grid point',
'units': 'meters'},
'radar_latitude': {
'long_name': 'Latitude of radars used to make the grid.',
'units': 'degrees_north', },
'radar_longitude': {
'long_name': 'Longitude of radars used to make the grid.',
'units': 'degrees_east', },
'radar_altitude': {
'long_name': 'Altitude of radars used to make the grid.',
'units': 'm', },
'radar_time': {
'calendar': 'gregorian',
'long_name': 'Time in seconds of the volume start for each radar'},
'radar_name': {
'long_name': 'Name of radar used to make the grid', },
}
##############################################################################
# File specific metadata
#
# These dictionaries define metadata that is to be used only when reading in
# a given type of file. This metadata is used in place of the
# DEFAULT_METADATA when it is avialable. The main use of these variable
# is to define field specific data, it is safe to leave some/all of these
# empty if the default metadata is acceptable.
##############################################################################
# Metadata for Sigmet/IRIS files
sigmet_metadata = {}
# Metadata for NEXRAD Level II files (Archive and CDM files)
nexrad_metadata = {
reflectivity: {
'units': 'dBZ',
'standard_name': 'equivalent_reflectivity_factor',
'long_name': 'Reflectivity',
'valid_max': 94.5,
'valid_min': -32.0,
'coordinates': 'elevation azimuth range'},
velocity: {
'units': 'meters_per_second',
'standard_name': 'radial_velocity_of_scatterers_away_from_instrument',
'long_name': 'Mean doppler Velocity',
'valid_max': 95.0,
'valid_min': -95.0,
'coordinates': 'elevation azimuth range'},
spectrum_width: {
'units': 'meters_per_second',
'standard_name': 'doppler_spectrum_width',
'long_name': 'Spectrum Width',
'valid_max': 63.0,
'valid_min': -63.5,
'coordinates': 'elevation azimuth range'},
differential_reflectivity: {
'units': 'dB',
'standard_name': 'log_differential_reflectivity_hv',
'long_name': 'log_differential_reflectivity_hv',
'valid_max': 7.9375,
'valid_min': -7.8750,
'coordinates': 'elevation azimuth range'},
differential_phase: {
'units': 'degrees',
'standard_name': 'differential_phase_hv',
'long_name': 'differential_phase_hv',
'valid_max': 360.0,
'valid_min': 0.0,
'coordinates': 'elevation azimuth range'},
cross_correlation_ratio: {
'units': 'ratio',
'standard_name': 'cross_correlation_ratio_hv',
'long_name': 'Cross correlation_ratio (RHOHV)',
'valid_max': 1.0,
'valid_min': 0.0,
'coordinates': 'elevation azimuth range'},
}
# Metadata for NEXRAD Level 3 Products
nexrad_level3_metadata = {
radar_estimated_rain_rate: {
'units': 'inches',
'standard_name': 'radar_estimated_rain_rate',
'long_name': 'Radar estimated rain rate',
'coordinates': 'elevation azimuth range'},
radar_echo_classification: {
'units': 'legend',
'standard_name': 'radar_echo_classification',
'long_name': 'Radar echo classification',
'options': ('0: Below Threshold (ND), '
'10: Biological (BI), '
'20: Anomalous Propagation/Group Clutter (GC), '
'30: Ice Crystals (IC), '
'40: Dry Snow (DS), '
'50: Wet Snow (WS), '
'60: Light and/or Moderate Rain (RA), '
'70: Heavy Rain (HR), '
'80: Big Drops (rain) (BD), '
'90: Graupel (GR), '
'100: Hail, possibly with rain (HA), '
'140: Unknown Classification (UK), '
'150: Range Folded (RH)'),
'coordinates': 'elevation azimuth range'},
}
# Metadata for CF/Radial files
cfradial_metadata = {}
# Metadata for MDV files
mdv_metadata = {}
# Metadata for RSL files
rsl_metadata = {}
# Metadata for CSU-CHILL, CHL files
chl_metadata = {}
FILE_SPECIFIC_METADATA = { # Required
'sigmet': sigmet_metadata,
'nexrad_archive': nexrad_metadata,
'nexrad_cdm': nexrad_metadata,
'nexrad_level3': nexrad_level3_metadata,
'cfradial': cfradial_metadata,
'mdv': mdv_metadata,
'rsl': rsl_metadata,
'chl': chl_metadata,
}
##############################################################################
# Field name mapping
#
# These dictionaries map file field names or data types to a radar field
# name. These are used to populate the radar.fields dictionary during a read
# in Py-ART. A value of None will not include that field in the radar object.
# These can be over-ridden on a per-read basis using the field_mapping
# parameter, or using setting the file_field_names parameter to True.
##############################################################################
# Sigmet/IRIS file field mapping
# Note that multiple sigmet fields map to the same radar field, if
# more than one of these fields are present the radar field will be
# overwritten with the last sigmet field.
sigmet_field_mapping = {
# Sigmet data type :field name # (Data_type) Description
'XHDR': None, # (0) Extended Header
'DBT': total_power, # (1) Total Power
'DBZ': reflectivity, # (2) Reflectivity
'VEL': velocity, # (3) Velocity
'WIDTH': spectrum_width, # (4) Width
'ZDR': differential_reflectivity, # (5) Diff. reflectivity
'DBZC': corrected_reflectivity, # (7) Corrected reflectivity
'DBT2': total_power, # (8) Total Power
'DBZ2': reflectivity, # (9) Reflectivity
'VEL2': velocity, # (10) Velocity
'WIDTH2': spectrum_width, # (11) Width
'ZDR2': differential_reflectivity, # (12) Diff. reflectivity
'RAINRATE2': radar_estimated_rain_rate, # (13) Rainfall rate
'KDP': specific_differential_phase, # (14) KDP (diff. phase)
'KDP2': specific_differential_phase, # (15) KDP (diff. phase)
'PHIDP': differential_phase, # (16) PhiDP (diff. phase)
'VELC': corrected_velocity, # (17) Corrected velocity
'SQI': normalized_coherent_power, # (18) SQI
'RHOHV': cross_correlation_ratio, # (19) RhoHV
'RHOHV2': cross_correlation_ratio, # (20) RhoHV
'DBZC2': corrected_reflectivity, # (21) Corrected Reflec.
'VELC2': corrected_velocity, # (21) Corrected Velocity
'SQI2': normalized_coherent_power, # (23) SQI
'PHIDP2': differential_phase, # (24) PhiDP (diff. phase)
'LDRH': linear_depolarization_ratio_h, # (25) LDR xmt H, rcv V
'LDRH2': linear_depolarization_ratio_h, # (26) LDR xmt H, rcv V
'LDRV': linear_depolarization_ratio_v, # (27) LDR xmt V, rcv H
'LDRV2': linear_depolarization_ratio_v, # (28) LDR xmt V, rcv H
'HEIGHT': None, # (32) Height (1/10 km)
'VIL2': None, # (33) Linear Liquid
'RAW': None, # (34) Raw Data
'SHEAR': None, # (35) Wind Shear
'DIVERGE2': None, # (36) Divergence
'FLIQUID2': None, # (37) Floated liquid
'USER': None, # (38) User type
'OTHER': None, # (39) Unspecified
'DEFORM2': None, # (40) Deformation
'VVEL2': None, # (41) Vertical velocity
'HVEL2': None, # (42) Horizontal velocity
'HDIR2': None, # (43) Horiz. wind direction
'AXDIL2': None, # (44) Axis of dilation
'TIME2': None, # (45) Time in seconds
'RHOH': None, # (46) Rho, xmt H, rcv V
'RHOH2': None, # (47) Rho, xmt H, rcv V
'RHOV': None, # (48) Rho, xmt V, rcv H
'RHOV2': None, # (49) Rho, xmt V, rcv H
'PHIH': None, # (50) Phi, xmt H, rcv V
'PHIH2': None, # (51) Phi, xmt H, rcv V
'PHIV': None, # (52) Phi, xmt V, rcv H
'PHIV2': None, # (53) Phi, xmt V, rcv H
'USER2': None, # (54) User type
'HCLASS': radar_echo_classification, # (55) Hydrometeor class
'HCLASS2': radar_echo_classification, # (56) Hydrometeor class
'ZDRC': corrected_differential_reflectivity,
# (57) Corrected diff. refl.
'ZDRC2': corrected_differential_reflectivity,
# (58) Corrected diff. refl.
'UNKNOWN_59': None, # Unknown field
'UNKNOWN_60': None, # Unknown field
'UNKNOWN_61': None, # Unknown field
'UNKNOWN_62': None, # Unknown field
'UNKNOWN_63': None, # Unknown field
'UNKNOWN_64': None, # Unknown field
'UNKNOWN_65': None, # Unknown field
'UNKNOWN_66': None, # Unknown field
# there may be more field, add as needed
}
# NEXRAD Level II Archive files
nexrad_archive_field_mapping = {
# NEXRAD field: radar field name
'REF': reflectivity,
'VEL': velocity,
'SW': spectrum_width,
'ZDR': differential_reflectivity,
'PHI': differential_phase,
'RHO': cross_correlation_ratio
}
# NEXRAD Level II CDM files
nexrad_cdm_field_mapping = {
# CDM variable name (without _HI): radar field name
'Reflectivity': reflectivity,
'RadialVelocity': velocity,
'SpectrumWidth': spectrum_width,
'DifferentialReflectivity': differential_reflectivity,
'DifferentialPhase': differential_phase,
'CorrelationCoefficient': cross_correlation_ratio
}
# NEXRAD Level 3 Product files.
nexrad_level3_mapping = {
# Message code : field name # Product name
19: reflectivity, # Base Reflectivity
20: reflectivity, # Base Reflectivity
25: velocity, # Base Velocity
27: velocity, # Base Velocity
28: spectrum_width, # Base Spectrum Width
30: spectrum_width, # Base Spectrum Width
32: reflectivity, # Digital Hybrid Scan Reflectivity
34: None, # Clutter Filter Control
56: velocity, # Storm Relative Mean Radial Velocity
78: radar_estimated_rain_rate, # Surface Rainfall Accum. (1 hr)
79: radar_estimated_rain_rate, # Surface Rainfall Accum. (3 hr)
80: radar_estimated_rain_rate, # Storm Total Rainfall Accumulation
94: reflectivity, # Base Reflectivity Data Array
99: velocity, # Base Velocity Data Array
134: None, # High Resolution VIL
135: None, # Enhanced Echo Tops
138: radar_estimated_rain_rate, # Digital Storm Total Precipitation
159: differential_reflectivity, # Digital Differential Reflectivity
161: cross_correlation_ratio, # Digital Correlation Coefficient
163: specific_differential_phase, # Digital Specific Differential Phase
165: radar_echo_classification, # Digital Hydrometeor Classification
169: radar_estimated_rain_rate, # One Hour Accumulation
170: radar_estimated_rain_rate, # Digital Accumulation Array
171: radar_estimated_rain_rate, # Storm Total Accumulation
172: radar_estimated_rain_rate, # Digital Storm Total Accumulation
173: radar_estimated_rain_rate, # Digital User-Selectable Accum.