Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intake-esm_support
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
data-infrastructure-services
intake-esm_support
Commits
f04a2687
Commit
f04a2687
authored
3 years ago
by
Fabian Wachsmann
Browse files
Options
Downloads
Patches
Plain Diff
Added cloud creator
parent
d27c2fad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
esm-collections/cloud-access/dkrz_catalog.yaml
+8
-8
8 additions, 8 deletions
esm-collections/cloud-access/dkrz_catalog.yaml
esm-collections/create_cloud_parent.ipynb
+13
-5
13 additions, 5 deletions
esm-collections/create_cloud_parent.ipynb
with
21 additions
and
13 deletions
esm-collections/cloud-access/dkrz_catalog.yaml
+
8
−
8
View file @
f04a2687
...
...
@@ -14,13 +14,13 @@ metadata:
sources
:
dkrz_cmip5_disk
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_cmip5_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_cmip5_disk.json
description
:
dkrz cmip5 data on disk saved as netcdf
driver
:
-
intake.open_esm_datastore
dkrz_cmip5_archive
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_cmip5_archive.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_cmip5_archive.json
description
:
dkrz cmip5 data on archive saved as netcdf
driver
:
-
intake.open_esm_datastore
...
...
@@ -30,7 +30,7 @@ sources:
type
:
list
description
:
description
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_cmip6_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_cmip6_disk.json
csv_kwargs
:
usecols
:
[
'
activity_id'
,
'
institution_id'
,
'
source_id'
,
'
experiment_id'
,
'
member_id'
,
'
table_id'
,
'
variable_id'
,
'
grid_label'
,
'
dcpp_init_year'
,
'
version'
,
'
time_range'
,
'
uri'
,
'
format'
]
description
:
dkrz cmip6 data on disk saved as netcdf
...
...
@@ -38,31 +38,31 @@ sources:
-
intake.open_esm_datastore
dkrz_cmip6_cloud
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_cmip6_cloud.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_cmip6_cloud.json
description
:
dkrz cmip6 data on cloud
driver
:
-
intake.open_esm_datastore
dkrz_cordex_disk
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_cordex_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_cordex_disk.json
description
:
dkrz cordex data on disk
driver
:
-
intake.open_esm_datastore
dkrz_era5_disk
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_era5_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_era5_disk.json
description
:
dkrz era5 data on disk
driver
:
-
intake.open_esm_datastore
dkrz_mpi-ge_disk
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_mpi-ge_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_mpi-ge_disk.json
description
:
dkrz mpi-ge data on disk
driver
:
-
intake.open_esm_datastore
dkrz_dyamond-winter_disk
:
args
:
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
_
access/dkrz_dyamond-winter_disk.json
esmcol_obj
:
https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud
-
access/dkrz_dyamond-winter_disk.json
description
:
dkrz dyamond-winter data on disk
driver
:
-
intake.open_esm_datastore
...
...
This diff is collapsed.
Click to expand it.
esm-collections/create_cloud_parent.ipynb
+
13
−
5
View file @
f04a2687
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
1
,
"id": "116bb321-0bbb-4e85-804a-8a75932d9e46",
"metadata": {},
"outputs": [],
...
...
@@ -14,7 +14,7 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
2
,
"id": "60ccbb3d-0f0c-467e-bb43-4c025fe3ea05",
"metadata": {},
"outputs": [],
...
...
@@ -24,14 +24,14 @@
},
{
"cell_type": "code",
"execution_count":
null
,
"execution_count":
4
,
"id": "b98dd45c-aa97-4b36-9fce-28158467e107",
"metadata": {},
"outputs": [],
"source": [
"for cat in cats:\n",
" targetfile=cat.split('/')[1]\n",
" target=\"cloud
_
access/\"+targetfile\n",
" target=\"cloud
-
access/\"+targetfile\n",
" with open(cat, \"r\") as f:\n",
" catjson=json.load(f)\n",
" catjson[\"description\"]+=\" which will be loaded from a source file which is in the cloud (see catalog_file)\"\n",
...
...
@@ -42,13 +42,21 @@
},
{
"cell_type": "code",
"execution_count":
16
,
"execution_count":
5
,
"id": "2d1dfe72-e476-45a8-a1d6-2a2b8f3cbbb3",
"metadata": {},
"outputs": [],
"source": [
"!sed 's;/pool/data/Catalogs/;https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud-access/;g' disk-access/dkrz_catalog.yaml >cloud-access/dkrz_catalog.yaml"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2d985cb4-ebc0-4906-9f21-fed42ffcb4a3",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
...
...
%% Cell type:code id:116bb321-0bbb-4e85-804a-8a75932d9e46 tags:
```
python
import
glob
import
pandas
as
pd
import
json
```
%% Cell type:code id:60ccbb3d-0f0c-467e-bb43-4c025fe3ea05 tags:
```
python
cats
=
glob
.
glob
(
"
disk-access/dkrz*.json
"
)
```
%% Cell type:code id:b98dd45c-aa97-4b36-9fce-28158467e107 tags:
```
python
for
cat
in
cats
:
targetfile
=
cat
.
split
(
'
/
'
)[
1
]
target
=
"
cloud
_
access/
"
+
targetfile
target
=
"
cloud
-
access/
"
+
targetfile
with
open
(
cat
,
"
r
"
)
as
f
:
catjson
=
json
.
load
(
f
)
catjson
[
"
description
"
]
+=
"
which will be loaded from a source file which is in the cloud (see catalog_file)
"
catjson
[
"
catalog_file
"
]
=
f
"
https://swift.dkrz.de/v1/dkrz_a44962e3ba914c309a7421573a6949a6/intake-esm/
{
catjson
[
'
id
'
]
}
.csv.gz
"
with
open
(
target
,
"
w
"
)
as
f
:
json
.
dump
(
catjson
,
f
,
indent
=
4
)
```
%% Cell type:code id:2d1dfe72-e476-45a8-a1d6-2a2b8f3cbbb3 tags:
```
python
!
sed
'
s;/pool/data/Catalogs/;https://gitlab.dkrz.de/data-infrastructure-services/intake-esm/-/raw/master/esm-collections/cloud-access/;g
'
disk
-
access
/
dkrz_catalog
.
yaml
>
cloud
-
access
/
dkrz_catalog
.
yaml
```
%% Cell type:code id:2d985cb4-ebc0-4906-9f21-fed42ffcb4a3 tags:
```
python
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment