Difference between revisions of "How to convert data for Geogrid"
Line 26: | Line 26: | ||
== Get wrfxpy repository == | == Get wrfxpy repository == | ||
+ | |||
+ | Get repository wrfxpy and checkout to convert_geotiff branch. Shortly, it is going to be available in the master branch. | ||
+ | git clone https://github.com/openwfm/wrfxpy | ||
+ | git checkout convert_geotiff | ||
== Run convert_geotiff.sh == | == Run convert_geotiff.sh == |
Revision as of 18:47, 2 July 2020
- Back to the WRF-SFIRE user guide.
This wiki page explains how to transform geotiff files to geogrid using convert_geotiff script in wrfxpy.
Get Anaconda3 distribution
Download and install the Python 3 Anaconda Python distribution for your platform. We recommend an installation into the user's home directory.
wget https://repo.continuum.io/archive/Anaconda3-2019.10-Linux-x86_64.sh chmod +x Anaconda3-2019.10-Linux-x86_64.sh ./Anaconda3-2019.10-Linux-x86_64.sh
Add your environment (~/.custom.csh) the following line
setenv PROJ_LIB "$HOME/anaconda3/share/proj"
or if you are using bash to ~/.profile or ~/.bashrc
export PROJ_LIB="$HOME/anaconda3/share/proj"
Install environment
Create a python environment for gdal compatibility. Shortly this is going to be the environment for wrfxpy installation.
conda create -n wrfxpy python=3 gdal netcdf4 pyproj paramiko dill scikit-learn h5py pandas psutil proj4 conda activate wrfxpy conda install -c conda-forge simplekml pygrib f90nml pyhdf xmltodict basemap pip install MesoPy python-cmr
Note that conda and pip are package managers available in the Anaconda Python distribution.
Get wrfxpy repository
Get repository wrfxpy and checkout to convert_geotiff branch. Shortly, it is going to be available in the master branch.
git clone https://github.com/openwfm/wrfxpy git checkout convert_geotiff
Run convert_geotiff.sh
See the github repository for convert_geotiff for the latest documentation and source code.