Tuesday, October 17, 2017

On Thermal Expansion & Thermal Contraction - 26

Fig. 1a First graph of this series
Fig. 1b Thermal Expansion
Today, let's look at thermal expansion and contraction at each depth level.

But first, let's remember that all "water contracts (decreases in volume) when heated."

What ??!!??

That is just as true as the most oft quoted statement concerning the thermosteric dynamics of water, which is: "water expands (increases in volume) when heated."

The ghost dynamic in these statements is that whether thermal expansion or thermal contraction takes place in any case depends on the in situ temperature of the water at the time when the hotness or coldness is applied to that water.

Regular readers know that this series started by pointing out that thermal expansion is not the only "thermal" in town (never forget thermal contraction).

The graphs at Fig. 1a and Fig. 1b  show both of the thermal dynamic players in the game.
Fig. 2

The gist of what is portrayed in those graphs is that there is both thermal expansion and thermal contraction (when water is heated or when water is cooled it expands (increases in volume) or it contracts (decreases in volume) depending on the in situ temperature when that warming or cooling takes place.

Fig. 3
Note that those graphs were done before I discovered TEOS-10, a toolkit developed by scientific organizations (Thermodynamic Equation of SeaWater 2010).
Fig. 4

TEOS-10 is a toolkit that makes calculating and graphing thermosteric volume change (thermal expansion & contraction) more accurate, meaningful, and certainly more professional in terms of coherency and consistency.
Fig. 5

The other graphs in today's post (Fig. 2 thru Fig. 9) show actual (not hypothetical) thermal expansion and contraction at various depths using TEOS-10 values (e.g. SA, CT, and P) that are calculated and computed from in situ practical salinity, temperature, and depth measurements stored in the World Ocean Database.
Fig. 6

Fig. 7
In other words, the salinity, temperature, and depth measurements involved are real measurements taken by real scientists at work in "the field."
Fig. 8

I think that the real graphs of the real situation at the various depths of the real oceans of the world support and validate the hypothetical assertions made by Dredd Blog over the years and also in Fig. 1a and Fig. 1b.

Who in their right mind is going to deny the existence of both thermal expansion and thermal contraction in terms of thermodynamic reality?

After all, any and all measurements in the CTD and PFL datasets of the World Ocean Database (about a billion) were used to produce graphs at Fig. 2 thru Fig. 9.

Now that we have been brave enough to admit the existence of thermal contraction, we can consider the Second Law of Thermodynamics.

I mean that we can do so at least in the sense of the movement of heat in the oceans (which has one and only one direction) which is from warm to cold (NASA, Univ. of Winnipeg).

The big take home from this is that heat in the ocean is always on the move spontaneously when the lawful conditions arise.

That movement is shown in the graphs as upward and downward lines of expansion and contraction while the flow of time moves horizontally.

I want us to also remember that this flow can reverse direction under certain lawful conditions.

For example, when the water below is colder than the water above, the heat will spontaneously tend to move downward, but when that water above later becomes cooler than the water below, the warmth will move upwards rather than downwards.

By downward and upward, I am in reference to to the depth level.

We see that happening in these graphs too.

So my fellow citizen scientists, let's all remember that "the ice of Greenland and Antarctica is seriously melting."

The previous post in this series is here.

The ice is seriously melting ... (Dr. Eric Rignot) ...

Monday, October 16, 2017

On The More Robust Sea Level Computation Techniques - 6

Fig. 1 SA 0-200 m
In this series I have provided some views on how best to calculate and compute thermal expansion and contraction with the in situ measurements available in the World Ocean Database (WOD).

One important event in that process is the use of the TEOS-10 toolkit provided by the scientific community (On The More Robust Sea Level Computation Techniques, 2, 3, 4, 5).

The importance of TEOS-10 should not be underestimated:
Fig. 2 SA 201-400 m
"On climatic time scales, melting ice caps and regional deviations of the hydrological cycle result in changes of seawater salinity, which in turn may modify the global circulation of the oceans and their ability to store heat and to buffer anthropogenically produced carbon dioxide." (Abstract, Metrologia 53 (2016), R1)

Fig. 3 SA 401-600 m
"Melting polar glaciers raise the sea level and influence the surface salinity distribution, and in turn may affect the large scale vertical and horizontal circulations in the oceans which continuously store, release or displace huge amounts of heat and dissolved gases." (ibid, R2)

"It is evident from climatology and geosciences that atmospheric
Fig. 4 SA 601-800 m
relative humidity, ocean salinity and seawater pH are key parameters for observing, modelling and analysing the increasing effects of global warming on ecosystems and society. However, despite their widespread use and relevance, the metrological underpinning of these parameters is inadequate, relies on century old provisional concepts, lacks
Fig. 5 SA 801-1000 m
traceability to the SI, or suffers from ambiguities and deficiencies of definitions, conventions and measurement techniques. The recent introduction of the international standard TEOS-10, the Thermodynamic Equation of Seawater 2010 (IOC et al 2010), has raised new awareness of these long standing and increasingly urgent problems, and has at the same time offered new perspectives for overcoming them.
" (ibid)
(IOP Science, PDF, emphasis added). The PDF is well worth downloading (no cost) and is filled with helpful reasoning as to why coherence is in the cards since the introduction of TEOS-10.

Fig. 6 SA 1001-3000 m
I have provided some source code as an example for using TEOS-10 (The Art of Making Thermal Expansion Graphs).

Thermal expansion and contraction is claimed to have been the major factor in sea level change for a century or so, and is claimed to have been more of a factor way back when than it is now (On Thermal Expansion & Thermal Contraction, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25).

Fig. 7 SA >3000 m
That assertion does not pass the smell test when, at the same time, it is also asserted that global warming has been increasing, with most of the increasing heat (~93%) ending up in the oceans.

The TEOS-10 and other formulas show that thermal expansion has decreased over the past ~50 years, even as more heat has been going into the ocean (On Thermal Expansion & Thermal Contraction - 25).

Fig. 8 SA All depths
Based on the in situ ocean temperature and salinity measurements processed by TEOS, ice sheet melt in Greenland and Antarctica has been going on in greater amounts and for a longer time than previously thought (Antarctica 2.0, 2).

Today's graphs focus on Absolute Salinity, an advanced concept for not only studying ocean water thermodynamics, but also for clarity and consistency (see  IOP Science link above).

Like temperature, Absolute Salinity (SA) varies with depth, and does so in a non-intuitive manner from time to time.

In these graphs (Fig. 1 thru Fig. 7) I used the usual Dredd Blog depth levels to show each level compared to the mean average of all the depths.

In the graph at Fig. 8 I placed all depths, along with the mean average again, on one graph.

It shows a relatively stable Absolute Salinity, the largest departure from the pack being the shallowest level (Fig. 1).

That probably reflects ongoing surface water freshening due to ice sheet and glacial melt acceleration.

Remember what the experts wrote in the quotes above: "Melting polar glaciers raise the sea level and influence the surface salinity distribution, and in turn may affect the large scale vertical and horizontal circulations in the oceans" (see IOP Science link above).

The previous post in this series is here.

Saturday, October 14, 2017

On Thermal Expansion & Thermal Contraction - 25

Fig. 1a Conservative Temperature
Fig. 1b CT Average
In the Thermodynamic Equation of SeaWater 2010 (TEOS-10) scheme of things, Conservative Temperature (CT), Absolute Salinity (SA), and Pressure (P) are key players.

CT is derived from in situ (measured) temperature taken at a given location using the function gsw_ct_from_t.

SA is derived from in situ (measured) salinity taken at a given location using the function gsw_sa_from_sp.

P is derived from measured depth at a given latitude using the function gsw_p_from_z.

The graph at Fig. 1a shows CT at the typical Dredd Blog "seven depth levels" (depth is 'height' in TEOS parlance), with one of the graph lines being the median (mean average).
Fig. 2a Absolute Salinity
Fig. 2b SA Average

The graph at Fig. 1b shows the average CT of those seven depth levels.

In like fashion, the graphs at Fig. 2a and Fig. 2b show the same for SA.
Fig. 3a Thermal Expansion / Contraction
Fig. 3b Thermal Expansion / Contraction Average

Since P is a function of depth, the pressure is derived from the depth of each CT and SA  in situ measurement.

The big story in today's post is the calculation of changes in thermal expansion and contraction at each of those depth levels.

The graph at Fig. 3a shows the changes in thermosteric volume at the seven depth levels, including a mean average of all seven combined.

The graph at Fig. 3b shows the average of those thermosteric volume changes.

The span of time involved begins in 1968 and ends in 2016, using all WOD measurements from all zones.

That span of time is due to my use of CTD and PFL datasets of the World Ocean Database (WOD).

I don't use the data acquired by older methods of gathering in situ measurements, preferring the more advanced gathering technology.

About half a century of data collection is recorded in the CTD and PFL datasets (about a billion temperature, salinity, and depth measurements).

As you can see in Fig. 3a and Fig. 3b, the results are not intuitive.

The results depart from the current thinking that thermal expansion has been the main source of sea level rise for a century.

The net result for the 1968-2016 span of time is a net -2171.6305236 km3 thermal contraction (not thermal expansion).

That value equates to about a 6 mm [~1/4 inch] thermosteric volume decrease (-2171.6305236 ÷ 361.841 = −6.001615416 mm [-0.236284071 inch]) ...  (the 361.841 value is the number of cubic kilometers necessary to raise the global mean average sea level by one millimeter).

Regular readers know that I have been experimenting to find a better way to calculate these values, and at this point I think using the seven ocean depth levels method is working well.

I have used the seven depth levels method with in situ temperature and salinity for quite a while.

The formulas for deriving the calculations were shown previously, along with the actual source code that does it (The Art of Making Thermal Expansion Graphs).

One difference in today's work is that the ten temperatures used in that linked-to example ("5.5,6.5,7.5,8.0,8.5,8.0,7.5,7.0,6.5,6.0, 5.5") are replaced with about a billion measured values that are used to produce the graphs shown in today's post.

What is most important in this calculation sequence (Fig. 3a) is that the individual depth levels' mass-volume must first be determined before calculating the thermal expansion coefficient.

That is because the seven depth levels don't all have the same mass-volume. (e.g. the 0-200 m level is different from the 1001-3000 m level in terms of mass-volume).

Notice in Fig. 3a that the depth level with the most thermal expansion is the >3000 m level (non-intuituve).

All the heat going into the oceans tends to move from warmer water to colder water over time.

As the heat works its way through the ocean basins, it causes expansion and contraction individual to that basin and the particular depth level.

BTW, the eustatic (non-thermal) sea level change graphs, measured by tide gauge stations featured in today's graphs, are posted here.

The next post in this series is here, the previous post in this series is here.

The ice is melting ... (Dr. Eric Rignot) ...

Tuesday, October 10, 2017

The Art of Making Thermal Expansion Graphs

Gardens By The Bay
It has been a while since I published any C++ source code (Weekend Rebel Science Excursion - 49).

The last one, linked to above, had to do with some of the simple basics of sea level rise calculations.

As with ghost-water (NASA Busts The Ghost), calculating thermal expansion is another one of those "mysto" areas being focused on by scientists.

Today, I present source code written in the C++ programming language.

It is real code, but the data is limited to a ten episode (e.g. year) range., nevertheless, it shows how the thermosteric volume of the ocean can change even if the mass volume does not.

Those thermosteric volume changes are caused by temperature change in the body of water.

Before we look at the code and what it produces, here are some comments about the subject:
"To be a bit more scientific about the matter before we end, let’s quote an interesting study by the Potsdam Institute for Climate Impact Research, published in 2013 in PNAS (called ‘The Multi-millenial sea level commitment of global warming’). This research group thinks of the final future sea level rise Greenland would contribute about 25 percent, Antarctica (combined) about 50 percent, smaller glaciers about 5 percent – and thermal expansion about 20 percent."
(Bits of Science). There is another paper which I have quoted that points out a wide spread problem of improper calculations routinely done in this matter (On The More Robust Sea Level Computation Techniques - 5).

Some of the models are even older than some of the software advances in recent years (e.g. TEOS-10 toolkit), as regular readers know.

But there are other issues too:
"The thermal expansion of the ocean has been investigated by a spectrum of climate models of different complexity, ranging from zero-dimensional diffusion models ... via Earth System Models of Intermediate Complexity (EMIC) ... to comprehensive general circulation models ... Although uncertainty remains, especially owing to uncertainty in the ocean circulation and thereby the distribution of heat within the ocean, the physical processes are relatively well understood even if not fully represented in all models."
(The multimillennial sea-level commitment of global warming). Scientists are not unified as to whether or not thermal expansion is a or the major cause of sea level rise.

A recent paper points this out:
"On the basis of the GRACE data, we conclude that most of the change in ocean mass is caused by the melting of polar ice sheets and mountain glaciers. This contribution of ice melt is larger than previous estimates, but agrees with reports of accelerated ice melt in recent years."
(Nature). One limiting factor is calculating the thermal coefficient of sea water (Thermal expansion co-efficient of sea water), which the TEOS-10 toolkit solves nicely with the gsw_alpha function.

Anyway, here is the software code:

/** std C++ header files */
#include <iostream>
#include <fstream>
#include <iomanip>

/** TEOS header file */
#include <gswteos-10 .h>

using namespace std;

V1 = V0(1 + β ΔT)
V1 means new volume
V0 means original volume
β means thermal expansion coefficient
ΔT means change in temperature (t1 - t0)
double thermalExpansion(double currentOceanVolume, /** V0 */
                                          double tec, /** β */
                                          double t1, /** ΔT half */
                                          double t0) /** ΔT half */
        double V0 = currentOceanVolume;
        double B = tec;
        double DT = t1 - t0;
        double V1 = V0*(1 + B * DT);

        return V1;

This sample program
calculates thermal
expansion & contraction
from a list of ocean water
temperatures which
represent in situ

Those in situ measurements
are converted to TEOS
values via TEOS
(gsw_....) functions.
int main()
         volume acquired at: Live Science
        const double oceanVol2010 = 1332370930.2; /** cu km */

        number of cubic kilometers per millimeter of sea level change
        const double cuKmPerMm = 361.841;

        /** maximum number of temperatures */
        const unsigned maxTemperatures = 11;

        /** in situ temperatures, in degrees C */
        const double temperatures[maxTemperatures] =
        {5.5,6.5,7.5,8.0,8.5,8.0,7.5,7.0,6.5,6.0, 5.5};

        /** practical salinity */
        const double SP = 34.15;

        /** ocean depth of measurements, in meters */
        const double depth = 60.25;

        latitude, longitude of measurements
        (off W. Coast of U.S.)
        const double lat = 35.33;
        const double lon = -150.21;

        /** variables for storing net steric balances */
        double netTETC = 0; /** net thermal expansion / contraction */
        double netSLC = 0; /** net sea level change, in millimeters */

        /** report text file */
        ofstream textFile("output-files/thermal_expansion.txt");

        textFile << setprecision(12)
        << "initial volume of ocean: "
        << oceanVol2010 << " (cu. km.)"
        << endl << endl;

         for loop: calculates thermal expansion/contraction
         from temperatures specified @ the temperature array         **********************************************************/
        for (unsigned tPos = 1; tPos < maxTemperatures; tPos++)
                /** select temperatures */
                double Tnow = temperatures[tPos];
                double Tbefore = temperatures[tPos-1];

                /** save temperature changes to text file */
                textFile << setprecision(2)
                << tPos << ")\t"
                << "Temp. before: " << Tbefore << endl
                << "\tTemp. now: " << Tnow << endl
                << "\tTemp. change: "
                << Tnow - Tbefore << " (deg C)"
                << endl;

                 convert depth @ lat to TEOS Z
                double Z = gsw_z_from_p(depth, lat);

                /** calculate TEOS pressure (dbars) */
                double P = gsw_p_from_z(Z, lat);

                /** calculate TEOS absolute salinity (g/kg) */
                double SA = gsw_sa_from_sp(SP,P,lon,lat);

                /** calculate TEOS conservative temperature */
                double CT = gsw_ct_from_t(SA,Tnow,P);

                /** calculate TEOS thermal expansion coefficient */
                double tec = gsw_alpha(SA, CT, P);

                 calculate thermosteric
                 volume using a constant
                 mass-volume value
                double TEvolume = thermalExpansion(oceanVol2010, tec, Tbefore, Tnow);

                /** record the TE volume changes */
                netTETC += oceanVol2010 - TEvolume;

                /** record sea level changes (mm) */
                netSLC = netTETC / cuKmPerMm;

                /** save changes to report file */
                textFile << setprecision(12)
                << "\tthis volume change: " << oceanVol2010 - TEvolume
                << " (cu. km)"
                << endl
                << "\tnet volume change: " << netTETC
                << " (cu. km)"
                << endl
                << "\tnet sea level change: " << netSLC
                << " (mm)"
                << endl << "\t---------------" << endl;
        } /** for loop */

        /** clean up */

        return 0;
}/** end of source code */

