readme.rst

changeset 8
7f983daf3383
parent 7
29a21837f51c
child 9
3c12ff23695f
equal deleted inserted replaced
7:29a21837f51c 8:7f983daf3383
27 27
28 Using the class 28 Using the class
29 ------------------ 29 ------------------
30 30
31 Once you have made the above setup you can start using it. The best way to understand how it works is through an interactive shell (I suggest ipython(http://ipython.org/)). In the following example I use the cf_raymetrics setup:: 31 Once you have made the above setup you can start using it. The best way to understand how it works is through an interactive shell (I suggest ipython(http://ipython.org/)). In the following example I use the cf_raymetrics setup::
32
32 import glob # This is needed to read a list of filenames 33 import glob # This is needed to read a list of filenames
33 from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar” 34 from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar”
34 35
35 # Go to the folder where you files are stored 36 # Go to the folder where you files are stored
36 cd /path/to/lidar/files 37 cd /path/to/lidar/files
46 print my_measurement.channels 47 print my_measurement.channels
47 48
48 #Quicklooks of all the channels 49 #Quicklooks of all the channels
49 my_measurements.plot() 50 my_measurements.plot()
50 51
52
51 Converting to SCC format 53 Converting to SCC format
52 -------------------------------- 54 --------------------------------
53 55
54 There are some extra info you need to put in before converting to SCC format, 'Measurement_ID', 'Temperature', 'Pressure':: 56 There are some extra info you need to put in before converting to SCC format, 'Measurement_ID', 'Temperature', 'Pressure'::
57
55 my_measurement.info['Measurement_ID'] = “20101229op00” 58 my_measurement.info['Measurement_ID'] = “20101229op00”
56 my_measurement.info['Temperature'] = “14” 59 my_measurement.info['Temperature'] = “14”
57 my_measurement.info['Pressure'] = “1010” 60 my_measurement.info['Pressure'] = “1010”
58 61
62
59 You can use standard values of temperature and pressure by just calling:: 63 You can use standard values of temperature and pressure by just calling::
64
60 my_measurement.get_PT() 65 my_measurement.get_PT()
61 66
62 The standard values can be changed in generic.py. Search the get_PT method and change of what is appropriate for your station. If you have an external source of temperature and pressure information (a meteorological station) you can automate this by overriding the get_PT method in your system's class (in our example in the cf_raymetrics.py file). 67 The standard values can be changed in generic.py. Search the get_PT method and change of what is appropriate for your station. If you have an external source of temperature and pressure information (a meteorological station) you can automate this by overriding the get_PT method in your system's class (in our example in the cf_raymetrics.py file).
63 68
69
64 After you have used this extra input, you save the file using this command:: 70 After you have used this extra input, you save the file using this command::
71
65 my_measurement.save_as_netcdf(“filename”) 72 my_measurement.save_as_netcdf(“filename”)
66 73
67 where you change the filename to the filename you want to use. 74 where you change the filename to the filename you want to use.
68 75

mercurial