From fb9c0b23bcb3706fb2bbccebae8b764ccbec87db Mon Sep 17 00:00:00 2001 From: Jacob Mims <122570226+jtmims@users.noreply.github.com> Date: Fri, 1 Nov 2024 15:25:05 -0500 Subject: [PATCH] add variable table tool and put output into docs (#706) * add variable table script to docs * move file * Delete tools/get_POD_varname/MDTF_Variable_Lists.html --- doc/sphinx/MDTF_Variable_Lists.html | 2694 ++++++++++++++++++++++ doc/sphinx/ref_toc.rst | 1 + doc/sphinx/ref_vartable.rst | 7 + tools/get_POD_varname/get_POD_varname.py | 167 ++ 4 files changed, 2869 insertions(+) create mode 100644 doc/sphinx/MDTF_Variable_Lists.html create mode 100644 doc/sphinx/ref_vartable.rst create mode 100644 tools/get_POD_varname/get_POD_varname.py diff --git a/doc/sphinx/MDTF_Variable_Lists.html b/doc/sphinx/MDTF_Variable_Lists.html new file mode 100644 index 000000000..bfce018a3 --- /dev/null +++ b/doc/sphinx/MDTF_Variable_Lists.html @@ -0,0 +1,2694 @@ + + + + + + + MDTF PODs Variable Lists (Tables For Individual POD and Combined All PODs) + + + +

MDTF PODs Variable Lists (Tables For Individual POD and Combined All PODs)

+

Generated at 2024/11/01 15:52:40. For questions, contact Wenhao.Dong@noaa.gov

+ +

POD: ENSO_MSE

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zgmatmostime, lev, lat, lonmongeopotential_heightcesm
uam s-1atmostime, lev, lat, lonmoneastward_windcesm
vam s-1atmostime, lev, lat, lonmonnorthward_windcesm
taKatmostime, lev, lat, lonmonair_temperaturecesm
hus1atmostime, lev, lat, lonmonspecific_humiditycesm
wapPa s-1atmostime, lev, lat, lonmonlagrangian_tendency_of_air_pressurecesm
prkg m-2 s-1atmostime, lat, lonmonprecipitation_fluxcesm
tsKatmostime, lat, lonmonsurface_temperaturecesm
hfssW m-2atmostime, lat, lonmonsurface_upward_sensible_heat_fluxcesm
hflsW m-2atmostime, lat, lonmonsurface_upward_latent_heat_fluxcesm
rsusW m-2atmostime, lat, lonmonsurface_upwelling_shortwave_flux_in_aircesm
rsdsW m-2atmostime, lat, lonmonsurface_downwelling_shortwave_flux_in_aircesm
rsdtW m-2atmostime, lat, lonmontoa_incoming_shortwave_fluxcesm
rsutW m-2atmostime, lat, lonmontoa_outgoing_shortwave_fluxcesm
rlusW m-2atmostime, lat, lonmonsurface_upwelling_longwave_flux_in_aircesm
rldsW m-2atmostime, lat, lonmonsurface_downwelling_longwave_flux_in_aircesm
rlutW m-2atmostime, lat, lonmontoa_outgoing_longwave_fluxcesm
+ +

POD: ENSO_RWS

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zgmatmostime, lev, lat, lonmongeopotential_heightcesm
uam s-1atmostime, lev, lat, lonmoneastward_windcesm
vam s-1atmostime, lev, lat, lonmonnorthward_windcesm
taKatmostime, lev, lat, lonmonair_temperaturecesm
wapPa s-1atmostime, lev, lat, lonmonlagrangian_tendency_of_air_pressurecesm
prkg m-2 s-1atmostime, lat, lonmonprecipitation_fluxcesm
tsKatmostime, lat, lonmonsurface_temperaturecesm
+ +

POD: EOF_500hPa

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zgmatmostime, lat, lonmongeopotential_heightcesm
zg_hybrid_sigmamatmostime, lev, lat, lonmongeopotential_heightcesm
psPaatmostime, lat, lonmonsurface_air_pressurecesm
+ +

POD: MJO_prop_amp

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
prkg m-2 s-1atmostime, lat, londayprecipitation_fluxcesm
prwkg m-2atmostime, lat, londayatmosphere_mass_content_of_water_vaporcesm
hus1atmostime, lev, lat, londayspecific_humiditycesm
+ +

POD: MJO_suite

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
rlutW m-2atmostime, lat, londaytoa_outgoing_longwave_fluxcesm
prm s-1atmostime, lat, londayprecipitation_ratecesm
u200m s-1atmostime, lat, londayeastward_windcesm
u850m s-1atmostime, lat, londayeastward_windcesm
v200m s-1atmostime, lat, londaynorthward_windcesm
v850m s-1atmostime, lat, londaynorthward_windcesm
+ +

POD: MJO_teleconnection

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
rlutW m-2atmostime, lat, londaytoa_outgoing_longwave_fluxcesm
prkg m-2 s-1atmostime, lat, londayprecipitation_fluxcesm
u250m s-1atmostime, lat, londayeastward_windcesm
u850m s-1atmostime, lat, londayeastward_windcesm
z250matmostime, lat, londaygeopotential_heightcesm
+ +

POD: SM_ET_coupling

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
mrsoskg m-2landtime, lat, lonmonmass_content_of_water_in_soil_layercmip
evspsblkg m-2 s-1landtime, lat, lonmonwater_evapotranspiration_fluxcmip
prkg m-2 s-1atmostime, lat, lonmonprecipitation_fluxcmip
+ +

POD: TC_MSE

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
taKatmostime, plev, lat, lon6hrair_temperaturecmip
zgmatmostime, plev, lat, lon6hrgeopotential_heightcmip
hus1atmostime, plev, lat, lon6hrspecific_humiditycmip
hfssW m-2atmostime, lat, lon6hrsurface_upward_sensible_heat_fluxcmip
hflsW m-2atmostime, lat, lon6hrsurface_upward_latent_heat_fluxcmip
rldsW m-2atmostime, lat, lon6hrsurface_downwelling_longwave_flux_in_aircmip
rlusW m-2atmostime, lat, lon6hrsurface_upwelling_longwave_flux_in_aircmip
rlutW m-2atmostime, lat, lon6hrtoa_outgoing_longwave_fluxcmip
rsdsW m-2atmostime, lat, lon6hrsurface_downwelling_shortwave_flux_in_aircmip
rsdtW m-2atmostime, lat, lon6hrtoa_incoming_shortwave_fluxcmip
rsusW m-2atmostime, lat, lon6hrsurface_upwelling_shortwave_flux_in_aircmip
rsutW m-2atmostime, lat, lon6hrtoa_outgoing_shortwave_fluxcmip
+ +

POD: Wheeler_Kiladis

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
rlutW m-2atmostime, lat, londaytoa_outgoing_longwave_fluxcesm
prm s-1atmostime, lat, londayprecipitation_ratecesm
omega500Pa s-1atmostime, lat, londaylagrangian_tendency_of_air_pressurecesm
u200m s-1atmostime, lat, londayeastward_windcesm
u850m s-1atmostime, lat, londayeastward_windcesm
+ +

POD: albedofb

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
areacellam2atmoslat, lonN/Acell_areacmip
tasKatmostime, lat, lonmonair_temperaturecmip
rsdtW m-2atmostime, lat, lonmontoa_incoming_shortwave_fluxcmip
rsdsW m-2atmostime, lat, lonmonsurface_downwelling_shortwave_flux_in_aircmip
rsutW m-2atmostime, lat, lonmontoa_outgoing_shortwave_fluxcmip
rsusW m-2atmostime, lat, lonmonsurface_upwelling_shortwave_flux_in_aircmip
+ +

POD: blocking_neale

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zgmatmostime, lat, londaygeopotential_heightcesm
+ +

POD: convective_transition_diag

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
prkg m-2 s-1atmostime, lat, lon1hrprecipitation_fluxcmip
prwkg m-2atmostime, lat, lon1hratmosphere_mass_content_of_water_vaporcmip
taveKatmostime, lat, lon1hrmass_weighted_column_average_temperaturecmip
qsat_intkg m-2atmostime, lat, lon1hrcolumn_integrated_saturation_humiditycmip
taKatmostime, lev, lat, lon1hrair_temperaturecmip
+ +

POD: eulerian_storm_track

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
v850m s-1atmostime, lat, lon6hrnorthward_windcmip
+ +

POD: example

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tasKatmostime, lat, londayair_temperaturecmip
+ +

POD: example_multicase

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tasKatmostime, lat, londayair_temperaturecmip
+ +

POD: example_notebook

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tasKatmostime, lat, londayair_temperaturecmip
+ +

POD: forcing_feedback

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tsKN/Atime, lat, lonmonsurface_temperaturecmip
taKN/Atime, plev, lat, lonmonair_temperaturecmip
hus1N/Atime, plev, lat, lonmonspecific_humiditycmip
rsusW m-2N/Atime, lat, lonmonsurface_upwelling_shortwave_flux_in_aircmip
rsuscsW m-2N/Atime, lat, lonmonsurface_upwelling_shortwave_flux_in_air_assuming_clear_skycmip
rsdsW m-2N/Atime, lat, lonmonsurface_downwelling_shortwave_flux_in_aircmip
rsdscsW m-2N/Atime, lat, lonmonsurface_downwelling_shortwave_flux_in_air_assuming_clear_skycmip
rsdtW m-2N/Atime, lat, lonmontoa_incoming_shortwave_fluxcmip
rsutW m-2N/Atime, lat, lonmontoa_outgoing_shortwave_fluxcmip
rsutcsW m-2N/Atime, lat, lonmontoa_outgoing_shortwave_flux_assuming_clear_skycmip
rlutW m-2N/Atime, lat, lonmontoa_outgoing_longwave_fluxcmip
rlutcsW m-2N/Atime, lat, lonmontoa_outgoing_longwave_flux_assuming_clear_skycmip
+ +

POD: mixed_layer_depth

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
sopsuoceantime, lev, lat, lonmonsea_water_salinitycmip
thetaodegCoceantime, lev, lat, lonmonsea_water_potential_temperaturecmip
+ +

POD: ocn_surf_flux_diag

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tsKatmostime, lat, londaysurface_temperaturecmip
pslPaatmostime, lat, londayair_pressure_at_mean_sea_levelcmip
sfcWindm s-1atmostime, lat, londaywind_speedcmip
huss1atmostime, lat, londayspecific_humiditycmip
hflsW m-2atmostime, lat, londaysurface_upward_latent_heat_fluxcmip
prkg m-2 s-1atmostime, lat, londayprecipitation_fluxcmip
+ +

POD: precip_buoy_diag

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
prkg m-2 s-1atmostime, lat, lonN/Aprecipitation_fluxcmip
taKatmostime, lev, lat, lonN/Aair_temperaturecmip
qakg/kgatmostime, lev, lat, lonN/Aspecific_humiditycmip
psPaatmostime, lat, lonN/Asurface_air_pressurecmip
+ +

POD: precip_diurnal_cycle

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
prkg m-2 s-1atmostime, lat, lon3hrprecipitation_fluxcmip
+ +

POD: seaice_suite

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
siconc%seaIcetime, lat, lonmonsea_ice_area_fractioncmip
+ +

POD: stc_annular_modes

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zgmatmostime, lev, latdaygeopotential_heightcmip
+ +

POD: stc_eddy_heat_fluxes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
v100m s-1atmostime, lat, lonmonnorthward_windcmip
t100Katmostime, lat, lonmonair_temperaturecmip
t50Katmostime, lat, lonmonair_temperaturecmip
vam s-1atmostime, lev, lat, lonmonnorthward_windcmip
taKatmostime, lev, lat, lonmonair_temperaturecmip
zgmatmostime, lev, lat, lonmongeopotential_heightcmip
+ +

POD: stc_ozone

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
uam s-1atmostime, lev, lat, lonmoneastward_windcmip
taKatmostime, lev, lat, lonmonair_temperaturecmip
o3mol mol-1aerosoltime, lev, lat, lonmonmole_fraction_of_ozone_in_aircmip
+ +

POD: stc_qbo_enso

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tosdegCoceantime, lat, lonmonsea_surface_temperatureN/A
uam s-1atmostime, lev, lat, lonmoneastward_windN/A
vam s-1atmostime, lev, lat, lonmonnorthward_windN/A
taKatmostime, lev, lat, lonmonair_temperatureN/A
pslPaatmostime, lat, lonmonair_pressure_at_mean_sea_levelN/A
+ +

POD: stc_spv_extremes

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
uam s-1N/Atime, plev, latdayeastward_windN/A
zgmN/Atime, plev, latdaygeopotential_heightN/A
zg500mN/Atime, lat, londaygeopotential_heightN/A
tasKN/Atime, lat, londayair_temperatureN/A
+ +

POD: stc_vert_wave_coupling

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
va50m s-1atmostime, lat, londaynorthward_windcmip
ta50Katmostime, lat, londayair_temperaturecmip
zg10matmostime, lat, londaygeopotential_heightcmip
zg500matmostime, lat, londaygeopotential_heightcmip
+ +

POD: temp_extremes_distshape

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
tasKatmostime, lat, londayair_temperaturecmip
zgmatmostime, lat, londaygeopotential_heightcmip
pslPaatmostime, lat, londayair_pressure_at_mean_sea_levelcmip
+ +

POD: top_heaviness_metric

+
+ + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
omegaPa s-1atmoslev, lat, lonmonlagrangian_tendency_of_air_pressurecmip
+ +

POD: tropical_pacific_sea_level

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameConvention
zosmoceantime, lat, lonmonsea_surface_height_above_geoidcmip
tauuoN m-2oceantime, lat, lonmondownward_x_stress_at_sea_water_surfacecmip
tauvoN m-2oceantime, lat, lonmondownward_y_stress_at_sea_water_surfacecmip
areacellom2oceanlat, lonmoncell_areacmip
+ +

All PODs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableUnitsRealmDimensionsFrequencyStandard NameUsed by
areacellam2atmoslat, lonN/Acell_areaalbedofb
areacellom2oceanlat, lonmoncell_areatropical_pacific_sea_level
evspsblkg m-2 s-1landtime, lat, lonmonwater_evapotranspiration_fluxSM_ET_coupling
hflsW m-2atmostime, lat, lon6hrsurface_upward_latent_heat_fluxTC_MSE
hflsW m-2atmostime, lat, londaysurface_upward_latent_heat_fluxocn_surf_flux_diag
hflsW m-2atmostime, lat, lonmonsurface_upward_latent_heat_fluxENSO_MSE
hfssW m-2atmostime, lat, lon6hrsurface_upward_sensible_heat_fluxTC_MSE
hfssW m-2atmostime, lat, lonmonsurface_upward_sensible_heat_fluxENSO_MSE
hus1N/Atime, plev, lat, lonmonspecific_humidityforcing_feedback
hus1atmostime, lev, lat, londayspecific_humidityMJO_prop_amp
hus1atmostime, lev, lat, lonmonspecific_humidityENSO_MSE
hus1atmostime, plev, lat, lon6hrspecific_humidityTC_MSE
huss1atmostime, lat, londayspecific_humidityocn_surf_flux_diag
mrsoskg m-2landtime, lat, lonmonmass_content_of_water_in_soil_layerSM_ET_coupling
o3mol mol-1aerosoltime, lev, lat, lonmonmole_fraction_of_ozone_in_airstc_ozone
omegaPa s-1atmoslev, lat, lonmonlagrangian_tendency_of_air_pressuretop_heaviness_metric
omega500Pa s-1atmostime, lat, londaylagrangian_tendency_of_air_pressureWheeler_Kiladis
prkg m-2 s-1atmostime, lat, lon1hrprecipitation_fluxconvective_transition_diag
prkg m-2 s-1atmostime, lat, lon3hrprecipitation_fluxprecip_diurnal_cycle
prkg m-2 s-1atmostime, lat, lonN/Aprecipitation_fluxprecip_buoy_diag
prkg m-2 s-1atmostime, lat, londayprecipitation_fluxMJO_prop_amp, MJO_teleconnection, ocn_surf_flux_diag
prkg m-2 s-1atmostime, lat, lonmonprecipitation_fluxENSO_MSE, ENSO_RWS, SM_ET_coupling
prm s-1atmostime, lat, londayprecipitation_rateMJO_suite, Wheeler_Kiladis
prwkg m-2atmostime, lat, lon1hratmosphere_mass_content_of_water_vaporconvective_transition_diag
prwkg m-2atmostime, lat, londayatmosphere_mass_content_of_water_vaporMJO_prop_amp
psPaatmostime, lat, lonN/Asurface_air_pressureprecip_buoy_diag
psPaatmostime, lat, lonmonsurface_air_pressureEOF_500hPa
pslPaatmostime, lat, londayair_pressure_at_mean_sea_levelocn_surf_flux_diag, temp_extremes_distshape
pslPaatmostime, lat, lonmonair_pressure_at_mean_sea_levelstc_qbo_enso
qakg/kgatmostime, lev, lat, lonN/Aspecific_humidityprecip_buoy_diag
qsat_intkg m-2atmostime, lat, lon1hrcolumn_integrated_saturation_humidityconvective_transition_diag
rldsW m-2atmostime, lat, lon6hrsurface_downwelling_longwave_flux_in_airTC_MSE
rldsW m-2atmostime, lat, lonmonsurface_downwelling_longwave_flux_in_airENSO_MSE
rlusW m-2atmostime, lat, lon6hrsurface_upwelling_longwave_flux_in_airTC_MSE
rlusW m-2atmostime, lat, lonmonsurface_upwelling_longwave_flux_in_airENSO_MSE
rlutW m-2N/Atime, lat, lonmontoa_outgoing_longwave_fluxforcing_feedback
rlutW m-2atmostime, lat, lon6hrtoa_outgoing_longwave_fluxTC_MSE
rlutW m-2atmostime, lat, londaytoa_outgoing_longwave_fluxMJO_suite, MJO_teleconnection, Wheeler_Kiladis
rlutW m-2atmostime, lat, lonmontoa_outgoing_longwave_fluxENSO_MSE
rlutcsW m-2N/Atime, lat, lonmontoa_outgoing_longwave_flux_assuming_clear_skyforcing_feedback
rsdsW m-2N/Atime, lat, lonmonsurface_downwelling_shortwave_flux_in_airforcing_feedback
rsdsW m-2atmostime, lat, lon6hrsurface_downwelling_shortwave_flux_in_airTC_MSE
rsdsW m-2atmostime, lat, lonmonsurface_downwelling_shortwave_flux_in_airENSO_MSE, albedofb
rsdscsW m-2N/Atime, lat, lonmonsurface_downwelling_shortwave_flux_in_air_assuming_clear_skyforcing_feedback
rsdtW m-2N/Atime, lat, lonmontoa_incoming_shortwave_fluxforcing_feedback
rsdtW m-2atmostime, lat, lon6hrtoa_incoming_shortwave_fluxTC_MSE
rsdtW m-2atmostime, lat, lonmontoa_incoming_shortwave_fluxENSO_MSE, albedofb
rsusW m-2N/Atime, lat, lonmonsurface_upwelling_shortwave_flux_in_airforcing_feedback
rsusW m-2atmostime, lat, lon6hrsurface_upwelling_shortwave_flux_in_airTC_MSE
rsusW m-2atmostime, lat, lonmonsurface_upwelling_shortwave_flux_in_airENSO_MSE, albedofb
rsuscsW m-2N/Atime, lat, lonmonsurface_upwelling_shortwave_flux_in_air_assuming_clear_skyforcing_feedback
rsutW m-2N/Atime, lat, lonmontoa_outgoing_shortwave_fluxforcing_feedback
rsutW m-2atmostime, lat, lon6hrtoa_outgoing_shortwave_fluxTC_MSE
rsutW m-2atmostime, lat, lonmontoa_outgoing_shortwave_fluxENSO_MSE, albedofb
rsutcsW m-2N/Atime, lat, lonmontoa_outgoing_shortwave_flux_assuming_clear_skyforcing_feedback
sfcWindm s-1atmostime, lat, londaywind_speedocn_surf_flux_diag
siconc%seaIcetime, lat, lonmonsea_ice_area_fractionseaice_suite
sopsuoceantime, lev, lat, lonmonsea_water_salinitymixed_layer_depth
t100Katmostime, lat, lonmonair_temperaturestc_eddy_heat_fluxes
t50Katmostime, lat, lonmonair_temperaturestc_eddy_heat_fluxes
taKN/Atime, plev, lat, lonmonair_temperatureforcing_feedback
taKatmostime, lev, lat, lon1hrair_temperatureconvective_transition_diag
taKatmostime, lev, lat, lonN/Aair_temperatureprecip_buoy_diag
taKatmostime, lev, lat, lonmonair_temperatureENSO_MSE, ENSO_RWS, stc_eddy_heat_fluxes, stc_ozone, stc_qbo_enso
taKatmostime, plev, lat, lon6hrair_temperatureTC_MSE
ta50Katmostime, lat, londayair_temperaturestc_vert_wave_coupling
tasKN/Atime, lat, londayair_temperaturestc_spv_extremes
tasKatmostime, lat, londayair_temperatureexample, example_multicase, example_notebook, temp_extremes_distshape
tasKatmostime, lat, lonmonair_temperaturealbedofb
tauuoN m-2oceantime, lat, lonmondownward_x_stress_at_sea_water_surfacetropical_pacific_sea_level
tauvoN m-2oceantime, lat, lonmondownward_y_stress_at_sea_water_surfacetropical_pacific_sea_level
taveKatmostime, lat, lon1hrmass_weighted_column_average_temperatureconvective_transition_diag
thetaodegCoceantime, lev, lat, lonmonsea_water_potential_temperaturemixed_layer_depth
tosdegCoceantime, lat, lonmonsea_surface_temperaturestc_qbo_enso
tsKN/Atime, lat, lonmonsurface_temperatureforcing_feedback
tsKatmostime, lat, londaysurface_temperatureocn_surf_flux_diag
tsKatmostime, lat, lonmonsurface_temperatureENSO_MSE, ENSO_RWS
u200m s-1atmostime, lat, londayeastward_windMJO_suite, Wheeler_Kiladis
u250m s-1atmostime, lat, londayeastward_windMJO_teleconnection
u850m s-1atmostime, lat, londayeastward_windMJO_suite, MJO_teleconnection, Wheeler_Kiladis
uam s-1N/Atime, plev, latdayeastward_windstc_spv_extremes
uam s-1atmostime, lev, lat, lonmoneastward_windENSO_MSE, ENSO_RWS, stc_ozone, stc_qbo_enso
v100m s-1atmostime, lat, lonmonnorthward_windstc_eddy_heat_fluxes
v200m s-1atmostime, lat, londaynorthward_windMJO_suite
v850m s-1atmostime, lat, lon6hrnorthward_windeulerian_storm_track
v850m s-1atmostime, lat, londaynorthward_windMJO_suite
vam s-1atmostime, lev, lat, lonmonnorthward_windENSO_MSE, ENSO_RWS, stc_eddy_heat_fluxes, stc_qbo_enso
va50m s-1atmostime, lat, londaynorthward_windstc_vert_wave_coupling
wapPa s-1atmostime, lev, lat, lonmonlagrangian_tendency_of_air_pressureENSO_MSE, ENSO_RWS
z250matmostime, lat, londaygeopotential_heightMJO_teleconnection
zgmN/Atime, plev, latdaygeopotential_heightstc_spv_extremes
zgmatmostime, lat, londaygeopotential_heightblocking_neale, temp_extremes_distshape
zgmatmostime, lat, lonmongeopotential_heightEOF_500hPa
zgmatmostime, lev, latdaygeopotential_heightstc_annular_modes
zgmatmostime, lev, lat, lonmongeopotential_heightENSO_MSE, ENSO_RWS, stc_eddy_heat_fluxes
zgmatmostime, plev, lat, lon6hrgeopotential_heightTC_MSE
zg10matmostime, lat, londaygeopotential_heightstc_vert_wave_coupling
zg500mN/Atime, lat, londaygeopotential_heightstc_spv_extremes
zg500matmostime, lat, londaygeopotential_heightstc_vert_wave_coupling
zg_hybrid_sigmamatmostime, lev, lat, lonmongeopotential_heightEOF_500hPa
zosmoceantime, lat, lonmonsea_surface_height_above_geoidtropical_pacific_sea_level
+ + + \ No newline at end of file diff --git a/doc/sphinx/ref_toc.rst b/doc/sphinx/ref_toc.rst index eea25a836..25eab94f6 100644 --- a/doc/sphinx/ref_toc.rst +++ b/doc/sphinx/ref_toc.rst @@ -12,3 +12,4 @@ Framework reference ref_output ref_submodules ref_container + ref_vartable diff --git a/doc/sphinx/ref_vartable.rst b/doc/sphinx/ref_vartable.rst new file mode 100644 index 000000000..c2b524ec7 --- /dev/null +++ b/doc/sphinx/ref_vartable.rst @@ -0,0 +1,7 @@ +.. _ref-vartable + +List of Variables for each POD +============================== + +.. raw:: html + :file: MDTF_Variable_Lists.html diff --git a/tools/get_POD_varname/get_POD_varname.py b/tools/get_POD_varname/get_POD_varname.py new file mode 100644 index 000000000..49835e2be --- /dev/null +++ b/tools/get_POD_varname/get_POD_varname.py @@ -0,0 +1,167 @@ +import json +import pandas as pd +import os +import requests +import re +from datetime import datetime +from jinja2 import Template + +base_url = "https://github.com/NOAA-GFDL/MDTF-diagnostics/blob/main/diagnostics" +api_url = "https://api.github.com/repos/NOAA-GFDL/MDTF-diagnostics/contents/diagnostics" + +#edit if you would like to save csv for each POD +save_csv = False + +def good_status(code): + # 2xx is a positive completion return code + if str(code)[0] == '2': + return True + else: + return False + +def get_json_content(url): + response = requests.get(url) + if good_status(response.status_code): + try: + raw_url = url.replace('github.com', 'raw.githubusercontent.com').replace('/blob', '') + response = requests.get(raw_url) + if good_status(response.status_code): + # Remove comments from JSONC content, this part is important otherwise the attributes could not be extracted correctly + jsonc_content = response.text + json_content = re.sub(r'//.*?\n|/\*.*?\*/', '', jsonc_content, flags=re.S) + json_content = re.sub(r',\s*([}\]])', r'\1', json_content) + return json.loads(json_content) + else: + print(f"Cannot get content from URL: {raw_url}, Status code: {response.status_code}") + return None + except json.JSONDecodeError: + print(f"Error decoding JSON from URL: {url}") + return None + else: + print(f"Failure in function get_json_content()!") + return None + +def get_folders_via_api(): + response = requests.get(api_url) + if good_status(response.status_code): + data = response.json() + folders = [item['name'] for item in data if item['type'] == 'dir'] + return folders + else: + print(f"Failure in function get_folders_via_api()!") + return [] + +def process_settings_jsonc(folder_name, json_content): + frequency = json_content.get("data", {}).get("frequency", "N/A") + convention = json_content.get("settings", {}).get("convention", "N/A") + # Extract varlist + df_data = [] + for var, attributes in json_content.get("varlist", {}).items(): + if frequency == 'N/A' and 'frequency' in attributes: + frequency = attributes.get("frequency", "N/A") + df_data.append([ + var, + attributes.get("units", "N/A"), + attributes.get("realm", "N/A"), + ', '.join(attributes.get("dimensions", [])), + frequency, + attributes.get("standard_name", "N/A"), + convention + ]) + + # move the freq before standard name + columns = ["Variable", "Units", "Realm", "Dimensions", "Frequency", "Standard Name", "Convention"] + df = pd.DataFrame(df_data, columns=columns) + + if save_csv: + # Save the file in case we want to make use of it to modity the XML files later + csv_filename = f"{folder_name}_varlist.csv" + df.to_csv(csv_filename, index=False) + + return df + +# Two ways to get the folder names, one is automatic search (cons: may include those example PODs and some incomplete PODs), one is to add manully +folders = get_folders_via_api() + +# Check if folders were found +if not folders: + print("-----------------------------------------------------------------") + print("No folders found under the diagnostics directory. Please check!!!") + print("-----------------------------------------------------------------") +else: + # Get the time + current_time = datetime.now().strftime("%Y/%m/%d %H:%M:%S") + # Initialize HTML + html_template = Template(""" + + + + + + MDTF PODs Variable Lists (Tables For Individual POD and Combined All PODs) + + + +

MDTF PODs Variable Lists (Tables For Individual POD and Combined All PODs)

+

Generated at {{ current_time }}. For questions, contact Wenhao.Dong@noaa.gov

+ {% for folder_name, table_html in tables.items() %} +

POD: {{ folder_name }}

+
{{ table_html | safe }}
+ {% endfor %} +

All PODs

+
{{ all_pods_table | safe }}
+ + + """) + + # Loop through each POD and generate tables + tables = {} + all_data = [] + for folder in folders: + settings_url = f"{base_url}/{folder}/settings.jsonc" + json_content = get_json_content(settings_url) + if json_content: + df = process_settings_jsonc(folder, json_content) + tables[folder] = df.to_html(classes='table table-striped', index=False) + df['Used by'] = folder # Add 'Used by' column only for the combined table + all_data.append(df) + else: + print(f"No settings.jsonc found for folder: {folder}") + + # Merge the data for all PODs + if all_data: + all_pods_df = pd.concat(all_data) + all_pods_df = all_pods_df.groupby(["Variable", "Units", "Realm", "Dimensions", "Frequency", "Standard Name"])['Used by'].apply(lambda x: ', '.join(sorted(set(x)))).reset_index() + columns = ["Variable", "Units", "Realm", "Dimensions", "Frequency", "Standard Name", "Used by"] + all_pods_df = all_pods_df[columns] + all_pods_table = all_pods_df.to_html(classes='table table-striped', index=False) + + else: + all_pods_table = "

No single data available

" + + html_content = html_template.render(tables=tables, all_pods_table=all_pods_table, current_time=current_time) + with open("MDTF_Variable_Lists.html", "w") as f: + f.write(html_content) + + print("\nHTML file 'MDTF_Variable_Lists.html'") + print("Well Done!!!")