work2(i,k)= (exp(log(((1.496e-6*((t(i,k))*sqrt(t(i,k))) & /((t(i,k))+120.)/(den(i,k)))/(8.794e-5 & *exp(log(t(i,k))*(1.81))/p(i,k)))) & *((.3333333)))/sqrt((1.496e-6*((t(i,k)) & *sqrt(t(i,k)))/((t(i,k))+120.)/(den(i,k)))) & *sqrt(sqrt(den0/(den(i,k))))) coeres = rslope2(i,k,2)*sqrt(rslope(i,k,2)*rslopeb(i,k,2)) ! psmlt(i,k) = xka(t(i,k),den(i,k))/xlf*(t0c-t(i,k))*pi/2. & ! *n0sfac(i,k)*(precs1*rslope2(i,k,2)+precs2 & ! *work2(i,k)*coeres) psmlt(i,k) = (1.414e3*(1.496e-6*((t(i,k))*sqrt(t(i,k))) & /((t(i,k))+120.)/(den(i,k)) )*(den(i,k))) & /xlf*(t0c-t(i,k))*pi/2. & *n0sfac(i,k)*(precs1*rslope2(i,k,2)+precs2 & *work2(i,k)*coeres) psmlt(i,k) = min(max(psmlt(i,k)*dtcld/mstep(i), & -qrs(i,k,2)/mstep(i)),0.)
Disrupting the Borg is expensive and time consuming!
Google Search
-
Recent Posts
- Scientific American Editor In Chief Speaks Out
- The End Of Everything
- Harris To Win In A Blowout
- Election Results
- “Glaciers, Icebergs Melt As World Gets Warmer”
- “falsely labeling”
- Vote For Change By Electing The Incumbent
- Protesting Too Much Snow
- Glaciers Vs. The Hockey Stick
- CNN : Unvaccinated Should Not Be Allowed To Leave Their Homes
- IPCC : Himalayan Glaciers Gone By 2035
- Deadly Cyclones And Arctic Sea Ice
- What About The Middle Part?
- “filled with racist remarks”
- Defacing Art Can Prevent Floods
- The Worst Disaster Year In History
- Harris Wins Pennsylvania
- “politicians & shills bankrolled by the fossil fuel industry”
- UN : CO2 Killing Babies
- Patriotic Clapper Misspoke
- New York Times Headlines
- Settled Science At The New York Times
- “Teasing Out” Junk Science
- Moving From 0% to 100% In Six Years
- “Only 3.4% of Journalists Are Republican”
Recent Comments
- Richard E Fritz on Election Results
- Richard E Fritz on The End Of Everything
- Richard E Fritz on Scientific American Editor In Chief Speaks Out
- Reid on Scientific American Editor In Chief Speaks Out
- Fred Harwood on Scientific American Editor In Chief Speaks Out
- arn on The End Of Everything
- William on The End Of Everything
- Robertvd on Scientific American Editor In Chief Speaks Out
- Robertvd on Scientific American Editor In Chief Speaks Out
- arn on Scientific American Editor In Chief Speaks Out
lol, what the hell is that?
psmlt(i,k) = GIGO…
Yah! psmlt (i,k) = ……… in 3 successive statements. Beautiful.
The first of those statements is commented out. In the second the programmer is using psmlt(i,k) as a temporary variable (note how it is used in the next statement.
Ok, I see the pipe for the comment. Then they define the variable psmlt(i,k)
Then they use the temp definition to describe the variable psmlt(i,k) ?
I’ll do a followup explaining what it is and what is wrong with the coding style.
It’s used in the min(max(psmlt(i,k)… statement in the next line.
I started to get a little bit confused after seeing the word “work”, but then it always has that effect on me.
That can NOT be real code, it completely destroys whatever data is in ‘Log’.
It appears to be a secret star chart!! am I joking??
lol, I’ve no idea! I’m just an IT type. I’ve coded a bit, but I’ve never seen anything as goofy looking as this. Almost always, regardless of the language, I can view a few lines of code and follow the line of thought……….
The code works, it is just very badly written.
Yeh, well, like I said, I can usually follow…… what is it that they’re doing?
The lapse rate in the atmosphere of a celestial body with no GHGs?
It is either to figure out how many angels can dance on the head of a pin, or it is Michael Mann’s code to determine the global average temperature to within 0.01 degree from three strip bark trees in Yamal.
Something with a planet in orbit around the sun and IR or photons through a dense atmosphere?
p, t, den, dtcld ? No, this isn’t particularly well-written code.
I once had to port a photogrammetric software package from Fortran to C++. Looked similar. I ended up automating the translation with some scripts; just converting the syntax. No way i could have refactored it to look sane. You can call me Harry. 😉
And guess who wrote the Fortran package in the first place… yeah, right, scientists.
All those “magic numbers”… maintaining this garbage must almost be a full time job!
I’m a programmer by trade.. there’s a term for code like that:
Maintenance Nightmare
Most times even the original author will waste too much time working out what it does, especially if they haven’t looked at it for some time.
It’s not that bad, but there are too many “magic numbers”. Many of the constants should be defined, and it might be helpful to have better variable names if the person reading the code doesn’t know what it is supposed to do, but otherwise, it is not that bad. A complex mathematical calculation is a complex mathematical calculation. Live with it. Breaking it up would actually make it less clear if you know what you are looking at.
Programming 101:
Recursion! The general method of solving problems by reducing them to simpler problems, It’s not about making an understood equation more complex, ever! it’s in-fact the opposite. For example the general framework for a recursive solution to a complex program looks like this.
Solve recursively (problem)
If the problem is trivial, do the obvious
Simplify the problem! (D’oh)
Solve recursively (simpler problem)
(possibly) combine the solution to the simpler problem(s)
into a solution of the original problem.
“Any intelligent fool can make things bigger and more complex…
It takes a touch of genius – and a lot of courage to move in the opposite direction.”
“As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.”
Albert Einstein
Basically, statically complex (even if apparently accurate) ratios are BULL SH1T!!
I recently got involved in an online exchange at Shub Niggurath’s on a (to me) obvious point:
A computer, as the saying goes, is an ass, i.e. it will only do what asked and will only do it literally. Anybody programming it without the necessary level of expertise is bound to be lead around by the ass.
In other words, the vast majority of scientific papers based on computer models are very likely to be elegantly-thought garbage.
As far as Climate Computer Models refer to reality, they are not certain; and as far as they are certain, they do not refer to reality.