# Compiling 64-bit NetCDF4 with HDF5 on Mac OS X

I needed a 64-bit version of HDF5 and NetCDF4, here’s how you get that going on Mac OS X 10.6.

3. Get rid of all of the .la files in the HDF5 libs folder.
4. From the command line, set the following environmental variables,
export CC='gcc' CFLAGS='-g -m64' CFLAGS='-g -m64' CXXFLAGS='-g -m64' HDF5DIR='/path/to/hdf5/folder' LIBS='-lsz' LDFLAGS='-L/path/to/hdf5/folder/lib' You will obviously have to use the true path to the folder.
5. Make sure you’re in the NetCDF folder and run the following,

After attending the public meeting last night, it became clear that that the site near the school is already complete rejected because it can’t be afforded and that there is no backup site to the woodland park. The cost difference between these two sites is not trivial, but what’s $700,000 to this community? This community would easily jump at the opportunity to acquire additional acres to the park (they’ve done so in recent the past), so wouldn’t it be fair to say that preserving this parkland is worth that cost to the community? The sad part about this is that from King County’s perspective (the folks in charge in of the parkland), they are getting compensated for the use of their land. What do they get in return? More park? Cash? Nope, a parking lot. No joke, the county felt that just compensation for giving up their land was a 10 space parking lot. It’s understandable that this is difficult for the community to swallow. # Simple implementation of VMT tax Electric cars don’t consume gasoline and therefore owners of electric cars will generally contribute less to the general road maintenance fund because they aren’t paying a gasoline tax. A bill introduced to the state Senate attempt to put a bandaid on this problem by requiring that electric car owners pay an annual$100 fee. While the general idea that electric car owners should contribute to the road maintenance fund is sound, the method is kind of stupid. A far better solution is a vehicle miles traveled tax. Gas mileage in automobiles varies so dramatically that owners are already paying disproportionate amounts of gas tax.

The vehicle miles traveled tax could be implemented in a fairly practical manner using existing systems in place. The idea would be to charge owners based on the number of miles they drove and the weight of their car. The combination of those two factors more accurately reflects the impact each car has on the road network. To implement this, simply have every car owner annually or biannually submit their current mileage to the State of Washington. This can be done each time the license tabs need renewing, and can be checked by the state during each emissions test and each time the title is transferred.

If it turns out people aren’t truthful enough, then we’d need to require additional checks to a car’s mileage by the state. In the long run, maybe something like wireless OBD can automatically verify the vehicle’s mileage.

The bottom line is that I think we’re at a stage where VMT can and should be implemented.

# Ayn Rand Fantasyland

Here’s a favorite quote of mine that I’ve seen tossed around,

There are two novels that can change a bookish fourteen-year old’s life: The Lord of the Rings and Atlas Shrugged. One is a childish fantasy that often engenders a lifelong obsession with its unbelievable heroes, leading to an emotionally stunted, socially crippled adulthood, unable to deal with the real world. The other, of course, involves orcs.

I first fell in love with Ayn Rand’s philosophies in high school when I was 17 after reading Atlas Shrugged. When discussing different Ayn Rand books with my sister during my freshman year in college I remember admitting that I enjoyed Atlas Shrugged over The Fountainhead because it appealed to my science fiction tastes. That probably should have been my first hint that something was wrong. Arguments with my uncle around this same time sowed doubt in my mind, but it wasn’t until my mid-twenties that I realized her ideas were all fantasy. Someone just needs to tell Rand Paul, the Tea Party and the current batch of Republican leaders.

# Washington State Ferry diverts to rescue windsurfer

I was heading back from Bremerton to Seattle on the Washington State Ferry yesterday when I noticed we made an abrupt course change out in the middle of Puget Sound. Instead of heading in towards Elliot Bay, we were suddenly heading towards the point just south of Alki Beach. It took more than a few minutes before the captain announced that the a body had been spotted in the water and we were being divert to go look. We headed toward the point, then stopped a quarter mile or so off of Alki Beach while everyone looked around. After five minutes we then headed northwest (further off shore) and again came to stop. At that point several passengers spotted something in the water… you can read another account here. Apparently this windsurfer had a cell phone and was in communication, but it’s not clear whether he made the original call for help or not.

The windsurfer was standing on the car deck with his wetsuit and board as I drove off. He looked in good shape, but I assume he ended up further offshore than intended. As far out as he was, with the wind blowing to the north, I would have to imagine it would have been difficult to get back.

Update: The Seattle Times clarifies that it was the windsurfer who made the original call for help. The problem was that his mast broke!

# Fortran compiled mex files with Matlab 2010b on Mac OS X

Although I personally have don’t need to compile any mex files in fortran for Matlab, another scientist here at NWRA does, so I thought I was post how to get this running for anyone who is interested.

The instructions are specific to the 64-bit Matlab 2010b on Mac OS X. According to MathWorks, we need to use gfortran version 4.3.

1. Download and install Xcode 3.2 from Apple (this will give you a c compiler).

4. Check out gcc version 4.3.4 with

svn co svn://gcc.gnu.org/svn/gcc/tags/gcc_4_3_4_release

5. Make an empty build folder for gcc, I called it “gcc-build”

6. Move both gmp and mpfr to the “gcc_4_3_4_release” folder and make sure they’re labeled exactly “gmp” and “mpfr”. At this stage I have a root folder called “gfortran” with,

gfortran/gcc_4_3_4_release gfortran/gcc_4_3_4_release/gmp gfortran/gcc_4_3_4_release/mpfr gfortran/gcc-build

7. From within the gcc-build folder run,

../gcc_4_3_4_release/configure --enable-languages=c,fortran --target=x86_64-apple-darwin -build=x86_64-apple-darwin --host=x86_64-apple-darwin

8. Compile gcc, gfortran, and the associated libraries (this will take a while),

make -j4

9. Finally you can install this with,

sudo make install

From within Matlab, run “mex-setup” and choose the gcc option. At this point you should be able to compile the yprimef example code included with Matlab.