#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Options

# Azimuth Code Project questions

Over on Google+, Jim Stuttard wrote:

What do people think about the current state of play on the Azimuth Code Project? There are examples in Java, C++, R and Sage. A goal is to produce some interactive learning pages on the cloud. This either (non-exclusively) requires an ISP account with shell access eg from Linode, some rich academy, friendly online publisher or other where people can run multiple language compilers with some web service front end or port apps to a single language, e.g. Javascript or php (uggh) on a low-cost ISP without shell access.

I posted the FFT link as an example which would work on the low-cost solution and seems to fit the Azimuth spec for an educational web service. Perhaps there could be an Azimuth wiki page with useful software links? Incidentally, the Azimuth code project wiki page doesn't mention any of the interactive examples on the wiki or link the googlecode repo just coding standards which perhaps should be a different page.

A couple of environmentally-friendly C++ programmers and I have made some mods to David Tweed's excellent DSE code which he has kindly accepted. I'm just waiting for an account on google code to commit them. David's raised some interesting topics e.g. automatic differentiation on the Azimuth chat pages which I'm trying to get time to think about and reply to.

• Options
1.
edited February 2012

Jim wrote:

What do people think about the current state of play on the Azimuth Code Project?

I feel guilty about not doing more here... things are moving too slowly. I can't exactly take the lead, since I don't know enough about programming, but there are things I should do that I haven't been doing: mainly, publicizing the software that's already been written.

Also, I'm a bit unhappy that the models you and Allan have kindly coded up doesn't really illustrate global warming, because (as Nathan pointed out) for that we need to model a reservoir of CO2 that 1) affects the Earth's temperature, 2) gets added to by human causes and 3) slowly goes away, left to its own devices. A simple model of this sort is not so hard to write down, but I've been feeling bad about giving people more work when I haven't even publicized the work that's been done.

Somehow this has me trapped in a loop, which I will have to break out of.

his either (non-exclusively) requires an ISP account with shell access eg from Linode, some rich academy, friendly online publisher or other where people can run multiple language compilers with some web service front end or port apps to a single language, e.g. Javascript or php (uggh) on a low-cost ISP without shell access.

How about if I tried to get you an account on the U.C. Riverside computer? I think we could fill out some forms saying you're a 'volunteer' working on a project with me.

Perhaps there could be an Azimuth wiki page with useful software links?

Go for it! Check out the existing pages in the category 'software' and either add to them or create new ones.

As usual:

1) when you create a new page in some category, announce it here in that category. (When you click 'Start a Discussion' you'll get a choice of categories.)

2) when you add to an existing page, tell us about in the discussion about that page. (Click 'Search' to find that discussion.)

Incidentally, the Azimuth Code Project wiki page doesn't mention any of the interactive examples on the wiki or link the googlecode repo just coding standards which perhaps should be a different page.

The 'Azimuth Code Project' has mainly been Tim van Beek's baby, so that page reflects his concerns and his vision for the Azimuth Code Project. Feel free to modify that page - unless Tim hates the idea, in which case you can start some other page with another name.

Comment Source:Jim wrote: > What do people think about the current state of play on the Azimuth Code Project? I feel guilty about not doing more here... things are moving too slowly. I can't exactly take the lead, since I don't know enough about programming, but there are things I should do that I haven't been doing: mainly, publicizing the software that's already been written. Also, I'm a bit unhappy that the models you and Allan have kindly coded up doesn't really illustrate global warming, because (as Nathan pointed out) for that we need to model a reservoir of CO<sub>2</sub> that 1) affects the Earth's temperature, 2) gets added to by human causes and 3) slowly goes away, left to its own devices. A simple model of this sort is not so hard to write down, but I've been feeling bad about giving people more work when I haven't even publicized the work that's been done. Somehow this has me trapped in a loop, which I will have to break out of. > his either (non-exclusively) requires an ISP account with shell access eg from Linode, some rich academy, friendly online publisher or other where people can run multiple language compilers with some web service front end or port apps to a single language, e.g. Javascript or php (uggh) on a low-cost ISP without shell access. How about if I tried to get you an account on the U.C. Riverside computer? I think we could fill out some forms saying you're a 'volunteer' working on a project with me. > Perhaps there could be an Azimuth wiki page with useful software links? Go for it! Check out the [existing pages in the category 'software'](http://www.azimuthproject.org/azimuth/show/Software) and either add to them or create new ones. As usual: 1) when you create a new page in some category, announce it here in that category. (When you click 'Start a Discussion' you'll get a choice of categories.) 2) when you add to an existing page, tell us about in the discussion about that page. (Click 'Search' to find that discussion.) > Incidentally, the Azimuth Code Project wiki page doesn't mention any of the interactive examples on the wiki or link the googlecode repo just coding standards which perhaps should be a different page. The 'Azimuth Code Project' has mainly been Tim van Beek's baby, so that page reflects his concerns and his vision for the Azimuth Code Project. Feel free to modify that page - unless Tim hates the idea, in which case you can start some other page with another name.
• Options
2.

Since the "Azimuth Code Project" has neither found an audience nor a dedicated developer team yet, it is open to anyone who would like to contribute to do with it what he/her likes, within the bounds of the general Azimuth ideas.

Comment Source:Since the "Azimuth Code Project" has neither found an audience nor a dedicated developer team yet, it is open to anyone who would like to contribute to do with it what he/her likes, within the bounds of the general Azimuth ideas.
• Options
3.

You could add some simple one-box or two-box linear carbon cycle model pretty easily, maybe a linear impulse response model. I'm more interested in seeing a model with heat capacity and transient dynamics in it. Do the models in progress have this (i.e., are they differential equations), or do they relax instantaneously to equilibrium?

