Re: Joining Eumetcast - asking for hardware recommendations


Christian Peters
 

Francis,

thank you for your script!

I set my data folder but got exact the same error. I think decompression wasn't called here for any reason....!?
I'm running a 32 bit linux in a VM but I hope that's not the problem?

Regards,

Christian


Am 30.01.16 um 10:46 schrieb francis@... [MSG-1]:

This script works for me. don't forget to set the correct data source
folder.

#!/usr/bin/python2
# -*- coding: utf-8 -*-
#
from mpop.utils import debug_on
debug_on()
from mpop.satellites import GeostationaryFactory
from mpop.projector import get_area_def
from PIL import Image
from pycoast import ContourWriter
import os
import datetime

os.environ['XRIT_DECOMPRESS_OUTDIR'] =
'/home/francis/Eumetcast/PyTroll_Output'
os.environ['XRIT_DECOMPRESS_PATH'] = '/usr/local/bin/xRITDecompress'
os.environ['PPP_CONFIG_DIR'] =
'/usr/lib64/python2.7/site-packages/mpop-1.1.0-py2.7.egg/etc'
#using this timestamp '201601291100'
time_slot = datetime.datetime(2016, 01, 29, 11, 0)
global_data = GeostationaryFactory.create_scene("meteosat", "10",
"seviri", time_slot)
europe = get_area_def("EuropeCanary")
global_data.load(global_data.image.overview.prerequisites,
area_extent=europe.area_extent)
print global_data
img = global_data.image.overview()
img.save('./myoverview.png')
print 'Finished saving image'
# add coastlines to local image
cw = ContourWriter('/home/francis/FG-Docs/programming/python-msg/gshhg/')
cw.add_coastlines_to_file('./myoverview.png', europe, resolution='l',
level=4)
print 'Finished adding coastlines'

Hope this helps
Francis


Join {MSG-1@groups.io to automatically receive all group messages.