Skip to content

Commit 158d037

Browse files
committed
Add shortwave radiation parameters
1 parent 000be2d commit 158d037

File tree

1 file changed

+183
-0
lines changed

1 file changed

+183
-0
lines changed

gribberish/src/templates/product/parameters/meteorological.rs

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ pub enum MomentumProduct {
163163
VComponentWindSpeed = 3,
164164
#[abbrev = "RELV"]
165165
#[unit = "s-1"]
166+
ShortWaveRadiation = 4,
167+
#[abbrev = "SWRD"]
168+
#[unit = "Wm-2"]
166169
RelativeVorticity = 12,
167170
#[description = "Maximum wind speed"]
168171
#[abbrev = "MAXGUST"]
@@ -237,6 +240,184 @@ pub enum CloudProduct {
237240
Missing = 255,
238241
}
239242

243+
#[repr(u8)]
244+
#[derive(Eq, PartialEq, Debug, DisplayDescription, FromValue, ToParameter)]
245+
pub enum ShortWaveRadiationProduct {
246+
#[description = "net shortwave radiation flux surface"]
247+
#[abbrev = "nswrs"]
248+
#[unit = "Wm-2"]
249+
NetShortwaveRadiationFluxSurface = 0,
250+
#[description = "net shortwave radiation flux top of atmosphere"]
251+
#[abbrev = "nswrt"]
252+
#[unit = "Wm-2"]
253+
NetShortwaveRadiationFluxTop = 1,
254+
#[description = "shortwave radiation flux"]
255+
#[abbrev = "swavr"]
256+
#[unit = "Wm-2"]
257+
ShortwaveRadiationFlux = 2,
258+
#[description = "global radiation flux"]
259+
#[abbrev = "grad"]
260+
#[unit = "Wm-2"]
261+
GlobalRadiationFlux = 3,
262+
#[description = "brightness temperature"]
263+
#[abbrev = "brtmp"]
264+
#[unit = "K"]
265+
BrightnessTemperature = 4,
266+
#[description = "radiance with respect to wave number"]
267+
#[abbrev = "lwrad"]
268+
#[unit = "Wm-1sr-1"]
269+
RadianceFromWaveNumber = 5,
270+
#[description = "radiance with respect to wavelength"]
271+
#[abbrev = "swrad"]
272+
#[unit = "Wm-3sr-1"]
273+
RadianceFromWavelength = 6,
274+
#[description = "downward shortwave radiation flux"]
275+
#[abbrev = "dswrf"]
276+
#[unit = "Wm-2"]
277+
DownwardShortwaveRadiationFlux = 7,
278+
#[description = "upward shortwave radiation flux"]
279+
#[abbrev = "uswrf"]
280+
#[unit = "Wm-2"]
281+
UpwardShortwaveRadiationFlux = 8,
282+
#[description = "net short wave radiation flux"]
283+
#[abbrev = "nswrf"]
284+
#[unit = "Wm-2"]
285+
NetShortWaveRadiationFlux = 9,
286+
#[description = "photosynthetically active radiation"]
287+
#[abbrev = "photar"]
288+
#[unit = "Wm-2"]
289+
PhotosyntheticallyActiveRadiation = 10,
290+
#[description = "net short wave radiation flux, clear sky"]
291+
#[abbrev = "nswrfcs"]
292+
#[unit = "Wm-2"]
293+
NetShortWaveRadiationFluxClearSky = 11,
294+
#[description = "downward uv radiation"]
295+
#[abbrev = "dwuvr"]
296+
#[unit = "Wm-2"]
297+
DownwardUVRadiation = 12,
298+
#[description = "direct short wave radiation flux"]
299+
#[abbrev = "dswrflx"]
300+
#[unit = "Wm-2"]
301+
DirectShortWaveRadiationFlux = 13,
302+
#[description = "diffuse short wave radiation flux"]
303+
#[abbrev = "difswrf"]
304+
#[unit = "Wm-2"]
305+
DiffuseShortWaveRadiationFlux = 14,
306+
#[description = "upward uv radiation emitted/reflected from the earth's surface"]
307+
#[abbrev = "uvvearth"]
308+
#[unit = "Wm-2"]
309+
UpwardUVRadiationEmittedReflectedFromTheEarth = 15,
310+
#[description = "uv index clear sky"]
311+
#[abbrev = "uviucs"]
312+
#[unit = "numeric"]
313+
UVIndexClearSky = 50,
314+
#[description = "uv index"]
315+
#[abbrev = "uvi"]
316+
#[unit = "numeric"]
317+
UVIndex = 51,
318+
#[description = "downward short wave radiation flux clear sky"]
319+
#[abbrev = "dswrfcs"]
320+
#[unit = "Wm-2"]
321+
DownwardShortWaveRadiationFluxClearSky = 52,
322+
#[description = "upward short wave radiation flux clear sky"]
323+
#[abbrev = "uswrfcs"]
324+
#[unit = "Wm-2"]
325+
UpwardShortWaveRadiationFluxClearSky = 53,
326+
#[description = "direct normal short wave radiation flux,"]
327+
#[abbrev = "dnswrflx"]
328+
#[unit = "Wm-2"]
329+
DirectNormalShortWaveRadiationFlux = 54,
330+
#[description = "uv visible albedo for diffuse radiation"]
331+
#[abbrev = "uvalbdif"]
332+
#[unit = "%"]
333+
UVVisibleAlbedoForDiffuseRadiation = 55,
334+
#[description = "uv visible albedo for direct radiation"]
335+
#[abbrev = "uvalbdir"]
336+
#[unit = "%"]
337+
UVVisibleAlbedoForDirectRadiation = 56,
338+
#[description = "uv visible albedo for direct radiation, geometric component"]
339+
#[abbrev = "ubalbdirg"]
340+
#[unit = "%"]
341+
UVVisibleAlbedoForDirectRadiationGeometricComponent = 57,
342+
#[description = "uv visible albedo for direct radiation, isotropic component"]
343+
#[abbrev = "uvalbdiri"]
344+
#[unit = "%"]
345+
UVVisibleAlbedoForDirectRadiationIsotropicComponent = 58,
346+
#[description = "uv visible albedo for direct radiation, volumetric component"]
347+
#[abbrev = "uvbdirv"]
348+
#[unit = "%"]
349+
UVVisibleAlbedoForDirectRadiationVolumetricComponent = 59,
350+
#[description = "photosynthetically active radiation flux, clear sky"]
351+
#[abbrev = "phoarfcs"]
352+
#[unit = "Wm-2"]
353+
PhotosyntheticallyActiveRadiationFluxClearSky = 60,
354+
#[description = "direct short wave radiation flux, clear sky"]
355+
#[abbrev = "dswrflxcs"]
356+
#[unit = "Wm-2"]
357+
DirectShortWaveRadiationFluxClearSky = 61,
358+
#[description = "downward short wave radiation flux"]
359+
#[abbrev = "dswrf"]
360+
#[unit = "Wm-2"]
361+
DownwardShortWaveRadiationFlux = 192,
362+
#[description = "upward short wave radiation flux"]
363+
#[abbrev = "uswrf"]
364+
#[unit = "Wm-2"]
365+
UpwardShortWaveRadiationFlux = 193,
366+
#[description = "uv b downward solar flux"]
367+
#[abbrev = "duvb"]
368+
#[unit = "Wm-2"]
369+
UVBDownwardSolarFlux = 194,
370+
#[description = "clear sky uv b downward solar flux"]
371+
#[abbrev = "cduvb"]
372+
#[unit = "Wm-2"]
373+
ClearSkyUVBDownwardSolarFlux = 195,
374+
#[description = "clear sky downward solar flux"]
375+
#[abbrev = "csdsf"]
376+
#[unit = "Wm-2"]
377+
ClearSkyDownwardSolarFlux = 196,
378+
#[description = "solar radiative heating rate"]
379+
#[abbrev = "swhr"]
380+
#[unit = "Ks-1"]
381+
SolarRadiativeHeatingRate = 197,
382+
#[description = "clear sky upward solar flux"]
383+
#[abbrev = "csusf"]
384+
#[unit = "Wm-2"]
385+
ClearSkyUpwardSolarFlux = 198,
386+
#[description = "cloud forcing net solar flux"]
387+
#[abbrev = "cfnsf"]
388+
#[unit = "Wm-2"]
389+
CloudForcingNetSolarFlux = 199,
390+
#[description = "visible beam downward solar flux"]
391+
#[abbrev = "vbdsf"]
392+
#[unit = "Wm-2"]
393+
VisibleBeamDownwardSolarFlux = 200,
394+
#[description = "visible diffuse downward solar flux"]
395+
#[abbrev = "vddsf"]
396+
#[unit = "Wm-2"]
397+
VisibleDiffuseDownwardSolarFlux = 201,
398+
#[description = "near ir beam downward solar flux"]
399+
#[abbrev = "nbdsf"]
400+
#[unit = "Wm-2"]
401+
NearIrBeamDownwardSolarFlux = 202,
402+
#[description = "near ir diffuse downward solar flux"]
403+
#[abbrev = "nddsf"]
404+
#[unit = "Wm-2"]
405+
NearIrDiffuseDownwardSolarFlux = 203,
406+
#[description = "downward total radiation flux"]
407+
#[abbrev = "dtrf"]
408+
#[unit = "Wm-2"]
409+
DownwardTotalRadiationFlux = 204,
410+
#[description = "upward total radiation flux"]
411+
#[abbrev = "utrf"]
412+
#[unit = "Wm-2"]
413+
UpwardTotalRadiationFlux = 205,
414+
#[description = "diffuse short wave radiation flux, clear sky"]
415+
#[abbrev = "dfswrflxcs"]
416+
#[unit = "Wm-2"]
417+
DiffuseShortWaveRadiationFluxClearSky = 206,
418+
Missing = 255,
419+
}
420+
240421
#[repr(u8)]
241422
#[derive(Eq, PartialEq, Debug, DisplayDescription, FromValue, ToParameter)]
242423
pub enum MassProduct {
@@ -346,6 +527,7 @@ pub fn meteorological_parameter(category: u8, parameter: u8) -> Option<Parameter
346527
1 => Some(Parameter::from(MoistureProduct::from(parameter))),
347528
2 => Some(Parameter::from(MomentumProduct::from(parameter))),
348529
3 => Some(Parameter::from(MassProduct::from(parameter))),
530+
4 => Some(Parameter::from(ShortWaveRadiationProduct::from(parameter))),
349531
6 => Some(Parameter::from(CloudProduct::from(parameter))),
350532
15 => Some(Parameter::from(RadarProduct::from(parameter))),
351533
16 => Some(Parameter::from(ForecastRadarImagery::from(parameter))),
@@ -363,6 +545,7 @@ pub fn meteorological_category(category: u8) -> &'static str {
363545
1 => "moisture",
364546
2 => "momentum",
365547
3 => "mass",
548+
4 => "short wave radiation",
366549
6 => "cloud",
367550
15 => "radar",
368551
16 => "forecast radar imagery",

0 commit comments

Comments
 (0)