onsdag den 30. marts 2016

Installing python with matplotlib and basemap on mac

In the last couple of months I have installed python on two different macs. It took forever to get matplotlib and basemap to work the first time, before I understood that I could not use the build-in python from apple. I ended up installing python enthought using homebrew, and I promised myself that I would write down how to do it after the second installation. But I forgot. And now it's been a while, I got a new laptop and I have to install python once again.
So here it goes, for my future self and anybody else who can use it.


  • Install Xcode from the app store. It's free and can be found here. Make sure to open Xcode and agree to it's terms and conditions.

  • Download and install the enthought canopy python distribution. This is their free python version, which entails numpy, scipy and matplotlib.
    To finish the canopy installation it is necessary to open the application Canopy. If this is done by double-clicking the icon, it will give the error message "Enthought Canopy can't be opened because it is from an unidentified developer". To get around this, it is necessary to right-click (CTRL-click) on the icon of Canopy and choose "open". In the pop-up window choose "Open" - and the program installs.
    After this a new pop-up window appears asking "Do you want to make Canopy your default Python environment?", to which you answer "yes". 

  • Now we want install homebrew. Homebrew is a package manager similar to macports and fink. It is installed by opening the terminal and typing:

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

    You will be asked for your password and need to wait a few moments for the installation.
  • To install the Geos package type:

    $ brew install gdal 


    Note the location of the Geos library. For me:  /usr/local/Cellar/geos/3.5.0 
    The path written in the last line after installation indicates the location of the geos library, for me this was: /usr/local/Cellar/gdal/1.11.3_1  
  • To install Basemap it must first be downloaded. On this page, choose the newest version and download the tar-file for mac. Then go to the Downloads folder in the terminal and unpack the files:

    $ cd ~/Downloads/
    $ tar xf basemap-1.0.7.tar.gz 

    This creates a new folder with the name of the tar file, in my case ~/Downloads/basemap-1.0.7. You need to enter that folder:

    $ cd basemap-1.0.7
  • Then export the directory of geos library noted above and install baseman:

    $ export GEOS_DIR=/usr/local/Cellar/geos/3.5.0/
    To build and install write:

    $ sudo python setup.py build
    $ sudo python setup.py install

    You will be asked for your password, and the installation will take a little while to run.
  • And now python should work with basemap. You can test in the terminal by writing opening python and loading basemap:

    $ python
    >>> from mpl_toolkits import Basemap

    If this works without error messages everything is fine. For me it worked for the last two computers - this time it worked after a restart. Awesome.

mandag den 15. februar 2016

Spring rolls for Doro

For a short while I took part in the cooking group at work. I actually probably only brought food once; namely vietnamese spring rolls. They are awesome. Easy to make, delicious and reasonably healthy. I promised Doro a recipe. So here it is, only a couple of years late:

Raw vegetables
Vegetables of your choice, for example
  • Chopped cabbage
  • Sprouted seeds
  • Fresh spinach
  • Chopped carrots
  • sweet peas
  • Chopped cucumber
  • Avocado
  • Fresh koriander leaves
  • Fresh peppermint leaves
All vegetables are cut into pieces that fit in a spring roll and arranged in a dish.



Sauces
We're a bit lazy and usually just buy pre-made auster and sweet-chili sauce. And for special occasions we make our own peanut butter dressing. For that you need:     
  • Peanut butter, any type goes
  • Juice from one lime (We sometimes just use lemon juice)
  • A bit of chilli 
  • Some garlic
  • Soy sauce
  • Tap water

 The ingredients can be mixed to taste. It seems strange to add water at first, but after some stirring the dressing changes consistency as it takes up water. 

Fried filling
We like adding some fried meet or soy product. Here is one suggestion from us of what to add:

  • Grated garlic
  • Grated ginger
  • Some minced meat or soy product
  • Chopped zucchini
  • Chopped aubergine (or eggplant)
All ingredients are fried in a pan. The vegetables need quiet a long time before they're finished.














We usually put all ingredients on the table and make the spring rolls as we eat. We have a bowl of hot water on the table, the rice paper is placed in the water until it's soft, put on your plate and filled with the ingredients of choice. Enjoy!

tirsdag den 26. april 2011

Haderslev Fjord

On Saturday Jensine was ready to get back in the water, and we had invited Esben's dad and his wife AnneMarie to join us in sailing back to Haderslev.

Newly painted and ready for another season
On board with farfar

Runa hates the life jacket, but she has to wear one - so of course her mom must wear one too.

