Difference between revisions of "Acquiring and compiling MOM5"

(Imported from Wikispaces)
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Acquiring the source code=  
+
 
 +
= Acquiring the source code =
  
 
The MOM source code can either be downloaded directly from the main sourcecode repository or through local repositories at NCI.
 
The MOM source code can either be downloaded directly from the main sourcecode repository or through local repositories at NCI.
  
 
To acquire the CMS-supported version of the source code, type the following:
 
To acquire the CMS-supported version of the source code, type the following:
<syntaxhighlight lang=bash>
+
<syntaxhighlight lang="bash">
 
$ mkdir -p /short/${PROJECT}/${USER}/mom/codebase    # Or some other directory
 
$ mkdir -p /short/${PROJECT}/${USER}/mom/codebase    # Or some other directory
 
$ cd /short/${PROJECT}/${USER}/mom/codebase
 
$ cd /short/${PROJECT}/${USER}/mom/codebase
Line 10: Line 11:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
where <span style="font-family:monospace">${PROJECT}}} is your default project group and {{${USER}}} is your username. This will download the latest version of the source code into a directory named {{mom</span>.
+
where <span style="font-family:monospace">${PROJECT}}} is your default project group and {{${USER}}} is your username. This will download the latest version of the source code into a directory named {{mom</span>.  
 
+
= Types of MOM5 build =
=Types of MOM5 build=  
 
  
 
A build script (<span style="font-family: monospace;">mom/exp/MOM_compile.csh) </span>for compiling MOM is included in the github repository.
 
A build script (<span style="font-family: monospace;">mom/exp/MOM_compile.csh) </span>for compiling MOM is included in the github repository.
  
 
The build script has been pre-configured to build the coupled ocean-only (<span style="font-family: monospace;">MOM_solo</span>) version of MOM. The script can also be modified to build other versions of MOM:
 
The build script has been pre-configured to build the coupled ocean-only (<span style="font-family: monospace;">MOM_solo</span>) version of MOM. The script can also be modified to build other versions of MOM:
* <span style="font-family:monospace">MOM_solo</span>: Ocean-only MOM, without ice, land, or atmosphere
 
* <span style="font-family:monospace">MOM_SIS</span>: MOM coupled to the GFDL sea ice model (SIS)
 
* <span style="font-family:monospace">EBM</span>: Ocean / sea ice / land model coupled to an energy-balanced (radiation) atmosphere model (EBM)
 
* <span style="font-family:monospace">ICCM</span>: Ocean / sea ice / land / atmosphere
 
* <span style="font-family:monospace">CM2M</span>: CMIP-based ocean / sea ice / land / atmosphere
 
* <span style="font-family:monospace">ESM2M</span>: Coupled Earth System Model (biogeochemistry)
 
  
=Building MOM5=  
+
*<span style="font-family:monospace">MOM_solo</span>: Ocean-only MOM, without ice, land, or atmosphere
 +
*<span style="font-family:monospace">MOM_SIS</span>: MOM coupled to the GFDL sea ice model (SIS)
 +
*<span style="font-family:monospace">EBM</span>: Ocean / sea ice / land model coupled to an energy-balanced (radiation) atmosphere model (EBM)
 +
*<span style="font-family:monospace">ICCM</span>: Ocean / sea ice / land / atmosphere
 +
*<span style="font-family:monospace">CM2M</span>: CMIP-based ocean / sea ice / land / atmosphere
 +
*<span style="font-family:monospace">ESM2M</span>: Coupled Earth System Model (biogeochemistry)
 +
 
 +
= Building MOM5 =
  
 
To use the build script copy and paste the following (choosing which type of build you wish):
 
To use the build script copy and paste the following (choosing which type of build you wish):
<syntaxhighlight lang=bash>
+
<syntaxhighlight lang="bash">
 
# From the source code directory
 
# From the source code directory
 
$ cd mom/exp
 
$ cd mom/exp
 
$ ./MOM_compile.csh --platform nci --use_netcdf4 --type MOM_SIS
 
$ ./MOM_compile.csh --platform nci --use_netcdf4 --type MOM_SIS
 
</syntaxhighlight>
 
</syntaxhighlight>
Compilation should require approximately 10-20 minutes, and will place an executable in the following directory path:
+
Compilation should require approximately 10-20 minutes, and will place an executable in the following directory path: <syntaxhighlight lang="bash">
<syntaxhighlight lang=bash>
 
 
mom/exec/nci/MOM_SIS/fms_MOM_SIS.x
 
mom/exec/nci/MOM_SIS/fms_MOM_SIS.x
 
</syntaxhighlight>
 
</syntaxhighlight>
relative to <span style="font-family:monospace">/short/${PROJECT}/${USER}/mom/codebase</span> if you followed the previous instructions.
+
relative to <span style="font-family:monospace">/short/${PROJECT}/${USER}/mom/codebase</span> if you followed the previous instructions.  
 +
[[Category:MOM]]

Latest revision as of 23:42, 11 December 2019

Acquiring the source code

The MOM source code can either be downloaded directly from the main sourcecode repository or through local repositories at NCI.

To acquire the CMS-supported version of the source code, type the following:

$ mkdir -p /short/${PROJECT}/${USER}/mom/codebase     # Or some other directory
$ cd /short/${PROJECT}/${USER}/mom/codebase
$ git@github.com:mom-ocean/MOM5.git

where ${PROJECT}}} is your default project group and {{${USER}}} is your username. This will download the latest version of the source code into a directory named {{mom.

Types of MOM5 build

A build script (mom/exp/MOM_compile.csh) for compiling MOM is included in the github repository.

The build script has been pre-configured to build the coupled ocean-only (MOM_solo) version of MOM. The script can also be modified to build other versions of MOM:

  • MOM_solo: Ocean-only MOM, without ice, land, or atmosphere
  • MOM_SIS: MOM coupled to the GFDL sea ice model (SIS)
  • EBM: Ocean / sea ice / land model coupled to an energy-balanced (radiation) atmosphere model (EBM)
  • ICCM: Ocean / sea ice / land / atmosphere
  • CM2M: CMIP-based ocean / sea ice / land / atmosphere
  • ESM2M: Coupled Earth System Model (biogeochemistry)

Building MOM5

To use the build script copy and paste the following (choosing which type of build you wish):

# From the source code directory
$ cd mom/exp
$ ./MOM_compile.csh --platform nci --use_netcdf4 --type MOM_SIS

Compilation should require approximately 10-20 minutes, and will place an executable in the following directory path:

mom/exec/nci/MOM_SIS/fms_MOM_SIS.x

relative to /short/${PROJECT}/${USER}/mom/codebase if you followed the previous instructions.