-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1 from gantian127/release-0.1.1
Release 0.1.1
- Loading branch information
Showing
6 changed files
with
88 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: bmi_era5 | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- bmipy | ||
- netcdf4 | ||
- numpy | ||
- pyyaml | ||
- requests | ||
- xarray | ||
- matplotlib | ||
|
||
|
||
|
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,3 @@ | ||
#!/bin/bash | ||
|
||
python setup.py install |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import subprocess | ||
import os | ||
|
||
|
||
def install_cds(config_path=''): | ||
# create configuration file | ||
url = 'https://cds.climate.copernicus.eu/api/v2' | ||
key = input('Enter Your CDS API Key: ') | ||
config_content = 'url: {} \nkey: {}'.format(url, key) | ||
|
||
home_dir = os.path.expanduser('~') | ||
config_path = config_path if config_path else os.path.join(home_dir, '.cdsapirc') | ||
|
||
with open(config_path, 'w') as config_file: | ||
config_file.write(config_content) | ||
|
||
print('CDS API Key file is created.') | ||
|
||
# install cdsapi | ||
install = subprocess.run(["pip", "install", "cdsapi"], check=True) | ||
if install.returncode == 0: | ||
print('cdsapi package is successfully installed.') | ||
|