By the way, I'm becoming interested in stochastic climate modeling, with an emphasis on modern climate rather than paleoclimate. I'm looking at two approaches. First are regression models, which attempt to identify a simple stochastic differential equation from data. For example, "linear inverse models", which fit a Langevin equation to climate data, under an assumption of linearized dynamics. Second is stochastic mode reduction, a particular scheme for starting from a differential equation with "fast" and "slow" variables, and integrating out the "fast" ones to derive a reduced stochastic equation for the "slow" variables only.

However, I'm extremely overburdened right now and probably can't devote any coding time to this for 6 months ...

Comment Source:You could add some simple one-box or two-box linear carbon cycle model pretty easily, maybe a linear impulse response model. I'm more interested in seeing a model with heat capacity and transient dynamics in it. Do the models in progress have this (i.e., are they differential equations), or do they relax instantaneously to equilibrium? By the way, I'm becoming interested in stochastic climate modeling, with an emphasis on modern climate rather than paleoclimate. I'm looking at two approaches. First are regression models, which attempt to identify a simple stochastic differential equation from data. For example, "linear inverse models", which fit a Langevin equation to climate data, under an assumption of linearized dynamics. Second is stochastic mode reduction, a particular scheme for starting from a differential equation with "fast" and "slow" variables, and integrating out the "fast" ones to derive a reduced stochastic equation for the "slow" variables only. However, I'm extremely overburdened right now and probably can't devote any coding time to this for 6 months ...
• Options
4.

Hi Nathan, this is the moment where the Azimuth wiki could play the part that John intended it to play, since we have some material about stochastic dynamics up there:

Comment Source:Hi Nathan, this is the moment where the Azimuth wiki could play the part that John intended it to play, since we have some material about stochastic dynamics up there: * [[stochastic differential equation]] * [[Stochastic delay differential equation]] * [[Parametric estimation for stochastic differential equations]] * [[stochastic resonance]]
• Options
5.
edited February 2012

Nathan wrote:

You could add some simple one-box or two-box linear carbon cycle model pretty easily, maybe a linear impulse response model. I'm more interested in seeing a model with heat capacity and transient dynamics in it. Do the models in progress have this (i.e., are they differential equations), or do they relax instantaneously to equilibrium?

Allan Erskine has a differential equation up and running on this webpage, as discussed in the thread A simple online climate model.

It graphs several solutions, with different initial conditions, of a temperature $T(t)$ obeying

$$C \frac{d T}{d t} = - A - B T + Q(t) \, a_p(T(t))$$ where

$$a_p(T) = a_i + \frac{1}{2} (a_f-a_i) (1 + \tanh(\gamma T))$$ and

$$a_i=0.35, \qquad a_f=0.7$$ and

• $A=218$ watts per square meter,

• $B=1.90$ watts per square meter per degree Celsius,

• $C = 5 \times 10^6$ per degree Celsius,

and most importantly:

$$Q(t) = 342.5 + f(t)$$ where $f$ is a function with $f(t) = X$ for $0 \le t \le T$, and $f(t) = 0$ outside that interval.

The user can choose:

1. the constant $\gamma$
2. the time $T$,
3. the constant $X$.

I need to publicize this model, and I will soon.

However, I'm wanting a system where I can try different models and find out which ones are 'fun' or enlightening without forcing someone else to do a lot of programming. This model needs to be improved to be more fun and enlightening, but I feel like a jerk asking someone else to improve it!

Comment Source:Nathan wrote: > You could add some simple one-box or two-box linear carbon cycle model pretty easily, maybe a linear impulse response model. I'm more interested in seeing a model with heat capacity and transient dynamics in it. Do the models in progress have this (i.e., are they differential equations), or do they relax instantaneously to equilibrium? Allan Erskine has a differential equation up and running on [this webpage](http://64.131.197.246/~aerskine/azimuth-coalbedo-example-dev/www/coalbedo2.html), as discussed in the thread [A simple online climate model](http://www.math.ntnu.no/~stacey/Mathforge/Azimuth/comments.php?DiscussionID=892&Focus=6042#Comment_6042). It graphs several solutions, with different initial conditions, of a temperature $T(t)$ obeying $$C \frac{d T}{d t} = - A - B T + Q(t) \, a_p(T(t))$$ where $$a_p(T) = a_i + \frac{1}{2} (a_f-a_i) (1 + \tanh(\gamma T))$$ and $$a_i=0.35, \qquad a_f=0.7$$ and * $A=218$ watts per square meter, * $B=1.90$ watts per square meter per degree Celsius, * $C = 5 \times 10^6$ per degree Celsius, and most importantly: $$Q(t) = 342.5 + f(t)$$ where $f$ is a function with $f(t) = X$ for $0 \le t \le T$, and $f(t) = 0$ outside that interval. The user can choose: 1. the constant $\gamma$ 2. the time $T$, 3. the constant $X$. I need to publicize this model, and I will soon. However, I'm wanting a system where I can try different models and find out which ones are 'fun' or enlightening without forcing someone else to do a lot of programming. This model needs to be improved to be more fun and enlightening, but I feel like a jerk asking someone else to improve it!
• Options
6.
edited March 2012

John Baez wrote:

How about if I tried to get you an account on the U.C. Riverside computer?


That would be great but before you spend any time I'll try and produce some prototypes with visuals.

Unfortunately I haven't yet been able to try Allan's java code (his build system (maven) is one version above mine at the moment). I'm just reading the wiki page now.

Just as a nudge towards proper specifications I typed up the zero -dimension EBM using Nathan's equation:

testCO2 = temp lambda 4.3

