Skip to content

Commit

Permalink
Merge pull request #510 from wrongkindofdoctor/refactor_pp
Browse files Browse the repository at this point in the history
MDTF-diagnostics preprocessor update (#509)
  • Loading branch information
wrongkindofdoctor authored Mar 8, 2024
2 parents d74af2e + f5b0550 commit ea5d840
Show file tree
Hide file tree
Showing 315 changed files with 18,941 additions and 21,987 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/mdtf_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
push:
branches:
- main
- refactor_pp
pull_request:
branches:
- main
- refactor_pp
defaults:
run:
shell: bash -l {0}
Expand All @@ -18,7 +20,7 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-13]
os: [ubuntu-latest, macos-13]
json-file: ["tests/github_actions_test_ubuntu_set1.jsonc","tests/github_actions_test_macos_set1.jsonc"]
json-file-set2: ["tests/github_actions_test_ubuntu_set2.jsonc", "tests/github_actions_test_macos_set2.jsonc"]
json-file-set3: ["tests/github_actions_test_ubuntu_set3.jsonc", "tests/github_actions_test_macos_set3.jsonc"]
Expand Down
Empty file added __init__.py
Empty file.
32 changes: 30 additions & 2 deletions data/fieldlist_NCAR.jsonc → data/fieldlist_CESM.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
// Source: https://www.cesm.ucar.edu/models/cesm2/atmosphere/docs/ug6/hist_flds_f2000.html
// CF variables not on that list are commented out
{
"name" : "NCAR",
"name" : "CESM",
"models": ["CAM4", "CESM2", "CESM"], // others?
"coords" : {
// only used for taking slices, unit conversion
"lon": {"axis": "X", "standard_name": "longitude", "units": "degrees_east"},
"lat": {"axis": "Y", "standard_name": "latitude", "units": "degrees_north"},
"TLONG": {"axis": "X", "standard_name": "array of t-grid longitudes", "units": "degrees_east"},
"TLAT": {"axis": "Y", "standard_name": "array of t-grid latitudes", "units": "degrees_north"},

"plev": {
"standard_name": "air_pressure",
"units": "hPa",
Expand Down Expand Up @@ -48,80 +49,94 @@
"variables" : {
"U": {
"standard_name": "eastward_wind",
"realm": "atmos",
"units": "m s-1",
"scalar_coord_templates": {"plev": "U{value}"},
"ndim": 4
},
"V": {
"standard_name": "northward_wind",
"realm":"atmos",
"units": "m s-1",
"scalar_coord_templates": {"plev": "V{value}"},
"ndim": 4
},
"Z3": {
"standard_name": "geopotential_height",
"units": "m",
"realm": "atmos",
// note: 4d name is 'Z3' but Z500 = height at 500 mb, etc.
"scalar_coord_templates": {"plev": "Z{value}"},
"ndim": 4
},
"Z500": {
"standard_name": "geopotential_height_500mb",
"realm": "atmos",
"units": "m",
// note: 4d name is 'Z3' but Z500 = height at 500 mb, etc.
"ndim": 3
},
"Q": {
"standard_name": "specific_humidity",
"realm": "atmos",
"units": "1",
"ndim": 4
},
"OMEGA": {
"standard_name": "lagrangian_tendency_of_air_pressure",
"realm": "atmos",
"units": "Pa s-1",
"scalar_coord_templates": {"plev": "OMEGA{value}"},
"ndim": 4
},
"TS": {
"standard_name": "surface_temperature",
"realm": "atmos",
"units": "K",
"ndim": 3
},
"PS": {
"standard_name": "surface_air_pressure",
"realm": "atmos",
// note: not hPa
"units": "Pa",
"ndim": 3
},
"PRECT": {
"standard_name": "precipitation_rate",
"realm": "atmos",
"units": "m s-1",
"ndim": 3
},
"PRECC": {
"standard_name": "convective_precipitation_rate",
"realm": "atmos",
"units": "m s-1",
"ndim": 3
},
"TREFHT" : {
// correct name? CMIP6 equivalent should be tas, temp at 2m ref height
"standard_name": "air_temperature",
"realm": "atmos",
"units": "K",
"ndim": 3,
"modifier": "atmos_height"
},
"TAUX": {
"standard_name": "surface_downward_eastward_stress",
"realm": "atmos",
"units": "Pa",
"ndim": 3
},
"TAUY": {
"standard_name": "surface_downward_northward_stress",
"realm": "atmos",
"units": "Pa",
"ndim": 3
},
"PSL": {
"standard_name": "air_pressure_at_mean_sea_level",
"realm": "atmos",
"units": "Pa",
"ndim": 3
},
Expand Down Expand Up @@ -149,21 +164,25 @@
"FLUS": {
// correct name? Guessed according to pattern -- no FLUS, only the net combination?
"standard_name": "surface_upwelling_longwave_flux_in_air",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
"FLDS": {
"standard_name": "surface_downwelling_longwave_flux_in_air",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
"FLUT": {
"standard_name": "toa_outgoing_longwave_flux",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
"FLNT": {
"standard_name": "net_upward_longwave_flux",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
Expand Down Expand Up @@ -229,32 +248,37 @@
},
"SHFLX": {
"standard_name": "surface_upward_sensible_heat_flux",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
"LHFLX": {
"standard_name": "surface_upward_latent_heat_flux",
"realm": "atmos",
"units": "W m-2",
"ndim": 3
},
"zos": {
"standard_name": "sea_surface_height_above_geoid",
"realm": "ocean",
"units": "m",
"ndim": 3
},
"tauuo": {
"standard_name": "surface_downward_x_stress",
"realm": "ocean",
"units": "N m-2",
"ndim": 3
},
"tauvo": {
"standard_name": "surface_downward_y_stress",
"realm": "ocean",
"units": "N m-2",
"ndim": 3
},
"areacello": {
"standard_name": "cell_area",
"modifier": "ocean_realm",
"realm": "ocean",
"units": "m2",
"ndim": 2
},
Expand All @@ -281,25 +305,29 @@
// },
"THETAL": {
"standard_name": "sea_water_potential_temperature",
"realm": "ocean",
"units": "K",
"ndim": 4
},
"SST": {
"standard_name": "Potential Temperature",
"realm": "ocean",
"units": "degC",
"ndim": 4
},
// Variables for Convective Transition Diagnostics module:
// ta: 3D temperature, units = K:
"T": {
"standard_name": "air_temperature",
"realm": "atmos",
"units": "K",
"ndim": 4
},
// prw: Column Water Vapor (precipitable water vapor), units = mm (or kg/m^2)
"prw": {
// check name: is this column integrated?
"standard_name": "atmosphere_mass_content_of_water_vapor",
"realm": "atmos",
"units": "kg m-2",
"ndim": 3
}
Expand Down
Loading

0 comments on commit ea5d840

Please sign in to comment.