Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description of coupler

Colin Thackray wrote the The coupler is a Python interface to pass that passes information between the MITgcm ocean and GEOS-Chem atmosphere, allowing you to capture the temporal dynamics of air-sea exchange. The coupler was initially developed as part of a project to model the global fate and transport of polychlorinated biphenyls (PCBs), a semi-volatile industrial chemical. 

Credit & citation

Colin Pike-Thackray (MIT) wrote all of the Python and shell scripts . He's the coding wizard who made the coupler a reality. Helen making up the essential skeleton of the coupler. Helen M. Amos (Harvard) developed the PCB ocean simulation and wrote the MATLAB scripts handling all of the regridding.

...

The coupler has never been tested (1) on Odyssey, (2) for the Hg or PFOS simulations, (3) for other GEOS-Chem versions, (4) for MITgcm ECCO v1. If you want to do any of these things, come talk to Colin or Helen first. 

 

Prerequisites for running the coupler

...

git clone https://github.com/thackray/coupler.git

Step 2: Initial set up and test run

After cloning a copy of the coupler, type this series of commands into the terminal to set up your coupler. You should be logged into the head node.

cd /your_directory/coupler/

ssh -Y <username>@svante2.mit.edu             (ssh to a file server, here's how on Svante)

python setup.py                                                (generates a bunch of subdirectories)

exit                                                                    (exit the file server, go back to head node)

source startup.sh                                              (grabs nodes to run coupled job)

python example.py                                            (run job)

The following message will appear in your terminal when the test run is done:

All Done! Thanks for using coupler.py

 

As of 22 September 2015, example.py will run a 1-yr coupled PCB simulation with a passing frequency of 21 days on 13 cores. Because it's on 13 cores, it's slow. The default example.py takes 7 hours on Svante. When the job is running, the coupler spits a status update to the terminal window every 10 seconds. When the job is finished, you'll see the message, "Thanks for using the coupler!"

Step 3: Modifying the coupler

Rename a copy of example.py. You don't have to do this, but I recommend it because then you have the original example.py you can refer to if your modifications are unsuccessful. 

cp example.py myrun.py 

To modify the length of your run, open myrun.py and edit "start_time" and/or "end_time". To modify the passing frequency, open myrun.py and edit "step". For example,

start_time, end_time = datetime(2000,1,1,0),datetime(2001,1,1,0)                 (run 1 yearr, from Jan 01, 2000 to Jan 01, 2001)

step = 21* 24                                                                                                    (pause models and pass information every 21 days)

 

start_time, end_time = datetime(2000,1,1,0),datetime(2000,1,5,0)                 (run 4 days, from Jan 01, 2000 to Jan 05, 2000)

step = 1* 24                                                                                                    (pause models and pass information every day)

 

Before you submit a new coupled job, remove files "DONE" and "SENT" from your run directory:

cp <your_directory>/coupler/GEOS-Chem/run/

rm DONE SENT

cp <your_directory>/coupler/MITgcm/verification/global_pcb_llc90/run/

rm DONE SENT

Return to your coupler parent directory:

cp <your_directory>/coupler/

Type the following into the command line to submit your new job:

source startup.sh                                              (grabs nodes to run coupled job)

python myrun.py                                               (run job)

The following message will appear in your terminal when the job is done:

All Done! Thanks for using coupler.py