MASIE Scripts

Many climate scientists are too dimwitted to publish data in a form which can be easily graphed, like MASIE data which comes in this format.

 2006182, 9652642.84,

2006182 means the 182’nd day of 2006. The second number is sea ice extent, but because it has a leading space, Open Office interprets it as a string rather than a number. I wrote some scripts to download and convert the MASIE data into something useful.

----- getMasie.bash -----
rm -f masie_4km_allyears_extent_sqkm.csv
mv tmpmasie masie_4km_allyears_extent_sqkm.csv

----- ------
import re
import math
fd = open("masie_4km_allyears_extent_sqkm.csv")
out = open("tmpmasie", "w")
for line in fd :
    if"^ 2", line) :
        fields = line.split(",")
        date = fields[0].lstrip()
        float_date = float(date)/1000.0
        frac, whole = math.modf(float_date)
        real_frac = frac * 1000.0 / 365.0
        real_date = whole + real_frac
        extent = fields[1].lstrip()
        out.write(str(real_date) + "," + extent + "\n")

This produces a usable .csv file which can be directly graphed.

This entry was posted in Uncategorized. Bookmark the permalink.

18 Responses to MASIE Scripts

  1. Steve Case says:

    Yeah Tony, I roll my eyes on some of the data tables. Such in this one:

    Getting it into a columnar form was fun in Excel:

    1880 1 -0.29
    1880 2 -0.20
    1880 3 -0.18
    1880 4 -0.27
    1880 5 -0.14
    1880 6 -0.28

    2016 12 0.77

    I’m an amateur and you’re a pro and national treasure (-:

    By the way I never got to down load your latest Pulling back the Curtain opus would you be able to put up a link?

  2. Jim Hunt says:

    What’s the point of producing a MASIE graph Tony, given the limitations of the data? I refer you yet again to:

    • Timo Soren says:

      Asking what it the point means you have ‘judged’ MASIE data to be worthless. Hence, you would never use it again. We could call that hunt-less data.

      • Jim Hunt says:

        Have you read what the organisation that generates the MASIE data has to say about it Timo?

        Or not?

        • Timo Soren says:

          MASIE is a mish-mash, including sat and manual, product with supposed 4km resolution which is still being maintained. It is a very reasonable product. I would always rather have more attempts and difficulties with a product than just ignoring it, provided it still has funding.

          And it will have funding for a while.
          Why pray tell do you think it is worthless?

          • Jim Hunt says:

            Timo – I didn’t say it was worthless, so I can only assume you haven’t bothered to read what I did say.

            You also haven’t bothered to answer my question, so at the risk of repeating myself:

            “Have you read what the organisation that generates the MASIE data has to say about it?

            Or not?”

          • AndyG55 says:

            What does the Canadian Ice Service say about multi-year Arctic sea ice Jimbo

            Are you STILL TOO COWARDLY to answer this question??

            Of course you are !!

          • Jim Hunt says:

            Here’s what ESA’s SMOS says about Tony’s “multi-year Arctic sea ice” Andy.

            In actual fact some of it is new, thin first year sea ice:

    • Colorado Wellington says:

      What’s the point of producing a MASIE graph …

      What’s the point then to publish the data in the first place?

      A typical Hunt deflection from the subject at hand. You are so transparent.

  3. Timo Soren says:

    I don’t like the implication caused by the decimal representation of the day. As an example: someone could interpret 2016.012345678 as 2016 Jan 4th , 12:09 pm

    Why not use:
    from datetime import date
    date.fromordinal(date(year, 1, 1).toordinal() + days – 1)

  4. Steve Case says:

    Here’s my Excel Solution:

    Copy the formula in A3 on down:

  5. Ron Clutz says:

    To separate the year # from day #, I just use text to columns with a fixed length divider between the fourth and fifth digits, after inserting a blank column next to the first value.

  6. When you import into Open Office, there is a box “Detect Special Numbers”.

    If you tick this, it seems to get around the problem

  7. Jim Hunt says:

    Who would have thought it?

    I’ve just received a reply to my email last week to the organisation that generates the OSI-SAF ice type data:

    “The product we produce is not for climate change studies. It is an operational product intended for use in weather and ocean models, and for monitoring of the current sea ice situation.”

    Ring any bells MASIE fans?

Leave a Reply

Your email address will not be published. Required fields are marked *