A Climate Of Bad Code

Discuss life, the universe, and everything with other members of this site. Get to know your fellow polywell enthusiasts.

Moderators: tonybarry, MSimon

BenTC
Posts: 410
Joined: Tue Jun 09, 2009 4:54 am

Post by BenTC »

Josh Cryer wrote:...and with built in overflow checking that will warn the programmer if this ever happens.
I don't program FORTRAN but got interested enough to find this which says:
Trapping on integer overflow is disabled by default for Fortran and C; an integer overflow does not generate a SIGFPE error. Detecting integer overflows requires not only that the trap be enabled but also that the compiler insert special code in the executable file to check for overflows.

To enable integer overflow checking for Fortran, use a !$HP$ CHECK_OVERFLOW INTEGER ON directive (in HP Fortran/9000, use $CHECK_OVERFLOW INTEGER_4 or INTEGER_2) to obtain the overflow checking code, and use an ON INTEGER OVERFLOW statement to handle the trap.
So it seems that integer checking is not necessarily built-in to a program, unless you turn it on. Whether the programmer is competent enough in Fortran to turn it on is another matter.
In theory there is no difference between theory and practice, but in practice there is.

BenTC
Posts: 410
Joined: Tue Jun 09, 2009 4:54 am

Post by BenTC »

MSimon wrote:How does it handle integer overflow?
In addition to my previous post, try this
In theory there is no difference between theory and practice, but in practice there is.

Luzr
Posts: 269
Joined: Sun Nov 22, 2009 8:23 pm

Post by Luzr »

BenTC wrote:
MSimon wrote:How does it handle integer overflow?
In addition to my previous post, try this
Uhm, why, are you sure they are using PA-RISC computers?

I thought CRU is not that poor, they can afford much faster normal PCs :)

Seriously, Intel x86 does not have integer traps. If compiler would have such support (and I know for sure x86 C compilers do not - because many algorithms do overflows intentionally), it would be quite costly in terms of runtime performance.

All in all, overflows are possible integer problem. So if CRU coders are as incompetent as to compute squares of integer numbers, the code is definitely compromised. But I find this really hard to believe...

tomclarke
Posts: 1683
Joined: Sun Oct 05, 2008 4:52 pm
Location: London
Contact:

Post by tomclarke »

I absolutely agree that climate model code should be open - how else can it be checked?

But the rumours here do not convince me. Show me the code - AND HOW IT HAS BEEN VALIDATED - and I can come to some judgement. For example overflow issues code be validated easily by running occasionally with a slower overflow checking compiler. Not perfect - because a given run inchecked might overflow - bus would guarantee no systematic error and any strange results could (fairly quickly) be checked by rerunning with overflow checking.

Just as we should not trust closed models, so we should not trust closed statements from people who claim to have discovered disatrous erors in code.

IntLibber
Posts: 747
Joined: Wed Sep 24, 2008 3:28 pm

Post by IntLibber »

tomclarke wrote:I absolutely agree that climate model code should be open - how else can it be checked?

But the rumours here do not convince me. Show me the code - AND HOW IT HAS BEEN VALIDATED - and I can come to some judgement. For example overflow issues code be validated easily by running occasionally with a slower overflow checking compiler. Not perfect - because a given run inchecked might overflow - bus would guarantee no systematic error and any strange results could (fairly quickly) be checked by rerunning with overflow checking.

Just as we should not trust closed models, so we should not trust closed statements from people who claim to have discovered disatrous erors in code.
Sorry, thats not how science works. AGW researchers are the ones making extraordinary claims, they are the ones with the burden of proof. All it takes to discredit their claims is one mistake to be pointed out.

Luzr
Posts: 269
Joined: Sun Nov 22, 2009 8:23 pm

Post by Luzr »

IntLibber wrote:
Just as we should not trust closed models, so we should not trust closed statements from people who claim to have discovered disatrous erors in code.
Sorry, thats not how science works. AGW researchers are the ones making extraordinary claims, they are the ones with the burden of proof. All it takes to discredit their claims is one mistake to be pointed out.
Pointed out. Not claimed without any reference.
Last edited by Luzr on Fri Jan 01, 2010 9:05 pm, edited 1 time in total.

TallDave
Posts: 3152
Joined: Wed Jul 25, 2007 7:12 pm
Contact:

Post by TallDave »

But the rumours here do not convince me.
Convince you of what? That CRU has sloppy code? I think that's a foregone conclusion.

Look, the issue here isn't whether this completely debunks AGW or invalidates the recorded warming trend. It doesn't. It doesn't need to. AGW rests on a variety of weak assumptions and tendentious arguments, and the recorded warming trend isn't unusual compared to the proxies (the well-documented monkey business AGWers have commited with the proxies themselves is much more significant than whatever adjustment has been added to the recorded warming trend).

All this really amounts to is yet another demonstration of how sloppy, unscientific, and dishonest AGW proponents who call themselves scientists have been. They've never been willing to acknowledge how large the error bars should be on this, because AGW is much less science than a political tool for environmentalists.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

For those interested I have the files.

Send me a message or an e-mail and I will send them to you. Otherwise you can just wait until those looking into it report.
Engineering is the art of making what you want from what you can get at a profit.

Luzr
Posts: 269
Joined: Sun Nov 22, 2009 8:23 pm

Post by Luzr »

MSimon wrote:For those interested I have the files.

Send me a message or an e-mail and I will send them to you. Otherwise you can just wait until those looking into it report.
OK, it looks the bug is really there....

