Pages

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 being measured.

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, emphasis added). 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
measurements.

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
                 ('oceanVol2010')
                *****************************/
                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 */
        textFile.close();

        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.