temp lambda f = (-f)/totalF where
lambda0 = 3.2  :: Double -- Plank
totalF   = avLambda - lambda0
avLambda     = (maxSumF - minSumF)/2
minSumF = foldl (+) 0 (fmap fst lambda)
maxSumF = foldl (+) 0 (fmap snd lambda)

lambda = [waterVapour,lapseRate,clouds,albedo] where
waterVapour = (1.48,2.14)
lapseRate = (-0.41,-1.27)
clouds = (0.18,1.18)
albedo = (0.07,0.34)


The simplest relationship to show may be a temperature histogram with min, max and average temperature vs CO2 levels with a single slider? This needs the relevant data.

I think there are plenty of alert programmers who will code almost anything, providing they are given a procedural specification eg. a worked example and an exact description of what the user wants to see and do.

My notebook has just gone on the blink and I've got paperwork to do for a few days but will continue asap.

Cheers

Comment Source:John Baez wrote: <pre> How about if I tried to get you an account on the U.C. Riverside computer? </pre> That would be great but before you spend any time I'll try and produce some prototypes with visuals. Unfortunately I haven't yet been able to try Allan's java code (his build system (maven) is one version above mine at the moment). I'm just reading the wiki page now. Just as a nudge towards proper specifications I typed up the zero -dimension EBM using Nathan's equation: <pre> testCO2 = temp lambda 4.3 temp lambda f = (-f)/totalF where lambda0 = 3.2 :: Double -- Plank totalF = avLambda - lambda0 avLambda = (maxSumF - minSumF)/2 minSumF = foldl (+) 0 (fmap fst lambda) maxSumF = foldl (+) 0 (fmap snd lambda) lambda = [waterVapour,lapseRate,clouds,albedo] where waterVapour = (1.48,2.14) lapseRate = (-0.41,-1.27) clouds = (0.18,1.18) albedo = (0.07,0.34) </pre> The simplest relationship to show may be a temperature histogram with min, max and average temperature vs CO2 levels with a single slider? This needs the relevant data. I think there are plenty of alert programmers who will code almost anything, providing they are given a procedural specification eg. a worked example and an exact description of what the user wants to see and do. My notebook has just gone on the blink and I've got paperwork to do for a few days but will continue asap. Cheers
• Options
7.

John,

However, I'm wanting a system where I can try different models and find out which ones are 'fun' or enlightening without forcing someone else to do a lot of programming.

I'm not volunteering at the moment, but one possibility is to design the simulation so that it takes the dynamical equations as input as a text file, parses the equation text into internal code, and solves that system of equations. Then you wouldn't have to modify the simulation code to try out different model structures. A non-programmer could just modify the input file containing the desired system of equations (and initial and parameter values).

This might be relatively easy in a language that can execute user-specified code at runtime (you'd have to sanitize it first so no one injects malicious non-numerical code) and has a good ODE solver library.

Comment Source:John, > However, I'm wanting a system where I can try different models and find out which ones are 'fun' or enlightening without forcing someone else to do a lot of programming. I'm not volunteering at the moment, but one possibility is to design the simulation so that it takes the dynamical equations as input as a text file, parses the equation text into internal code, and solves that system of equations. Then you wouldn't have to modify the simulation code to try out different model structures. A non-programmer could just modify the input file containing the desired system of equations (and initial and parameter values). This might be relatively easy in a language that can execute user-specified code at runtime (you'd have to sanitize it first so no one injects malicious non-numerical code) and has a good ODE solver library.
• Options
8.
edited February 2012

Nathan wrote:

I'm not volunteering at the moment, but one possibility is to design the simulation so that it takes the dynamical equations as input as a text file, parses the equation text into internal code, and solves that system of equations.

I would love this! But of course this code requires a bigger up-front investment in programmer time than the code for one particular model.

Jim wrote:

I think there are plenty of alert programmers who will code almost anything, providing they are given a procedural specification eg. a worked example and an exact description of what the user wants to see and do.

Where the hell are these guys?

Oh, maybe you're one. But I could use an army of them.

Of course, writing precise specifications for an army of alert programmers would take a lot of time. But so far I've mainly been limited, not by time, but by my embarrassment at asking people to program something and then saying "well, that's really nice but what I should have asked for was this."

Perhaps my embarrassment is misplaced? Perhaps you're hinting that on the blog I should write a bunch of precise specifications, and hope for programmers to come along and help out?

Comment Source:Nathan wrote: > I'm not volunteering at the moment, but one possibility is to design the simulation so that it takes the dynamical equations as input as a text file, parses the equation text into internal code, and solves that system of equations. I would love this! But of course this code requires a bigger up-front investment in programmer time than the code for one particular model. Jim wrote: > I think there are plenty of alert programmers who will code almost anything, providing they are given a procedural specification eg. a worked example and an exact description of what the user wants to see and do. Where the hell are these guys? <img src = "http://math.ucr.edu/home/baez/emoticons/tongue2.gif" alt = ""/> Oh, maybe you're one. But I could use an army of them. Of course, writing precise specifications for an army of alert programmers would take a lot of time. But so far I've mainly been limited, not by time, but by my embarrassment at asking people to program something and then saying "well, that's really nice but what I _should_ have asked for was _this_." Perhaps my embarrassment is misplaced? Perhaps you're hinting that on the blog I should write a bunch of precise specifications, and hope for programmers to come along and help out?
• Options
9.

John,

I would love this! But of course this code requires a bigger up-front investment in programmer time than the code for one particular model.

True, but as I suggested, maybe not as much as one might think, since there are already libraries out there to parse equations from text, solve systems of ODEs, etc.

Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model? That might dictate how easy/hard it would be to write the kind of generic back end I'm proposing.

