workbook MAJA

Программы и алгоритмы для обработки данных дистанционного зондирования: ERDAS, ENVI и другие.
Ответить
bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

workbook MAJA

Сообщение bim2010 » 25 окт 2018, 18:26

Процессоры абсолютной атмосферной коррекции с открытым исходным кодом:
1. Semi-Automatic Classification Plugin QGIS – плагин полуавтоматической классификаций данных дистанционного зондирования в QGIS.
Cloud Masking, Image Mosaic, and Land Cover Change Location
Dark Object Subtraction (DOS)
Атмосферная коррекция по методу DOS.
Поддерживаемые операционные системы: Linux (Ubuntu, Debian), Mac OS и Windows.
Поддерживаемые сенсоры:
Sentinel-2
Sentinel-3
Landsat
ASTER
MODIS

Для запуска Semi-Automatic Classification Plugin, кроме QGIS, должны быть установлены:
GDAL
OGR
NumPy
SciPy
Matplotlib

2. Sen2Cor SNAP
Процессор для генерации и форматирования продуктов Sentinel-2 уровня 2A выполняет коррекцию атмосферы, рельефа, перистых облаков, используя входные данные Sentinel-2 уровня обработки 1C. Кроме коррекции изображений, с учетом рельефа местности и перистых облаков, учитываются дополнительные данные карты аэрозолей, карты водяного пара и другие характеристики атмосферы.
Поддерживаемые операционные системы: Linux, Mac OSX и Windows.
Поддерживаемые сенсоры: Sentinel-2

3. Atmospheric and Radiometric Correction of Satellite Imagery (ARCSI).
Атмосферная и радиометрическая коррекция спутниковых изображений (ARCSI) предоставляет инструмент командной строки для атмосферной коррекции изображений, маскирования облаков, коррекции топографических теней. Цель ARCSI - предоставить как можно более автоматический метод извлечения параметров коррекции атмосферы и использования их для параметризации 6S.
Поддерживаемые операционные системы: Linux, MacOS, Windows. В документации написано:
Хотя вы можете установить RSGISLib и другие инструменты в Windows, RSGISLib в первую очередь тестирование выполнено на Linux и MacOS, поэтому мы рекомендуем использовать одну из этих систем.
Поддерживаемые сенсоры:
Sentinel-2
Landsat 4, 5, 7, 8 (TM, ETM+, OLI)
Landsat MSS 1, 2, 3, 4, 5
Rapideye
WorldView 2 и 3
Pleiades
SPOT 5, 6 и 7

Для запуска ARCSI, кроме python, должны быть установлены:
RSGISLib
KEALib
GDAL
РИОС
Py6S
6S

4. i.atcorr Grass GIS
https://grasswiki.osgeo.org/wiki/Atmosp ... correction
выполняет атмосферную коррекцию с использованием алгоритма 6S. 6S - это базовый код RT, используемый для расчета таблиц поиска в алгоритме атмосферной коррекции MODIS. Он позволяет точно моделировать наблюдение за спутниками, учитывая изменение (повышения) цели, использование анизотропных и ламбертовских поверхностей и расчет газообразного поглощения. Код основан на методе последовательных порядков аппроксимаций рассеяния и его первого векторного варианта (6SV1), способного учитывать поляризацию излучения.
Поддерживаемые сенсоры:
avhrr
SPOT
Landsat
MODIS
POLDER
ASTER
Ikonos
RapidEye
WorldView
QuickBird
GeoEye
Pleiades
Sentinel-2
PlanetScope

5. single-scene pixel-based classification или Sentinel Hub Cloud Detector, алгоритм обнаружения облаков опирается на методы машинного обучения. Подход так называемой классификации на основе пикселей, - где происходит назначение каждому пикселю изображения вероятности охвата облаком исключительно на основе спектрального отклика спутника для этого пикселя.
Поддерживаемые сенсоры:
Sentinel-2
Для запуска кроме python должны быть установлены:
numpy version 1.13.3
scipy version 0.19.1
scikit-learn version 0.19.0
scikit-image version 0.13.0
matplotlib version 2.1.0
LightGBM version 2.0.11

Проприетарные процессоры абсолютной атмосферной коррекции:

6. FLAASH - инструмент для коррекции атмосферных поправок в ENVI.


7. MACCS/MAJA - Multi-sensor Atmospheric Correction and Cloud Screening
https://github.com/olivierhagolle/Start_maja
http://www.cesbio.ups-tlse.fr/multitemp/?p=6203

Процессор MAJA является процессором для обнаружения облаков и атмосферной коррекции, специально разработанным для обработки временных рядов оптических изображений с высоким разрешением, полученных при квазипостоянных углах обзора. Это позволяет, например, обрабатывать временные ряды изображений LANDSAT или Sentinel-2.

Его основная особенность - использовать многовременную информацию, содержащуюся во временных рядах, для обнаружения облаков и их теней, а также для оценки оптической толщины аэрозоля и корректировки атмосферных эффектов (с учетом эффекта смежности и вариаций освещения из-за топографии).

Поддерживаемые операционные системы: Linux RedHat 6 или 7, CENTOS 6 или 7.

Поддерживаемые сенсоры:
Formosat-2
LANDSAT 5, 7 и 8
SPOT4 и SPOT5
Sentinel-2

Для запуска MAJA, кроме python, должны быть установлены:

Hdf4
Expat
LibXML2
OpenJpeg
Gdal
InsightToolkit
OrfeoToolbox
Pugixml
Теоретический базовый документ алгоритма MAJA опубликован здесь.
Сравнение Sen2Cor и MAJA.
Последний раз редактировалось bim2010 16 ноя 2018, 11:46, всего редактировалось 3 раза.

bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