To save anybody's time digging the issue:

Code: Select all

D:\FOIA\documents\cru-code\linux\cruts\anomdtb.f90(351):            OpTotSq=OpTotSq+(DataA(XAYear,XMonth,XAStn)**2)
and DataA is defined as

Code: Select all

D:\FOIA\documents\cru-code\linux\cruts\anomdtb.f90(39):integer, pointer, dimension (:,:,:)  :: Data,DataA,DataB,DataC
So what went wrong with the code:

Code: Select all

! anomdtb.f90
! f90 program written by Tim Mitchell 
! originally written as part of opcruts.f90 (originated 11.02.02) as options 25
! program to convert CRU ts .dtb files to anomaly .txt files for use in gridding
! pgf90 -Mstandard -Minfo -fast -Mscalarsse -Mvect=sse -Mflushz 
!	-o ./../cruts/anomdtb filenames.f90 time.f90 grimfiles.f90 
!	crutsfiles.f90 perfiles.f90 annfiles.f90 cetgeneral.f90 basicfun.f90 
!	wmokey.f90 gridops.f90 grid.f90 ctyfiles.f90 
!	./../cruts/anomdtb.f90 2> /tyn1/tim/scratch/stderr.txt
Given this bug, "anomaly .txt files" contain mostly random data....

Helius
Posts: 465
Joined: Sun Oct 21, 2007 9:48 pm
Location: Syracuse, New York

Post by Helius »

IntLibber wrote: Sorry, thats not how science works. AGW researchers are the ones making extraordinary claims, they are the ones with the burden of proof. All it takes to discredit their claims is one mistake to be pointed out.
So one bonehead researcher making one mistake discredits a whole established body of knowledge? c-mon.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

Luzr,

That was very fast work. Excellent!

Helius,

It is not just one boneheaded mistake. It is rafts of them:

http://powerandcontrol.blogspot.com/201 ... -code.html

Take the missing hot spot (predicted by the models) over the tropics.

Or take the fact other models agree with the known questionable models. A further example of the Millikan Effect? Or something more sinister? Like fraud in major parts of the whole discipline.

Or the fact that the CRU data is included in whole or in part in three of the four climate data sets (satellite measurements are not one of the three. They stand alone except for being calibrated by the land stations).

"as I grow older, I realize that ideas become accepted not by convincing their opponents but by outliving them. Funeral by funeral, science advances" - attributed to Max Planck

I'm one of those rare birds. I was not convinced of warming until around 1998. By then I was convinced of the truth of AGW. Not the remedies but the cause. By 2002 or so I changed my mind again. GW is natural. By 2008 I was convinced further that we were entering a cooling period.

BTW have you heard the latest? Seals - a feature of the San Francisco area are headed south.

http://www.foxreno.com/news/22094443/detail.html

Proof of nothing of course.

====

The question as always: what evidence will change your mind?
Engineering is the art of making what you want from what you can get at a profit.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

James A. Peden, an atmospheric physicist formerly of the Space Research and Coordination Center in Pittsburgh, calls today’s global warming hyperbole “a collaborative effort between the world’s incompetent scientists and the world’s scientifically illiterate journalists.”

Many reporters are “science illiterates . . . the Chicken Littles of the 21st Century, spreading climate change poppycock like bread crumbs in the forest,” he laments. “The crumbs, hopefully, will lead them to a paycheck at the end of the week from their similarly science-illiterate employers. . . .”
long url
Engineering is the art of making what you want from what you can get at a profit.

Josh Cryer
Posts: 526
Joined: Sun Aug 31, 2008 7:19 am

Post by Josh Cryer »

MSimon wrote:The deal is the code was not done by people who knew or upheld professional standards.
Pretty much. But it also stems from the fact that they frick their data retention up big time (losing stuff, etc). Fortunately CRU is not the end all to climate science.
Science is what we have learned about how not to fool ourselves about the way the world is.

MSimon
Posts: 14335
Joined: Mon Jul 16, 2007 7:37 pm
Location: Rockford, Illinois
Contact:

Post by MSimon »

Josh Cryer wrote:
MSimon wrote:The deal is the code was not done by people who knew or upheld professional standards.
Pretty much. But it also stems from the fact that they frick their data retention up big time (losing stuff, etc). Fortunately CRU is not the end all to climate science.
Yes. They are only tied up with about 75% of the recent and 100% of the long term (over 30 years) data. And of course they seem to be in collusion with a number of other climate research organizations.

So yeah. A very minor hit.

A field where 75% to 100% of the data is questionable should be able to carry on well and have complete public confidence. At minimum they have yours. So that is something.

And of course the fact that all the other models are in conformance with the CRU results is a real confidence builder in their abilities as well.

If only they could explain why their upper atmosphere hot spot does not show up in the data. I'm sure they will have an answer for that real soon now. The fact that they have been unable to explain that anomaly for at least two years is nothing to get excited about.

I think there are at least two choices:

1. The models are wrong
2. There is no warming

And the choices are not mutually exclusive.
Engineering is the art of making what you want from what you can get at a profit.

Josh Cryer
Posts: 526
Joined: Sun Aug 31, 2008 7:19 am

Post by Josh Cryer »

Do you question the reliability of the NCDC database?

(Note: before you answer, all of those weathermen who are against AGW helped produce this database, it wasn't just a "few" dozen people, it is thousands.)

The models are of course wrong and they will never be 100% "right." In science being wrong is part of the process.
Science is what we have learned about how not to fool ourselves about the way the world is.

Post Reply