Real Science

JAXA Melt Season – Shortest On Record

Advertisements

It appears that the JAXA extent graph has bottomed out. If so, the melt season (date of the minimum minus the date of the maximum) in 2010 was the shortest in their eight year record, at 163 days. The previous record was 181 days in 2003. The longest melt season was 2005, at 200 days.

The short melt season was due to a some very cold weather in March at lower latitudes, which kept driving extent upwards until the end of the month. The maximum was reached 18 days later than the mean, and the minimum was reached 5 days earlier than the mean.

Mark Serreze at NSIDC wrote in 2008 :

“As the climate warms, the summer melt season lengthens …”

Joe Romm headlined in May :

As Arctic sea ice shrinks faster than 2007, NSIDC director Serreze says, “I think it’s quite possible” we could “break another record this year.

….

Data from both the Japan Aerospace Exploration Agency (JAXA) and National Snow and Ice Data Center (NSIDC) show Arctic sea ice extent shrinking below the level of 2007 at a rapid pace:

————————————————————————————————

Code here :

#include <string>
#include <vector>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>

int dayOfYear(int day, int month)
{
int month_length_array[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
std::vector<int> month_length_vector(month_length_array, month_length_array + 12);

int day_of_year = 0;

for (size_t i = 1; i < month; i++)
{
day_of_year += month_length_vector[i – 1];
}

return(day_of_year + day);
}

int
main(int argc, char** argv)
{
std::string text_file_name = argv[1];
std::ifstream* if_stream = new std::ifstream;
if_stream->open(text_file_name.c_str(), std::ios::in);
char line[256];
int             current_year = 0;
float           minimum;
float           date_of_minimum;
float           date_of_maximum;
float           maximum;

struct MinMax
{
int             year;
int             date_of_minimum;
int             date_of_maximum;
int             length_of_melt_season;
int             minimum;
int             maximum;
};

std::vector<MinMax*>     min_max_vector;

struct MinMax* current = (MinMax*)NULL;

int             year;
int             month;
int             day;
int             extent;

int             day_of_year = 0;

while ( if_stream->getline(line, 256) )
{
std::string line_string(line);
std::replace( line_string.begin(), line_string.end(), ‘,’, ‘ ‘ );
std::stringstream string_stream(line_string);
string_stream >> month >> day >> year >> extent;
day_of_year = dayOfYear(day, month);

if (extent == -9999)
{
continue;
}

if (year != current_year)
{
if (current)
{
current->date_of_maximum = date_of_maximum;
current->date_of_minimum = date_of_minimum;
current->length_of_melt_season = date_of_minimum – date_of_maximum;
current->minimum = minimum;
current->maximum = maximum;
min_max_vector.push_back(current);
}

current_year = year;
current = new MinMax;
current->year = year;
minimum = INT_MAX;
maximum = INT_MIN;
day_of_year = 0;
}

if (extent < minimum)
{
date_of_minimum = day_of_year;
minimum = extent;
}

if (extent > maximum)
{
date_of_maximum = day_of_year;
maximum = extent;
}
}

current->date_of_maximum = date_of_maximum;
current->date_of_minimum = date_of_minimum;
current->length_of_melt_season = date_of_minimum – date_of_maximum;
current->minimum = minimum;
current->maximum = maximum;
min_max_vector.push_back(current);

size_t number_of_years = min_max_vector.size();

for (size_t i = 0; i < number_of_years; i++)
{
current = min_max_vector[i];
std::cout << current->year << ”   ” << current->length_of_melt_season << ”    “;
std::cout << current->maximum << ”    ” << current->minimum << ”    “;
std::cout << current->date_of_maximum << ”    ” << current->date_of_minimum << std::endl;
}

delete if_stream;
}

Advertisements

Advertisements