Comment Source:John, > I would love this! But of course this code requires a bigger up-front investment in programmer time than the code for one particular model. True, but as I suggested, maybe not as much as one might think, since there are already libraries out there to parse equations from text, solve systems of ODEs, etc. Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model? That might dictate how easy/hard it would be to write the kind of generic back end I'm proposing.
• Options
10.

Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model?

I think they'd better answer this question, not me!

Comment Source:> Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model? I think they'd better answer this question, not me!
• Options
11.
edited March 2012

Briefly, my friend and collaborator Glyn Adgie has applied to join the project and is, I think, waiting for moderation :)

We've just started on some prototype experiments using a haskell 2D library called gloss. This completely hides javascript, html and any of that horrible user interace widget stuff from the programmer. It allows you to paste haskell code (including any equation you like) into a picture, animation, simulation or game window, press run and hey presto.

It's the library used by Chris Smith's wonderful Haskell for Kids project. You can play with it at:

dac4.designacourse.com:8000 (NB the port number :8000 is required).

(I couldn't get a url with a port number to work using the current markup).

I think Haskell for Kids maybe excellent for people like non-programmer theoretical physicists and others of appropriate playfulness.

Comment Source:Briefly, my friend and collaborator Glyn Adgie has applied to join the project and is, I think, waiting for moderation :) We've just started on some prototype experiments using a haskell 2D library called [gloss](http://bit.ly/wZ1bDo). This completely hides javascript, html and any of that horrible user interace widget stuff from the programmer. It allows you to paste haskell code (including any equation you like) into a picture, animation, simulation or game window, press run and hey presto. It's the library used by Chris Smith's wonderful [Haskell for Kids project](http://bit.ly/qECDdx). You can play with it at: dac4.designacourse.com:8000 (NB the port number :8000 is required). (I couldn't get a url with a port number to work using the current markup). I think Haskell for Kids maybe excellent for people like non-programmer theoretical physicists and others of appropriate playfulness.
• Options
12.

Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model?

We agreed to try to do it with just JavaScript, which clearly is not the kind of framework that anyone seriously working in numerics would use. The software that takes equations and do stuff with it is already there, it is Mathematica, Matlab and Sage. What you are looking for is a web interface for Sage. It already has one, but may be lacking some features. Some of us could join the Sage developer team and implement the stuff that is missing. I tried some months ago, but for unkown reason never got a reaction from them. But I could try again.

For serious work in programming I think there is no way around using C++. I need more control over the concrete implementations of algorithms than the domain languages of Mathematica or Sage offer. I'm very unhappy with Sage using Pyhton as glue language, gluing C and C++ modules. Python is a toy. It's like the Sage crowd are experimentalists and I'm a mathematician and am told that the Lesbegue integral is superfluous, which is proven by the fact that the experimentalists can calculate everything they need without using it. Sure, true, but...oh well.

But for what you are looking for, a web interface for a Sage backend is clearly the way to go.

Comment Source:<blockquote> <p> Have the other "online climate model" people in Azimuth converged on a programming language to drive an interactive Earth system model? </p> </blockquote> We agreed to try to do it with just JavaScript, which clearly is not the kind of framework that anyone seriously working in numerics would use. The software that takes equations and do stuff with it is already there, it is Mathematica, Matlab and Sage. What you are looking for is a web interface for Sage. It already has one, but may be lacking some features. Some of us could join the Sage developer team and implement the stuff that is missing. I tried some months ago, but for unkown reason never got a reaction from them. But I could try again. For serious work in programming I think there is no way around using C++. I need more control over the concrete implementations of algorithms than the domain languages of Mathematica or Sage offer. I'm very unhappy with Sage using Pyhton as glue language, gluing C and C++ modules. Python is a toy. It's like the Sage crowd are experimentalists and I'm a mathematician and am told that the Lesbegue integral is superfluous, which is proven by the fact that the experimentalists can calculate everything they need without using it. Sure, true, but...oh well. But for what you are looking for, a web interface for a Sage backend is clearly the way to go.
• Options
13.
edited December 2012

John Baez wrote:

Perhaps you're hinting that on the blog I should write a bunch of precise specifications, and hope for programmers to come along and help out?

I think you might start with briefs for the three models and approach Nathan described, ie.

• one-box linear impulse response
• two-box linear impulse response
• linear inverse regression

and

• stochastic mode reduction

You might find a Project Initiation Document useful (but only as some kind of pro-forma).

I'm happy to help try and convert any brief you write to a (language-independent) specification.

I suggest you might then post a request for programmers to join the project on some of the various programming language (and possibly environmental and other computing) community maiing lists. directing them to these specifications. Then they would have something immediate and practical they could do.

In the haskell community I haven't come across anybody who doesn't seem very alert to most of these issues.

Comment Source:John Baez wrote: > Perhaps you're hinting that on the blog I should write a bunch of precise specifications, and hope for programmers to come along and help out? > I think you might start with briefs for the three models and approach Nathan described, ie. > * one-box linear impulse response > * two-box linear impulse response > * linear inverse regression > and > * stochastic mode reduction You might find a [Project Initiation Document](http://bit.ly/1gQg0v) useful (but only as some kind of pro-forma). I'm happy to help try and convert any brief you write to a (language-independent) specification. I suggest you might then post a request for programmers to join the project on some of the various programming language (and possibly environmental and other computing) community maiing lists. directing them to these specifications. Then they would have something immediate and practical they could do. In the haskell community I haven't come across anybody who doesn't seem very alert to most of these issues.
• Options
14.

Hi all -- I'm back from parenthood! Young Alex Erskine is a sweet little five-week-old and presumably self-sufficient enough now that I can hang out here again (I've left him some milk in the fridge and endowed his college fund with $10b, which should hopefully almost cover his$1k online/intra-retinal college fees in 20 years time).

