{ "cells": [ { "cell_type": "markdown", "source": [ "# PFS - experimental support\n", "\n", "Support for PFS is limited to files with unique subsections. This applies to all files in the MIKE FM family.\n", "\n", "It is only possible to read files, there is no support for modifying or writing files at this stage." ], "metadata": {} }, { "cell_type": "code", "execution_count": 1, "source": [ "from mikeio import Pfs\n", "\n", "pfs = Pfs(\"../tests/testdata/lake.sw\")" ], "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Support for PFS files in mikeio is experimental. The API is likely to change!\n" ] }, { "output_type": "stream", "name": "stderr", "text": [ "c:\\users\\jem\\source\\mikeio\\mikeio\\pfs.py:27: UserWarning: Support for PFS files in mikeio is experimental. The API is likely to change!\n", " warnings.warn(\n" ] } ], "metadata": {} }, { "cell_type": "code", "execution_count": 2, "source": [ "pfs.data.MODULE_SELECTION.mode_of_spectral_wave_module" ], "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "2" ] }, "metadata": {}, "execution_count": 2 } ], "metadata": {} }, { "cell_type": "code", "execution_count": 3, "source": [ "pfs.data.SW.SPECTRAL.number_of_directions" ], "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "16" ] }, "metadata": {}, "execution_count": 3 } ], "metadata": {} }, { "cell_type": "code", "execution_count": 4, "source": [ "pfs.data.SW.SPECTRAL.maximum_threshold_frequency" ], "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "0.5959088268863615" ] }, "metadata": {}, "execution_count": 4 } ], "metadata": {} }, { "cell_type": "code", "execution_count": 5, "source": [ "df = pfs.data.SW.get_outputs()\n", "df" ], "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " file_name include type format first_time_step \\\n", "1 Wave_parameters.dfsu 1 1 2 0 \n", "2 Wave_line.dfs1 0 1 1 0 \n", "3 Waves_x20km_y20km.dfs0 1 1 0 0 \n", "4 spectrum_x20km_y20km.dfsu 1 4 0 0 \n", "\n", " last_time_step use_end_time time_step_frequency \n", "1 450 1 10 \n", "2 450 1 10 \n", "3 450 1 1 \n", "4 450 1 10 " ], "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
file_nameincludetypeformatfirst_time_steplast_time_stepuse_end_timetime_step_frequency
1Wave_parameters.dfsu1120450110
2Wave_line.dfs10110450110
3Waves_x20km_y20km.dfs0110045011
4spectrum_x20km_y20km.dfsu1400450110
\n", "
" ] }, "metadata": {}, "execution_count": 5 } ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [], "outputs": [], "metadata": {} } ], "metadata": { "kernelspec": { "name": "python3", "display_name": "Python 3.8.10 64-bit ('base': conda)" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" }, "interpreter": { "hash": "fa576ebcd40e010bdc0ae86b06ce09151f3424f9e9aed6893ff04f39a9299d89" } }, "nbformat": 4, "nbformat_minor": 4 }