Package: pyfesom2
[![Build Status](https://travis-ci.org/koldunovn/pyfesom2.svg?branch=master)](https://travis-ci.org/koldunovn/pyfesom2)
[![Documentation Status](https://readthedocs.org/projects/pyfesom2/badge/?version=latest)](https://pyfesom2.readthedocs.io/en/latest/?badge=latest)FESOM2 toolsFree software: MIT licenseDocumentation:https://pyfesom2.readthedocs.io.InstallationThe only supported way now it to useconda. The short guide how to install it can be found for [Linux/Mac](https://github.com/koldunovn/python_for_geosciences/blob/master/README.md#getting-started-for-linuxmac) and [Windows](https://github.com/koldunovn/python_for_geosciences/blob/master/README.md#getting-started-for-windows). For now we are not testing for Windows, and there is no garantee that pyfesom2 will work on this OS.The easiest way is to install latest stable version fromconda-forge:conda config –add channels conda-forge
conda install pyfesom2Development InstallationIf you plan to change the code inside the package, you have to install it in “development” mode.
After you installconda(python 3.7 environment is recomendes), clone the source code:git clonehttps://github.com/FESOM/pyfesom2.gitCreate pyfesom2 environment by:conda env create -f ./pyfesom2/ci/requirements-py37.ymlActivate the environmentconda activate pyfesom2Install pyfesom2cd pyfesom2
pip install -e .Usage of toolsBelow are couple of examples of CLI tools usage.
For now two tools are available:pfplot(plot variable on the map) andpfinterp(interpolate scalar values to regular grid). You can get complete list of options by executing:pfplot -hTo plot temperature field one can do:pfplot ./CORE_MESH/ ./CORE_out/ tempwhere./CORE_MESHis path to the mesh,./CORE_out/is path to the folder with results andtempis the name of the variable. By defauldpfplotwill try to plot the mean values from the year 1948 at the surface (0 depth) on a global 360/180 map. Make sure you have write permissions to the folder with the mesh, since pfplot will save interpolation information, so next time it is not calculated but just loaded from the file.To plot the different year:pfplot ./CORE_MESH/ ./CORE_out/ temp -y 2000Plot different depth:pfplot ./CORE_MESH/ ./CORE_out/ temp -y 2000 -d 100Plot mean over several years:pfplot ./CORE_MESH/ ./CORE_out/ temp -y 1948,1949,1950Plot mean over several years by specifying the range:pfplot ./CORE_MESH/ ./CORE_out/ temp -y 1948:1955Plot with North Polar Stereo projection (you have to specify different bounding box with-b)pfplot ./CORE_MESH/ ./CORE_out/ temp -y 2000 -b -180 180 60 90 -m npFeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2020-08-05)Breaking changesdepricateplot_transectandhofm_plotfunctions. Replaced with more generalplot_xyzfunction.replacetransect_uvwithget_transect_uv.remove Basemap dependency and all code related to Basemap.New Featuresplot_vector- plotting vector on a map.plot_xyz- ploting, for example, transect or hovmoeller diagrams.get_transect- returns the data for transect, that then should be used withplot_xyzto plot.tplot- plotting on original FESOM mesh, without interpolation.compute_face_coords- compute coordinates (centers) of elements (triangles).cut_region- cut region from the mesh.xmoc_data- compute moc for selected regionget_mask- create mask of the region (e.g. Atlantic or Pacific Ocean).Bug fixesfixget_cmapto cpmply with new matplotlib versions.fix RTD builds on master (bySuvarchal Kumar Cheedela).fix issue with time module change after python 3.7 (byPaul Gierz)DocumentationNotebook example for vector plotting.Notebook example for plotting on original mesh with``tplot``.Notebook example for very fast plotting withgeoviews.Notebook example for xMOC plotting.Internal Changesgeneral cleaning up of the codesplitplotfunction to make it more readable.refactortonodesfunction, allow xarray intonodes3dadd tests for transects.0.1.1 (2019-02-12)Fixes for PyPI0.1.0 (2019-02-12)First release on PyPI.