On the subject of languages, and to back-up what Tim said elsewhere, we elected to use JavaScript so we could create something self-contained and avoid anyone having to run a server. I love the Haskell for Kids project project you linked to, and curiously I noticed it somewhere else just days before. But it requires someone somewhere to run up a server, and to keep it running forever (or for however long the web-page with the interactive graphic is in existence).

Comment Source:Hi all -- I'm back from parenthood! Young Alex Erskine is a sweet little five-week-old and presumably self-sufficient enough now that I can hang out here again (I've left him some milk in the fridge and endowed his college fund with \$10b, which should hopefully almost cover his \$1k online/intra-retinal college fees in 20 years time). +Jim Stuttard, it's good to see you here! I've been enjoying your Haskell Google+ posts. On the subject of languages, and to back-up what Tim said elsewhere, we elected to use JavaScript so we could create something self-contained and avoid anyone having to run a server. I love the [Haskell for Kids project](http://bit.ly/qECDdx) project you linked to, and curiously I noticed it somewhere else just days before. But it requires someone somewhere to run up a server, and to keep it running forever (or for however long the web-page with the interactive graphic is in existence).
• Options
15.

On the subject of languages, has anyone checked-out the new Julia language?

It looks promising -- and renders its plots via D3, which nad had mentioned a while back.

Comment Source:On the subject of languages, has anyone checked-out the new [Julia language](http://julialang.org/)? It looks promising -- and renders its plots via [D3](http://mbostock.github.com/d3/), which nad had mentioned a while back.
• Options
16.

Jim wrote:

Briefly, my friend and collaborator Glyn Adgie has applied to join the project ...

Great!

... and is, I think, waiting for moderation :)

His name isn't in the queue. Either he did something wrong, or the software is acting up. or Andrew Stacey and I haven't changed the instructions on the Forum help page enough after Andrew changed the login system. Can you have him email me? My email address is very easy to find at the bottom of my webpages - just make sure he removes the two obvious words!

Comment Source:Jim wrote: > Briefly, my friend and collaborator Glyn Adgie has applied to join the project ... Great! > ... and is, I think, waiting for moderation :) His name isn't in the queue. Either he did something wrong, or the software is acting up. or Andrew Stacey and I haven't changed the instructions on the [[Forum help]] page enough after Andrew changed the login system. Can you have him email me? My email address is very easy to find at the bottom of my webpages - just make sure he removes the two obvious words!
• Options
17.

Allan wrote:

Hi all -- I'm back from parenthood! Young Alex Erskine is a sweet little five-week-old ...

Yay! Congratulations!

Comment Source:Allan wrote: > Hi all -- I'm back from parenthood! Young Alex Erskine is a sweet little five-week-old ... Yay! Congratulations!
• Options
18.

Jim wrote:

I think you might start with briefs for the three models and approach Nathan described, ie.

• one-box linear impulse response
• two-box linear impulse response
• linear inverse regression

and

• stochastic mode reduction

You might find a Project Initiation Document useful (but only as some kind of pro-forma).

I'm happy to help try and convert any brief you write to a (language-independent) specification.

Great! That sounds excellent. I'll add that to my list of projects!

Comment Source:Jim wrote: > I think you might start with briefs for the three models and approach Nathan described, ie. > * one-box linear impulse response > * two-box linear impulse response > * linear inverse regression > and > * stochastic mode reduction > You might find a [Project Initiation Document](http://bit.ly/1gQg0v) useful (but only as some kind of pro-forma). > I'm happy to help try and convert any brief you write to a (language-independent) specification. Great! That sounds excellent. I'll add that to my list of projects!
• Options
19.

Allan Erskine wrote:

On the subject of languages, has anyone checked-out the new Julia language? It looks promising -- and renders its plots via D3, which nad had mentioned a while back.

My husband Tim had heard about Julia and when I told him that it might be worthwhile to check it out, he started to spend quite a share of his freetime in the last days to look more into it and in particular to figure out how to feed it into webgl. He can't currently register here at the Azimuth forum because the captcha seems to be down. So I post now the link to his website:

Tim Hoffmann Julia screenshots

Comment Source:Allan Erskine wrote: >On the subject of languages, has anyone checked-out the new Julia language? >It looks promising -- and renders its plots via D3, which nad had mentioned a while back. My husband Tim had heard about Julia and when I told him that it might be worthwhile to check it out, he started to spend quite a share of his freetime in the last days to look more into it and in particular to figure out how to feed it into webgl. He can't currently register here at the Azimuth forum because the captcha seems to be down. So I post now the link to his website: <a href="http://www-m10.ma.tum.de/bin/view/Lehrstuhl/SoftwareExperiments">Tim Hoffmann Julia screenshots</a>
• Options
20.

I saw Tim's post on the julia-dev list, it was a hit!

I have to say, I am very optimistic on the intersection of technologies Julia rests upon. On the one hand, Tim could draw upon SceneJS to add new 3D plotting functionality to a nascent language.. now I hesitate to say easily, but I'm guessing also this didn't involve a retreat to a cliff-top monastery.

On the other hand, they have linked to crufty old Fortran and C libraries that everyone in the scientific community trusts. For example FFTW -- I seem to remember a page or two of lament on Azimuth about getting access to such luxuries on the Java platform. Furthermore, there is a Mozilla project called emscripten which can compile all this stuff to JavaScript. Potentially, anyway.

While being nowhere near as productive as Tim it seems, I have also been doing some Julia hacking.. mostly trying to learn the language, plus one of my colleagues is a lisper and loves that it is also homoiconic, lisp-based etc.

Comment Source:I saw Tim's post on the julia-dev list, it was a hit! I have to say, I am very optimistic on the intersection of technologies Julia rests upon. On the one hand, Tim could draw upon SceneJS to add new 3D plotting functionality to a nascent language.. now I hesitate to say easily, but I'm guessing also this didn't involve a retreat to a cliff-top monastery. On the other hand, they have linked to crufty old Fortran and C libraries that everyone in the scientific community trusts. For example FFTW -- I seem to remember a page or two of lament on Azimuth about getting access to such luxuries on the Java platform. Furthermore, there is a Mozilla project called emscripten which can compile all this stuff to JavaScript. Potentially, anyway. While being nowhere near as productive as Tim it seems, I have also been doing some Julia hacking.. mostly trying to learn the language, plus one of my colleagues is a lisper and loves that it is also homoiconic, lisp-based etc.
• Options
21.

Glyn Adgie's been experimenting with julia and will report here when he finally gets registered. I've started from the other end, as it were, with html5 and css3. I've come across this which provides interactive math tutorials using mathlets. Looks useful to me.

Comment Source:Glyn Adgie's been experimenting with julia and will report here when he finally gets registered. I've started from the other end, as it were, with html5 and css3. I've come across [this](http://bit.ly/jSurz) which provides interactive math tutorials using mathlets. Looks useful to me.
• Options
22.
edited March 2012

Hi,

Firstly, I'm currently scheduled to attend an LLVM meeting in a month's time at which there will be a discussion session on the Julia language. It's unlikely being there in person is going to be any different from mailing list discussion but if anyone want's to report any inputs into the Julia language, particularly wrt any concerns for our kind of usage, I should be able to do that.

Secondly, relating to some (particularly Nathan's comments upthread) is there any gathering consensus about what language/technology any of the other parts of Azimuth code project think best for (1) specifying mathematician-style equations that get sent to a backend engine for "evaluation in a simulation" and (2) doing general output display when there is a normal executable running the backend (so the program can't be a pure web-app)? It'd be nice if I could avoid being gratuitously different to any of the other projects (although bonehead that I am, if I believe there's a valid impediment I am of course going to decide to be different :-) )