Re: workbook MAJA

Сообщение bim2010 » 25 окт 2018, 18:38

Установка MAJA
Установка centos:7.2.1511. Скачиваем дистрибутив http://vault.centos.org/7.2.1511/isos/x86_64/
CentOS-7-x86_64-DVD-1511.iso (для установки с DVD - диска или загрузочной флешки)
или
CentOS-7-x86_64-Everything-1511.iso (для установки с загрузочной флешки)
Процесс установка centos 7 пошагово описан здесь или здесь.
Единственное замечание к этим инструкциям : раздел "SWAP" сделал размером равным объем оперативной памяти *2 (ДВА объема оперативки). После установки centos 7 заходим в систему под root.
Проверим доступ в интернет (например, запустив Firefox). В меню “приложения” запускаем программу Nautilus.
В ней переходим на закладку “Компьютер” находим папку opt и заходим в нее.
Создадим папку maja. Свернем пока программу Nautilus. Заходим в Терминал и в окне терминала набираем:

Код: Выделить всё

yum --disableplugin=fastestmirror -y update && yum clean all
выполняется обновление Centos.

Код: Выделить всё

yum --disableplugin=fastestmirror -y install gd libxslt libxml2 git wget
mkdir /usr/lbzip2 && cd /usr/lbzip2
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lbzip2-2.5-1.el7.x86_64.rpm
rpm -Uvh lbzip2-2.5-1.el7.x86_64.rpm
mkdir /usr/local/maja && cd /usr/local/maja
Заходим на https://logiciels.cnes.fr/en/node/58?type=tel, регистрируемся и скачиваем архив MAJA Software&Documents.zip С помощью программы Nautilus находим папку /usr/local/maja/ и
поместим в нее архивы:
maja-1.0.0-rhel.7.2.x86_64-release-gcc.tar
maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc.tar
Распаковываем их. В окне терминала набираем:

Код: Выделить всё

cd /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc && echo 'Y'|./install.sh
При корректной установке получим:
Спойлер
[root@localhost maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc]# ./install.sh
* Check program 'basename' installation passed.
* Check program 'readlink' installation passed.
* Check program 'dirname' installation passed.
* Check program 'getopt' installation passed.
------------------------------------------------------------------------
Install the MAJA COTS V1.0.0 for MAJA launching

- Base root directory . /opt
- Complete destination directory . /opt/maja/cots/1.0

- Install the following COTS:
* OpenJpeg
* Hdf4
* Expat
* Gdal
* InsightToolkit
* OrfeoToolbox
* Pugixml

- ddc
- include init var env script
- include script functions
- uninstall script

Ready (Y/n) ?
Y
------------------------------------------------------------------------
Install the package OPENJPEG /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/openjpeg-2.0.0-with-patch-revision-2313.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/openjpeg-2.0.0-with-patch-revision-2313.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/openjpeg-2.0.0-with-patch-revision-2313.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package OPENJPEG /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/openjpeg-2.0.0-with-patch-revision-2313.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package HDF /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/hdf-4.2.5.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/hdf-4.2.5.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/hdf-4.2.5.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package HDF /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/hdf-4.2.5.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package EXPAT /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/expat-2.0.1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/expat-2.0.1.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/expat-2.0.1.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package EXPAT /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/expat-2.0.1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package GDAL /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/gdal-1.10.1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/gdal-1.10.1.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/gdal-1.10.1.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package GDAL /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/gdal-1.10.1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package ITK /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/InsightToolkit-4.7.2-modified-optimization-v1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/InsightToolkit-4.7.2-modified-optimization-v1.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/InsightToolkit-4.7.2-modified-optimization-v1.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package ITK /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/InsightToolkit-4.7.2-modified-optimization-v1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package OTB /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/OTB-4.4.0-modified-otbmuparserx+optimization-v1-otbossim-bufferoverflow.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/OTB-4.4.0-modified-otbmuparserx+optimization-v1-otbossim-bufferoverflow.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/OTB-4.4.0-modified-otbmuparserx+optimization-v1-otbossim-bufferoverflow.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package OTB /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/OTB-4.4.0-modified-otbmuparserx+optimization-v1-otbossim-bufferoverflow.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
------------------------------------------------------------------------
Install the package PUGIXML /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/pugixml-1.5-modified-v1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory ...
- BIN_TARBALL_FILE . /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/pugixml-1.5-modified-v1.rhel.7.2.x86_64-release-gcc.tgz
- INSTALL_DIR . /opt/maja/cots/1.0
-> 1. Create the /opt/maja/cots/1.0 directory...
-> 2. Move to the /opt/maja/cots/1.0 directory...
-> 3. Untar the source file /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/pugixml-1.5-modified-v1.rhel.7.2.x86_64-release-gcc.tgz into the /opt/maja/cots/1.0 directory...
Install the package PUGIXML /usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/packages/pugixml-1.5-modified-v1.rhel.7.2.x86_64-release-gcc.tgz into /opt/maja/cots/1.0 directory done (SUCCESS).
* Check 'libxml2' x86_64 package installation passed.
/opt/maja/cots/1.0/ddc
/opt/maja/cots/1.0/ddc/ddc.txt
22 блоков
* Copy 'ddc' directory to the /opt/maja/cots/1.0 passed.
* Copy of the shell file '/usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/scripts/init-var-cots.sh' to '/opt/maja/cots/1.0/init-var-cots.sh' passed
* Change mod '+x' the shell file '/opt/maja/cots/1.0/init-var-cots.sh' passed
* Copy of the shell file '/usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/scripts/uninstall.sh' to '/opt/maja/cots/uninstall-1.0.sh' passed
* Change mod '+x' the shell file '/opt/maja/cots/uninstall-1.0.sh' passed
* Copy of the shell file '/usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/scripts/cots-include-functions-install.sh' to '/opt/maja/cots/1.0/cots-include-functions-install.sh' passed
* Change mod '+x' the shell file '/opt/maja/cots/1.0/cots-include-functions-install.sh' passed
* Copy of the shell file '/usr/local/maja/maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc/scripts/cots-include-functions-check.sh' to '/opt/maja/cots/1.0/cots-include-functions-check.sh' passed
* Change mod '+x' the shell file '/opt/maja/cots/1.0/cots-include-functions-check.sh' passed
* Set the rights for MAJA Cots directory /opt/maja/cots/1.0 (chmod -R 775 /opt/maja/cots/1.0) passed.
* Set the rights for MAJA Cots filename /opt/maja/cots/uninstall-1.0.sh (chmod 775 /opt/maja/cots/uninstall-1.0.sh) passed.
* Set the rights for MAJA cots root filename /opt/maja/cots (chmod 775 /opt/maja/cots) passed.
* Set the rights for MAJA root filename /opt/maja (chmod 775 /opt/maja) passed.
Install the MAJA COTS V1.0.0 for MAJA launching done.

