Skip to content

Commit

Permalink
Retrieve model info with metadata structure from craimodels
Browse files Browse the repository at this point in the history
  • Loading branch information
eplesiat committed Jan 23, 2024
1 parent ffd0572 commit 8dc4f4e
Showing 1 changed file with 2 additions and 44 deletions.
46 changes: 2 additions & 44 deletions duck/processes/wps_clintai.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,50 +31,8 @@
INFO_ROLE = "https://clint.dkrz.de/spec/crai/info"

models_list = list(craimodels.info_models().keys())
info_models = yaml.safe_load(craimodels.raw_text())

dummy_models = {
"HadCRUT4": [
{
"name": "dataset_name",
"value": "HadCRUT4",
"title": "HadCRUT4 Training dataset: 82133 samples of near surface temperature anomalies from the 20th century reanalysis dataset (https://psl.noaa.gov/data/20thC_Rean/) spanning the period 1870-2009. \nMask dataset: masks of missing values extracted from the HadCRUT4 dataset for the period 1850-2014."

},
{
"name": "file",
"value": "https://www.metoffice.gov.uk/hadobs/hadcrut4/data/current/gridded_fields/HadCRUT.4.6.0.0.median_netcdf.zip",
"title": "Enter a URL to your HadCRUT4 netcdf file."
},
{
"name": "variable_name",
"value": "temperature_anomaly",
"title": "temperature_anomaly"
}
],
"HadCRUT5": [
{
"name": "dataset_name",
"value": "HadCRUT5",
"title": "HadCRUT5 Training dataset: 82133 samples of near surface temperature anomalies from the 20th century reanalysis dataset (https://psl.noaa.gov/data/20thC_Rean/) spanning the period 1870-2009. \nMask dataset: masks of missing values extracted from the HadCRUT4 dataset for the period 1850-2014."

},
{
"name": "file",
"value": "https://www.metoffice.gov.uk/hadobs/hadcrut5/data/current/non-infilled/HadCRUT.5.0.1.0.anomalies.ensemble_mean.nc",
"title": "Enter a URL to your HadCRUT5 netcdf file."
},
{
"name": "variable_name",
"value": "tas_mean",
"title": "tas_mean"
}
]
}

# info_models_string = json.dumps(info_models, separators=(',', ':'))
info_models_string = json.dumps(dummy_models, separators=(',', ':'))

info_models = yaml.safe_load(craimodels.metadata())
info_models_string = json.dumps(info_models, separators=(',', ':'))

class ClintAI(Process):
def __init__(self):
Expand Down

0 comments on commit 8dc4f4e

Please sign in to comment.