Here is what the above program prints out:

initial volume of ocean: 1332370930.2 (cu. km.)

1)  Temp. before: 5.5
     Temp. now: 6.5
     Temp. change: 1 (deg C)
     this volume change: 172385.525115 (cu. km)
     net volume change: 172385.525115 (cu. km)
     net sea level change: 476.412360995 (mm)
2)  Temp. before: 6.5
     Temp. now: 7.5
     Temp. change: 1 (deg C)
     this volume change: 186669.887116 (cu. km)
     net volume change: 359055.412231 (cu. km)
     net sea level change: 992.301624832 (mm)
3)  Temp. before: 7.5
     Temp. now: 8
     Temp. change: 0.5 (deg C)
     this volume change: 96841.4510376 (cu. km)
     net volume change: 455896.863269 (cu. km)
     net sea level change: 1259.93699793 (mm)
4)  Temp. before: 8
     Temp. now: 8.5
     Temp. change: 0.5 (deg C)
     this volume change: 100306.653495 (cu. km)
     net volume change: 556203.516764 (cu. km)
     net sea level change: 1537.1489598 (mm)
5)  Temp. before: 8.5
     Temp. now: 8
     Temp. change: -0.5 (deg C)
     this volume change: -96841.4510376 (cu. km)
     net volume change: 459362.065726 (cu. km)
     net sea level change: 1269.5135867 (mm)