[root@localhost maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc]#
В окне терминала набираем:

Код: Выделить всё

cd /usr/local/maja/maja-1.0.0-rhel.7.2.x86_64-release-gcc && echo 'Y'|./install.sh
При корректной установке получим:
Спойлер
[root@localhost maja-1.0.0-rhel.7.2.x86_64-release-gcc]# ./install.sh
* Check program 'basename' installation passed.
* Check program 'readlink' installation passed.
* Check program 'dirname' installation passed.
* Check program 'getopt' installation passed.
------------------------------------------------------------------------
Install the MAJA chains ('maja' tarball) V 1.0.0:
* ROOT directory: /opt
* MAJA core final destination directory: /opt/maja/core/1.0
* Check MAJA COTS dependencies V 1.0.0
* Check system COTS dependencies
- libxslt package
- xsltproc program
- xmllint program
- gd package
* Install tarball MAJA package : /usr/local/maja/maja-1.0.0-rhel.7.2.x86_64-release-gcc/binaries.tgz
* Install 'uninstall' script file : /usr/local/maja/maja-1.0.0-rhel.7.2.x86_64-release-gcc/uninstall-1.0.sh to /opt/maja/core
* Set the 775 rights for MAJA /opt/maja/core/1.0 directory
* Check MAJA installation
------------------------------------------------------------------------
Ready (Y/n) ?
Y
Install the MAJA chains ('maja' package) ...
------------------------------------------------------------------------
Check system COTS dependencies necessary to launch MAJA...
* Check 'libxslt' package installation passed.
* Check program 'xsltproc' passed.
* Check program 'xmllint' passed.
* Check 'gd' x86_64 package installation passed.
------------------------------------------------------------------------
* Extraction of the archive file '/usr/local/maja/maja-1.0.0-rhel.7.2.x86_64-release-gcc/binaries.tgz' 'with option xvf' in the destination directory '/opt' passed
* Copy of the shell file '/usr/local/maja/maja-1.0.0-rhel.7.2.x86_64-release-gcc/uninstall-1.0.sh' to '/opt/maja/core' passed
* Change mod '+x' the shell file '/opt/maja/core' passed
------------------------------------------------------------------------
* Set the rights for MAJA core current version directory /opt/maja/core/1.0 (chmod -R 775 /opt/maja/core/1.0) passed.
* Set the rights for MAJA core directory /opt/maja/core (chmod 775 /opt/maja/core) passed.
* Set the rights for MAJA root directory /opt/maja (chmod 775 /opt/maja) passed.
Install the MAJA chains done.
------------------------------------------------------------------------
* Check program '/opt/maja/core/1.0/bin/maja' passed.
Install the MAJA chains ('maja' package) done.

[root@localhost maja-1.0.0-rhel.7.2.x86_64-release-gcc]#
(внимание “Y” большая буква)

Код: Выделить всё

cd /opt/maja
git clone https://github.com/olivierhagolle/Start_maja
git checkout https://github.com/olivierhagolle/Start_maja
git clone https://github.com/olivierhagolle/Start_maja/blob/180920_CAMS_Shema_Correction
Установка процессора MAJA закончена.
В терминале устанавливаем программу midnight commander.
В окне терминал набираем:

Код: Выделить всё

yum install mc
Последний раз редактировалось bim2010 25 окт 2018, 19:50, всего редактировалось 3 раза.

bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

Re: workbook MAJA

Сообщение bim2010 » 25 окт 2018, 19:35

Скачать и посмотреть результат работы процессора MAJA можно здесь.

Comments: На странице: https://logiciels.cnes.fr/en/content/maja лишний символ "/" в пути к файлу документации http://osr-cesbio.ups-tlse.fr/echangesw ... ption.docx .
Процессору MAJA для работы необходимы:
1. Спутниковые снимки. В архиве “MAJA-documents” приведены форматы и спецификации снимков Sentinel-2, FORMOSAT2, LANDSAT5, 7, 8 и SPOT4.
2. Радарная топографическая съемка SRTM (90 м).
3. Файлы водных объектов SRTM для создания водных масок. SWBD - SRTM Water Body Data.
4. Наборы данных о составе атмосферы, созданные службой мониторинга атмосферы Copernicus (CAMS- Copernicus Atmosphere Monitoring Service).
5. Для Sentinel-2 для ускорения процессов в MAJA необходимо подготовить загрубленное до 240 метров разрешение.
6. Данные OpenStreetMap - полигоны береговой линии, упрощенные для рендеринга при малых масштабах.
7. Множество конфигурационных файлов (~1.5 GB).
Последний раз редактировалось bim2010 16 ноя 2018, 13:38, всего редактировалось 1 раз.

bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

Re: workbook MAJA

Сообщение bim2010 » 29 окт 2018, 19:07

Загрузка CAMS - глобального набора данных о составе атмосферы, созданного cлужбой мониторинга атмосферы Copernicus.
Comments: Анализируя скрипт ”download_CAMS_daily.py” (см. аргумент 'dataset' : "cams_nrealtime")
пришел к выводу, что данная в самом начале ссылка на страницу не верна.
Вместо: http://apps.ecmwf.int/datasets/data/mac ... vtype=sfc/
нужно дать ссылку на: http://apps.ecmwf.int/datasets/data/cam ... vtype=sfc/
Дело в том, что до запуска скрипта ”download_CAMS_daily.py” необходимо после регистрации зайти на страницу:
и прочитать лицензию на данные Copernicus и подтвердить ее в нижней части страницы. В противном случае получим подобную ошибку:
Спойлер
Downloading files for date 2018-05-01 00:00:00
==================================
Current_date = 20180501
Nom fichier de sortie AOT : /opt/maja/cams_cdf/CAMS_AOT_20180501UTC030000.nc
2018-10-26 20:54:29 ECMWF API python library 1.5.0
2018-10-26 20:54:29 ECMWF API at https://api.ecmwf.int/v1
2018-10-26 20:54:30 Welcome bim2010
Traceback (most recent call last):
File "download_CAMS_daily.py", line 220, in <module>
(nom_AOT,nom_RH,nom_MR)=download_files(dt,file_type,time[t],step,path_out)
File "download_CAMS_daily.py", line 57, in download_files
'target' : nom_AOT
File "/opt/maja/Start_maja/cams_download/ecmwfapi/api.py", line 520, in retrieve
c.execute(req, target)
File "/opt/maja/Start_maja/cams_download/ecmwfapi/api.py", line 452, in execute
self.connection.submit("%s/%s/requests" % (self.url, self.service), request)
File "/opt/maja/Start_maja/cams_download/ecmwfapi/api.py", line 348, in submit
self.call(url, payload, "POST")
File "/opt/maja/Start_maja/cams_download/ecmwfapi/api.py", line 140, in wrapped
return func(self, *args, **kwargs)
File "/opt/maja/Start_maja/cams_download/ecmwfapi/api.py", line 340, in call
raise APIException("ecmwf.API error 1: %s" % (self.last["error"],))
ecmwfapi.api.APIException: u"ecmwf.API error 1: User '***@gmail.com' has not access to datasets/cams_nrealtime. Please accept the terms and conditions at http://apps.ecmwf.int/datasets/licences/cams"
[root@localhost cams_download]#

Инструмент download_CAMS_daily загружает несколько типов полей:
1. Aerosol Optical Thickness AOT, для 5 типов аэрозолей, которые хранятся в файле AOT
2. Соотношения смешивания для каждого типа аэрозолей в зависимости от высоты (выраженные в виде уровней модели), хранящихся в файле MR
3. Относительная влажность в зависимости от высоты, выраженной в уровнях давления, хранится в файле RH.
Эти файлы доступны в настоящее время два раза в день, и некоторые из аппраметров доступны только в виде 3-часового прогноза, а не анализа. Файлы загружаются в формате netCDF и выглядят следующим образом:
CAMS_AOT_yyyymmdd_UTC_hhmm.nc
CAMS_MR_yyyymmdd_UTC_hhmm.nc
CAMS_RH_yyyymmdd_UTC_hhmm.nc
Установка ключа ECMWF.
Если у вас нет учетной записи, зарегистрируйтесь на https://apps.ecmwf.int/registration/.
Выполним вход на https://apps.ecmwf.int/auth/login/
Прочтите лицензию на данные Copernicus и подтвердите ее в нижней части страницы.
Получить ключ на https://api.ecmwf.int/v1/key/
Скопируйте информацию на этой странице и вставить его в файл $ HOME / .ecmwfapirc
Cодержимое файла .ecmwfapirc:

Код: Выделить всё

{
"url" : "https://api.ecmwf.int/v1",
"key" : "your_key",
"email" : "your_email_address"
}
Установим Pip на CentOS.

Код: Выделить всё

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
Проверьте версию установленного пакета: Установим библиотеку ecmwfapi:

Код: Выделить всё

cd ~/opt/maja/Start_maja/cams_download
wget https://software.ecmwf.int/wiki/download/attachments/56664858/ecmwf-api-client-python.tgz
tar -xzf ecmwf-api-client-python.tgz
export PYTHONPATH=~/opt/maja/Start_maja/cams_download:$PYTHONPATH
Скопируйте сценарий Python в текстовый файл и сохраните его, например, как «test.py»,

Код: Выделить всё

#!/usr/bin/env python
from ecmwfapi import ECMWFDataServer
   
server = ECMWFDataServer()
server.retrieve({
    "class": "mc",
    "dataset": "cams_reanalysis",
    "expver": "eac4",
    "stream": "oper",
    "type": "an",
    "levtype": "sfc",
    "param": "167.128",
    "date": "2003-12-01",
    "time": "00:00:00/03:00:00",
    "grid": "1.0/1.0",
    "area": "75/-20/10/60",
    "format": "netcdf",
    "target": "test.nc"
 })
Запустите скрипт:

Код: Выделить всё

