From 6fa46b6515f77936458800672fd8f9b55c467911 Mon Sep 17 00:00:00 2001 From: "Jessica.Liptak" Date: Wed, 14 Sep 2022 11:37:54 -0400 Subject: [PATCH 1/4] add logic to use default areacello nc file if grid is tripolar and static to synthetic_setup.py add areacella to cmip_mon yaml config file --- mdtf_test_data/synthetic/synthetic_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdtf_test_data/synthetic/synthetic_setup.py b/mdtf_test_data/synthetic/synthetic_setup.py index 67f63f2..41ebd39 100755 --- a/mdtf_test_data/synthetic/synthetic_setup.py +++ b/mdtf_test_data/synthetic/synthetic_setup.py @@ -68,6 +68,7 @@ def synthetic_main( # -- Create Data print("Generating data") for v in var_names: + print("cmip ",v) static = ( yaml_dict[v + ".static"] if str(v + ".static") in list(yaml_dict.keys()) @@ -113,7 +114,7 @@ def _load_default_static(): return xr.open_dataset(_ds)["areacello"].values # Load the ocean static file - if static: + if static and grid is "tripolar": if str(v + ".source") in list(yaml_dict.keys()): staticfilepath = yaml_dict[v + ".source.filename"] if os.path.exists(staticfilepath): From 295500f8be088d755d1e93f168f23d7386022f7c Mon Sep 17 00:00:00 2001 From: "Jessica.Liptak" Date: Wed, 14 Sep 2022 11:38:50 -0400 Subject: [PATCH 2/4] forgot to add cmip_mon.yml to commit --- mdtf_test_data/config/cmip_mon.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/mdtf_test_data/config/cmip_mon.yml b/mdtf_test_data/config/cmip_mon.yml index a53f0a4..8f6064b 100755 --- a/mdtf_test_data/config/cmip_mon.yml +++ b/mdtf_test_data/config/cmip_mon.yml @@ -1,5 +1,6 @@ variables : name : + - "areacella" - "areacello" - "zos" - "tauuo" @@ -25,6 +26,30 @@ variables : - "rlus" - "tas" +areacella : + atts : + cell_methods : "area: sum" + comment : "For atmospheres with more than 1 mesh (e.g., staggered grids), report areas that apply to surface vertical fluxes of energy." + coordinates : "lat lon" + description : "Grid-Cell Area for Atmospheric Grid Variables" + frequency : "fx" + id : "areacella" + long_name : "Grid-Cell Area for Atmospheric Grid Variables" + missing_value : 1.e+20 + out_name : "areacella" + realm : "atmosphere" + standard_name : "cell_area" + time_label : "None" + time_title : "No temporal dimensions ... fixed field" + title : "Grid-Cell Area for Atmosphere Variables" + type : "real" + units : "m2" + variable_id : "areacella" + grid : "standard" + static : true + stats : + - [6.259256e+8, 1.234758e+9] + areacello : atts : cell_methods : "area: sum" From aa413924e019983234b69d68d294c8bfa5aef90e Mon Sep 17 00:00:00 2001 From: "Jessica.Liptak" Date: Wed, 14 Sep 2022 17:05:10 -0400 Subject: [PATCH 3/4] add siconc to cmip_mon yaml, too --- mdtf_test_data/config/cmip_mon.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mdtf_test_data/config/cmip_mon.yml b/mdtf_test_data/config/cmip_mon.yml index 8f6064b..336c286 100755 --- a/mdtf_test_data/config/cmip_mon.yml +++ b/mdtf_test_data/config/cmip_mon.yml @@ -25,6 +25,7 @@ variables : - "rlut" - "rlus" - "tas" + - "siconc" areacella : atts : @@ -270,6 +271,27 @@ thetao: - [ 13.806399, 2.840008 ] - [ 13.422476, 3.461085 ] +siconc : + atts : + cell_methods: 'time: mean' + comment : 'Area fraction of grid cell covered by sea ice' + coordinates : "lat lon" + frequency : 'mon' + id : 'siconc' + long_name : 'Sea-ice Area Percentage (Ocean Grid)' + realm : 'ocean' + standard_name : 'sea_ice_area_fraction' + time : 'time' + time_label : 'time-mean' + time_title : 'Temporal mean' + title : 'sea ice area percentage' + type : 'real' + units : '%' + variable_id : 'siconc' + grid : "standard" + stats : + - [50, 25] + zg : atts: cell_methods: 'time: mean' From 35cd6319b5d5dc8e022b83317acb20bea7894ec2 Mon Sep 17 00:00:00 2001 From: Jess <20195932+wrongkindofdoctor@users.noreply.github.com> Date: Wed, 14 Sep 2022 17:07:52 -0400 Subject: [PATCH 4/4] remove debugging print statement --- mdtf_test_data/synthetic/synthetic_setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mdtf_test_data/synthetic/synthetic_setup.py b/mdtf_test_data/synthetic/synthetic_setup.py index 41ebd39..01002bd 100755 --- a/mdtf_test_data/synthetic/synthetic_setup.py +++ b/mdtf_test_data/synthetic/synthetic_setup.py @@ -68,7 +68,6 @@ def synthetic_main( # -- Create Data print("Generating data") for v in var_names: - print("cmip ",v) static = ( yaml_dict[v + ".static"] if str(v + ".static") in list(yaml_dict.keys())