Ensure you have Docker Desktop installed on your machine. You can download it from Docker's official website.
Navigate to the project root directory in your terminal and build the Docker image using the following command:
docker build -t my-fortran-env .
In the project root directory, run the Docker container. This command will start the container and mount the app
directory, allowing you to execute Python code within the Docker environment:
docker run -it --rm -v ./app:/app my-fortran-env bash
Inside the Docker container, run the Python script to generate the intermediate data format:
python netcdf2intermediate.py
After generating the intermediate file, you can read it using the same Python library:
python readthefile.py
To exit the Docker container, type the following command. The container will be deleted automatically:
exit
If you need to run the Docker container again and already have the Docker image built, repeat steps 2 to 5.