Skip to content

Commit

Permalink
Cesm cat builder (#726)
Browse files Browse the repository at this point in the history
* move call_build function to base class and define a class parser attribute that is modified for each child class at initialization

* move parsers and json utilities to a separate module

* refine gfdl parsers

* add function to get metadata from file attributes

* add debugging statements to catalog_builder
make reference dict definition a function
refine the catalog population procedure
need to define time_range

* fix cesm parser frequency def
add procedure to generate time_range to parsers
add procedure to fix units in catalog

* add entries to CESM and GFDL fieldlists

* clean up cesm parser
include file name parts in cesm parser frequency search

* clean up print statements
  • Loading branch information
wrongkindofdoctor authored Dec 27, 2024
1 parent d72c518 commit d61a0d3
Show file tree
Hide file tree
Showing 4 changed files with 424 additions and 350 deletions.
92 changes: 88 additions & 4 deletions data/fieldlist_CESM.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,26 @@
},
"lev": {
"standard_name": "atmosphere_hybrid_sigma_pressure_coordinate",
"units": "level", // equivalent to '1'
"units": "level",
// equivalent to '1'
"positive": "down",
"axis": "Z"
},
"hyam": {
"standard_name": "hybrid A coefficient at layer midpoints",
"long_name": "hybrid A coefficient at layer midpoints",
"units": "1",
"axis": "Z"

},
"hybm": {
"standard_name": "hybrid B coefficient at layer midpoints",
"long_name": "hybrid B coefficient at layer midpoints",
"units": "1",
"axis": "Z"
},
"z_t": {
"standard_name": "depth from surface to midpoint of layer",
"standard_name": "depth_from_surface_to_midpoint_of_layer",
"units": "centimeters",
"positive": "down",
"axis": "Z"
Expand All @@ -61,13 +75,55 @@
"scalar_coord_templates": {"plev": "U{value}"},
"ndim": 4
},
"U250": {
"standard_name": "eastward_wind",
"long_name": "Zonal wind at 250 mbar pressure surface",
"realm": "atmos",
"units": "m s-1",
"ndim": 3
},
"U200": {
"standard_name": "eastward_wind",
"long_name": "Zonal wind at 200 mbar pressure surface",
"realm": "atmos",
"units": "m s-1",
"ndim": 3
},
"U850": {
"standard_name": "eastward_wind",
"long_name": "Zonal wind at 850 mbar pressure surface",
"realm": "atmos",
"units": "m s-1",
"ndim": 3
},
"V": {
"standard_name": "northward_wind",
"realm":"atmos",
"units": "m s-1",
"scalar_coord_templates": {"plev": "V{value}"},
"ndim": 4
},
"V250": {
"standard_name": "northward_wind",
"long_name": "Meridional wind at 250 mbar pressure surface",
"realm":"atmos",
"units": "m s-1",
"ndim": 3
},
"V200": {
"standard_name": "northward_wind",
"long_name": "Meridional wind at 200 mbar pressure surface",
"realm":"atmos",
"units": "m s-1",
"ndim": 3
},
"V850": {
"standard_name": "northward_wind",
"long_name": "Meridional wind at 850 mbar pressure surface",
"realm":"atmos",
"units": "m s-1",
"ndim": 3
},
"Z3": {
"standard_name": "geopotential_height",
"units": "m",
Expand All @@ -78,10 +134,23 @@
},
"Z500": {
"standard_name": "geopotential_height",
"long_name": "geopotential height at 500 hPa",
"long_name": "geopotential height at 500 mbar pressure surface",
"realm": "atmos",
"units": "m",
"ndim": 3
},
"Z850": {
"standard_name": "geopotential_height",
"long_name": "geopotential height at 850 mbar pressure surface",
"realm": "atmos",
"units": "m",
"ndim": 3
},
"Z250": {
"standard_name": "geopotential_height",
"long_name": "geopotential height at 250 mbar pressure surface",
"realm": "atmos",
"units": "m",
// note: 4d name is 'Z3' but Z500 = height at 500 mb, etc.
"ndim": 3
},
"Q": {
Expand All @@ -96,6 +165,13 @@
"units": "Pa s-1",
"scalar_coord_templates": {"plev": "OMEGA{value}"},
"ndim": 4
},
"OMEGA500": {
"standard_name": "lagrangian_tendency_of_air_pressure",
"long_name": "Vertical velocity at 500 mbar pressure surface",
"realm": "atmos",
"units": "Pa s-1",
"ndim": 3
},
"TS": {
"standard_name": "surface_temperature",
Expand Down Expand Up @@ -349,6 +425,13 @@
"realm": "atmos",
"units": "K",
"ndim": 4
},
"T250": {
"standard_name": "air_temperature",
"long_name": "air temperature at 250 mbar pressure surface",
"realm": "atmos",
"units": "K",
"ndim": 3
},
// prw: Column Water Vapor (precipitable water vapor), units = mm (or kg/m^2)
"prw": {
Expand All @@ -358,6 +441,7 @@
"units": "kg m-2",
"ndim": 3
}

// Variables for SM_ET_coupling module
// "mrsos": {
// "standard_name": "mass_content_of_water_in_soil_layer",
Expand Down
4 changes: 2 additions & 2 deletions data/fieldlist_GFDL.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,14 @@
"ndim": 3
},
"zg500": {
"standard_name": "",
"standard_name": "geopotential_height",
"long_name": "Geopotential Height at 500 hPa",
"realm": "atmos",
"units": "m",
"ndim": 3
},
"zg": {
"standard_name": "",
"standard_name": "geopotential_heihgt",
"long_name": "Geopotential Height",
"realm": "atmos",
"units": "m",
Expand Down
Loading

0 comments on commit d61a0d3

Please sign in to comment.