Skip to content
H

hirs_tpw_daily

The Glue Code

After package delivery we can access package information from ipython using the delivered_software method of the flo.sw.lib.glutil module:

from flo.sw.lib.glutil import delivered_software
delivered_software.lookup('hirstpw_daily', delivery_id='20181119-1')

which gives the output

Delivery(id='20181119-1', name='hirstpw_daily', version='3.0', path='/mnt/deliveredcode/deliveries/hirstpw_daily/20181119-1')

We also need to install the following packages:

pip install -i https://sips.ssec.wisc.edu/eggs -U flo rados
pip install -i https://sips.ssec.wisc.edu/eggs -U sipsprod glutil
pip install -i https://sips.ssec.wisc.edu/eggs -U timeutil
pip install -i https://sips.ssec.wisc.edu/eggs -U simple

Local Deployment of python glue code

The glue code for hirs_tpw_daily can be started by creating the file source/flo/__init__.py in ~/code/PeateScience/packages/hirs_tpw_daily. The glue code can then be linked into the local execution directory:

cd ~/code/PeateScience/local/dist/hirs_tpw_daily
ln -s ../../../packages/hirs_tpw_daily/source/flo ./

Local Processing

repo=$HOME'/git'
work_dir='/data/'$USER'/HIRS_processing/Work/local_processing/hirs_tpw_daily'

str_import_hirs_tpw_daily="import os; from timeutil import TimeInterval, datetime, timedelta; wedge=timedelta(seconds=1); day=timedelta(days=1); os.chdir('$repo/hirs_tpw_daily'); import example_local_prepare; os.chdir('$work_dir')"

satellite='noaa-19'

hirs2nc_id='20180410-1'
hirs_avhrr_id='20180505-1'
hirs_csrb_daily_id='20180714-1'
hirs_csrb_monthly_id='20180516-1'
hirs_ctp_orbital_id='20180730-1'
hirs_ctp_daily_id='20180802-1'
hirs_ctp_monthly_id='20180803-1'
hirs_tpw_orbital_id='20190205-1'
hirs_tpw_daily_id='20190318-1'

python -c "$str_import_hirs_tpw_daily; granule = datetime(2015,5,14, 0); interval = TimeInterval(granule, granule+day-wedge); example_local_prepare.print_contexts(interval, '$satellite', '$hirs2nc_id', '$hirs_avhrr_id', '$hirs_csrb_daily_id', '$hirs_csrb_monthly_id', '$hirs_ctp_orbital_id', '$hirs_ctp_daily_id', '$hirs_ctp_monthly_id', '$hirs_tpw_orbital_id', '$hirs_tpw_daily_id', verbosity=2)"

python -c "$str_import_hirs_tpw_daily; granule =  datetime(2015,5,14, 0); interval = TimeInterval(granule, granule+day-wedge); example_local_prepare.local_execute_example(interval, '$satellite', '$hirs2nc_id', '$hirs_avhrr_id', '$hirs_csrb_daily_id', '$hirs_csrb_monthly_id', '$hirs_ctp_orbital_id', '$hirs_ctp_daily_id', '$hirs_ctp_monthly_id', '$hirs_tpw_orbital_id', '$hirs_tpw_daily_id', skip_prepare=False, skip_execute=True, verbosity=2)"