python test.py
В результате получим:
Спойлер
[root@localhost cams_download]# python test.py
2018-10-25 09:19:03 ECMWF API python library 1.5.0
2018-10-25 09:19:03 ECMWF API at https://api.ecmwf.int/v1
2018-10-25 09:19:03 Welcome bim2010
2018-10-25 09:19:04 In case of problems, please check https://software.ecmwf.int/wiki/display ... leshooting or contact servicedesk@ecmwf.int
2018-10-25 09:19:04 In case of delays, please check service activity page http://apps.ecmwf.int/webapi-activity/
2018-10-25 09:19:04 Request submitted
2018-10-25 09:19:04 Request id: 5bd1605830dc19482f309c91
2018-10-25 09:19:04 Request is queued
Calling 'nice mars /tmp/75/14/tmp-_marsSp1mRE.req'
mars - WARN -
mars - WARN - From 9 February 2016 10AM (UTC) MARS uses versions of
mars - WARN - libemos newer than 4.3.0. For more details, see
mars - WARN - https://software.ecmwf.int/wiki/display ... SLIB+4.3.x
mars - WARN -
PPDIR is /var/tmp/ppdir/x86_64
mars - INFO - 20181025.061931 - Welcome to MARS
mars - INFO - 20181025.061931 - MARS Client build stamp: 20181022174956
mars - INFO - 20181025.061931 - MARS Client version: 6.23.0
mars - INFO - 20181025.061931 - EMOSLIB version: 4.5.7
mars - INFO - 20181025.061931 - Using ecCodes version 2.9.1
mars - INFO - 20181025.061931 - Using odb_api version: 0.15.8 (file format version: 0.5)
mars - INFO - 20181025.061931 - Maximum retrieval size is 30.00 G
retrieve,stream=oper,area=75/-20/10/60,levtype=sfc,param=167.128,padding=0,grid=1.0/1.0,expver=eac4,time=00:00:00/03:00:00,date=2003-12-01,type=an,class=mcmars - INFO - 20181025.061931 - Automatic split by date is on

mars - INFO - 20181025.061931 - Processing request 1

RETRIEVE,
CLASS = MC,
TYPE = AN,
STREAM = OPER,
EXPVER = eac4,
REPRES = SH,
LEVTYPE = SFC,
PARAM = 167.128,
TIME = 0000/0300,
STEP = 00,
DOMAIN = G,
RESOL = AUTO,
AREA = 75/-20/10/60,
GRID = 1.0/1.0,
PADDING = 0,
DATE = 20031201

mars - INFO - 20181025.061931 - Web API request id: 5bd1605830dc19482f309c91
mars - INFO - 20181025.061931 - Requesting 2 fields
mars - INFO - 20181025.061931 - Calling mars on 'marser', callback on 44802
2018-10-25 09:19:32 Request is active
mars - INFO - 20181025.061938 - Server task is 373 [marser]
mars - INFO - 20181025.061938 - Request cost: 2 fields, 348.234 Kbytes online, nodes: mvr09 [marser]
mars - INFO - 20181025.061938 - Transfering 356592 bytes
mars - INFO - 20181025.061938 - 2 fields retrieved from 'marser'
mars - INFO - 20181025.061938 - 2 fields have been interpolated
mars - INFO - 20181025.061938 - Request time: wall: 8 sec
mars - INFO - 20181025.061938 - Read from network: 348.23 Kbyte(s) in < 1 sec [16.57 Mbyte/sec]
mars - INFO - 20181025.061938 - Processing in marser: wall: 8 sec
mars - INFO - 20181025.061938 - Visiting marser: wall: 8 sec
mars - INFO - 20181025.061938 - Writing to target file: 21.09 Kbyte(s) in < 1 sec [1.41 Mbyte/sec]
mars - INFO - 20181025.061938 - Memory used: 35.69 Mbyte(s)
mars - INFO - 20181025.061938 - No errors reported
Process '['nice', 'mars', '/tmp/75/14/tmp-_marsSp1mRE.req']' finished
Calling 'nice grib_to_netcdf /data/data02/scratch/9f/f1/_mars-atls02-a82bacafb5c306db76464bc7e824bb75-27O7bs.grib -o /data/data03/scratch/65/64/_grib2netcdf-atls02-98f536083ae965b31b0d04811be6f4c6-MqB2cg.nc -utime'
grib_to_netcdf: Version 2.9.0
grib_to_netcdf: Processing input file '/data/data02/scratch/9f/f1/_mars-atls02-a82bacafb5c306db76464bc7e824bb75-27O7bs.grib'.
grib_to_netcdf: Found 2 GRIB fields in 1 file.
grib_to_netcdf: Ignoring key(s): method, type, stream, refdate, hdate
grib_to_netcdf: Creating netCDF file '/data/data03/scratch/65/64/_grib2netcdf-atls02-98f536083ae965b31b0d04811be6f4c6-MqB2cg.nc'
grib_to_netcdf: NetCDF library version: 4.4.1.1 of Mar 14 2018 13:48:26 $
grib_to_netcdf: Creating large (64 bit) file format.
grib_to_netcdf: Defining variable 't2m'.
grib_to_netcdf: Done.
Process '['nice', 'grib_to_netcdf', '/data/data02/scratch/9f/f1/_mars-atls02-a82bacafb5c306db76464bc7e824bb75-27O7bs.grib', '-o', '/data/data03/scratch/65/64/_grib2netcdf-atls02-98f536083ae965b31b0d04811be6f4c6-MqB2cg.nc', '-utime']' finished
2018-10-25 09:19:43 Request is complete
2018-10-25 09:19:43 Transfering 22.4453 Kbytes into test.nc
2018-10-25 09:19:43 From https://stream.ecmwf.int/data/atls02/da ... -MqB2cg.nc
2018-10-25 09:19:43 Transfer rate 61.8146 Kbytes/s
[root@localhost cams_download]#
Comments: Прежде чем запускать скрипт ”download_CAMS_daily.py” рекомендую отредактировать его в 3-х местах заменив параметр: 'area' : "G", на ваши границы сцен Sentinel-2. Например, меня интересует всего 2 сцены Sentinel-2 T36UVG и T36UUG и у меня получилось: 'area' : "56.25/28.75/53.75/33.75",
"G" – означает глобальный охват. После двух суток работы в режиме "G" скрипт загрузил ~500.0 GB, что не требуется в моем случае.
До запуска скрипта, проверить корректность выбранного охвата можно используя API ecmwf.
Быть готовым к не быстрой работе с сервисом ecmwf. Ваш номер в очереди 300 или более.
В /opt/maja/ создадим папки /cdf и /dbl
Попытка запустить скрипт за несколько дней оказалась некорректной. Например так:

