pygetm.airsea module
- class pygetm.airsea.Base[source]
Bases:
objectBase class that provides air-water fluxes of heat, momentum, freshwater, as well as surface air pressure.
- __call__(time: datetime, sst: Array, ssu: Array, ssv: Array, calculate_heat_flux: bool) None[source]
Update surface fluxes. Stresses and air pressure are always updated, but heat, shortwave and freshwater fluxes only if
calculate_heat_fluxif set.- Parameters:
time – date and time
sst – temperature of the water surface (°C)
ssu – surface water velocity in x-direction (m s-1) (model-centric, not rotated to be geocentric)
ssv – surface water velocity in y-direction (m s-1) (model-centric, not rotated to be geocentric)
calculate_heat_flux – update the surface heat flux (
shf), net downwelling shortwave flux (swr) and net freshwater flux (pe)
- pygetm.airsea.CPA = 1008.0
specific heat capacity of air (J kg-1 K-1)
- class pygetm.airsea.Fluxes(taux: float = 0.0, tauy: float = 0.0, sp: float = 101325.0, shf: float = 0.0, swr: float = 0.0, pe: float = 0.0)[source]
Bases:
BasePrescribed surface fluxes: stresses
tauxandtauy, surface heat fluxshf, air pressuresp, net downwelling shortwave radiationswrand the net freshwater fluxpe) are prescribed, not calculated from meteorological conditions.- Parameters:
taux – wind stress in x-direction (Pa)
tauy – wind stress in y-direction (Pa)
sp – surface air pressure (Pa)
shf – surface heat flux (W m-2)
swr – surface net downwelling shortwave radiation (W m-2)
pe – net freshwater flux due to precipitation, condensation, and evaporation (m s-1)
- class pygetm.airsea.FluxesFromMeteo(shortwave_method: ShortwaveMethod | int = ShortwaveMethod.ROSATI_MIYAKODA, longwave_method: LongwaveMethod | int = LongwaveMethod.CLARK, albedo_method: AlbedoMethod = AlbedoMethod.PAYNE, humidity_measure: HumidityMeasure = HumidityMeasure.DEW_POINT_TEMPERATURE, calculate_evaporation: bool = False)[source]
Bases:
FluxesCalculate air-water fluxes of heat and momentum, as well as surface air pressure, using the
awexlibrary. The heat flux is the sum of the sensible heat flux, the latent heat flux, and net downwelling longwave radiation.- Parameters:
shortwave_method –
method used to obtain surface shortwave radiation. NET_FLUX: specify directly via
pygetm.core.Array.set()onswrDOWNWARD_FLUX: specify downwards shortwave radiation viapygetm.core.Array.set()on
swr_downwards. Albedo correction will be applied.ShortwaveMethod.ROSATI_MIYAKODA: calculate the shortwave radiation based on position, time and cloudcover and apply albedo
longwave_method – method used to obtain net longwave radiation NET_FLUX: specify directly via
pygetm.core.Array.set()onqlDOWNWARD_FLUX: specify downwards longwave radiation viapygetm.core.Array.set()onql_downwardsLongwaveMethod.{CLARK, HASTENRATH_LAMB, BIGNAMI, BERLIAND_BERLIAND, JOSEY1, JOSEY2}: Bulk formula expressionsalbedo_method – method used to calculate surface albedo
humidity_measure – the units in which air humidity will be provided
calculate_evaporation – whether to calculate evaporation from the latent heat flux. If this is
True, precipitation should be prescribed to ensure the net freshwater budget is correct. This can be done by by callingpygetm.core.Array.set()ontp. Ifcalculate_evaporationisFalse, the net surface freshwater flux defaults to 0. This flux can be then manually specified by callingpygetm.core.Array.set()onpe.
- __call__(time: datetime, sst: Array, ssu: Array, ssv: Array, calculate_heat_flux: bool) None[source]
Update surface fluxes. Stresses and air pressure are always updated, but heat, shortwave and freshwater fluxes only if
calculate_heat_fluxif set.- Parameters:
time – date and time
sst – temperature of the water surface (°C)
ssu – surface water velocity in x-direction (m s-1) (model-centric, not rotated to be geocentric)
ssv – surface water velocity in y-direction (m s-1) (model-centric, not rotated to be geocentric)
calculate_heat_flux – update the surface heat flux (
shf), net downwelling shortwave flux (swr) and net freshwater flux (pe)
- update_humidity(sst: Array)[source]
Update humidity metrics: saturation vapor pressure
es, actual vapor pressureea, saturation specific humidityqs, actual specific humidityqaand air densityrhoa- Parameters:
sst – temperature of the water surface (°C)
- update_longwave_radiation(sst: Array)[source]
Update net downwelling longwave radiation
ql- Parameters:
sst – temperature of the water surface (°C)