|
1 EARLIENT netcdf format checker |
|
2 ------------------------------ |
|
3 |
|
4 The aim of this script is to check if a netcdf file has the correct |
|
5 format to be used with the EARLINET's Single Calculus Chain. |
|
6 |
|
7 It can check raw lidar data format as well as ancillary file format |
|
8 i.e. overlap, sounding, and lidar ratio files. |
|
9 |
|
10 |
|
11 .. note: |
|
12 This script can help you detect some usual mistakes, but does |
|
13 not necessarily detect all possible errors in the files. In other |
|
14 words, your file might look OK through this script but still give |
|
15 errors when used in the SCC. In that case please let me know to add |
|
16 the appropriate checks in the specifications. |
|
17 |
|
18 |
|
19 Dependencies |
|
20 ~~~~~~~~~~~~ |
|
21 You need to have the netCDF4 python module installed. |
|
22 |
|
23 https://pypi.python.org/pypi/netCDF4/ |
|
24 |
|
25 |
|
26 Command line options |
|
27 ~~~~~~~~~~~~~~~~~~~~ |
|
28 |
|
29 Using the -h option in the command line, you can see the following instructions:: |
|
30 |
|
31 usage: netcdf_checker.py [-h] [-s {data,overlap,lidar_ratio,sounding}] |
|
32 [-l {error,warning,notification}] |
|
33 file |
|
34 positional arguments: |
|
35 file The path of the file to be checked |
|
36 |
|
37 optional arguments: |
|
38 -h, --help show this help message and exit |
|
39 -s {data,overlap,lidar_ratio,sounding}, --specs {data,overlap,lidar_ratio,sounding} |
|
40 The specificiations to use |
|
41 -l {error,warning,notification}, --level {error,warning,notification} |
|
42 The output level |
|
43 |
|
44 Examples |
|
45 ~~~~~~~~ |
|
46 |
|
47 Check the format of a data file:: |
|
48 |
|
49 python netcdf_checker.py 20140101bu00.nc |
|
50 |
|
51 Check the format of a overlap file:: |
|
52 |
|
53 python netcdf_checker.py ov_20140101bu00.nc -s overlap |
|
54 |
|
55 Check a data file and print all messages, including notifications:: |
|
56 |
|
57 python netcdf_checker.py 20140101bu00.nc -l notification |