<jupyter_start><jupyter_text>Please note that you need to have the OSGeo (Gdal) Python package installed.```bash conda install gdal OR pip install pygdal=="`gdal-config --version`.*" python >>>from osgeo import gdal```<jupyter_code>from pyfesom2 import load_mesh,select_slices,fesom2GeoFormat
import xarray as xr<jupyter_output><empty_output><jupyter_text>Set Path to the mesh and result<jupyter_code>meshPath  ='../tests/data/pi-grid/' 
result_path ='../tests/data/pi-results/temp.fesom.1948.nc'
alpha, beta, gamma=[50, 15, -90]<jupyter_output><empty_output><jupyter_text>Load the mesh<jupyter_code>mesh=load_mesh(meshPath,abg=[alpha, beta, gamma], usepickle = False)<jupyter_output>Load 2d part of the mesh in 0 second(s)<jupyter_text>load and slicing the data<jupyter_code>result_Obj = xr.open_mfdataset(result_path,combine="by_coords")
data=select_slices(result_Obj,"temp",mesh,[0],500)
data.mean(dim="time")
data=data.compute().data<jupyter_output><empty_output><jupyter_text>calling fesom2GeoFormat+ Data = **numpy array**+ mesh = **pyfesom mesh representation**+ outName = **Output Name with extension "exampl.tif" or "example.nc"**+ radius_of_influence = **Cut off distance in meters, only used in nn and idist.Default=100000**+ driver = **String "Gtiff" for geoTiff and "netCDF" for netcdf**+ method=  **Interpolation method. Options are 'nn' (nearest neighbor), 'idist' (inverce distance), "linear" and "cubic"**<jupyter_code>fesom2GeoFormat(
    data,
    mesh,
    'newTest.tif',
    method='nn',
    driver='Gtiff',
    radius_of_influence=500000)
!gdalinfo newTest.tif<jupyter_output>Driver: GTiff/GeoTIFF
Files: newTest.tif
Size is 360, 168
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-179.963005891225805,89.404839573043475)
Pixel Size = (1.000000000000000,-1.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-179.9630059,  89.4048396) (179d57'46.82"W, 89d24'17.42"N)
Lower Left  (-179.9630059, -78.5951604) (179d57'46.82"W, 78d35'42.58"S)
Upper Right ( 180.0369941,  89.4048396) (180d 2'13.18"E, 89d24'17.42"N)
Lower Right ( 180.0369941, -78.5951604) (180d 2'13.18"E, 78d35'42.58"S)
Center      (   0.0369941,   5.4048396) (  0d 2'13.18"E,  5d24'17.42"N)
Band 1 Block=360x22 Type=Byte, ColorInterp=Gray
{'fraction_non_alphanumeric': 0.1469785575048733, 'fraction_numerical': 0.13216374269005848, 'mean_word_length': 5.545918367346939, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '126131', 'license': 'MIT', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1018, 'n_words': 198, 'path': 'newver_202009/notebooks/extra_notebooks/Fesom2GeoFormat.ipynb', 'repo_name': 'JiuShiNewBee/mypyfesom2', 'size': '2565'}