Код: Выделить всё

python download_CAMS_daily.py -d 20180501 -f 20180510  -w /opt/maja/cdf -a  /opt/maja/dbl
При этом в папке /dbl создаются .dbl файлы, размер которых растет в геометрической прогрессии от одного дня к другому. И на 10.05.2018 (конец выбранного периода) составляют десятки гигабайт. При этом исходные файлы в формате .nc имеют размер от 2 до 24 килобайт. Предполагаю ошибку в коде при конвертации в .dbl
Проверяю загрузку по отдельным датам. Указываю только те числа, в которые была съемка Sentinel2

Код: Выделить всё

python download_CAMS_daily.py -d 20180503 -f 20180503  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180506 -f 20180506  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180508 -f 20180508  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180511 -f 20180511  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180513 -f 20180513  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180521 -f 20180521  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180526 -f 20180526  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180528 -f 20180528  -w /opt/maja/cdf -a  /opt/maja/dbl
python download_CAMS_daily.py -d 20180531 -f 20180531  -w /opt/maja/cdf -a  /opt/maja/dbl
Полезные ссылки:
Available ECMWF Public Datasets
Access ECMWF Public Datasets
How to download the CAMS Reanalysis data via the ECMWF Web API
Download ECMWF MARS data
Последний раз редактировалось bim2010 16 ноя 2018, 11:53, всего редактировалось 1 раз.

bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

Re: workbook MAJA

Сообщение bim2010 » 09 ноя 2018, 12:34

Для обработки данных с помощью процессора MAJA необходима папка с данными DTM. Набор инструментов собран в папке prepare_mnt. Данные радарной топографической съемки SRTM (90 м) загружаем с сайта CGIAR.
Файлы водных объектов SRTM для создания водных масок SWBD - SRTM Water Body Data загружаем с сайта USGS. В наборах данных USGS выберите Digital Elevation => SRTM => SRTM Water Body Data. Описание и получение данных SRTM.
Ранее мы установили GDAL(gdal-1.10.1.rhel.7.2.x86_64) из набора пакетов maja-cots-1.0.0-rhel.7.2.x86_64-release-gcc Требуется обновить gdal (минимум 1.11) и установить scipy.

Код: Выделить всё

yum install epel-release
yum repo-pkgs epel list gdal*
yum install gdal
yum install gdal-libs
yum install gdal-devel
yum install gdal-python
yum install scipy
gdalinfo --version
В зависимости от характеристик хост-машины необходимо выполнить настройку параметров конфигурации GDAL.

Код: Выделить всё

export GDAL_CACHEMAX = 512
GDAL_CACHEMAX - этот параметр управляет размером кеша растрового блока GDAL по умолчанию. Если его значение невелико (менее 100000), предполагается, что оно измеряется в мегабайтах, в противном случае - в байтах. GDAL_CACHEMAX влияет на объем пространства, зарезервированного для низкоуровневых буферов. Когда блоки считываются с диска или записываются на диск, они кэшируются в глобальном кэше блоков GDALRasterBlock классом. Как только этот кеш превышает GDAL_CACHEMAX старые блоки, они удаляются из кеша.
Создадим файл параметров parametres.txt

Код: Выделить всё

INDIR_MNT =/opt/maja/srtm/
OUTDIR_MNT=/opt/maja/mnt/
INDIR_EAU=/opt/maja/swbd/
OUTDIR_EAU =/opt/maja/mnt/
Для 2-х сцен Sentinel-2 создадим файлы 36UVG.txt и 36UUG.txt. Два файла необходимы, т.к. в текущей реализации процессора MAJA обрабатывает временной ряд только для одной сцены. Содержательную информацию по заполнению файлов можно посмотреть в файле MTD_TL.xml в папке /GRANULE в архиве снимка Sentinel-2.
Содержимое файла 36UVG.txt:
Спойлер
proj=UTM36N
EPSG_out=32636
chaine_proj=EPSG:32636
tx_min=0
ty_min=0
tx_max=0
ty_max=0
pas_x=109800
pas_y=109800
orig_x=399960
orig_y=6200040
marge=0
Содержимое файла 36UUG.txt:
Спойлер
proj=UTM36N
EPSG_out=32636
chaine_proj=EPSG:32636
tx_min=0
ty_min=0
tx_max=0
ty_max=0
pas_x=109800
pas_y=109800
orig_x=300000
orig_y=6200040
marge=0
Где:
proj - имя проекции,
EPSG_out - код EPSG проекции,
chaine_proj - строка, используемая для определения ее в командах gdal
pas_x и pas_y - размер изображения в метрах.
orig_x и orig_y - координаты верхнего левого угла в метрах.
marge - размер области перекрытия между сценами. Для Sentinel-2 marge равно 0.
Запускаем скрипты:

Код: Выделить всё

