Skip to content

Commit

Permalink
Merge pull request #35 from PCMDI/issue17_durack1_ReviseMACA3-0Regist…
Browse files Browse the repository at this point in the history
…ration

updated MACA3-0 registration, institution_id; augmented daily variables
  • Loading branch information
durack1 authored Feb 21, 2025
2 parents 6298cea + 57177c3 commit 71e3c47
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 42 deletions.
4 changes: 2 additions & 2 deletions DRCDP_institution_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"contact":"Katharine Hayhoe; katharine.hayhoe@ttu.edu",
"name":"Texas Tech University, 2520 Broadway Avenue, Lubbock, TX 79409, USA"
},
"UCM-SNRI":{
"UCM-ACSL":{
"ROR":"00d9ah105",
"URL":"https://www.climatologylab.org",
"contact":"John T. Abatzoglou; jabatzoglou@ucmerced.edu",
"name":"Sierra Nevada Research Institute, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA"
"name":"Applied Climate Science Laboratory, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA"
},
"UCSD-SIO":{
"ROR":"04v7hvq31",
Expand Down
2 changes: 1 addition & 1 deletion DRCDP_source_id.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"further_info_url":"https://www.climatologylab.org/maca.html",
"grid":"10 x 10 km latitude x longitude",
"grid_label":"gn",
"institution_id":"UCM-SNRI",
"institution_id":"UCM-ACSL",
"license":"CC0 1.0",
"nominal_resolution":"10 km",
"product":"downscaled-statistical",
Expand Down
125 changes: 124 additions & 1 deletion Tables/DRCDP_APday.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,60 @@
"int_missing_value":"-999",
"missing_value":"1e20",
"product":"DRCDP",
"table_date":"2025-02-15",
"table_date":"2025-02-20",
"table_id":"APday"
},
"variable_entry":{
"hursmax":{
"cell_measures":"area: areacella",
"cell_methods":"area: mean time: maximum",
"comment":"The relative humidity with respect to liquid water for T>0 C, and with respect to ice for T<0 C",
"dimensions":[
"longitude",
"latitude",
"time",
"height2m"
],
"frequency":"day",
"long_name":"Daily Maximum Near-Surface Relative Humidity",
"modeling_realm":[
"atmos"
],
"ok_max_mean_abs":"",
"ok_min_mean_abs":"",
"out_name":"hursmax",
"positive":"",
"standard_name":"relative_humidity",
"type":"real",
"units":"%",
"valid_max":"",
"valid_min":""
},
"hursmin":{
"cell_measures":"area: areacella",
"cell_methods":"area: mean time: minimum",
"comment":"The relative humidity with respect to liquid water for T>0 C, and with respect to ice for T<0 C",
"dimensions":[
"longitude",
"latitude",
"time",
"height2m"
],
"frequency":"day",
"long_name":"Daily Minimum Near-Surface Relative Humidity",
"modeling_realm":[
"atmos"
],
"ok_max_mean_abs":"",
"ok_min_mean_abs":"",
"out_name":"hursmin",
"positive":"",
"standard_name":"relative_humidity",
"type":"real",
"units":"%",
"valid_max":"",
"valid_min":""
},
"pr":{
"cell_measures":"area: areacella",
"cell_methods":"area: time: mean",
Expand All @@ -36,6 +86,55 @@
"valid_max":"",
"valid_min":""
},
"rsds":{
"cell_measures":"area: areacella",
"cell_methods":"area: time: mean",
"comment":"Surface solar irradiance for UV calculations",
"dimensions":[
"longitude",
"latitude",
"time"
],
"frequency":"day",
"long_name":"Surface Downwelling Shortwave Radiation",
"modeling_realm":[
"atmos"
],
"ok_max_mean_abs":"",
"ok_min_mean_abs":"",
"out_name":"rsds",
"positive":"down",
"standard_name":"surface_downwelling_shortwave_flux_in_air",
"type":"real",
"units":"W m-2",
"valid_max":"",
"valid_min":""
},
"sfcWind":{
"cell_measures":"area: areacella",
"cell_methods":"area: time: mean",
"comment":"near-surface (usually, 10 meters) wind speed",
"dimensions":[
"longitude",
"latitude",
"time",
"height10m"
],
"frequency":"day",
"long_name":"Daily-Mean Near-Surface Wind Speed",
"modeling_realm":[
"atmos"
],
"ok_max_mean_abs":"",
"ok_min_mean_abs":"",
"out_name":"sfcWind",
"positive":"",
"standard_name":"wind_speed",
"type":"real",
"units":"m s-1",
"valid_max":"",
"valid_min":""
},
"tasmax":{
"cell_measures":"area: areacella",
"cell_methods":"area: mean time: maximum",
Expand Down Expand Up @@ -85,6 +184,30 @@
"units":"K",
"valid_max":"",
"valid_min":""
},
"tdps":{
"cell_measures":"area: areacella",
"cell_methods":"area: time: mean",
"comment":"Dew point temperature is the temperature at which a parcel of air reaches saturation upon being cooled at constant pressure and specific humidity",
"dimensions":[
"longitude",
"latitude",
"time"
],
"frequency":"day",
"long_name":"2m Dewpoint Temperature",
"modeling_realm":[
"atmos"
],
"ok_max_mean_abs":"",
"ok_min_mean_abs":"",
"out_name":"tdps",
"positive":"",
"standard_name":"dew_point_temperature",
"type":"real",
"units":"K",
"valid_max":"",
"valid_min":""
}
}
}
6 changes: 3 additions & 3 deletions Tables/DRCDP_CV.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"contact":"Katharine Hayhoe; katharine.hayhoe@ttu.edu",
"name":"Texas Tech University, 2520 Broadway Avenue, Lubbock, TX 79409, USA"
},
"UCM-SNRI":{
"UCM-ACSL":{
"ROR":"00d9ah105",
"URL":"https://www.climatologylab.org",
"contact":"John T. Abatzoglou; jabatzoglou@ucmerced.edu",
"name":"Sierra Nevada Research Institute, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA"
"name":"Applied Climate Science Laboratory, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA"
},
"UCSD-SIO":{
"ROR":"04v7hvq31",
Expand Down Expand Up @@ -142,7 +142,7 @@
"further_info_url":"https://www.climatologylab.org/maca.html",
"grid":"10 x 10 km latitude x longitude",
"grid_label":"gn",
"institution_id":"UCM-SNRI",
"institution_id":"UCM-ACSL",
"license":"CC0 1.0",
"nominal_resolution":"10 km",
"product":"downscaled-statistical",
Expand Down
2 changes: 1 addition & 1 deletion Tables/DRCDP_grids.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"cmor_version":"3.9.0",
"data_specs_version":"6.5.0.0; input4MIPs-cmor-tables; e4fa82f330125fbdd78fa8315225829eabffee70",
"product":"DRCDP",
"table_date":"2025-02-15"
"table_date":"2025-02-20"
},
"axis_entry":{
"grid_latitude":{
Expand Down
41 changes: 17 additions & 24 deletions src/createCVs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"PJD 18 Feb 2025 - updated to remove variant_info and variant_label from required_global_attributes<br>\n",
"PJD 18 Feb 2025 - updated to remove variant_label from DRS<br>\n",
"PJD 20 Feb 2025 - updated tracking_id -> tracking_id_prefix<br>\n",
"PJD 20 Feb 2025 - update MACA3-0 registration, augment with available variables<br>\n",
"TODO:\n",
"\n",
"**Links**"
Expand All @@ -82,8 +83,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 37 ms, sys: 14.7 ms, total: 51.7 ms\n",
"Wall time: 59.8 ms\n"
"CPU times: user 42.1 ms, sys: 18.4 ms, total: 60.4 ms\n",
"Wall time: 64.2 ms\n"
]
}
],
Expand Down Expand Up @@ -119,8 +120,8 @@
"3 nominal_resolution\n",
"4 realm\n",
"5 source_type\n",
"CPU times: user 40.7 ms, sys: 16.4 ms, total: 57.1 ms\n",
"Wall time: 1.11 s\n"
"CPU times: user 42.6 ms, sys: 18.4 ms, total: 61 ms\n",
"Wall time: 1.14 s\n"
]
}
],
Expand Down Expand Up @@ -297,8 +298,8 @@
{
"data": {
"text/plain": [
"{'institution_id': {'UCM-SNRI': {'contact': 'John T. Abatzoglou; jabatzoglou@ucmerced.edu',\n",
" 'name': 'Sierra Nevada Research Institute, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA',\n",
"{'institution_id': {'UCM-ACSL': {'contact': 'John T. Abatzoglou; jabatzoglou@ucmerced.edu',\n",
" 'name': 'Applied Climate Science Laboratory, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA',\n",
" 'ROR': '00d9ah105',\n",
" 'URL': 'https://www.climatologylab.org'},\n",
" 'UCSD-SIO': {'contact': 'Daniel Feldman; DRFeldman@lbl.gov',\n",
Expand All @@ -319,15 +320,15 @@
"source": [
"institution_id = {}\n",
"institution_id[\"institution_id\"] = {}\n",
"institution_id[\"institution_id\"][\"UCM-SNRI\"] = {}\n",
"institution_id[\"institution_id\"][\"UCM-SNRI\"][\n",
"institution_id[\"institution_id\"][\"UCM-ACSL\"] = {}\n",
"institution_id[\"institution_id\"][\"UCM-ACSL\"][\n",
" \"contact\"\n",
"] = \"John T. Abatzoglou; jabatzoglou@ucmerced.edu\"\n",
"institution_id[\"institution_id\"][\"UCM-SNRI\"][\n",
"institution_id[\"institution_id\"][\"UCM-ACSL\"][\n",
" \"name\"\n",
"] = \"Sierra Nevada Research Institute, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA\"\n",
"institution_id[\"institution_id\"][\"UCM-SNRI\"][\"ROR\"] = \"00d9ah105\"\n",
"institution_id[\"institution_id\"][\"UCM-SNRI\"][\"URL\"] = \"https://www.climatologylab.org\"\n",
"] = \"Applied Climate Science Laboratory, University of California, Merced, 5200 N. Lake Road, Merced, CA 95343, USA\"\n",
"institution_id[\"institution_id\"][\"UCM-ACSL\"][\"ROR\"] = \"00d9ah105\"\n",
"institution_id[\"institution_id\"][\"UCM-ACSL\"][\"URL\"] = \"https://www.climatologylab.org\"\n",
"institution_id[\"institution_id\"][\"UCSD-SIO\"] = {}\n",
"institution_id[\"institution_id\"][\"UCSD-SIO\"][\n",
" \"contact\"\n",
Expand Down Expand Up @@ -668,7 +669,7 @@
" 'further_info_url': 'https://www.climatologylab.org/maca.html',\n",
" 'grid': '10 x 10 km latitude x longitude',\n",
" 'grid_label': 'gn',\n",
" 'institution_id': 'UCM-SNRI',\n",
" 'institution_id': 'UCM-ACSL',\n",
" 'license': 'CC0 1.0',\n",
" 'nominal_resolution': '10 km',\n",
" 'product': 'downscaled-statistical',\n",
Expand Down Expand Up @@ -770,7 +771,7 @@
"] = \"https://www.climatologylab.org/maca.html\"\n",
"source_id[\"source_id\"][\"MACA3-0\"][\"grid\"] = \"10 x 10 km latitude x longitude\"\n",
"source_id[\"source_id\"][\"MACA3-0\"][\"grid_label\"] = \"gn\"\n",
"source_id[\"source_id\"][\"MACA3-0\"][\"institution_id\"] = \"UCM-SNRI\"\n",
"source_id[\"source_id\"][\"MACA3-0\"][\"institution_id\"] = \"UCM-ACSL\"\n",
"source_id[\"source_id\"][\"MACA3-0\"][\n",
" \"license\"\n",
"] = \"CC0 1.0\" # https://www.climatologylab.org/maca.html#References\n",
Expand Down Expand Up @@ -973,8 +974,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 477 μs, sys: 577 μs, total: 1.05 ms\n",
"Wall time: 760 μs\n"
"CPU times: user 496 μs, sys: 782 μs, total: 1.28 ms\n",
"Wall time: 664 μs\n"
]
}
],
Expand Down Expand Up @@ -1004,14 +1005,6 @@
"with open(outFile, \"w\") as f:\n",
" json.dump(CV, f, ensure_ascii=True, sort_keys=True, indent=4, separators=(\",\", \":\"))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "011f199a-3e03-48c8-b578-22b208879fc7",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
25 changes: 15 additions & 10 deletions src/pullTable.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"PJD 14 Feb 2025 - updated with coordinate, formula_terms and grids<br>\n",
"PJD 15 Feb 2025 - added \"Header\" to DRCDP_grids.json, may need to tweak this as grid_mapping functions are used (Header caused issues with coordinate, formula_terms)<br>\n",
"PJD 15 Feb 2025 - correct DRCDP_grids, erroneously was copy of coordinate info<br>\n",
"PJD 20 Feb 2025 - added hursmax, hursmin, rsds, sfcWind, and tdps variables<br>\n",
"TODO:\n",
"\n",
"**Links**"
Expand All @@ -79,8 +80,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 29.2 ms, sys: 12.2 ms, total: 41.4 ms\n",
"Wall time: 57.1 ms\n"
"CPU times: user 35.7 ms, sys: 14.4 ms, total: 50.2 ms\n",
"Wall time: 61.5 ms\n"
]
}
],
Expand Down Expand Up @@ -114,8 +115,8 @@
"1 coordinate\n",
"2 formula_terms\n",
"3 grids\n",
"CPU times: user 34.6 ms, sys: 14.1 ms, total: 48.7 ms\n",
"Wall time: 20.7 s\n"
"CPU times: user 28.2 ms, sys: 11.5 ms, total: 39.7 ms\n",
"Wall time: 847 ms\n"
]
}
],
Expand Down Expand Up @@ -161,7 +162,7 @@
"outputs": [],
"source": [
"keyList = list(APday[\"variable_entry\"].keys())\n",
"keepKeys = [\"pr\", \"tasmax\", \"tasmin\"]\n",
"keepKeys = [\"hursmax\", \"hursmin\", \"pr\", \"rsds\", \"sfcWind\", \"tasmax\", \"tasmin\", \"tdps\"]\n",
"for count, key in enumerate(keyList):\n",
" if key not in keepKeys:\n",
" APday[\"variable_entry\"].pop(key)"
Expand All @@ -184,7 +185,7 @@
{
"data": {
"text/plain": [
"dict_keys(['pr', 'tasmax', 'tasmin'])"
"dict_keys(['hursmax', 'hursmin', 'pr', 'rsds', 'sfcWind', 'tasmax', 'tasmin', 'tdps'])"
]
},
"execution_count": 4,
Expand All @@ -193,6 +194,10 @@
}
],
"source": [
"# cleanup comments\n",
"for key in APday[\"variable_entry\"].keys():\n",
" APday[\"variable_entry\"][key][\"comment\"] = APday[\"variable_entry\"][key][\"comment\"].replace(\".\",\"\")\n",
" APday[\"variable_entry\"][key][\"comment\"] = APday[\"variable_entry\"][key][\"comment\"].replace(\"T> 0\",\"T>0\")\n",
"APday[\"variable_entry\"].keys()"
]
},
Expand Down Expand Up @@ -247,8 +252,8 @@
"text": [
"mipTHash: f42386929a0057ed15e66a3bac045b8c00d33c0f\n",
"inp4Hash: e4fa82f330125fbdd78fa8315225829eabffee70\n",
"CPU times: user 17.1 ms, sys: 4.46 ms, total: 21.5 ms\n",
"Wall time: 10.7 s\n"
"CPU times: user 17 ms, sys: 4.61 ms, total: 21.6 ms\n",
"Wall time: 667 ms\n"
]
}
],
Expand All @@ -269,7 +274,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "b759f7d8-8deb-4069-b385-93e4c61e9610",
"metadata": {},
"outputs": [
Expand All @@ -284,7 +289,7 @@
" 'int_missing_value': '-999',\n",
" 'missing_value': '1e20',\n",
" 'product': 'DRCDP',\n",
" 'table_date': '2025-02-14',\n",
" 'table_date': '2025-02-20',\n",
" 'table_id': 'APday'}"
]
},
Expand Down

0 comments on commit 71e3c47

Please sign in to comment.