From b9a5792a28de3f1c10b80e2dd260cef0f282e9c1 Mon Sep 17 00:00:00 2001 From: "Paul J. Durack" Date: Wed, 25 Oct 2017 15:43:39 -0700 Subject: [PATCH] Update upstream; Add region CV --- Tables/input4MIPs_CV.json | 81 ++++++++++++++++++++++ Tables/input4MIPs_Ofx.json | 2 +- Tables/input4MIPs_Omon.json | 2 +- Tables/input4MIPs_SImon.json | 2 +- Tables/input4MIPs_grids.json | 2 +- input4MIPs_region.json | 72 +++++++++++++++++++ input4MIPs_required_global_attributes.json | 1 + src/writeJson.py | 12 +++- 8 files changed, 168 insertions(+), 6 deletions(-) create mode 100644 input4MIPs_region.json diff --git a/Tables/input4MIPs_CV.json b/Tables/input4MIPs_CV.json index fdc0ce6..9c43c1c 100644 --- a/Tables/input4MIPs_CV.json +++ b/Tables/input4MIPs_CV.json @@ -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", @@ -143,6 +223,7 @@ "mip_era", "nominal_resolution", "realm", + "region", "source", "source_id", "table_id", diff --git a/Tables/input4MIPs_Ofx.json b/Tables/input4MIPs_Ofx.json index 3bb1c49..66608b2 100644 --- a/Tables/input4MIPs_Ofx.json +++ b/Tables/input4MIPs_Ofx.json @@ -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":{ diff --git a/Tables/input4MIPs_Omon.json b/Tables/input4MIPs_Omon.json index 6fe20f4..4f37548 100644 --- a/Tables/input4MIPs_Omon.json +++ b/Tables/input4MIPs_Omon.json @@ -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":{ diff --git a/Tables/input4MIPs_SImon.json b/Tables/input4MIPs_SImon.json index 6d50380..f2c22a7 100644 --- a/Tables/input4MIPs_SImon.json +++ b/Tables/input4MIPs_SImon.json @@ -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":{ diff --git a/Tables/input4MIPs_grids.json b/Tables/input4MIPs_grids.json index a46cee5..16469b8 100644 --- a/Tables/input4MIPs_grids.json +++ b/Tables/input4MIPs_grids.json @@ -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":{ diff --git a/input4MIPs_region.json b/input4MIPs_region.json new file mode 100644 index 0000000..69c23d6 --- /dev/null +++ b/input4MIPs_region.json @@ -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" + ] +} \ No newline at end of file diff --git a/input4MIPs_required_global_attributes.json b/input4MIPs_required_global_attributes.json index e897530..7f2cf5c 100644 --- a/input4MIPs_required_global_attributes.json +++ b/input4MIPs_required_global_attributes.json @@ -15,6 +15,7 @@ "mip_era", "nominal_resolution", "realm", + "region", "source", "source_id", "table_id", diff --git a/src/writeJson.py b/src/writeJson.py index ff210e5..58e9fef 100755 --- a/src/writeJson.py +++ b/src/writeJson.py @@ -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 @@ -64,6 +65,7 @@ 'product', 'nominal_resolution', 'realm', + 'region', 'required_global_attributes', 'CV', 'Ofx', @@ -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 @@ -318,6 +321,8 @@ #%% Realm +#%% Region + #%% Required global attributes required_global_attributes = [ 'Conventions', @@ -335,6 +340,7 @@ 'mip_era', 'nominal_resolution', 'realm', + 'region', 'source', 'source_id', 'table_id', @@ -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:'}