python tuilage_mnt_eau_S2.py -p parametres.txt -s 36UVG.txt -m SRTM
python tuilage_mnt_eau_S2.py -p parametres.txt -s 36UUG.txt -m SRTM
Лог процесса обработки:
Спойлер
[root@localhost prepare_mnt]# python tuilage_mnt_eau_S2.py -p parametres.txt -s 36UVG.txt -m SRTM
UTM36N
(31.398563085664495, 55.935327060909536, 0.0) (33.152419711015774, 54.95900335845785, 0.0)
[43, 1] [43, 2]
['srtm_43_01.tif', 'srtm_43_02.tif']
(31.398563085664495, 55.935327060909536, 0.0) (33.152419711015774, 54.95900335845785, 0.0)
[31, 55] [33, 54]
['e031n54', 'e031n55', 'e032n54', 'e032n55', 'e033n54', 'e033n55']
longitudes 31 33
latitudes 54 55
center coordinates [[31.5, 54.5], [31.5, 55.5], [32.5, 54.5], [32.5, 55.5], [33.5, 54.5], [33.5, 55.5]]
['e031n54', 'e031n55', 'e032n54', 'e032n55', 'e033n54', 'e033n55']
liste_fic_mnt ['srtm_43_01.tif', 'srtm_43_02.tif']
/opt/maja/srtm//srtm_43_01.tif
/opt/maja/srtm//srtm_43_02.tif
gdal_merge.py -o /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP.tif /opt/maja/srtm/srtm_43_01.tif /opt/maja/srtm/srtm_43_02.tif
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -r cubic -srcnodata -32767 -dstnodata 0 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP.tif /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif

Creating output file that is 6001P x 12001L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
e031n54
#############Fichier eau : /opt/maja/swbd/e031n54e.shp
gdal_rasterize -burn 1 -l e031n54e /opt/maja/swbd/e031n54e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
e031n55
#############Fichier eau : /opt/maja/swbd/e031n55e.shp
gdal_rasterize -burn 1 -l e031n55e /opt/maja/swbd/e031n55e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
e032n54
#############Fichier eau : /opt/maja/swbd/e032n54e.shp
gdal_rasterize -burn 1 -l e032n54e /opt/maja/swbd/e032n54e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
e032n55
#############Fichier eau : /opt/maja/swbd/e032n55e.shp
gdal_rasterize -burn 1 -l e032n55e /opt/maja/swbd/e032n55e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
e033n54
#############Fichier eau : /opt/maja/swbd/e033n54e.shp
gdal_rasterize -burn 1 -l e033n54e /opt/maja/swbd/e033n54e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
e033n55
#############Fichier eau : /opt/maja/swbd/e033n55e.shp
gdal_rasterize -burn 1 -l e033n55e /opt/maja/swbd/e033n55e.shp /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif
Warning : the output raster dataset has a SRS, but the input vector layer SRS is unknown.
Ensure input vector has the same SRS, otherwise results might be incorrect.
0...10...20...30...40...50...60...70...80...90...100 - done.
############ /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif
nom de la tuile T36UVG 0 0
############### c'est parti
###decoupage 90m
gdalwarp -overwrite -r cubic -srcnodata -32768 -dstnodata 0 -of ENVI -tr 90 90 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_90m.mnt

Creating output file that is 1220P x 1220L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 90 90 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_90mfloat.mnt

Creating output file that is 1220P x 1220L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
/opt/maja/mnt/T36UVG/T36UVG_90m
###decoupage 240m
gdalwarp -overwrite -r cubic -srcnodata -32768 -dstnodata 0 -of ENVI -tr 240 240 -te 399960 6090120 509880 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_240m.mnt

Creating output file that is 458P x 458L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 240 240 -te 399960 6090120 509880 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_240mfloat.mnt

Creating output file that is 458P x 458L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 240 240 -te 399960 6090120 509880 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl /opt/maja/mnt/T36UVG/T36UVG_240mfloat.dz_dl

Creating output file that is 458P x 458L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 240 240 -te 399960 6090120 509880 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc /opt/maja/mnt/T36UVG/T36UVG_240mfloat.dz_dc

Creating output file that is 458P x 458L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc.
0...10...20...30...40...50...60...70...80...90...100 - done.
/opt/maja/mnt/T36UVG/T36UVG_240m
419528
/opt/maja/Start_maja/prepare_mnt/lib_mnt.py:319: RuntimeWarning: invalid value encountered in divide
aspect = np.where(dz_dc > 0, np.arccos(dz_dl / norme), 2 * np.pi - np.arccos(dz_dl / norme))
###decoupage 10m
gdalwarp -overwrite -r cubic -srcnodata -32768 -dstnodata 0 -of ENVI -tr 10 10 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_10m.mnt

Creating output file that is 10980P x 10980L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 10 10 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_10mfloat.mnt

Creating output file that is 10980P x 10980L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 10 10 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl /opt/maja/mnt/T36UVG/T36UVG_10mfloat.dz_dl

Creating output file that is 10980P x 10980L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 10 10 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc /opt/maja/mnt/T36UVG/T36UVG_10mfloat.dz_dc

Creating output file that is 10980P x 10980L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc.
0...10...20...30...40...50...60...70...80...90...100 - done.
/opt/maja/mnt/T36UVG/T36UVG_10m
241120800
/opt/maja/Start_maja/prepare_mnt/lib_mnt.py:319: RuntimeWarning: divide by zero encountered in divide
aspect = np.where(dz_dc > 0, np.arccos(dz_dl / norme), 2 * np.pi - np.arccos(dz_dl / norme))
/opt/maja/Start_maja/prepare_mnt/lib_mnt.py:319: RuntimeWarning: invalid value encountered in arccos
aspect = np.where(dz_dc > 0, np.arccos(dz_dl / norme), 2 * np.pi - np.arccos(dz_dl / norme))
###decoupage 20m
gdalwarp -overwrite -r cubic -srcnodata -32768 -dstnodata 0 -of ENVI -tr 20 20 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_20m.mnt

