nilsnevertree / sdm-eurec4a

Using Super-Droplet-Model and EUREC4A data to simulate rain evaporation below cloud base.
GNU General Public License v3.0
0 stars 1 forks source link

Sub cloud layer thermo fit #88

Open nilsnevertree opened 3 months ago

nilsnevertree commented 3 months ago

In order to have better thermodynamic fits, it would be good to use only a linear fit of the relative humidity and temperature in the sub cloud layer between 500 and 1200 m

An example plot is shown here: thermo_individual_better_fit

A solution to this would be:

The steps which need to be taken are:

  1. Fit linear regression to sub cloud layer relative humidity. Get slope s and x_int.
  2. Calculate saturation height x_split
  3. set values for s, x_int and x_split.
  4. Either fit linear regression above x_split or use slope value of inf to have sonstant supersaturation
nilsnevertree commented 3 months ago

BUT: CLEO needs specific humidity as input. Thus, a conversion from relative humidity to specific humidity is needed. Open question is, how to do so.

nilsnevertree commented 3 months ago

Linear fit beeing shitty when using the linear fit only is mainly due to

air_temperature = transfer.fit_thermodynamics(
    da_thermo=data.sel(alt = slice(200, 500)),
    thermo_fit=transfer.ThermodynamicLinear(),
    dim="alt",
    x_split=None,
    f0_boundaries=True, # True by default
)

Solve it by using f0_boundaries = False

air_temperature = transfer.fit_thermodynamics(
    da_thermo=data.sel(alt = slice(200, 500)),
    thermo_fit=transfer.ThermodynamicLinear(),
    dim="alt",
    x_split=None,
    f0_boundaries=False,
)

test

nilsnevertree commented 3 months ago

Also if reconstruction of potential temperature should be made, it is important to use this to reconstruct it:


ds_dropsondes["potential_temperature_recon"] = conversions.potential_temperature_from_tp(
    pressure=ds_dropsondes["pressure"],
    air_temperature=ds_dropsondes["air_temperature"],
    pressure_reference=100000
)

So the reference pressure in 1000hPa

pot_profiles difference_pot

With other values, there is a big discrepance