6)  Temp. before: 8
     Temp. now: 7.5
     Temp. change: -0.5 (deg C)
     this volume change: -93334.9435582 (cu. km)
     net volume change: 366027.122168 (cu. km)
     net sea level change: 1011.56895478 (mm)
7)    Temp. before: 7.5
    Temp. now: 7
    Temp. change: -0.5 (deg C)
    this volume change: -89785.8304353 (cu. km)
    net volume change: 276241.291733 (cu. km)
    net sea level change: 763.432810911 (mm)
8)  Temp. before: 7
     Temp. now: 6.5
     Temp. change: -0.5 (deg C)
     this volume change: -86192.7625573 (cu. km)
     net volume change: 190048.529176 (cu. km)
     net sea level change: 525.226630414 (mm)
9)  Temp. before: 6.5
     Temp. now: 6
     Temp. change: -0.5 (deg C)
     this volume change: -82554.3415222 (cu. km)
     net volume change: 107494.187653 (cu. km)
     net sea level change: 297.07575331 (mm)
10) Temp. before: 6
      Temp. now: 5.5
      Temp. change: -0.5 (deg C)
      this volume change: -78869.118834 (cu. km)
      net volume change: 28625.0688193 (cu. km)
      net sea level change: 79.1095227442 (mm)

NOTE: Use a g++ compliant compiler, and download the TEOS-10 toolkit.

More on the more difficult part of the process (handling the real WOD data) in a future post.