I've spent a couple of days trying to get my head around using LLVM "in practice", and I've got the bare-bones of a discrete simulation backend starting to work. If anyone is curious about working with LLVM, it's looking to be a bit mixed: pluses:

• it's written by developers who clearly also believe in writing good documentation, with the result that you don't have to do anywhere near as much guess-the-program-writer's-intent as you do with lots of things,

• once you get the correct viewpoint it's surprisingly easy (and little code) to do some quite complicated things.

The big minus so is related to "standard-value-only floating point optimizations". (For the non-computer-guys, while it's ok for computer fixed-size integer arithmetic to rewrite something incredibly simple like $0*x$ to $0$, there are a few "exceptional" values in a computer floating point representation for which this doesn't hold, so if it's trying to be "as accurate as it can be using hardware floating point" a compiler can't remove that CPU operation, and hence save the time it takes. For other "valid over the mathematical Real's" equivalences there are often things that prevent equivalences you'd naturally use from being automatically applied.) It looks like there's just two modes in LLVM: "being strict" and "lots of simplifications with varying amounts of instances that violate them", and equally concerningly these optimisations appear to be applied only at the conversion to actual machine-code-for-this-CPU, so that it's difficult to inspect what has been done to check it's ok. I'll have to see if I'm wrong about this, if there's an easy fix or if this is a fundamental obstacle to my plans. (And these plans may have to be put on the back burner due to other concerns soon anyway.)

Certainly LLVM looks like a useful technology for making certain kinds of ad-hoc computer languages a lot, lot easier to implement.

Comment Source:Hi, Firstly, I'm currently scheduled to attend an LLVM meeting in a month's time at which there will be a discussion session on the Julia language. It's unlikely being there in person is going to be any different from mailing list discussion but if anyone want's to report any inputs into the Julia language, particularly wrt any concerns for our kind of usage, I should be able to do that. Secondly, relating to some (particularly Nathan's comments upthread) is there any gathering consensus about what language/technology any of the other parts of Azimuth code project think best for (1) specifying mathematician-style equations that get sent to a backend engine for "evaluation in a simulation" and (2) doing general output display when there is a normal executable running the backend (so the program can't be a pure web-app)? It'd be nice if I could avoid being gratuitously different to any of the other projects (although bonehead that I am, if I believe there's a valid impediment I am of course going to decide to be different :-) ) I've spent a couple of days trying to get my head around using LLVM "in practice", and I've got the bare-bones of a discrete simulation _backend_ starting to work. If anyone is curious about working with LLVM, it's looking to be a bit mixed: pluses: * it's written by developers who clearly also believe in writing good documentation, with the result that you don't have to do anywhere near as much guess-the-program-writer's-intent as you do with lots of things, * once you get the correct viewpoint it's surprisingly easy (and little code) to do some quite complicated things. The big minus so is related to "standard-value-only floating point optimizations". (For the non-computer-guys, while it's ok for computer _fixed-size integer arithmetic_ to rewrite something incredibly simple like $0*x$ to $0$, there are a few "exceptional" values in a computer _floating point representation_ for which this doesn't hold, so if it's trying to be "as accurate as it can be using hardware floating point" a compiler can't remove that CPU operation, and hence save the time it takes. For other "valid over the mathematical Real's" equivalences there are often things that prevent equivalences you'd naturally use from being automatically applied.) It looks like there's just two modes in LLVM: "being strict" and "lots of simplifications with varying amounts of instances that violate them", and equally concerningly these optimisations appear to be applied only at the conversion to actual machine-code-for-this-CPU, so that it's difficult to inspect what has been done to check it's ok. I'll have to see if I'm wrong about this, if there's an easy fix or if this is a fundamental obstacle to my plans. (And these plans may have to be put on the back burner due to other concerns soon anyway.) Certainly LLVM looks like a useful technology for making certain kinds of ad-hoc computer languages a lot, lot easier to implement.
• Options
23.