"Take this stupid thing off of me!"

We decided that Runa was protesting because she was tired, so she was put to sleep while the rest of us enjoyed the trip through the fjord.

Yesterday's lunch is still just fine
Last week the trees had no leaves, and the eagle's nest was easy to spot...
And then there was of course also some cake left from yesterday

Painting

As is the case every year, Jensine was taken on land during easter, and people travelled to Årøsund to paint and do other repairs.
I painted the green stripes...
...while Laura was taking care of the black background
We would like to have more members in the association, so Bodil made an exhibition to inform the many people talking walks on the harbor about Jensine.
Wondering why so many people spend their Easter hard at work
Discussing when the next game of cards shall take place
Lunch break for the nurses
Did Ingeborg fall asleep?
Skippers adjusting the 'pyntenetstok'
And by the way, I did look up the word pyntenetstok to see if I spelled it correctly, and the first hit on google was this: http://www.jensine.dk/ordbog/rig/forgrej.htm

mandag den 18. april 2011

Holiday

Esben and I had planned to make a trip to Amsterdam during Easter, but ended up not going anyways. So today Runa was taken to her Tagesmutter and we had the day off. We took the car and went to Bremen for the first time, and it turned out that it was a wonderful city with lovely parks, beautiful buildings - and shops that sell all the things we can't get in Bremerhaven.
The old town hall of Bremen, build in 1405
We started out the day with a coffee and second breakfast in the sun outside the old town hall. We were sitting in a square surrounded by the beautiful buildings, and actually really enjoyed for once to eat without having an impatient little girl waiting for us to move on.
The cafes across from the town hall
We also went to Bremen's oldest quarter, Schnoor, where the houses and the streets are tiny and very pitoresque.
A quiet street in the Schnoor quarter
We spend the day just walking around wherever we felt like, and the accomplishment of the day was when Esben got a new pair of shoes - on sale.

The start of a sunny easter

One of the other phd-students from AWI, Ozgur, had invited us all for a barbecue on Saturday afternoon, and when Esben, Runa and I arrived it turned out that he had prepared a large Turkish buffet.
While some of the guys went to the supermarket, we started the barbecue up along with Claudia and Stefan.

Claudia and Stefan keeping an eye on the grill
We didn't know our way around the house, so we walked to basement and ended up crawling out a window to get to the garden because we didn't have a key for the door - but as it turned out there was actually a door directly from the flat to the garden. We felt a little bit stupid...

Runa prefers meat and tomatoes
Ozgur is sharing the flat with 5 others, and a couple of floors above him there is one more flat with AWI-people living in it, and it was really nice for us, since we are still fairly new in Bremerhaven, to meet some new people. But unfortunately we had to leave early because Runa was getting tired - even though Claudia had made Runa's favourite dessert, youghurt, which by the way was much appreciated by her.

To the left, Ozgur and Xuezhu from the climate group, and to the right Tim from Biogeo.
When we drove (on the bikes of course) to Ozgur's place we had noticed a large playground in a park close to where he lives, so on Sunday we took advantage of the sunny weather, packed a picnic bag and went up there.

Runa got a new sun hat for the weekend
Esben is a firm believer in the necessity of training his balance so he won't be so sea sick when we go sailing, so he took Runa and went to the carousel (she of course will benefit from the training too).
Runa wants it to be faster and Esben wants to get off...
The weekend ended up with a walk to the festival in the Fischereihafen where we got crepes with chocolate inside and walked around and looked at all of the things happening there.
Runa is getting a ride on one of the seals after her parents refused to let her try the real carousel

onsdag den 13. april 2011

Birthday!

After a weekend that left me with sunburned stripes on the neck where I had forgotten to apply sunblock, I woke up to my birthday hearing the rain hitting the window and the winds howling around the house. I guess it's time I take my behavior up to revision...
The view from my work
But I was woken up with Esben and running singing for me and with many kisses from both of them, so it wasn't so bad after all.
And later in the day Esben came to my work place with cake and we took a nice coffee break with some of the many wonderful people we have already met after living in Bremerhaven in such a short time.
During the day I got an sms from my sister Anne, who asked if we had time for a visit from her and Kent, so they arrived just in time for dinner, and we went to a Turkish restaurant where the adults ate sjiskebab and drank beer - and Runa had a chocolate easter bunny for dinner...
Anne is nice, she brings chocolate
 Anne insisted on making me a birthday cake, and it was somehow really tasty even when all of us insisted that there was no way that we could eat even a little bit.
The guys are waiting for the cake