... | ... | @@ -38,12 +38,15 @@ This example shows the main functionality for *reading* EBAS NASA-Ames files. It |
|
|
* access variable values and flags
|
|
|
* read data without flags (valid values only)
|
|
|
* look for specific variables in a file (based on metadata)
|
|
|
|
|
|
```bash
|
|
|
./ebas_read_example.py Testdata/DE0001R.20141225000000.20160114101135.uv_abs.ozone.air.1d.1h.DE03L_UBA_We_Mon_0301.DE03L_uv_abs.lev2.nas```
|
|
|
./ebas_read_example.py Testdata/DE0001R.20141225000000.20160114101135.uv_abs.ozone.air.1d.1h.DE03L_UBA_We_Mon_0301.DE03L_uv_abs.lev2.nas
|
|
|
```
|
|
|
The script reads the input file and writes a lot of data about the file as output. See the program code (and the comments within) how things work and compare it to the output.
|
|
|
Please notice that the input file contains the ozone variable twice (in different units: ug/m3 and nmol/mol, this was generated for user convenience when the file was generated by the database). However, when reading the file, the nmol/mol varable gets automatically converted to ug/m3 as it would be stored in ebas. If you do not want this behaviour, you can specify the argument --skip_unitconvert in order to avoid this conversion. In this case you will need to use the argument --ignore_parameter as well, otherwise the paramter is rejected because of the wrong ebas unit.
|
|
|
```bash
|
|
|
./ebas_read_example.py Testdata/DE0001R.20141225000000.20160114101135.uv_abs.ozone.air.1d.1h.DE03L_UBA_We_Mon_0301.DE03L_uv_abs.lev2.nas --skip_unitconvert --ignore_parameter```
|
|
|
./ebas_read_example.py Testdata/DE0001R.20141225000000.20160114101135.uv_abs.ozone.air.1d.1h.DE03L_UBA_We_Mon_0301.DE03L_uv_abs.lev2.nas --skip_unitconvert --ignore_parameter
|
|
|
```
|
|
|
Now, the file is read as is, no unit conversion is done, and the ozone variables in both units can be accessed.
|
|
|
|
|
|
### Generating EBAS files: ```ebas_genfile.py```
|
... | ... | |