Skip to content

Commit

Permalink
Merge pull request #21 from PCMDI/issue20_durack1_AddRegionCV
Browse files Browse the repository at this point in the history
Update upstream; Add region CV
  • Loading branch information
durack1 authored Oct 25, 2017
2 parents f035bbe + b9a5792 commit 1dbceb5
Show file tree
Hide file tree
Showing 8 changed files with 168 additions and 6 deletions.
81 changes: 81 additions & 0 deletions Tables/input4MIPs_CV.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,86 @@
"observations",
"reanalysis"
],
"realm":{
"aerosol":"Aerosol",
"atmos":"Atmosphere",
"atmosChem":"Atmospheric Chemistry",
"land":"Land Surface",
"landIce":"Land Ice",
"ocean":"Ocean",
"ocnBgchem":"Ocean Biogeochemistry",
"seaIce":"Sea Ice"
},
"region":[
"africa",
"antarctica",
"arabian_sea",
"aral_sea",
"arctic_ocean",
"asia",
"atlantic_ocean",
"australia",
"baltic_sea",
"barents_opening",
"barents_sea",
"beaufort_sea",
"bellingshausen_sea",
"bering_sea",
"bering_strait",
"black_sea",
"canadian_archipelago",
"caribbean_sea",
"caspian_sea",
"central_america",
"chukchi_sea",
"contiguous_united_states",
"denmark_strait",
"drake_passage",
"east_china_sea",
"english_channel",
"eurasia",
"europe",
"faroe_scotland_channel",
"florida_bahamas_strait",
"fram_strait",
"global",
"global_land",
"global_ocean",
"great_lakes",
"greenland",
"gulf_of_alaska",
"gulf_of_mexico",
"hudson_bay",
"iceland_faroe_channel",
"indian_ocean",
"indo_pacific_ocean",
"indonesian_throughflow",
"irish_sea",
"lake_baykal",
"lake_chad",
"lake_malawi",
"lake_tanganyika",
"lake_victoria",
"mediterranean_sea",
"mozambique_channel",
"north_america",
"north_sea",
"norwegian_sea",
"pacific_equatorial_undercurrent",
"pacific_ocean",
"persian_gulf",
"red_sea",
"ross_sea",
"sea_of_japan",
"sea_of_okhotsk",
"south_america",
"south_china_sea",
"southern_ocean",
"taiwan_luzon_straits",
"weddell_sea",
"windward_passage",
"yellow_sea"
],
"required_global_attributes":[
"Conventions",
"activity_id",
Expand All @@ -143,6 +223,7 @@
"mip_era",
"nominal_resolution",
"realm",
"region",
"source",
"source_id",
"table_id",
Expand Down
2 changes: 1 addition & 1 deletion Tables/input4MIPs_Ofx.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"missing_value":"1e20",
"product":"input4MIPs",
"realm":"ocean",
"table_date":"24 October 2017",
"table_date":"25 October 2017",
"table_id":"Table input4MIPs_Ofx"
},
"variable_entry":{
Expand Down
2 changes: 1 addition & 1 deletion Tables/input4MIPs_Omon.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"missing_value":"1e20",
"product":"input4MIPs",
"realm":"ocean",
"table_date":"24 October 2017",
"table_date":"25 October 2017",
"table_id":"Table input4MIPs_Omon"
},
"variable_entry":{
Expand Down
2 changes: 1 addition & 1 deletion Tables/input4MIPs_SImon.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"missing_value":"1e20",
"product":"input4MIPs",
"realm":"seaIce",
"table_date":"24 October 2017",
"table_date":"25 October 2017",
"table_id":"Table input4MIPs_SImon"
},
"variable_entry":{
Expand Down
2 changes: 1 addition & 1 deletion Tables/input4MIPs_grids.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"data_specs_version":"01.00.16",
"missing_value":"1e20",
"product":"input4MIPs",
"table_date":"24 October 2017",
"table_date":"25 October 2017",
"table_id":"Table input4MIPs_grids"
},
"axis_entry":{
Expand Down
72 changes: 72 additions & 0 deletions input4MIPs_region.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"region":[
"africa",
"antarctica",
"arabian_sea",
"aral_sea",
"arctic_ocean",
"asia",
"atlantic_ocean",
"australia",
"baltic_sea",
"barents_opening",
"barents_sea",
"beaufort_sea",
"bellingshausen_sea",
"bering_sea",
"bering_strait",
"black_sea",
"canadian_archipelago",
"caribbean_sea",
"caspian_sea",
"central_america",
"chukchi_sea",
"contiguous_united_states",
"denmark_strait",
"drake_passage",
"east_china_sea",
"english_channel",
"eurasia",
"europe",
"faroe_scotland_channel",
"florida_bahamas_strait",
"fram_strait",
"global",
"global_land",
"global_ocean",
"great_lakes",
"greenland",
"gulf_of_alaska",
"gulf_of_mexico",
"hudson_bay",
"iceland_faroe_channel",
"indian_ocean",
"indo_pacific_ocean",
"indonesian_throughflow",
"irish_sea",
"lake_baykal",
"lake_chad",
"lake_malawi",
"lake_tanganyika",
"lake_victoria",
"mediterranean_sea",
"mozambique_channel",
"north_america",
"north_sea",
"norwegian_sea",
"pacific_equatorial_undercurrent",
"pacific_ocean",
"persian_gulf",
"red_sea",
"ross_sea",
"sea_of_japan",
"sea_of_okhotsk",
"south_america",
"south_china_sea",
"southern_ocean",
"taiwan_luzon_straits",
"weddell_sea",
"windward_passage",
"yellow_sea"
]
}
1 change: 1 addition & 0 deletions input4MIPs_required_global_attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"mip_era",
"nominal_resolution",
"realm",
"region",
"source",
"source_id",
"table_id",
Expand Down
12 changes: 10 additions & 2 deletions src/writeJson.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
PJD 23 Oct 2017 - Sync repo with guidance doc by adding dataset_category CV https://github.com/PCMDI/input4MIPs-cmor-tables/issues/15
PJD 24 Oct 2017 - Updated siconc definition and dimensions to resolve typesi problem https://github.com/PCMDI/input4MIPs-cmor-tables/issues/18
PJD 24 Oct 2017 - Fix issue with time2 being climatology axis, revert to time1 for *bcs variables
PJD 25 Oct 2017 - Added in region CV from obs4MIPs
- TODO: Deal with lab cert issue https://raw.githubusercontent.com -> http://rawgit.com (see requests library)
@author: durack1
Expand Down Expand Up @@ -64,6 +65,7 @@
'product',
'nominal_resolution',
'realm',
'region',
'required_global_attributes',
'CV',
'Ofx',
Expand All @@ -82,10 +84,11 @@
['Ofx','https://raw.githubusercontent.com/PCMDI/cmip6-cmor-tables/master/Tables/CMIP6_Ofx.json'],
['coordinate','https://raw.githubusercontent.com/PCMDI/cmip6-cmor-tables/master/Tables/CMIP6_coordinate.json'],
['formula_terms','https://raw.githubusercontent.com/PCMDI/cmip6-cmor-tables/master/Tables/CMIP6_formula_terms.json'],
['grids','https://raw.githubusercontent.com/PCMDI/cmip6-cmor-tables/master/Tables/CMIP6_grids.json']
['grids','https://raw.githubusercontent.com/PCMDI/cmip6-cmor-tables/master/Tables/CMIP6_grids.json'],
['region','https://raw.githubusercontent.com/PCMDI/obs4MIPs-cmor-tables/master/obs4MIPs_region.json']
] ;

headerFree = ['coordinate','frequency','formula_terms','grid_label','nominal_resolution','realm']
headerFree = ['coordinate','frequency','formula_terms','grid_label','nominal_resolution','realm','region']

#%% Loop through tables and create in-memory objects
# Loop through tableSource and create output tables
Expand Down Expand Up @@ -318,6 +321,8 @@

#%% Realm

#%% Region

#%% Required global attributes
required_global_attributes = [
'Conventions',
Expand All @@ -335,6 +340,7 @@
'mip_era',
'nominal_resolution',
'realm',
'region',
'source',
'source_id',
'table_id',
Expand All @@ -357,6 +363,8 @@
CV['CV']['mip_era'] = mip_era
CV['CV']['nominal_resolution'] = nominal_resolution
CV['CV']['product'] = product
CV['CV']['realm'] = realm
CV['CV']['region'] = region
CV['CV']['required_global_attributes'] = required_global_attributes
CV['CV']['source_id'] = {'PCMDI':'PCMDI:'}

Expand Down

0 comments on commit 1dbceb5

Please sign in to comment.