Creating output file that is 5490P x 5490L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 20 20 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif /opt/maja/mnt/T36UVG/T36UVG_20mfloat.mnt

Creating output file that is 5490P x 5490L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HPnodata0.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 20 20 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl /opt/maja/mnt/T36UVG/T36UVG_20mfloat.dz_dl

Creating output file that is 5490P x 5490L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dl.
0...10...20...30...40...50...60...70...80...90...100 - done.
gdalwarp -overwrite -r cubic -ot Float32 -srcnodata -32768 -dstnodata 0 -of ENVI -tr 20 20 -te 399960 6090240 509760 6200040 -t_srs EPSG:32636 /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc /opt/maja/mnt/T36UVG/T36UVG_20mfloat.dz_dc

Creating output file that is 5490P x 5490L.
Processing input file /opt/maja/mnt/T36UVG/T36UVG_90mfloat.dz_dc.
0...10...20...30...40...50...60...70...80...90...100 - done.
/opt/maja/mnt/T36UVG/T36UVG_20m
60280200
gdalwarp -overwrite -r near -of ENVI -tr 240 240 -te 399960 6090120 509880 6200040 -t_srs EPSG:32636 /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif /opt/maja/mnt/T36UVG/T36UVG_240m.eau

Creating output file that is 458P x 458L.
Processing input file /tmp/T36UVG_P7IpXV/mnt_T36UVG8Dj9HP_tmp.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
[root@localhost prepare_mnt]#

Код: Выделить всё

python conversion_format_maja.py -t 36UVG -f /opt/maja/mnt/36UVG/
python conversion_format_maja.py -t 36UUG -f /opt/maja/mnt/36UUG/
Лог процесса обработки:
Спойлер
[root@localhost prepare_mnt]# python conversion_format_maja.py -t 36UVG -f /opt/maja/mnt/36UVG
32636
WGS 84 / UTM zone 36N 32636
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_10m.mnt S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ALT_R1.TIF
Input file size is 10980, 10980
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_20m.mnt S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ALT_R2.TIF
Input file size is 5490, 5490
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_240m.mnt S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ALC.TIF
Input file size is 458, 458
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_10m.slope S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_SLP_R1.TIF
Input file size is 10980, 10980
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_20m.slope S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_SLP_R2.TIF
Input file size is 5490, 5490
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_240m.slope S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_SLC.TIF
Input file size is 458, 458
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_10m.aspect S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ASP_R1.TIF
Input file size is 10980, 10980
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_20m.aspect S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ASP_R2.TIF
Input file size is 5490, 5490
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_240m.aspect S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_ASC.TIF
Input file size is 458, 458
0...10...20...30...40...50...60...70...80...90...100 - done.
gdal_translate -of GTIFF /opt/maja/mnt/T36UVG/T36UVG_240m.eau S2__TEST_AUX_REFDE2_TT36UVG_0001/S2__TEST_AUX_REFDE2_TT36UVG_0001.DBL.DIR/S2__TEST_AUX_REFDE2_TT36UVG_0001_MSK.TIF
Input file size is 458, 458
0...10...20...30...40...50...60...70...80...90...100 - done.
[root@localhost prepare_mnt]#
Как описано в файле документации процессора MAJA, формат Earth Explorer был выбран в качестве стандартного формата для внешних данных MAJA и в качестве результата работы процессора. У нас есть файл HDR xml и bzipped DBL-архив. Формат файла Earth Explorer описан здесь.
Более свежее описание 2015 года.
Про софт:
https://earth.esa.int/web/guest/mission ... tware-7633
https://earth.esa.int/web/guest/softwar ... rison-tool
https://earth.esa.int/c/document_librar ... E-5710.pdf
https://earth.esa.int/documents/10174/9 ... _Practical

bim2010
Гуру
Сообщения: 977
Зарегистрирован: 27 янв 2009, 22:57
Репутация: 258

Re: workbook MAJA

Сообщение bim2010 » 16 ноя 2018, 12:42

У MAJA 3_1 все еще есть несколько ошибок, поэтому не советую пока использовать. Необходимо выполнить
git checkout Start_maja_V1
Или скачать из ветки https://github.com/olivierhagolle/Start ... rt_maja_V1 и заместить содержимое папки Start_maja. Свежий вариант GIPP_MAJA_1_0 берем здесь: http://tully.ups-tlse.fr/olivier/gipp/t ... AS2B_NATIF
Скачиваем, редактируем и замещаем папку GIPP_MAJA_1_0_S2AS2B_NATIF.
Из папки /prepare_mnt копируем файлы S2__TEST_AUX_REFDE2_T36UVG_0001 в папку GIPP_MAJA_1_0_S2AS2B_NATIF.
Заводим в \Start_maja папку \DEM и копируем в нее содержимое из папки \mnt.
Запускам скрипт:

Код: Выделить всё

python start_maja.py -f folders.txt -c MAJA_1_0_S2AS2B_NATIF -t 36UVG -s 36UVG -d 20180503
Логи и результат работы процессора MAJA можно посмотреть здесь:
https://cloud.mail.ru/public/JPSV/HCgTSkMeS
Формат выходных файлов описан в руководстве по установке и эксплуатации MAJA (стр. 32) и в документе S2_NOMINAL-dataset-description.docx.
Вложения
output_file.jpg
OUTPUT FILES
output_file.jpg (158.69 КБ) 10280 просмотров
format_out_sentinel2.jpg
Level 2 Sentinel 2 Image product
format_out_sentinel2.jpg (822.05 КБ) 10281 просмотр

Ответить

Вернуться в «Обработка ДДЗ»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 3 гостя