AirSeaFluxes.jl
Computation and analysis of air-sea fluxes.
This package is in early developement stage when breaking changes can be expected.
AirSeaFluxes.AOGCM1D
AirSeaFluxes.angle_of_incidence
AirSeaFluxes.bulkformulae
AirSeaFluxes.calc_pco2
AirSeaFluxes.delta
AirSeaFluxes.heaviside
AirSeaFluxes.simpleflux
AirSeaFluxes.AOGCM1D
— FunctionAOGCM1D(ndays=60)
Atmosphere-Ocean, coupled, one-dimensional column model.
outputs,parameters=AOGCM1D(10)
p = dirname(pathof(AirSeaFluxes))
include(joinpath(p,"recipes_plots.jl"))
p1,p2,p3=plot_final(outputs,parameters)
display(p3)
AirSeaFluxes.bulkformulae
— Functionbulkformulae(atemp,aqh,speed,sst,hu=10,ht=2,hq=2,zref=10,atmrho=1.2)
Units: atemp - mean air temperature (K) at height ht (m) aqh - mean air humidity (kg/kg) at height hq (m) speed - mean wind speed (m/s) at height hu (m) sst - sea surface temperature (K)
Bulk formulae formulation:
wind stress = (ust,vst) = rhoA * Cd * Ws * (del.u,del.v)
Sensib Heat flux = fsha = rhoA * Ch * Ws * del.T * CpAir
Latent Heat flux = flha = rhoA * Ce * Ws * del.Q * Lvap
= -Evap * Lvap
with Cd,Ch,Ce = drag coefficient, Stanton number and Dalton number respectively [no-units], function of height & stability; and
Ws = wind speed = sqrt(del.u^2 +del.v^2)
del.T = Tair - Tsurf ; del.Q = Qair - Qsurf
AirSeaFluxes.calc_pco2
— Functioncalc_pco2(T,S,dic,ta,pt=0.0,sit=0.0)
Calculate pCO2 for given Temperature(T), Salinity(S), DIC, Alkalinity, etc.. Efficient solver following Follows et al (2005)
pco2eq = atmospheric reference pCO2 level (atmospheres)
for which to find equilibrium dic, csat
csat = equilibrium total inorganic carbon (mol/m³)
where 1 T = 1 metric ton = 1000 kg
ta = total alkalinity (eq/m³)
pt = inorganic phosphate (mol/m³)
sit = inorganic silicate (mol/m³)
T = temperature (degrees C)
S = salinity (PSU)
hg = first guess of [H+] (10e-8 is a good cold start value)
AirSeaFluxes.simpleflux
— Methodsimpleflux(Ca::Float,Co::Float,pisvel::Float)
Compute flux entering the ocean per unit area
mld=10 #mixed layer depth (m)
tim=86400*30 #relaxation time scale (s)
pisvel=mld/tim #piston velocity (m/s)
Co=0.0 #ocean value (e.g. concentration of some compound)
Ca=1.0 #atmospeheric value (e.g. equivalent compound concentration)
simpleflux(Ca,Co,pisvel)
AirSeaFluxes.angle_of_incidence
— Methodangle_of_incidence(lat,lon,jd,time)
Calculate the cosine of the sun incident angle for a given location (lat,lon), julian day (jd) and time in hours and fraction of hours.
AirSeaFluxes.delta
— Methoddelta(jd)
Calculates the Sun's declination angle as a function of Julian day (jd)
AirSeaFluxes.heaviside
— Methodheaviside(x)
Heaviside function : 0 when x<0 and 1 when x>=0