forked from ioos/erddap-gold-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from bio-oracle/merge-upstream
Merge upstream
- Loading branch information
Showing
5 changed files
with
73 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ erddap/conf/config.sh | |
erddap/content/history/*.xml | ||
erddap/content/datasets.xml | ||
erddap/content/setup.xml | ||
.envrc |
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 |
---|---|---|
@@ -1,18 +1,41 @@ | ||
version: '2' | ||
services: | ||
erddap: | ||
container_name: "bio-oracle-erddap" | ||
image: axiom/docker-erddap:2.22-jdk17-openjdk | ||
image: axiom/docker-erddap:2.23-jdk17-openjdk | ||
restart: unless-stopped | ||
ports: | ||
- "8080:8080" | ||
environment: | ||
ERDDAP_MIN_MEMORY: 1G | ||
ERDDAP_MAX_MEMORY: 12G | ||
volumes: | ||
- "${PWD}/erddap/conf/config.sh:/usr/local/tomcat/bin/config.sh" | ||
- "${PWD}/erddap/conf/robots.txt:/usr/local/tomcat/webapps/ROOT/robots.txt" | ||
- "${PWD}/erddap/content:/usr/local/tomcat/content/erddap" | ||
- "${PWD}/erddap/data:/erddapData" | ||
- "/data/layers:/datasets" | ||
- "/tmp/:/usr/local/tomcat/temp/" | ||
environment: | ||
#note: these can also be set in /usr/local/tomcat/bin/config.sh | ||
ERDDAP_MIN_MEMORY: 2G | ||
ERDDAP_MAX_MEMORY: 12G | ||
ERDDAP_bigParentDirectory: /erddapData/ | ||
ERDDAP_baseUrl: "http://erddap.bio-oracle.org:8080" | ||
ERDDAP_baseHttpsUrl: "http://erddap.bio-oracle.org:8080" | ||
ERDDAP_flagKeyKey: "4a0c345f-d494-4edc-b8c7-640c6d99f4b1" | ||
ERDDAP_emailEverythingT: [email protected] | ||
ERDDAP_emailDailyReportsTo: | ||
ERDDAP_emailFromAddress: | ||
ERDDAP_emailUserName: | ||
ERDDAP_emailPassword: | ||
ERDDAP_emailProperties: | ||
ERDDAP_emailSmtpHost: | ||
ERDDAP_emailSmtpPort: | ||
ERDDAP_adminInstitution: Flanders Marine Institute (VLIZ) | ||
ERDDAP_adminInstitutionUrl: https://vliz.be/en/ | ||
ERDDAP_adminIndividualName: VLIZ Data Manager | ||
ERDDAP_adminPosition: Data Manager | ||
ERDDAP_adminPhone: | ||
ERDDAP_adminAddress: | ||
ERDDAP_adminCity: | ||
ERDDAP_adminStateOrProvince: | ||
ERDDAP_adminPostalCode: | ||
ERDDAP_adminCountry: | ||
ERDDAP_adminEmail: |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
ERDDAP_MIN_MEMORY="1G" | ||
ERDDAP_MAX_MEMORY="12G" | ||
ERDDAP_bigParentDirectory="/erddapData/" | ||
ERDDAP_baseUrl="http://erddap.bio-oracle.org:8080" | ||
ERDDAP_baseHttpsUrl="http://erddap.bio-oracle.org:8080" | ||
ERDDAP_flagKeyKey="4a0c345f-d494-4edc-b8c7-640c6d99f4b1" | ||
|
||
ERDDAP_emailEverythingTo="[email protected]" | ||
ERDDAP_emailDailyReportsTo="" | ||
ERDDAP_emailFromAddress="" | ||
|
@@ -11,15 +12,14 @@ ERDDAP_emailPassword="" | |
ERDDAP_emailProperties="" | ||
ERDDAP_emailSmtpHost="" | ||
ERDDAP_emailSmtpPort="" | ||
|
||
ERDDAP_adminInstitution="Integrated Ocean Observing System (IOOS)" | ||
ERDDAP_adminInstitutionUrl="https://ioos.github.io/" | ||
ERDDAP_adminIndividualName="Micah Wengren" | ||
ERDDAP_adminInstitution="Flanders Marine Institute (VLIZ)" | ||
ERDDAP_adminInstitutionUrl="https://vliz.be/en/" | ||
ERDDAP_adminIndividualName="VLIZ Data Manager" | ||
ERDDAP_adminPosition="Data Manager" | ||
ERDDAP_adminPhone="240-533-9441" | ||
ERDDAP_adminAddress="1315 East-West Highway 2nd Floor" | ||
ERDDAP_adminCity="Silver Spring" | ||
ERDDAP_adminStateOrProvince="MD" | ||
ERDDAP_adminPostalCode="20910" | ||
ERDDAP_adminCountry="USA" | ||
ERDDAP_adminEmail="[email protected]" | ||
ERDDAP_adminPhone="" | ||
ERDDAP_adminAddress="" | ||
ERDDAP_adminCity="" | ||
ERDDAP_adminStateOrProvince="" | ||
ERDDAP_adminPostalCode="" | ||
ERDDAP_adminCountry="" | ||
ERDDAP_adminEmail="" |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from netCDF4 import Dataset | ||
|
||
|
||
def convert_nc_to_cdl(nc_fname): | ||
cdl_fname = nc_fname.with_suffix(".cdl") | ||
if cdl_fname.exists(): | ||
print(f"The {cdl_fname} file already exists, not overwriting it.") | ||
return | ||
with Dataset(nc_fname) as nc: | ||
print(f"Converting {nc_fname} to {cdl_fname}.") | ||
nc.tocdl(coordvars=True, data=True, outfile=cdl_fname) | ||
|
||
def convert_cdl_to_nc(cdl_name): | ||
nc_fname = cdl_fname.with_suffix(".nc") | ||
if nc_fname.exists(): | ||
print(f"The {nc_fname} file already exists, not overwriting it.") | ||
return | ||
print(f"Converting {cdl_fname} to {nc_fname}.") | ||
Dataset.fromcdl(cdl_fname) | ||
|
||
|
||
if __name__ == "__main__": | ||
from pathlib import Path | ||
|
||
datasets_path = Path("datasets") | ||
for nc_fname in datasets_path.glob("*.nc"): | ||
convert_nc_to_cdl(nc_fname) | ||
|
||
for cdl_fname in datasets_path.glob("*.cdl"): | ||
convert_cdl_to_nc(cdl_fname) |