cloudmodel


Namecloudmodel JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryA simple, parameterized cloud model
upload_time2024-09-07 15:39:55
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseThe MIT License
keywords simulator cloud fortran python modeling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # README

## Table of Contents

- [Python](#python)

-- [Installation](#instalation)
-- [Usage](#usage)

## Python

### Instalation

To install as a pip package:

```console
    pip install -i https://test.pypi.org/simple/ cloudmodel
```

### Usage

To run the model, first import it from the library

```python
    from cloudmodel import CloudModel
```

and call it with the desired parameters

```python
CloudModel(
    simulation_time_minutes,  #(int): The total simulation time in minutes.
    save_time_minutes,  # (int): The time interval in minutes at which the model state is saved.
    statistic_time_minutes,  # (int): The time interval in minutes at which statistics are calculated.
    bacup_time_minutes,  # (int): The time interval in minutes at which backups are created.
)
```

When the model finishes running there will be a new directory, where all the output data from the simulation will be stored.

The following section describes all the functions that can be applied to those simulation results.

### Features

```python
class FileStyle:
    """A class representing the file style for cloud data.

    Attributes:
        chosen_file (str): The chosen input file type.
        output_data_path (str): The path to the output data folder.
        cmp_output_data_path (str): The path to the comparison output data folder.
        img_path (str): The path to the image folder.
        txt_path (str): The path to the text folder.
        cmp_txt_path (str): The path to the comparison text folder.
        vid_path (str): The path to the video folder.
        img_option (str): The image style option.
        folder_handle (str): The folder handling option.

    Methods:
        _get_data(): Get the data from the selected files.
        _get_var_from_data(file_number, var_iterator): Get a specific variable from the data.
        list_var(): List all the variables.
        get_var(var, time): Get a specific variable at a given time.
        show_var_dataframe(var_array, center, axes): Show the variable data as a DataFrame.
        center_var(var_array, center, axes): Center the variable data along a specific axes.
        get_var_max_value_position(var_array): Get the position of the maximum value in the variable data.
        check_path(path, selected_file_name): Check if the path exists and create it if necessary.
        cloud_binary_comparison(): Compare the binary files in the output data and comparison output data folders.
        live_var_animation(variable): Create a live animation of a variable.
        plot_style(variable): Plot the style of a variable.
        generate_image(frame, var_number): Generate an image for a specific frame and variable.
        animate_variables(var_list, save_animation, show_animation): Animate multiple variables.
        animate_variable(var_to_animate, save_animation, show_animation, check_path): Animate a specific variable.
        parse_status_img(): Parse the status images.
        multi_var_img(var_1, var_2, file="inis.da"): Create an image with multiple variables.
        show_file_diff(file): Show the differences between two text files.
        cloud_text_comparison(): Compare text files in the specified paths and display the differences, if any.
        get_unequal_files(): Get the unequal files between two folders.
        parse_text_files(): Parse the text files.
    """
```

A run + image generation for all variables to all the simulated times would look like this:

```python
    from cloudmodel import CloudModel
    
    CloudModel(
        simulation_time_minutes=45,
        save_time_minutes=3,
        statistic_time_minutes=3,
        bacup_time_minutes=3,
    )

    
    cloud = FileStyle(
        chosen_file="Nube",
        output_data_path="Data/new_code/",
        cmp_output_data_path="outputdata1/",
        img_path="img/new_code/",
        txt_path="txt/",
        cmp_txt_path="txt1/",
        vid_path="vid/",
        img_option="Contour",
        folder_handle="Delete",
    )
    cloud.parse_status_img()
    theta_base = cloud.get_var(cloud.var_list[3])
    cloud.show_var_dataframe(theta_base, 3)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cloudmodel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "simulator, cloud, fortran, python, modeling",
    "author": null,
    "author_email": "\"Diego E. Oleiarz\" <diego.oleiarz@mi.unc.edu.ar>",
    "download_url": null,
    "platform": null,
    "description": "# README\n\n## Table of Contents\n\n- [Python](#python)\n\n-- [Installation](#instalation)\n-- [Usage](#usage)\n\n## Python\n\n### Instalation\n\nTo install as a pip package:\n\n```console\n    pip install -i https://test.pypi.org/simple/ cloudmodel\n```\n\n### Usage\n\nTo run the model, first import it from the library\n\n```python\n    from cloudmodel import CloudModel\n```\n\nand call it with the desired parameters\n\n```python\nCloudModel(\n    simulation_time_minutes,  #(int): The total simulation time in minutes.\n    save_time_minutes,  # (int): The time interval in minutes at which the model state is saved.\n    statistic_time_minutes,  # (int): The time interval in minutes at which statistics are calculated.\n    bacup_time_minutes,  # (int): The time interval in minutes at which backups are created.\n)\n```\n\nWhen the model finishes running there will be a new directory, where all the output data from the simulation will be stored.\n\nThe following section describes all the functions that can be applied to those simulation results.\n\n### Features\n\n```python\nclass FileStyle:\n    \"\"\"A class representing the file style for cloud data.\n\n    Attributes:\n        chosen_file (str): The chosen input file type.\n        output_data_path (str): The path to the output data folder.\n        cmp_output_data_path (str): The path to the comparison output data folder.\n        img_path (str): The path to the image folder.\n        txt_path (str): The path to the text folder.\n        cmp_txt_path (str): The path to the comparison text folder.\n        vid_path (str): The path to the video folder.\n        img_option (str): The image style option.\n        folder_handle (str): The folder handling option.\n\n    Methods:\n        _get_data(): Get the data from the selected files.\n        _get_var_from_data(file_number, var_iterator): Get a specific variable from the data.\n        list_var(): List all the variables.\n        get_var(var, time): Get a specific variable at a given time.\n        show_var_dataframe(var_array, center, axes): Show the variable data as a DataFrame.\n        center_var(var_array, center, axes): Center the variable data along a specific axes.\n        get_var_max_value_position(var_array): Get the position of the maximum value in the variable data.\n        check_path(path, selected_file_name): Check if the path exists and create it if necessary.\n        cloud_binary_comparison(): Compare the binary files in the output data and comparison output data folders.\n        live_var_animation(variable): Create a live animation of a variable.\n        plot_style(variable): Plot the style of a variable.\n        generate_image(frame, var_number): Generate an image for a specific frame and variable.\n        animate_variables(var_list, save_animation, show_animation): Animate multiple variables.\n        animate_variable(var_to_animate, save_animation, show_animation, check_path): Animate a specific variable.\n        parse_status_img(): Parse the status images.\n        multi_var_img(var_1, var_2, file=\"inis.da\"): Create an image with multiple variables.\n        show_file_diff(file): Show the differences between two text files.\n        cloud_text_comparison(): Compare text files in the specified paths and display the differences, if any.\n        get_unequal_files(): Get the unequal files between two folders.\n        parse_text_files(): Parse the text files.\n    \"\"\"\n```\n\nA run + image generation for all variables to all the simulated times would look like this:\n\n```python\n    from cloudmodel import CloudModel\n    \n    CloudModel(\n        simulation_time_minutes=45,\n        save_time_minutes=3,\n        statistic_time_minutes=3,\n        bacup_time_minutes=3,\n    )\n\n    \n    cloud = FileStyle(\n        chosen_file=\"Nube\",\n        output_data_path=\"Data/new_code/\",\n        cmp_output_data_path=\"outputdata1/\",\n        img_path=\"img/new_code/\",\n        txt_path=\"txt/\",\n        cmp_txt_path=\"txt1/\",\n        vid_path=\"vid/\",\n        img_option=\"Contour\",\n        folder_handle=\"Delete\",\n    )\n    cloud.parse_status_img()\n    theta_base = cloud.get_var(cloud.var_list[3])\n    cloud.show_var_dataframe(theta_base, 3)\n```\n",
    "bugtrack_url": null,
    "license": "The MIT License",
    "summary": "A simple, parameterized cloud model",
    "version": "1.0.1",
    "project_urls": {
        "Documentation": "https://diegoolei.github.io/Fortran77-Cloud-Model/",
        "Homepage": "https://github.com/Diegoolei/Fortran77-Cloud-Model"
    },
    "split_keywords": [
        "simulator",
        " cloud",
        " fortran",
        " python",
        " modeling"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "91eba187fa678d53ecb87798b0c1dc64cb78e4ae874dabedd9f261cb89b4acac",
                "md5": "d7db99808c93379c973e31972d452ab3",
                "sha256": "9f054509ba35eda98094f3a362a8a03ffefb04b1c8274f09def10b6e481d9b8d"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d7db99808c93379c973e31972d452ab3",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<3.13,>=3.10",
            "size": 1319351,
            "upload_time": "2024-09-07T15:39:55",
            "upload_time_iso_8601": "2024-09-07T15:39:55.617641Z",
            "url": "https://files.pythonhosted.org/packages/91/eb/a187fa678d53ecb87798b0c1dc64cb78e4ae874dabedd9f261cb89b4acac/cloudmodel-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c837e1f2e5f0fd91ff89d977348a967d08568084f0f7b6e948e0d78944dbe69",
                "md5": "9ab30ef6f54597dca0ddd6762763584a",
                "sha256": "cbe684f0dad735f85437f641c6c6f8a6ef810d2c03b5373e5d4abe7d0e09457a"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "9ab30ef6f54597dca0ddd6762763584a",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": "<3.13,>=3.10",
            "size": 1682659,
            "upload_time": "2024-09-07T15:39:57",
            "upload_time_iso_8601": "2024-09-07T15:39:57.163253Z",
            "url": "https://files.pythonhosted.org/packages/5c/83/7e1f2e5f0fd91ff89d977348a967d08568084f0f7b6e948e0d78944dbe69/cloudmodel-1.0.1-cp310-cp310-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d0059ebe7d55b302e92107f7ad9b9d6de2fdc9ca37107ad07df6f49ac51873a2",
                "md5": "136ead8e43de89ac3c2da0e95dad5afe",
                "sha256": "f7b8601eec8db68e5a540e9f7125a31b8b15955134a331a1fb1e6e85b0f4d36f"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "136ead8e43de89ac3c2da0e95dad5afe",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<3.13,>=3.10",
            "size": 1319373,
            "upload_time": "2024-09-07T15:39:59",
            "upload_time_iso_8601": "2024-09-07T15:39:59.135739Z",
            "url": "https://files.pythonhosted.org/packages/d0/05/9ebe7d55b302e92107f7ad9b9d6de2fdc9ca37107ad07df6f49ac51873a2/cloudmodel-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e6fb5788297537e42ed795e2db455d4a34b18f0966dc545d89fca7bb8c039a30",
                "md5": "f75b19c376144930ce80b39e176a5469",
                "sha256": "9508c110f65fad5c9db939cb012516bd3f93484dc00daa6b61dc37fba0081dbc"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f75b19c376144930ce80b39e176a5469",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": "<3.13,>=3.10",
            "size": 1682653,
            "upload_time": "2024-09-07T15:40:01",
            "upload_time_iso_8601": "2024-09-07T15:40:01.140194Z",
            "url": "https://files.pythonhosted.org/packages/e6/fb/5788297537e42ed795e2db455d4a34b18f0966dc545d89fca7bb8c039a30/cloudmodel-1.0.1-cp311-cp311-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ef83479017908c729c2d9f4dba38247a15835152ceb0c8ba412fe94dd1131a8",
                "md5": "1e7ea307a101faeab3ba2dd711cfe4fb",
                "sha256": "d67c72b006344a6b2ca8af0fc3828af1ea5c7e603f006d17de04dc132e13dc83"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1e7ea307a101faeab3ba2dd711cfe4fb",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.13,>=3.10",
            "size": 1319467,
            "upload_time": "2024-09-07T15:40:02",
            "upload_time_iso_8601": "2024-09-07T15:40:02.640436Z",
            "url": "https://files.pythonhosted.org/packages/4e/f8/3479017908c729c2d9f4dba38247a15835152ceb0c8ba412fe94dd1131a8/cloudmodel-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a5cc090447fe5c9d4f156de178e243cbf589d9c2b0b1054232eecd7c32b3e0e",
                "md5": "ff47023f6c35f43ef9a8de9ad32eb5ce",
                "sha256": "19131c72b3d1f01d54a1d193b6731bb780872ab1684990d1eb73fb8c463b4244"
            },
            "downloads": -1,
            "filename": "cloudmodel-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ff47023f6c35f43ef9a8de9ad32eb5ce",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": "<3.13,>=3.10",
            "size": 1682910,
            "upload_time": "2024-09-07T15:40:04",
            "upload_time_iso_8601": "2024-09-07T15:40:04.308193Z",
            "url": "https://files.pythonhosted.org/packages/5a/5c/c090447fe5c9d4f156de178e243cbf589d9c2b0b1054232eecd7c32b3e0e/cloudmodel-1.0.1-cp312-cp312-musllinux_1_2_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 15:39:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Diegoolei",
    "github_project": "Fortran77-Cloud-Model",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cloudmodel"
}
        
Elapsed time: 3.28249s