David,

What's the reason for avoiding being "a pure web-app"?

Comment Source:David, What's the reason for avoiding being "a pure web-app"?
• Options
24.
edited March 2012

Hi Nathan,

By "pure web-app" I mean something that runs purely in the end-users browser. I don't know much about web-technologies, but I gather it's not too hard to take a web-technology like Javascript and "bolt it onto" a normal executable.

The kind of discrete-time ecological simulation I'm interested in are those where even computing an approximation is likely to be quite computationally intensive (maybe taking a couple of hours up to maybe running overnight). My understanding is that most of the supported browser "programming platforms" (Javascript, etc) aren't really achieving within an order of magnitude performance relative to native execution performance for numerical code. That's partly because the concerns they address well (rapid prototyping, cross-platform binary-executable executability and security) aren't really things that should matter for open source numerical code but they cost raw performance. (I think google is still working on Native Client, but that's a still evolving platform which is implemented, but not enabled by default AFAIK, in one browser so it looks to me like the programming constraints it imposes aren't rewarded by much in the way of widespread usability.)

However, I'll be perfectly honest and admit that I've chosen these goals and approach partly because I'm interested in learning about the potential of this "dynamic specialised compilation" approach to simulation calculation as well as because I think it's a good way of doing discrete simulation. If I was thinking only of quickly creating something for running ecological simulations I might well make different choices.

Comment Source:Hi Nathan, By "pure web-app" I mean something that runs purely in the end-users browser. I don't know much about web-technologies, but I gather it's not too hard to take a web-technology like Javascript and "bolt it onto" a normal executable. The kind of discrete-time ecological simulation I'm interested in are those where even computing an approximation is likely to be quite computationally intensive (maybe taking a couple of hours up to maybe running overnight). My understanding is that most of the supported browser "programming platforms" (Javascript, etc) aren't really achieving within an order of magnitude performance relative to native execution performance for numerical code. That's partly because the concerns they address well (rapid prototyping, cross-platform binary-executable executability and security) aren't really things that should matter for open source numerical code but they cost raw performance. (I think google is still working on Native Client, but that's a still evolving platform which is implemented, but not enabled by default AFAIK, in one browser so it looks to me like the programming constraints it imposes aren't rewarded by much in the way of widespread usability.) However, I'll be perfectly honest and admit that I've chosen these goals and approach partly because I'm interested in learning about the potential of this "dynamic specialised compilation" approach to simulation calculation as well as because I think it's a good way of doing discrete simulation. If I was thinking only of quickly creating something for running ecological simulations I might well make different choices.
• Options
25.

Thanks for the explanation. Interestingly, from the limited benchmarks I saw on the Julia web site, Javascript numerical performance is actually pretty comparable to Julia (and within an order of magnitude of C). The main exception seems to be matrix math since Javascript can't link to native libraries like LAPACK. I suppose that's a pretty big caveat for numerical work.

Comment Source:Thanks for the explanation. Interestingly, from the limited benchmarks I saw on the Julia web site, Javascript numerical performance is actually pretty comparable to Julia (and within an order of magnitude of C). The main exception seems to be matrix math since Javascript can't link to native libraries like LAPACK. I suppose that's a pretty big caveat for numerical work.
• Options
26.
edited March 2012

I've set up a haskell snap server on a vps (virtual private server) at linux.usecs.co.uk:8000. it only has 1 64-bit core with 1GB ram; but in future John Baez has said he may be able to offer use of another system (hopefully with considerably more power).

My idea was to prototype both interactive server-side and client-side javascript applications. eg. I've compiled and run the U. Texas Burgers equation Fortran90 code but it's a command line with 48 input parameters.

I started porting this to haskell about six months ago but when John Baez said he wasn't too interested in Burgers I put it on the back burner. It uses Crank-Nicholson but I guess it shouldn't be too hard to hack a spectral solution.

At the moment I'm running gcc, ghc, llvm and fortran compilers and have blas and lapack etc installed. Obviously we could run almost any program which compiles to scientific linux.

Does anyone have any suggestion as to which if any of the existing azimuth applications they'd like to play with online first?

I'm really enjoying this project, especially the satisfying brain-ache of trying to learn high-performance CFD almost from scratch.

Comment Source:I've set up a haskell snap server on a vps (virtual private server) at linux.usecs.co.uk:8000. it only has 1 64-bit core with 1GB ram; but in future John Baez has said he may be able to offer use of another system (hopefully with considerably more power). My idea was to prototype both interactive server-side and client-side javascript applications. eg. I've compiled and run the U. Texas Burgers equation Fortran90 code but it's a command line with 48 input parameters. I started porting this to haskell about six months ago but when John Baez said he wasn't too interested in Burgers I put it on the back burner. It uses Crank-Nicholson but I guess it shouldn't be too hard to hack a spectral solution. At the moment I'm running gcc, ghc, llvm and fortran compilers and have blas and lapack etc installed. Obviously we could run almost any program which compiles to scientific linux. Does anyone have any suggestion as to which if any of the existing azimuth applications they'd like to play with online first? I'm really enjoying this project, especially the satisfying brain-ache of trying to learn high-performance CFD almost from scratch.
• Options
27.
edited March 2012

Jim wrote:

Does anyone have any suggestion as to which if any of the existing azimuth applications they'd like to play with online first?

