Skip to content
Snippets Groups Projects

Cd 228

Merged xiang requested to merge CD-228 into master
2 files
+ 22
14
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 28
0
# CF_XML_READER
A simple python tool which can access CF-standard table 1.6
## Useage
```py
from app_common.cf_xml_reader import cf_xml_reader
# cf_xml_reader has property dict which save cf standard table as dictionary format
The structure of the cf_xml_reader.dict looks like this
example_dict= { standard_name:{
"canonical_units":unit_str,
"grib":grib_str,
"amip":amip_str,
"description":description_str,
},
....
}
# example usage for get cf unit by standard name
standard_name = 'air_pressure'
cf_unit_str = cf_xml_reader.dict[standard_name]["canonical_units"]
print(cf_unit_str)
Pa
# example usage for get cf description by standard name
description = cf_xml_reader.dict[standard_name]["description"]
print(description)
Air pressure is the force per unit area which would be exerted when the moving gas molecules of which the air is composed strike a theoretical surface of any orientation.
```
\ No newline at end of file
Loading