-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do not write CDIP acknowledgment for generic inputs
- Loading branch information
1 parent
0abda56
commit 00c0316
Showing
3 changed files
with
25 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -438,7 +438,8 @@ | |
) | ||
|
||
|
||
def write_records(wave_records, filename, station_name, include_direction=False): | ||
def write_records(wave_records, filename, station_name, extra_metadata=None, | ||
include_direction=False): | ||
"""Write given records to netCDF4""" | ||
|
||
dataset_metadata = dict( | ||
|
@@ -460,8 +461,6 @@ def write_records(wave_records, filename, station_name, include_direction=False) | |
creator_url='https://climate-geophysics.nbi.ku.dk/research/oceanography/', | ||
creator_email='[email protected]', | ||
institution='Niels Bohr Institute, University of Copenhagen', | ||
contributor_name='CDIP, CDBW/USACE', | ||
contributor_role='station operation, station funding', | ||
geospatial_lat_units='degrees_north', | ||
geospatial_lat_resolution=1e-5, | ||
geospatial_lon_units='degrees_east', | ||
|
@@ -473,16 +472,12 @@ def write_records(wave_records, filename, station_name, include_direction=False) | |
time_coverage_end=str(wave_records['wave_end_time'].max()), | ||
source='insitu observations', | ||
license='These data may be redistributed and used without restriction.', | ||
acknowledgment=( | ||
'CDIP is supported by the U.S. Army Corps of Engineers (USACE) and the California ' | ||
'Department of Boating and Waterways (CDBW). The instrument that collected this ' | ||
'dataset was funded by CDBW/USACE and operated by CDIP.' | ||
), | ||
comment=( | ||
'' | ||
), | ||
) | ||
|
||
if extra_metadata is not None: | ||
for key, val in extra_metadata.items(): | ||
dataset_metadata[key] = ''.join([dataset_metadata.get(key, ''), str(val)]) | ||
|
||
dimension_data = ( | ||
# (name, dtype, data) | ||
('meta_station_name', str, np.array([np.string_(station_name)])), | ||
|