My own dream, which shouldn't take precedence over anyone else's, is to work through Gerald R. North's Simple Models of Global Climate, write up explanations of these models, and get someone else to create versions that work online. That would educate all of us in the basics of climate science and also make it easier for other people to learn this material.

To see how far we've gotten so far, check out this. The actual programs now working online are here (Allan Erskine), here (Lesley de Cruz) and here (Allan Erskine).

Comment Source:Jim wrote: > Does anyone have any suggestion as to which if any of the existing azimuth applications they'd like to play with online first? My own dream, which shouldn't take precedence over anyone else's, is to work through Gerald R. North's _Simple Models of Global Climate_, write up explanations of these models, and get someone else to create versions that work online. That would educate all of us in the basics of climate science and also make it easier for other people to learn this material. To see how far we've gotten so far, check out [this](http://forum.azimuthproject.org/discussion/892/a-simple-online-climate-model/?Focus=6042#Comment_6042). The actual programs now working online are [here (Allan Erskine)](http://math.ucr.edu/home/baez/week319.html), [here (Lesley de Cruz)](http://users.ugent.be/~ldecruz/coalbedo/animations/animation.gif) and [here (Allan Erskine)](http://64.131.197.246/~aerskine/azimuth-coalbedo-example-dev/www/coalbedo2.html).
• Options
28.

If uploaded an html5 line graph with possibly the shortest amount of javascript which someone might like to use as a basic template. It's here at:

linux.usecs.co.uk:8000

I haven't worked out how to use the instiwiki url syntax with a port number - it doesn't seem to like it.

Comment Source:If uploaded an html5 line graph with possibly the shortest amount of javascript which someone might like to use as a basic template. It's here at: linux.usecs.co.uk:8000 I haven't worked out how to use the instiwiki url syntax with a port number - it doesn't seem to like it.
• Options
29.
edited March 2012

John wrote:

My own dream, which shouldn't take precedence over anyone else's, is to work through Gerald R. North's Simple Models of Global Climate...

What I great book - I wish I'd read it at least six months ago. I've already started coding from the beginning so I'm up for it.

I've also finally found an algorthmic description of Judith Berners et al's stochastic backscattering method using a variant of Conway's game of life CA which was a missing piece of the jigsaw for me in Tim Palmer's interview and AGU lecture.

Comment Source:John wrote: > My own dream, which shouldn't take precedence over anyone else's, is to work through Gerald R. North's _Simple Models of Global Climate_... What I great book - I wish I'd read it at least six months ago. I've already started coding from the beginning so I'm up for it. I've also finally found an algorthmic description of Judith Berners et al's stochastic backscattering method using a variant of Conway's game of life CA which was a missing piece of the jigsaw for me in Tim Palmer's interview and AGU lecture.
• Options
30.
edited March 2012

I've already started coding from the beginning so I'm up for it.

Okay, GREAT!

I hope it's clear my ideal is to create issues of This Week's Finds which can be run on the UC Riverside UNIX machine and contain interactive programs which illustrate these simple climate models. An example is week319, which I'm writing now, but already contains Allan's working code. The other pieces of working code, listed above, will push that model a bit further.

One desideratum is that minimal computer savvy on my part be required to make these models work. Allan managed this by sending me a bunch of files that just work, without me having the foggiest idea how. That was great! But if it's necessary, I can try to get you access to the UCR machine.

If you're up for this, we should keep talking, so we that we can agree on what models we're doing, what all the variables are called, what values the constants take, etc. If we take it one step at a time, we can quit if either of us runs out of steam, and we'll still have accomplished something useful.

Comment Source:> I've already started coding from the beginning so I'm up for it. Okay, GREAT! <img src = "http://math.ucr.edu/home/baez/emoticons/love.gif" alt = ""/> I hope it's clear my ideal is to create issues of _This Week's Finds_ which can be run on the UC Riverside UNIX machine and contain interactive programs which illustrate these simple climate models. An example is [week319](http://math.ucr.edu/home/baez/week319.html), which I'm writing now, but already contains Allan's working code. The other pieces of working code, listed above, will push that model a bit further. One desideratum is that minimal computer savvy on my part be required to make these models work. Allan managed this by sending me a bunch of files that just _work_, without me having the foggiest idea how. That was great! But if it's necessary, I can try to get you access to the UCR machine. If you're up for this, we should keep talking, so we that we can agree on what models we're doing, what all the variables are called, what values the constants take, etc. If we take it one step at a time, we can quit if either of us runs out of steam, and we'll still have accomplished something useful.
• Options
31.
edited December 2012

my ideal is to create issues of This Week's Finds which can be run on the UC Riverside UNIX machine

Allan's working code is in javascript which runs in the client's browser and just needs the files to be put in the correct place. Applications written C++, Julia, R or other languages will need to be compiled on the UC Riverside machine. It's not difficult but we can run them on my machine first to check that they will compile "out of the box" on yours.

we can agree on what models we're doing, what all the variables are called, what values the constants take, etc.

I've started collecting parameter values for various climate models but somebody else would have to select them as I've no idea what's reasonable.

So I think we just need a plan and a first brief.

Comment Source:> my ideal is to create issues of This Week's Finds which can be run on the UC Riverside UNIX machine Allan's working code is in javascript which runs in the client's browser and just needs the files to be put in the correct place. Applications written C++, Julia, R or other languages will need to be compiled on the UC Riverside machine. It's not difficult but we can run them on my machine first to check that they will compile "out of the box" on yours. > we can agree on what models we're doing, what all the variables are called, what values the constants take, etc. I've started collecting parameter values for various climate models but somebody else would have to select them as I've no idea what's reasonable. So I think we just need a plan and a first brief.