Skip to content

Commit

Permalink
reformated repo
Browse files Browse the repository at this point in the history
  • Loading branch information
torimcd committed Aug 3, 2020
1 parent 60d7783 commit 5df3841
Show file tree
Hide file tree
Showing 17 changed files with 373 additions and 218 deletions.
Binary file added .DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,34 @@
# coriolis-sm
Updated code examples from Stommel & Moore's "An Introduction to the Coriolis Force"
This repository contains updated code examples from "An Introduction to the Coriolis Force" by Stommel & Moore (1989).
Programs were rewritten in Python from the original GW-BASIC.



RUN THE PROGRAMS IN A JUPYTER NOTEBOOK
--------------------------------------
Standalone Jupyter Notebook files (.ipynb) for each exercise are available in the notebooks directory. These contain full inline explanations including notes from the original text to explain each program.



RUN THE PYTHON CODE FILES
-------------------------
Pythoon code files (.py) for the full set of exercises are available in the code directory. There are comments explaining some of the code but see the notebooks for more verbose explanations.

The coriolis_tools module contains the subroutines that are shared among multiple exercises, in the spirit of how the original program was designed. Programs that use tools from this module will fail unless it is in the same directory that the program is run from.



RUN THE ORIGINAL PROGRAMS IN GW-BASIC
----------------------------------

The original GW-BASIC programs (.bas files) can be found in the GW-BASIC directory. These programs can be run in the PC-BASIC emulator (https://robhagemans.github.io/pcbasic/) which is available for Windows, OSX, and Linux.

CORIOLIS.bas is the full program containing all of the exercises from the book as described in section 1.2 of Stommel and Moore (1989).
Individual exercises are also provided and contain all of the subroutines that they require individually.

ALong with each individual exercise is a text file documenting in plain language the algorithm used - ie, what they programmed in BASIC. These are the notes I used to rewrite the programs in Python, and can be used to extend the programs to other languages as desired.

To run the programs in PCBASIC, copy the .bas file to your home directory. On Windows this is usually C:\Users\YourName. On OSX and Linux this is ~
Refer to the documentation (https://robhagemans.github.io/pcbasic/doc/1.2/#mounting) in case your system is configured differently or you installed PC-BASIC to a different location.

Load the program into memory by typing LOAD "FILENAME" into the PC-BASIC terminal, where filename is the name of the .bas file you want to run. Then type RUN to start the program.
70 changes: 0 additions & 70 deletions animation_example.py

This file was deleted.

Binary file added code/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
136 changes: 0 additions & 136 deletions coriolis/1-1_updated.py

This file was deleted.

Empty file.
4 changes: 0 additions & 4 deletions coriolis/readme.txt

This file was deleted.

7 changes: 0 additions & 7 deletions coriolis/spheroid_earth/coriolis.code-workspace

This file was deleted.

Empty file removed coriolis/test/__init__.py
Empty file.
Empty file removed coriolis/test/test_code.py
Empty file.
File renamed without changes.
340 changes: 340 additions & 0 deletions notebooks/7-1.ipynb

Large diffs are not rendered by default.

0 comments on commit 5df3841

Please sign in to comment.