Commit df113a71 authored by Bruce Flynn's avatar Bruce Flynn

rename time dim to obnum, fix standard name for winddir

parent 0ccd5d0f
Pipeline #2568 passed with stages
in 1 minute and 49 seconds
......@@ -7,3 +7,4 @@ dist
*.sw?
.coverage*
.cache
.idea
dataSources*
workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 2.7.13 (~/code/AmrcAws/env/bin/python)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="backbone" level="application" />
<orderEntry type="library" name="underscore" level="application" />
<orderEntry type="library" name="jquery" level="application" />
<orderEntry type="library" name="moment" level="application" />
<orderEntry type="library" name="bootstrap" level="application" />
<orderEntry type="library" name="bootstrap-datepicker" level="application" />
<orderEntry type="library" name="bootstrap-datetimepicker" level="application" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Chameleon" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/env/lib/python2.7/site-packages/pyramid_debugtoolbar/templates" />
</list>
</option>
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="py.test" />
<option name="PROJECT_TEST_RUNNER" value="py.test" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="dataSourceStorageLocal">
<data-source name="__test@localhost" uuid="9e3aea9e-c0d4-4732-92c6-8e2667359f33">
<database-info product="PostgreSQL" version="9.6.1" jdbc-version="4.0" driver-name="PostgreSQL Native Driver" driver-version="PostgreSQL 9.4 JDBC4 (build 1201)">
<identifier-quote-string>&quot;</identifier-quote-string>
</database-info>
<case-sensitivity plain-identifiers="lower" quoted-identifiers="exact" />
<secret-storage>master_key</secret-storage>
<user-name>docker</user-name>
<resolve-scope>__test:docker,public</resolve-scope>
</data-source>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="__test@localhost" uuid="9e3aea9e-c0d4-4732-92c6-8e2667359f33">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:15432/__test</jdbc-url>
</data-source>
</component>
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="useProjectProfile" value="false" />
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{backbone, bootstrap, bootstrap-datepicker, bootstrap-datetimepicker, jquery, moment, underscore}" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.13 (~/code/AmrcAws/env/bin/python)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/AmrcAws.iml" filepath="$PROJECT_DIR$/.idea/AmrcAws.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$" dialect="PostgreSQL" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -16,10 +16,10 @@ schema = {
},
'dimensions': {
'station': None,
'time': None,
'obnum': None,
},
'variables': {
'station_name': {
'station': {
'dims': ('station',),
'type': str,
'attrs': {
......@@ -28,7 +28,7 @@ schema = {
},
},
'time': {
'dims': ('station', 'time'),
'dims': ('station', 'obnum'),
'type': np.int64,
'fill': -999,
'attrs': {
......@@ -42,61 +42,67 @@ schema = {
variables = {
'air_temp': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'air temperature',
'standard_name': 'air_temperature',
'units': 'degC'
'units': 'degC',
'coordinates': 'time'
},
},
'pressure': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'air pressure',
'standard_name': 'air_pressure',
'units': 'hPa'
'units': 'hPa',
'coordinates': 'time'
},
},
'wind_spd': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'wind speed',
'standard_name': 'wind_speed',
'units': 'm/s'
'units': 'm/s',
'coordinates': 'time'
},
},
'wind_dir': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'wind direction',
'standard_name': 'wind_direction_from',
'units': 'degrees'
'standard_name': 'wind_from_direction',
'units': 'degrees',
'coordinates': 'time'
},
},
'rh': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'relative humidity',
'standard_name': 'relative_humidity',
'units': '%'
'units': '%',
'coordinates': 'time'
},
},
'vtempdiff': {
'dims': ('station', 'time',),
'dims': ('station', 'obnum',),
'type': np.float32,
'fill': -999.0,
'attrs': {
'long_name': 'vertical temperature differential',
'coordinates': 'time'
},
},
}
......@@ -140,7 +146,7 @@ def write_slice_to_netcdf(stations, symbols, data, dest, attrs=None):
dataset.createDimension(name, size=size)
elif name == 'station':
dataset.createDimension(name, len(stations))
elif name == 'time':
elif name == 'obnum':
dataset.createDimension(name, data.shape[0]/len(stations))
else:
dataset.createDimension(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment