<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.myroms.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robertson</id>
	<title>WikiROMS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.myroms.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Robertson"/>
	<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/Special:Contributions/Robertson"/>
	<updated>2026-04-27T11:42:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=4DVar_Tutorial_Introduction&amp;diff=6690</id>
		<title>4DVar Tutorial Introduction</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=4DVar_Tutorial_Introduction&amp;diff=6690"/>
		<updated>2025-10-17T16:26:50Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;4-Dimensional Variational (4D-Var) Data Assimilation Tutorial&amp;lt;/div&amp;gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial shows several examples of ROMS 4D-Var data assimilation algorithms in the California Current System (CCS), 1/3 degree resolution ([[Options#WC13|WC13]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:4DVar_Tut_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{4DVar Tut TOC}}&amp;lt;/div&amp;gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=setup /&amp;gt;&lt;br /&gt;
==Model Set-up==&lt;br /&gt;
The [[Options#WC13|WC13]] model domain is shown in Fig. 1 and has open boundaries along the northern, western, and southern edges of the model domain.&lt;br /&gt;
&lt;br /&gt;
[[Image:hraw_coarse_transect.png|500px|thumb|center|&amp;lt;center&amp;gt;&#039;&#039;&#039;Fig. 1:&#039;&#039;&#039; Model Bathymetry with 37&amp;amp;deg;N Transect and Target Area&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tutorial, you will perform a 4D-Var data assimilation cycle that spans the period 3-6 January, 2004. The 4D-Var control vector &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;z&#039;&#039;&#039; is comprised of increments to the initial conditions, &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;x&#039;&#039;&#039;(&#039;&#039;t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039;), surface forcing, &amp;amp;delta;&#039;&#039;&#039;f&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), and open boundary conditions, &amp;amp;delta;&#039;&#039;&#039;b&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;). The &#039;&#039;prior&#039;&#039; initial conditions, &#039;&#039;&#039;x&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039;), are taken from the sequence of 4D-Var experiments described by [[Bibliography#MooreAM_2011b|Moore &#039;&#039;et al.&#039;&#039; (2011b)]] in which data were assimilated every 7 days during the period July 2002- December 2004. The &#039;&#039;prior&#039;&#039; surface forcing, &#039;&#039;&#039;f&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), takes the form of surface wind stress, heat flux, and a freshwater flux computed using the ROMS bulk flux formulation, and using near surface air data from COAMPS ([[Bibliography#DoyleJD_2009|Doyle &#039;&#039;et al.&#039;&#039;, 2009]]). Clamped open boundary conditions are imposed on (&#039;&#039;u&#039;&#039;,&#039;&#039;v&#039;&#039;) and tracers, and the &#039;&#039;prior&#039;&#039; boundary conditions, &#039;&#039;&#039;b&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), are taken from the global ECCO product ([[Bibliography#WunschC_2007|Wunsch and Heimbach, 2007]]). The free-surface height and vertically integrated velocity components are subject to the usual Chapman and Flather radiation conditions at the open boundaries. The &#039;&#039;prior&#039;&#039; surface forcing and open boundary conditions are provided daily and linearly interpolated in time. Similarly, the increments &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;f&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;) and &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;b&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;) are also computed daily and linearly interpolated in time.&lt;br /&gt;
&lt;br /&gt;
The observations assimilated into the model are satellite SST, satellite SSH in the form of a gridded product from Aviso, and hydrographic observations of temperature and salinity collected from Argo floats and during the GLOBEC/LTOP and CalCOFI cruises off the coast of Oregon and southern California, respectively. The observation locations are illustrated in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
{|align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+style=&amp;quot;caption-side:bottom;&amp;quot;|&#039;&#039;&#039;Figure 2:&#039;&#039;&#039; WC13 Observations&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:aviso_ssh_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;a)&#039;&#039;&#039; Aviso SSH&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|[[Image:blended_sst_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;b)&#039;&#039;&#039; Blended SST&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:in_situ_T_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;c)&#039;&#039;&#039; In Situ Temperature&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|[[Image:in_situ_S_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;d)&#039;&#039;&#039; In Situ Salinity&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
|}&amp;lt;section end=setup /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Download Lectures and Exercises==&lt;br /&gt;
&lt;br /&gt;
The workshop Agenda can be found [https://www.myroms.org/Workshops/4DVAR2019/Agenda.pdf here]. Links to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop] lectures are provided below. These lectures are meant to supplement this 4D-Var tutorial.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Lecture 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_1_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;4D-Var: Some Basics&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_2_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The Mechanics of 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_3_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Dual 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 4:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_4_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observing System Simulation Experiments (OSSEs)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 5:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_5_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observation Impact &amp;amp;amp; Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 6:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_6_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The MARACOOS analysis-forecast system&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 7:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_7_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Array Modes&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 8:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_8_2019.pdf PDF]PDF--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The West Coast Ocean Forecasting System (WCOFS)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 9:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_9_2019.pdf PDF]PDF--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The CeNCOOS and PacIOOS analysis-forecast systems&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the tutorials pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 01:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_01_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Explanation of cpp options, ocean.in, s4dvar.in (I4DVAR)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 02:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_02_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Multiple outer loops&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 03:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_03_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercises 1 and 2&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 04:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_04_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Calculation of prior error standard deviations&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 05:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_05_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Explanation of cpp options, ocean.in, s4dvar.in (RBL4D-Var)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 06:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_06_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Semi-variograms&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 07:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_07_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;ERDDAP data server and management tools&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 08:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_08_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercises 3 &amp;amp; 4&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 09:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_09_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Computing normalization coefficients for covariance models&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 10:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_10_2019.pdf PDF_Arango] | [https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_10a_2019.pdf PDF_Wilkin]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building your observation files&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 11:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_11_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observation Impact &amp;amp; Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 12:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_12_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercise 5&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 13:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_13_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Using ERDDAP to view observation impact information&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 14:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_14_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercise 6 &amp;amp; 7&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 15:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_15_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Putting it all together&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the exercises pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Exercise 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_1_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Incremental, Strong Constraint 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_2_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;I4D-Var with Multiple Outer-loops&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_3_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Dual Formulation 4D-Var - RBL4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 4:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_4_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Weak Constraint Dual Formulation 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 5:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_5_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Analysis Cycle Observation Impacts&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 6:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_6_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Analysis Cycle Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 7:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_7_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Reduced-Rank Array Modes&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 8:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_8_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Forecast Cycle Observation Impacts&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 9:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_9_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Forecast Cycle Observation Sensitivities&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the homeworks pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Homework 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building the standard deviation file for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Homework 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building the file of normalization coefficients for the prior error covariance matrix for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Homework 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Build observation file for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Download Tutorial Files==&lt;br /&gt;
All data files and scripts necessary to run the 4D-Var tests discussed in this tutorial are available from the ROMS [https://github.com/myroms GitHub] repository. To download, execute the following command:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt; git clone https://github.com/myroms/roms_test.git&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorial Directory Structure==&lt;br /&gt;
When the checkout is complete, you will have the following directory structure under your &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;my_test&amp;lt;/span&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;/WC13                                 Main California Current System 4D-Var applications&lt;br /&gt;
       /ARRAY_MODES                     Stabilized representer matrix array modes and clipping&lt;br /&gt;
       /Data                            Input data directory&lt;br /&gt;
       /Functionals                     Analytical expressions header files&lt;br /&gt;
       /I4DVAR                          Primal form of incremental, strong constraint 4D-Var, I4D-Var&lt;br /&gt;
       /Normalization                   4D-Var error covariance normalization coefficients&lt;br /&gt;
       /plotting                        4D-Var plotting scripts (Matlab and ROMS plotting package)&lt;br /&gt;
       /RBL4DVAR                        Dual form of 4D-Var, Restricted B-preconditioned Lanczos Analysis System, RBL4D-Var&lt;br /&gt;
       /RBL4DVAR_analysis_impact        RBL4D-Var analysis observation impact&lt;br /&gt;
       /RBL4DVAR_analysis_sensitivity   RBL4D-Var analysis observation sensitivity (adjoint of RBL4D-Var)&lt;br /&gt;
       /RBL4DVAR_forecast_impact        RBL4D-Var forecast observation impact&lt;br /&gt;
       /RBL4DVAR_forecast_sensitivity   RBL4D-Var forecast observation sensitivity (adjoint of RBL4D-Var)&lt;br /&gt;
  &amp;lt;/span&amp;gt;&lt;br /&gt;
Mostly all the directories have a &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Readme&amp;lt;/span&amp;gt; file with detailed instructions for configuring, compiling, running, and plotting the results.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
The technical description of the algorithms and application used in this tutorial are described in Moore &#039;&#039;et al.&#039;&#039; ([[Bibliography#MooreAM_2011a|2011a]], [[Bibliography#MooreAM_2011b|b]], [[Bibliography#MooreAM_2011c|c]]).&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=4DVar_Tutorial_Introduction&amp;diff=6689</id>
		<title>4DVar Tutorial Introduction</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=4DVar_Tutorial_Introduction&amp;diff=6689"/>
		<updated>2025-10-17T16:19:46Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;4-Dimensional Variational (4D-Var) Data Assimilation Tutorial&amp;lt;/div&amp;gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial shows several examples of ROMS 4D-Var data assimilation algorithms in the California Current System (CCS), 1/3 degree resolution ([[Options#WC13|WC13]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:4DVar_Tut_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{4DVar Tut TOC}}&amp;lt;/div&amp;gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=setup /&amp;gt;&lt;br /&gt;
==Model Set-up==&lt;br /&gt;
The [[Options#WC13|WC13]] model domain is shown in Fig. 1 and has open boundaries along the northern, western, and southern edges of the model domain.&lt;br /&gt;
&lt;br /&gt;
[[Image:hraw_coarse_transect.png|500px|thumb|center|&amp;lt;center&amp;gt;&#039;&#039;&#039;Fig. 1:&#039;&#039;&#039; Model Bathymetry with 37&amp;amp;deg;N Transect and Target Area&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tutorial, you will perform a 4D-Var data assimilation cycle that spans the period 3-6 January, 2004. The 4D-Var control vector &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;z&#039;&#039;&#039; is comprised of increments to the initial conditions, &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;x&#039;&#039;&#039;(&#039;&#039;t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039;), surface forcing, &amp;amp;delta;&#039;&#039;&#039;f&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), and open boundary conditions, &amp;amp;delta;&#039;&#039;&#039;b&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;). The &#039;&#039;prior&#039;&#039; initial conditions, &#039;&#039;&#039;x&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&#039;&#039;), are taken from the sequence of 4D-Var experiments described by [[Bibliography#MooreAM_2011b|Moore &#039;&#039;et al.&#039;&#039; (2011b)]] in which data were assimilated every 7 days during the period July 2002- December 2004. The &#039;&#039;prior&#039;&#039; surface forcing, &#039;&#039;&#039;f&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), takes the form of surface wind stress, heat flux, and a freshwater flux computed using the ROMS bulk flux formulation, and using near surface air data from COAMPS ([[Bibliography#DoyleJD_2009|Doyle &#039;&#039;et al.&#039;&#039;, 2009]]). Clamped open boundary conditions are imposed on (&#039;&#039;u&#039;&#039;,&#039;&#039;v&#039;&#039;) and tracers, and the &#039;&#039;prior&#039;&#039; boundary conditions, &#039;&#039;&#039;b&amp;lt;sub&amp;gt;b&amp;lt;/sub&amp;gt;&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;), are taken from the global ECCO product ([[Bibliography#WunschC_2007|Wunsch and Heimbach, 2007]]). The free-surface height and vertically integrated velocity components are subject to the usual Chapman and Flather radiation conditions at the open boundaries. The &#039;&#039;prior&#039;&#039; surface forcing and open boundary conditions are provided daily and linearly interpolated in time. Similarly, the increments &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;f&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;) and &#039;&#039;&amp;amp;delta;&#039;&#039;&#039;&#039;&#039;b&#039;&#039;&#039;(&#039;&#039;t&#039;&#039;) are also computed daily and linearly interpolated in time.&lt;br /&gt;
&lt;br /&gt;
The observations assimilated into the model are satellite SST, satellite SSH in the form of a gridded product from Aviso, and hydrographic observations of temperature and salinity collected from Argo floats and during the GLOBEC/LTOP and CalCOFI cruises off the coast of Oregon and southern California, respectively. The observation locations are illustrated in Fig. 2.&lt;br /&gt;
&lt;br /&gt;
{|align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+style=&amp;quot;caption-side:bottom;&amp;quot;|&#039;&#039;&#039;Figure 2:&#039;&#039;&#039; WC13 Observations&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:aviso_ssh_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;a)&#039;&#039;&#039; Aviso SSH&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|[[Image:blended_sst_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;b)&#039;&#039;&#039; Blended SST&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:in_situ_T_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;c)&#039;&#039;&#039; In Situ Temperature&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|[[Image:in_situ_S_2019.png|thumb|400px|&amp;lt;center&amp;gt;&#039;&#039;&#039;d)&#039;&#039;&#039; In Situ Salinity&amp;lt;/center&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
|}&amp;lt;section end=setup /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Download Lectures and Exercises==&lt;br /&gt;
&lt;br /&gt;
The workshop Agenda can be found [https://www.myroms.org/Workshops/4DVAR2019/Agenda.pdf here]. Links to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop] lectures are provided below. These lectures are meant to supplement this 4D-Var tutorial.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Lecture 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_1_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;4D-Var: Some Basics&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_2_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The Mechanics of 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_3_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Dual 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 4:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_4_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observing System Simulation Experiments (OSSEs)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 5:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_5_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observation Impact &amp;amp;amp; Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 6:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_6_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The MARACOOS analysis-forecast system&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 7:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_7_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Array Modes&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 8:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_8_2019.pdf PDF]--&amp;gt;PDF&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The West Coast Ocean Forecasting System (WCOFS)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Lecture 9:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Lectures/Lecture_9_2019.pdf PDF]--&amp;gt;PDF&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;The CeNCOOS and PacIOOS analysis-forecast systems&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the tutorials pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 01:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_01_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Explanation of cpp options, ocean.in, s4dvar.in (I4DVAR)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 02:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_02_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Multiple outer loops&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 03:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_03_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercises 1 and 2&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 04:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_04_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Calculation of prior error standard deviations&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 05:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_05_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Explanation of cpp options, ocean.in, s4dvar.in (RBL4D-Var)&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 06:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_06_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Semi-variograms&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 07:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_07_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;ERDDAP data server and management tools&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 08:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_08_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercises 3 &amp;amp; 4&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 09:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_09_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Computing normalization coefficients for covariance models&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 10:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_10_2019.pdf PDF_Arango] | [https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_10a_2019.pdf PDF_Wilkin]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building your observation files&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 11:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_11_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Observation Impact &amp;amp; Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 12:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_12_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercise 5&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 13:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_13_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Using ERDDAP to view observation impact information&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 14:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_14_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Discussion of exercise 6 &amp;amp; 7&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Tutorial 15:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;&amp;lt;!--[https://www.myroms.org/Workshops/4DVAR2019/Tutorials/Tutorial_15_2019.pdf PDF]--&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Putting it all together&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the exercises pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Exercise 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_1_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Incremental, Strong Constraint 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_2_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;I4D-Var with Multiple Outer-loops&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_3_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Dual Formulation 4D-Var - RBL4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 4:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_4_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Weak Constraint Dual Formulation 4D-Var&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 5:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_5_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Analysis Cycle Observation Impacts&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 6:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_6_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Analysis Cycle Observation Sensitivity&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 7:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_7_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Reduced-Rank Array Modes&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 8:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_8_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Forecast Cycle Observation Impacts&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Exercise 9:&#039;&#039;&#039; &amp;amp;nbsp; &amp;lt;span style=&amp;quot;font-size: 75%&amp;quot;&amp;gt;[https://www.myroms.org/Workshops/4DVAR2019/Exercises/EXERCISE_9_2019.pdf PDF]&amp;lt;/span&amp;gt; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Forecast Cycle Observation Sensitivities&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are the homeworks pertinent to the [https://www.myroms.org/index.php?page=4DVAR_2019_info 2019 ROMS 4D-Var workshop]:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;Homework 1:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building the standard deviation file for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Homework 2:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Building the file of normalization coefficients for the prior error covariance matrix for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Homework 3:&#039;&#039;&#039; &amp;amp;nbsp; &amp;amp;nbsp; &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Build observation file for user model configuration&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Download Tutorial Files==&lt;br /&gt;
All data files and scripts necessary to run the 4D-Var tests discussed in this tutorial are available from the ROMS [https://github.com/myroms GitHub] repository. To download, execute the following command:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt; git clone https://github.com/myroms/roms_test.git&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tutorial Directory Structure==&lt;br /&gt;
When the checkout is complete, you will have the following directory structure under your &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;my_test&amp;lt;/span&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;/WC13                                 Main California Current System 4D-Var applications&lt;br /&gt;
       /ARRAY_MODES                     Stabilized representer matrix array modes and clipping&lt;br /&gt;
       /Data                            Input data directory&lt;br /&gt;
       /Functionals                     Analytical expressions header files&lt;br /&gt;
       /I4DVAR                          Primal form of incremental, strong constraint 4D-Var, I4D-Var&lt;br /&gt;
       /Normalization                   4D-Var error covariance normalization coefficients&lt;br /&gt;
       /plotting                        4D-Var plotting scripts (Matlab and ROMS plotting package)&lt;br /&gt;
       /RBL4DVAR                        Dual form of 4D-Var, Restricted B-preconditioned Lanczos Analysis System, RBL4D-Var&lt;br /&gt;
       /RBL4DVAR_analysis_impact        RBL4D-Var analysis observation impact&lt;br /&gt;
       /RBL4DVAR_analysis_sensitivity   RBL4D-Var analysis observation sensitivity (adjoint of RBL4D-Var)&lt;br /&gt;
       /RBL4DVAR_forecast_impact        RBL4D-Var forecast observation impact&lt;br /&gt;
       /RBL4DVAR_forecast_sensitivity   RBL4D-Var forecast observation sensitivity (adjoint of RBL4D-Var)&lt;br /&gt;
  &amp;lt;/span&amp;gt;&lt;br /&gt;
Mostly all the directories have a &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Readme&amp;lt;/span&amp;gt; file with detailed instructions for configuring, compiling, running, and plotting the results.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
The technical description of the algorithms and application used in this tutorial are described in Moore &#039;&#039;et al.&#039;&#039; ([[Bibliography#MooreAM_2011a|2011a]], [[Bibliography#MooreAM_2011b|b]], [[Bibliography#MooreAM_2011c|c]]).&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6684</id>
		<title>External Libraries</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6684"/>
		<updated>2025-06-18T18:42:51Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;External Libraries&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the ROMS configuration, several third-party libraries are required for linking and compiling an application.&lt;br /&gt;
&lt;br /&gt;
==ARPACK (ARnoldi PACKage)==&lt;br /&gt;
Serial and parallel legacy libraries applied to solve large eigenvalue problems using either the Implicitly Restarted Arnoldi Method (&#039;&#039;&#039;IRAM&#039;&#039;&#039;) for sparse matrices or the Lanczos algorithm for symmetric matrices.  It includes a subset of the &#039;&#039;&#039;BLAS&#039;&#039;&#039; and &#039;&#039;&#039;LAPACK&#039;&#039;&#039; libraries. Some of its functions are used in 4D-Var and the adjoint-based stability analysis propagators.&lt;br /&gt;
&lt;br /&gt;
To obtain &#039;&#039;&#039;ARPACK&#039;&#039;&#039;, execute the following:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/myroms/roms_libs.git&amp;lt;br /&amp;gt;&amp;gt; cd roms_libs/ARPACK&amp;lt;/div&amp;gt;&lt;br /&gt;
To compile, customize &#039;&#039;&#039;ARmake.inc&#039;&#039;&#039; for the desired compiler and its flags for the serial (&#039;&#039;&#039;FC&#039;&#039;&#039; and &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;) and parallel (&#039;&#039;&#039;PFC&#039;&#039;&#039; and &#039;&#039;&#039;PFFLAGS&#039;&#039;&#039;) versions of the library. Once configured type:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make lib plib&amp;lt;/div&amp;gt; to build &#039;&#039;&#039;libarpack.a&#039;&#039;&#039; and &#039;&#039;&#039;libparpack.a&#039;&#039;&#039;. Once the libraries are built you can move them anywhere you like to make it easier to tell ROMS where to find them through environmental variables or with the &#039;&#039;&#039;[[my_build_paths]]&#039;&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; Prior to SVN revision 1080 (July 23, 2021), &#039;&#039;&#039;ARPACK&#039;&#039;&#039; was distributed in the ROMS &#039;&#039;&#039;Lib/ARPACK&#039;&#039;&#039; subdirectory. For more information about why this was changed see TRAC ticket [https://www.myroms.org/projects/src/ticket/891 #891]&lt;br /&gt;
&lt;br /&gt;
==MCT (Model Coupling Toolkit)==&lt;br /&gt;
&lt;br /&gt;
Open-source library distributed as a set of Fortran-90 modules for constructing a coupled model system from Earth System Model (ESM) components ([http://www-unix.mcs.anl.gov/mct Larson et al., 2004]). Each component model has its own grid and runs on its own set of processors. The MCT library provides protocols for decomposition and allocation of model grids among different processors, efficient transfer of data fields between the different models, and interpolation algorithms for the data fields that are transferred.&lt;br /&gt;
&lt;br /&gt;
The MCT library is used to couple ROMS atmosphere models (like WRF) and wave models (like SWAN and WW3). For example, SWAN sends to ROMS arrays of wave height, wavelength, average wave periods at the surface and near the bottom, wave propagation direction, near-bottom orbital velocity, and wave-energy dissipation rate. ROMS provides SWAN arrays of water depth, sea-surface elevation, and current velocity. Data exchange between SWAN and ROMS occurs at user-defined synchronization intervals. The frequency of data exchange depends on the application. If the exchanged fields fluctuate rapidly, more frequent synchronization is required. However, data exchange increases run time, so experience is required to determine the optimum synchronization interval for each application.&lt;br /&gt;
&lt;br /&gt;
MCT is available via github:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/MCSclimate/MCT&amp;lt;br /&amp;gt;&amp;gt; cd MCT&amp;lt;br /&amp;gt;&amp;gt; ./configure&amp;lt;br /&amp;gt;&amp;gt; make&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NetCDF (Network Common Data Form)==&lt;br /&gt;
&lt;br /&gt;
Open-source, machine-independent libraries for storing self-describing scientific data into portable, scalable, appendable, and sharable computer files. It provides &#039;&#039;&#039;API&#039;&#039;&#039; in several computer languages to create files, to write data into a file, to read data from the file, and access information about the dataset dimensions, variables, and attributes.  &lt;br /&gt;
&lt;br /&gt;
ROMS uses &#039;&#039;&#039;NetCDF&#039;&#039;&#039; for all its input and output data management. Its &#039;&#039;&#039;NetCDF3&#039;&#039;&#039; or &#039;&#039;&#039;NetCDF4&#039;&#039;&#039; type files can be processed using the standard library developed and distributed [http://doi.org/10.5065/D6H70CW6 UCAR/Unidata], the Parallel-IO (&#039;&#039;&#039;PIO&#039;&#039;&#039;) developed at ANL/NCAR ([https://doi.org/10.1177/1094342011428143 Dennis &#039;&#039;et al&#039;&#039;., 2012]; [https://www.researchgate.net/publication/348169990_THE_PARALLELIO_PIO_CFORTRAN_LIBRARIES_FOR_SCALABLE_HPC_PERFORMANCE Hartnett and Edwards, 2021]). We have migrated to the Fortran-90 &#039;&#039;&#039;API&#039;&#039;&#039; interface,  which consists of a library and one or two module files. See the [[makefile]] and [[build_roms| build script]] for how to tell ROMS where these are located. You will have to use a copy of the library and module files that were compiled using the same compiler you are using to compile ROMS - this is especially true for the module files.&lt;br /&gt;
&lt;br /&gt;
===Building NetCDF-4/HDF5===&lt;br /&gt;
NetCDF-4 uses HDF5 for it&#039;s underlying data format so you first need to build HDF5. We recommend 1.10.6 because 1.10.7 causes errors in the NetCDF-C test suite. Here we will describe how to build parallel versions for use on an HPC cluster. We will note what changes are necessary if you are building for a system that doesn&#039;t have parallel I/O.&lt;br /&gt;
&lt;br /&gt;
====Building HDF5====&lt;br /&gt;
* First, download &#039;&#039;&#039;HDF5&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://support.hdfgroup.org/releases/hdf5/v1_14/v1_14_3/downloads/hdf5-1.14.3.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/HDFGroup/hdf5&amp;lt;br /&amp;gt;&amp;gt; cd hdf5&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/hdf5-1_14_3&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort \&amp;lt;br /&amp;gt;      RUNPARALLEL=&amp;quot;srun --nodes=1 --ntasks=6 --cpus-per-task=1 --time=00:13:00 --export=ALL &amp;quot; \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/hdf5/1.14.3 --enable-static-exec --enable-shared=no \&amp;lt;br /&amp;gt;      --enable-parallel --disable-silent-rules --enable-fortran&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;RUNPARALLEL&#039;&#039; is only needed if your system uses a scheduler to run MPI jobs. The example here is for a SLURM system but you will need to adjust this for your cluster.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;RUNPARALLEL=...&#039;&#039; and &#039;&#039;--enable-parallel&#039;&#039; and change the CC, CXX, and FC to the corresponding serial compilers (e.g. gcc, g++, and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like &#039;&#039;&#039;shared libraries&#039;&#039;&#039; to be built, also remove &#039;&#039;--enable-shared=no&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-C====&lt;br /&gt;
The C and Fortran APIs for NetCDF are in separate packages and the C version must be built first.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://downloads.unidata.ucar.edu/netcdf-c/4.9.2/netcdf-c-4.9.2.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/Unidata/netcdf-c&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-c&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.9.2&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.14.3/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.14.3/lib&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf-c/4.9.2 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-Fortran====&lt;br /&gt;
Now we can build the Fortran API.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget http://downloads.unidata.ucar.edu/netcdf-fortran/4.6.1/netcdf-fortran-4.6.1.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/Unidata/netcdf-fortran&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-fortan&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.6.1&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 FFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.14.3/include -I/path/to/parallel/netcdf-c/4.9.2/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.14.3/lib -L/path/to/parallel/netcdf-c/4.9.2/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submission/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf-fortran/4.6.1 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; should point to the submision script you created while building &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; and is only needed for running test on clusters that use scheduling systems like SLURM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile serial remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you are running on clusters that use scheduling systems like SLURM, you will need to edit 4 testing scripts replacing all occurrences of &#039;&#039;&#039;mpiexec&#039;&#039;&#039; with the full path to the submission script you created for &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; vi examples/F90/run_f90_par_examples.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf03_test4/run_f90_par_test.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test_03.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test.sh&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-fortran&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PIO (Parallel I/O)==&lt;br /&gt;
&lt;br /&gt;
Open-source parallel library for reading and writing distributed arrays to several scientific data formats like &#039;&#039;&#039;pNetCDF&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF3&#039;&#039;&#039;, and &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039;. &#039;&#039;&#039;PIO&#039;&#039;&#039; provides the flexibility to regulate the number of I/O tasks through data rearrangement between computational and  I/O processes to improve performance and memory usage. It allows both &#039;&#039;&#039;synchronous&#039;&#039;&#039; and &#039;&#039;&#039;asynchronous&#039;&#039;&#039; I/O. In &#039;&#039;&#039;synchronous mode&#039;&#039;&#039;, a subset of processes performs both I/O and computations (MPI intra-communications). Alternatively, in &#039;&#039;&#039;asynchronous mode&#039;&#039;&#039;, the I/O is carried out by a set of disjointed and dedicated processes (MPI inter-communications).  &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library is intended for ROMS Message Passing Interface (MPI) applications running on a large number of processes in an HPC computer with a &#039;&#039;&#039;Parallel File System&#039;&#039;&#039; (Lustre, GPFS, and so on). It uses the &#039;&#039;&#039;MPI-IO&#039;&#039;&#039; interface to facilitate the partitioning of data across computational or dedicated I/O processes. [https://github.com/NCAR/ParallelIO PIO] will work with ROMS [https://www.myroms.org/projects/src/ticket/884 svn revision 1064] (May 10, 2021) or newer. We recommend you read the manuals for all the build options, but below we show example build processes for &#039;&#039;&#039;PIO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; can use NetCDF (version 4.6.1+) and/or PnetCDF (version 1.9.0+) for I/O. NetCDF may be built with or without netCDF-4 features. NetCDF is required for &#039;&#039;&#039;PIO&#039;&#039;&#039;, PnetCDF is optional. {{note}}However, the ROMS build system assumes that &#039;&#039;&#039;PIO&#039;&#039;&#039; is built with PnetCDF support and will need customization if &#039;&#039;&#039;PIO&#039;&#039;&#039; is built without it.&lt;br /&gt;
&lt;br /&gt;
The NetCDF C library must be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; recently introduced a NetCDF integration option that allows standard NetCDF library calls to be implemented with the &#039;&#039;&#039;PIO&#039;&#039;&#039; library but ROMS Parallel I/O is not currently implemented this way. In order to build &#039;&#039;&#039;PIO&#039;&#039;&#039; with NetCDF integration, you will need NetCDF version 4.7.4 or higher. However, the Fortran API integration has not been implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library can be built with the classic Autotools or Cmake. Both are shown below.&lt;br /&gt;
&lt;br /&gt;
===Building PIO With Autotools===&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/archive/refs/tags/pio2_6_2.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_6_2&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you downloaded the gzipped tarball, you should run &#039;&#039;make clean&#039;&#039; because some Fortran .mod files may be included and need to be removed:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make clean&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort CFLAGS=-O3 FFLAGS=-O3 FCFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/netcdf-c/include -I/path/to/hdf5/include -I/path/to/pnetcdf/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/netcdf-c/lib -L/path/to/hdf5/lib -L/path/to/pnetcdf/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lhdf5_hl -lhdf5 -lm -lcurl -lz -lbz2 -lzstd -lxml2&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/cluster/submission/script \&amp;lt;br /&amp;gt;      --prefix=/pio/install/path --enable-fortran --disable-timing \&amp;lt;br /&amp;gt;      --disable-silent-rules --disable-shared --enable-netcdf-integration&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;{{warning}} &#039;&#039;&#039;Warning:&#039;&#039;&#039; If you are using the Intel compilers, you will probably need to remove &amp;quot;&#039;&#039;&#039;test_darray_async_many&#039;&#039;&#039;&amp;quot; from line 50 of &#039;&#039;&#039;test/cunit/run_tests.sh&#039;&#039;&#039; for &#039;&#039;make check&#039;&#039; to complete without errors. Details [https://github.com/NCAR/ParallelIO/issues/1867 here].&lt;br /&gt;
&lt;br /&gt;
===Building PIO With Cmake===&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/releases/download/pio2_5_4/pio-2.5.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_5_4&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; cd ..&amp;lt;br /&amp;gt;&amp;gt; mkdir build_pio&amp;lt;br /&amp;gt;&amp;gt; cd build_pio&amp;lt;br /&amp;gt;&amp;gt; CC=mpicc CXX=mpicxx FC=mpifort cmake \&amp;lt;br /&amp;gt;    -DNetCDF_PATH=/path/to/netcdf \&amp;lt;br /&amp;gt;    -DPnetCDF_PATH=/path/to/pnetcdf \&amp;lt;br /&amp;gt;    -DMPIEXEC=/path/submission/scipt \&amp;lt;br /&amp;gt;    -DMPIEXEC_MAX_NUMPROCS=8 -DMPIEXEC_NUMPROC_FLAG=-n \&amp;lt;br /&amp;gt;    -DPIO_FILESYSTEM_HINTS=gpfs -DPIO_ENABLE_TIMING=OFF -DPIO_ENABLE_TESTS=ON \&amp;lt;br /&amp;gt;    -DCMAKE_INSTALL_PREFIX=/pio/install/path ../ParallelIO&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;-DMPIEXEC&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Compile, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 6&amp;lt;br /&amp;gt;&amp;gt; make -j 6 tests&amp;lt;br /&amp;gt;&amp;gt; ctests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==ESMF (Earth System Modeling Framework)==&lt;br /&gt;
High-performance, open-source library for grid interpolation, remapping, and data exchange between coupled Earth System Model (&#039;&#039;&#039;ESM&#039;&#039;&#039;) components.  It includes the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; (National Unified Operation Prediction Capability) layer that provides templates and protocols for sequential and concurrent coupling between ESM components.  The &#039;&#039;&#039;NUOPC&#039;&#039;&#039; &#039;&#039;cap&#039;&#039; file is a Fortran module layer that sits on top of each &#039;&#039;&#039;ESM&#039;&#039;&#039; component that provides the protocols and methods to interact and share data in a coupled system.&lt;br /&gt;
&lt;br /&gt;
ROMS supports version 8.0 or higher since the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; layer includes the native CoupleSets for &#039;&#039;&#039;ESM&#039;&#039;&#039; applications with nested grids. Various types of connections are possible, like &#039;&#039;&#039;nest-to-nest&#039;&#039;&#039;, &#039;&#039;&#039;fine-to-coarse&#039;&#039;&#039;, or &#039;&#039;&#039;coarse-to-fine&#039;&#039;&#039;.  The user decides which nested grids to connect.&lt;br /&gt;
&lt;br /&gt;
*Download from github:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/esmf-org/esmf.git esmf&amp;lt;br /&amp;gt;&amp;gt; cd esmf&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/ESMF_8_6_0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure with environment variables:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; export ESMF_DIR=/path/to/esmf/source&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMM=openmpi&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMPILER=intel&amp;lt;br /&amp;gt;&amp;gt; export ESMF_BOPT=O&amp;lt;br /&amp;gt;&amp;gt; export ESMF_OPTLEVEL=3&amp;lt;br /&amp;gt;&amp;gt; export ESMF_ABI=64&amp;lt;br /&amp;gt;&amp;gt; export ESMF_INSTALL_PREFIX=/ESMF/install/dir&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF=&amp;quot;/path/to/netcdf/bin/nc-config&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_PNETCDF=&amp;quot;/path/to/pnetcdf/bin/pnetcdf-config&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_PIO=&amp;quot;external&amp;quot;&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_PIO_LIBPATH=&amp;quot;/path/to/pio/lib&amp;quot;&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_PIO_INCLUDE=&amp;quot;/path/to/pio/include&amp;quot; &amp;lt;br /&amp;gt;&amp;gt; export ESMF_MPIRUN=/path/to/cluster/submission/script&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;ESMF_MPIRUN&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-np&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -np N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-np&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -np # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 10&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=build_roms&amp;diff=6683</id>
		<title>build roms</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=build_roms&amp;diff=6683"/>
		<updated>2025-05-05T18:37:42Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;GNU Make Build Script - &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.csh, build_roms.sh&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in [[makefile]], you need to provide settings for some user-defined choices before you can compile ROMS. If you have more than one application (or more than one compiler), you may get tired of editing the [[makefile]]. One option is to have a makefile for each configuration. The recommended solution, however, is to use the ROMS build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; in SVN revision 1030 (April 30, 2020) the ROMS build scripts (and other shell scripts) were renamed to follow accepted naming conventions; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;*.sh&amp;lt;/span&amp;gt; scripts were changed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;*.csh&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;*.bash&amp;lt;/span&amp;gt; where changed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;*.sh&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
There are two of these build scripts in the &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; directory: &#039;&#039;&#039;build_roms.csh&#039;&#039;&#039; and &#039;&#039;&#039;build_roms.sh&#039;&#039;&#039;.  The build scripts use environment variables to provide values for the user-defined [[make]] variables, overwriting those found in the ROMS &#039;&#039;&#039;makefile&#039;&#039;&#039;. Just as in the multiple &#039;&#039;&#039;makefile&#039;&#039;&#039; option, you will need as many copies of the build script as you have applications. However, the scope of these variables is local to the build script, allowing you to compile different applications at the same time from the same sources as long as each &#039;&#039;&#039;$([[#SCRATCH_DIR|SCRATCH_DIR]])&#039;&#039;&#039; is unique.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&#039;&#039;&#039;Usage:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt; ./build_roms.csh [options]&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Options:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;   -j [N]&amp;lt;/span&amp;gt;     Compile in parallel using &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;N&amp;lt;/span&amp;gt; CPUs&amp;lt;br /&amp;gt;                omit argument for all available CPUs.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;   -p macro&amp;lt;/span&amp;gt;   Prints any [[makefile]] variable value. For example,&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;                  build_roms.sh -p FFLAGS&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;   -noclean&amp;lt;/span&amp;gt;   Do not clean already compiled objects.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;Example:&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;green&amp;quot;&amp;gt;   ./build_roms.sh -j 2&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==User Definable Configuation Options==&lt;br /&gt;
ROMS has a growing list of choices the user must make about the compilation before starting the compile process. These user-defined variables can be set in the build script. Since we use &#039;&#039;&#039;gnu make&#039;&#039;&#039;, it is possible to set the value of these variables in the Unix environment, rather than inside the &#039;&#039;&#039;Makefile&#039;&#039;&#039; (see [[gmake]]). This page describes the user-definable variables understood by the ROMS &#039;&#039;&#039;makefile&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Application and File Locations===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=ROMS_APPLICATION /&amp;gt;;&amp;lt;span id=&amp;quot;ROMS_APPLICATION&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[ROMS_APPLICATION]]&lt;br /&gt;
:CPP option defining a particular application (for example, [[UPWELLING]]). The makefile will include its associated header file which is located in either the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory or the path specified in the [[#MY_HEADER_DIR|MY_HEADER_DIR]] definition. The header file name is the lowercase value of [[ROMS_APPLICATION]] with the &#039;&#039;&#039;.h&#039;&#039;&#039; extension (for example, [[upwelling.h]]). Recall the CPP option defining an application must be unique.&amp;lt;section end=ROMS_APPLICATION /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_ROOT_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_ROOT_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_ROOT_DIR]]&lt;br /&gt;
: This path is internal to the build script and has no equivalent in the [[makefile]]. It can be used to set the base path to your ROMS source code and/or your application input and output files. This variable is not strictly necessary but can make setting the necessary paths easier.&amp;lt;section end=MY_ROOT_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_PROJECT_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_PROJECT_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_PROJECT_DIR]]&lt;br /&gt;
: This path is internal to the build script and has no equivalent in the [[makefile]]. [[MY_PROJECT_DIR]] is most often used to set the paths: [[#MY_HEADER_DIR|MY_HEADER_DIR]], [[#MY_ANALYTICAL_DIR|MY_ANALYTICAL_DIR]], and [[#BINDIR|BINDIR]] and to set the base path to [[#SCRATCH_DIR|SCRATCH_DIR]]. This can be seen near the bottom of the build script.&amp;lt;section end=MY_PROJECT_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_ROMS_SRC /&amp;gt;;&amp;lt;span id=&amp;quot;MY_ROMS_SRC&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_ROMS_SRC]]&lt;br /&gt;
: This path is internal to the build script and has no equivalent in the [[makefile]]. It is the location of your ROMS source code and is necessary for the build script to work properly.&amp;lt;section end=MY_ROMS_SRC /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=COMPILERS /&amp;gt;;&amp;lt;span id=&amp;quot;COMPILERS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[COMPILERS]]&lt;br /&gt;
: Directory where [[make]] can find your system/compiler specific mk include files as described in [[#FORT|FORT]]. In some situations you will need to edit the appropriate mk file in the Compilers directory (i.e. &#039;&#039;&#039;Compilers/Linux-gfortran.mk&#039;&#039;&#039;). Rather than editing the mk files released with ROMS and possibly creating conflicts during updates, we suggest that you copy the appropriate system specific mk file and the &#039;&#039;&#039;Compilers/make_macros.mk&#039;&#039;&#039; to another folder and set [[COMPILERS]] to that folder.&amp;lt;section end=COMPILERS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Dynamic CPP Option Tuning===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_CPP_FLAGS /&amp;gt;;&amp;lt;span id=&amp;quot;MY_CPP_FLAGS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_CPP_FLAGS]]&lt;br /&gt;
: Additional CPP options to activate.  Sometimes it is desirable to activate one or more CPP options to run different variants of the same application without modifying its header file. If this is the case, specify such options here using the &#039;&#039;&#039;-D&#039;&#039;&#039; syntax. Notice that you need to use your shell&#039;s quoting syntax to enclose the definitions. For example:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;setenv [[MY_CPP_FLAGS]] &amp;quot;-D[[Options#AVERAGES|AVERAGES]]&amp;quot;&amp;lt;br /&amp;gt;setenv [[MY_CPP_FLAGS]] &amp;quot;${[[MY_CPP_FLAGS]]} -D[[Options#ANA_INITIAL|ANA_INITIAL]]&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
:can be used to write time-averaged fields and use analytical initial conditions. Notice that you can have as many definitions as you want by appending values.&amp;lt;section end=MY_CPP_FLAGS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compiling Options===&lt;br /&gt;
&lt;br /&gt;
{{warning}}&#039;&#039;&#039;Warning:&#039;&#039;&#039; Be sure to leave environment variables meant to be off set to an empty string or commented out.  Any string value (including &#039;&#039;&#039;off&#039;&#039;&#039;) will evaluate to &#039;&#039;&#039;TRUE&#039;&#039;&#039; in conditional if-statements.&lt;br /&gt;
&lt;br /&gt;
====Parallel Execution Options====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_MPI /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPI&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPI]]&lt;br /&gt;
: Compile your application using &#039;&#039;&#039;MPI&#039;&#039;&#039; (distributed-memory) libraries.&amp;lt;section end=USE_MPI /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_MPIF90 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPIF90&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPIF90]]&lt;br /&gt;
: If [[#USE_MPI|USE_MPI]] is activated, use this to  turn on compilation via the script &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt;. This is needed in most Linux operating systems. In some systems with native &#039;&#039;&#039;MPI&#039;&#039;&#039; libraries the compilation does not require &#039;&#039;&#039;MPICH&#039;&#039;&#039; type scripts. This macro is also convenient when there are several Fortran compiliers (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifort&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;pgf90&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;pathf90&amp;lt;/span&amp;gt;) in the system that use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt;. In this case, the user needs to select the desired compiler via the [[#FORT|FORT]] variable and turn on both [[#USE_MPI|USE_MPI]] and [[USE_MPIF90]] macros.&amp;lt;section end=USE_MPIF90 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=which_MPI /&amp;gt;;&amp;lt;span id=&amp;quot;which_MPI&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[which_MPI]]&lt;br /&gt;
: If [[#USE_MPI|USE_MPI]] and [[#USE_MPIF90|USE_MPIF90]] are activated, this macro is used to determine which &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt; to compile with. This macro is convenient when there are several Fortran compiliers (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifort&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;pgf90&amp;lt;/span&amp;gt;, etc.) in the system that use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt;. The choice of which &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt; to use will be determined by the combination of this macro and the [[#FORT|FORT]] macro.&amp;lt;section end=which_MPI /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_OpenMP /&amp;gt;;&amp;lt;span id=&amp;quot;USE_OpenMP&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_OpenMP]]&lt;br /&gt;
: Compile your application using OpenMP librairies and compiler options. &#039;&#039;&#039;Note:&#039;&#039;&#039; you cannot set [[USE_OpenMP]] and [[#USE_MPI|USE_MPI]] at the same time.&amp;lt;section end=USE_OpenMP /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Compiler and Options====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=FORT /&amp;gt;;&amp;lt;span id=&amp;quot;FORT&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[FORT]]&lt;br /&gt;
: The ROMS make system will include a file with all the settings that depend on the system and the compiler. The name of this file is determined from the output of the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;uname&amp;lt;/span&amp;gt; command and the value of [[FORT]] (&#039;&#039;i.e.&#039;&#039; &#039;&#039;&#039;Linux-ifort.mk&#039;&#039;&#039;). Set your compiler here from the following list:&lt;br /&gt;
::&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  Operating System        Compiler(s)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;     AIX:                    xlf&amp;lt;br&amp;gt;     CYGWIN:                 df, g95, gfortran, ifort&amp;lt;br&amp;gt;     Darwin:                 f90, gfortran, ifort, pgi, xlf&amp;lt;br&amp;gt;     IRIX64:                 f90&amp;lt;br&amp;gt;     Linux:                  ftn, g95, gfortran, ifc, ifort, necsx, path, pgi&amp;lt;br&amp;gt;     MINGW:                  g95, gfortran&amp;lt;br&amp;gt;     OSF1:                   f90&amp;lt;br&amp;gt;     SunOS:                  f95, ftn&amp;lt;br&amp;gt;     UNICOS-mk:              f90&amp;lt;br&amp;gt;     UNICOS-mp:              ftn&amp;lt;br&amp;gt;     UNICOS-sk:              f90&amp;lt;/div&amp;gt;&lt;br /&gt;
: Feel free to send us additional rule files to include!&amp;lt;section end=FORT /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_DEBUG /&amp;gt;;&amp;lt;span id=&amp;quot;USE_DEBUG&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_DEBUG]]&lt;br /&gt;
: Activate debugging compiler options.&amp;lt;section end=USE_DEBUG /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_LARGE /&amp;gt;;&amp;lt;span id=&amp;quot;USE_LARGE&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_LARGE]]&lt;br /&gt;
: If applicable, activate 64-bit compilation.&amp;lt;section end=USE_LARGE /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Library Types and Executable====&lt;br /&gt;
&lt;br /&gt;
The options in this section allow you to choose whether to build ROMS using a shared or static (or both) library. If you enable both SHARED, STATIC and EXEC, the ROMS executable will automatically choose the shared library (except in cygwin). Building the ROMS executable using the shared library &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;is not recommended&amp;lt;/span&amp;gt; because it requires keeping track of the matching libROMS.{so|dylib} which is located in the Build_roms or Build_romsG directory and will be lost and/or replaced with each new build. The option to build the shared version of libROMS is for use in model coupling systems.&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;NOTE:&#039;&#039;&#039; If both SHARED and STATIC are unset but EXEC is set, ROMS will automatically build with the static library. If all three are unset, ROMS will default to building the roms executable with the static library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=SHARED /&amp;gt;;&amp;lt;span id=&amp;quot;SHARED&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[SHARED]]&lt;br /&gt;
: Build the shared library version of libROMS.&amp;lt;section end=SHARED /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=STATIC /&amp;gt;;&amp;lt;span id=&amp;quot;STATIC&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[STATIC]]&lt;br /&gt;
: Build the static library version of libROMS.&amp;lt;section end=STATIC /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=EXEC /&amp;gt;;&amp;lt;span id=&amp;quot;EXEC&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[EXEC]]&lt;br /&gt;
: Build the ROMS executable. In most cases you will want this on. The only time this should be off is if you are building the ROMS library for inclusion in a model coupling systems.&amp;lt;section end=EXEC/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====ROMS I/O Choices====&lt;br /&gt;
A more complete description of the available options can be found on the [[IO]] page.  Most users will want to enable at least USE_NETCDF4 because that will instruct the ROMS build system to use nf-config to determine the necessary libraries and paths to link into the ROMS executable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_NETCDF4 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_NETCDF4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_NETCDF4]]&lt;br /&gt;
: If applicable, link with &#039;&#039;&#039;NetCDF-4&#039;&#039;&#039; library. Notice that the &#039;&#039;&#039;NetCDF-4&#039;&#039;&#039; library needs both the &#039;&#039;&#039;HDF5&#039;&#039;&#039; and, if you want to enable parallel I/O, &#039;&#039;&#039;MPI&#039;&#039;&#039; libraries. In order to write the output files in &#039;&#039;&#039;NetCDF-4/HDF5&#039;&#039;&#039; format, you will need to set the [[Options#HDF5|HDF5]] CPP Option.&amp;lt;section end=USE_NETCDF4 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_PARALLEL_IO /&amp;gt;;&amp;lt;span id=&amp;quot;USE_PARALLEL_IO&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_PARALLEL_IO]]&lt;br /&gt;
: Activate parallel I/O using parallel enabled &#039;&#039;&#039;NetCDF-4/HDF5&#039;&#039;&#039; libraries. You will also need to set the [[Options#HDF5|HDF5]] and [[Options#PARALLEL_IO|PARALLEL_IO]] CPP Options to enable parallel I/O.&amp;lt;section end=USE_PARALLEL_IO /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_PIO /&amp;gt;;&amp;lt;span id=&amp;quot;USE_PIO&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_PIO]]&lt;br /&gt;
: Activate parallel I/O using Parallel IO (PIO) libraries developed at NCAR. More information can be found on on the [[IO|ROMS I/O]] page.&amp;lt;section end=USE_PIO /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_HDF5 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_HDF5&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_HDF5]]&lt;br /&gt;
: If any of the coupling components use the HDF5 Fortran API for primary I/O, we need to compile the main driver with the HDF5 Fortran library.&amp;lt;section end=USE_HDF5 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Earth Systems Models (ESM) coupling====&lt;br /&gt;
If coupling Earth Systems Models (ESM), set the location of the ESM component libraries and modules. The strategy is to compile and link each ESM component separately first, and then ROMS since it is driving the coupled system. Only the ESM components activated are considered and the rest are ignored.  Some components like WRF cannot be built in a directory specified by the user but in its own root directory, and cannot be moved when debugging with tools like TotalView.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=WRF_SRC_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;WRF_SRC_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[WRF_SRC_DIR]]&lt;br /&gt;
: WRF cannot be built in a directory specified by the user; it must be built in its own root directory and cannot be moved when debugging with tools like TotalView. If you wish to couple ROMS with the Earth Systems Model (ESM) WRF, ROMS needs to know the WRF root directory.&amp;lt;section end=WRF_SRC_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Various Path options====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_MY_LIBS /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MY_LIBS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MY_LIBS]]&lt;br /&gt;
: Use custom library paths for &#039;&#039;&#039;ESMF&#039;&#039;&#039;, &#039;&#039;&#039;HDF5&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF&#039;&#039;&#039; libraries, etc.&amp;lt;section end=USE_MY_LIBS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_PATHS /&amp;gt;;&amp;lt;span id=&amp;quot;MY_PATHS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_PATHS]]&lt;br /&gt;
: Path to your &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;my_build_paths.csh&amp;lt;/span&amp;gt; (or .sh) file that contains custom library paths for your system.&amp;lt;section end=MY_PATHS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_HEADER_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_HEADER_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_HEADER_DIR]]&lt;br /&gt;
: This is the Directory where your application&#039;s header file is located. Recall that a ROMS header file contains all the CPP options defining a particular application. This is the header file that is included in [[cppdefs.h]]. Notice that if the header file is located in the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory, it is possible to include the same header file name located somewhere else because the full directory path is specified here. The user may copy the distributed header file(s) into a different directory and modify it to explore different CPP options.&amp;lt;section end=MY_HEADER_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_ANALYTICAL_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_ANALYTICAL_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_ANALYTICAL_DIR]]&lt;br /&gt;
: This is the directory containing the user&#039;s [[Functionals|analytic files]], if any. Templates of the analytic expressions are provided in the &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; directory. If analytic expressions are activated, the makefile will first load the ones located in [[MY_ANALYTICAL_DIR]] and then the ones located in &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039;. We recommended that you do not modify the analytical expressions in the &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039; directory since these are the official versions of these files and updates will conflict with your changes.  The user however can modify those in &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; or some other directory and specify which directory with this variable.&amp;lt;section end=MY_ANALYTICAL_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=BINDIR /&amp;gt;;&amp;lt;span id=&amp;quot;BINDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[BINDIR]]&lt;br /&gt;
: Directory where your &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsG&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsM&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsO&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt; executable will be created.&amp;lt;section end=BINDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=SCRATCH_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;SCRATCH_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[SCRATCH_DIR]]&lt;br /&gt;
: Directory where your temporary objects and files will be placed during the build process.&amp;lt;section end=SCRATCH_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build Script Debugging==&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; The build script has the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;-p&amp;lt;/span&amp;gt; option to inquire and report about any of the environmental and local variables used in the [[makefile]] or build scripts. Usefull build commands are:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;LIBS&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;libraries&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;modules&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;includes&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;sources&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;CPPFLAGS&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;MY_CPP_FLAGS&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;MY_ROOT_DIR&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;MY_ROMS_SRC&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;MKFILE&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
:We highly recommend to use this option to inquire your environment when having errors during compiling and linking. For Example:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;build_roms.sh -p&amp;lt;/span&amp;gt; &#039;&#039;&#039;MKFILE&#039;&#039;&#039;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Using customized library paths from:&amp;lt;/span&amp;gt;  &amp;lt;span class=&amp;quot;hotPink&amp;quot;&amp;gt;/Users/arango/Compilers/ROMS/my_build_paths.sh&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;MKFILE&amp;lt;/span&amp;gt; = /Users/arango/Compilers/ROMS/Darwin-ifort.mk&amp;lt;/div&amp;gt;&lt;br /&gt;
:Notice that there is not a compilation, but a report about the value of local [[makefile]] variable &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;MKFILE&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Library and Executable Paths==&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; in SVN revision 933 (January 26, 2019) the custom libraries section was removed from the ROMS build script and placed in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Compilers/my_build_paths.csh&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Compilers/my_build_paths.sh&amp;lt;/span&amp;gt; to both streamline the ROMS build script and make setting up new applications less tedious. More information can be found in ROMS [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. Prior to ROMS release 933, library and executable paths where set in ROMS build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The path of the libraries and MPI implementations required by ROMS can be set using environment variables which take precedence over the values specified in the makefile macro definitions file (&#039;&#039;&#039;Compilers/*.mk&#039;&#039;&#039;). If so desired, set [[USE_MY_LIBS]] to &#039;&#039;&#039;yes&#039;&#039;&#039; and properly set [[MY_PATHS]]. Visit [[my build paths]] for more details.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=roms.in&amp;diff=6682</id>
		<title>roms.in</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=roms.in&amp;diff=6682"/>
		<updated>2025-05-05T18:35:40Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Standard Input Script - &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms.in&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Notice:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019), all &amp;quot;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt;&amp;quot; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
File &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms.in&amp;lt;/span&amp;gt; is the ROMS standard input file to any model run. This file sets the application spatial dimensions and many of the parameters that are not specified at compile time, including parallel tile decomposition, timestepping, physical coefficients and constants, vertical coordinate set-up, logical switches and flags to control the frequency of output, the names of input and output NetCDF files, and additional input scripts names for [[s4dvar.in|data assimilation]], [[stations.in|stations]], [[floats.in| floats trajectories]], [[biology.in|ecosystem models]], and [[sediment.in|sediment model]].&lt;br /&gt;
&lt;br /&gt;
This standard input ASCII file is organized in several sections as shown below, with links to more detailed explanation where required.&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Notice:&#039;&#039;&#039; A detailed information about ROMS input script file syntax can be found [[Input Parameter Files|here]].&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Notice:&#039;&#039;&#039; A default &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms.in&amp;lt;/span&amp;gt; input script is provided in the &#039;&#039;&#039;User/External&#039;&#039;&#039; subdirectory. Also there are several standard input scripts in the &#039;&#039;&#039;ROMS/External&#039;&#039;&#039; subdirectory which are used in the distributed [[Test Cases|test cases]]. They are usually named &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;app&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;.in&amp;lt;/span&amp;gt; where &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;app&amp;lt;/span&amp;gt; is the lowercase of the test case [[Options|cpp option]].&lt;br /&gt;
&lt;br /&gt;
== Configuration Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Application title. This string will be saved in the output NetCDF files. &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#title|TITLE]] = Wind-Driven Upwelling/Downwelling over a Periodic Channel&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* C-preprocessing Flag to define the specific configuration.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;    MyAppCPP = UPWELLING&amp;lt;/div&amp;gt;Though this is set by [[makefile#ROMS_APPLICATION | ROMS_APPLICATION]] in the [[makefile]] or [[build Script]], ROMS is also compiled with &amp;lt;span style=&amp;quot;white-space:nowrap;&amp;quot;&amp;gt;&#039;&#039;&#039;-D$(ROMS_APPLICATION)&#039;&#039;&#039;&amp;lt;/span&amp;gt;, which allows the use of&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#ifdef UPWELLING&amp;lt;/div&amp;gt;for instance. The net result of both&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;-D$(ROMS_APPLICATION)=UPWELLING -DUPWELLING&amp;lt;/div&amp;gt;is that &#039;&#039;&#039;ROMS_APPLICATION&#039;&#039;&#039; becomes &#039;&#039;&#039;1&#039;&#039;&#039; in the source code. ROMS therefore needs to be told the application name here as well in order to report it to the output file.&lt;br /&gt;
&lt;br /&gt;
* Input variable information file name.  This file needs to be processed first so all information arrays can be initialized properly. Notice that we need an absolute or relative path for input metadata file [[varinfo.dat]]. There are many posts in the ROMS Forum of new users that fail to specify the correct location of this file.  Expert users usually have the own modified copy of this file for a particular application.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#varname|VARNAME]] = ROMS/External/[[varinfo.dat]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:{{note}}&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Starting with &#039;&#039;&#039;revision 460&#039;&#039;&#039; file names can be up to 256 characters long. Previously only 80 characters were allowed.&lt;br /&gt;
&lt;br /&gt;
* Number of nested grids.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Ngrids]] =  1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Number of grid nesting layers.  This parameter is used to allow refinement and composite grid combinations.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#NestLayers|NestLayers]] =  1&amp;lt;/div&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
* Number of grids in each nesting layer, [1:[[Variables#NestLayers|NestLayers]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#GridsInLayer|GridsInLayer]] =  1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Grid dimension parameters. These are used to dynamically allocate all model state variables upon execution.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;          [[Variables#Lm|Lm]] == 41            ! Number of I-direction INTERIOR RHO-points&amp;lt;br /&amp;gt;          [[Variables#Mm|Mm]] == 80            ! Number of J-direction INTERIOR RHO-points&amp;lt;br /&amp;gt;           [[Variables#N|N]] == 16            ! Number of vertical levels&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;        [[Variables#Nbed|Nbed]] =  0             ! Number of sediment bed layers&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;         [[Variables#NAT|NAT]] =  2             ! Number of active tracers (usually, 2)&amp;lt;br /&amp;gt;         [[Variables#NPT|NPT]] =  0             ! Number of inactive passive tracers&amp;lt;br /&amp;gt;         [[Variables#NCS|NCS]] =  0             ! Number of cohesive (mud) sediment tracers&amp;lt;br /&amp;gt;         [[Variables#NNS|NNS]] =  0             ! Number of non-cohesive (sand) sediment tracers&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Domain decomposition parameters for serial, distributed-memory or shared-memory configurations used to determine tile horizontal range indices ([[Istr]],[[Iend]]) and ([[Jstr]],[[Jend]]), [1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[NtileI]] == 1             ! I-direction partition&amp;lt;br /&amp;gt;      [[NtileJ]] == 1             ! J-direction partition&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Tracer Advection Schemes==&lt;br /&gt;
&lt;br /&gt;
Set horizontal and vertical advection schemes for active and inert tracers. A different advection scheme is allowed for each tracer. For example, a positive-definite (monotonic) algorithm can be activated for salinity and inert tracers, while a different one is set for temperature.&lt;br /&gt;
&lt;br /&gt;
It is more advantageous to set the horizontal and vertical advection schemes for each tracer with switches instead of a single CPP flag for all of them. Positive-definite and monotonic algorithms (i.e., MPDATA and HSIMT) are appropriate and useful for positive fields like salinity, inert, biological, and sediment tracers.  However, since the temperature has a dynamic range with negative and positive values in the ocean, other advection schemes are more appropriate.&lt;br /&gt;
&lt;br /&gt;
Currently, the following tracer advection schemes are available and are activated using the associated Keyword:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;Keyword    Advection Algorithm&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;A4         4th-order Akima (horizontal/vertical)&amp;lt;br /&amp;gt;C2         2nd-order centered differences (horizontal/vertical)&amp;lt;br /&amp;gt;C4         4th-order centered differences (horizontal/vertical)&amp;lt;br /&amp;gt;HSIMT      3th-order HSIMT with TVD limiter (horizontal/vertical)&amp;lt;br /&amp;gt;MPDATA     recursive flux corrected MPDATA (horizontal/vertical)&amp;lt;br /&amp;gt;SPLINES    parabolic splines reconstruction (only vertical)&amp;lt;br /&amp;gt;SU3        split third-order upstream (horizontal/vertical)&amp;lt;br /&amp;gt;U3         3rd-order upstresm-bias (only horizontal)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The user has the option of specifying the full Keyword or the first two letters, regardless if using uppercase or lowercase.&lt;br /&gt;
&lt;br /&gt;
If using either HSIMT ([[Bibliography#WuH_2010a|Wu and Zhu, 2010]]) or MPDATA ([[Bibliography#SmolarkiewiczPK_1998a|Smolarkiewicz and Margolin, 1998]]) options, the user needs to set the same scheme for both horizontal and vertical advection to preserve monotonicity.&lt;br /&gt;
&lt;br /&gt;
*Horizontal and vertical advection for each active (temperature and salinity) and inert tracer, [1:[[Variables#NAT|NAT]]+[[Variables#NPT|NPT]],[[Variables#Ngrids|Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#Hadvection|Hadvection]] == U3       \                     ! temperature&amp;lt;br /&amp;gt;                 U3       \                     ! salinity&amp;lt;br /&amp;gt;                 HSIMT    \                     ! dye_01, inert(1)&amp;lt;br /&amp;gt;                 HSIMT                          ! dy2_02, inert(2)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [[Variables#Vadvection|Vadvection]] == C4       \                     ! temperature&amp;lt;br /&amp;gt;                 C4       \                     ! salinity&amp;lt;br /&amp;gt;                 HSIMT    \                     ! dye_01, inert(1)&amp;lt;br /&amp;gt;                 HSIMT                          ! dy2_02, inert(2)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Horizontal and vertical advection for each active (temperature and salinity) and inert tracer for adjoint-based algorithms can have different horizontal schemes, [1:[[Variables#NAT|NAT]]+[[Variables#NPT|NPT]],[[Variables#Ngrids|Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#ad_Hadvection|ad_Hadvection]] == U3       \                     ! temperature&amp;lt;br /&amp;gt;                 U3       \                     ! salinity&amp;lt;br /&amp;gt;                 HSIMT    \                     ! dye_01, inert(1)&amp;lt;br /&amp;gt;                 HSIMT                          ! dy2_02, inert(2)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#ad_Vadvection|ad_Vadvection]] == C4       \                     ! temperature&amp;lt;br /&amp;gt;                 C4       \                     ! salinity&amp;lt;br /&amp;gt;                 HSIMT    \                     ! dye_01, inert(1)&amp;lt;br /&amp;gt;                 HSIMT                          ! dy2_02, inert(2)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Lateral Open Boundary Conditions Parameters==&lt;br /&gt;
&lt;br /&gt;
*The lateral boundary conditions are now specified with logical switches instead of CPP flags to allow nested grid configurations. Their values are loaded into the structured array:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#LBC|LBC]](1:4, nLBCvar, [[Ngrids]])&amp;lt;/div&amp;gt;where &#039;&#039;&#039;1:4&#039;&#039;&#039; are the numbered boundary edges, &#039;&#039;&#039;nLBCvar&#039;&#039;&#039; are the number LBC state variables, and [[Ngrids]] is the number of nested grids. For example, to apply gradient boundary conditions for free-surface we use:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#LBC|LBC]](iwest,  isFsur, ng) % gradient&amp;lt;br /&amp;gt;[[Variables#LBC|LBC]](ieast,  ...   , ng) % gradient&amp;lt;br /&amp;gt;[[Variables#LBC|LBC]](isouth, ...   , ng) % gradient&amp;lt;br /&amp;gt;[[Variables#LBC|LBC]](inorth, ...   , ng) % gradient&amp;lt;/div&amp;gt;The lateral boundary conditions are entered with a keyword. A value is expected for each boundary segment per nested grid for each state variable. Each tracer variable requires [1:4,1:[[NAT]]+[[NPT]],[[Ngrids]]] values. [1:4,1:[[Ngrids]]] values are expected for other variables. The boundary order is: &#039;&#039;&#039;1&#039;&#039;&#039;=west, &#039;&#039;&#039;2&#039;&#039;&#039;=south, &#039;&#039;&#039;3&#039;&#039;&#039;=east, and &#039;&#039;&#039;4&#039;&#039;&#039;=north. That is, anticlockwise starting at the western boundary.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;The keyword is case insensitive and usually has three characters. However, it is possible to have compound keywords, if applicable. For example, the keyword &#039;&#039;&#039;RadNud&#039;&#039;&#039; implies radiation boundary condition with nudging. This combination is usually used in active/passive radiation conditions.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;!   Keyword    Lateral Boundary Condition Type&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!   Cha        Chapman&amp;lt;br /&amp;gt;!   Cla        Clamped&amp;lt;br /&amp;gt;!   Clo        Closed&amp;lt;br /&amp;gt;!   Fla        Flather                                _____N_____     j=Mm&amp;lt;br /&amp;gt;!   Gra        Gradient                              |     4     |&amp;lt;br /&amp;gt;!   Nes        Nested                                |           |&amp;lt;br /&amp;gt;!   Nud        Nudging                             1 W           E 3&amp;lt;br /&amp;gt;!   Per        Periodic                              |           |&amp;lt;br /&amp;gt;!   Rad        Radiation                             |_____S_____|&amp;lt;br /&amp;gt;!   Red        Reduced Physics                             2          j=1&amp;lt;br /&amp;gt;!                                                   i=1         i=Lm&amp;lt;br /&amp;gt;!                   W       S       E       N&amp;lt;br /&amp;gt;!                   e       o       a       o&amp;lt;br /&amp;gt;!                   s       u       s       r&amp;lt;br /&amp;gt;!                   t       t       t       t&amp;lt;br /&amp;gt;!                           h               h&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!                   1       2       3       4&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isFsur)]] ==   Per     Clo     Per     Clo         ! free-surface&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isUbar)]] ==   Per     Clo     Per     Clo         ! 2D U-momentum&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isVbar)]] ==   Per     Clo     Per     Clo         ! 2D V-momentum&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isUvel)]] ==   Per     Clo     Per     Clo         ! 3D U-momentum&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isVvel)]] ==   Per     Clo     Per     Clo         ! 3D V-momentum&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isMtke)]] ==   Per     Clo     Per     Clo         ! mixing TKE&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [[Variables#LBC|LBC(isTvar)]] ==   Per     Clo     Per     Clo \       ! temperature&amp;lt;br /&amp;gt;                    Per     Clo     Per     Clo         ! salinity&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Adjoint-based algorithms can have different lateral boundary conditions keywords.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#ad_LBC|ad_LBC(isFsur)]] ==   Per     Clo     Per     Clo         ! free-surface&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isUbar)]] ==   Per     Clo     Per     Clo         ! 2D U-momentum&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isVbar)]] ==   Per     Clo     Per     Clo         ! 2D U-momentum&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isUvel)]] ==   Per     Clo     Per     Clo         ! 3D U-momentum&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isVvel)]] ==   Per     Clo     Per     Clo         ! 3D V-momentum&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isMtke)]] ==   Per     Clo     Per     Clo         ! mixing TKE&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#ad_LBC|ad_LBC(isTvar)]] ==   Per     Clo     Per     Clo \       ! temperature&amp;lt;br /&amp;gt;                    Per     Clo     Per     Clo         ! salinity&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Lateral open boundary edge volume conservation switch for nonlinear model and adjoint-based algorithm. This is usually activated with radiation boundary conditions to enforce global mass conservation. Notice that these switches should not be activated if tidal forcing, [1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#VolCons|VolCons(west)]]  ==  F                            ! western  boundary&amp;lt;br /&amp;gt;   [[Variables#VolCons|VolCons(east)]]  ==  F                            ! eastern  boundary&amp;lt;br /&amp;gt;   [[Variables#VolCons|VolCons(south)]] ==  F                            ! southern boundary&amp;lt;br /&amp;gt;   [[Variables#VolCons|VolCons(north)]] ==  F                            ! northern boundary&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#ad_VolCons|ad_VolCons(west)]]  ==  F                            ! western  boundary&amp;lt;br /&amp;gt;[[Variables#ad_VolCons|ad_VolCons(east)]]  ==  F                            ! eastern  boundary&amp;lt;br /&amp;gt;[[Variables#ad_VolCons|ad_VolCons(south)]] ==  F                            ! southern boundary&amp;lt;br /&amp;gt;[[Variables#ad_VolCons|ad_VolCons(north)]] ==  F                            ! northern boundary&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timestepping and Iterations Parameters==&lt;br /&gt;
&lt;br /&gt;
* Timestepping parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#ntimes|NTIMES]] =  1440          ! Number of timesteps&amp;lt;br /&amp;gt;          [[Variables#dt|DT]] == 300.0d0       ! Timestep size (seconds)&amp;lt;br /&amp;gt;     [[Variables#ndtfast|NDTFAST]] == 30            ! Number of barotropic steps&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Total number of timesteps for computing observations impacts interval during the analysis ([[Variables#ntimes_ana|NTIMES_ANA]]) or forecast ([[Variables#ntimes_fct|NTIMES_FCT]]) cycle.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#ntimes_ana|NTIMES_ANA]] =  1440          ! analysis interval&amp;lt;br /&amp;gt;      [[Variables#ntimes_fct|NTIMES_FCT]] =  1440          ! forecast interval&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Model iteration loops parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#ERstr|ERstr]] =  1             ! Starting perturbation or iteration&amp;lt;br /&amp;gt;       [[Variables#ERend|ERend]] =  1             ! Ending perturbation or iteration&amp;lt;br /&amp;gt;      [[Variables#Nouter|Nouter]] =  1             ! Maximum number of 4DVar outer loop iterations&amp;lt;br /&amp;gt;      [[Variables#Ninner|Ninner]] =  1             ! Maximum number of 4DVar inner loop iterations&amp;lt;br /&amp;gt;  [[Variables#Nintervals|Nintervals]] =  1             ! Number of stochastic optimals interval divisions&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Number of eigenvalues ([[Variables#NEV|NEV]]) and eigenvectors ([[Variables#NCV|NCV]]) to compute for the Lanczos/Arnoldi problem in the Generalized Stability Theory (GST) analysis. [[Variables#NCV|NCV]] must be greater than [[Variables#NEV|NEV]].&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;         [[Variables#NEV|NEV]] =  2             ! Number of eigenvalues&amp;lt;br /&amp;gt;         [[Variables#NCV|NCV]] =  10            ! Number of eigenvectors&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Notice:&#039;&#039;&#039; At present, there is no &#039;&#039;apriori&#039;&#039; analysis to guide the selection of &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV&amp;lt;/span&amp;gt; relative to &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NEV&amp;lt;/span&amp;gt;.  The only formal requirement is that &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV &amp;gt; NEV&amp;lt;/span&amp;gt;. However in optimal perturbations, it is recommended to have &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV &amp;amp;ge; 2*NEV&amp;lt;/span&amp;gt;. In Finite Time Eigenmodes (FTE) and Adjoint Finite Time Eigenmodes (AFTE) the requirement is to have &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV &amp;amp;ge; 2*NEV+1&amp;lt;/span&amp;gt;. The efficiency of calculations depends critically on the combination of &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NEV&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV&amp;lt;/span&amp;gt;.  If &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NEV&amp;lt;/span&amp;gt; is large (greater than 10 say), you can use &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV=2*NEV+1&amp;lt;/span&amp;gt; but for &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NEV&amp;lt;/span&amp;gt; small (less than 6) it will be inefficient to use &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV=2*NEV+1&amp;lt;/span&amp;gt;. In complicated applications, you can start with &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NEV=2&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;NCV=10&amp;lt;/span&amp;gt;. Otherwise, it will iterate for very long time.&lt;br /&gt;
&lt;br /&gt;
==Output Frequency Parameters==&lt;br /&gt;
&lt;br /&gt;
* Flags controlling the frequency of output.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#nrrec|NRREC]] =  0             ! Model restart flag&amp;lt;br /&amp;gt;   [[Variables#LcycleRST|LcycleRST]] == T             ! Switch to recycle restart time records&amp;lt;br /&amp;gt;        [[Variables#nRST|NRST]] == 288           ! Number of timesteps between writing restart records&amp;lt;br /&amp;gt;        [[Variables#nSTA|NSTA]] == 1             ! Number of timesteps between stations records&amp;lt;br /&amp;gt;        [[Variables#nFLT|NFLT]] == 1             ! Number of timesteps between floats records&amp;lt;br /&amp;gt;       [[Variables#ninfo|NINFO]] == 1             ! Number of timesteps between printing information diagnostics&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Output history, average, diagnostic files parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#ldefout|LDEFOUT]] == T             ! File creation/append switch&amp;lt;br /&amp;gt;        [[Variables#nHIS|NHIS]] == 72            ! Number of timesteps between writing history records&amp;lt;br /&amp;gt;     [[Variables#ndefHIS|NDEFHIS]] == 0             ! Number of timesteps between creation of new history file&amp;lt;br /&amp;gt;        [[Variables#nQCK|NQCK]] == 0             ! Number of timesteps between writing quicksave records&amp;lt;br /&amp;gt;     [[Variables#ndefQCK|NDEFQCK]] == 0             ! Number of timesteps between creation of new quicksave file&amp;lt;br /&amp;gt;      [[Variables#ntsAVG|NTSAVG]] == 1             ! Starting averages timestep&amp;lt;br /&amp;gt;        [[Variables#nAVG|NAVG]] == 72            ! Number of timesteps between writing averages records&amp;lt;br /&amp;gt;     [[Variables#ndefAVG|NDEFAVG]] == 0             ! Number of timesteps between creation of new averages file&amp;lt;br /&amp;gt;      [[Variables#ntsDIA|NTSDIA]] == 1             ! Starting diagnostics timestep&amp;lt;br /&amp;gt;        [[Variables#nDIA|NDIA]] == 72            ! Number of timesteps between writing diagnostics records&amp;lt;br /&amp;gt;     [[Variables#ndefDIA|NDEFDIA]] == 0             ! Number of timesteps between creation of new diagnostics file&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Output tangent linear and adjoint models parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#LcycleTLM|LcycleTLM]] == F             ! Switch to recycle TLM time records&amp;lt;br /&amp;gt;        [[Variables#nTLM|NTLM]] == 72            ! Number of timesteps writing between TLM records&amp;lt;br /&amp;gt;     [[Variables#ndefTLM|NDEFTLM]] == 0             ! Number of timesteps between creation of new TLM file&amp;lt;br&amp;gt;   [[Variables#LcycleADJ|LcycleADJ]] == F             ! Switch to recycle ADM time records&amp;lt;br&amp;gt;        [[Variables#nADJ|NADJ]] == 72            ! Number of timesteps between writing ADM records&amp;lt;br&amp;gt;     [[Variables#ndefADJ|NDEFADJ]] == 0             ! Number of timesteps between creation of new ADM file&amp;lt;br&amp;gt;        [[Variables#nSFF|NSFF]] == 72            ! Number of timesteps between 4DVAR adjustment of&amp;lt;br&amp;gt;                              !   surface forcing fluxes&amp;lt;br&amp;gt;        [[Variables#nOBC|NOBC]] == 72            ! Number of timesteps between 4DVAR adjustment of&amp;lt;br&amp;gt;                              !   open boundary fields&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Output check pointing GST restart parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#LmultiGST|LmultiGST]] =  F             ! one eigenvector per history file&amp;lt;br /&amp;gt;     [[Variables#LrstGST|LrstGST]] =  F             ! GST restart switch&amp;lt;br /&amp;gt;  [[Variables#MaxIterGST|MaxIterGST]] =  500           ! maximum number of iterations&amp;lt;br /&amp;gt;        [[Variables#nGST|NGST]] =  10            ! check pointing interval&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Physical and Numerical Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Relative accuracy of the Ritz values computed in the GST analysis.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;    [[Variables#Ritz_tol|Ritz_tol]] =  1.0d-15&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Harmonic/biharmonic horizontal diffusion of all active and passive (dye) tracers for the nonlinear model and adjoint-based algorithms: [1:[[NAT]]+[[NPT]],[[Ngrids]]] values are expected. Diffusion coefficients for biology and sediment tracers are set in their respective input scripts.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;        [[Variables#tnu2|TNU2]] == 0.0d0  0.0d0        ! m2/s&amp;lt;br /&amp;gt;        [[Variables#tnu4|TNU4]] == 2*0.0d0             ! m4/s&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#ad_tnu2|ad_TNU2]] == 0.0d0  0.0d0        ! m2/s&amp;lt;br /&amp;gt;     [[Variables#ad_tnu4|ad_TNU4]] == 0.0d0  0.0d0        ! m4/s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Harmonic/biharmonic, horizontal viscosity coefficient for the nonlinear model and adjoint-based algorithms: [1:[[Ngrids]] values are expected.  Only used if the appropriate CPP options are defined.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#visc2|VISC2]] == 0.0d0               ! m2/s&amp;lt;br /&amp;gt;       [[Variables#visc4|VISC4]] == 0.0d0               ! m4/s&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    [[Variables#ad_visc2|ad_VISC2]] == 0.0d0               ! m2/s&amp;lt;br /&amp;gt;    [[Variables#ad_visc4|ad_VISC4]] == 0.0d0               ! m4/s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to increase/decrease horizontal viscosity and/or diffusivity in specific areas of the application domain (like sponge areas) for the desired application grid.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;    [[Variables#LuvSponge|LuvSponge]] == F                  ! horizontal momentum&amp;lt;br /&amp;gt;[[Variables#LtracerSponge|LtracerSponge]] == F F                ! temperature, salinity, inert&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Background vertical mixing coefficients for active ([[NAT]]) and inert ([[NPT]]) tracers for the nonlinear model and basic state scale factor in adjoint-based algorithms: [1:[[NAT]]+[[NPT]],[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#Akt_bak|AKT_BAK]] == 1.0d-6 1.0d-6       ! m2/s&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#ad_Akt_fac|ad_AKT_fac]] == 1.0d0  1.0d0        !nondimensional&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Background vertical mixing coefficient for momentum for the nonlinear model and basic state scale factor in the adjoint-based algorithms: [1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#Akv_bak|AKV_BAK]] == 1.0d-5              ! m2/s&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#ad_Akv_fac|ad_AKV_fac]] == 1.0d0               !nondimensional&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Upper threshold values to limit vertical mixing coefficients computed from vertical mixing parameterizations. Although this is an engineering fix, the vertical mixing values inferred from ocean observations are rarely higher than this upper limit value.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#Akt_limit|AKT_LIMIT]] == 1.0d-3 1.0d-3       ! m2/s&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [[Variables#Akv_limit|AKV_LIMIT]] == 1.0d-3              ! m2/s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Turbulent closures parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#Akk_bak|AKK_BAK]] == 5.0d-6              ! m2/s&amp;lt;br /&amp;gt;     [[Variables#Akp_bak|AKP_BAK]] == 5.0d-6              ! m2/s&amp;lt;br /&amp;gt;      [[Variables#tkene2|TKENU2]] == 0.0d0               ! m2/s&amp;lt;br /&amp;gt;      [[Variables#tkenu4|TKENU4]] == 0.0d0               ! m4/s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[Vertical Mixing Parameterizations#Generic Length Scale|Generic length-scale]] turbulence closure parameters. These parameters are used when [[GLS_MIXING]] is activated.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#gls_p|GLS_P]] == 3.0d0               ! &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;K-epsilon&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;       [[Variables#gls_m|GLS_M]] == 1.5d0               ! Turbulent kinetic energy exponent&amp;lt;br /&amp;gt;       [[Variables#gls_n|GLS_N]] == -1.0d0              ! Turbulent length scale exponent&amp;lt;br /&amp;gt;    [[Variables#gls_Kmin|GLS_Kmin]] == 7.6d-6              ! Minimum value of specific turbulent energy&amp;lt;br /&amp;gt;    [[Variables#gls_Pmin|GLS_Pmin]] == 1.0d-12             ! Minimum Value of dissipation&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;! Closure independent constraint parameters:&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;    [[Variables#gls_cmu0|GLS_CMU0]] == 0.5477d0            ! Stability coefficient&amp;lt;br /&amp;gt;      [[Variables#gls_c1|GLS_C1]] == 1.44d0              ! Shear production coefficient&amp;lt;br /&amp;gt;      [[Variables#gls_c2|GLS_C2]] == 1.92d0              ! Dissipation coefficient&amp;lt;br /&amp;gt;     [[Variables#gls_c3m|GLS_C3M]] == -0.4d0              ! Buoyancy production coefficient (minus)&amp;lt;br /&amp;gt;     [[Variables#gls_c3p|GLS_C3P]] == 1.0d0               ! Buoyancy production coefficient (plus)&amp;lt;br /&amp;gt;    [[Variables#gls_sigp|GLS_SIGK]] == 1.0d0               ! Constant Schmidt number for turbulent&amp;lt;br&amp;gt;                                    !   kinetic energy diffusivity&amp;lt;br /&amp;gt;    [[Variables#gls_sigp|GLS_SIGP]] == 1.30d0              ! Constant Schmidt number for turbulent&amp;lt;br&amp;gt;                                    !   generic statistical field, &amp;quot;psi&amp;quot;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Constants used in surface turbulent kinetic energy flux computation.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#charnok_alpha|CHARNOK_ALPHA]] == 1400.0d0         ! Charnok surface roughness&amp;lt;br /&amp;gt; [[Variables#zoz_hsig_alpha|ZOS_HSIG_ALPHA]] == 0.5d0            ! Roughness from wave amplitude&amp;lt;br /&amp;gt;       [[Variables#sz_alpha|SZ_ALPHA]] == 0.25d0           ! roughness from wave dissipation&amp;lt;br /&amp;gt;      [[Variables#crgban_cw|CRGBAN_CW]] == 100.0d0          ! Craig and Banner wave breaking&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Constants used in momentum stress computation.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;        [[Variables#rdrg|RDRG]] == 3.0d-04             ! m/s&amp;lt;br /&amp;gt;       [[Variables#rdrg2|RDRG2]] == 3.0d-03             ! nondimensional&amp;lt;br /&amp;gt;         [[Variables#Zob|Zob]] == 0.02d0              ! m&amp;lt;br /&amp;gt;         [[Variables#Zos|Zos]] == 0.02d0              ! m&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Height (m) of atmospheric measurements for Bulk fluxes parameterization.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#blk_ZQ|BLK_ZQ]] == 10.0d0              ! air humidity&amp;lt;br /&amp;gt;      [[Variables#blk_ZT|BLK_ZT]] == 10.0d0              ! air temperature&amp;lt;br /&amp;gt;      [[Variables#blk_ZW|BLK_ZW]] == 10.0d0              ! winds&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Minimum depth for wetting and drying.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#Dcrit|DCRIT]] == 0.10d0              ! m&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Jerlov water type used to set vertical depth scale for shortwave radiation absorption.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#lmd_Jwt|WTYPE]] == 1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Deepest and shallowest levels to apply surface momentum stress as a [[BODYFORCE|body-force]].&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#levsfrc|LEVSFRC]] == 15&amp;lt;br /&amp;gt;     [[Variables#levbfrc|LEVBFRC]] == 1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Mean Density and Brunt-Vaisala frequency.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;        [[Variables#rho0|RHO0]] =  1025.0d0            ! kg/m3&amp;lt;br /&amp;gt;     [[Variables#bvf_bak|BVF_BAK]] =  1.0d-4              ! 1/s2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Timestamp assigned for model initialization, reference time origin for tidal forcing, and model reference time for output NetCDF units attribute.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#dstart|DSTART]] =  0.0d0               ! days&amp;lt;br /&amp;gt;  [[Variables#tide_start|TIDE_START]] =  0.0d0               ! days&amp;lt;br /&amp;gt;    [[Variables#time_ref|TIME_REF]] =  0.0d0               ! yyyymmdd.dd&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Nudging/relaxation time scales, inverse scales will be computed internally, [1:[[Ngrids]]] values are expected. These values are used for two purposes. &lt;br /&gt;
# When climatology nudging is active throughout the domain because the logical flags LtracerCLM, Lm3CLM, Lm2CLM etc. are TRUE, these values are the default nudging time scales set in Functionals/ana_nudgcoef.h. Since the user can choose to customize ana_nudgcoef.h, or provide 3-D climatology nudging time scales in an external file, these parameters might not be used &lt;br /&gt;
# When nudging is applied in the lateral open boundary conditions because the LBC logical flags are set to &amp;quot;RadNud&amp;quot; the values here set the nudging time scale when the Orlanski radiation scheme detects outflow conditions. When the Orlanski scheme detects inflow conditions, the nudging time scale is TNUDG/OBCFAC (see OBCFAC below).&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#Tnudg|TNUDG]] == 2*0.0d0             ! days&amp;lt;br /&amp;gt;       [[Variables#Znudg|ZNUDG]] == 0.0d0               ! days&amp;lt;br /&amp;gt;      [[Variables#M2nudg|M2NUDG]] == 0.0d0               ! days&amp;lt;br /&amp;gt;      [[Variables#M3nudg|M3NUDG]] == 0.0d0               ! days&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Factor between passive (outflow) and active (inflow) (in the Orlanksi radiation sense) open boundary condition nudging time scales, [1:Ngrids]. If [[Variables#obcfac|OBCFAC]] &amp;gt; 1, nudging on inflow is stronger than on outflow (recommended) because the inflow time scale TNUDG/OBCFAC is less than the outflow timescale TNUDG (see above). The passive/active radiation conditions in ROMS follow the method proposed by [[Bibliography#MarchesielloP_2001a | Marchesiello et al. (2001)]]: &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial \phi}{\partial t} + C_x \frac{\partial \phi}{\partial x} + C_y \frac{\partial \phi}{\partial y} = - \frac{1}{\tau}(\phi - \phi^{ext})&amp;lt;/math&amp;gt; with &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{align} \tau &amp;amp;= \tau_{out} &amp;amp;\text{if} \;\;\; &amp;amp;C_x &amp;gt; 0, \\ \tau &amp;amp;= \tau_{in} &amp;amp;\text{if} \;\;\; &amp;amp;C_x &amp;lt; 0 \;\;\; \text{and} \;\;\; C_y = 0 \end{align}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;\phi^{ext}&amp;lt;/math&amp;gt; represents the external boundary data and &amp;lt;math&amp;gt;\tau&amp;lt;/math&amp;gt; is the nudging time scale with &amp;lt;math&amp;gt;\tau_{out}&amp;lt;/math&amp;gt; for outflow, &amp;lt;math&amp;gt;\tau_{in}&amp;lt;/math&amp;gt; for inflow, and &amp;lt;math&amp;gt;\tau_{out} \ll \tau_{in}&amp;lt;/math&amp;gt;. At outflow, a weak nudging is used to prevent a numerical drift in the solution while avoiding over-specification of the boundary data. During inflow, a strong nudging is applied to avoid data-shock in the solution. The nudging time scales provided above are for the outflow (passive) conditions, &amp;lt;math&amp;gt;\tau_{out}&amp;lt;/math&amp;gt;, in days.  The inflow nudging factor in the above equation is &amp;lt;math&amp;gt;\frac{1}{\tau_{in}} = \frac{\text{obcfac}}{\tau_{out}}&amp;lt;/math&amp;gt;. &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#obcfac|OBCFAC]] == 10.0d0               ! nondimensional&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Linear equation of State parameters, [1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;          [[Variables#R0|R0]] == 1027.0d0            ! kg/m3&amp;lt;br /&amp;gt;          [[Variables#T0|T0]] == 10.0d0              ! Celsius&amp;lt;br /&amp;gt;          [[Variables#S0|S0]] == 35.0d0              ! nondimensional&amp;lt;br /&amp;gt;       [[Variables#Tcoef|TCOEF]] == 1.7d-4              ! 1/Celsius&amp;lt;br /&amp;gt;       [[Variables#Scoef|SCOEF]] == 7.6d-4              ! 1/nondimensional&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Slipperiness parameter: 1.0 (free slip) or -1.0 (no slip).&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#gamma2|GAMMA2]] =  1.0d0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate horizontal momentum transport point Sources/Sinks (like river runoff) and mass point Sources/Sinks (like volume vertical influx): [1:[[Ngrids]]] values are expected. These switches replace obsolete CPP options [[Options#UV_PSOURCE|UV_PSOURCE]] and [[Options#Q_PSOURCE|Q_PSOURCE]], respectively. In nesting, a particular grid may or may not have Sources/Sinks forcing.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#LuvSrc|LuvSrc]] == F                   ! horizontal momentum transport&amp;lt;br /&amp;gt;       [[Variables#LwSrc|LwSrc]] == F                   ! volume vertical influx&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate tracers point Sources/Sinks (like river runoff) and to specify which tracer variables to consider: [1:[[NAT]]+[[NPT]],[[Ngrids]]] values are expected.  Other biological and sediment tracer switches are activated in their respective input scripts. This switch replaces obsolete CPP option [[Options#TS_PSOURCE|TS_PSOURCE]]. In nesting, a particular grid may or may not have tracers Sources/Sinks forcing.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[LtracerSrc]] == F F                 ! temperature, salinity, inert&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to read and process climatology fields.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#LsshCLM|LsshCLM]] == F                   ! sea-surface height&amp;lt;br/&amp;gt;      [[Variables#Lm2CLM|Lm2CLM]] == F                   ! 2D momentum&amp;lt;br/&amp;gt;      [[Variables#Lm3CLM|Lm3CLM]] == F                   ! 3D momentum&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#LtracerCLM|LtracerCLM]] == F F                 ! temperature, salinity, inert&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to nudge the desired climatology field(s). If not analytical climatology fields, users need to turn ON the logical switches above to process the fields from the climatology NetCDF file that are needed for nudging.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt; [[Variables#LnudgeM2CLM|LnudgeM2CLM]] == F                   ! 2D momentum&amp;lt;br /&amp;gt; [[Variables#LnudgeM3CLM|LnudgeM3CLM]] == F                   ! 3D momentum&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#LnudgeTCLM|LnudgeTCLM]] == F F                 ! temperature, salinity, inert&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Vertical Coordinates Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Set vertical, terrain-following coordinates transformation equation and stretching function (see [[Vertical S-coordinate]] for more details).&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#Vtransform|Vtransform]] == 2                          ! transformation equation&amp;lt;br /&amp;gt; [[Variables#Vstretching|Vstretching]] == 4                          ! stretching function&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* S-coordinate surface control parameter, [1:[[Ngrids]]] values are expected. The range of optimal values depends on the vertical stretching function.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#theta_s|THETA_S]] == 3.0d0                      ! surface stretching parameter&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* S-coordinate bottom control parameter, [1:[[Ngrids]]] values are expected. The range of optimal values depends on the vertical stretching function.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#theta_b|THETA_B]] == 0.0d0                      ! bottom  stretching parameter&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Critical depth (hc) in meters (positive) controlling the stretching. It can be interpreted as the width of surface or bottom boundary layer in which higher vertical resolution (levels) is required during stretching.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#tcline|TCLINE]] == 25.0d0                     ! critical depth (m)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adjoint Sensitivity Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Starting ([[Variables#DstrS|DstrS]]) and ending ([[Variables#DendS|DendS]]) day for adjoint sensitivity forcing. [[Variables#DstrS|DstrS]] must be less or equal to [[Variables#DendS|DendS]]. If both values are zero, their values are reset internally to the full range of the adjoint integration.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#DstrS|DstrS]] == 0.0d0                      ! starting day&amp;lt;br /&amp;gt;       [[Variables#DendS|DendS]] == 0.0d0                      ! ending day&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Starting and ending vertical levels of the 3D adjoint state variables whose sensitivity is required.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#KstrS|KstrS]] == 1                          ! starting level&amp;lt;br /&amp;gt;       [[Variables#KendS|KendS]] == 1                          ! ending level&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to specify the adjoint state variables whose sensitivity is required.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Lstate|Lstate(isFsur)]] == F                        ! free-surface&amp;lt;br /&amp;gt;[[Variables#Lstate|Lstate(isUbar)]] == F                        ! 2D U-momentum&amp;lt;br /&amp;gt;[[Variables#Lstate|Lstate(isVbar)]] == F                        ! 2D V-momentum&amp;lt;br /&amp;gt;[[Variables#Lstate|Lstate(isUvel)]] == F                        ! 3D U-momentum&amp;lt;br /&amp;gt;[[Variables#Lstate|Lstate(isVvel)]] == F                        ! 3D V-momentum&amp;lt;br /&amp;gt;[[Variables#Lstate|Lstate(isWvel)]] == F                        ! 3D W-momentum&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to specify the adjoint state tracer variables whose sensitivity is required, [1:[[NT]],1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Lstate|Lstate(isTvar)]] == F F                      ! NT tracers&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Stochastic Optimals Parameters ==&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to specify the state variables required by Forcing Singular Vectors or Stochastic Optimals.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Fstate|Fstate(isFsur)]] == F                        ! free-surface&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isUbar)]] == F                        ! 2D U-momentum&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isVbar)]] == F                        ! 2D V-momentum&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isUvel)]] == F                        ! 3D U-momentum&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isVvel)]] == F                        ! 3D V-momentum&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isTvar)]] == F F                      ! NT tracers&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isUstr)]] == F                        ! surface U-stress&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isVstr)]] == F                        ! surface V-stress&amp;lt;br /&amp;gt;[[Variables#Fstate|Fstate(isTsur)]] == F F                      ! NT surface tracers flux&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Stochastic optimals time decorrelation scale (days) assumed for red noise processes.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#SO_decay|SO_decay]] == 2.0d0                   ! days&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Stochastic Optimals surface forcing standard deviation for dimensionalization.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#SO_sdev|SO_sdev(isFsur)]] == 1.0d0                   ! free-surface&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isUbar)]] == 1.0d0                   ! 2D U-momentum&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isVbar)]] == 1.0d0                   ! 2D V-momentum&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isUvel)]] == 1.0d0                   ! 3D U-momentum&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isVvel)]] == 1.0d0                   ! 3D V-momentum&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isTvar)]] == 1.0d0 1.0d0             ! NT tracers&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#SOstate|SOstate(isUstr)]] == 1.0d0                   ! surface u-stress&amp;lt;br /&amp;gt;[[Variables#SOstate|SOstate(isVstr)]] == 1.0d0                   ! surface v-stress&amp;lt;br /&amp;gt;[[Variables#SO_sdev|SO_sdev(isTsur)]] == 1.0d0 1.0d0             ! NT surface tracer flux&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== History Output Variables Switches ==&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of fields into history output file.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Hout|Hout(idUvel)]] == T       ! u                  3D U-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVvel)]] == T       ! v                  3D V-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idu3dE)]] == F       ! u_eastward         3D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idv3dN)]] == F       ! v_northward        3D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWvel)]] == T       ! w                  3D W-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idOvel)]] == T       ! omega              omega vertical velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbar)]] == T       ! ubar               2D U-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbar)]] == T       ! vbar               2D V-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idu2dE)]] == F       ! ubar_eastward      2D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idv2dN)]] == F       ! vbar_northward     2D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idFsur)]] == T       ! zeta               free-surface&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idBath)]] == T       ! bath               time-dependent bathymetry&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idTvar)]] == T T     ! temp, salt         temperature and salinity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idpthR)]] == F       ! z_rho              time-varying depths of RHO-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idpthU)]] == F       ! z_u                time-varying depths of U-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idpthV)]] == F       ! z_v                time-varying depths of V-points&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idpthW)]] == F       ! z_w                time-varying depths of W-points&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUsms)]] == F       ! sustr              surface U-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVsms)]] == F       ! svstr              surface V-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbms)]] == F       ! bustr              bottom U-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbms)]] == F       ! bvstr              bottom V-stress&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbrs)]] == F       ! bustrc             bottom U-current stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbrs)]] == F       ! bvstrc             bottom V-current stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbws)]] == F       ! bustrw             bottom U-wave stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbws)]] == F       ! bvstrw             bottom V-wave stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbcs)]] == F       ! bustrcwmax         bottom max wave-current U-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbcs)]] == F       ! bvstrcwmax         bottom max wave-current V-stress&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbot)]] == F       ! Ubot               bed wave orbital U-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbot)]] == F       ! Vbot               bed wave orbital V-velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUbur)]] == F       ! Ur                 bottom U-velocity above bed&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVbvr)]] == F       ! Vr                 bottom V-velocity above bed&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW2xx)]] == F       ! Sxx_bar            2D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW2xy)]] == F       ! Sxy_bar            2D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW2yy)]] == F       ! Syy_bar            2D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idU2rs)]] == F       ! Ubar_Rstress       2D radiation U-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idV2rs)]] == F       ! Vbar_Rstress       2D radiation V-stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idU2Sd)]] == F       ! ubar_stokes        2D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idV2Sd)]] == F       ! vbar_stokes        2D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW3xx)]] == F       ! Sxx                3D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW3xy)]] == F       ! Sxy                3D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW3yy)]] == F       ! Syy                3D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW3zx)]] == F       ! Szx                3D radiation stress, Szx component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idW3zy)]] == F       ! Szy                3D radiation stress, Szy component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idU3rs)]] == F       ! u_Rstress          3D U-radiation stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idV3rs)]] == F       ! v_Rstress          3D V-radiation stress&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idU3Sd)]] == F       ! u_stokes           3D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idV3Sd)]] == F       ! v_stokes           3D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWamp)]] == F       ! Hwave              wave height&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWlen)]] == F       ! Lwave              wave length&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWdir)]] == F       ! Dwave              wave direction&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWptp)]] == F       ! Pwave_top          wave surface period&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWpbt)]] == F       ! Pwave_bot          wave bottom period&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWorb)]] == F       ! Ub_swan            wave bottom orbital velocity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idWdis)]] == F       ! Wave_dissip        wave dissipation&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idPair)]] == F       ! Pair               surface air pressure&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idUair)]] == F       ! Uair               surface U-wind component&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVair)]] == F       ! Vair               surface V-wind component&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idTsur)]] == F F     ! shflux, ssflux     surface net heat and salt flux&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idLhea)]] == F       ! latent             latent heat flux&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idShea)]] == F       ! sensible           sensible heat flux&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idLrad)]] == F       ! lwrad              longwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idSrad)]] == F       ! swrad              shortwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idEmPf)]] == F       ! EminusP            E-P flux &amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idevap)]] == F       ! evaporation        evaporation rate&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idrain)]] == F       ! rain               precipitation rate&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idDano)]] == F       ! rho                density anomaly&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idVvis)]] == F       ! AKv                vertical viscosity&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idTdif)]] == F       ! AKt                vertical T-diffusion&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idSdif)]] == F       ! AKs                vertical Salinity diffusion&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idHsbl)]] == F       ! Hsbl               depth of surface boundary layer&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idHbbl)]] == F       ! Hbbl               depth of bottom boundary layer&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idMtke)]] == F       ! tke                turbulent kinetic energy&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idMtls)]] == F       ! gls                turbulent length scale&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of extra inert passive tracers other than biological and sediment tracers. An inert passive tracer is one that it is only advected and diffused. Other processes are ignored. These tracers include, for example, dyes, pollutants, oil spills, etc. [1:[[NPT]]] values are expected. However, these switches can be activated using compact parameter specification.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Hout|Hout(inert)]] == T       ! dye_01, ...        inert passive tracers&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of exposed sediment layer properties into HISTORY output file.  Currently, [[Variables#MBOTP|MBOTP]] properties are expected for the bottom boundary layer and/or sediment models.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;! [[Variables#Hout|idBott]]( 1=isd50)   grain_diameter          mean grain diameter&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 2=idens)   grain_density           mean grain density&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 3=iwsed)   settling_vel            mean settling velocity&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 4=itauc)   erosion_stress          critical erosion stress&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 5=irlen)   ripple_length           ripple length&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 6=irhgt)   ripple_height           ripple height&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 7=ibwav)   bed_wave_amp            wave excursion amplitude&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 8=izdef)   Zo_def                  default bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]]( 9=izapp)   Zo_app                  apparent bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](10=izNik)   Zo_Nik                  Nikuradse bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](11=izbio)   Zo_bio                  biological bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](12=izbfm)   Zo_bedform              bed form bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](13=izbld)   Zo_bedload              bed load bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](14=izwbl)   Zo_wbl                  wave bottom roughness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](15=iactv)   active_layer_thickness  active layer thickness&amp;lt;br /&amp;gt;! [[Variables#Hout|idBott]](16=ishgt)   saltation               saltation height&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!                                 1 1 1 1 1 1 1&amp;lt;br /&amp;gt;!               1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Hout|Hout(idBott)]] == T T T T T T T T T F F F F F F F&amp;lt;/div&amp;gt;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Quicksave Output Variables Switches ==&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of fields into quicksave output file.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Qout|Qout(idUvel)]] == F       ! u                  3D U-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVvel)]] == F       ! v                  3D V-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idu3dE)]] == F       ! u_eastward         3D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idv3dN)]] == F       ! v_northward        3D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWvel)]] == F       ! w                  3D W-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idOvel)]] == F       ! omega              omega vertical velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbar)]] == T       ! ubar               2D U-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbar)]] == T       ! vbar               2D V-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idu2dE)]] == T       ! ubar_eastward      2D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idv2dN)]] == T       ! vbar_northward     2D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idFsur)]] == T       ! zeta               free-surface&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idBath)]] == T       ! bath               time-dependent bathymetry&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idTvar)]] == F F     ! temp, salt         temperature and salinity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUsur)]] == T       ! u_sur              surface U-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVsur)]] == T       ! v_sur              surface V-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUsuE)]] == T       ! u_sur_eastward     surface U-eastward  velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVsuN)]] == T       ! v_sur_northward    surface V-northward velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idsurT)]] == T T     ! temp_sur, salt_sur surface temperature and salinity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idpthR)]] == F       ! z_rho              time-varying depths of RHO-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idpthU)]] == F       ! z_u                time-varying depths of U-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idpthV)]] == F       ! z_v                time-varying depths of V-points&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idpthW)]] == F       ! z_w                time-varying depths of W-points&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUsms)]] == F       ! sustr              surface U-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVsms)]] == F       ! svstr              surface V-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbms)]] == F       ! bustr              bottom U-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbms)]] == F       ! bvstr              bottom V-stress&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbrs)]] == F       ! bustrc             bottom U-current stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbrs)]] == F       ! bvstrc             bottom V-current stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbws)]] == F       ! bustrw             bottom U-wave stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbws)]] == F       ! bvstrw             bottom V-wave stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbcs)]] == F       ! bustrcwmax         bottom max wave-current U-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbcs)]] == F       ! bvstrcwmax         bottom max wave-current V-stress&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbot)]] == F       ! Ubot               bed wave orbital U-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbot)]] == F       ! Vbot               bed wave orbital V-velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUbur)]] == F       ! Ur                 bottom U-velocity above bed&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVbvr)]] == F       ! Vr                 bottom V-velocity above bed&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW2xx)]] == F       ! Sxx_bar            2D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW2xy)]] == F       ! Sxy_bar            2D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW2yy)]] == F       ! Syy_bar            2D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idU2rs)]] == F       ! Ubar_Rstress       2D radiation U-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idV2rs)]] == F       ! Vbar_Rstress       2D radiation V-stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idU2Sd)]] == F       ! ubar_stokes        2D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idV2Sd)]] == F       ! vbar_stokes        2D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW3xx)]] == F       ! Sxx                3D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW3xy)]] == F       ! Sxy                3D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW3yy)]] == F       ! Syy                3D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW3zx)]] == F       ! Szx                3D radiation stress, Szx component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idW3zy)]] == F       ! Szy                3D radiation stress, Szy component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idU3rs)]] == F       ! u_Rstress          3D U-radiation stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idV3rs)]] == F       ! v_Rstress          3D V-radiation stress&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idU3Sd)]] == F       ! u_stokes           3D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idV3Sd)]] == F       ! v_stokes           3D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWamp)]] == F       ! Hwave              wave height&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWlen)]] == F       ! Lwave              wave length&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWdir)]] == F       ! Dwave              wave direction&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWptp)]] == F       ! Pwave_top          wave surface period&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWpbt)]] == F       ! Pwave_bot          wave bottom period&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWorb)]] == F       ! Ub_swan            wave bottom orbital velocity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idWdis)]] == F       ! Wave_dissip        wave dissipation&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idPair)]] == F       ! Pair               surface air pressure&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idUair)]] == F       ! Uair               surface U-wind component&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVair)]] == F       ! Vair               surface V-wind component&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idTsur)]] == F F     ! shflux, ssflux     surface net heat and salt flux&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idLhea)]] == F       ! latent             latent heat flux&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idShea)]] == F       ! sensible           sensible heat flux&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idLrad)]] == F       ! lwrad              longwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idSrad)]] == F       ! swrad              shortwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idEmPf)]] == F       ! EminusP            E-P flux &amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idevap)]] == F       ! evaporation        evaporation rate&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idrain)]] == F       ! rain               precipitation rate&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idDano)]] == F       ! rho                density anomaly&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idVvis)]] == F       ! AKv                vertical viscosity&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idTdif)]] == F       ! AKt                vertical T-diffusion&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idSdif)]] == F       ! AKs                vertical Salinity diffusion&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idHsbl)]] == F       ! Hsbl               depth of surface boundary layer&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idHbbl)]] == F       ! Hbbl               depth of bottom boundary layer&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idMtke)]] == F       ! tke                turbulent kinetic energy&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(idMtls)]] == F       ! gls                turbulent length scale&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of extra inert passive tracers other than biological and sediment tracers into the quicksave output file. An inert passive tracer is one that it is only advected and diffused. Other processes are ignored. These tracers include, for example, dyes, pollutants, oil spills, etc. [1:[[NPT]]] values are expected. However, these switches can be activated using compact parameter specification.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Qout|Qout(inert)]] == F       ! dye_01, ...        inert passive tracers&amp;lt;br /&amp;gt;[[Variables#Qout|Qout(Snert)]] == F       ! dye_01, ...        surface inert passive tracers&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Time-averaged Output Variables Switches ==&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of fields into time-averaged output file.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Aout|Aout(idUvel)]] == T       ! u                  3D U-velocityy&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVvel)]] == T       ! v                  3D V-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idu3dE)]] == F       ! u_eastward         3D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idv3dN)]] == F       ! v_northward        3D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idWvel)]] == T       ! w                  3D W-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idOvel)]] == T       ! omega              omega vertical velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUbar)]] == T       ! ubar               2D U-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVbar)]] == T       ! vbar               2D V-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idu2dE)]] == F       ! ubar_eastward      2D U-eastward  at RHO-points&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idv2dN)]] == F       ! vbar_northward     2D V-northward at RHO-points&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idFsur)]] == T       ! zeta               free-surface&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idTvar)]] == T T     ! temp, salt         temperature and salinity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUsms)]] == F       ! sustr              surface U-stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVsms)]] == F       ! svstr              surface V-stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUbms)]] == F       ! bustr              bottom U-stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVbms)]] == F       ! bvstr              bottom V-stress&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW2xx)]] == F       ! Sxx_bar            2D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW2xy)]] == F       ! Sxy_bar            2D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW2yy)]] == F       ! Syy_bar            2D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idU2rs)]] == F       ! Ubar_Rstress       2D radiation U-stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idV2rs)]] == F       ! Vbar_Rstress       2D radiation V-stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idU2Sd)]] == F       ! ubar_stokes        2D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idV2Sd)]] == F       ! vbar_stokes        2D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW3xx)]] == F       ! Sxx                3D radiation stress, Sxx component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW3xy)]] == F       ! Sxy                3D radiation stress, Sxy component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW3yy)]] == F       ! Syy                3D radiation stress, Syy component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW3zx)]] == F       ! Szx                3D radiation stress, Szx component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idW3zy)]] == F       ! Szy                3D radiation stress, Szy component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idU3rs)]] == F       ! u_Rstress          3D U-radiation stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idV3rs)]] == F       ! v_Rstress          3D V-radiation stress&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idU3Sd)]] == F       ! u_stokes           3D U-Stokes velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idV3Sd)]] == F       ! v_stokes           3D V-Stokes velocity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idPair)]] == F       ! Pair               surface air pressure&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUair)]] == F       ! Uair               surface U-wind component&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVair)]] == F       ! Vair               surface V-wind component&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idTsur)]] == F F     ! shflux, ssflux     surface net heat and salt flux&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idLhea)]] == F       ! latent             latent heat flux&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idShea)]] == F       ! sensible           sensible heat flux&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idLrad)]] == F       ! lwrad              longwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idSrad)]] == F       ! swrad              shortwave radiation flux&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idevap)]] == F       ! evaporation        evaporation rate&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idrain)]] == F       ! rain               precipitation rate&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idDano)]] == F       ! rho                density anomaly&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVvis)]] == F       ! AKv                vertical viscosity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idTdif)]] == F       ! AKt                vertical T-diffusion&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idSdif)]] == F       ! AKs                vertical Salinity diffusion&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idHsbl)]] == F       ! Hsbl               depth of surface boundary layer&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idHbbl)]] == F       ! Hbbl               depth of bottom boundary layer&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(id2dRV)]] == F       ! pvorticity_bar     2D relative vorticity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(id3dRV)]] == F       ! pvorticity         3D relative vorticity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(id2dPV)]] == F       ! rvorticity_bar     2D potential vorticity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(id3dPV)]] == F       ! rvorticity         3D potential vorticity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idu3dD)]] == F       ! u_detided          detided 3D U-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idv3dD)]] == F       ! v_detided          detided 3D V-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idu2dD)]] == F       ! ubar_detided       detided 2D U-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idu3dD)]] == F       ! vbar_detided       detided 2D V-velocity&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idFsuD)]] == F       ! zeta_detided       detided free-surface&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idTrcD)]] == F F     ! temp_detided, ...  detided temperature and salinity&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idHUav)]] == F       ! Huon               u-volume flux, Huon&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idHVav)]] == F       ! Hvom               v-volume flux, Hvom&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUUav)]] == F       ! uu                 quadratic &amp;amp;lt;u*u&amp;amp;gt; term&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUVav)]] == F       ! uv                 quadratic &amp;amp;lt;u*v&amp;amp;gt; term&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVVav)]] == F       ! vv                 quadratic &amp;amp;lt;v*v&amp;amp;gt; term&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idU2av)]] == F       ! ubar2              quadratic &amp;amp;lt;ubar*ubar&amp;amp;gt; term&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idV2av)]] == F       ! vbar2              quadratic &amp;amp;lt;vbar*vbar&amp;amp;gt; term&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idZZav)]] == F       ! zeta2              quadratic &amp;amp;lt;zeta*zeta&amp;amp;gt; term&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idTTav)]] == F F     ! temp2, ...         quadratic &amp;amp;lt;t*t&amp;amp;gt; tracer terms&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idUTav)]] == F F     ! utemp, ...         quadratic &amp;amp;lt;u*t&amp;amp;gt; tracer terms&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(idVTav)]] == F F     ! vtemp, ...         quadratic &amp;amp;lt;v*t&amp;amp;gt; tracer terms&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(iHUTav)]] == F F     ! Huontemp, ...      tracer volume flux, &amp;amp;lt;Huon*t&amp;amp;gt;&amp;lt;br /&amp;gt;[[Variables#Aout|Aout(iHVTav)]] == F F     ! Hvomtemp, ...      tracer volume flux, &amp;amp;lt;Hvom*t&amp;amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of extra inert passive tracers other than biological and sediment tracers into the time-averaged output file. An inert passive tracer is one that it is only advected and diffused. Other processes are ignored. These tracers include, for example, dyes, pollutants, oil spills, etc. [1:[[NPT]],1:[[Ngrids]]] values are expected. However, these switches can be activated using compact parameter specification.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Aout|Aout(inert)]] == T       ! dye_01, ...        inert passive tracers&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Time-averaged Diagnostic Output Variables Switches ==&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing time-averaged. 2D momentum (ubar, vbar) diagnostic terms into the diagnostics output file.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Dout|Dout(M2rate)]] == T       ! ubar_accel, ...    acceleration&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2pgrd)]] == T       ! ubar_prsgrd, ...   pressure gradient&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2fcor)]] == T       ! ubar_cor, ...      Coriolis force&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2hadv)]] == T       ! ubar_hadv, ...     horizontal total advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2xadv)]] == T       ! ubar_xadv, ...     horizontal XI-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2yadv)]] == T       ! ubar_yadv, ...     horizontal ETA-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2hrad)]] == T       ! ubar_hrad, ...     horizontal total radiation stress&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2hvis)]] == T       ! ubar_hvisc, ...    horizontal total viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2xvis)]] == T       ! ubar_xvisc, ...    horizontal XI-viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2yvis)]] == T       ! ubar_yvisc, ...    horizontal ETA-viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2sstr)]] == T       ! ubar_sstr, ...     surface stress&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M2bstr)]] == T       ! ubar_bstr, ...     bottom stress&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of time-averaged, 3D momentum (u,v) diagnostic terms into the diagnostics output file.                               &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Dout|Dout(M3rate)]] == T       ! u_accel, ...       acceleration&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3pgrd)]] == T       ! u_prsgrd, ...      pressure gradient&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3fcor)]] == T       ! u_cor, ...         Coriolis force&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3hadv)]] == T       ! u_hadv, ...        horizontal total advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3xadv)]] == T       ! u_xadv, ...        horizontal XI-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3yadv)]] == T       ! u_yadv, ...        horizontal ETA-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3vadv)]] == T       ! u_vadv, ...        vertical advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3hrad)]] == T       ! u_hrad, ...        horizontal total radiation stress&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3vrad)]] == T       ! u_vrad, ...        vertical radiation stress&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3hvis)]] == T       ! u_hvisc, ...       horizontal total viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3xvis)]] == T       ! u_xvisc, ...       horizontal XI-viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3yvis)]] == T       ! u_yvisc, ...       horizontal ETA-viscosity&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(M3vvis)]] == T       ! u_vvisc, ...       vertical viscosity&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Logical switches (&#039;&#039;&#039;TRUE&#039;&#039;&#039;/&#039;&#039;&#039;FALSE&#039;&#039;&#039;) to activate writing of time-averaged, active (temperature and salinity) and passive (inert) tracer diagnostic terms into the diagnostics output file. [1:[[NAT]]+[[NPT]],1:[[Ngrids]]] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[[Variables#Dout|Dout(iTrate)]] == T T     ! temp_rate, ...     time rate of change&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iThadv)]] == T T     ! temp_hadv, ...     horizontal total advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTxadv)]] == T T     ! temp_xadv, ...     horizontal XI-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTyadv)]] == T T     ! temp_yadv, ...     horizontal ETA-advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTvadv)]] == T T     ! temp_vadv, ...     vertical advection&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iThdif)]] == T T     ! temp_hdiff, ...    horizontal total diffusion&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTxdif)]] == T T     ! temp_xdiff, ...    horizontal XI-diffusion&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTydif)]] == T T     ! temp_ydiff, ...    horizontal ETA-diffusion&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTsdif)]] == T T     ! temp_sdiff, ...    horizontal S-diffusion&amp;lt;br /&amp;gt;[[Variables#Dout|Dout(iTvdif)]] == T T     ! temp_vdiff, ...    vertical diffusion&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Generic User Parameters ==&lt;br /&gt;
&amp;lt;section begin=user /&amp;gt;&lt;br /&gt;
* [[Variables#Nuser|NUSER]] is the number (integer) of user parameters to consider. [[Variables#user|USER]] is a vector containing [[Variables#Nuser|NUSER]] user parameters (real array).&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#Nuser|NUSER]] =  0&amp;lt;br /&amp;gt;        [[Variables#user|USER]] =  0.d0&amp;lt;/div&amp;gt;This array is primarily used with the [[Options#SANITY_CHECK|SANITY_CHECK]] to test the correctness of the tangent linear adjoint models. It contains the model variable and grid point to perturb:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!                INT([[Variables#user|user]](1)):  tangent state variable to perturb&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](2)):  adjoint state variable to perturb&amp;lt;br&amp;gt;!                               [ [[Variables#isFsur|isFsur]] = 1 ]  free-surface&amp;lt;br&amp;gt;!                               [ [[Variables#isUbar|isUbar]] = 2 ]  2D U-momentum&amp;lt;br&amp;gt;!                               [ [[Variables#isVbar|isVbar]] = 3 ]  2D V-momentum&amp;lt;br&amp;gt;!                               [ [[Variables#isUvel|isUvel]] = 4 ]  3D U-momentum&amp;lt;br&amp;gt;!                               [ [[Variables#isVvel|isVvel]] = 5 ]  3D V-momentum&amp;lt;br&amp;gt;!                               [ [[Variables#isTvar|isTvar]] = 6 ]  First tracer (temperature)&amp;lt;br&amp;gt;!                               [   ...      ]  ...&amp;lt;br&amp;gt;!                               [ [[Variables#isTvar|isTvar]] = ? ]  Last tracer&amp;lt;br&amp;gt;!          &amp;lt;br&amp;gt;!                INT([[Variables#user|user]](3)):  I-index of tangent variable to perturb&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](4)):  I-index of adjoint variable to perturb&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](5)):  J-index of tangent variable to perturb&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](6)):  J-index of adjoint variable to perturb&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](7)):  K-index of tangent variable to perturb, if 3D&amp;lt;br&amp;gt;!                INT([[Variables#user|user]](8)):  K-index of adjoint variable to perturb, if 3D&amp;lt;/div&amp;gt;Set tangent and adjoint parameters to the same values if perturbing and reporting the same variable.&lt;br /&gt;
&lt;br /&gt;
* This parameter could also be used to adjust constants in analytical functions at run time. &lt;br /&gt;
&amp;lt;section end=user /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Parallel I/O (PIO) Parameters==&lt;br /&gt;
&amp;lt;section begin=PIO /&amp;gt;&lt;br /&gt;
* Choose the input and output NetCDF library to use. For example, the user could choose to use the PIO library for writing but still use the standard library for reading. &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;To use this Parallel I/O strategy, the &#039;&#039;&#039;PIO&#039;&#039;&#039; library must be linked to ROMS at compile time and the [[PIO_LIB]] CPP option needs to be activated. It is only available in distributed-memory applications since it uses MPI-IO.&amp;lt;/span&amp;gt; &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!   [1] Standard NetCDF-3 or NetCDF-4 library&amp;lt;br /&amp;gt;!   [2] Parallel-IO from the PIO library (MPI, MPI-IO applications)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#INP_LIB|INP_LIB]] =  2&amp;lt;br /&amp;gt;     [[Variables#OUT_LIB|OUT_LIB]] =  2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* PIO offers several methods for reading/writing NetCDF files. Depending on the build of the PIO libraries, not all the I/O types are available. If the NetCDF library does not support parallel I/O, methods 3 and 4 are not available. Currently, NetCDF4/HDF5 data compression is possible with method 3 during serial write.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!   [0] parallel read and parallel write of PnetCDF (CDF-5 type files, not recommended because of post-processing)&amp;lt;br /&amp;gt;!   [1] parallel read and parallel write of NetCDF3 (64-bit offset)&amp;lt;br /&amp;gt;!   [2] serial   read and serial   write of NetCDF3 (64-bit offset)&amp;lt;br /&amp;gt;!   [3] parallel read and serial   write of NetCDF4/HDF5&amp;lt;br /&amp;gt;!   [4] parallel read and parallel write of NETCDF4/HDF5&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#PIO_METHOD|PIO_METHOD]] =  2&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO tasks control parameters. Typically, it is advantageous and highly recommended to define the I/O decomposition in smaller number of processes for efficiency and to avoid MPI communications bottlenecks.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt; [[Variables#PIO_IOTASKS|PIO_IOTASKS]] =  1                 ! number of I/O processes to define&amp;lt;br /&amp;gt;  [[Variables#PIO_STRIDE|PIO_STRIDE]] =  1                 ! stride in the MPI-rank between I/O processes&amp;lt;br /&amp;gt;    [[Variables#PIO_BASE|PIO_BASE]] =  0                 ! offset for the first I/O process&amp;lt;br /&amp;gt;  [[Variables#PIO_AGGREG|PIO_AGGREG]] =  1                 ! number of MPI-aggregators to use&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO rearranger methods for moving data between computational and I/O processes. It provides the ability to rearrange data between computational and parallel I/O decompositions. Usually the Box rearrangement is more efficient.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!   [1] Box rearrangement&amp;lt;br /&amp;gt;!   [2] Subset rearrangement&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [[Variables#PIO_REARR|PIO_REARR]] =  1&amp;lt;/div&amp;gt;&lt;br /&gt;
**In the &#039;&#039;&#039;box&#039;&#039;&#039; method, data is rearranged from computational to I/O processes in a continuous manner to the data ordering in the file. Since the ordering of data between computational and I/O partitions may be different, the rearrangement will require all-to-all MPI communications. Also, notice that each computing tile may transfer data to one or more I/O processes.&lt;br /&gt;
**In the &#039;&#039;&#039;subset&#039;&#039;&#039; method, each I/O process is associated with a subset of computing processes. The computing tile sends its data to a unique I/O process. The data on I/O processes may be more fragmented to the ordering on disk, which may increase the communications to the storage medium. However, the rearrangement scales better since all-to-all MPI communications are not required.&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO rearranger flag for MPI communication between computational and I/O processes. In some systems, the Point-to-Point communications is more efficient. &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!   [0] Point-to-Point communications&amp;lt;br /&amp;gt;!   [1] Collective communications&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#PIO_REARRCOM|PIO_REARRCOM]] =  0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO rearranger flow-control direction flag for MPI communications between computational and I/O processes. The flow algorithm controls the rate and volume of messages sent to any destination MPI process. Optimally, the MPI communications should be designed to send a modest number of messages evenly distributed across a number of processes. An excessive number of messages to a single MPI process can exhaust the buffer space which can affect efficiency or failure due to the slowdown in the retransmitting of dropped messages. It only sends messages (Isend) when the receiver is ready and has sufficient resources.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;!   [0] Enable computational to I/O processes, and vice versa&amp;lt;br /&amp;gt;!   [1] Enable computational to I/O processes only&amp;lt;br /&amp;gt;!   [2] Enable I/O to computational processes only&amp;lt;br /&amp;gt;!   [3] Disable flow control&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[[Variables#PIO_REARRDIR|PIO_REARRDIR]] =  0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO rearranger options for MPI communications from computational to I/O processes (C2I). &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#PIO_C2I_HS|PIO_C2I_HS]] =  T                 ! Enable C2I handshake (T/F)&amp;lt;br /&amp;gt;[[Variables#PIO_C2I_Send|PIO_C2I_Send]] =  F                 ! Enable C2I Isends (T/F)&amp;lt;br /&amp;gt;  [[Variables#PIO_I2C_HS|PIO_I2C_HS]] =  64                ! Maximum pending C2I requests&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Parallel-IO rearranger options for MPI communications from I/O to computational processes (I2C). &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#PIO_I2C_HS|PIO_I2C_HS]] =  F                 ! Enable I2C handshake (T/F)&amp;lt;br /&amp;gt;[[Variables#PIO_I2C_Send|PIO_I2C_Send]] =  T                 ! Enable I2C Isends (T/F)&amp;lt;br /&amp;gt;[[Variables#PIO_I2C_Preq|PIO_I2C_Preq]] =  65                ! Maximum pending I2C requests&amp;lt;/div&amp;gt;&amp;lt;section end=PIO /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NetCDF-4/HDF5 Compression Parameters==&lt;br /&gt;
&lt;br /&gt;
* NetCDF-4/HDF5 compression parameters for output files. This capability is used when both [[Options#HDF5|HDF5]] and [[Options#DEFLATE|DEFLATE]] C-preprocessing options are activated. The user needs to compile with the NetCDF-4/HDF5 and MPI libraries. File deflation cannot be used in parallel I/O for writing libraries. File deflation cannot be used in parallel I/O for writing to exactly map the data to the disk location.  For more information, check [http://www.unidata.ucar.edu/software/netcdf NetCDF official website].&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;  [[Variables#shuffle|NC_SHUFFLE]] =  1                 ! if non-zero, turn on shuffle filter&amp;lt;br&amp;gt;  [[Variables#deflate|NC_DEFLATE]] =  1                 ! if non-zero, turn on deflate filter&amp;lt;br&amp;gt;   [[Variables#dlevel|NC_DLEVEL]] =  1                 ! deflate level [0-9]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Input NetCDF Files ==&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Starting with &#039;&#039;&#039;revision 460&#039;&#039;&#039; file names can be up to 256 characters long. Previously only 80 characters were allowed.&lt;br /&gt;
&lt;br /&gt;
* Input NetCDF file names, [1:Ngrids] values are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#GRD|GRDNAME]] == roms_grd.nc               ! Grid&amp;lt;br /&amp;gt;     [[Variables#INI|ININAME]] == roms_ini.nc               ! NLM initial conditions&amp;lt;br /&amp;gt;     [[Variables#ITL|ITLNAME]] == roms_itl.nc               ! TLM initial conditions&amp;lt;br /&amp;gt;     [[Variables#IRP|IRPNAME]] == roms_irp.nc               ! RPM initial conditions&amp;lt;br /&amp;gt;     [[Variables#IAD|IADNAME]] == roms_iad.nc               ! ADM initial conditions&amp;lt;br /&amp;gt;     [[Variables#FWD|FWDNAME]] == roms_fwd.nc               ! Forward trajectory&amp;lt;br /&amp;gt;     [[Variables#ADS|ADSNAME]] == roms_ads.nc               ! Adjoint sensitivity functionals&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input adjoint forcing NetCDF filenames for computing observations impacts during the analysis-forecast cycle. If the forecast error metric is defined in state-space, then [[Variables#FOIA|FOInameA]] and [[Variables#FOIB|FOInameB]] should be regular adjoint forcing files just like [[Variables#ADS|ADSNAME]]. If the forecast error metric is defined in observation space ([[Options#OBS_SPACE|OBS_SPACE]] is activated) then the forecast is initialized [[Variables#OIFA|OIFnameA]] and [[Variables#OIFB|OIFnameB]] (specified in [[s4dvar.in]] input script) will have the structure of a 4D-Var observation file.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#FOIA|FOInameA]] == roms_foi_a.nc&amp;lt;br /&amp;gt;   [[Variables#FOIB|FOInameB]] == roms_foi_b.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input NetCDF filenames for the forecasts initialized from the analysis of the current 4D-Var cycle ([[Variables#FCTA|FCTnameA]]) and initialized from the analysis of the previous 4D-Var cycle ([[Variables#FCTB|FCTnameB]]).&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;   [[Variables#FCTA|FCTnameA]] == roms_fct_a.nc&amp;lt;br /&amp;gt;   [[Variables#FCTB|FCTnameB]] == roms_fct_b.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Nesting grids connectivity data: contact points information. This NetCDF file is special and complex. It is currently generated using the script &#039;&#039;&#039;matlab/grid/contact.m&#039;&#039;&#039; from the Matlab repository.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#NGCname|NGCNAME]] =  roms_ngc.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input lateral boundary conditions and climatology file names.  The &#039;&#039;&#039;user&#039;&#039;&#039; has the option to split input data time records into several NetCDF files (see the [[Input_Parameter_Files#Important_Notes_on_File_Syntax|File Syntax Notes]]). If so, use a single line per entry with a vertical bar (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;) symbol after each entry, except the last one.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#BRY|BRYNAME]] == roms_bry.nc               ! Open boundary conditions&amp;lt;br /&amp;gt;     [[Variables#CLM|CLMNAME]] == roms_clm.nc               ! Climatology&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input climatology nudging coefficients file name.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#NUD|NUDNAME]] == roms_nud.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input Sources/Sinks forcing (like river runoff) file name. This file is separated from the regular forcing files to allow manipulations over nested grids. A particular nesting grid may or may not have Sources/Sinks forcing.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#SSF|SSFNAME]] == roms_rivers.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input tidal forcing file name.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#TIDE|TIDENAME]] == roms_tides.nc&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Input forcing NetCDF file name(s).  The &#039;&#039;&#039;user&#039;&#039;&#039; has the option to enter several files names for each nested grid.  For example, the &#039;&#039;&#039;user&#039;&#039;&#039; may have a different files for wind products, heat fluxes, tides, etc.  The model will scan the file list and will read the needed data from the first file in the list containing the forcing field. Therefore, the order of the file names is very important. If multiple forcing files per grid, enter first all the file names for grid 1, then grid 2, and so on. It is also possible to split input data time records into several NetCDF files (see the [[Input_Parameter_Files#Important_Notes_on_File_Syntax|File Syntax Notes]]). Use a single line per entry with a continuation ( &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;\&amp;lt;/span&amp;gt; ) or vertical bar ( &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt; ) symbol after each entry, except the last one.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#nFfiles|NFFILES]] == 1                          ! number of unique forcing files&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#FRC|FRCNAME]] == roms_frc.nc               ! forcing file 1, grid 1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Output NetCDF Files ==&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Starting with &#039;&#039;&#039;revision 460&#039;&#039;&#039; file names can be up to 256 characters long. Previously only 80 characters were allowed.&lt;br /&gt;
&lt;br /&gt;
* Output NetCDF file names, [1:[[Ngrids]]] files are expected.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#DAI|DAINAME]] == roms_dai.nc               ! Data assimilation next cycle initial conditions or restart file&amp;lt;br /&amp;gt;     [[Variables#GST|GSTNAME]] == roms_gst.nc               ! GST analysis restart&amp;lt;br /&amp;gt;     [[Variables#RST|RSTNAME]] == roms_rst.nc               ! Restart&amp;lt;br /&amp;gt;     [[Variables#HIS|HISNAME]] == roms_his.nc               ! History&amp;lt;br /&amp;gt;     [[Variables#QCK|QCKNAME]] == roms_qck.nc               ! Quicksave&amp;lt;br /&amp;gt;     [[Variables#TLM|TLMNAME]] == roms_tlm.nc               ! TLM history&amp;lt;br /&amp;gt;     [[Variables#TLF|TLFNAME]] == roms_tlf.nc               ! Impulse TLM forcing&amp;lt;br /&amp;gt;     [[Variables#ADM|ADJNAME]] == roms_adj.nc               ! ADM history&amp;lt;br /&amp;gt;     [[Variables#AVG|AVGNAME]] == roms_avg.nc               ! Averages&amp;lt;br /&amp;gt;     [[Variables#HAR|HARNAME]] == roms_har.nc               ! least-squares detiding harmonics&amp;lt;br /&amp;gt;     [[Variables#DIA|DIANAME]] == roms_dia.nc               ! Diagnostics&amp;lt;br /&amp;gt;     [[Variables#STA|STANAME]] == roms_sta.nc               ! Stations&amp;lt;br /&amp;gt;     [[Variables#FLT|FLTNAME]] == roms_flt.nc               ! Floats&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Additional Input Scripts ==&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;NOTE:&#039;&#039;&#039; Starting with &#039;&#039;&#039;revision 460&#039;&#039;&#039; file names can be up to 256 characters long. Previously only 80 characters were allowed.&lt;br /&gt;
&lt;br /&gt;
* Input ASCII parameter filenames.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#aparnam|APARNAM]] =  ROMS/External/[[s4dvar.in]]&amp;lt;br /&amp;gt;     [[Variables#sposnam|SPOSNAM]] =  ROMS/External/[[stations.in]]&amp;lt;br /&amp;gt;     [[Variables#fposnam|FPOSNAM]] =  ROMS/External/[[floats.in]]&amp;lt;br /&amp;gt;     [[Variables#bparnam|BPARNAM]] =  ROMS/External/[[biology.in]]&amp;lt;br /&amp;gt;     [[Variables#sparnam|SPARNAM]] =  ROMS/External/[[sediment.in]]&amp;lt;br /&amp;gt;     [[Variables#USRname|USRNAME]] =  ROMS/External/MyFile.dat&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6681</id>
		<title>External Libraries</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6681"/>
		<updated>2025-05-05T18:32:28Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;External Libraries&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the ROMS configuration, several third-party libraries are required for linking and compiling an application.&lt;br /&gt;
&lt;br /&gt;
==ARPACK (ARnoldi PACKage)==&lt;br /&gt;
Serial and parallel legacy libraries applied to solve large eigenvalue problems using either the Implicitly Restarted Arnoldi Method (&#039;&#039;&#039;IRAM&#039;&#039;&#039;) for sparse matrices or the Lanczos algorithm for symmetric matrices.  It includes a subset of the &#039;&#039;&#039;BLAS&#039;&#039;&#039; and &#039;&#039;&#039;LAPACK&#039;&#039;&#039; libraries. Some of its functions are used in 4D-Var and the adjoint-based stability analysis propagators.&lt;br /&gt;
&lt;br /&gt;
To obtain &#039;&#039;&#039;ARPACK&#039;&#039;&#039;, execute the following:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/myroms/roms_libs.git&amp;lt;br /&amp;gt;&amp;gt; cd roms_libs/ARPACK&amp;lt;/div&amp;gt;&lt;br /&gt;
To compile, customize &#039;&#039;&#039;ARmake.inc&#039;&#039;&#039; for the desired compiler and its flags for the serial (&#039;&#039;&#039;FC&#039;&#039;&#039; and &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;) and parallel (&#039;&#039;&#039;PFC&#039;&#039;&#039; and &#039;&#039;&#039;PFFLAGS&#039;&#039;&#039;) versions of the library. Once configured type:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make lib plib&amp;lt;/div&amp;gt; to build &#039;&#039;&#039;libarpack.a&#039;&#039;&#039; and &#039;&#039;&#039;libparpack.a&#039;&#039;&#039;. Once the libraries are built you can move them anywhere you like to make it easier to tell ROMS where to find them through environmental variables or with the &#039;&#039;&#039;[[my_build_paths]]&#039;&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; Prior to SVN revision 1080 (July 23, 2021), &#039;&#039;&#039;ARPACK&#039;&#039;&#039; was distributed in the ROMS &#039;&#039;&#039;Lib/ARPACK&#039;&#039;&#039; subdirectory. For more information about why this was changed see TRAC ticket [https://www.myroms.org/projects/src/ticket/891 #891]&lt;br /&gt;
&lt;br /&gt;
==ESMF (Earth System Modeling Framework)==&lt;br /&gt;
High-performance, open-source library for grid interpolation, remapping, and data exchange between coupled Earth System Model (&#039;&#039;&#039;ESM&#039;&#039;&#039;) components.  It includes the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; (National Unified Operation Prediction Capability) layer that provides templates and protocols for sequential and concurrent coupling between ESM components.  The &#039;&#039;&#039;NUOPC&#039;&#039;&#039; &#039;&#039;cap&#039;&#039; file is a Fortran module layer that sits on top of each &#039;&#039;&#039;ESM&#039;&#039;&#039; component that provides the protocols and methods to interact and share data in a coupled system.&lt;br /&gt;
&lt;br /&gt;
ROMS supports version 8.0 or higher since the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; layer includes the native CoupleSets for &#039;&#039;&#039;ESM&#039;&#039;&#039; applications with nested grids. Various types of connections are possible, like &#039;&#039;&#039;nest-to-nest&#039;&#039;&#039;, &#039;&#039;&#039;fine-to-coarse&#039;&#039;&#039;, or &#039;&#039;&#039;coarse-to-fine&#039;&#039;&#039;.  The user decides which nested grids to connect.&lt;br /&gt;
&lt;br /&gt;
*Download from github:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/esmf-org/esmf.git esmf&amp;lt;br /&amp;gt;&amp;gt; cd esmf&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/ESMF_8_1_0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure with environment variables:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; export ESMF_DIR=/projects/dmcs_1/src/esmf&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMM=mvapich2&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMPILER=intel&amp;lt;br /&amp;gt;&amp;gt; export ESMF_BOPT=O&amp;lt;br /&amp;gt;&amp;gt; export ESMF_OPTLEVEL=3&amp;lt;br /&amp;gt;&amp;gt; export ESMF_ABI=64&amp;lt;br /&amp;gt;&amp;gt; export ESMF_INSTALL_PREFIX=/ESMF/install/dir ESMF_NETCDF=&amp;quot;/path/to/netcdf/bin/nc-config&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBPATH=&amp;quot;/path/to/netcdf/lib /path/to/hdf5/lib&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_SHARED_LIB_BUILD=OFF&amp;lt;br /&amp;gt;&amp;gt; export ESMF_MPIRUN=/path/to/cluster/submission/script&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;ESMF_MPIRUN&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-np&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -np N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-np&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -np # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 10&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MCT (Model Coupling Toolkit)==&lt;br /&gt;
&lt;br /&gt;
Open-source library distributed as a set of Fortran-90 modules for constructing a coupled model system from Earth System Model (ESM) components ([http://www-unix.mcs.anl.gov/mct Larson et al., 2004]). Each component model has its own grid and runs on its own set of processors. The MCT library provides protocols for decomposition and allocation of model grids among different processors, efficient transfer of data fields between the different models, and interpolation algorithms for the data fields that are transferred.&lt;br /&gt;
&lt;br /&gt;
The MCT library is used to couple ROMS atmosphere models (like WRF) and wave models (like SWAN and WW3). For example, SWAN sends to ROMS arrays of wave height, wavelength, average wave periods at the surface and near the bottom, wave propagation direction, near-bottom orbital velocity, and wave-energy dissipation rate. ROMS provides SWAN arrays of water depth, sea-surface elevation, and current velocity. Data exchange between SWAN and ROMS occurs at user-defined synchronization intervals. The frequency of data exchange depends on the application. If the exchanged fields fluctuate rapidly, more frequent synchronization is required. However, data exchange increases run time, so experience is required to determine the optimum synchronization interval for each application.&lt;br /&gt;
&lt;br /&gt;
MCT is available via github:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/MCSclimate/MCT&amp;lt;br /&amp;gt;&amp;gt; cd MCT&amp;lt;br /&amp;gt;&amp;gt; ./configure&amp;lt;br /&amp;gt;&amp;gt; make&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NetCDF (Network Common Data Form)==&lt;br /&gt;
&lt;br /&gt;
Open-source, machine-independent libraries for storing self-describing scientific data into portable, scalable, appendable, and sharable computer files. It provides &#039;&#039;&#039;API&#039;&#039;&#039; in several computer languages to create files, to write data into a file, to read data from the file, and access information about the dataset dimensions, variables, and attributes.  &lt;br /&gt;
&lt;br /&gt;
ROMS uses &#039;&#039;&#039;NetCDF&#039;&#039;&#039; for all its input and output data management. Its &#039;&#039;&#039;NetCDF3&#039;&#039;&#039; or &#039;&#039;&#039;NetCDF4&#039;&#039;&#039; type files can be processed using the standard library developed and distributed [http://doi.org/10.5065/D6H70CW6 UCAR/Unidata], the Parallel-IO (&#039;&#039;&#039;PIO&#039;&#039;&#039;) developed at ANL/NCAR ([https://doi.org/10.1177/1094342011428143 Dennis &#039;&#039;et al&#039;&#039;., 2012]; [https://www.researchgate.net/publication/348169990_THE_PARALLELIO_PIO_CFORTRAN_LIBRARIES_FOR_SCALABLE_HPC_PERFORMANCE Hartnett and Edwards, 2021]). We have migrated to the Fortran-90 &#039;&#039;&#039;API&#039;&#039;&#039; interface,  which consists of a library and one or two module files. See the [[makefile]] and [[build_roms| build script]] for how to tell ROMS where these are located. You will have to use a copy of the library and module files that were compiled using the same compiler you are using to compile ROMS - this is especially true for the module files.&lt;br /&gt;
&lt;br /&gt;
===Building NetCDF-4/HDF5===&lt;br /&gt;
NetCDF-4 uses HDF5 for it&#039;s underlying data format so you first need to build HDF5. We recommend 1.10.6 because 1.10.7 causes errors in the NetCDF-C test suite. Here we will describe how to build parallel versions for use on an HPC cluster. We will note what changes are necessary if you are building for a system that doesn&#039;t have parallel I/O.&lt;br /&gt;
&lt;br /&gt;
====Building HDF5====&lt;br /&gt;
* First, download &#039;&#039;&#039;HDF5&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/HDFGroup/hdf5&amp;lt;br /&amp;gt;&amp;gt; cd hdf5&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/hdf5-1_10_6&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort \&amp;lt;br /&amp;gt;      RUNPARALLEL=&amp;quot;srun --nodes=1 --ntasks=6 --cpus-per-task=1 --time=00:13:00 --export=ALL &amp;quot; \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/hdf5/1.10.6 --enable-static-exec --enable-shared=no \&amp;lt;br /&amp;gt;      --enable-parallel --disable-silent-rules --enable-fortran&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;RUNPARALLEL&#039;&#039; is only needed if your system uses a scheduler to run MPI jobs. The example here is for a SLURM system but you will need to adjust this for your cluster.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;RUNPARALLEL=...&#039;&#039; and &#039;&#039;--enable-parallel&#039;&#039; and change the CC, CXX, and FC to the corresponding serial compilers (e.g. gcc, g++, and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like &#039;&#039;&#039;shared libraries&#039;&#039;&#039; to be built, also remove &#039;&#039;--enable-shared=no&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-C====&lt;br /&gt;
The C and Fortran APIs for NetCDF are in separate packages and the C version must be built first.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/Unidata/netcdf-c&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-c&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.7.4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-Fortran====&lt;br /&gt;
Now we can build the Fortran API.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.5.3.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/Unidata/netcdf-fortran&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-fortan&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.5.3&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* There is a bug/typo in &#039;&#039;&#039;configure&#039;&#039;&#039; that makes &#039;&#039;nf-config&#039;&#039; report the wrong linking information to ROMS. To fix the error, edit the &#039;&#039;&#039;configure&#039;&#039;&#039; file (and &#039;&#039;&#039;configure.ac&#039;&#039;&#039; if you plan to run &#039;&#039;autoconf -i&#039;&#039; again) and change the line:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_FLIBS&amp;quot;&amp;lt;/div&amp;gt;to&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_LIBS&amp;quot;&amp;lt;/div&amp;gt; more details can be found [https://github.com/Unidata/netcdf-fortran/issues/270 here].&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039;. Note that we set &#039;&#039;prefix&#039;&#039; to the same as &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; so the C and Fortran libraries live together:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 FFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include -I/path/to/parallel/netcdf/4.7.4/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib -L/path/to/parallel/netcdf/4.7.4/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; should point to the submision script you created while building &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; and is only needed for running test on clusters that use scheduling systems like SLURM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile serial remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you are running on clusters that use scheduling systems like SLURM, you will need to edit 4 testing scripts replacing all occurrences of &#039;&#039;&#039;mpiexec&#039;&#039;&#039; with the full path to the submision script you created for &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; vi examples/F90/run_f90_par_examples.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf03_test4/run_f90_par_test.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test_03.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test.sh&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PIO (Parallel I/O)==&lt;br /&gt;
&lt;br /&gt;
Open-source parallel library for reading and writing distributed arrays to several scientific data formats like &#039;&#039;&#039;pNetCDF&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF3&#039;&#039;&#039;, and &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039;. &#039;&#039;&#039;PIO&#039;&#039;&#039; provides the flexibility to regulate the number of I/O tasks through data rearrangement between computational and  I/O processes to improve performance and memory usage. It allows both &#039;&#039;&#039;synchronous&#039;&#039;&#039; and &#039;&#039;&#039;asynchronous&#039;&#039;&#039; I/O. In &#039;&#039;&#039;synchronous mode&#039;&#039;&#039;, a subset of processes performs both I/O and computations (MPI intra-communications). Alternatively, in &#039;&#039;&#039;asynchronous mode&#039;&#039;&#039;, the I/O is carried out by a set of disjointed and dedicated processes (MPI inter-communications).  &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library is intended for ROMS Message Passing Interface (MPI) applications running on a large number of processes in an HPC computer with a &#039;&#039;&#039;Parallel File System&#039;&#039;&#039; (Lustre, GPFS, and so on). It uses the &#039;&#039;&#039;MPI-IO&#039;&#039;&#039; interface to facilitate the partitioning of data across computational or dedicated I/O processes. [https://github.com/NCAR/ParallelIO PIO] will work with ROMS [https://www.myroms.org/projects/src/ticket/884 svn revision 1064] (May 10, 2021) or newer. We recommend you read the manuals for all the build options, but below we show example build processes for &#039;&#039;&#039;PIO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; can use NetCDF (version 4.6.1+) and/or PnetCDF (version 1.9.0+) for I/O. NetCDF may be built with or without netCDF-4 features. NetCDF is required for &#039;&#039;&#039;PIO&#039;&#039;&#039;, PnetCDF is optional. {{note}}However, the ROMS build system assumes that &#039;&#039;&#039;PIO&#039;&#039;&#039; is built with PnetCDF support and will need customization if &#039;&#039;&#039;PIO&#039;&#039;&#039; is built without it.&lt;br /&gt;
&lt;br /&gt;
The NetCDF C library must be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; recently introduced a NetCDF integration option that allows standard NetCDF library calls to be implemented with the &#039;&#039;&#039;PIO&#039;&#039;&#039; library but ROMS Parallel I/O is not currently implemented this way. In order to build &#039;&#039;&#039;PIO&#039;&#039;&#039; with NetCDF integration, you will need NetCDF version 4.7.4 or higher. However, the Fortran API integration has not been implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library can be built with the classic Autotools or Cmake. Both are shown below.&lt;br /&gt;
&lt;br /&gt;
===Building PIO With Autotools===&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/releases/download/pio2_5_4/pio-2.5.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_5_4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you downloaded the gzipped tarball, you should run &#039;&#039;make clean&#039;&#039; because some Fortran .mod files are included and need to be removed:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make clean&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort CFLAGS=-O3 FFLAGS=-O3 FCFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/netcdf/include -I/path/to/hdf5/include -I/path/to/pnetcdf/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/netcdf/lib -L/path/to/hdf5/lib -L/path/to/pnetcdf/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lhdf5_hl -lhdf5 -lm -lcurl -lz&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/cluster/submission/script \&amp;lt;br /&amp;gt;      --prefix=/pio/install/path --enable-fortran --disable-timing \&amp;lt;br /&amp;gt;      --disable-silent-rules --disable-shared&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;{{warning}} &#039;&#039;&#039;Warning:&#039;&#039;&#039; If you are using the Intel compilers, you will probably need to remove &amp;quot;&#039;&#039;&#039;test_darray_async_many&#039;&#039;&#039;&amp;quot; from line 50 of &#039;&#039;&#039;test/cunit/run_tests.sh&#039;&#039;&#039; for &#039;&#039;make check&#039;&#039; to complete without errors. Details [https://github.com/NCAR/ParallelIO/issues/1867 here].&lt;br /&gt;
&lt;br /&gt;
===Building PIO With Cmake===&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/releases/download/pio2_5_4/pio-2.5.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_5_4&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; cd ..&amp;lt;br /&amp;gt;&amp;gt; mkdir build_pio&amp;lt;br /&amp;gt;&amp;gt; cd build_pio&amp;lt;br /&amp;gt;&amp;gt; CC=mpicc CXX=mpicxx FC=mpifort cmake \&amp;lt;br /&amp;gt;    -DNetCDF_PATH=/path/to/netcdf \&amp;lt;br /&amp;gt;    -DPnetCDF_PATH=/path/to/pnetcdf \&amp;lt;br /&amp;gt;    -DMPIEXEC=/path/submission/scipt \&amp;lt;br /&amp;gt;    -DMPIEXEC_MAX_NUMPROCS=8 -DMPIEXEC_NUMPROC_FLAG=-n \&amp;lt;br /&amp;gt;    -DPIO_FILESYSTEM_HINTS=gpfs -DPIO_ENABLE_TIMING=OFF -DPIO_ENABLE_TESTS=ON \&amp;lt;br /&amp;gt;    -DCMAKE_INSTALL_PREFIX=/pio/install/path ../ParallelIO&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;-DMPIEXEC&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Compile, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 6&amp;lt;br /&amp;gt;&amp;gt; make -j 6 tests&amp;lt;br /&amp;gt;&amp;gt; ctests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=IO&amp;diff=6680</id>
		<title>IO</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=IO&amp;diff=6680"/>
		<updated>2025-05-05T18:18:20Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS I/O&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ROMS uses NetCDF for all its input and output data management. The NetCDF files can be processed using the standard library developed by [http://doi.org/10.5065/D6H70CW6 UNIDATA], the Parallel-IO (&#039;&#039;&#039;PIO&#039;&#039;&#039;) library developed at NCAR (Hartnett and Edwards, 2021; [https://www.researchgate.net/publication/348169990_THE_PARALLELIO_PIO_CFORTRAN_LIBRARIES_FOR_SCALABLE_HPC_PERFORMANCE unpublished paper]). Furthermore, another parallel I/O strategy has been available in ROMS for several years with the NetCDF4/HDF5 libraries by activating the [[Options#PARALLEL_IO|PARALLEL_IO]] and [[Options#HDF5|HDF5]] CPP options.&lt;br /&gt;
&lt;br /&gt;
Generally, writing is usually a more frequent and more complicated operation than reading. There are four strategies for writing (Mendez &#039;&#039;et al.&#039;&#039;, 2019; ​[https://www.researchgate.net/publication/332190037_Best_Practice_Guide_-_Parallel_IO Preprint]):&lt;br /&gt;
&lt;br /&gt;
#&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Single file, single writer:&amp;lt;/span&amp;gt; &#039;&#039;&#039;Serial I/O&#039;&#039;&#039; in non-parallel or parallel applications. It is the default strategy in ROMS using the &#039;&#039;&#039;NetCDF3&#039;&#039;&#039; or &#039;&#039;&#039;NetCDF4&#039;&#039;&#039; libraries. &lt;br /&gt;
#&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Single file, multiple writers:&amp;lt;/span&amp;gt; &#039;&#039;&#039;Parallel I/O&#039;&#039;&#039; with each partition tile writing its data to a single file. In ROMS, this capability is achieved by activating [[Options#PARALLEL_IO|PARALLEL_IO]] and [[Options#HDF5|HDF5]]. It is only possible with the &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039; libraries. &lt;br /&gt;
#&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Single file, collective writers:&amp;lt;/span&amp;gt; &#039;&#039;&#039;Parallel I/O&#039;&#039;&#039; with either one or a subset of processes performing I/O operations. The I/O operations can be &#039;&#039;&#039;synchronous&#039;&#039;&#039; or &#039;&#039;&#039;asynchronous&#039;&#039;&#039;. In ROMS, this capability uses the &#039;&#039;&#039;PIO&#039;&#039;&#039; library and is available when [[Options#PIO_LIB|PIO_LIB]] is activated. &lt;br /&gt;
#&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Multiple files, multiple writers:&amp;lt;/span&amp;gt; &#039;&#039;&#039;Parallel I/O&#039;&#039;&#039; in which each distributed-memory or shared-memory tile decomposition writes its data into the partition file. Still, post-processing is required to pack the data into a single file. Currently, this capability is not available in ROMS but can be easily implemented within its current I/O infrastructure. However, this strategy is cumbersome and undesired in variational data assimilation (4D-Var) algorithms that require reading forwards and backward, in time, the state trajectories. As a consequence, reading becomes the bottleneck.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Serial I/O==&lt;br /&gt;
Serial I/O is the standard option that has been in ROMS since the beginning. In this setup, all input and output data flows through the master parallel process. All data for output is collected from all processes by the master process and written to disk. Likewise, all data for input is read by the master process and distributed to the rest of the processes. When using serial I/O, files can be written in NetCDF classic/64-bit offset (NetCDF-3) or NetCDF-4/HDF5 ([[Options#HDF5|HDF5]] CPP option) formats. File compression is available in the NetCDF-4/HDF5 library.&lt;br /&gt;
&lt;br /&gt;
==Parallel I/O with NetCDF-4==&lt;br /&gt;
Parallel I/O using parallel HDF5 and NetCDF-4 has been available in ROMS for many years. This I/O option requires parallel enabled HDF5 and NetCDF-4 and is activated by defining [[Options#PARALLEL_IO|PARALLEL_IO]] and [[Options#HDF5|HDF5]] CPP options. Each parallel tile reads and writes the decomposed data. This approach does not scale well because it requires every process to participate in reading and writing, which quickly overloads the file system with requests as the number of tiles (NtileI x NtileJ) increases.&lt;br /&gt;
&lt;br /&gt;
==Parallel I/O with PIO==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library is primarily intended for ROMS &#039;&#039;&#039;distributed-memory (MPI) applications&#039;&#039;&#039; running on a large number of processes in an HPC system with a Parallel File System (like Lustre, GPFS, and so on) for high-performance I/O. The &#039;&#039;&#039;PIO&#039;&#039;&#039; library uses the &#039;&#039;&#039;MPI-IO&#039;&#039;&#039; interface to facilitate the partitioning of the data across computational or dedicated I/O processes. For example, in an HPC cluster environment with a &#039;&#039;&#039;Parallel File System&#039;&#039;&#039;, the user can instruct &#039;&#039;&#039;PIO&#039;&#039;&#039; to designate which processes per node to perform I/O. This is a much more reasonable approach for larger applications running on hundreds of processors. To use this Parallel I/O strategy, the &#039;&#039;&#039;PIO&#039;&#039;&#039; library must be linked to ROMS at compile time by defining the [[Options#PIO_LIB|PIO_LIB]] CPP option. &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;It is only available in distributed-memory applications since it uses &#039;&#039;&#039;MPI-IO&#039;&#039;&#039;&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are two modes of parallel I/O in &#039;&#039;&#039;PIO&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: upper-alpha&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Synchronous:&#039;&#039;&#039; MPI intra-communications mode. A subset or all processes does I/O and also computations. The user specifies the total number of I/O tasks and how they are distributed across the HPC nodes as a function of the ROMS MPI-communicator object, &#039;&#039;&#039;OCN_COMM_WORLD&#039;&#039;&#039;. It is often desirable to shift the first I/O task away from the first computation task since it has higher memory requirements than other processes. If the MPI processes are spread over several computer nodes, it is highly recommended to spread all I/O tasks over all nodes. Avoid all I/O processes occupying the same node.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&#039;&#039;&#039;Asynchronous:&#039;&#039;&#039; MPI inter-communications mode. The I/O tasks are a disjointed set of dedicated I/O processes and do not perform computations. It is possible to have groups of computational units running separate models (coupling) where all the I/O data are sent to dedicated processes. In ROMS, the asynchronous mode is possible by activating [[Options#ASYNCHRONOUS_PIO|ASYNCHRONOUS_PIO]]. &#039;&#039;&#039;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;However&amp;lt;/span&amp;gt;, this capability is still under development and not recommended for use at this time.&#039;&#039;&#039;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Parallel I/O configuration options are set in [[roms.in]]:&lt;br /&gt;
{{#lst:roms.in|PIO}}&lt;br /&gt;
&lt;br /&gt;
==Output Multi-Files==&lt;br /&gt;
&lt;br /&gt;
Sometimes, it is advantageous to time-split ROMS output data (&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;averages&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;diagnostic&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;history&amp;lt;/span&amp;gt;, and &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;quicksave&amp;lt;/span&amp;gt;) into multiple NetCDF files to avoid creating huge files on disk for storage in applications with large grids. Smaller files are easy to handle and can be concatenated in OpenDAP catalogs.&lt;br /&gt;
&lt;br /&gt;
For example, an application for a particular region with a substantial grid size needs to be run for one year. The ROMS timestep is [[Variables#DT|DT]] = 300 seconds, as shown below. Then, one could split the &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;history&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;quicksave&amp;lt;/span&amp;gt; output data into daily NetCDF files with single or multiple time records every &#039;&#039;&#039;3&#039;&#039;&#039;, &#039;&#039;&#039;6&#039;&#039;&#039;,  or &#039;&#039;&#039;24&#039;&#039;&#039; hours. In this case, ROMS will generate a sequence of files with suffixes &amp;lt;span class=&amp;quot;violet&amp;quot;&amp;gt;_0001.nc&amp;lt;/span&amp;gt; to &amp;lt;span class=&amp;quot;violet&amp;quot;&amp;gt;_0365.nc&amp;lt;/span&amp;gt; filenames.  Therefore, we need the following parameters in [[roms.in|roms.in]]:&lt;br /&gt;
&lt;br /&gt;
* Timestepping parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#ntimes|NTIMES]] =  105120        ! Number of timesteps &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(288 steps per day; 365 days simulation)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;          [[Variables#dt|DT]] == 300.0d0       ! Timestep size (seconds)&amp;lt;br /&amp;gt;     [[Variables#ndtfast|NDTFAST]] == 30            ! Number of barotropic steps&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Flags controlling the frequency of output.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;       [[Variables#nrrec|NRREC]] =  0             ! Model restart flag&amp;lt;br /&amp;gt;   [[Variables#LcycleRST|LcycleRST]] == T             ! Switch to recycle restart time records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(file with only 2 cycling time records)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;        [[Variables#nRST|NRST]] == 288           ! Number of timesteps between writing restart records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;        [[Variables#nSTA|NSTA]] == 1             ! Number of timesteps between stations records&amp;lt;br /&amp;gt;        [[Variables#nFLT|NFLT]] == 1             ! Number of timesteps between floats records&amp;lt;br /&amp;gt;       [[Variables#ninfo|NINFO]] == 1             ! Number of timesteps between printing information diagnostics&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Output history, average, and diagnostic file parameters.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     [[Variables#ldefout|LDEFOUT]] == T             ! File creation/append switch&amp;lt;br /&amp;gt;        [[Variables#nHIS|NHIS]] == 72            ! Number of timesteps between writing history records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(every 6 hours)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#ndefHIS|NDEFHIS]] == 288           ! Number of timesteps between the creation of new history files &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily files)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;        [[Variables#nQCK|NQCK]] == 36            ! Number of timesteps between writing quicksave records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(every 3 hours)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#ndefQCK|NDEFQCK]] == 288           ! Number of timesteps between the creation of new quicksave file &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily)&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily, single record files)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;      [[Variables#ntsAVG|NTSAVG]] == 1             ! Starting averages timestep&amp;lt;br /&amp;gt;        [[Variables#nAVG|NAVG]] == 288           ! Number of timesteps between writing averages records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily averages)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#ndefAVG|NDEFAVG]] == 288           ! Number of timesteps between the creation of new averages file &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily, single record files)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;      [[Variables#ntsDIA|NTSDIA]] == 1             ! Starting diagnostics timestep&amp;lt;br /&amp;gt;        [[Variables#nDIA|NDIA]] == 288           ! Number of timesteps between writing diagnostics records &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily averages)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;     [[Variables#ndefDIA|NDEFDIA]] == 288           ! Number of timesteps between the creation of new diagnostics file &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(daily, single record files)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Timestamp assigned for model initialization, reference time origin for tidal forcing, and model reference time for output NetCDF units attribute.&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      [[Variables#dstart|DSTART]] =  365.0d0             ! days &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(ROMS is initialized on 2007-01-01 00:00:00Z)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;  [[Variables#tide_start|TIDE_START]] =  0.0d0               ! days &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(zero phase date is set when preparing the tidal data for 2006-01-01)&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;    [[Variables#time_ref|TIME_REF]] =  20060101.0d0        ! yyyymmdd.dd &amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;(Very important: ROMS time is seconds since 2006-01-01 00:00:00Z)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that all the parameters are an exact integer multiple from each other:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     MOD([[Variables#ntimes|NTIMES]], [[Variables#ndefHIS|NDEFHIS]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ntimes|NTIMES]], [[Variables#ndefHIS|NDEFQCK]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ntimes|NTIMES]], [[Variables#ndefAVG|NDEFAVG]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ntimes|NTIMES]], [[Variables#ndefDIA|NDEFDIA]]) = 0 &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;     MOD([[Variables#ntimes|NTIMES]], [[Variables#nRST|NRST]]) = 0 &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;     MOD([[Variables#ndefHIS|NDEFHIS]], [[Variables#nHIS|NHIS]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ndefQCK|NDEFQCK]], [[Variables#nQCK|NQCK]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ndefAVH|NDEFAVG]], [[Variables#nAVG|NAVG]]) = 0 &amp;lt;br /&amp;gt;     MOD([[Variables#ndefDIA|NDEFDIA]], [[Variables#nHIS|NDIA]]) = 0 &amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the Fortran intrinsic function &#039;&#039;&#039;MOD(&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt;,&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Y&amp;lt;/span&amp;gt;)&#039;&#039;&#039; computes the remainder of the division of &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;X&amp;lt;/span&amp;gt; by &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Y&amp;lt;/span&amp;gt;, and has to be always &#039;&#039;&#039;zero&#039;&#039;&#039; for ROMS multi-file option to work. Notice that the first files in the &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;history&amp;lt;/span&amp;gt; data series (&amp;lt;span class=&amp;quot;violet&amp;quot;&amp;gt;roms_his_0001.nc&amp;lt;/span&amp;gt;) will contain &#039;&#039;&#039;5&#039;&#039;&#039;-time records because of the initial conditions, and the rest of the files will have &#039;&#039;&#039;4&#039;&#039;&#039;-time records. Similarly, the first file in the &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;quicksave&amp;lt;/span&amp;gt; series (&amp;lt;span class=&amp;quot;violet&amp;quot;&amp;gt;roms_qck_0001.nc&amp;lt;/span&amp;gt;) will contain &#039;&#039;&#039;9&#039;&#039;&#039;-time records, and the rest will have &#039;&#039;&#039;8&#039;&#039;&#039;-time records. The time-averaged data in the &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;averages&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;diagnostic&amp;lt;/span&amp;gt; files are single records files representing daily averaged fields. The above analysis also holds when converted to time in seconds since every parameter is multiplied by the [[Variables#dt|DT]] timestep.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;WARNING:&amp;lt;/span&amp;gt; If running your application in a supercomputer with limited-time job queues, long simulations will require a restart. You &#039;&#039;&#039;cannot&#039;&#039;&#039; change the values of [[Variables#ntimes|NTIMES]] or [[Variables#dstart|DSTART]] because the multi-file will fail. If [[Variables#dstart|DSTART]] is changed, it will reset the timestep internal counter &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;iic(ng)&amp;lt;/span&amp;gt;, and we are in deep trouble! Notice that the value [[Variables#nRST|NRST]] is crucial for the restart of ROMS with multi-file. In addition, we need the following mathematical equalities:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;     MOD([[Variables#nRST|NRST]], [[Variables#nHIS|NHIS]]) = 0&amp;lt;br /&amp;gt;     MOD([[Variables#nRST|NRST]], [[Variables#nQCK|NQCK]]) = 0&amp;lt;br /&amp;gt;     MOD([[Variables#nRST|NRST]], [[Variables#nAVG|NAVG]]) = 0&amp;lt;br /&amp;gt;     MOD([[Variables#nRST|NRST]], [[Variables#nDIA|NDIA]]) = 0&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Also, it will be trivial to restart if [[Variables#nAVG|NAVG]] = [[Variables#nDIA|NDIA]] = [[Variables#nRST|NRST]] because of the accumulation sums when computing time-averaging fields. If balancing terms and budgets from output data, you will need [[Variables#nAVG|NAVG]] = [[Variables#nDIA|NDIA]] too.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=my_build_paths&amp;diff=6679</id>
		<title>my build paths</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=my_build_paths&amp;diff=6679"/>
		<updated>2025-05-05T18:14:15Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Library and Executable Paths - &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;my_build_paths.csh, my_build_paths.sh&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; in SVN revision 933 (January 26, 2019) the custom libraries section was removed from the ROMS [[build_roms|build script]] and placed in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Compilers/my_build_paths.csh&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Compilers/my_build_paths.sh&amp;lt;/span&amp;gt; to both streamline the ROMS build script and make setting up new applications less tedious. More information can be found in ROMS [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. Prior to ROMS release 933, the paths mentioned below were included in the ROMS build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rather than editing files released with ROMS and possibly creating conflicts during updates, we suggest that you copy the appropriate &#039;&#039;&#039;my_build_paths&#039;&#039;&#039; file to another folder (we recommend &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;~/Compilers/ROMS&amp;lt;/span&amp;gt;) and set [[MY_PATHS]] to the full path to your &#039;&#039;&#039;my_build_paths&#039;&#039;&#039; file (i.e. ~/Compilers/ROMS/my_build_paths.csh).&lt;br /&gt;
&lt;br /&gt;
The path of the libraries and MPI implementations required by ROMS can be set using environment variables which take precedence over the values specified in the makefile macro definitions file (&#039;&#039;&#039;Compilers/*.mk&#039;&#039;&#039;). To activate custom paths set in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;my_build_paths&amp;lt;/span&amp;gt;, set [[USE_MY_LIBS]] to &#039;&#039;&#039;yes&#039;&#039;&#039; and make sure [[MY_PATHS]] is properly set in the ROMS [[build_roms|build script]].&lt;br /&gt;
&lt;br /&gt;
==Compiler and MPI Implementation==&lt;br /&gt;
&lt;br /&gt;
There is a section (the one from &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;my_build_paths.csh&amp;lt;/span&amp;gt; is shown below) in the [[MY_PATHS]] file to make it easier to switch between different compilers and &#039;&#039;&#039;MPI&#039;&#039;&#039; implementations. This will only apply to &#039;&#039;&#039;MPI&#039;&#039;&#039; implementations that use the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpif90&amp;lt;/span&amp;gt; style wrapper script (&#039;&#039;&#039;MPICH&#039;&#039;&#039;, &#039;&#039;&#039;MPICH2&#039;&#039;&#039;, &#039;&#039;&#039;OpenMPI&#039;&#039;&#039;, etc.).&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;if ($?USE_MPIF90) then&amp;lt;br /&amp;gt;  switch ($FORT)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    case &amp;quot;ifort&amp;quot;&amp;lt;br /&amp;gt;      if ($which_MPI == &amp;quot;mpich&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/intelsoft/mpich&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mpich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/intelsoft/mpich2&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;openmpi&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/intelsoft/openmpi&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mvapich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/intelsoft/mvapich2&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;      setenv PATH       ${MPI_ROOT}/bin:$PATH&amp;lt;br /&amp;gt;      setenv MPI_INCDIR ${MPI_ROOT}/include&amp;lt;br /&amp;gt;    breaksw&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    case &amp;quot;pgi&amp;quot;&amp;lt;br /&amp;gt;      if ($which_MPI == &amp;quot;mpich&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/pgisoft/mpich&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mpich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/pgisoft/mpich2&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;openmpi&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/pgisoft/openmpi&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mvapich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/pgisoft/mvapich2&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;      setenv PATH       ${MPI_ROOT}/bin:$PATH&amp;lt;br /&amp;gt;      setenv MPI_INCDIR ${MPI_ROOT}/include&amp;lt;br /&amp;gt;    breaksw&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    case &amp;quot;gfortran&amp;quot;&amp;lt;br /&amp;gt;      if ($which_MPI == &amp;quot;mpich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/gfortransoft/mpich2&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;openmpi&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/gfortransoft/openmpi&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mvapich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_ROOT /opt/gfortransoft/mvapich2&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;      setenv PATH       ${MPI_ROOT}/bin:$PATH&amp;lt;br /&amp;gt;      setenv MPI_INCDIR ${MPI_ROOT}/include&amp;lt;br /&amp;gt;    breaksw&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  endsw&amp;lt;br /&amp;gt;endif&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note}}Keep in mind that you need to adjust the paths to your &#039;&#039;&#039;MPI&#039;&#039;&#039; implementations for your particular system. You must also set &#039;&#039;&#039;USE_MPIF90&#039;&#039;&#039; to on.&lt;br /&gt;
&lt;br /&gt;
==External Library Paths==&lt;br /&gt;
&lt;br /&gt;
For information about required and optional external libraries visit the [[External Libraries]] page.&lt;br /&gt;
&lt;br /&gt;
For most applications, only the location of the &#039;&#039;&#039;NetCDF&#039;&#039;&#039; library (&#039;&#039;&#039;NETCDF_LIBDIR&#039;&#039;&#039;) and include directory (&#039;&#039;&#039;NETCDF_INCDIR&#039;&#039;&#039;) are needed. Notice that when the [[#USE_NETCDF4|USE_NETCDF4]] macro is activated, we need the serial or parallel version of the &#039;&#039;&#039;NetCDF-4/HDF5&#039;&#039;&#039; library. The configuration script &#039;&#039;&#039;NF_CONFIG&#039;&#039;&#039; (available since NetCDF 4.2) is used to set up all the required libraries according to the installed options (&#039;&#039;&#039;OPeNDAP&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039; file format). The parallel library uses the &#039;&#039;&#039;MPI-I/O&#039;&#039;&#039; layer (available in most modern MPI implementation) requiring compiling with the selected &#039;&#039;&#039;MPI&#039;&#039;&#039; library.&lt;br /&gt;
&lt;br /&gt;
In ROMS distributed-memory applications, you may use either the serial or parallel version of the &#039;&#039;&#039;NetCDF-4/HDF5&#039;&#039;&#039; library. The parallel version is required when parallel I/O is activated (ROMS cpp option [[Options#PARALLEL_IO|PARALLEL_IO]] and [[Options#HDF5|HDF5]]). For more I/O options see the [[IO|ROMS I/O page]].&lt;br /&gt;
&lt;br /&gt;
However, in serial or shared-memory ROMS applications, we need to use the serial version of the &#039;&#039;&#039;NetCDF-4/HDF5&#039;&#039;&#039; to avoid conflicts with the compiler. We cannot activate &#039;&#039;&#039;MPI&#039;&#039;&#039; constructs in serial or shared-memory ROMS code. Hybrid parallelism is not possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is an excerpt from the custom library section.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;setenv MPI_SOFT &amp;quot;&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;switch ($FORT)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;# Intel Compiler:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  case &amp;quot;ifort&amp;quot;&amp;lt;br /&amp;gt;    setenv ESMF_COMPILER        intelgcc&amp;lt;br /&amp;gt;    if ($?USE_DEBUG) then&amp;lt;br /&amp;gt;      setenv ESMF_BOPT          g&amp;lt;br /&amp;gt;    else&amp;lt;br /&amp;gt;      setenv ESMF_BOPT          O&amp;lt;br /&amp;gt;    endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    setenv ESMF_ABI             64&amp;lt;br /&amp;gt;    setenv ESMF_COMM            ${which_MPI}&amp;lt;br /&amp;gt;    setenv ESMF_SITE            default&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    setenv ARPACK_LIBDIR        /opt/intelsoft/serial/ARPACK&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    if ($?USE_MPI) then&amp;lt;br /&amp;gt;      if ($which_MPI == &amp;quot;mpich&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_SOFT         /opt/intelsoft/mpich&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mpich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_SOFT         /opt/intelsoft/mpich2&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;openmpi&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_SOFT         /opt/intelsoft/openmpi&amp;lt;br /&amp;gt;      else if ($which_MPI == &amp;quot;mvapich2&amp;quot; ) then&amp;lt;br /&amp;gt;        setenv MPI_SOFT         /opt/intelsoft/mvapich2&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;      setenv MCT_INCDIR         ${MPI_SOFT}/mct/include&amp;lt;br /&amp;gt;      setenv MCT_LIBDIR         ${MPI_SOFT}/mct/lib&amp;lt;br /&amp;gt;      setenv PARPACK_LIBDIR     ${MPI_SOFT}/PARPACK&amp;lt;br /&amp;gt;    endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    if ($?USE_NETCDF4) then&amp;lt;br /&amp;gt;      if ($?USE_PARALLEL_IO &amp;amp;&amp;amp; $?USE_MPI) then&amp;lt;br /&amp;gt;        setenv ESMF_DIR         ${MPI_SOFT}/esmf_nc4&amp;lt;br /&amp;gt;        setenv NETCDF           ${MPI_SOFT}/netcdf4&amp;lt;br /&amp;gt;        setenv NF_CONFIG        ${NETCDF}/bin/nf-config&amp;lt;br /&amp;gt;        setenv NETCDF_INCDIR    ${NETCDF}/include&amp;lt;br /&amp;gt;        setenv NETCDF4          1&amp;lt;br /&amp;gt;      else&amp;lt;br /&amp;gt;        setenv ESMF_DIR         ${MPI_SOFT}/esmf_nc4&amp;lt;br /&amp;gt;        setenv NETCDF           /opt/intelsoft/serial/netcdf4&amp;lt;br /&amp;gt;        setenv NF_CONFIG        ${NETCDF}/bin/nf-config&amp;lt;br /&amp;gt;        setenv NETCDF_INCDIR    ${NETCDF}/include&amp;lt;br /&amp;gt;        setenv NETCDF4          1&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;    else&amp;lt;br /&amp;gt;      setenv ESMF_DIR           ${MPI_SOFT}/esmf_nc3&amp;lt;br /&amp;gt;      setenv NETCDF             /opt/intelsoft/serial/netcdf3&amp;lt;br /&amp;gt;      setenv NETCDF_INCDIR      ${NETCDF}/include&amp;lt;br /&amp;gt;      setenv NETCDF_LIBDIR      ${NETCDF}/lib&amp;lt;br /&amp;gt;    endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    if ($?USE_PIO) then&amp;lt;br /&amp;gt;      setenv PIO                ${MPI_SOFT}/pio&amp;lt;br /&amp;gt;      setenv PIO_LIBDIR         ${PIO}/lib&amp;lt;br /&amp;gt;      setenv PIO_INCDIR         ${PIO}/include&amp;lt;br /&amp;gt;      setenv PNETCDF            ${MPI_SOFT}/pnetcdf&amp;lt;br /&amp;gt;      setenv PNETCDF_LIBDIR     ${PNETCDF}/lib&amp;lt;br /&amp;gt;      setenv PNETCDF_INCDIR     ${PNETCDF}/include&amp;lt;br /&amp;gt;    endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    if ($?USE_HDF5) then&amp;lt;br /&amp;gt;      if ($?USE_PARALLEL_IO &amp;amp;&amp;amp; $?USE_MPI) then&amp;lt;br /&amp;gt;        setenv HDF5             ${MPI_SOFT}/hdf5&amp;lt;br /&amp;gt;        setenv HDF5_LIBDIR      ${HDF5}/lib&amp;lt;br /&amp;gt;        setenv HDF5_INCDIR      ${HDF5}/include&amp;lt;br /&amp;gt;      else&amp;lt;br /&amp;gt;        setenv HDF5             /opt/intelsoft/serial/hdf5&amp;lt;br /&amp;gt;        setenv HDF5_LIBDIR      ${HDF5}/lib&amp;lt;br /&amp;gt;        setenv HDF5_INCDIR      ${HDF5}/include&amp;lt;br /&amp;gt;      endif&amp;lt;br /&amp;gt;    endif&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;    . . .&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;  breaksw&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6678</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6678"/>
		<updated>2025-03-25T17:19:12Z</updated>

		<summary type="html">&lt;p&gt;Robertson: /* Configuring GIT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Git&amp;lt;/div&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;ROMS&#039;&#039;&#039; source code is now exclusively distributed using [https://git-scm.com Git]. The &#039;&#039;&#039;GitHub&#039;&#039;&#039; repository includes the full history since 2002 of changes to the &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code. There are command line and GUI Git clients available for nearly every operating system and a list of popular clients can be found [https://git-scm.com/downloads/guis here]. This page will help you get started with downloading &#039;&#039;&#039;ROMS&#039;&#039;&#039; with Git.&lt;br /&gt;
&lt;br /&gt;
==Git Overview==&lt;br /&gt;
Git is a free and open-source distributed version control system designed to handle everything from small to massive projects quickly and efficiently. All the ROMS files are stored in a Git repository on &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;github.com/myroms&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This Git repository is the official version of the code, which only developers are allowed to change. Users should download the ROMS code to their local machines using a &#039;&#039;&#039;git client&#039;&#039;&#039;. Don&#039;t attempt to use a regular web browser to browse or download files from the Git repository—there are much better tools for interacting with the code repository.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users check out the current &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;develop&amp;lt;/span&amp;gt; branch, which has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; are mainly kept as a historical record of stable releases after major code upgrades.&lt;br /&gt;
&lt;br /&gt;
If you are making changes yourself, keep them in a separate branch, leaving the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;develop&amp;lt;/span&amp;gt; branch to track changes from the source. Please check the [https://github.com/myroms/roms/wiki/Useful-GIT-Commands ROMS GitHub Wiki] for useful Git commands.&lt;br /&gt;
&lt;br /&gt;
Below is a general description of how Git works. For more detailed information, please review the [https://git-scm.com/book/en/v2 Pro Git] book. We have not tried GUI clients but may add brief how-tos for the most popular GUIs later.&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading any of &#039;&#039;&#039;ROMS&#039;&#039;&#039; repositories, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading some &#039;&#039;&#039;&#039;&#039;roms_test&#039;&#039;&#039;&#039;&#039; input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;more ~/.gitconfig&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [User]&amp;lt;br /&amp;gt;        name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;        email = your@email&amp;lt;br /&amp;gt;   [credential]&amp;lt;br /&amp;gt;        helper = cache --timeout=7200&amp;lt;br /&amp;gt;        helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;   [filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;        clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;        smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;        process = git-lfs filter-process&amp;lt;br /&amp;gt;        required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you clone the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a git repository, &#039;&#039;&#039;git client&#039;&#039;&#039; software must be installed on your local machine. Most Linux distributions come with git, so shell commands may be used without installing additional software. The general form of git commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git&amp;lt;/span&amp;gt; action &amp;lt;repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;develop&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms.git&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If &#039;&#039;&#039;MyDir&#039;&#039;&#039; is omitted the code will be downloaded to a directory named &#039;&#039;&#039;roms&#039;&#039;&#039;. You only clone once because Git will keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [https://git-scm.com/book/en/v2 Pro Git] book.&lt;br /&gt;
&lt;br /&gt;
The idealized and realistic ROMS Test Cases and the Matlab processing software can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_test.git &amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_matlab.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We highly recommend that Users clone all the ROMS repositories from the same root directory in their computer and define the &#039;&#039;&#039;ROMS_ROOT_DIR&#039;&#039;&#039; variable in their computer shell login environment, specifying where the User cloned/downloaded the ROMS source code, Test Cases, and Matlab processing software. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git&lt;br /&gt;
&lt;br /&gt;
For bash shells:&lt;br /&gt;
    export ROMS_ROOT_DIR=MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
For csh/tcsh shells:&lt;br /&gt;
    setenv ROMS_ROOT_DIR  MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
The build scripts will use this environmental variable when compiling any of the ROMS Test Cases without the need to customize the location of the ROMS source code. Also, it is used for loading the path of Matlab scripts in the startup.m configuration file.&lt;br /&gt;
&lt;br /&gt;
===Git Hash Revision Information===  &lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; While this is not a required step, we highly recommend it to make bug reporting and tracking easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get Git hash revision information in the header for each file, we have created a Git filter that will insert the git hash of the last time a file was modified, similar to the Subversion &#039;&#039;&#039;&#039;&#039;$Id$&#039;&#039;&#039;&#039;&#039; keyword. In order for the filter to work, it has to be explicitly enabled by the user. After the git clone command from above completes change into &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;MyDir&amp;lt;/span&amp;gt; and execute the following:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.smudge &amp;quot;.git_filters/id.smudge %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.clean &amp;quot;.git_filters/id.clean %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to get the Git Id hashes to fill in, you will need to force the smudge filter to run on the source code you have already downloaded. This takes several minutes but only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;bash&#039;&#039;&#039; shells execute:	&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;$(git rev-parse --show-toplevel)&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;csh/tcsh&#039;&#039;&#039; shells execute:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;`git rev-parse --show-toplevel`&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you look at the top of any ROMS source file, you will see the Git commit hash for the last time that file was modified. For example, the first few lines of &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;ROMS/Modules/mod_ncparam.F&amp;lt;/span&amp;gt; look like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#include &amp;quot;cppdefs.h&amp;quot;&amp;lt;br /&amp;gt;      MODULE mod_ncparam&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!git $Id: caf970e3 2024-08-09 17:15:26 UTC arango $&amp;lt;br /&amp;gt;!================================================== Hernan G. Arango ===&amp;lt;br /&amp;gt;!  Copyright (c) 2002-2024 The ROMS/TOMS Group                         !&amp;lt;br /&amp;gt;!    Licensed under a MIT/X style license                              !&amp;lt;br /&amp;gt;!    See License_ROMS.md                                               !&amp;lt;br /&amp;gt;!=======================================================================&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the 8 character (hexidecimal) Git hash to show more information about that code update:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git show --name-only caf970e3&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
==Managing Your Own Modifications==&lt;br /&gt;
This assumes that you have a fresh clone of the myroms repository on the &#039;&#039;&#039;develop&#039;&#039;&#039; branch. You want to keep &#039;&#039;&#039;develop&#039;&#039;&#039; as a pure copy of the source version and keep your own changes in say the &#039;&#039;&#039;arctic&#039;&#039;&#039; branch. Start by creating a branch and switching to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git branch arctic&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can make whatever modifications you like (and test them out). To see what changed, you can use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git diff&amp;lt;/span&amp;gt;. To save your changes, do a:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git commit -a&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though if you add new files you will have to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git add&amp;lt;/span&amp;gt; them first.&lt;br /&gt;
&lt;br /&gt;
===Getting the Updates===&lt;br /&gt;
It is easy to fetch and merge the updates. Start by making sure your directory has been cleanly checked in with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt;.  Then you can update your &#039;&#039;&#039;develop&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout develop&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bring the changes into your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git merge develop&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will bring in everything that changed since your last &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;, so you might find it easier to keep on top of things by doing this often, not putting it off for years. You can also bring in changes one at a time with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git cherry-pick&amp;lt;/span&amp;gt;. Again, check the Pro Git book for much more information about all of these operations.&lt;br /&gt;
&lt;br /&gt;
Note that this will save your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch locally, under the .git directory. You can back this up as you would any other important files you have.&lt;br /&gt;
&lt;br /&gt;
==Useful Git Commands==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Command&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git add&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Add a file to the repository staging area &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch&#039;&#039;&#039;&lt;br /&gt;
| List all local branches (the asterisk denotes the current branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -a&#039;&#039;&#039;&lt;br /&gt;
| List all local and remote branches&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -d&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -D&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch forcefully&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -m&#039;&#039;&#039; &amp;lt;_OldName_&amp;gt; &amp;lt;_NewName_&amp;gt;&lt;br /&gt;
| Rename a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout -b&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Create a new local branch and switch to it&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Switch to an existing local or remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git clone&#039;&#039;&#039; &amp;lt;_RepositoryURL_&amp;gt;&lt;br /&gt;
| Clone a public repository&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot; &#039;&#039;&#039;-m&#039;&#039;&#039; &amp;quot;&amp;lt;_MessageURL_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files with two message lines&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit --amend -m&#039;&#039;&#039; &amp;quot;&amp;lt;_NewMessage_&amp;gt;&amp;quot;&lt;br /&gt;
| Amend previous commit message&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039;&lt;br /&gt;
| Show all changes between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Show changes for a specific file between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git difftool -d&#039;&#039;&#039; &amp;lt;_BranchName1_&amp;gt; &amp;lt;_BranchName2_&amp;gt;&lt;br /&gt;
| Compare the difference between two branches with &#039;&#039;&#039;`KDIFF3`&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git fetch&#039;&#039;&#039;&lt;br /&gt;
| Retrieve new work done by other people&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log&#039;&#039;&#039;&lt;br /&gt;
| View repository changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --oneline&#039;&#039;&#039;&lt;br /&gt;
| Show the list of commits in one-line format&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --summary&#039;&#039;&#039;&lt;br /&gt;
| View repository detailed changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git merge --no-ff --no-commit&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Merge a branch into the active branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git pull&#039;&#039;&#039;&lt;br /&gt;
| Update local repository or branch to the newest origin commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push origin --delete&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push -u origin&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Push changes to the remote repository (and remember the branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git reset --hard HEAD~1&#039;&#039;&#039;&lt;br /&gt;
| Undo last commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git revert&#039;&#039;&#039; &amp;lt;_CommitID_&amp;gt;&lt;br /&gt;
| Revert commit changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git status&#039;&#039;&#039;&lt;br /&gt;
| Check/display changes to the repository or particular branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git tag&#039;&#039;&#039;&lt;br /&gt;
| List all tags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complicated Commands==&lt;br /&gt;
&lt;br /&gt;
If a branch is renamed in a repository on GitHub, the local clone on a computer needs to updated:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git branch -m OldName NewName&amp;lt;br /&amp;gt;git fetch origin&amp;lt;br /&amp;gt;git branch -u origin/NewName NewName&amp;lt;br /&amp;gt;git remote set-head origin -a&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to merge changes in the &#039;&#039;&#039;feature/name1&#039;&#039;&#039; branch into the &#039;&#039;&#039;feature/name2&#039;&#039;&#039; branch:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git checkout feature/name1&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;git checkout feature/name2&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;git merge --no-ff --no-commit feature/name1&amp;lt;br /&amp;gt;git commit -am &amp;quot;Merging feature/name1 into feature/name2&amp;quot; -m &amp;quot;MessageURL&amp;quot;&amp;lt;br /&amp;gt;git difftool -d feature/name1 feature/name2&amp;lt;br /&amp;gt;git push -u origin feature/name2&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Workshops&amp;diff=6677</id>
		<title>Workshops</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Workshops&amp;diff=6677"/>
		<updated>2025-01-30T17:23:26Z</updated>

		<summary type="html">&lt;p&gt;Robertson: Created page with &amp;quot;{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot; ! Date  ! Location ! Description ! Attendees ! Group Picture |- | 08/20/2001 - 08/22/2001 | Boulder, CO | The second joint biannual workshop for users of Terrain-Following Coordinates Ocean Models | 70 | [https://www.myroms.org/images/ROMS_2001_1.gif Picture] |- | 08/04/2003 - 08/06/2003 | Seattle, WA | Final joint POM/SPEM/SCRUM/ROMS workshop | 47 | [https://www.myroms.org/Workshops/Workshop2003/Pictures/Day3/...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! Date &lt;br /&gt;
! Location&lt;br /&gt;
! Description&lt;br /&gt;
! Attendees&lt;br /&gt;
! Group Picture&lt;br /&gt;
|-&lt;br /&gt;
| 08/20/2001 - 08/22/2001&lt;br /&gt;
| Boulder, CO&lt;br /&gt;
| The second joint biannual workshop for users of Terrain-Following Coordinates Ocean Models&lt;br /&gt;
| 70&lt;br /&gt;
| [https://www.myroms.org/images/ROMS_2001_1.gif Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 08/04/2003 - 08/06/2003&lt;br /&gt;
| Seattle, WA&lt;br /&gt;
| Final joint POM/SPEM/SCRUM/ROMS workshop&lt;br /&gt;
| 47&lt;br /&gt;
| [https://www.myroms.org/Workshops/Workshop2003/Pictures/Day3/group04.JPG Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 10/18/2004 - 10/20/2004&lt;br /&gt;
| Venice, Italy&lt;br /&gt;
| First European ROMS meeting&lt;br /&gt;
| 56&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 10/24/2005 - 10/26/2005&lt;br /&gt;
| La Jolla, CA&lt;br /&gt;
| Workshop focused on adjoint modeling and applications&lt;br /&gt;
| 64&lt;br /&gt;
| [http://marine.rutgers.edu/po/Workshops/ROMS2005/Pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 11/06/2006 - 11/08/2006&lt;br /&gt;
| Alcalá de Henares, Spain&lt;br /&gt;
| Second European ROMS meeting at historic University of Alcalá&lt;br /&gt;
| 57&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2006/Group_Picture.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 10/01/2007 - 10/03/2007&lt;br /&gt;
| Los Angeles, CA&lt;br /&gt;
| Held at UCLA followed by the Community Sediment Transport Modeling (CSTM) meeting&lt;br /&gt;
| 77&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2007/pics/Group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 10/04/2007 - 10/05/2007&lt;br /&gt;
| Los Angeles, CA&lt;br /&gt;
| CSTM meeting with status updates and breakout groups&lt;br /&gt;
| 37&lt;br /&gt;
| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 10/06/2008 - 10/08/2008&lt;br /&gt;
| Grenoble, France&lt;br /&gt;
| Third European ROMS meeting in the French Rhone-Alps&lt;br /&gt;
| 70&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2008/pics/Group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 03/31/2009 - 04/02/2009&lt;br /&gt;
| Sydney, Australia&lt;br /&gt;
| First Asia-Pacific ROMS meeting&lt;br /&gt;
| 64&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2009a/pics/Group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 04/05/2010 - 04/08/2010&lt;br /&gt;
| Honolulu, HI&lt;br /&gt;
| Third Domestic ROMS meeting&lt;br /&gt;
| 51&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2010/pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 07/12/2010 - 07/16/2010&lt;br /&gt;
| Santa Cruz, CA&lt;br /&gt;
| Workshop on the ROMS 4D-Var Data Assimilation Systems for advanced ROMS users&lt;br /&gt;
| 40&lt;br /&gt;
| [https://www.myroms.org/Workshops/4DVAR2010/Pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 10/22/2012 - 10/25/2012&lt;br /&gt;
| Rio de Janeiro, Brazil&lt;br /&gt;
| First South American ROMS workshop&lt;br /&gt;
| 104&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2012/pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 05/26/2014 - 05/29/2014&lt;br /&gt;
| Rovinj, Croatia&lt;br /&gt;
| Fourth European ROMS workshop&lt;br /&gt;
| 66&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2014/pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 10/17/2016 - 10/20/2016&lt;br /&gt;
| Hobart, Tasmania&lt;br /&gt;
| Second Asia-Pacific ROMS meeting&lt;br /&gt;
| 66&lt;br /&gt;
| [https://www.myroms.org/Workshops/ROMS2016/pics/group.jpg Picture]&lt;br /&gt;
|-&lt;br /&gt;
| 07/29/2019 - 08/02/2019&lt;br /&gt;
| College Park, MD&lt;br /&gt;
| ROMS 4D-Var training workshop&lt;br /&gt;
| 29&lt;br /&gt;
| N/A&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Subversion&amp;diff=6676</id>
		<title>Subversion</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Subversion&amp;diff=6676"/>
		<updated>2025-01-17T16:43:40Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Subversion (Deprecated)&amp;lt;/div&amp;gt;&lt;br /&gt;
{{warning}} &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;&#039;&#039;&#039;Warning:&#039;&#039;&#039;&amp;lt;/span&amp;gt; The &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code is no longer distributed using [http://subversion.tigris.org Subversion](SVN). &#039;&#039;&#039;ROMS&#039;&#039;&#039; is exclusively distributed from its &#039;&#039;&#039;GitHub&#039;&#039;&#039; repository at [https://github.com/myroms https://github.com/myroms]. Updating the &#039;&#039;&#039;SVN&#039;&#039;&#039; repositories at [https://www.myroms.org https://www.myroms.org] has been discontinued but kept for historical reasons. The &#039;&#039;&#039;GitHub&#039;&#039;&#039; repository contains the full history of the &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code since 2002.&lt;br /&gt;
&lt;br /&gt;
There are SVN clients available for nearly every operating system and a list of popular clients can be found [http://subversion.tigris.org/links.html#clients here]. If you wish to use Subversion to maintain your own copy of ROMS you will also need an [http://subversion.tigris.org/project_packages.html svn server]. This page will help you get started with downloading ROMS with Subversion. There is also a way to download ROMS using git, described [[ROMS_git | elsewhere]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SVN Overview==&lt;br /&gt;
Subversion is a tool for managing software development that keeps track of who modified what and allows the return to a previous version if changes don&#039;t work as expected. All the ROMS/TOMS files are stored in a SVN repository on &#039;&#039;&#039;www.myroms.org&#039;&#039;&#039; with access controlled by requiring authentication with the same ROMS Username/Password combination assigned to registered users of the ROMS Forum.&lt;br /&gt;
&lt;br /&gt;
This SVN repository is the official version of the code which only the developers are allowed to change. Users should download the ROMS code to their local machines using an &#039;&#039;&#039;svn client&#039;&#039;&#039;.  Don&#039;t attempt to use a regular web browser to browse or download files from the SVN repository - there are much better tools for interacting with the code repository. See the notes below under the heading &#039;&#039;&#039;View the Repository&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users always check out the current &#039;&#039;trunk&#039;&#039; version since this has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; version is kept largely as an historical record of stable releases at the conclusion of major code upgrades. &lt;br /&gt;
&lt;br /&gt;
Below is a general description of how subversion works. Please look at the [http://svnbook.red-bean.com/ svn book] for more detailed information. Brief instructions for using two GUI clients (one for PC and one for Linux) we&#039;ve tried are included.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you checkout the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a Subversion repository, &#039;&#039;&#039;svn client&#039;&#039;&#039; software must be installed on your local machine. If you are compiling subversion on your own be sure to build it with &#039;&#039;&#039;SSL support&#039;&#039;&#039; or you will not be able to download the ROMS source code. Most Linux distributions come with subversion (the command name is &#039;&#039;&#039;svn&#039;&#039;&#039;), so shell commands may be used without installing additional software. If your username on your local computer is not the same as your ROMS username you will need to pass the &#039;&#039;&#039;--username &amp;lt;username&amp;gt;&#039;&#039;&#039; option to &#039;&#039;&#039;svn&#039;&#039;&#039;; an example is given below. The general form of subversion commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn&amp;lt;/span&amp;gt; action from to {optional_qualifiers} &lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;trunk&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/trunk&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If your &#039;&#039;&#039;username&#039;&#039;&#039; on your local computer is not the same as your ROMS username you will need to pass the &#039;&#039;&#039;--username&#039;&#039;&#039; option to &#039;&#039;&#039;svn&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout --username joe_roms &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/trunk&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Files for test cases and other repositories===&lt;br /&gt;
There is an additional repository that provides idealized [[Test Cases]] and realistic applications to introduce you to ROMS many capabilities. You may use these examples as a guideline in setting up your own application. Currently, this repository requires &#039;&#039;&#039;~388MB&#039;&#039;&#039; of disk space. This is because the realistic applications require several input NetCDF files. To checkout this repository, enter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/test&amp;lt;/nowiki&amp;gt; MyTest&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly, to check-out the files from the ROMS repository &#039;&#039;&#039;matlab&#039;&#039;&#039; (official scripts), enter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/matlab&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;plot&#039;&#039;&#039; (NCAR&#039;s library-based plotting package), enter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/plot&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;branches&#039;&#039;&#039;, &#039;&#039;&#039;plot&#039;&#039;&#039;, &#039;&#039;&#039;matlab&#039;&#039;&#039;, &#039;&#039;&#039;tags&#039;&#039;&#039;, &#039;&#039;&#039;test&#039;&#039;&#039;, and &#039;&#039;&#039;trunk&#039;&#039;&#039;, (this is not recommended because it takes a long time to complete) enter:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You only check out once, after that, a hidden directory called &#039;&#039;&#039;.svn&#039;&#039;&#039; exists to keep track of the source, destination and a bunch of other information. Your username and password will also be saved. For more detail on command line use and syntax, see the [http://svnbook.red-bean.com/ svn book].&lt;br /&gt;
&lt;br /&gt;
Several GUI front-ends to subversion exist, allowing the user to have visual prompts to help them manage their files.&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn update&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Subversion will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
===Code changes===&lt;br /&gt;
&lt;br /&gt;
As you use ROMS, you may find yourself adding new files and new chunks of code to existing files. Unless you are a developer with write access to the repository at www.myroms.org, you have no easy way to save your changes within the svn framework, since any one directory can only point to one repository. To keep getting updates from the trunk, you must keep using the svn server at myroms.org. At the very least, saving a tarball before fetching major updates is a prudent step. A more organized approach to revision control for your own files can be achieved by using [http://git-scm.com/ git].&lt;br /&gt;
&lt;br /&gt;
===Conflicts===&lt;br /&gt;
&lt;br /&gt;
Sometimes when you make changes to your copy of the ROMS code, those changes will conflict with changes made to the repository (the code that resides at &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;). This means that the changes from the server overlapped with your own, and now you have to manually choose between them.&lt;br /&gt;
&lt;br /&gt;
Whenever a conflict occurs, three things typically occur to assist you in resolving that conflict:&lt;br /&gt;
:*Subversion halts during the update, offering you several choices, and remembers that the file is in a state of conflict if you don&#039;t clear it right then.&lt;br /&gt;
:*If Subversion considers the file to be mergeable, it places conflict markers (special strings of text which delimit the “sides” of the conflict, usually &amp;quot;&amp;lt;&amp;quot; and &amp;quot;&amp;gt;&amp;quot; characters) into the file to visibly demonstrate the overlapping areas.&lt;br /&gt;
:*For every conflicted file, Subversion places three extra unversioned (not under Subversion control) files in your working copy:&lt;br /&gt;
::*&#039;&#039;&#039;filename.mine:&#039;&#039;&#039; This is your file as it existed in your working copy (local copy) before you updated your working copy. This file has only your latest changes in it. (If Subversion considers the file to be unmergeable, then the .mine file isn&#039;t created, since it would be identical to the working file.)&lt;br /&gt;
::*&#039;&#039;&#039;filename.rOLDREV:&#039;&#039;&#039; This is the file that was the &#039;&#039;&#039;BASE&#039;&#039;&#039; revision before you updated your working copy. That is, the file that you checked out before you made your latest edits.&lt;br /&gt;
::*&#039;&#039;&#039;filename.rNEWREV:&#039;&#039;&#039; This is the file that your Subversion client just received from the server when you updated your working copy. This file corresponds to the HEAD (latest) revision of the repository.&lt;br /&gt;
&lt;br /&gt;
For example, let&#039;s say you checked out revision 280 and made some changes to &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;User/Functionals/ana_hmixcoef.h&amp;lt;/span&amp;gt;. Now you want to update your ROMS source code to take advantage of a new algorithm but when you run &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn update&amp;lt;/span&amp;gt; your &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;ana_hmixcoef.h&amp;lt;/span&amp;gt; is now in conflict with the new version in the repository.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn update&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;U Version&amp;lt;br&amp;gt;U ROMS/Modules/mod_mixing.F&amp;lt;br&amp;gt;U ROMS/Functionals/ana_hmixcoef.h&amp;lt;br&amp;gt;C User/Functionals/ana_hmixcoef.h&amp;lt;br&amp;gt;Updated to revision 291.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above is with an older version of svn. The latest, greatest does this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;Conflict discovered in &#039;ROMS/Utility/inp_par.F&#039;.&amp;lt;br&amp;gt;Select: (p) postpone, (df) diff-full, (e) edit,&amp;lt;br&amp;gt;        (mc) mine-conflict, (tc) theirs-conflict,&amp;lt;br&amp;gt;        (s) show all options:&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selecting (p) will behave as the old version.&lt;br /&gt;
&lt;br /&gt;
If you get a conflict, you need to do one of three things:&lt;br /&gt;
:*Merge the conflicted text “by hand” by examining and editing the conflict markers within the file.&lt;br /&gt;
:*Copy one of the temporary files on top of your working file.&lt;br /&gt;
:*Run &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn revert &amp;lt;filename&amp;gt;&amp;lt;/span&amp;gt; to throw away all of your local changes.&lt;br /&gt;
&lt;br /&gt;
Once you&#039;ve resolved the conflict, you need to let Subversion know by running &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn resolved&amp;lt;/span&amp;gt;. This removes the three temporary files and Subversion no longer considers the file to be in a state of conflict. More on this below.&lt;br /&gt;
&lt;br /&gt;
====Merging Conflicts by Hand====&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; We recommend that you make a backup of the &#039;&#039;&#039;&amp;lt;filename&amp;gt;.mine&#039;&#039;&#039; file before you begin to be certain you don&#039;t accidentally lose your modifications.&lt;br /&gt;
&lt;br /&gt;
To merge your changes with those from the latest revision in the repository, open &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;User/Functionals/ana_hmixcoef.h&amp;lt;/span&amp;gt; in your favorite editor and look for a string of &amp;quot;&amp;lt;&amp;quot; characters. You should see something like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt; .mine&amp;lt;br&amp;gt;#ifndef DISTRIBUTE&amp;lt;br&amp;gt;      IF (Lanafile.and.(tile.eq.0)) THEN&amp;lt;br&amp;gt;#else&amp;lt;br&amp;gt;      IF (Lanafile) THEN&amp;lt;br&amp;gt;#endif&amp;lt;br&amp;gt;=======&amp;lt;br&amp;gt;#ifdef DISTRIBUTE&amp;lt;br&amp;gt;      IF (Lanafile) THEN&amp;lt;br&amp;gt;#else&amp;lt;br&amp;gt;      IF (Lanafile.and.(tile.eq.0)) THEN&amp;lt;br&amp;gt;#endif&amp;lt;br&amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt;&amp;amp;gt; .r291&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After comparing the two code blocks (separated by the &amp;quot;=&amp;quot; symbol), you decide that you prefer the logic from the repository so you remove the conflict markers and your code so the section now looks like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#ifdef DISTRIBUTE&amp;lt;br&amp;gt;      IF (Lanafile) THEN&amp;lt;br&amp;gt;#else&amp;lt;br&amp;gt;      IF (Lanafile.and.(tile.eq.0)) THEN&amp;lt;br&amp;gt;#endif&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can save the file and let Subversion know that you have resolved the conflict:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn resolved User/Functionals/ana_hmixcoef.h&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;Resolved conflicted state of &#039;User/Functionals/ana_hmixcoef.h&#039;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Copying a File Onto Your Working File====&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; We recommend that you make a backup of the &#039;&#039;&#039;&amp;lt;filename&amp;gt;.mine&#039;&#039;&#039; file before you begin to be certain you don&#039;t accidentally lose your modifications.&lt;br /&gt;
&lt;br /&gt;
If you get a conflict and decide that you want to throw out your changes, you can merely copy one of the temporary files created by Subversion over the file in your working copy. Let&#039;s say you want to use the new revision from the repository:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd User/Functionals&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ls ana_hmixcoef.h*&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;ana_hmixcoef.h  ana_hmixcoef.h.mine  ana_hmixcoef.h.r280  ana_hmixcoef.h.r291&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cp ana_hmixcoef.h.r291 ana_hmixcoef.h&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn resolved ana_hmixcoef.h&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;Resolved conflicted state of &#039;ana_hmixcoef.h&#039;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Punting: Using &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn revert&amp;lt;/span&amp;gt;====&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; We recommend that you make a backup of the &#039;&#039;&#039;&amp;lt;filename&amp;gt;.mine&#039;&#039;&#039; file before you begin to be certain you don&#039;t accidentally lose your modifications.&lt;br /&gt;
&lt;br /&gt;
If you get a conflict, and upon examination decide that you want to throw out your changes and start your edits again, just revert your changes:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd User/Functionals&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&amp;amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn revert ana_hmixcoef.h&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;Reverted &#039;ana_hmixcoef.h&#039;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when you revert a conflicted file, you don&#039;t have to run &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;svn resolved&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Using GUI SVN Clients==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you checkout the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most of the GUI &#039;&#039;&#039;svn clients&#039;&#039;&#039; are very similar to each other. In this example we will use eSVN, although several users have reported better luck with the free &amp;quot;Foundation Version&amp;quot; of [http://www.syntevo.com/smartsvn/index.jsp/ SmartSVN].&lt;br /&gt;
&lt;br /&gt;
===View the Repository===&lt;br /&gt;
The easiest way to view a repository is to simply look at it with [http://trac.edgewall.org/ Trac] in a web browser. Enter the URL:&lt;br /&gt;
&lt;br /&gt;
https://www.myroms.org/projects/src/browser&lt;br /&gt;
&lt;br /&gt;
You will be prompted for your ROMS username and password. This is also a good way to see individual files in the repository without actually downloading them.&lt;br /&gt;
&lt;br /&gt;
To view the repository with eSVN, Click on the file menu and choose &amp;quot;Browse Repository&amp;quot; and enter repository URL:&lt;br /&gt;
&lt;br /&gt;
[[Image:esvn_browser.jpg]]&lt;br /&gt;
&lt;br /&gt;
Click &amp;quot;Browse&amp;quot; and you should be able to look at the &#039;&#039;&#039;branches&#039;&#039;&#039;, &#039;&#039;&#039;tags&#039;&#039;&#039;, and &#039;&#039;&#039;trunk&#039;&#039;&#039;. You can navigate the repository with a web browser as described above, but cannot do any of the version control stuff that follows.&lt;br /&gt;
&lt;br /&gt;
===Checkout a Copy of the Trunk===&lt;br /&gt;
&lt;br /&gt;
This process brings a copy of the main code from the repository to your computer and places it under svn control. &amp;quot;Local Path&amp;quot; tells eSVN where you would like your copy of the source code to be located.&lt;br /&gt;
&lt;br /&gt;
[[Image:esvn_checkout.jpg]]&lt;br /&gt;
&lt;br /&gt;
You should see a bunch of text stream by like:&lt;br /&gt;
&lt;br /&gt;
    svn checkout &amp;lt;nowiki&amp;gt;https://www.myroms.org/svn/src/trunk&amp;lt;/nowiki&amp;gt; /home/ocean/src --username ocean &lt;br /&gt;
    --password ****** --non-interactive &lt;br /&gt;
    A /home/ocean/src/ROMS&lt;br /&gt;
    A /home/ocean/src/ROMS/License_ROMS.txt&lt;br /&gt;
    A /home/ocean/src/ROMS/Tangent&lt;br /&gt;
    A /home/ocean/src/ROMS/Tangent/tl_rho_eos.F&lt;br /&gt;
    A /home/ocean/src/ROMS/Tangent/tl_uv3dmix.F&lt;br /&gt;
    A /home/ocean/src/ROMS/Tangent/tl_def_his.F&lt;br /&gt;
    ...&lt;br /&gt;
    A /home/ocean/src/Compilers/UNICOS-mk-f90.mk&lt;br /&gt;
    A /home/ocean/src/Compilers/CYGWIN-g95.mk&lt;br /&gt;
    A /home/ocean/src/Compilers/OSF1-f90.mk&lt;br /&gt;
    A /home/ocean/src/Compilers/Darwin-ifort.mk&lt;br /&gt;
    A /home/ocean/src/Compilers/AIX-xlf.mk&lt;br /&gt;
    A /home/ocean/src/Compilers/SunOS-f95.mk&lt;br /&gt;
    A /home/ocean/src/makefile&lt;br /&gt;
    Checked out revision 11.&lt;br /&gt;
    successfully (0)&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Source_Code&amp;diff=6675</id>
		<title>Source Code</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Source_Code&amp;diff=6675"/>
		<updated>2025-01-17T16:43:09Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Regional Ocean Modeling System (ROMS)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This official community version of &#039;&#039;&#039;ROMS&#039;&#039;&#039; is developed and maintained at Rutgers, The State University of New Jersey, New Brunswick, New Jersey, USA. Currently, &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code is distributed using both [https://git-scm.com Git] and [https://subversion.apache.org Subversion](&#039;&#039;&#039;SVN&#039;&#039;&#039;). However, starting &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;January 1, 2025&amp;lt;/span&amp;gt;, &#039;&#039;&#039;ROMS&#039;&#039;&#039; will be exclusively distributed from its &#039;&#039;&#039;GitHub&#039;&#039;&#039; repository at [https://github.com/myroms https://github.com/myroms]. Updating the &#039;&#039;&#039;SVN&#039;&#039;&#039; repositories at [https://www.myroms.org https://www.myroms.org] will be discontinued but kept for historical reasons.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ROMS&#039;&#039;&#039; framework is intended for users interested in ocean modeling. It requires an extensive background in ocean dynamics, numerical modeling, and computers to configure, run, and analyze the results to ensure you get the correct solution for your application. Therefore, we highly recommend users register at [https://www.myroms.org https://www.myroms.org] and set up a &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;username&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;password&amp;lt;/span&amp;gt; to access the &#039;&#039;&#039;ROMS&#039;&#039;&#039; forum, email notifications for bugs/updates, technical support from the community, trac code maintenance history, tutorials, workshops, and publications. The User&#039;s &#039;&#039;&#039;ROMS&#039;&#039;&#039; forum has over 24,000 posts with helpful information. Technical support is limited to registered users. We do not provide user technical support, usage, or answers in &#039;&#039;&#039;GitHub&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ROMS GitHub&amp;lt;/span&amp;gt; repository also has its own wiki at [https://github.com/myroms/roms/wiki https://github.com/myroms/roms/wiki] with useful information and instructions. This &#039;&#039;&#039;GitHub&#039;&#039;&#039; version becomes the official &#039;&#039;&#039;Git&#039;&#039;&#039; repository for downloading, updating, improving, and correcting defects/bugs in the &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code. Also, it is the version used in the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ROMS-JEDI&amp;lt;/span&amp;gt; interface hosted at [https://github.com/JCSDA-internal https://github.com/JCSDA-internal], which is currently private.&lt;br /&gt;
&lt;br /&gt;
{{note}}&amp;lt;span class=&amp;quot;mediumOrchid&amp;quot;&amp;gt;Note:&amp;lt;/span&amp;gt; &#039;&#039;&#039;GitHub&#039;&#039;&#039; nowadays requires two-factor authentication!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;WARNING:&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;The updating of ROMS svn repositories has been discontinued as of&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;January 1, 2025&amp;lt;/span&amp;gt;==&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6674</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6674"/>
		<updated>2025-01-17T16:34:12Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Git&amp;lt;/div&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;ROMS&#039;&#039;&#039; source code is now exclusively distributed using [https://git-scm.com Git]. The &#039;&#039;&#039;GitHub&#039;&#039;&#039; repository includes the full history since 2002 of changes to the &#039;&#039;&#039;ROMS&#039;&#039;&#039; source code. There are command line and GUI Git clients available for nearly every operating system and a list of popular clients can be found [https://git-scm.com/downloads/guis here]. This page will help you get started with downloading &#039;&#039;&#039;ROMS&#039;&#039;&#039; with Git.&lt;br /&gt;
&lt;br /&gt;
==Git Overview==&lt;br /&gt;
Git is a free and open-source distributed version control system designed to handle everything from small to massive projects quickly and efficiently. All the ROMS files are stored in a Git repository on &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;github.com/myroms&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This Git repository is the official version of the code, which only developers are allowed to change. Users should download the ROMS code to their local machines using a &#039;&#039;&#039;git client&#039;&#039;&#039;. Don&#039;t attempt to use a regular web browser to browse or download files from the Git repository—there are much better tools for interacting with the code repository.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users check out the current &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;develop&amp;lt;/span&amp;gt; branch, which has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; are mainly kept as a historical record of stable releases after major code upgrades.&lt;br /&gt;
&lt;br /&gt;
If you are making changes yourself, keep them in a separate branch, leaving the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;develop&amp;lt;/span&amp;gt; branch to track changes from the source. Please check the [https://github.com/myroms/roms/wiki/Useful-GIT-Commands ROMS GitHub Wiki] for useful Git commands.&lt;br /&gt;
&lt;br /&gt;
Below is a general description of how Git works. For more detailed information, please review the [https://git-scm.com/book/en/v2 Pro Git] book. We have not tried GUI clients but may add brief how-tos for the most popular GUIs later.&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading any of &#039;&#039;&#039;ROMS&#039;&#039;&#039; repositories, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading some &#039;&#039;&#039;&#039;&#039;roms_test&#039;&#039;&#039;&#039;&#039; input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;more ~/.gitconf&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [User]&amp;lt;br /&amp;gt;        name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;        email = your@email&amp;lt;br /&amp;gt;   [credential]&amp;lt;br /&amp;gt;        helper = cache --timeout=7200&amp;lt;br /&amp;gt;        helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;   [filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;        clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;        smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;        process = git-lfs filter-process&amp;lt;br /&amp;gt;        required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you clone the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a git repository, &#039;&#039;&#039;git client&#039;&#039;&#039; software must be installed on your local machine. Most Linux distributions come with git, so shell commands may be used without installing additional software. The general form of git commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git&amp;lt;/span&amp;gt; action &amp;lt;repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;develop&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms.git&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If &#039;&#039;&#039;MyDir&#039;&#039;&#039; is omitted the code will be downloaded to a directory named &#039;&#039;&#039;roms&#039;&#039;&#039;. You only clone once because Git will keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [https://git-scm.com/book/en/v2 Pro Git] book.&lt;br /&gt;
&lt;br /&gt;
The idealized and realistic ROMS Test Cases and the Matlab processing software can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_test.git &amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_matlab.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We highly recommend that Users clone all the ROMS repositories from the same root directory in their computer and define the &#039;&#039;&#039;ROMS_ROOT_DIR&#039;&#039;&#039; variable in their computer shell login environment, specifying where the User cloned/downloaded the ROMS source code, Test Cases, and Matlab processing software. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git&lt;br /&gt;
&lt;br /&gt;
For bash shells:&lt;br /&gt;
    export ROMS_ROOT_DIR=MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
For csh/tcsh shells:&lt;br /&gt;
    setenv ROMS_ROOT_DIR  MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
The build scripts will use this environmental variable when compiling any of the ROMS Test Cases without the need to customize the location of the ROMS source code. Also, it is used for loading the path of Matlab scripts in the startup.m configuration file.&lt;br /&gt;
&lt;br /&gt;
===Git Hash Revision Information===  &lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; While this is not a required step, we highly recommend it to make bug reporting and tracking easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get Git hash revision information in the header for each file, we have created a Git filter that will insert the git hash of the last time a file was modified, similar to the Subversion &#039;&#039;&#039;&#039;&#039;$Id$&#039;&#039;&#039;&#039;&#039; keyword. In order for the filter to work, it has to be explicitly enabled by the user. After the git clone command from above completes change into &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;MyDir&amp;lt;/span&amp;gt; and execute the following:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.smudge &amp;quot;.git_filters/id.smudge %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.clean &amp;quot;.git_filters/id.clean %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to get the Git Id hashes to fill in, you will need to force the smudge filter to run on the source code you have already downloaded. This takes several minutes but only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;bash&#039;&#039;&#039; shells execute:	&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;$(git rev-parse --show-toplevel)&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;csh/tcsh&#039;&#039;&#039; shells execute:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;`git rev-parse --show-toplevel`&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you look at the top of any ROMS source file, you will see the Git commit hash for the last time that file was modified. For example, the first few lines of &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;ROMS/Modules/mod_ncparam.F&amp;lt;/span&amp;gt; look like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#include &amp;quot;cppdefs.h&amp;quot;&amp;lt;br /&amp;gt;      MODULE mod_ncparam&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!git $Id: caf970e3 2024-08-09 17:15:26 UTC arango $&amp;lt;br /&amp;gt;!================================================== Hernan G. Arango ===&amp;lt;br /&amp;gt;!  Copyright (c) 2002-2024 The ROMS/TOMS Group                         !&amp;lt;br /&amp;gt;!    Licensed under a MIT/X style license                              !&amp;lt;br /&amp;gt;!    See License_ROMS.md                                               !&amp;lt;br /&amp;gt;!=======================================================================&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the 8 character (hexidecimal) Git hash to show more information about that code update:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git show --name-only caf970e3&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
==Managing Your Own Modifications==&lt;br /&gt;
This assumes that you have a fresh clone of the myroms repository on the &#039;&#039;&#039;develop&#039;&#039;&#039; branch. You want to keep &#039;&#039;&#039;develop&#039;&#039;&#039; as a pure copy of the source version and keep your own changes in say the &#039;&#039;&#039;arctic&#039;&#039;&#039; branch. Start by creating a branch and switching to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git branch arctic&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can make whatever modifications you like (and test them out). To see what changed, you can use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git diff&amp;lt;/span&amp;gt;. To save your changes, do a:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git commit -a&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though if you add new files you will have to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git add&amp;lt;/span&amp;gt; them first.&lt;br /&gt;
&lt;br /&gt;
===Getting the Updates===&lt;br /&gt;
It is easy to fetch and merge the updates. Start by making sure your directory has been cleanly checked in with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt;.  Then you can update your &#039;&#039;&#039;develop&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout develop&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bring the changes into your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git merge develop&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will bring in everything that changed since your last &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;, so you might find it easier to keep on top of things by doing this often, not putting it off for years. You can also bring in changes one at a time with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git cherry-pick&amp;lt;/span&amp;gt;. Again, check the Pro Git book for much more information about all of these operations.&lt;br /&gt;
&lt;br /&gt;
Note that this will save your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch locally, under the .git directory. You can back this up as you would any other important files you have.&lt;br /&gt;
&lt;br /&gt;
==Useful Git Commands==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Command&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git add&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Add a file to the repository staging area &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch&#039;&#039;&#039;&lt;br /&gt;
| List all local branches (the asterisk denotes the current branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -a&#039;&#039;&#039;&lt;br /&gt;
| List all local and remote branches&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -d&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -D&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch forcefully&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -m&#039;&#039;&#039; &amp;lt;_OldName_&amp;gt; &amp;lt;_NewName_&amp;gt;&lt;br /&gt;
| Rename a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout -b&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Create a new local branch and switch to it&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Switch to an existing local or remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git clone&#039;&#039;&#039; &amp;lt;_RepositoryURL_&amp;gt;&lt;br /&gt;
| Clone a public repository&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot; &#039;&#039;&#039;-m&#039;&#039;&#039; &amp;quot;&amp;lt;_MessageURL_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files with two message lines&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit --amend -m&#039;&#039;&#039; &amp;quot;&amp;lt;_NewMessage_&amp;gt;&amp;quot;&lt;br /&gt;
| Amend previous commit message&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039;&lt;br /&gt;
| Show all changes between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Show changes for a specific file between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git difftool -d&#039;&#039;&#039; &amp;lt;_BranchName1_&amp;gt; &amp;lt;_BranchName2_&amp;gt;&lt;br /&gt;
| Compare the difference between two branches with &#039;&#039;&#039;`KDIFF3`&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git fetch&#039;&#039;&#039;&lt;br /&gt;
| Retrieve new work done by other people&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log&#039;&#039;&#039;&lt;br /&gt;
| View repository changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --oneline&#039;&#039;&#039;&lt;br /&gt;
| Show the list of commits in one-line format&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --summary&#039;&#039;&#039;&lt;br /&gt;
| View repository detailed changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git merge --no-ff --no-commit&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Merge a branch into the active branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git pull&#039;&#039;&#039;&lt;br /&gt;
| Update local repository or branch to the newest origin commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push origin --delete&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push -u origin&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Push changes to the remote repository (and remember the branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git reset --hard HEAD~1&#039;&#039;&#039;&lt;br /&gt;
| Undo last commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git revert&#039;&#039;&#039; &amp;lt;_CommitID_&amp;gt;&lt;br /&gt;
| Revert commit changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git status&#039;&#039;&#039;&lt;br /&gt;
| Check/display changes to the repository or particular branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git tag&#039;&#039;&#039;&lt;br /&gt;
| List all tags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complicated Commands==&lt;br /&gt;
&lt;br /&gt;
If a branch is renamed in a repository on GitHub, the local clone on a computer needs to updated:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git branch -m OldName NewName&amp;lt;br /&amp;gt;git fetch origin&amp;lt;br /&amp;gt;git branch -u origin/NewName NewName&amp;lt;br /&amp;gt;git remote set-head origin -a&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to merge changes in the &#039;&#039;&#039;feature/name1&#039;&#039;&#039; branch into the &#039;&#039;&#039;feature/name2&#039;&#039;&#039; branch:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git checkout feature/name1&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;git checkout feature/name2&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;git merge --no-ff --no-commit feature/name1&amp;lt;br /&amp;gt;git commit -am &amp;quot;Merging feature/name1 into feature/name2&amp;quot; -m &amp;quot;MessageURL&amp;quot;&amp;lt;br /&amp;gt;git difftool -d feature/name1 feature/name2&amp;lt;br /&amp;gt;git push -u origin feature/name2&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6673</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6673"/>
		<updated>2025-01-16T19:22:47Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6672</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6672"/>
		<updated>2025-01-06T19:58:00Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;iframe style=&amp;quot;border: none;&amp;quot; src=&amp;quot;https://free.timeanddate.com/countdown/i9e6b3oc/n5276/cf12/cm0/cu4/ct0/cs1/ca0/cr0/ss0/cacf33/cpcf33/pct/tcfff/fs100/szw320/szh135/tatUse%20myroms%20at%20github.com/tacf33/tptSVN%20repository%20no%20longer%20updated!/tpcf33/matSVN%20Support%20Ends%20in%3A/macf33/mptUse%20myroms%20at%20github.com/mpcf33/iso2025-01-01T00:00:00&amp;quot; width=&amp;quot;320&amp;quot; height=&amp;quot;70&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6671</id>
		<title>External Libraries</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6671"/>
		<updated>2025-01-06T19:38:46Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;External Libraries&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the ROMS configuration, several third-party libraries are required for linking and compiling an application.&lt;br /&gt;
&lt;br /&gt;
==ARPACK (ARnoldi PACKage)==&lt;br /&gt;
Serial and parallel legacy libraries applied to solve large eigenvalue problems using either the Implicitly Restarted Arnoldi Method (&#039;&#039;&#039;IRAM&#039;&#039;&#039;) for sparse matrices or the Lanczos algorithm for symmetric matrices.  It includes a subset of the &#039;&#039;&#039;BLAS&#039;&#039;&#039; and &#039;&#039;&#039;LAPACK&#039;&#039;&#039; libraries. Some of its functions are used in 4D-Var and the adjoint-based stability analysis propagators.&lt;br /&gt;
&lt;br /&gt;
To obtain &#039;&#039;&#039;ARPACK&#039;&#039;&#039;, execute the following:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/myroms/roms_libs.git&amp;lt;br /&amp;gt;&amp;gt; cd roms_libs/ARPACK&amp;lt;/div&amp;gt;&lt;br /&gt;
To compile, customize &#039;&#039;&#039;ARmake.inc&#039;&#039;&#039; for the desired compiler and its flags for the serial (&#039;&#039;&#039;FC&#039;&#039;&#039; and &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;) and parallel (&#039;&#039;&#039;PFC&#039;&#039;&#039; and &#039;&#039;&#039;PFFLAGS&#039;&#039;&#039;) versions of the library. Once configured type:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make lib plib&amp;lt;/div&amp;gt; to build &#039;&#039;&#039;libarpack.a&#039;&#039;&#039; and &#039;&#039;&#039;libparpack.a&#039;&#039;&#039;. Once the libraries are built you can move them anywhere you like to make it easier to tell ROMS where to find them through environmental variables or with the &#039;&#039;&#039;[[my_build_paths]]&#039;&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; Prior to SVN revision 1080 (July 23, 2021), &#039;&#039;&#039;ARPACK&#039;&#039;&#039; was distributed in the ROMS &#039;&#039;&#039;Lib/ARPACK&#039;&#039;&#039; subdirectory. For more information about why this was changed see TRAC ticket [https://www.myroms.org/projects/src/ticket/891 #891]&lt;br /&gt;
&lt;br /&gt;
==ESMF (Earth System Modeling Framework)==&lt;br /&gt;
High-performance, open-source library for grid interpolation, remapping, and data exchange between coupled Earth System Model (&#039;&#039;&#039;ESM&#039;&#039;&#039;) components.  It includes the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; (National Unified Operation Prediction Capability) layer that provides templates and protocols for sequential and concurrent coupling between ESM components.  The &#039;&#039;&#039;NUOPC&#039;&#039;&#039; &#039;&#039;cap&#039;&#039; file is a Fortran module layer that sits on top of each &#039;&#039;&#039;ESM&#039;&#039;&#039; component that provides the protocols and methods to interact and share data in a coupled system.&lt;br /&gt;
&lt;br /&gt;
ROMS supports version 8.0 or higher since the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; layer includes the native CoupleSets for &#039;&#039;&#039;ESM&#039;&#039;&#039; applications with nested grids. Various types of connections are possible, like &#039;&#039;&#039;nest-to-nest&#039;&#039;&#039;, &#039;&#039;&#039;fine-to-coarse&#039;&#039;&#039;, or &#039;&#039;&#039;coarse-to-fine&#039;&#039;&#039;.  The user decides which nested grids to connect.&lt;br /&gt;
&lt;br /&gt;
*Download from github:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/esmf-org/esmf.git esmf&amp;lt;br /&amp;gt;&amp;gt; cd esmf&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/ESMF_8_1_0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure with environment variables:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; export ESMF_DIR=/projects/dmcs_1/src/esmf&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMM=mvapich2&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMPILER=intel&amp;lt;br /&amp;gt;&amp;gt; export ESMF_BOPT=O&amp;lt;br /&amp;gt;&amp;gt; export ESMF_OPTLEVEL=3&amp;lt;br /&amp;gt;&amp;gt; export ESMF_ABI=64&amp;lt;br /&amp;gt;&amp;gt; export ESMF_INSTALL_PREFIX=/ESMF/install/dir ESMF_NETCDF=&amp;quot;/path/to/netcdf/bin/nc-config&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBPATH=&amp;quot;/path/to/netcdf/lib /path/to/hdf5/lib&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_SHARED_LIB_BUILD=OFF&amp;lt;br /&amp;gt;&amp;gt; export ESMF_MPIRUN=/path/to/cluster/submission/script&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;ESMF_MPIRUN&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-np&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -np N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-np&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -np # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 10&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MCT (Model Coupling Toolkit)==&lt;br /&gt;
&lt;br /&gt;
Open-source library distributed as a set of Fortran-90 modules for constructing a coupled model system from Earth System Model (ESM) components ([http://www-unix.mcs.anl.gov/mct Larson et al., 2004]). Each component model has its own grid and runs on its own set of processors. The MCT library provides protocols for decomposition and allocation of model grids among different processors, efficient transfer of data fields between the different models, and interpolation algorithms for the data fields that are transferred.&lt;br /&gt;
&lt;br /&gt;
The MCT library is used to couple ROMS atmosphere models (like WRF) and wave models (like SWAN and WW3). For example, SWAN sends to ROMS arrays of wave height, wavelength, average wave periods at the surface and near the bottom, wave propagation direction, near-bottom orbital velocity, and wave-energy dissipation rate. ROMS provides SWAN arrays of water depth, sea-surface elevation, and current velocity. Data exchange between SWAN and ROMS occurs at user-defined synchronization intervals. The frequency of data exchange depends on the application. If the exchanged fields fluctuate rapidly, more frequent synchronization is required. However, data exchange increases run time, so experience is required to determine the optimum synchronization interval for each application.&lt;br /&gt;
&lt;br /&gt;
MCT is available via github:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/MCSclimate/MCT&amp;lt;br /&amp;gt;&amp;gt; cd MCT&amp;lt;br /&amp;gt;&amp;gt; ./configure&amp;lt;br /&amp;gt;&amp;gt; make&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NetCDF (Network Common Data Form)==&lt;br /&gt;
&lt;br /&gt;
Open-source, machine-independent libraries for storing self-describing scientific data into portable, scalable, appendable, and sharable computer files. It provides &#039;&#039;&#039;API&#039;&#039;&#039; in several computer languages to create files, to write data into a file, to read data from the file, and access information about the dataset dimensions, variables, and attributes.  &lt;br /&gt;
&lt;br /&gt;
ROMS uses &#039;&#039;&#039;NetCDF&#039;&#039;&#039; for all its input and output data management. Its &#039;&#039;&#039;NetCDF3&#039;&#039;&#039; or &#039;&#039;&#039;NetCDF4&#039;&#039;&#039; type files can be processed using the standard library developed and distributed [http://doi.org/10.5065/D6H70CW6 UCAR/Unidata], the Parallel-IO (&#039;&#039;&#039;PIO&#039;&#039;&#039;) developed at ANL/NCAR ([https://doi.org/10.1177/1094342011428143 Dennis &#039;&#039;et al&#039;&#039;., 2012]; [https://www.researchgate.net/publication/348169990_THE_PARALLELIO_PIO_CFORTRAN_LIBRARIES_FOR_SCALABLE_HPC_PERFORMANCE Hartnett and Edwards, 2021]), or the Software for Cashing Output and Reads for Parallel I/O (&#039;&#039;&#039;SCORPIO&#039;&#039;&#039;) library available in [https://e3sm.org/scorpio-parallel-io-library E3SM]. We have migrated to the Fortran-90 &#039;&#039;&#039;API&#039;&#039;&#039; interface,  which consists of a library and one or two module files. See the [[makefile]] and [[build_roms| build script]] for how to tell ROMS where these are located. You will have to use a copy of the library and module files that were compiled using the same compiler you are using to compile ROMS - this is especially true for the module files.&lt;br /&gt;
&lt;br /&gt;
===Building NetCDF-4/HDF5===&lt;br /&gt;
NetCDF-4 uses HDF5 for it&#039;s underlying data format so you first need to build HDF5. We recommend 1.10.6 because 1.10.7 causes errors in the NetCDF-C test suite. Here we will describe how to build parallel versions for use on an HPC cluster. We will note what changes are necessary if you are building for a system that doesn&#039;t have parallel I/O.&lt;br /&gt;
&lt;br /&gt;
====Building HDF5====&lt;br /&gt;
* First, download &#039;&#039;&#039;HDF5&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/HDFGroup/hdf5&amp;lt;br /&amp;gt;&amp;gt; cd hdf5&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/hdf5-1_10_6&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort \&amp;lt;br /&amp;gt;      RUNPARALLEL=&amp;quot;srun --nodes=1 --ntasks=6 --cpus-per-task=1 --time=00:13:00 --export=ALL &amp;quot; \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/hdf5/1.10.6 --enable-static-exec --enable-shared=no \&amp;lt;br /&amp;gt;      --enable-parallel --disable-silent-rules --enable-fortran&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;RUNPARALLEL&#039;&#039; is only needed if your system uses a scheduler to run MPI jobs. The example here is for a SLURM system but you will need to adjust this for your cluster.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;RUNPARALLEL=...&#039;&#039; and &#039;&#039;--enable-parallel&#039;&#039; and change the CC, CXX, and FC to the corresponding serial compilers (e.g. gcc, g++, and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like &#039;&#039;&#039;shared libraries&#039;&#039;&#039; to be built, also remove &#039;&#039;--enable-shared=no&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-C====&lt;br /&gt;
The C and Fortran APIs for NetCDF are in separate packages and the C version must be built first.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/Unidata/netcdf-c&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-c&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.7.4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-Fortran====&lt;br /&gt;
Now we can build the Fortran API.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.5.3.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/Unidata/netcdf-fortran&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-fortan&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.5.3&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* There is a bug/typo in &#039;&#039;&#039;configure&#039;&#039;&#039; that makes &#039;&#039;nf-config&#039;&#039; report the wrong linking information to ROMS. To fix the error, edit the &#039;&#039;&#039;configure&#039;&#039;&#039; file (and &#039;&#039;&#039;configure.ac&#039;&#039;&#039; if you plan to run &#039;&#039;autoconf -i&#039;&#039; again) and change the line:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_FLIBS&amp;quot;&amp;lt;/div&amp;gt;to&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_LIBS&amp;quot;&amp;lt;/div&amp;gt; more details can be found [https://github.com/Unidata/netcdf-fortran/issues/270 here].&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039;. Note that we set &#039;&#039;prefix&#039;&#039; to the same as &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; so the C and Fortran libraries live together:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 FFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include -I/path/to/parallel/netcdf/4.7.4/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib -L/path/to/parallel/netcdf/4.7.4/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; should point to the submision script you created while building &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; and is only needed for running test on clusters that use scheduling systems like SLURM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile serial remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you are running on clusters that use scheduling systems like SLURM, you will need to edit 4 testing scripts replacing all occurrences of &#039;&#039;&#039;mpiexec&#039;&#039;&#039; with the full path to the submision script you created for &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; vi examples/F90/run_f90_par_examples.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf03_test4/run_f90_par_test.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test_03.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test.sh&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PIO (Parallel I/O)==&lt;br /&gt;
&lt;br /&gt;
Open-source parallel library for reading and writing distributed arrays to several scientific data formats like &#039;&#039;&#039;pNetCDF&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF3&#039;&#039;&#039;, and &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039;. &#039;&#039;&#039;PIO&#039;&#039;&#039; provides the flexibility to regulate the number of I/O tasks through data rearrangement between computational and  I/O processes to improve performance and memory usage. It allows both &#039;&#039;&#039;synchronous&#039;&#039;&#039; and &#039;&#039;&#039;asynchronous&#039;&#039;&#039; I/O. In &#039;&#039;&#039;synchronous mode&#039;&#039;&#039;, a subset of processes performs both I/O and computations (MPI intra-communications). Alternatively, in &#039;&#039;&#039;asynchronous mode&#039;&#039;&#039;, the I/O is carried out by a set of disjointed and dedicated processes (MPI inter-communications).  &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; or &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; library is intended for ROMS Message Passing Interface (MPI) applications running on a large number of processes in an HPC computer with a &#039;&#039;&#039;Parallel File System&#039;&#039;&#039; (Lustre, GPFS, and so on). It uses the &#039;&#039;&#039;MPI-IO&#039;&#039;&#039; interface to facilitate the partitioning of data across computational or dedicated I/O processes. Both  [https://github.com/NCAR/ParallelIO PIO] and [https://github.com/E3SM-Project/scorpio SCORPIO] will work with ROMS [https://www.myroms.org/projects/src/ticket/884 svn revision 1064] (May 10, 2021) or newer but we recommend &#039;&#039;&#039;PIO&#039;&#039;&#039; for its better performance. We recommend you read the manuals for all the build options, but below we show an example build process for both &#039;&#039;&#039;PIO&#039;&#039;&#039; and &#039;&#039;&#039;SCORPIO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Building PIO (autotools)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; can use NetCDF (version 4.6.1+) and/or PnetCDF (version 1.9.0+) for I/O. NetCDF may be built with or without netCDF-4 features. NetCDF is required for &#039;&#039;&#039;PIO&#039;&#039;&#039;, PnetCDF is optional. {{note}}However, the ROMS build system assumes that &#039;&#039;&#039;PIO&#039;&#039;&#039; is built with PnetCDF support and will need customization if &#039;&#039;&#039;PIO&#039;&#039;&#039; is built without it.&lt;br /&gt;
&lt;br /&gt;
The NetCDF C library must be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; recently introduced a NetCDF integration option that allows standard NetCDF library calls to be implemented with the &#039;&#039;&#039;PIO&#039;&#039;&#039; library but ROMS Parallel I/O is not currently implemented this way. In order to build &#039;&#039;&#039;PIO&#039;&#039;&#039; with NetCDF integration, you will need NetCDF version 4.7.4 or higher. However, the Fortran API integration has not been implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library can be built with the classic Autotools or Cmake. For &#039;&#039;&#039;PIO&#039;&#039;&#039; we show the Autotools procedure but will show Cmake for &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; in the next section.&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/releases/download/pio2_5_4/pio-2.5.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_5_4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you downloaded the gzipped tarball, you should run &#039;&#039;make clean&#039;&#039; because some Fortran .mod files are included and need to be removed:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make clean&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort CFLAGS=-O3 FFLAGS=-O3 FCFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/netcdf/include -I/path/to/hdf5/include -I/path/to/pnetcdf/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/netcdf/lib -L/path/to/hdf5/lib -L/path/to/pnetcdf/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lhdf5_hl -lhdf5 -lm -lcurl -lz&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/cluster/submission/script \&amp;lt;br /&amp;gt;      --prefix=/pio/install/path --enable-fortran --disable-timing \&amp;lt;br /&amp;gt;      --disable-silent-rules --disable-shared&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;{{warning}} &#039;&#039;&#039;Warning:&#039;&#039;&#039; If you are using the Intel compilers, you will probably need to remove &amp;quot;&#039;&#039;&#039;test_darray_async_many&#039;&#039;&#039;&amp;quot; from line 50 of &#039;&#039;&#039;test/cunit/run_tests.sh&#039;&#039;&#039; for &#039;&#039;make check&#039;&#039; to complete without errors. Details [https://github.com/NCAR/ParallelIO/issues/1867 here].&lt;br /&gt;
&lt;br /&gt;
===Building SCORPIO (Cmake)===&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;&#039;SORPIO&#039;&#039;&#039; recently released version 1.2.0 and 1.2.1 but ROMS has not been tested with these versions. It is likely that the new version will work fine with ROMS but use these new versions at your own risk.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCORPIO&#039;&#039;&#039; can use NetCDF (version 4.3.3+), PnetCDF (version 1.6.0+) or ADIOS (version 2.6.0+) for I/O. {{note}} ADIOS is not implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
Ideally, the NetCDF version should be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. Additionally, HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP. If your NetCDF is built with DAP support, you will need to edit &#039;&#039;&#039;cmake/TryNetCDF_DAP.c&#039;&#039;&#039;, changing line 8 from &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1&amp;lt;/div&amp;gt; to &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1 || NC_HAS_DAP2==1 || NC_HAS_DAP4==1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Download the &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; source code:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/E3SM-Project/scorpio&amp;lt;br /&amp;gt;&amp;gt; cd scorpio&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/scorpio-v1.1.6&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;If your NetCDF is built with DAP support, you will need to edit &#039;&#039;&#039;cmake/TryNetCDF_DAP.c&#039;&#039;&#039;, changing line 8 from &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1&amp;lt;/div&amp;gt; to &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1 || NC_HAS_DAP2==1 || NC_HAS_DAP4==1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;SCORPIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; cd ..&amp;lt;br /&amp;gt;&amp;gt; mkdir build_scorpio&amp;lt;br /&amp;gt;&amp;gt; cd build_scorpio&amp;lt;br /&amp;gt;&amp;gt; CC=mpicc CXX=mpicxx FC=mpifort cmake \&amp;lt;br /&amp;gt;    -DNetCDF_PATH=/path/to/netcdf \&amp;lt;br /&amp;gt;    -DPnetCDF_PATH=/path/to/pnetcdf \&amp;lt;br /&amp;gt;    -DMPIEXEC=/path/submission/scipt \&amp;lt;br /&amp;gt;    -DMPIEXEC_MAX_NUMPROCS=8 -DMPIEXEC_NUMPROC_FLAG=-n \&amp;lt;br /&amp;gt;    -DPIO_FILESYSTEM_HINTS=gpfs -DPIO_ENABLE_TIMING=OFF -DPIO_ENABLE_TESTS=ON \&amp;lt;br /&amp;gt;    -DCMAKE_INSTALL_PREFIX=/scorpio/install/path ../scorpio&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;-DMPIEXEC&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Compile, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 6&amp;lt;br /&amp;gt;&amp;gt; make -j 6 tests&amp;lt;br /&amp;gt;&amp;gt; ctests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Getting_Started&amp;diff=6667</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Getting_Started&amp;diff=6667"/>
		<updated>2024-12-27T20:46:34Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Getting Started&amp;lt;/div&amp;gt;&lt;br /&gt;
ROMS is a very complex model with many options and capabilities. ROMS is composed of many Fortran files (&#039;&#039;&#039;.F&#039;&#039;&#039;), a few header files (&#039;&#039;&#039;.h&#039;&#039;&#039;), various input script files (&#039;&#039;&#039;.in&#039;&#039;&#039;), a metadata variable definition file ([[varinfo.yaml]]), and a single [[makefile]]. The ROMS algorithms are distributed with the following directory structure:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Compilers/                     make configuration files&lt;br /&gt;
 Data/                          Input data root directory&lt;br /&gt;
     /ROMS/                     ROMS data root directory&lt;br /&gt;
          /CDL                  ROMS NetCDF metadata design&lt;br /&gt;
 Master/                        Main standalone and coupling programs&lt;br /&gt;
 ROMS/                          ROMS root directory&lt;br /&gt;
     /Adjoint/                  Adjoint model&lt;br /&gt;
             /Biology           Adjoint biology/ecosystem models&lt;br /&gt;
     /Bin                       Executable scripts&lt;br /&gt;
     /Drivers                   Computational drivers&lt;br /&gt;
     /External                  Standard input scripts&lt;br /&gt;
     /Functionals               Analytical expression header files&lt;br /&gt;
     /Include                   Test cases configuration header files&lt;br /&gt;
     /Modules                   Declaration modules&lt;br /&gt;
     /Nonlinear/                Nonlinear model&lt;br /&gt;
               /BBL             Bottom Boundary Layer formulation&lt;br /&gt;
               /Biology         Nonlinear biology/ecosystem models&lt;br /&gt;
               /SeaIce          SeaIce model&lt;br /&gt;
               /Sediment        Nonlinear sediment transport model&lt;br /&gt;
     /Obsolete                  Discontinued files&lt;br /&gt;
     /Programs                  Support programs&lt;br /&gt;
     /Representer/              Representer model&lt;br /&gt;
                 /Biology       Representer biology/ecosystem models&lt;br /&gt;
     /Tangent/                  Tangent linear model&lt;br /&gt;
             /Biology           Tangent linear biology/ecosystem models&lt;br /&gt;
     /Utility                   Generic utility files&lt;br /&gt;
 User/                          ROMS User interface root directory&lt;br /&gt;
     /External                  User standard input scripts&lt;br /&gt;
     /Functionals               User analytical expressions templates&lt;br /&gt;
     /Include                   User application header files&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ROMS uses [[C-preprocessing]] extensively to activate and/or deactivate&lt;br /&gt;
the various numerical and physical algorithm [[Options | options]]. It also uses&lt;br /&gt;
[[NetCDF]] to manage input and output data streams. It is highly&lt;br /&gt;
recommended that first time users learn the basics of NetCDF&lt;br /&gt;
before working with ROMS.&lt;br /&gt;
&lt;br /&gt;
==Basic Steps==&lt;br /&gt;
&lt;br /&gt;
* Register at the ROMS website ([http://www.myroms.org www.myroms.org]) to get access to the algorithms and other user privileges. Select a &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; which will be used in the future to login and post messages on the ROMS forum, algorithm downloads, and contributing to wikiROMS.&lt;br /&gt;
&lt;br /&gt;
* Make sure that you have the following required software in your computer before attempting to compile and run an application:&lt;br /&gt;
** [https://git-scm.com/ Git] client to download source&lt;br /&gt;
** Fortran 90 or Fortran 95 compiler&lt;br /&gt;
** [http://gcc.gnu.org/onlinedocs/cpp/ cpp] program for [[C-preprocessing]] ROMS source code.&lt;br /&gt;
** [http://www.gnu.org/software/make/ GNU make] version &#039;&#039;&#039;3.81&#039;&#039;&#039; or higher to compile ROMS&lt;br /&gt;
** [http://www.perl.org/ Perl] interpreter program&lt;br /&gt;
** [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] library, with Fortran 90 interface&lt;br /&gt;
** Message Passing Interface (MPI) library to run in parallel on a distributed-memory system&lt;br /&gt;
&lt;br /&gt;
* Use a [[Git]] client to &#039;&#039;&#039;clone&#039;&#039;&#039; the latest version of the ROMS &#039;&#039;&#039;develop&#039;&#039;&#039; branch. It is highly recommended that you obtain the code on the same system that you will be compiling and running the code on to avoid file format issues.&lt;br /&gt;
&lt;br /&gt;
* We recommend that you use the included &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; to compile and link ROMS. This will set up your build environment and execute the [[gmake|make]] command to build the default ROMS [[UPWELLING_CASE | upwelling]] application. This process allows you to avoid editing the [[makefile]]. Please visit the &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; page for more detailed instructions.&lt;br /&gt;
** You can also type &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;make&amp;lt;/span&amp;gt; at the top of the directory structure where the [[makefile]] is located but we do not recommend this process because it requires changing the ROMS files which can cause conflicts when you update you ROMS code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; To speed compilation, you may want to add the &#039;&#039;&#039;-j &amp;lt;n&amp;gt;&#039;&#039;&#039; flag to the build command (i.e. &#039;&#039;&#039;build.sh -j 4&#039;&#039;&#039;) where &#039;&#039;&#039;&amp;lt;n&amp;gt;&#039;&#039;&#039; is the number of processors you wish to compile with. Even single processor machines can benefit from the -j flag with &#039;&#039;&#039;&amp;lt;n&amp;gt;&amp;amp;nbsp;=&amp;amp;nbsp;2&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; To make sure your application can compile successfully, you might want to set &#039;&#039;&#039;USE_DEBUG&#039;&#039;&#039; to &#039;&#039;&#039;on&#039;&#039;&#039; in the [[build Script|build script]] since it will compile faster. Once your application can compile you can unset &#039;&#039;&#039;USE_DEBUG&#039;&#039;&#039; in order to create an optimized executable. Please visit the &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; page for more information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019) all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. If you are working with a ROMS release prior to revision 933 you will need to replace &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_upwelling.in&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsO&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanO&amp;lt;/span&amp;gt; in all commands below.&lt;br /&gt;
&lt;br /&gt;
* To run ROMS in serial, just type: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS &amp;amp;lt; ROMS/External/roms_upwelling.in &amp;amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;or to run in parallel (distributed-memory) on two processors: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -np 2 romsM ROMS/External/roms_upwelling.in &amp;amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;or to run in parrallel (shared-memory) on two processors:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;setenv OMP_NUM_THREAD 2&amp;lt;br&amp;gt;romsO &amp;lt; ROMS/External/roms_upwelling.in &amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Here, the the file &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ROMS/External/roms_upwelling.in&amp;lt;/span&amp;gt; contains all the input parameters to required by this application. Visit [[roms.in]] for more information.&lt;br /&gt;
&lt;br /&gt;
{{note}}Notice that in distributed-memory, the leading &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt; is omitted so all parallel threads can read and process this input script without any communications in between.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6666</id>
		<title>External Libraries</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=External_Libraries&amp;diff=6666"/>
		<updated>2024-12-27T20:46:18Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;External Libraries&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on the ROMS configuration, several third-party libraries are required for linking and compiling an application.&lt;br /&gt;
&lt;br /&gt;
==ARPACK (ARnoldi PACKage)==&lt;br /&gt;
Serial and parallel legacy libraries applied to solve large eigenvalue problems using either the Implicitly Restarted Arnoldi Method (&#039;&#039;&#039;IRAM&#039;&#039;&#039;) for sparse matrices or the Lanczos algorithm for symmetric matrices.  It includes a subset of the &#039;&#039;&#039;BLAS&#039;&#039;&#039; and &#039;&#039;&#039;LAPACK&#039;&#039;&#039; libraries. Some of its functions are used in 4D-Var and the adjoint-based stability analysis propagators.&lt;br /&gt;
&lt;br /&gt;
To obtain &#039;&#039;&#039;ARPACK&#039;&#039;&#039;, execute the following:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/myroms/roms_libraries&amp;lt;br /&amp;gt;&amp;gt; cd roms_libraries/ARPACK&amp;lt;/div&amp;gt;&lt;br /&gt;
To compile, customize &#039;&#039;&#039;ARmake.inc&#039;&#039;&#039; for the desired compiler and its flags for the serial (&#039;&#039;&#039;FC&#039;&#039;&#039; and &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;) and parallel (&#039;&#039;&#039;PFC&#039;&#039;&#039; and &#039;&#039;&#039;PFFLAGS&#039;&#039;&#039;) versions of the library. Once configured type:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make lib plib&amp;lt;/div&amp;gt; to build &#039;&#039;&#039;libarpack.a&#039;&#039;&#039; and &#039;&#039;&#039;libparpack.a&#039;&#039;&#039;. Once the libraries are built you can move them anywhere you like to make it easier to tell ROMS where to find them through environmental variables or with the &#039;&#039;&#039;[[my_build_paths]]&#039;&#039;&#039; script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; Prior to SVN revision 1080 (July 23, 2021), &#039;&#039;&#039;ARPACK&#039;&#039;&#039; was distributed in the ROMS &#039;&#039;&#039;Lib/ARPACK&#039;&#039;&#039; subdirectory. For more information about why this was changed see TRAC ticket [https://www.myroms.org/projects/src/ticket/891 #891]&lt;br /&gt;
&lt;br /&gt;
==ESMF (Earth System Modeling Framework)==&lt;br /&gt;
High-performance, open-source library for grid interpolation, remapping, and data exchange between coupled Earth System Model (&#039;&#039;&#039;ESM&#039;&#039;&#039;) components.  It includes the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; (National Unified Operation Prediction Capability) layer that provides templates and protocols for sequential and concurrent coupling between ESM components.  The &#039;&#039;&#039;NUOPC&#039;&#039;&#039; &#039;&#039;cap&#039;&#039; file is a Fortran module layer that sits on top of each &#039;&#039;&#039;ESM&#039;&#039;&#039; component that provides the protocols and methods to interact and share data in a coupled system.&lt;br /&gt;
&lt;br /&gt;
ROMS supports version 8.0 or higher since the &#039;&#039;&#039;NUOPC&#039;&#039;&#039; layer includes the native CoupleSets for &#039;&#039;&#039;ESM&#039;&#039;&#039; applications with nested grids. Various types of connections are possible, like &#039;&#039;&#039;nest-to-nest&#039;&#039;&#039;, &#039;&#039;&#039;fine-to-coarse&#039;&#039;&#039;, or &#039;&#039;&#039;coarse-to-fine&#039;&#039;&#039;.  The user decides which nested grids to connect.&lt;br /&gt;
&lt;br /&gt;
*Download from github:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/esmf-org/esmf.git esmf&amp;lt;br /&amp;gt;&amp;gt; cd esmf&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/ESMF_8_1_0&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure with environment variables:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; export ESMF_DIR=/projects/dmcs_1/src/esmf&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMM=mvapich2&amp;lt;br /&amp;gt;&amp;gt; export ESMF_COMPILER=intel&amp;lt;br /&amp;gt;&amp;gt; export ESMF_BOPT=O&amp;lt;br /&amp;gt;&amp;gt; export ESMF_OPTLEVEL=3&amp;lt;br /&amp;gt;&amp;gt; export ESMF_ABI=64&amp;lt;br /&amp;gt;&amp;gt; export ESMF_INSTALL_PREFIX=/ESMF/install/dir ESMF_NETCDF=&amp;quot;/path/to/netcdf/bin/nc-config&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_NETCDF_LIBPATH=&amp;quot;/path/to/netcdf/lib /path/to/hdf5/lib&amp;quot;&amp;lt;br /&amp;gt;&amp;gt; export ESMF_SHARED_LIB_BUILD=OFF&amp;lt;br /&amp;gt;&amp;gt; export ESMF_MPIRUN=/path/to/cluster/submission/script&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;ESMF_MPIRUN&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-np&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -np N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-np&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -np # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 10&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==MCT (Model Coupling Toolkit)==&lt;br /&gt;
&lt;br /&gt;
Open-source library distributed as a set of Fortran-90 modules for constructing a coupled model system from Earth System Model (ESM) components ([http://www-unix.mcs.anl.gov/mct Larson et al., 2004]). Each component model has its own grid and runs on its own set of processors. The MCT library provides protocols for decomposition and allocation of model grids among different processors, efficient transfer of data fields between the different models, and interpolation algorithms for the data fields that are transferred.&lt;br /&gt;
&lt;br /&gt;
The MCT library is used to couple ROMS atmosphere models (like WRF) and wave models (like SWAN and WW3). For example, SWAN sends to ROMS arrays of wave height, wavelength, average wave periods at the surface and near the bottom, wave propagation direction, near-bottom orbital velocity, and wave-energy dissipation rate. ROMS provides SWAN arrays of water depth, sea-surface elevation, and current velocity. Data exchange between SWAN and ROMS occurs at user-defined synchronization intervals. The frequency of data exchange depends on the application. If the exchanged fields fluctuate rapidly, more frequent synchronization is required. However, data exchange increases run time, so experience is required to determine the optimum synchronization interval for each application.&lt;br /&gt;
&lt;br /&gt;
MCT is available via github:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/MCSclimate/MCT&amp;lt;br /&amp;gt;&amp;gt; cd MCT&amp;lt;br /&amp;gt;&amp;gt; ./configure&amp;lt;br /&amp;gt;&amp;gt; make&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==NetCDF (Network Common Data Form)==&lt;br /&gt;
&lt;br /&gt;
Open-source, machine-independent libraries for storing self-describing scientific data into portable, scalable, appendable, and sharable computer files. It provides &#039;&#039;&#039;API&#039;&#039;&#039; in several computer languages to create files, to write data into a file, to read data from the file, and access information about the dataset dimensions, variables, and attributes.  &lt;br /&gt;
&lt;br /&gt;
ROMS uses &#039;&#039;&#039;NetCDF&#039;&#039;&#039; for all its input and output data management. Its &#039;&#039;&#039;NetCDF3&#039;&#039;&#039; or &#039;&#039;&#039;NetCDF4&#039;&#039;&#039; type files can be processed using the standard library developed and distributed [http://doi.org/10.5065/D6H70CW6 UCAR/Unidata], the Parallel-IO (&#039;&#039;&#039;PIO&#039;&#039;&#039;) developed at ANL/NCAR ([https://doi.org/10.1177/1094342011428143 Dennis &#039;&#039;et al&#039;&#039;., 2012]; [https://www.researchgate.net/publication/348169990_THE_PARALLELIO_PIO_CFORTRAN_LIBRARIES_FOR_SCALABLE_HPC_PERFORMANCE Hartnett and Edwards, 2021]), or the Software for Cashing Output and Reads for Parallel I/O (&#039;&#039;&#039;SCORPIO&#039;&#039;&#039;) library available in [https://e3sm.org/scorpio-parallel-io-library E3SM]. We have migrated to the Fortran-90 &#039;&#039;&#039;API&#039;&#039;&#039; interface,  which consists of a library and one or two module files. See the [[makefile]] and [[build_roms| build script]] for how to tell ROMS where these are located. You will have to use a copy of the library and module files that were compiled using the same compiler you are using to compile ROMS - this is especially true for the module files.&lt;br /&gt;
&lt;br /&gt;
===Building NetCDF-4/HDF5===&lt;br /&gt;
NetCDF-4 uses HDF5 for it&#039;s underlying data format so you first need to build HDF5. We recommend 1.10.6 because 1.10.7 causes errors in the NetCDF-C test suite. Here we will describe how to build parallel versions for use on an HPC cluster. We will note what changes are necessary if you are building for a system that doesn&#039;t have parallel I/O.&lt;br /&gt;
&lt;br /&gt;
====Building HDF5====&lt;br /&gt;
* First, download &#039;&#039;&#039;HDF5&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.6/src/hdf5-1.10.6.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/HDFGroup/hdf5&amp;lt;br /&amp;gt;&amp;gt; cd hdf5&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/hdf5-1_10_6&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort \&amp;lt;br /&amp;gt;      RUNPARALLEL=&amp;quot;srun --nodes=1 --ntasks=6 --cpus-per-task=1 --time=00:13:00 --export=ALL &amp;quot; \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/hdf5/1.10.6 --enable-static-exec --enable-shared=no \&amp;lt;br /&amp;gt;      --enable-parallel --disable-silent-rules --enable-fortran&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;RUNPARALLEL&#039;&#039; is only needed if your system uses a scheduler to run MPI jobs. The example here is for a SLURM system but you will need to adjust this for your cluster.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;RUNPARALLEL=...&#039;&#039; and &#039;&#039;--enable-parallel&#039;&#039; and change the CC, CXX, and FC to the corresponding serial compilers (e.g. gcc, g++, and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like &#039;&#039;&#039;shared libraries&#039;&#039;&#039; to be built, also remove &#039;&#039;--enable-shared=no&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;HDF5&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make all_tests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-C====&lt;br /&gt;
The C and Fortran APIs for NetCDF are in separate packages and the C version must be built first.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-c-4.7.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/Unidata/netcdf-c&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-c&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.7.4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile &#039;&#039;&#039;serial&#039;&#039;&#039;, remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building NetCDF-Fortran====&lt;br /&gt;
Now we can build the Fortran API.&lt;br /&gt;
&lt;br /&gt;
* Download &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039; source code as a gzipped tarball or via git clone:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-fortran-4.5.3.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/Unidata/netcdf-fortran&amp;lt;br /&amp;gt;&amp;gt; cd netcdf-fortan&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/v4.5.3&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* There is a bug/typo in &#039;&#039;&#039;configure&#039;&#039;&#039; that makes &#039;&#039;nf-config&#039;&#039; report the wrong linking information to ROMS. To fix the error, edit the &#039;&#039;&#039;configure&#039;&#039;&#039; file (and &#039;&#039;&#039;configure.ac&#039;&#039;&#039; if you plan to run &#039;&#039;autoconf -i&#039;&#039; again) and change the line:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_FLIBS&amp;quot;&amp;lt;/div&amp;gt;to&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;NC_FLIBS=&amp;quot;-lnetcdff $NC_LIBS&amp;quot;&amp;lt;/div&amp;gt; more details can be found [https://github.com/Unidata/netcdf-fortran/issues/270 here].&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Configure &#039;&#039;&#039;NetCDF-Fortran&#039;&#039;&#039;. Note that we set &#039;&#039;prefix&#039;&#039; to the same as &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; so the C and Fortran libraries live together:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc FC=mpifort CFLAGS=-O3 FFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/parallel/hdf5/1.10.6/include -I/path/to/parallel/netcdf/4.7.4/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/parallel/hdf5/1.10.6/lib -L/path/to/parallel/netcdf/4.7.4/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lnetcdf -lhdf5_hl -lhdf5 -lm -lz -lcurl&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/job/submistion/script \&amp;lt;br /&amp;gt;      --prefix=/path/to/parallel/netcdf/4.7.4 \&amp;lt;br /&amp;gt;      --enable-parallel-tests --disable-shared --disable-silent-rules&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; should point to the submision script you created while building &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039; and is only needed for running test on clusters that use scheduling systems like SLURM.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; To compile serial remove &#039;&#039;--with-mpiexec&#039;&#039; and &#039;&#039;--enable-parallel-tests&#039;&#039; and change the CC, and FC to the corresponding serial compilers (e.g. gcc and gfortran).&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you would like shared libraries to be built, also remove &#039;&#039;--disable-shared&#039;&#039;.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* If you are running on clusters that use scheduling systems like SLURM, you will need to edit 4 testing scripts replacing all occurrences of &#039;&#039;&#039;mpiexec&#039;&#039;&#039; with the full path to the submision script you created for &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; vi examples/F90/run_f90_par_examples.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf03_test4/run_f90_par_test.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test_03.sh&amp;lt;br /&amp;gt;&amp;gt; vi nf_test4/run_f77_par_test.sh&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build, test, and install &#039;&#039;&#039;NetCDF-C&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==PIO (Parallel I/O)==&lt;br /&gt;
&lt;br /&gt;
Open-source parallel library for reading and writing distributed arrays to several scientific data formats like &#039;&#039;&#039;pNetCDF&#039;&#039;&#039;, &#039;&#039;&#039;NetCDF3&#039;&#039;&#039;, and &#039;&#039;&#039;NetCDF4/HDF5&#039;&#039;&#039;. &#039;&#039;&#039;PIO&#039;&#039;&#039; provides the flexibility to regulate the number of I/O tasks through data rearrangement between computational and  I/O processes to improve performance and memory usage. It allows both &#039;&#039;&#039;synchronous&#039;&#039;&#039; and &#039;&#039;&#039;asynchronous&#039;&#039;&#039; I/O. In &#039;&#039;&#039;synchronous mode&#039;&#039;&#039;, a subset of processes performs both I/O and computations (MPI intra-communications). Alternatively, in &#039;&#039;&#039;asynchronous mode&#039;&#039;&#039;, the I/O is carried out by a set of disjointed and dedicated processes (MPI inter-communications).  &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; or &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; library is intended for ROMS Message Passing Interface (MPI) applications running on a large number of processes in an HPC computer with a &#039;&#039;&#039;Parallel File System&#039;&#039;&#039; (Lustre, GPFS, and so on). It uses the &#039;&#039;&#039;MPI-IO&#039;&#039;&#039; interface to facilitate the partitioning of data across computational or dedicated I/O processes. Both  [https://github.com/NCAR/ParallelIO PIO] and [https://github.com/E3SM-Project/scorpio SCORPIO] will work with ROMS [https://www.myroms.org/projects/src/ticket/884 svn revision 1064] (May 10, 2021) or newer but we recommend &#039;&#039;&#039;PIO&#039;&#039;&#039; for its better performance. We recommend you read the manuals for all the build options, but below we show an example build process for both &#039;&#039;&#039;PIO&#039;&#039;&#039; and &#039;&#039;&#039;SCORPIO&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Building PIO (autotools)===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; can use NetCDF (version 4.6.1+) and/or PnetCDF (version 1.9.0+) for I/O. NetCDF may be built with or without netCDF-4 features. NetCDF is required for &#039;&#039;&#039;PIO&#039;&#039;&#039;, PnetCDF is optional. {{note}}However, the ROMS build system assumes that &#039;&#039;&#039;PIO&#039;&#039;&#039; is built with PnetCDF support and will need customization if &#039;&#039;&#039;PIO&#039;&#039;&#039; is built without it.&lt;br /&gt;
&lt;br /&gt;
The NetCDF C library must be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PIO&#039;&#039;&#039; recently introduced a NetCDF integration option that allows standard NetCDF library calls to be implemented with the &#039;&#039;&#039;PIO&#039;&#039;&#039; library but ROMS Parallel I/O is not currently implemented this way. In order to build &#039;&#039;&#039;PIO&#039;&#039;&#039; with NetCDF integration, you will need NetCDF version 4.7.4 or higher. However, the Fortran API integration has not been implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;PIO&#039;&#039;&#039; library can be built with the classic Autotools or Cmake. For &#039;&#039;&#039;PIO&#039;&#039;&#039; we show the Autotools procedure but will show Cmake for &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; in the next section.&lt;br /&gt;
&lt;br /&gt;
*First download the &#039;&#039;&#039;PIO&#039;&#039;&#039; source code as a gzipped tarball or via &#039;&#039;git clone&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; wget https://github.com/NCAR/ParallelIO/releases/download/pio2_5_4/pio-2.5.4.tar.gz&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/NCAR/ParallelIO&amp;lt;br /&amp;gt;&amp;gt; cd ParallelIO&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/pio2_5_4&amp;lt;br /&amp;gt;&amp;gt; autoconf -i&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you downloaded the gzipped tarball, you should run &#039;&#039;make clean&#039;&#039; because some Fortran .mod files are included and need to be removed:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make clean&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; ./configure CC=mpicc CXX=mpicxx FC=mpifort CFLAGS=-O3 FFLAGS=-O3 FCFLAGS=-O3 \&amp;lt;br /&amp;gt;      CPPFLAGS=&amp;quot;-I/path/to/netcdf/include -I/path/to/hdf5/include -I/path/to/pnetcdf/include&amp;quot; \&amp;lt;br /&amp;gt;      LDFLAGS=&amp;quot;-L/path/to/netcdf/lib -L/path/to/hdf5/lib -L/path/to/pnetcdf/lib&amp;quot; \&amp;lt;br /&amp;gt;      LIBS=&amp;quot;-lhdf5_hl -lhdf5 -lm -lcurl -lz&amp;quot; \&amp;lt;br /&amp;gt;      --with-mpiexec=/path/to/cluster/submission/script \&amp;lt;br /&amp;gt;      --prefix=/pio/install/path --enable-fortran --disable-timing \&amp;lt;br /&amp;gt;      --disable-silent-rules --disable-shared&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;--with-mpiexec&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Build, test, and install &#039;&#039;&#039;PIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 5&amp;lt;br /&amp;gt;&amp;gt; make check&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;{{warning}} &#039;&#039;&#039;Warning:&#039;&#039;&#039; If you are using the Intel compilers, you will probably need to remove &amp;quot;&#039;&#039;&#039;test_darray_async_many&#039;&#039;&#039;&amp;quot; from line 50 of &#039;&#039;&#039;test/cunit/run_tests.sh&#039;&#039;&#039; for &#039;&#039;make check&#039;&#039; to complete without errors. Details [https://github.com/NCAR/ParallelIO/issues/1867 here].&lt;br /&gt;
&lt;br /&gt;
===Building SCORPIO (Cmake)===&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; &#039;&#039;&#039;SORPIO&#039;&#039;&#039; recently released version 1.2.0 and 1.2.1 but ROMS has not been tested with these versions. It is likely that the new version will work fine with ROMS but use these new versions at your own risk.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCORPIO&#039;&#039;&#039; can use NetCDF (version 4.3.3+), PnetCDF (version 1.6.0+) or ADIOS (version 2.6.0+) for I/O. {{note}} ADIOS is not implemented in ROMS.&lt;br /&gt;
&lt;br /&gt;
Ideally, the NetCDF version should be built with MPI, which requires that it be linked with an MPI-enabled version of HDF5. Optionally, NetCDF can be built with DAP support, which introduces a dependency on CURL. Additionally, HDF5, itself, introduces dependencies on LIBZ and (optionally) SZIP. If your NetCDF is built with DAP support, you will need to edit &#039;&#039;&#039;cmake/TryNetCDF_DAP.c&#039;&#039;&#039;, changing line 8 from &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1&amp;lt;/div&amp;gt; to &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1 || NC_HAS_DAP2==1 || NC_HAS_DAP4==1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Download the &#039;&#039;&#039;SCORPIO&#039;&#039;&#039; source code:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; git clone https://github.com/E3SM-Project/scorpio&amp;lt;br /&amp;gt;&amp;gt; cd scorpio&amp;lt;br /&amp;gt;&amp;gt; git checkout tags/scorpio-v1.1.6&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;If your NetCDF is built with DAP support, you will need to edit &#039;&#039;&#039;cmake/TryNetCDF_DAP.c&#039;&#039;&#039;, changing line 8 from &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1&amp;lt;/div&amp;gt; to &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#if NC_HAS_DAP==1 || NC_HAS_DAP2==1 || NC_HAS_DAP4==1&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Configure &#039;&#039;&#039;SCORPIO&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; cd ..&amp;lt;br /&amp;gt;&amp;gt; mkdir build_scorpio&amp;lt;br /&amp;gt;&amp;gt; cd build_scorpio&amp;lt;br /&amp;gt;&amp;gt; CC=mpicc CXX=mpicxx FC=mpifort cmake \&amp;lt;br /&amp;gt;    -DNetCDF_PATH=/path/to/netcdf \&amp;lt;br /&amp;gt;    -DPnetCDF_PATH=/path/to/pnetcdf \&amp;lt;br /&amp;gt;    -DMPIEXEC=/path/submission/scipt \&amp;lt;br /&amp;gt;    -DMPIEXEC_MAX_NUMPROCS=8 -DMPIEXEC_NUMPROC_FLAG=-n \&amp;lt;br /&amp;gt;    -DPIO_FILESYSTEM_HINTS=gpfs -DPIO_ENABLE_TIMING=OFF -DPIO_ENABLE_TESTS=ON \&amp;lt;br /&amp;gt;    -DCMAKE_INSTALL_PREFIX=/scorpio/install/path ../scorpio&amp;lt;/div&amp;gt;{{note}} Note that &#039;&#039;-DMPIEXEC&#039;&#039; is only needed for running test on clusters that use scheduling systems like SLURM. Your submission script should take &#039;&#039;&#039;-n&#039;&#039;&#039;, &#039;&#039;&#039;N&#039;&#039;&#039; (number of processes requested), and &#039;&#039;&#039;programName&#039;&#039;&#039; (in that order) as arguments to construct the appropriate command to run using the scheduling system on your cluster. A SLURM example is provided below:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# 1) &amp;lt;this_script&amp;gt; -n N prog&amp;lt;br /&amp;gt;#    runs N copies of executable &amp;quot;prog&amp;quot; in parallel. The script must hide all&amp;lt;br /&amp;gt;#    of the system specific details, such as going through a queueing system&amp;lt;br /&amp;gt;#    and/or calling a system specific mpirun script with modified arguments.&amp;lt;br /&amp;gt;#&amp;lt;br /&amp;gt;# 2) The output of the application must arrive at the calling shell via&amp;lt;br /&amp;gt;#    stdout and stderr.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;if [ &amp;quot;$1&amp;quot; != &amp;quot;-n&amp;quot; ]&amp;lt;br /&amp;gt;then&amp;lt;br /&amp;gt;        echo &amp;quot;Usage: mpirun -n # prog&amp;quot;&amp;lt;br /&amp;gt;        exit 1&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;num_procs=$2&amp;lt;br /&amp;gt;shift 2&amp;lt;br /&amp;gt;prog=$*&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;echo &amp;quot;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;quot;&amp;lt;br /&amp;gt;srun --mpi=pmi2 --partition=my_partition --nodes=1 --ntasks=${num_procs} --cpus-per-task=1 --time=00:10:00 --exclusive --export=ALL $prog&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Compile, test, and install:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; make -j 6&amp;lt;br /&amp;gt;&amp;gt; make -j 6 tests&amp;lt;br /&amp;gt;&amp;gt; ctests&amp;lt;br /&amp;gt;&amp;gt; make install&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6665</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6665"/>
		<updated>2024-11-13T16:59:20Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Git&amp;lt;/div&amp;gt;&lt;br /&gt;
ROMS source code is now distributed using [https://git-scm.com Git]. The [https://subversion.apache.org Subversion](SVN) repository is being phased out and will no longer be updated starting January 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt;, 2025. The GitHub repository includes the full history of changes to the ROMS source code. There are command line and GUI Git clients available for nearly every operating system and a list of popular clients can be found [https://git-scm.com/downloads/guis here]. This page will help you get started with downloading ROMS with Git.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; For instructions using the deprecated and soon to be discontinued myroms.org git repository, click [[Talk:Git|here]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; Details on using the deprecated and soon to be discontinued Subversion repository can be found [[Subversion|here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git Overview==&lt;br /&gt;
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. All the ROMS/TOMS files are stored in a Git repository on &#039;&#039;&#039;github.com&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This Git repository is the official version of the code which only the developers are allowed to change. Users should download the ROMS code to their local machines using a &#039;&#039;&#039;git client&#039;&#039;&#039;.  Don&#039;t attempt to use a regular web browser to browse or download files from the Git repository - there are much better tools for interacting with the code repository.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users always check out the current &#039;&#039;develop&#039;&#039; version since this has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; are kept largely as a historical record of stable releases at the conclusion of major code upgrades.&lt;br /&gt;
&lt;br /&gt;
If you are making changes of your own, keep them in a separate branch, leaving the &#039;&#039;develop&#039;&#039; branch to track changes from the source. Git makes it &#039;&#039;so&#039;&#039; much easier to manage your own modifications than svn for those of us without write permission on the repository.&lt;br /&gt;
&lt;br /&gt;
Below is a general description of how Git works. Please look at the [https://git-scm.com/book/en/v2 Pro Git] book for more detailed information. We have not yet tried any GUI clients but may add brief how-tos for the most popular GUIs at a later date.&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading any of &#039;&#039;&#039;ROMS&#039;&#039;&#039; repositories, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading some &#039;&#039;&#039;&#039;&#039;roms_test&#039;&#039;&#039;&#039;&#039; input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;more ~/.gitconf&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [User]&amp;lt;br /&amp;gt;        name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;        email = your@email&amp;lt;br /&amp;gt;   [credential]&amp;lt;br /&amp;gt;        helper = cache --timeout=7200&amp;lt;br /&amp;gt;        helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;   [filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;        clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;        smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;        process = git-lfs filter-process&amp;lt;br /&amp;gt;        required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you clone the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a git repository, &#039;&#039;&#039;git client&#039;&#039;&#039; software must be installed on your local machine. Most Linux distributions come with git, so shell commands may be used without installing additional software. The general form of git commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git&amp;lt;/span&amp;gt; action &amp;lt;repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;develop&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms.git&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If &#039;&#039;&#039;MyDir&#039;&#039;&#039; is omitted the code will be downloaded to a directory named &#039;&#039;&#039;roms&#039;&#039;&#039;. You only clone once because Git will keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [https://git-scm.com/book/en/v2 Pro Git] book.&lt;br /&gt;
&lt;br /&gt;
The idealized and realistic ROMS Test Cases and the Matlab processing software can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_test.git &amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_matlab.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We highly recommend that Users clone all the ROMS repositories from the same root directory in their computer and define the &#039;&#039;&#039;ROMS_ROOT_DIR&#039;&#039;&#039; variable in their computer shell login environment, specifying where the User cloned/downloaded the ROMS source code, Test Cases, and Matlab processing software. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git&lt;br /&gt;
&lt;br /&gt;
For bash shells:&lt;br /&gt;
    export ROMS_ROOT_DIR=MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
For csh/tcsh shells:&lt;br /&gt;
    setenv ROMS_ROOT_DIR  MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
The build scripts will use this environmental variable when compiling any of the ROMS Test Cases without the need to customize the location of the ROMS source code. Also, it is used for loading the path of Matlab scripts in the startup.m configuration file.&lt;br /&gt;
&lt;br /&gt;
===Git Hash Revision Information===  &lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; While this is not a required step, we highly recommend it to make bug reporting and tracking easier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to get Git hash revision information in the header for each file, we have created a Git filter that will insert the git hash of the last time a file was modified, similar to the Subversion &#039;&#039;&#039;&#039;&#039;$Id$&#039;&#039;&#039;&#039;&#039; keyword. In order for the filter to work, it has to be explicitly enabled by the user. After the git clone command from above completes change into &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;MyDir&amp;lt;/span&amp;gt; and execute the following:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.smudge &amp;quot;.git_filters/id.smudge %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git config filter.id.clean &amp;quot;.git_filters/id.clean %f&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to get the Git Id hashes to fill in, you will need to force the smudge filter to run on the source code you have already downloaded. This takes several minutes but only needs to be done once.&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;bash&#039;&#039;&#039; shells execute:	&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;$(git rev-parse --show-toplevel)&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For &#039;&#039;&#039;csh/tcsh&#039;&#039;&#039; shells execute:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;rm .git/index&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout HEAD -- &amp;quot;`git rev-parse --show-toplevel`&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you look at the top of any ROMS source file, you will see the Git commit hash for the last time that file was modified. For example, the first few lines of &amp;lt;span class=&amp;quot;limeGreen&amp;quot;&amp;gt;ROMS/Modules/mod_ncparam.F&amp;lt;/span&amp;gt; look like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#include &amp;quot;cppdefs.h&amp;quot;&amp;lt;br /&amp;gt;      MODULE mod_ncparam&amp;lt;br /&amp;gt;!&amp;lt;br /&amp;gt;!git $Id: caf970e3 2024-08-09 17:15:26 UTC arango $&amp;lt;br /&amp;gt;!================================================== Hernan G. Arango ===&amp;lt;br /&amp;gt;!  Copyright (c) 2002-2024 The ROMS/TOMS Group                         !&amp;lt;br /&amp;gt;!    Licensed under a MIT/X style license                              !&amp;lt;br /&amp;gt;!    See License_ROMS.md                                               !&amp;lt;br /&amp;gt;!=======================================================================&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use the 8 character (hexidecimal) Git hash to show more information about that code update:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git show --name-only caf970e3&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
==Managing Your Own Modifications==&lt;br /&gt;
This assumes that you have a fresh clone of the myroms repository on the &#039;&#039;&#039;develop&#039;&#039;&#039; branch. You want to keep &#039;&#039;&#039;develop&#039;&#039;&#039; as a pure copy of the source version and keep your own changes in say the &#039;&#039;&#039;arctic&#039;&#039;&#039; branch. Start by creating a branch and switching to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git branch arctic&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can make whatever modifications you like (and test them out). To see what changed, you can use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git diff&amp;lt;/span&amp;gt;. To save your changes, do a:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git commit -a&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though if you add new files you will have to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git add&amp;lt;/span&amp;gt; them first.&lt;br /&gt;
&lt;br /&gt;
===Getting the Updates===&lt;br /&gt;
It is easy to fetch and merge the updates. Start by making sure your directory has been cleanly checked in with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt;.  Then you can update your &#039;&#039;&#039;develop&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout develop&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bring the changes into your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git merge develop&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will bring in everything that changed since your last &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;, so you might find it easier to keep on top of things by doing this often, not putting it off for years. You can also bring in changes one at a time with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git cherry-pick&amp;lt;/span&amp;gt;. Again, check the Pro Git book for much more information about all of these operations.&lt;br /&gt;
&lt;br /&gt;
Note that this will save your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch locally, under the .git directory. You can back this up as you would any other important files you have.&lt;br /&gt;
&lt;br /&gt;
==Useful Git Commands==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Command&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git add&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Add a file to the repository staging area &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch&#039;&#039;&#039;&lt;br /&gt;
| List all local branches (the asterisk denotes the current branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -a&#039;&#039;&#039;&lt;br /&gt;
| List all local and remote branches&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -d&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -D&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch forcefully&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -m&#039;&#039;&#039; &amp;lt;_OldName_&amp;gt; &amp;lt;_NewName_&amp;gt;&lt;br /&gt;
| Rename a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout -b&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Create a new local branch and switch to it&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Switch to an existing local or remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git clone&#039;&#039;&#039; &amp;lt;_RepositoryURL_&amp;gt;&lt;br /&gt;
| Clone a public repository&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot; &#039;&#039;&#039;-m&#039;&#039;&#039; &amp;quot;&amp;lt;_MessageURL_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files with two message lines&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit --amend -m&#039;&#039;&#039; &amp;quot;&amp;lt;_NewMessage_&amp;gt;&amp;quot;&lt;br /&gt;
| Amend previous commit message&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039;&lt;br /&gt;
| Show all changes between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Show changes for a specific file between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git difftool -d&#039;&#039;&#039; &amp;lt;_BranchName1_&amp;gt; &amp;lt;_BranchName2_&amp;gt;&lt;br /&gt;
| Compare the difference between two branches with &#039;&#039;&#039;`KDIFF3`&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git fetch&#039;&#039;&#039;&lt;br /&gt;
| Retrieve new work done by other people&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log&#039;&#039;&#039;&lt;br /&gt;
| View repository changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --oneline&#039;&#039;&#039;&lt;br /&gt;
| Show the list of commits in one-line format&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --summary&#039;&#039;&#039;&lt;br /&gt;
| View repository detailed changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git merge --no-ff --no-commit&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Merge a branch into the active branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git pull&#039;&#039;&#039;&lt;br /&gt;
| Update local repository or branch to the newest origin commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push origin --delete&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push -u origin&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Push changes to the remote repository (and remember the branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git reset --hard HEAD~1&#039;&#039;&#039;&lt;br /&gt;
| Undo last commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git revert&#039;&#039;&#039; &amp;lt;_CommitID_&amp;gt;&lt;br /&gt;
| Revert commit changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git status&#039;&#039;&#039;&lt;br /&gt;
| Check/display changes to the repository or particular branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git tag&#039;&#039;&#039;&lt;br /&gt;
| List all tags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complicated Commands==&lt;br /&gt;
&lt;br /&gt;
If a branch is renamed in a repository on GitHub, the local clone on a computer needs to updated:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git branch -m OldName NewName&amp;lt;br /&amp;gt;git fetch origin&amp;lt;br /&amp;gt;git branch -u origin/NewName NewName&amp;lt;br /&amp;gt;git remote set-head origin -a&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to merge changes in the &#039;&#039;&#039;feature/name1&#039;&#039;&#039; branch into the &#039;&#039;&#039;feature/name2&#039;&#039;&#039; branch:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git checkout feature/name1&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;git checkout feature/name2&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;git merge --no-ff --no-commit feature/name1&amp;lt;br /&amp;gt;git commit -am &amp;quot;Merging feature/name1 into feature/name2&amp;quot; -m &amp;quot;MessageURL&amp;quot;&amp;lt;br /&amp;gt;git difftool -d feature/name1 feature/name2&amp;lt;br /&amp;gt;git push -u origin feature/name2&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=MediaWiki:Monobook.css&amp;diff=6664</id>
		<title>MediaWiki:Monobook.css</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=MediaWiki:Monobook.css&amp;diff=6664"/>
		<updated>2024-10-23T02:47:22Z</updated>

		<summary type="html">&lt;p&gt;Robertson: not switching to mathML so the indentation is no longer needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will affect users of the Monobook skin */&lt;br /&gt;
&lt;br /&gt;
.AdjointColor {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #9900CC;&lt;br /&gt;
}&lt;br /&gt;
.TangentColor {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF0000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.aquamarine {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #45AB74;&lt;br /&gt;
}&lt;br /&gt;
.darkTurquoise {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #00CED1;&lt;br /&gt;
}&lt;br /&gt;
.forestGreen {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #22AB22;&lt;br /&gt;
}&lt;br /&gt;
.limeGreen {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #32CD32;&lt;br /&gt;
}&lt;br /&gt;
.darkGoldenrod {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #BAA60B;&lt;br /&gt;
}&lt;br /&gt;
.peru {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #CDA53F;&lt;br /&gt;
}&lt;br /&gt;
.sandyBrown{&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #F4A460;&lt;br /&gt;
}&lt;br /&gt;
.salmon {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FAA072;&lt;br /&gt;
}&lt;br /&gt;
.hotPink {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF69B4;&lt;br /&gt;
}&lt;br /&gt;
.mediumOrchid {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #BA55D3;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.red {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF5555;&lt;br /&gt;
}&lt;br /&gt;
.orange {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF6600;&lt;br /&gt;
}&lt;br /&gt;
.brown {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #663333;&lt;br /&gt;
}&lt;br /&gt;
.green {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #009900;&lt;br /&gt;
}&lt;br /&gt;
.olive {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #929205;&lt;br /&gt;
}&lt;br /&gt;
.cyan {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #02CBC9;&lt;br /&gt;
}&lt;br /&gt;
.blue {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #0000FF;&lt;br /&gt;
}&lt;br /&gt;
.twilightBlue {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #6666CC;&lt;br /&gt;
}&lt;br /&gt;
.purple {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #9900CC;&lt;br /&gt;
}&lt;br /&gt;
.violet {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF00FF;&lt;br /&gt;
}&lt;br /&gt;
.black {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: black;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.alphabet {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   font-family: &amp;quot;Courier New&amp;quot;,monospace;&lt;br /&gt;
   border: solid black 1px;&lt;br /&gt;
   padding: 2px 6px 0 5px;&lt;br /&gt;
   background-color: #F1E8CA;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.source {&lt;br /&gt;
   background-color: #FFF;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.para {&lt;br /&gt;
   font-size: 10px;&lt;br /&gt;
   line-height: 10px;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* get the block equations out of the center*/&lt;br /&gt;
&lt;br /&gt;
math[mode=&amp;quot;display&amp;quot;], math[display=&amp;quot;block&amp;quot;] {&lt;br /&gt;
   text-align: left;&lt;br /&gt;
}&lt;br /&gt;
.mwe-math-mathml-display{&lt;br /&gt;
   padding-left: 7em;&lt;br /&gt;
   text-align:   left;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mwe-math-fallback-image-display{&lt;br /&gt;
   padding-left: 10em;&lt;br /&gt;
   text-align:   left;&lt;br /&gt;
   margin-left: 0 !important;&lt;br /&gt;
   margin-right: 0 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Support where MediaWiki lazy loaded images */&lt;br /&gt;
/*.mwe-math-mathml-inline ~ .lazy-image-placeholder,&lt;br /&gt;
.mwe-math-mathml-display ~ .lazy-image-placeholder,*/&lt;br /&gt;
/* Support where MediaWiki doesn&#039;t lazy load images */&lt;br /&gt;
/*.mwe-math-mathml-inline + .mwe-math-fallback-image-inline,&lt;br /&gt;
.mwe-math-mathml-display + .mwe-math-fallback-image-display {&lt;br /&gt;
   display: none !important;&lt;br /&gt;
}*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* equation numbers */&lt;br /&gt;
table.eqno {&lt;br /&gt;
   width:    100%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.eqno tr td:first-child + td {&lt;br /&gt;
   text-align: right;&lt;br /&gt;
   vertical-align: middle;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent table {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.matlab td {&lt;br /&gt;
   min-width:      95px;&lt;br /&gt;
   padding-right:  15px;&lt;br /&gt;
   vertical-align: top;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
img.thumbborder {&lt;br /&gt;
   border: 1px solid #dddddd;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*#toolbar {float: left;}*/&lt;br /&gt;
&lt;br /&gt;
#wikiPreview {&lt;br /&gt;
   height: 400px;&lt;br /&gt;
   overflow: auto !important;&lt;br /&gt;
   padding-bottom: 10px;&lt;br /&gt;
   margin-bottom: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#column-content {&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   height:100%;&lt;br /&gt;
   float: none;&lt;br /&gt;
   margin: 0 0 .6em 12.2em;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#content {&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   top: 2.8em;&lt;br /&gt;
   left: 12.2em;&lt;br /&gt;
   right: 0;&lt;br /&gt;
   bottom: 38px;&lt;br /&gt;
   padding: 0 1em 1.5em 1em;&lt;br /&gt;
   background: #f9f9f9 url(&#039;https://www.myroms.org/wiki/images/content-bg.jpg&#039;) 0 0 no-repeat fixed;&lt;br /&gt;
   color: black;&lt;br /&gt;
   overflow: auto;&lt;br /&gt;
   border: 1px solid #aaa;&lt;br /&gt;
   border-right: none;&lt;br /&gt;
   border-bottom: none;&lt;br /&gt;
   line-height: 1.5em;&lt;br /&gt;
   /*height: 100%;*/&lt;br /&gt;
   z-index: 2;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#sidebar {&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   left: 3px;&lt;br /&gt;
   top: 175px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body {&lt;br /&gt;
   font: x-small sans-serif;&lt;br /&gt;
   background: #f9f9f9 url(&#039;https://www.myroms.org/wiki/images/bg.jpg&#039;) 0 0 no-repeat;&lt;br /&gt;
   color: black;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   height: 100%;&lt;br /&gt;
   max-height: 100%;&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* scale back up to a sane default */&lt;br /&gt;
div#globalWrapper {&lt;br /&gt;
   font-size: 127%;&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   height: 100%;&lt;br /&gt;
   max-height: 100%;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   overflow: hidden;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a {&lt;br /&gt;
   text-decoration: none;&lt;br /&gt;
   color: #0098CD;&lt;br /&gt;
   background: none;&lt;br /&gt;
}&lt;br /&gt;
a:visited {&lt;br /&gt;
   color: #9932CC;&lt;br /&gt;
}&lt;br /&gt;
a.new {&lt;br /&gt;
   color: #45AB74 !important;&lt;br /&gt;
}&lt;br /&gt;
a.new:visited {&lt;br /&gt;
   color: #45AB74 !important;&lt;br /&gt;
}&lt;br /&gt;
#p-personal a.new {&lt;br /&gt;
   color: #03EB13;&lt;br /&gt;
}&lt;br /&gt;
#p-personal a.new:visited {&lt;br /&gt;
   color: #03EB13;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
h1, h2, h3, h4, h5, h6 {&lt;br /&gt;
   color: black;&lt;br /&gt;
   background: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding-top: .5em;&lt;br /&gt;
   padding-bottom: .17em;&lt;br /&gt;
   border-bottom: 2px solid #aaa;&lt;br /&gt;
}&lt;br /&gt;
h1 .editsection { font-size: 53%; font-weight: normal; }&lt;br /&gt;
h2 .editsection { font-size: 67%; font-weight: normal; }&lt;br /&gt;
&lt;br /&gt;
/* I don&#039;t think we ever used this so I am replacing it with the more&lt;br /&gt;
** specific div.code for the light green background 2022-04-29 - Robertson&lt;br /&gt;
code {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   margin-left: 3em;&lt;br /&gt;
}*/&lt;br /&gt;
div.code {&lt;br /&gt;
   white-space: pre;&lt;br /&gt;
   font-family: monospace;&lt;br /&gt;
   margin: 1em 0 1em 0;&lt;br /&gt;
   padding: .5em;&lt;br /&gt;
   border: 1px dashed #2f6fab;&lt;br /&gt;
   color: black;&lt;br /&gt;
   background-color: #F0FFF0;&lt;br /&gt;
   line-height: 11.5pt;&lt;br /&gt;
}&lt;br /&gt;
div.box {&lt;br /&gt;
   white-space: pre;&lt;br /&gt;
   font-family: monospace;&lt;br /&gt;
   margin: 1em 0 1em 0;&lt;br /&gt;
   padding: .5em;&lt;br /&gt;
   border: 1px dashed #2f6fab;&lt;br /&gt;
   color: black;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   line-height: 11.5pt;&lt;br /&gt;
}&lt;br /&gt;
pre {&lt;br /&gt;
	padding: 1em;&lt;br /&gt;
	border: 1px dashed #2f6fab;&lt;br /&gt;
	color: black;&lt;br /&gt;
	background-color: transparent;&lt;br /&gt;
	line-height: 1.1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.firstHeading {&lt;br /&gt;
   display: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   margin-bottom: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** content styles&lt;br /&gt;
*/&lt;br /&gt;
.alphabetlist {&lt;br /&gt;
   width:15px;&lt;br /&gt;
   text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* thumbnails */&lt;br /&gt;
div.thumb {&lt;br /&gt;
   margin-bottom: .5em;&lt;br /&gt;
   border-style: solid;&lt;br /&gt;
   border-color: white;&lt;br /&gt;
   border-width: 0px;&lt;br /&gt;
   width: auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.tleft {&lt;br /&gt;
   float: left;&lt;br /&gt;
   margin-right: .5em;&lt;br /&gt;
   border-width: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.portlet h3 {&lt;br /&gt;
   background: transparent;&lt;br /&gt;
   padding: 0 1em 0 .5em;&lt;br /&gt;
   display: inline;&lt;br /&gt;
   height: 1em;&lt;br /&gt;
   text-transform: none;&lt;br /&gt;
   font-size: 91%;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   white-space: nowrap;&lt;br /&gt;
   border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.pBody {&lt;br /&gt;
   font-size: 95%;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   color: black;&lt;br /&gt;
   border-collapse: collapse;&lt;br /&gt;
   border: 1px solid #000;&lt;br /&gt;
   padding: 0 .8em .3em .5em;&lt;br /&gt;
}&lt;br /&gt;
#p-cactions .pBody {&lt;br /&gt;
   border: none;&lt;br /&gt;
}&lt;br /&gt;
.pBody a {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #000000;&lt;br /&gt;
}&lt;br /&gt;
.pBody a:visited {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#lastmod {&lt;br /&gt;
   color: #000000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#viewcount {&lt;br /&gt;
   color: #000000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#privacy a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#about a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#disclaimer a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.portlet ul {&lt;br /&gt;
   line-height: 1.5em;&lt;br /&gt;
   list-style-type: square;&lt;br /&gt;
   list-style-image: none;&lt;br /&gt;
   font-size: 95%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** the navigation portlet&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#p-navigation {&lt;br /&gt;
   position: relative;&lt;br /&gt;
   z-index: 3;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation .pBody {&lt;br /&gt;
   padding-right: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation a {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   display: block;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation li.active a, #p-navigation li.active a:hover {&lt;br /&gt;
   text-decoration: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal li a {&lt;br /&gt;
	text-decoration: none;&lt;br /&gt;
	color: #13F3F3;&lt;br /&gt;
	padding-bottom: .2em;&lt;br /&gt;
	background: none;&lt;br /&gt;
}&lt;br /&gt;
#p-personal li a:hover {&lt;br /&gt;
	background-color: black;&lt;br /&gt;
	padding-bottom: .2em;&lt;br /&gt;
	text-decoration: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** footer&lt;br /&gt;
*/&lt;br /&gt;
div#footer {&lt;br /&gt;
   width: 800px;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   bottom: 0;&lt;br /&gt;
   left: 0;&lt;br /&gt;
   overflow: auto;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   border-top: none;&lt;br /&gt;
   border-bottom: none;&lt;br /&gt;
   margin: .6em 0 0 12.2em;&lt;br /&gt;
   padding: .4em 0 0 0;&lt;br /&gt;
   text-align: center;&lt;br /&gt;
   font-size: 90%;&lt;br /&gt;
   z-index: 10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.bib { text-indent: -2em; margin-left: 2em; }&lt;br /&gt;
&lt;br /&gt;
BODY.page-Bibliography p { text-indent: -2em; margin-left: 2em; }&lt;br /&gt;
&lt;br /&gt;
.title {&lt;br /&gt;
font-size: 155%;&lt;br /&gt;
font-weight: bold;&lt;br /&gt;
margin-bottom: .5em;&lt;br /&gt;
padding-top: .5em;&lt;br /&gt;
padding-bottom: .17em;&lt;br /&gt;
border-bottom: 2px solid #aaa;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.main {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   font-size: 13px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent {&lt;br /&gt;
   font-size: 16px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent ol li {&lt;br /&gt;
        padding-bottom: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent ol li ul li {&lt;br /&gt;
        padding-bottom: 0px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Fix special pages output */&lt;br /&gt;
.mw-specialpages-table td {&lt;br /&gt;
   padding-top: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#p-personal {&lt;br /&gt;
   padding-top: 8px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#p-logo {&lt;br /&gt;
   padding-top: 8px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#column-one{&lt;br /&gt;
   padding-top: unset;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Equations_of_Motion&amp;diff=6663</id>
		<title>Equations of Motion</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Equations_of_Motion&amp;diff=6663"/>
		<updated>2024-10-21T15:03:14Z</updated>

		<summary type="html">&lt;p&gt;Robertson: /* Vertical Boundary Conditions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Equations of Motion&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
The primitive equations in Cartesian coordinates are shown here. The momentum balance in the &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;- and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;-directions are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial u}{\partial t} + \vec{v} \cdot \nabla u - fv = - \frac{\partial \phi}{\partial x} - {\partial \over \partial z} \left( \overline{u&#039;w&#039;} - \nu {\partial u \over \partial z} \right)+ {\cal F}_u + {\cal D}_u &amp;lt;/math&amp;gt;&amp;lt;!--\eqno{(1)}--&amp;gt;&lt;br /&gt;
|(1)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial v}{\partial t} + \vec{v} \cdot \nabla v + fu = - \frac{\partial \phi}{\partial y} - {\partial \over \partial z} \left( \overline{v&#039;w&#039;} - \nu {\partial v \over \partial z} \right) + {\cal F}_v + {\cal D}_v &amp;lt;/math&amp;gt;&amp;lt;!--\eqno{(2)}--&amp;gt;&lt;br /&gt;
|(2)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The time evolution of a scalar concentration field, &amp;lt;math&amp;gt;C(x,y,z,t)&amp;lt;/math&amp;gt; (e.g. salinity, temperature, or nutrients), is governed by the advective-diffusive equation:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial C}{\partial t} + \vec{v} \cdot \nabla C = -{\partial \over \partial z} \left( \overline{C&#039;w&#039;} - \nu_\theta {\partial C \over \partial z} \right) + {\cal F}_C + {\cal D}_C &amp;lt;/math&amp;gt; &amp;lt;!--\eqno{(3)}--&amp;gt;&lt;br /&gt;
|(3)&lt;br /&gt;
|}&lt;br /&gt;
The equation of state is given by:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\rho = \rho(T,S,P) &amp;lt;/math&amp;gt;&amp;lt;!--\eqno{(4)}--&amp;gt;&lt;br /&gt;
|(4)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the Boussinesq approximation, density variations are neglected in the momentum equations except in their&lt;br /&gt;
contribution to the buoyancy force in the vertical momentum equation. &lt;br /&gt;
Under the hydrostatic approximation, it is further&lt;br /&gt;
assumed that the vertical pressure gradient balances the buoyancy&lt;br /&gt;
force:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial \phi}{\partial z} = -\frac{\rho g}{\rho_o} &amp;lt;/math&amp;gt;&amp;lt;!--\eqno{(5)}--&amp;gt;&lt;br /&gt;
|(5)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The final equation expresses the continuity equation&lt;br /&gt;
for an incompressible fluid:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z} = 0 &amp;lt;/math&amp;gt;&amp;lt;!--\eqno{(6)}--&amp;gt;&lt;br /&gt;
|(6)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the moment, the effects of forcing&lt;br /&gt;
and horizontal dissipation will be represented by the schematic terms &amp;lt;math&amp;gt;{\cal F}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;{\cal D}&amp;lt;/math&amp;gt;, respectively.  The horizontal and vertical mixing will&lt;br /&gt;
be described more fully in [[Horizontal Mixing]] and [[Vertical Mixing Parameterizations]].&lt;br /&gt;
The variables used are shown here:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| &amp;lt;math&amp;gt;{\cal D}_u, {\cal D}_v, {\cal D}_C&amp;lt;/math&amp;gt;&lt;br /&gt;
|style=&amp;quot;width: 350px;&amp;quot;| horizontal diffusive terms&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;{\cal F}_u, {\cal F}_v, {\cal F}_C&amp;lt;/math&amp;gt;&lt;br /&gt;
| forcing terms&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt;&lt;br /&gt;
| Coriolis parameter&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;&lt;br /&gt;
| acceleration of gravity&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;h(x,y)&amp;lt;/math&amp;gt;&lt;br /&gt;
| bottom depth&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\nu, \nu_\theta&amp;lt;/math&amp;gt;&lt;br /&gt;
| molecular viscosity and diffusivity&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;K_m, K_C&amp;lt;/math&amp;gt;&lt;br /&gt;
| vertical eddy viscosity and diffusivity&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;&lt;br /&gt;
| total pressure &amp;lt;math&amp;gt;P \approx -\rho_o gz&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\phi(x,y,z,t)&amp;lt;/math&amp;gt;&lt;br /&gt;
| dynamic pressure &amp;lt;math&amp;gt;\phi = \left(P/\rho_o \right)&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\rho_o + \rho(x,y,z,t)&amp;lt;/math&amp;gt;&lt;br /&gt;
| total &#039;&#039;in situ&#039;&#039; density&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;S(x,y,z,t)&amp;lt;/math&amp;gt;&lt;br /&gt;
| salinity&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;&lt;br /&gt;
| time &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;T(x,y,z,t)&amp;lt;/math&amp;gt;&lt;br /&gt;
| potential temperature&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;u,v,w&amp;lt;/math&amp;gt;&lt;br /&gt;
| the (&amp;lt;math&amp;gt;x,y,z&amp;lt;/math&amp;gt;) components of vector velocity &amp;lt;math&amp;gt;\vec{v}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;x,y&amp;lt;/math&amp;gt;&lt;br /&gt;
| horizontal coordinates&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt;&lt;br /&gt;
| vertical coordinate&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\zeta(x,y,t)&amp;lt;/math&amp;gt;&lt;br /&gt;
| the surface elevation&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the ocean, vertical mixing due to molecular viscosity is extremely weak compared to the turbulent mixing, so the terms involving &amp;lt;math&amp;gt;\nu&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\nu_\theta&amp;lt;/math&amp;gt; can be neglected. &lt;br /&gt;
&lt;br /&gt;
To close these equations, parameterizations of the Reynolds stresses and turbulent tracer fluxes are introduced as functions of the other variables and vertical turbulent eddy viscosity and eddy diffusivity coefficients, &amp;lt;math&amp;gt;K_M&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;K_C&amp;lt;/math&amp;gt;, respectively.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\overline{u&#039;w&#039;} = -K_M {\partial u \over \partial z};\qquad&lt;br /&gt;
\overline{v&#039;w&#039;} = -K_M {\partial v \over \partial z};\qquad&lt;br /&gt;
\overline{C&#039;w&#039;} = -K_C {\partial C \over \partial z}. &amp;lt;/math&amp;gt; &amp;lt;!--\eqno{(7)}--&amp;gt;&lt;br /&gt;
|(7)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
An overbar represents a time average and a prime represents a fluctuation about the mean.&lt;br /&gt;
&lt;br /&gt;
Details on ROMS options for computing &amp;lt;math&amp;gt;K_M&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;K_C&amp;lt;/math&amp;gt; are described in [[Vertical Mixing Parameterizations]].&lt;br /&gt;
&lt;br /&gt;
==Vertical Boundary Conditions==&lt;br /&gt;
The vertical boundary conditions can be prescribed as follows:&lt;br /&gt;
&lt;br /&gt;
:top (&amp;lt;math&amp;gt;z = \zeta(x,y,t))&amp;lt;/math&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{align}&amp;amp;K_m \, \frac{\partial u}{\partial z} = \tau^x_s (x,y,t) \\&lt;br /&gt;
&amp;amp;K_m \, \frac{\partial v}{\partial z} = \tau_s^y(x,y,t) \\&lt;br /&gt;
&amp;amp;K_C \, \frac{\partial C}{\partial z} = {Q_C \over \rho_o c_P} \\&lt;br /&gt;
&amp;amp;w = {\partial \zeta \over \partial t} \end{align}&amp;lt;/math&amp;gt; &amp;lt;!--\eqno{(8)}--&amp;gt;&lt;br /&gt;
|(8)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
:and bottom (&amp;lt;math&amp;gt;z = -h(x,y)&amp;lt;/math&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;eqno&amp;quot;&lt;br /&gt;
|&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\begin{align}&amp;amp;K_m \, \frac{\partial u}{\partial z} = \tau_b^x (x,y,t) \\&lt;br /&gt;
&amp;amp;K_m \, \frac{\partial v}{\partial z} = \tau_b^y(x,y,t) \\&lt;br /&gt;
&amp;amp;K_C \, \frac{\partial C}{\partial z} = 0 \\&lt;br /&gt;
&amp;amp;-w + \vec{v} \cdot \nabla h = 0 \end{align}&amp;lt;/math&amp;gt; &amp;lt;!-- \eqno{(9)}--&amp;gt;&lt;br /&gt;
|(9)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The new variables above are:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! Variable&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;Q_C&amp;lt;/math&amp;gt;&lt;br /&gt;
| surface concentration flux&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\tau_s^x , \tau_s^y&amp;lt;/math&amp;gt;&lt;br /&gt;
| surface wind stress&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;math&amp;gt;\tau_b^x , \tau_b^y&amp;lt;/math&amp;gt;&lt;br /&gt;
| bottom stress&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The surface boundary condition variables are defined in the table above.&lt;br /&gt;
Since &amp;lt;math&amp;gt;Q_T&amp;lt;/math&amp;gt; is a strong function of the surface&lt;br /&gt;
temperature, we usually choose to compute &amp;lt;math&amp;gt;Q_T&amp;lt;/math&amp;gt; using the surface&lt;br /&gt;
temperature and the atmospheric fields in an atmospheric bulk flux&lt;br /&gt;
parameterization. This bulk flux routine also computes the wind&lt;br /&gt;
stress from the winds.&lt;br /&gt;
&lt;br /&gt;
On the variable bottom, &amp;lt;math&amp;gt;z = -h(x,y)&amp;lt;/math&amp;gt;, the horizontal velocity components are constrained to&lt;br /&gt;
accommodate a prescribed bottom stress which is a choice of linear, quadratic, or a log layer, depending on the [[Options]]. The vertical scalar concentration fluxes may also be prescribed at the bottom, although they are usually set to zero.&lt;br /&gt;
&lt;br /&gt;
==Horizontal Boundary Conditions==&lt;br /&gt;
As distributed, the model can easily be configured for a periodic&lt;br /&gt;
channel, a doubly periodic domain, or a closed basin.  Code is also&lt;br /&gt;
included for open boundaries which may or may not work for your&lt;br /&gt;
particular application.  Appropriate boundary conditions are&lt;br /&gt;
provided for &amp;lt;math&amp;gt;u,v,C&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\zeta&amp;lt;/math&amp;gt;, as described in [[Boundary Conditions]].&lt;br /&gt;
&lt;br /&gt;
The model domain is logically rectangular, but it is possible to mask out land areas on the boundary and in the interior. Boundary conditions on these masked regions are straightforward, with a choice of no-slip or free-slip walls.&lt;br /&gt;
&lt;br /&gt;
If biharmonic friction is used, a higher order boundary condition must also be provided. The model currently has this built into the code where the biharmonic terms are calculated.  The high order boundary conditions used for &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;\frac{\partial}{\partial x} \left(&lt;br /&gt;
\frac{h\nu}{mn} \frac{\partial ^2 u}{\partial x^2} \right) = 0&amp;lt;/math&amp;gt; on the eastern and western boundaries and &amp;lt;math&amp;gt;\frac{\partial}{\partial y} \left(\frac{h\nu}{mn} \frac{\partial ^2 u}{\partial y^2} \right) = 0&amp;lt;/math&amp;gt; on the northern and southern boundaries.  The boundary conditions for &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; are similar.  These boundary conditions were chosen because they preserve the property of no gain or loss of volume-integrated momentum or scalar concentration.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=MediaWiki:Monobook.css&amp;diff=6662</id>
		<title>MediaWiki:Monobook.css</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=MediaWiki:Monobook.css&amp;diff=6662"/>
		<updated>2024-10-21T15:00:52Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will affect users of the Monobook skin */&lt;br /&gt;
&lt;br /&gt;
.AdjointColor {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #9900CC;&lt;br /&gt;
}&lt;br /&gt;
.TangentColor {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF0000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.aquamarine {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #45AB74;&lt;br /&gt;
}&lt;br /&gt;
.darkTurquoise {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #00CED1;&lt;br /&gt;
}&lt;br /&gt;
.forestGreen {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #22AB22;&lt;br /&gt;
}&lt;br /&gt;
.limeGreen {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #32CD32;&lt;br /&gt;
}&lt;br /&gt;
.darkGoldenrod {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #BAA60B;&lt;br /&gt;
}&lt;br /&gt;
.peru {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #CDA53F;&lt;br /&gt;
}&lt;br /&gt;
.sandyBrown{&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #F4A460;&lt;br /&gt;
}&lt;br /&gt;
.salmon {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FAA072;&lt;br /&gt;
}&lt;br /&gt;
.hotPink {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF69B4;&lt;br /&gt;
}&lt;br /&gt;
.mediumOrchid {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #BA55D3;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.red {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF5555;&lt;br /&gt;
}&lt;br /&gt;
.orange {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF6600;&lt;br /&gt;
}&lt;br /&gt;
.brown {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #663333;&lt;br /&gt;
}&lt;br /&gt;
.green {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #009900;&lt;br /&gt;
}&lt;br /&gt;
.olive {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #929205;&lt;br /&gt;
}&lt;br /&gt;
.cyan {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #02CBC9;&lt;br /&gt;
}&lt;br /&gt;
.blue {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #0000FF;&lt;br /&gt;
}&lt;br /&gt;
.twilightBlue {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #6666CC;&lt;br /&gt;
}&lt;br /&gt;
.purple {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #9900CC;&lt;br /&gt;
}&lt;br /&gt;
.violet {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #FF00FF;&lt;br /&gt;
}&lt;br /&gt;
.black {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: black;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.alphabet {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   font-family: &amp;quot;Courier New&amp;quot;,monospace;&lt;br /&gt;
   border: solid black 1px;&lt;br /&gt;
   padding: 2px 6px 0 5px;&lt;br /&gt;
   background-color: #F1E8CA;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.source {&lt;br /&gt;
   background-color: #FFF;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.para {&lt;br /&gt;
   font-size: 10px;&lt;br /&gt;
   line-height: 10px;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* get the block equations out of the center*/&lt;br /&gt;
&lt;br /&gt;
math[mode=&amp;quot;display&amp;quot;], math[display=&amp;quot;block&amp;quot;] {&lt;br /&gt;
   text-align: left;&lt;br /&gt;
}&lt;br /&gt;
.mwe-math-mathml-display{&lt;br /&gt;
   padding-left: 7em;&lt;br /&gt;
   text-align:   left;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.mwe-math-fallback-image-display{&lt;br /&gt;
   padding-left: 10em;&lt;br /&gt;
   text-align:   left;&lt;br /&gt;
   margin-left: 0 !important;&lt;br /&gt;
   margin-right: 0 !important;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Support where MediaWiki lazy loaded images */&lt;br /&gt;
/*.mwe-math-mathml-inline ~ .lazy-image-placeholder,&lt;br /&gt;
.mwe-math-mathml-display ~ .lazy-image-placeholder,*/&lt;br /&gt;
/* Support where MediaWiki doesn&#039;t lazy load images */&lt;br /&gt;
/*.mwe-math-mathml-inline + .mwe-math-fallback-image-inline,&lt;br /&gt;
.mwe-math-mathml-display + .mwe-math-fallback-image-display {&lt;br /&gt;
   display: none !important;&lt;br /&gt;
}*/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* equation numbers */&lt;br /&gt;
table.eqno {&lt;br /&gt;
   width:    100%;&lt;br /&gt;
   padding-left: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.eqno tr td:first-child + td {&lt;br /&gt;
   text-align: right;&lt;br /&gt;
   vertical-align: middle;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent table {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.matlab td {&lt;br /&gt;
   min-width:      95px;&lt;br /&gt;
   padding-right:  15px;&lt;br /&gt;
   vertical-align: top;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
img.thumbborder {&lt;br /&gt;
   border: 1px solid #dddddd;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*#toolbar {float: left;}*/&lt;br /&gt;
&lt;br /&gt;
#wikiPreview {&lt;br /&gt;
   height: 400px;&lt;br /&gt;
   overflow: auto !important;&lt;br /&gt;
   padding-bottom: 10px;&lt;br /&gt;
   margin-bottom: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#column-content {&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   height:100%;&lt;br /&gt;
   float: none;&lt;br /&gt;
   margin: 0 0 .6em 12.2em;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#content {&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   top: 2.8em;&lt;br /&gt;
   left: 12.2em;&lt;br /&gt;
   right: 0;&lt;br /&gt;
   bottom: 38px;&lt;br /&gt;
   padding: 0 1em 1.5em 1em;&lt;br /&gt;
   background: #f9f9f9 url(&#039;https://www.myroms.org/wiki/images/content-bg.jpg&#039;) 0 0 no-repeat fixed;&lt;br /&gt;
   color: black;&lt;br /&gt;
   overflow: auto;&lt;br /&gt;
   border: 1px solid #aaa;&lt;br /&gt;
   border-right: none;&lt;br /&gt;
   border-bottom: none;&lt;br /&gt;
   line-height: 1.5em;&lt;br /&gt;
   /*height: 100%;*/&lt;br /&gt;
   z-index: 2;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#sidebar {&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   left: 3px;&lt;br /&gt;
   top: 175px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body {&lt;br /&gt;
   font: x-small sans-serif;&lt;br /&gt;
   background: #f9f9f9 url(&#039;https://www.myroms.org/wiki/images/bg.jpg&#039;) 0 0 no-repeat;&lt;br /&gt;
   color: black;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   height: 100%;&lt;br /&gt;
   max-height: 100%;&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   overflow: hidden;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* scale back up to a sane default */&lt;br /&gt;
div#globalWrapper {&lt;br /&gt;
   font-size: 127%;&lt;br /&gt;
   width: 100%;&lt;br /&gt;
   height: 100%;&lt;br /&gt;
   max-height: 100%;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding: 0;&lt;br /&gt;
   overflow: hidden;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
a {&lt;br /&gt;
   text-decoration: none;&lt;br /&gt;
   color: #0098CD;&lt;br /&gt;
   background: none;&lt;br /&gt;
}&lt;br /&gt;
a:visited {&lt;br /&gt;
   color: #9932CC;&lt;br /&gt;
}&lt;br /&gt;
a.new {&lt;br /&gt;
   color: #45AB74 !important;&lt;br /&gt;
}&lt;br /&gt;
a.new:visited {&lt;br /&gt;
   color: #45AB74 !important;&lt;br /&gt;
}&lt;br /&gt;
#p-personal a.new {&lt;br /&gt;
   color: #03EB13;&lt;br /&gt;
}&lt;br /&gt;
#p-personal a.new:visited {&lt;br /&gt;
   color: #03EB13;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
h1, h2, h3, h4, h5, h6 {&lt;br /&gt;
   color: black;&lt;br /&gt;
   background: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   margin: 0;&lt;br /&gt;
   padding-top: .5em;&lt;br /&gt;
   padding-bottom: .17em;&lt;br /&gt;
   border-bottom: 2px solid #aaa;&lt;br /&gt;
}&lt;br /&gt;
h1 .editsection { font-size: 53%; font-weight: normal; }&lt;br /&gt;
h2 .editsection { font-size: 67%; font-weight: normal; }&lt;br /&gt;
&lt;br /&gt;
/* I don&#039;t think we ever used this so I am replacing it with the more&lt;br /&gt;
** specific div.code for the light green background 2022-04-29 - Robertson&lt;br /&gt;
code {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   margin-left: 3em;&lt;br /&gt;
}*/&lt;br /&gt;
div.code {&lt;br /&gt;
   white-space: pre;&lt;br /&gt;
   font-family: monospace;&lt;br /&gt;
   margin: 1em 0 1em 0;&lt;br /&gt;
   padding: .5em;&lt;br /&gt;
   border: 1px dashed #2f6fab;&lt;br /&gt;
   color: black;&lt;br /&gt;
   background-color: #F0FFF0;&lt;br /&gt;
   line-height: 11.5pt;&lt;br /&gt;
}&lt;br /&gt;
div.box {&lt;br /&gt;
   white-space: pre;&lt;br /&gt;
   font-family: monospace;&lt;br /&gt;
   margin: 1em 0 1em 0;&lt;br /&gt;
   padding: .5em;&lt;br /&gt;
   border: 1px dashed #2f6fab;&lt;br /&gt;
   color: black;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   line-height: 11.5pt;&lt;br /&gt;
}&lt;br /&gt;
pre {&lt;br /&gt;
	padding: 1em;&lt;br /&gt;
	border: 1px dashed #2f6fab;&lt;br /&gt;
	color: black;&lt;br /&gt;
	background-color: transparent;&lt;br /&gt;
	line-height: 1.1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.firstHeading {&lt;br /&gt;
   display: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   margin-bottom: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** content styles&lt;br /&gt;
*/&lt;br /&gt;
.alphabetlist {&lt;br /&gt;
   width:15px;&lt;br /&gt;
   text-align: center;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* thumbnails */&lt;br /&gt;
div.thumb {&lt;br /&gt;
   margin-bottom: .5em;&lt;br /&gt;
   border-style: solid;&lt;br /&gt;
   border-color: white;&lt;br /&gt;
   border-width: 0px;&lt;br /&gt;
   width: auto;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.tleft {&lt;br /&gt;
   float: left;&lt;br /&gt;
   margin-right: .5em;&lt;br /&gt;
   border-width: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.portlet h3 {&lt;br /&gt;
   background: transparent;&lt;br /&gt;
   padding: 0 1em 0 .5em;&lt;br /&gt;
   display: inline;&lt;br /&gt;
   height: 1em;&lt;br /&gt;
   text-transform: none;&lt;br /&gt;
   font-size: 91%;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   white-space: nowrap;&lt;br /&gt;
   border: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.pBody {&lt;br /&gt;
   font-size: 95%;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   color: black;&lt;br /&gt;
   border-collapse: collapse;&lt;br /&gt;
   border: 1px solid #000;&lt;br /&gt;
   padding: 0 .8em .3em .5em;&lt;br /&gt;
}&lt;br /&gt;
#p-cactions .pBody {&lt;br /&gt;
   border: none;&lt;br /&gt;
}&lt;br /&gt;
.pBody a {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #000000;&lt;br /&gt;
}&lt;br /&gt;
.pBody a:visited {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   color: #000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#lastmod {&lt;br /&gt;
   color: #000000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#viewcount {&lt;br /&gt;
   color: #000000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#privacy a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#about a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
#disclaimer a{&lt;br /&gt;
   color: #2E0000;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.portlet ul {&lt;br /&gt;
   line-height: 1.5em;&lt;br /&gt;
   list-style-type: square;&lt;br /&gt;
   list-style-image: none;&lt;br /&gt;
   font-size: 95%;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** the navigation portlet&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
#p-navigation {&lt;br /&gt;
   position: relative;&lt;br /&gt;
   z-index: 3;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation .pBody {&lt;br /&gt;
   padding-right: 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation a {&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
   display: block;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-navigation li.active a, #p-navigation li.active a:hover {&lt;br /&gt;
   text-decoration: none;&lt;br /&gt;
   font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#p-personal li a {&lt;br /&gt;
	text-decoration: none;&lt;br /&gt;
	color: #13F3F3;&lt;br /&gt;
	padding-bottom: .2em;&lt;br /&gt;
	background: none;&lt;br /&gt;
}&lt;br /&gt;
#p-personal li a:hover {&lt;br /&gt;
	background-color: black;&lt;br /&gt;
	padding-bottom: .2em;&lt;br /&gt;
	text-decoration: none;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
** footer&lt;br /&gt;
*/&lt;br /&gt;
div#footer {&lt;br /&gt;
   width: 800px;&lt;br /&gt;
   position: absolute;&lt;br /&gt;
   bottom: 0;&lt;br /&gt;
   left: 0;&lt;br /&gt;
   overflow: auto;&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   border-top: none;&lt;br /&gt;
   border-bottom: none;&lt;br /&gt;
   margin: .6em 0 0 12.2em;&lt;br /&gt;
   padding: .4em 0 0 0;&lt;br /&gt;
   text-align: center;&lt;br /&gt;
   font-size: 90%;&lt;br /&gt;
   z-index: 10;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div.bib { text-indent: -2em; margin-left: 2em; }&lt;br /&gt;
&lt;br /&gt;
BODY.page-Bibliography p { text-indent: -2em; margin-left: 2em; }&lt;br /&gt;
&lt;br /&gt;
.title {&lt;br /&gt;
font-size: 155%;&lt;br /&gt;
font-weight: bold;&lt;br /&gt;
margin-bottom: .5em;&lt;br /&gt;
padding-top: .5em;&lt;br /&gt;
padding-bottom: .17em;&lt;br /&gt;
border-bottom: 2px solid #aaa;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.main {&lt;br /&gt;
   background-color: transparent;&lt;br /&gt;
   font-size: 13px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent {&lt;br /&gt;
   font-size: 16px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent ol li {&lt;br /&gt;
        padding-bottom: 10px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#bodyContent ol li ul li {&lt;br /&gt;
        padding-bottom: 0px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Fix special pages output */&lt;br /&gt;
.mw-specialpages-table td {&lt;br /&gt;
   padding-top: 1em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#p-personal {&lt;br /&gt;
   padding-top: 8px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
div#p-logo {&lt;br /&gt;
   padding-top: 8px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#column-one{&lt;br /&gt;
   padding-top: unset;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6661</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6661"/>
		<updated>2024-10-16T17:20:29Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;iframe style=&amp;quot;border: none;&amp;quot; src=&amp;quot;https://free.timeanddate.com/countdown/i9e6b3oc/n5276/cf12/cm0/cu4/ct0/cs1/ca0/cr0/ss0/cacf33/cpcf33/pct/tcfff/fs100/szw320/szh135/tatUse%20myroms%20at%20github.com/tacf33/tptSVN%20repository%20no%20longer%20updated!/tpcf33/matSVN%20Support%20Ends%20in%3A/macf33/mptUse%20myroms%20at%20github.com/mpcf33/iso2025-01-01T00:00:00&amp;quot; width=&amp;quot;239&amp;quot; height=&amp;quot;70&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6660</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6660"/>
		<updated>2024-07-25T17:08:26Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;iframe key=&amp;quot;svn_end&amp;quot; level=&amp;quot;free&amp;quot; path=&amp;quot;/countdown/i9e6b3oc/n5276/cf12/cm0/cu4/ct0/cs1/ca0/cr0/ss0/cacf33/cpcf33/pct/tcfff/fs100/szw320/szh135/tatUse%20myroms%20at%20github.com/tacf33/tptSVN%20repository%20no%20longer%20updated!/tpcf33/matSVN%20Support%20Ends%20in%3A/macf33/mptUse%20myroms%20at%20github.com/mpcf33/iso2025-01-01T00:00:00&amp;quot; width=&amp;quot;239&amp;quot; height=&amp;quot;70&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Getting_Started&amp;diff=6620</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Getting_Started&amp;diff=6620"/>
		<updated>2024-01-24T21:30:06Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Getting Started&amp;lt;/div&amp;gt;&lt;br /&gt;
ROMS is a very complex model with many options and capabilities. ROMS is composed of many Fortran files (&#039;&#039;&#039;.F&#039;&#039;&#039;), a few header files (&#039;&#039;&#039;.h&#039;&#039;&#039;), various input script files (&#039;&#039;&#039;.in&#039;&#039;&#039;), a metadata variable definition file ([[varinfo.dat]]), and a single [[makefile]]. The ROMS algorithms are distributed with the following directory structure:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;trunk/                               Main trunk directory&lt;br /&gt;
       /Atmosphere/                    Atmosphere models root directory&lt;br /&gt;
                  /COAMPS              COAMPS root directory (empty)&lt;br /&gt;
                  /WRF                 WRF root directory (empty)&lt;br /&gt;
       /Compilers/                     make configuration files&lt;br /&gt;
       /Data/                          Input data root directory&lt;br /&gt;
            /ROMS/                     ROMS data root directory&lt;br /&gt;
                 /CDL                  ROMS NetCDF metadata design&lt;br /&gt;
                 /Forcing              Input test cases forcing NetCDF files&lt;br /&gt;
                 /Grid                 Input test cases grid NetCDF files&lt;br /&gt;
                 /Initial              Input test cases initial conditions NetCDF files&lt;br /&gt;
       /Lib/                           External libraries&lt;br /&gt;
           /ARPACK                     Arpack eigenvalue problems library&lt;br /&gt;
           /MCT                        Modeling Coupling Tool library&lt;br /&gt;
       /Master                         Main standalone and coupling programs&lt;br /&gt;
       /ROMS/                          ROMS root directory&lt;br /&gt;
            /Adjoint                   Adjoint model&lt;br /&gt;
                    /Biology           Adjoint biology/ecosystem models&lt;br /&gt;
            /Bin                       Executable scripts&lt;br /&gt;
            /Drivers                   Computational drivers&lt;br /&gt;
            /External                  Standard input scripts&lt;br /&gt;
            /Functionals               Analytical expression header files&lt;br /&gt;
            /Include                   Test cases configuration header files&lt;br /&gt;
            /Modules                   Declaration modules&lt;br /&gt;
            /Nonlinear                 Nonlinear model&lt;br /&gt;
                      /Biology         Nonlinear biology/ecosystem models&lt;br /&gt;
                      /Sediment        Nonlinear sediment transport model&lt;br /&gt;
            /Obsolete                  Discontinued files&lt;br /&gt;
            /Programs                  Support programs&lt;br /&gt;
            /SeaIce                    Sea-ice model (empty)&lt;br /&gt;
            /Representer               Representer model&lt;br /&gt;
                        /Biology       Representer biology/ecosystem models&lt;br /&gt;
            /Tangent                   Tangent linear model&lt;br /&gt;
                    /Biology           Tangent linear biology/ecosystem models&lt;br /&gt;
            /Utility                   Generic utility files&lt;br /&gt;
            License_ROMS.text          Open source license&lt;br /&gt;
            Version                    SVN Version information&lt;br /&gt;
       /User/                          ROMS User interface root directory&lt;br /&gt;
            /External                  User standard input scripts&lt;br /&gt;
            /Functionals               User analytical expressions templates&lt;br /&gt;
            /Include                   User application header files&lt;br /&gt;
       /WAVES/                         Waves models root directory&lt;br /&gt;
             /SWAN                     SWAN root directory&lt;br /&gt;
                  /External            SWAN input data and standard input files&lt;br /&gt;
                  /Src                 SWAN model&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ROMS uses [[C-preprocessing]] extensively to activate and/or deactivate&lt;br /&gt;
the various numerical and physical algorithm [[Options | options]]. It also uses&lt;br /&gt;
[[NetCDF]] to manage input and output data streams. It is highly&lt;br /&gt;
recommended that first time users learn the basics of NetCDF&lt;br /&gt;
before working with ROMS.&lt;br /&gt;
&lt;br /&gt;
==Basic Steps==&lt;br /&gt;
&lt;br /&gt;
* Register at the ROMS website ([http://www.myroms.org www.myroms.org]) to get access to the algorithms and other user privileges. Select a &#039;&#039;&#039;username&#039;&#039;&#039; and &#039;&#039;&#039;password&#039;&#039;&#039; which will be used in the future to login and post messages on the ROMS forum, algorithm downloads, and contributing to wikiROMS.&lt;br /&gt;
&lt;br /&gt;
* Make sure that you have the following required software in your computer before attempting to compile and run an application:&lt;br /&gt;
** [https://git-scm.com/ Git] client to download source&lt;br /&gt;
** Fortran 90 or Fortran 95 compiler&lt;br /&gt;
** [http://gcc.gnu.org/onlinedocs/cpp/ cpp] program for [[C-preprocessing]] ROMS source code.&lt;br /&gt;
** [http://www.gnu.org/software/make/ GNU make] version &#039;&#039;&#039;3.81&#039;&#039;&#039; or higher to compile ROMS&lt;br /&gt;
** [http://www.perl.org/ Perl] interpreter program&lt;br /&gt;
** [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] library, with Fortran 90 interface&lt;br /&gt;
** Message Passing Interface (MPI) library to run in parallel on a distributed-memory system&lt;br /&gt;
&lt;br /&gt;
* Use a [[Git]] client to &#039;&#039;&#039;clone&#039;&#039;&#039; the latest version of the ROMS &#039;&#039;&#039;develop&#039;&#039;&#039; branch. It is highly recommended that you obtain the code on the same system that you will be compiling and running the code on to avoid file format issues.&lt;br /&gt;
&lt;br /&gt;
* We recommend that you use the included &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; to compile and link ROMS. This will set up your build environment and execute the [[gmake|make]] command to build the default ROMS [[UPWELLING_CASE | upwelling]] application. This process allows you to avoid editing the [[makefile]]. Please visit the &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; page for more detailed instructions.&lt;br /&gt;
** You can also type &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;make&amp;lt;/span&amp;gt; at the top of the directory structure where the [[makefile]] is located but we do not recommend this process because it requires changing the ROMS files which can cause conflicts when you update you ROMS code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; To speed compilation, you may want to add the &#039;&#039;&#039;-j &amp;lt;n&amp;gt;&#039;&#039;&#039; flag to the build command (i.e. &#039;&#039;&#039;build.sh -j 4&#039;&#039;&#039;) where &#039;&#039;&#039;&amp;lt;n&amp;gt;&#039;&#039;&#039; is the number of processors you wish to compile with. Even single processor machines can benefit from the -j flag with &#039;&#039;&#039;&amp;lt;n&amp;gt;&amp;amp;nbsp;=&amp;amp;nbsp;2&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; To make sure your application can compile successfully, you might want to set &#039;&#039;&#039;USE_DEBUG&#039;&#039;&#039; to &#039;&#039;&#039;on&#039;&#039;&#039; in the [[build Script|build script]] since it will compile faster. Once your application can compile you can unset &#039;&#039;&#039;USE_DEBUG&#039;&#039;&#039; in order to create an optimized executable. Please visit the &#039;&#039;&#039;[[build Script|build script]]&#039;&#039;&#039; page for more information&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019) all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. If you are working with a ROMS release prior to revision 933 you will need to replace &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_upwelling.in&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsO&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanO&amp;lt;/span&amp;gt; in all commands below.&lt;br /&gt;
&lt;br /&gt;
* To run ROMS in serial, just type: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS &amp;amp;lt; ROMS/External/roms_upwelling.in &amp;amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;or to run in parallel (distributed-memory) on two processors: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -np 2 romsM ROMS/External/roms_upwelling.in &amp;amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;or to run in parrallel (shared-memory) on two processors:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;setenv OMP_NUM_THREAD 2&amp;lt;br&amp;gt;romsO &amp;lt; ROMS/External/roms_upwelling.in &amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Here, the the file &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ROMS/External/roms_upwelling.in&amp;lt;/span&amp;gt; contains all the input parameters to required by this application. Visit [[roms.in]] for more information.&lt;br /&gt;
&lt;br /&gt;
{{note}}Notice that in distributed-memory, the leading &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;&amp;amp;lt;&amp;lt;/span&amp;gt; is omitted so all parallel threads can read and process this input script without any communications in between.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Frequently_Asked_Questions&amp;diff=6619</id>
		<title>Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Frequently_Asked_Questions&amp;diff=6619"/>
		<updated>2024-01-24T18:16:19Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Frequently Asked Questions&amp;lt;/div&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Installation and Configuration ==&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019) all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. If you are working with a ROMS release prior to revision 933 you will need to replace &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_upwelling.in&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsO&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanM&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanO&amp;lt;/span&amp;gt; in all commands below.&lt;br /&gt;
&lt;br /&gt;
=== My build finished with no errors. Where is the ROMS executable? ===&lt;br /&gt;
&lt;br /&gt;
It is either in &#039;&#039;&#039;romsS&#039;&#039;&#039; (serial), &#039;&#039;&#039;romsO&#039;&#039;&#039; (shared-memory, OpenMP), &#039;&#039;&#039;romsM&#039;&#039;&#039; (distributed-memory, MPI), or &#039;&#039;&#039;romsG&#039;&#039;&#039; (debug). Check the [[makefile]] to see which options are on. The makefile definition &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;BINDIR&amp;lt;/span&amp;gt; controls where to write the compiled ROMS executable.&lt;br /&gt;
&lt;br /&gt;
=== What do I have to do to run an application? ===&lt;br /&gt;
There are basically two modes to run a ROMS application: serial or parallel&lt;br /&gt;
# Most of the canned [[Test Cases | applications]] that come with the ROMS distribution do not need input NetCDF files. The grid, initial conditions and forcing conditions are specified with analytical expressions in [[Functionals]]. Any of these test cases can be run by editing the [[makefile#ROMS_APPLICATION | ROMS_APPLICATION]] definition in the [[makefile]] or the [[build Script]]. A [[cppdefs.h#Options_for_idealized_test_problems | list]] of all pre-defined model applications can be found in header file [[cppdefs.h]]. The next step is to compile and link using the [[gmake | make]] tool and, if you are lucky, the program will build. It is good practice to execute &#039;&#039;&#039;make clean&#039;&#039;&#039; first. Then, the application should be run in serial with the command: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS &amp;amp;lt; roms_&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;APPLICATION&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;.in &amp;amp;gt; &amp;amp; log &amp;amp; &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;where &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;APPLICATION&amp;lt;/span&amp;gt; is the lowercase of any of the CPP options defining a distributed test case. For example, the upwelling ([[UPWELLING]]) [[UPWELLING_CASE | test case]] uses the input script &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; which is located in the &#039;&#039;&#039;ROMS/External&#039;&#039;&#039; directory. &lt;br /&gt;
# A few canned applications that come with ROMS require input NetCDF files which are located in the &#039;&#039;&#039;Data/ROMS&#039;&#039;&#039; directories. Same as above, but if you want run in parallel on a distributed-memory computer use: &amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -np 2 romsM roms_test_head.in &amp;amp;gt; &amp;amp; log &amp;amp; &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;or to run in parallel on a shared-memory machine:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;setenv OMP_THREAD_NUM 2&amp;lt;br&amp;gt;romsO &amp;lt; ROMS/External/roms_upwelling.in &amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;for the [[TEST_HEAD_CASE | test headland case]], for example. You need to be sure that the product of [[Variables#NtileI | NtileI]] and [[Variables#NtileJ | NtileJ]] in &#039;&#039;&#039;roms_test_head.in&#039;&#039;&#039; is &#039;&#039;&#039;2&#039;&#039;&#039; since the above command specifies two processors to run (&#039;&#039;&#039;-np 2&#039;&#039;&#039; or &#039;&#039;&#039;OMP_THREAD_NUM=2&#039;&#039;&#039;). Notice that to compile the model in distributed-memory, you need to edit the [[makefile]] (or [[build Script]]) and activate [[makefile#USE_MPI | USE_MPI]]. Also, if you use &#039;&#039;&#039;MPICH&#039;&#039;&#039; rather than a native MPI library, define [[makefile#USE_MPIF90 | USE_MPIF90]] as well. The MPICH library uses a script called [[mpif90]] for compiling.&lt;br /&gt;
&lt;br /&gt;
=== Why is only one node created when executing with mpirun? ===&lt;br /&gt;
This usually occurs when you are not using the correct mpirun. For Example, if you compiled with Open MPI and try to use the &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;mpirun&amp;lt;/span&amp;gt; command from MPICH, you will see this error. To see which mpirun you are executing type &#039;&#039;&#039;&#039;which mpirun&#039;&#039;&#039;&#039;; the first part of the path should match what the ROMS output reports as your &#039;&#039;&#039;&#039;Compiler command&#039;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;&amp;gt; which mpirun&amp;lt;br /&amp;gt;/opt/pgisoft/mpich/bin/mpirun&amp;lt;br /&amp;gt;&amp;gt; mpirun -np 2 ./romsM roms.in&amp;lt;br /&amp;gt; Process Information:&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; Node #  0 (pid=   150433) is active.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; Model Input Parameters:  ROMS/TOMS version 3.4&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; . . .&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; Compiler system  : pgi&amp;lt;br /&amp;gt; Compiler command : /opt/pgisoft/openmpi/bin/mpif90&amp;lt;br /&amp;gt; Compiler flags   :  -O3 -Mfree&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; . . .&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; ERROR: Illegal domain partition.&amp;lt;br /&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that only one node is active and the compiler command shows the model was compiled with Open MPI but &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;mpirun&amp;lt;/span&amp;gt; is from the MPICH directory. To fix this problem, update your path to use the mpirun from the &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;openmpi&amp;lt;/span&amp;gt; directory or re-compile with MPICH.&lt;br /&gt;
&lt;br /&gt;
== Compiling and Linking ==&lt;br /&gt;
&lt;br /&gt;
The compiling and linking information is all in [[Compiling and Linking]], [[makefile]], and [[build Script]]. Please let us know if any of this is unclear.&lt;br /&gt;
&lt;br /&gt;
=== Errors at compile time ===&lt;br /&gt;
First of all, read the error messages from the compiler carefully to see if you can figure out what they are talking about. There are several classes of errors (add more as you see them):&lt;br /&gt;
* Errors from build_roms.sh(formerly build.bash):&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;./build_roms.sh: line 40: $&#039;\r&#039;: command not found&amp;lt;br/&amp;gt;./build_roms.sh: line 43: $&#039;\r&#039;: command not found&amp;lt;br/&amp;gt;./build_roms.sh: line 46: syntax error near unexpected token &#039;$&#039;in\r&#039;&amp;lt;br/&amp;gt;./build_roms.sh: line 46: &#039; case &amp;quot;$1&amp;quot; in&amp;lt;/div&amp;gt;You need to run the dos2unix command on build_roms.sh.&lt;br /&gt;
&lt;br /&gt;
* Errors from cpp: If there is a mismatch in the #ifdef/#endif pairs, cpp will be unhappy and will tell you so. There is a perl script called &amp;quot;ifdefs&amp;quot; which checks your #ifdefs/#endif pairings.&lt;br /&gt;
&lt;br /&gt;
* Errors like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd Build_roms; -c -O3 mod_kinds.f90&amp;lt;br /&amp;gt;/bin/sh: -c: not found&amp;lt;/div&amp;gt;The command:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;FC := $(shell which ${FC})&amp;lt;/div&amp;gt;in the Compilers/xxx-xxx.mk file has failed to find the compiler you specified, setting FC to the null string. You need to find out which compiler you were asking it to look for and to make sure it is in your path. If the flag USE_MPIF90 is set, it will be looking for &amp;quot;mpif90&amp;quot;. What do you get from the command &amp;quot;which mpif90&amp;quot;? If you are trying for a serial run first, what does &amp;quot;which gfortran&amp;quot; give you?&lt;br /&gt;
&lt;br /&gt;
* Failing to find netcdf.mod:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp -f /usr/local/include/netcdf.mod /home/kekejiayu/Projects/upwelling/Build&amp;lt;br/&amp;gt;cp: cannot stat ‘/usr/local/include/netcdf.mod’: No such file or directory&amp;lt;/div&amp;gt;You need to have both the netcdf and netcdf-fortran libraries. It is strongly recommended that these be version 4.x, not in the 3 series and that you have USE_NETCDF4=on in your build. Even so, things can go wrong. For instance, recent versions of nc-config rely on finding nf-config in your PATH to work properly. In this case there are three options:&lt;br /&gt;
*#Add the full path to nf-config to you your PATH environment variable.&lt;br /&gt;
*#Change the appropriate NC_CONFIG declaration in your [[build.{sh|bash}|build_Script]] to the full path to your &amp;quot;nf-config&amp;quot;.&lt;br /&gt;
*#Change &amp;quot;nc-config&amp;quot; to &amp;quot;nf-config&amp;quot; in the appropriate file in the Compilers directory. If &amp;quot;nf-config&amp;quot; is not in your path you will need to set this to the full path of your &amp;quot;nf-config&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
* Syntax errors in the fortran: check the intermediate .f90 file for the exact code at the line numbers in the report. Be sure to edit the corresponding .F file once you determine what the trouble is.&lt;br /&gt;
&lt;br /&gt;
* Trouble with the netcdf module file:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;PGF90-F-0004-Corrupt or Old Module file ./netcdf.mod (distribute.f90: 2750)&amp;lt;/div&amp;gt; Netcdf-fortran must be compiled with the same version of the same compiler you are using now. If not, there will be trouble.&lt;br /&gt;
&lt;br /&gt;
* Trouble with other modules: one instance of this is due to incorrect dependency information in MakeDepend. The ROMS code must be compiled in the correct order and failure to do so might give something like:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd Build_roms; ifort -c  bc_2d.f90&amp;lt;br /&amp;gt;fortcom: Error: bc_2d.f90, line 30: Error in opening the Library module file.&amp;lt;br /&amp;gt;[MOD_PARAM]&amp;lt;br /&amp;gt;     USE mod_param&amp;lt;br /&amp;gt;----------^&amp;lt;br /&amp;gt;fortcom: Error: bc_2d.f90, line 32: Error in opening the Library module file.&amp;lt;/div&amp;gt; Here, it failed to compile mod_param.F before bc_2d.F, leading to trouble. The &#039;--objdir=$(BUILD_DIR)&#039; option in MDEPFLAGS is not optional.&lt;br /&gt;
&lt;br /&gt;
=== Errors at link time ===&lt;br /&gt;
* One common problem is that differing options were used when compiling libraries vs. the ROMS code proper. For instance, you get many, many messages starting with:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;.../Build_roms/libUTIL.a(close_io.o):close_io.f90:(.text+0x1030): undefined reference to `__netcdf_MOD_nf90_strerror&#039;&amp;lt;/div&amp;gt; Check to make sure that the link statement above the errors includes both &#039;-lnetcdff&#039; and &#039;-lnetcdf&#039; with the correct path to the libraries: &#039;-L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib&#039;, for instance.&lt;br /&gt;
&lt;br /&gt;
* Old ROMS versions only linked to libnetcdf.a, while NetCDF 4.x also needs libnetcdff.a to be built from a separate netcdf-fortran package. The link statement needs to include both. See [https://www.myroms.org/forum/viewtopic.php?f=31&amp;amp;t=1296&amp;amp;p=4599&amp;amp;hilit=config#p4599 this thread] for a discussion on it.&lt;br /&gt;
&lt;br /&gt;
* Also new in NetCDF is the option to create a library with OpenDAP capabilities. In that case, you need to also link to libcurl, in the makefile as the option USE_DAP. This option is needed if you are missing functions with &amp;quot;curl&amp;quot; in the name.&lt;br /&gt;
&lt;br /&gt;
* For all of these issues, we strongly recommend the use of USE_NETCDF4 and its method of running &#039;nc-config --flibs&#039; to find out the correct linking bits, though there are systems on which &#039;nf-config --flibs&#039; works better. Run these things on the command line to find out what works for you:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;pacman13 396% nc-config --flibs&amp;lt;br&amp;gt; -L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdff \&amp;lt;br&amp;gt;-L/usr/local/pkg/hdf5/hdf5-1.8.10-p1.gnu-4.7.3/lib -L/usr/local/pkg/szip/szip-2.1.gnu/lib \&amp;lt;br&amp;gt; -L/usr/local/pkg/udunits/udunits-2.1.24.gnu-4.7.3/lib \&amp;lt;br&amp;gt;-L/usr/local/pkg/netcdf/netcdf-4.3.0.gnu-4.7.3/lib -lnetcdf -lnetcdf&amp;lt;/div&amp;gt;or&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;fish2 1487% nc-config --flibs&amp;lt;br&amp;gt;-L/opt/cray/netcdf/4.3.2/PGI/141/lib -lnetcdff -L/opt/cray/hdf5/1.8.13/PGI/141/lib -lnetcdf&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Basic Usage ==&lt;br /&gt;
=== What are the ways that ROMS can receive the wind and other surface forcing? ===&lt;br /&gt;
# One option is to provide the stresses and fluxes via analytic expressions in [[Functionals#ana_smflux.h | ana_smflux.h]] and [[Functionals#ana_stflux.h | ana_stflux.h]].&lt;br /&gt;
# One option is to provide analytic expressions for the winds and other atmospheric fields in [[Functionals#ana_winds.h | ana_winds.h]] and friends, and define [[Options$BULK_FLUXES | BULK_FLUXES]].&lt;br /&gt;
# ROMS can also read fields from NetCDF files, also stresses or winds, depending on the state of [[Options$BULK_FLUXES | BULK_FLUXES]]. These can be provided as:&lt;br /&gt;
## Point measurements, in which ROMS will rotate to the correct directions from East (u) and North (v).&lt;br /&gt;
## Gridded fields on the ROMS grid, in which case the directions have to match the directions on your grid.&lt;br /&gt;
## Gridded fields on a larger, usually coarser grid. These are in East and North, with ROMS doing the rotation. ROMS picks up its cue on whether to interpolate+rotate or not based on the grid dimensions of these fields. If the dimensions exactly match that of your own grid, ROMS will assume that it is on your grid. If you plan on using global fields of dimension 180x90, say, don&#039;t build a grid with those dimensions. The cdl for a working example is shown here:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;netcdf rain.1948-2006 {&lt;br /&gt;
dimensions:&lt;br /&gt;
        rain_time = UNLIMITED ; // (708 currently)&lt;br /&gt;
        lat = 94 ;&lt;br /&gt;
        lon = 192 ;&lt;br /&gt;
variables:&lt;br /&gt;
        float rain(rain_time, lat, lon) ;&lt;br /&gt;
                rain:_FillValue = -1.e+34f ;&lt;br /&gt;
                rain:units = &amp;quot;Kg_meter-2_sec-1\000Kg_meter-2_sec-1&amp;quot; ;&lt;br /&gt;
                rain:long_name = &amp;quot;rain fall rate&amp;quot; ;&lt;br /&gt;
                rain:coordinates = &amp;quot;lon lat&amp;quot; ;&lt;br /&gt;
        double lat(lat) ;&lt;br /&gt;
                lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
                lat:point_spacing = &amp;quot;uneven&amp;quot; ;&lt;br /&gt;
                lat:axis = &amp;quot;Y&amp;quot; ;&lt;br /&gt;
        double lon(lon) ;&lt;br /&gt;
                lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
                lon:modulo = 360. ;&lt;br /&gt;
                lon:point_spacing = &amp;quot;even&amp;quot; ;&lt;br /&gt;
                lon:axis = &amp;quot;X&amp;quot; ;&lt;br /&gt;
        float SNOW(rain_time, lat, lon) ;&lt;br /&gt;
                SNOW:missing_value = -1.e+34f ;&lt;br /&gt;
                SNOW:_FillValue = -1.e+34f ;&lt;br /&gt;
                SNOW:long_name = &amp;quot;SNOW_FRAC[D=2,GXYT=PRC_MOD@ASN]*PRC_MOD&amp;quot; ;&lt;br /&gt;
                SNOW:long_name_mod = &amp;quot;L=1:12&amp;quot; ;&lt;br /&gt;
        double rain_time(rain_time) ;&lt;br /&gt;
                rain_time:units = &amp;quot;days since 1900-01-01 00:00:00&amp;quot; ;&lt;br /&gt;
                rain_time:axis = &amp;quot;T&amp;quot; ;&lt;br /&gt;
                rain_time:bounds = &amp;quot;TIME_bnds&amp;quot; ;&lt;br /&gt;
                rain_time:time_origin = &amp;quot;1-JAN-1948&amp;quot; ;&lt;br /&gt;
                rain_time:calendar = &amp;quot;LEAP&amp;quot; ;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
In this example, the variable names &amp;quot;rain&amp;quot; and &amp;quot;SNOW&amp;quot; would have to match with what&#039;s in the [[varinfo.dat]] file.&lt;br /&gt;
&lt;br /&gt;
=== How can I create the initial/boundary/forcing NetCDF files for ROMS? ===&lt;br /&gt;
# Please don&#039;t use the old Fortran codes unless you are a glutton for punishment.&lt;br /&gt;
# Most use the Matlab scripts on the ROMS [https://www.myroms.org/svn/src/matlab/ svn server].&lt;br /&gt;
# There are Python tools at [https://github.com/kshedstrom/pyroms github]. A thorough description of how to get these running on a Mac is [http://houstonthereisaproblem.blogspot.com/2011/12/installation-of-pyroms-into-mac-os-1072.html here]. An alternate way to go is to install a VirtualBox with Linux and install them there.&lt;br /&gt;
# There are probably Ferret and other scripts out there. Ask on the ROMS forum if you have question about a specific data source.&lt;br /&gt;
&lt;br /&gt;
=== What are the ways that ROMS can receive tides on the boundaries? ===&lt;br /&gt;
# You can specify a time-dependent boundary condition file that temporally resolves the tides and skip the tides file entirely.&lt;br /&gt;
# You can specify [[Options#SSH_TIDES | SSH_TIDES]] and/or [[Options#UV_TIDES | UV_TIDES]] and provide  a tides file and skip the boundary condition file entirely - though this option might require you to tell ROMS in [[globaldefs.h]] that you really, really don&#039;t need an [[Options#OBC_FILE | OBC_FILE]]. Usual practice is to provide both surface elevation and currents in the tidal file and to use FSCHAPMAN and M2FLATHER on the open sides of your domain.&lt;br /&gt;
# You can specify other 2-d currents and surface elevation signals as coming in, plus have tides and use the [[Options#ADD_M2OBC | ADD_M2OBC]] and [[Options#ADD_FSOBC | ADD_FSOBC]] options.&lt;br /&gt;
=== How can I set up passive tracers? ===&lt;br /&gt;
You need to #define [[Options#T_PASSIVE | T_PASSIVE]] to get passive tracers. The flag [[Options#ANA_PASSIVE | ANA_PASSIVE]] determines whether or not the initial conditions are analytic (from [[Functionals#ana_passive.h | ana_passive.h]]) or from the initial condition file. As for boundary conditions, all tracers have either analytic boundary conditions or they all come from the same boundary condition file. If you need to read values from a file, the field names are dye_01, dye_02, etc. I successfully set up a uniform dye_01 using ANA_PASSIVE with boundary conditions from a file. The boundary file has u,v,T,S for many times and (analytic) biological values for the beginning and end times. I have a script to read one biology value, change the attributes and the value to my uniform value, then write it into the boundary file with the name dye_01_west, etc. I then had to edit [[varinfo.dat]] to reflect that it&#039;s using bio_time rather than ocean_time.&lt;br /&gt;
&lt;br /&gt;
You probably also want [[Options#ANA_SPFLUX | ANA_SPFLUX]] and [[Options#ANA_BPFLUX | ANA_BPFLUX]] for analytic surface and bottom passive tracer fluxes.&lt;br /&gt;
&lt;br /&gt;
=== What is the CFL criterion for ROMS? ===&lt;br /&gt;
&lt;br /&gt;
From Sasha Shchepetkin:&lt;br /&gt;
&lt;br /&gt;
1. Barotropic mode. The easiest to predict and control -- based on speed of the external waves, c_g=sqrt(g*h) where h is local depth, then &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;Cg = c_g*dtfast*\sqrt{1/dx^2 +1/dy^2}&amp;lt;/math&amp;gt; with dx and dy evaluated locally; Cg_max=max{Cg} over all horizontal grid points. This one is computed at the beginning of the run and reported by routine setup_grid2 and is is not monitored by diag thereafter. Its maximum allowed value depends on the particular time stepping algorithm and should be 0.87 for generalized FB stepping or 0.9-something for LF-AM3.&lt;br /&gt;
&lt;br /&gt;
2. Internal wave speed. Essentially phase speed of the first baroclinic mode multiplied by dt (slow-mode time step) and by &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;\sqrt{1/dx^2 +1/dy^2}&amp;lt;/math&amp;gt; same as above. Once again, this is not monitored by diag because it is difficult to evaluate the phase speed, but one has to rely on oceanographic intuition to pick a reasonable value. Internal waves (first baroclinic mode is the fastest) are typically faster than the fastest horizontal advection speed, but is not too fast away from it. So internal phase speeds of about 2.5 m/sec is quite realistic.&lt;br /&gt;
&lt;br /&gt;
3. Horizontal advection. The relevant number is Cu=dt*u/dx, however it should be kept in mind that for a 3D finite volume advection algorithm where fluxes in all three directions are applied simultaneously it is the combination off all three sets of fluxes what controls stability. So the most natural way to interpret Courant number for the 3D advection algorithm is the fraction of water within the control volume which being replaced in one time step. This CFL is monitored by diag.F (if proper CPP switches are activated).&lt;br /&gt;
&lt;br /&gt;
4. Vertical advection. This is the one which is hard to predict in advance, and typically it becomes more and more restrictive as resolution becomes finer. This is both because your solution becomes more vivid, and all currents are intensified as well as due to the nature of hydrostatic equations (because hydrostatic pressure is computed individually in each vertical column, each horizontal velocity &amp;quot;feels&amp;quot; the effect of the nearest neighbors but not several grid intervals away as it would be in the case of nonhydrostatic model. As the result any free-travelling nonlinear internal wave tends to from a sharp shock-like front which has large vertical velocity. Eventually it becomes unrealisticly large if one chooses smaller and smaller horizontal dx. The threshold to ensure that it does not happen is the aspect ratio: thermocline depth / dx. As long as it is small (say less than unity, but does not have to be vanishingly small), vertical velocity is effectively averages over horizontal grid box area, and therefore cannot be large. Conversely, pushing dx smaller an smaller beyond this threshold makes model violate the applicability of hydrostatic approximation, and in practice result in unrealistically large vertical velocities. (Vice-versa, using nonhydrostatic code on a coarse grid such that the above ratio is vanishingly small is plain waste of resources because the non-hydrostatic effects are essentially non-existing on the scales resolved by such grid, and in this sense it is the fact that horizontal resolution is finite is what makes hydrostatic-approximation model applicable).&lt;br /&gt;
&lt;br /&gt;
Vertical CFL is monitored by diag.F along with total advection CFL, and the latter should be kept under some limit to ensure model stability. The actual limiting value depends on the selection of advection algoritms and details of time stepping for 3D mode. But in any case the criterion is about 1 or so (0.8 or 0.9 or whatever).&lt;br /&gt;
&lt;br /&gt;
Another complication comes from the fact that finer grid means less smoothed topography which translates into larger vertical velocities. Also having/not having tides typically makes major difference in this regard.&lt;br /&gt;
&lt;br /&gt;
Another complication comes from the fact that some modern versions of ROMS have capability to circumvent vertical advection by monitoring overall 3D advective CFL budget and split vertical velocity into two parts, W=We+Wi, in such a way that We always stays within CFL allowed by the explicit advection scheme, and Wi is the &amp;quot;excess&amp;quot; portion vertical velocity which is treated implicitly for both advection of momentum and tracers equations. This offers some relief from vertical CFL.&lt;br /&gt;
&lt;br /&gt;
Another complication comes from the fact that criteria 2 and 3 are actually add up to each other rather than to be constrained separately, i.e., internal wave speed must be increased by advection speed when considering stability budget.&lt;br /&gt;
&lt;br /&gt;
5. Inertial period CFL. Because Coriolis term is treated explicitly it has its own CFL criterion. This is restrictive only if your time step is sufficiently large in absolute sense, that is 1 hour or more; the relevant nondimensioal number f*dt&lt;br /&gt;
&lt;br /&gt;
=== How can I deal with &amp;quot;patch&amp;quot; files? ===&lt;br /&gt;
OK, so maybe no one actually asked this yet, but I posted something in &amp;quot;diff -u&amp;quot; format:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;diff --git a/ROMS/Nonlinear/output.F b/ROMS/Nonlinear/output.F&lt;br /&gt;
index e4fb854..42ff7a8 100644&lt;br /&gt;
--- a/ROMS/Nonlinear/output.F&lt;br /&gt;
+++ b/ROMS/Nonlinear/output.F&lt;br /&gt;
@@ -1,4 +1,5 @@&lt;br /&gt;
 #include &amp;quot;cppdefs.h&amp;quot;&lt;br /&gt;
+#define LONG_NUMS&lt;br /&gt;
 #ifdef NONLINEAR&lt;br /&gt;
       SUBROUTINE output (ng)&lt;br /&gt;
 !&lt;br /&gt;
@@ -111,7 +119,11 @@&lt;br /&gt;
             ifile=(iic(ng)-1)/ndefHIS(ng)+1&lt;br /&gt;
             IF (Master) THEN&lt;br /&gt;
               WRITE (HIS(ng)%name,10) TRIM(HIS(ng)%base), ifile&lt;br /&gt;
+#ifdef LONG_NUMS&lt;br /&gt;
+  10          FORMAT (a,&#039;_&#039;,i5.5,&#039;.nc&#039;)&lt;br /&gt;
+#else&lt;br /&gt;
   10          FORMAT (a,&#039;_&#039;,i4.4,&#039;.nc&#039;)&lt;br /&gt;
+#endif&lt;br /&gt;
             END IF&lt;br /&gt;
 # ifdef DISTRIBUTE&lt;br /&gt;
             CALL mp_bcasts (ng, iNLM, HIS(ng)%name)&amp;lt;/div&amp;gt;Do I honestly expect you to apply this by hand? Not at all. If you save it to a file, called say &amp;quot;diff.out&amp;quot;, there&#039;s more than one way to automatically apply it:&lt;br /&gt;
* Because this was generated by git, you can use &amp;quot;git apply diff.out&amp;quot; to have these changes made to your output.F file. Shown here are two &amp;quot;hunks&amp;quot; starting with the &amp;quot;@@&amp;quot; lines. Git will check all the hunks before applying any so you won&#039;t end up with the file in a half-baked state.&lt;br /&gt;
* A much older tool for applying these patches is &amp;quot;patch&amp;quot;. The proper invocation here is &amp;quot;patch -p1 &amp;lt; diff.out&amp;quot; from the top of your ROMS directory tree, where the &amp;quot;-p1&amp;quot; strips off the a/b pseudo-directories from the git output. Unlike git, patch will apply as many hunks as it can, dumping the rest into an output.F.rej file for you to deal with later.&lt;br /&gt;
&lt;br /&gt;
== Errors at Run Time ==&lt;br /&gt;
=== Segmentation fault ===&lt;br /&gt;
There is more than one way to get a seg fault. Ways I know of include (a) running out of memory or some other system limit, (b) accessing an array out of bounds, (c) calling a function with too few arguments, (d) compiling on one system and running on a second with incompatible MPI libraries, (e) asking get_ngfld to read a field of all land values. For me, solving these typically involves recompiling with USE_DEBUG and running in a debugger. The array out of bounds can be found by using a bounds checking compiler flag (often included in USE_DEBUG).&lt;br /&gt;
&lt;br /&gt;
One common example is shown here:&lt;br /&gt;
&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;romsG 0000000000439EAC load_s2d_ 1564 inp_par.f90&lt;br /&gt;
romsG 0000000000481B8C read_phypar_ 1215 read_phypar.f90&lt;br /&gt;
romsG 000000000040F213 inp_par_ 88 inp_par.f90&lt;br /&gt;
romsG 000000000040666D ocean_control_mod 84 ocean_control.f90&lt;br /&gt;
romsG 000000000040635F MAIN__ 95 master.f90&amp;lt;/div&amp;gt;load_s2d is used to read a list of forcing files in the trunk code. In the COAWST/ice codes, it is also used to read a list of CLM and BRY files. In the case where there can be multiple BRY files, you need to tell it how many BRY files so that the structure can be allocated. If you are using COAWST/ice, be sure your roms.in includes the setting of &#039;&#039;&#039;NCLMFILES&#039;&#039;&#039; and &#039;&#039;&#039;NBCFILES&#039;&#039;&#039;, even if you have at most one of them.&lt;br /&gt;
&lt;br /&gt;
Be sure your roms.in is consistent with your ROMS version!&lt;br /&gt;
&lt;br /&gt;
=== Blowing up in diag.F ===&lt;br /&gt;
ROMS will check for extreme values of velocity and density at run time, including looking for NaN and Inf. If found, it will save a record to the restart file and die. If this happens early in the run, you might just try a shorter timestep. If it happens after many days/years of model time, you need to dig more deeply. Find out which field went bad and where in the domain it happened. The restart record can be viewed to look for this trouble. I&#039;ve had runs go bad at the bottom with a bottom stress instability, at the top with a surface forcing problem, at the boundary with boundary condition issues. I&#039;ve also had it go bad in the middle of the water column in no place special due to some other instability - it goes from fine to terrible in just a few timesteps. This last can often be run past with a shorter timestep, while the other problems call for more thoughtful responses.&lt;br /&gt;
&lt;br /&gt;
=== NETCDF_OPEN - unable to open existing NetCDF file: ===&lt;br /&gt;
followed by some random junk. In the roms.in file, it is best not to comment out the lines with input filenames. For example, if ROMS wants to read a forcing file and doesn&#039;t know the name of it, it will have junk in the filename. I know there are times when one doesn&#039;t want to provide a forcing file, yet ROMS insists that it needs one. If you leave the filename intact, you will instead trigger a message about the field it can&#039;t read from file forcing.nc. You can check globaldefs.h for the conditions that trigger the need for FRC_FILE.&lt;br /&gt;
&lt;br /&gt;
Also, if you tell it you have 13 forcing files, then only provide 12, you will get this message when it tries to read that file #13.&lt;br /&gt;
&lt;br /&gt;
=== Other troubles ===&lt;br /&gt;
ROMS tries to check everything and print useful error messages if something isn&#039;t right. Many problems can be solved by carefully reading the ROMS output. Otherwise, carefully check to make sure your roms.in file is appropriate for the version of ROMS you are running. Are you adding variables that you forgot to include in your varinfo.dat? Is your bathymetry too steep? If it&#039;s still not clear, I then go back to the debugger - a very useful skill for serious ROMS hacking.&lt;br /&gt;
&lt;br /&gt;
== Algorithm Design ==&lt;br /&gt;
=== Why the _r8 at the end of real constants? ===&lt;br /&gt;
Some computers use 32 bits for single precision real numbers and 64 bits for double precision, and some use 64 and 128, respectively. For consistent results on various machines, ROMS takes advantage of the intrinsic F90/95 function SELECTED_REAL_KIND( ). See ROMS/Modules/mod_kinds.F. This allows you to associate an integer parameter with a specific data type...in this case r8 is associated with 64-bit precision. RTFM (Read the Fortran90 Manual), or better yet, chapter 11 in [[Bibliography#ChapmanSJ_2004a | Chapman, 2004]].&lt;br /&gt;
&lt;br /&gt;
=== Why we cannot have zero bathymetry (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;h=0&amp;lt;/span&amp;gt;)? ===&lt;br /&gt;
In ROMS the the bathymetry, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;h&amp;lt;/span&amp;gt;, is positive and represents the vertical water column thickness (meters) from the ocean rest state (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;zeta=0&amp;lt;/span&amp;gt;).  We &#039;&#039;&#039;cannot&#039;&#039;&#039; have &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;h=0&amp;lt;/span&amp;gt; in &#039;&#039;&#039;any&#039;&#039;&#039; horizontal grid point even if it is masked by land. Therefore, during grid generation the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;h&amp;lt;/span&amp;gt; values are limited to a minimum value &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;hmin&amp;lt;/span&amp;gt;. Recall that in terrain-following vertical coordinates &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;h&amp;lt;/span&amp;gt; is used to compute the vertical level thickness (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Hz&amp;lt;/span&amp;gt;). If you examine the [[Curvilinear_Coordinates_Transformation | governing equations]], we divide by &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Hz&amp;lt;/span&amp;gt; when computing the vertical viscosity and diffusion terms. In addition, in several places of the numerical kernel we also divide by &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Hz&amp;lt;/span&amp;gt;.  This is usually computed in the internal array &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oHz=1/Hz&amp;lt;/span&amp;gt;. In mathematics, the &#039;&#039;&#039;division by zero&#039;&#039;&#039; is not defined and computers will return &#039;&#039;&#039;Inf&#039;&#039;&#039; or &#039;&#039;&#039;NaN&#039;&#039;&#039;.  Users need to consider carefully what value of &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;hmin&amp;lt;/span&amp;gt; to use by taking into account the horizontal grid resolution, number of vertical levels, and vertical coordinates stretching function for a particular application.  In ROMS, all the vertical levels are located above &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;hmin&amp;lt;/span&amp;gt;.  This will limit the vertical time-step of the model due to the Currant-Friedrichs-Levy (CFL) condition.  Notice that we also need a critical water column thickness (&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Dcrit&amp;lt;/span&amp;gt;) in wetting and drying for the same reasons mentioned above.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
== Input/Output NetCDF files ==&lt;br /&gt;
=== How to add a new variable to ROMS output files? ===&lt;br /&gt;
This question has been asked several times. ROMS IO design is very flexible and easy to expand. There are several steps that need to be followed to add new variables to any of the output files:&lt;br /&gt;
# The ROMS output NetCDF files are defined by any the routines with the prefix &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;def_&amp;lt;/span&amp;gt; in the &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;ROMS/Utilities&amp;lt;/span&amp;gt; directory. For example, in [[def_his.F]] a variable can be defined in the history file by just adding:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;        IF (Hout(idUvel,ng)) THEN&amp;lt;br /&amp;gt;          Vinfo( 1)=Vname(1,idUvel)&amp;lt;br /&amp;gt;          Vinfo( 2)=Vname(2,idUvel)&amp;lt;br /&amp;gt;          Vinfo( 3)=Vname(3,idUvel)&amp;lt;br /&amp;gt;          Vinfo(14)=Vname(4,idUvel)&amp;lt;br /&amp;gt;          Vinfo(16)=Vname(1,idtime)&amp;lt;br /&amp;gt;# if defined WRITE_WATER &amp;amp;&amp;amp; defined MASKING&amp;lt;br /&amp;gt;          Vinfo(20)=&#039;mask_u&#039;&amp;lt;br /&amp;gt;# endif&amp;lt;br /&amp;gt;          Vinfo(22)=&#039;coordinates&#039;&amp;lt;br /&amp;gt;          Aval(5)=REAL(Iinfo(1,idUvel,ng),r8)&amp;lt;br /&amp;gt;          status=def_var(ncHISid(ng),hisVid(idUvel,ng),NF_FOUT,         &amp;amp;&amp;lt;br /&amp;gt;     &amp;amp;                   nvd4,u3dgrd,Aval,Vinfo,ncname)&amp;lt;br /&amp;gt;        END IF&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; Correspondingly, the field time records are written in routines with the prefix &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;wrt_&amp;lt;/span&amp;gt;. For example, a field can be written in [[wrt_his.F]] as:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;      IF (Hout(idUvel,ng)) THEN&amp;lt;br /&amp;gt;        scale=1.0_r8&amp;lt;br /&amp;gt;        gtype=gfactor*u3dvar&amp;lt;br /&amp;gt;        status=nf_fwrite3d(ng, iNLM, ncHISid(ng), hisVid(idUvel,ng),    &amp;amp;&amp;lt;br /&amp;gt;     &amp;amp;                     tHISindx(ng), gtype,                         &amp;amp;&amp;lt;br /&amp;gt;     &amp;amp;                     LBi, UBi, LBj, UBj, 1, N(ng), scale,         &amp;amp;&amp;lt;br /&amp;gt;# ifdef MASKING&amp;lt;br /&amp;gt;     &amp;amp;                     GRID(ng) % umask(LBi,LBj),                   &amp;amp;&amp;lt;br /&amp;gt;# endif&amp;lt;br /&amp;gt;     &amp;amp;                     OCEAN(ng) % u(LBi,LBj,1,NOUT))&amp;lt;br /&amp;gt;        IF (status.ne.nf90_noerr) THEN&amp;lt;br /&amp;gt;          IF (Master) THEN&amp;lt;br /&amp;gt;            WRITE (stdout,10) TRIM(Vname(1,idUvel)), tHISindx(ng)&amp;lt;br /&amp;gt;          END IF&amp;lt;br /&amp;gt;          exit_flag=3&amp;lt;br /&amp;gt;          ioerror=status&amp;lt;br /&amp;gt;          RETURN&amp;lt;br /&amp;gt;        END IF&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Ass you may noticed, some knowledge of ROMS internal structure is required to define a new field. Please follow any of output fields examples in such files to define and write the new field. &lt;br /&gt;
# Notice that ROMS state variables are defined on a horizontal, [[Numerical_Solution_Technique#Horizontal_Discretization|staggered Arakawa C-grid]]. In addition, the variables are also [[Numerical_Solution_Technique#Vertical_Discretization|staggered in the vertical]]. Therefore, you need choose the appropriate identifier flag:&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;p2dvar&amp;lt;/span&amp;gt;: 2D field at &amp;amp;psi;-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;r2dvar&amp;lt;/span&amp;gt;: 2D field at &amp;amp;rho;-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;u2dvar&amp;lt;/span&amp;gt;: 2D field at u-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;v2dvar&amp;lt;/span&amp;gt;: 2D field at v-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;p3dvar&amp;lt;/span&amp;gt;: 3D field at &amp;amp;psi;-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;r3dvar&amp;lt;/span&amp;gt;: 3D field at &amp;amp;rho;-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;u3dvar&amp;lt;/span&amp;gt;: 3D field at u-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;v3dvar&amp;lt;/span&amp;gt;: 3D field at v-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;w3dvar&amp;lt;/span&amp;gt;: 3D field at w-points&lt;br /&gt;
#* &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;b3dvar&amp;lt;/span&amp;gt;: 3D bed-sediment field&lt;br /&gt;
# Select a unique six-character, case sensitive, field identifier which is defined in file [[mod_ncparam.F | ROMS/Modules/mod_ncparam.F]]. Notice that all the identifiers are defined in alphabetic order to facilitate the search. Choose a meaningfull identifier prefixed by &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;. This indentifier needs to be assigned in routine &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;initialize_ncparam&amp;lt;/span&amp;gt; during the reading of variable metadata form file [[varinfo.dat]]. You need to add code similar to:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;              CASE (&#039;idUvel&#039;) &amp;lt;br /&amp;gt;                idUvel=varid&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Check the example above to see how the &amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;idUvel&amp;lt;/span&amp;gt; identifier is used in the internal field metadata arrays.&lt;br /&gt;
# Define new field metadata in file [[varinfo.dat | ROMS/External/varinfo.dat]]. Follow the examples to define the following field information:&lt;br /&gt;
#* Field variable name string. This is the variable name in the output NetCDF file. You need to choose a unique and meaninful variable name.&lt;br /&gt;
#* Field long-name string. This is the variable &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;long_name&amp;lt;/span&amp;gt; attribute in the output NetCDF file.&lt;br /&gt;
#* Field units string. This is the variable &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;units&amp;lt;/span&amp;gt; attribute in the output NetCDF file.&lt;br /&gt;
#* Field type string. This is the variable &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;field&amp;lt;/span&amp;gt; attribute in the output NetCDF file.&lt;br /&gt;
#* Associated time-variable name string. This is the variable &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;time&amp;lt;/span&amp;gt; attribute in the output NetCDF file.&lt;br /&gt;
#* Field identifier string. This is the field six-character unique index used in information arrays.&lt;br /&gt;
#* Field staggered C-grid variable type. Use one of flags defined above.&lt;br /&gt;
#* Field scale floating-point value. This value is only used in input data to scale field to model units, if necessary. Otherwise, use a unity value.&amp;lt;br /&amp;gt;Notice that all string information above is specified within single quotes to facilitate free-format reading in [[mod_ncparam.F]]. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;&#039;u&#039;                                                ! Input/Output&amp;lt;br /&amp;gt;  &#039;u-momentum component&#039;&amp;lt;br /&amp;gt;  &#039;meter second-1&#039;                                 ! [m/s]&amp;lt;br /&amp;gt;  &#039;u-velocity, scalar, series&#039;&amp;lt;br /&amp;gt;  &#039;ocean_time&#039;&amp;lt;br /&amp;gt;  &#039;idUvel&#039;&amp;lt;br /&amp;gt;  &#039;u3dvar&#039;&amp;lt;br /&amp;gt;  1.0d0&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
# Add logical switch &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Hout(id....)&amp;lt;/span&amp;gt; in input script [[roms.in]] to activate the processing of the new field. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;Hout(idUvel) == T                          ! 3D U-velocity&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; This new switch needs to be read in file [[inp_par.F | ROMS/Utility/inp_par.F]], routine &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;read_PhyPar&amp;lt;/span&amp;gt;. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;          ELSE IF (TRIM(KeyWord).eq.&#039;Hout(idUvel)&#039;) THEN&amp;lt;br /&amp;gt;            IF (idUvel.eq.0) THEN&amp;lt;br /&amp;gt;              WRITE (out,280) &#039;idUvel&#039;&amp;lt;br /&amp;gt;              STOP&amp;lt;br /&amp;gt;            END IF&amp;lt;br /&amp;gt;            Npts=load_l(Nval, Cval, Ngrids, Hout(idUvel,1))&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;It is also a good idea to report the new logical switch to standard output. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;          IF (Hout(idUvel,ng)) WRITE (out,170) Hout(idUvel,ng),         &amp;amp;&amp;lt;br /&amp;gt;     &amp;amp;       &#039;Hout(idUvel)&#039;,                                            &amp;amp;&amp;lt;br /&amp;gt;     &amp;amp;       &#039;Write out 3D U-momentum component.&#039;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
# Follow the same steps to process time-averaged fields. In addition, you need to define, allocate, and initialize in [[mod_average.F | ROMS/Modules/mod_average.F]] the new ROMS variable used to accumulate the time records. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;      real(r8), pointer :: avgu3d(:,:,:)&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;      allocate ( AVERAGE(ng) % avgu3d(LBi:UBi,LBj:UBj,N(ng)) )&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;      AVERAGE(ng) % avgv3d(i,j,k) = IniVal&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;The time-averaged fields are computed in [[set_avg.F | ROMS/Nonlinear/set_avg.F]].  Check this file to see how this is done.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Applications&amp;diff=6618</id>
		<title>Applications</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Applications&amp;diff=6618"/>
		<updated>2024-01-24T18:12:22Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Contributed User Applications&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;User applications that are not distributed with the ROMS source code are invited here &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Changes to the code structure now make it straightforward to confine application-specific options to a small number of files maintained separately from the central code. &lt;br /&gt;
&lt;br /&gt;
This approach has the advantages that:&lt;br /&gt;
&lt;br /&gt;
* users can update their central code, adding newly developed features and fixing reported bugs, without upsetting personal options for a specific project&lt;br /&gt;
* users can work on more than one project at once using a single up-to-date code stem&lt;br /&gt;
* applications can be shared with colleagues without redistributing the entire source code, thereby fostering user community use of the most up-to-date ROMS release&lt;br /&gt;
&lt;br /&gt;
Most users configuring a typical application of the forward simulation model need only edit:&lt;br /&gt;
&lt;br /&gt;
* a file containing the CPP definitions, e.g. &#039;&#039;project.h&#039;&#039;. (The &#039;&#039;cppdefs.h&#039;&#039; file in previous ROMS versions has been re-structured to do this).  &lt;br /&gt;
* an input [[roms.in]] script&lt;br /&gt;
* initial, forcing and/or boundary netcdf files&lt;br /&gt;
* application-specific &#039;&#039;analytical&#039;&#039; options following the templates for &#039;&#039;&#039;ana_*.F&#039;&#039;&#039; files in the &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; directory. (The &#039;&#039;analytical.F&#039;&#039; subroutine in previous versions has been re-structured to do this). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== CBLAST ==&lt;br /&gt;
&lt;br /&gt;
Configuration and input files for a model of the southeast New England shelf during the ONR Coupled Boundary Layers and Air-Sea Transfer (CBLAST) experiment are provided here as one example of how we recommend users configure realistic applications.&lt;br /&gt;
&lt;br /&gt;
The files required to configure and run ROMS for CBLAST are available for download from &#039;&#039;&#039;www.myroms.org&#039;&#039;&#039; at the &#039;&#039;Datasets&#039;&#039; link on the left navigation panel (under the subheading &#039;&#039;&#039;Software&#039;&#039;&#039;), or follow this link [http://www.myroms.org/index.php?page=Datasets].&lt;br /&gt;
&lt;br /&gt;
A brief description of the files follows:&lt;br /&gt;
&lt;br /&gt;
=== cblast.h ===&lt;br /&gt;
&lt;br /&gt;
This file defines CPP flags (previously in &#039;&#039;cppdefs.h&#039;&#039;) that set options for physics, numerical schemes, vertical turbulence closure, open boundary conditions, biology, sediment transport ... and output options (averages, diagnostics, stations, floats) are set in &#039;&#039;cblast.h&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== roms_cblast.in ===&lt;br /&gt;
&lt;br /&gt;
This file is the [[roms.in]] file for CBLAST that sets values that are defined at execution. Parameters of particular relevance to CBLAST include: timestep, output frequency, open boundary nudging timescales and input netcdf file paths (amongst many others). &lt;br /&gt;
&lt;br /&gt;
In this example we use relative paths to input files that assume the following directory hierarchy:&lt;br /&gt;
&lt;br /&gt;
* cblast/&lt;br /&gt;
** Data/&lt;br /&gt;
*** all initial, surface forcing, tides, and other open boundary data&lt;br /&gt;
*** the [[varinfo.dat]] file that matches model input/output variable names to corresponding netcdf data variables. A &#039;&#039;varinfo.dat&#039;&#039; is not included here because we use the default distributed with the code in &#039;&#039;ROMS/External/varinfo.dat&#039;&#039;&lt;br /&gt;
** Forward&lt;br /&gt;
*** cblast.in&lt;br /&gt;
*** roms_cblast.in&lt;br /&gt;
&lt;br /&gt;
Our choice of this directory hierarchy anticipates other applications with the Adjoint and 4DVAR codes for model sensitivity and data assimilation studies which would require distinct &#039;&#039;cblast.h&#039;&#039; files in each subdirectory (all controlled by a master driver script). You can change this organizational structure for files to suit your own requirements - just make the necessary changes in &#039;&#039;roms_cblast.in&#039;&#039; so that ROMS finds the files.  &lt;br /&gt;
&lt;br /&gt;
=== build_cblast.sh ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This script is a work in progress. We have already resolved some issues to do with the control of make depend. For now, the script provided here works but will be updated to use new features in the makefile as they evolve and are tested.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;csh&#039;&#039; shell script serves to illustrate how a specific application can be configured without editing the [[makefile]] by using UNIX shell environment variables to over-ride the [[makefile]] defaults. If in the [[makefile]] a flag is set with the syntax &#039;&#039;&#039;VARIABLE ?= value&#039;&#039;&#039; this indicates its default value, but if &#039;&#039;&#039;VARIABLE&#039;&#039;&#039; is set in the shell that calls the script then the job inherits that value and over-rides the default. Of course, you can also choose to edit that line in the [[makefile]] itself and operate in that way. Just remember you did this. &lt;br /&gt;
&lt;br /&gt;
In the example given here we set the variables:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ROMS_APPLICATION&#039;&#039;&#039; is &#039;&#039;&#039;CBLAST&#039;&#039;&#039; which tells &#039;&#039;make&#039;&#039; to look for CPP definitions in a file called &#039;&#039;cblast.h&#039;&#039;. See [[makefile]] for more information. The value of &#039;&#039;&#039;ROMS_APPLICATION&#039;&#039;&#039; must match the parameter &#039;&#039;&#039;MyAppCPP&#039;&#039;&#039; in [[roms.in]]&lt;br /&gt;
* &#039;&#039;&#039;MY_HEADER_DIR &#039;&#039;&#039; tells &#039;&#039;make&#039;&#039; where to look for the &#039;&#039;cblast.h&#039;&#039; CPP defs file.&lt;br /&gt;
* &#039;&#039;&#039;MY_ANALYTICAL_DIR&#039;&#039;&#039; sets where &#039;&#039;&#039;ana_*.F&#039;&#039;&#039; files would be located. The CBLAST example here does not require any such files, but this line is left for information. &lt;br /&gt;
* &#039;&#039;&#039;BINDIR&#039;&#039;&#039;: Sets where te executable should be placed following sucessful compilation.&lt;br /&gt;
** Not used in this example:&lt;br /&gt;
*** &#039;&#039;&#039;BUILD_DIR&#039;&#039;&#039; would set the path to a temporary &#039;&#039;Build&#039;&#039; subdirectory is created to hold &#039;&#039;&#039;*.f90&#039;&#039;&#039; and &#039;&#039;&#039;*.o&#039;&#039;&#039; files. &lt;br /&gt;
*** &#039;&#039;&#039;setenv MPI on&#039;&#039;&#039; would activiate compilation for parallel execution. &lt;br /&gt;
*** If your FORTRAN compiler is not the default in makefile, you could set it here with &#039;&#039;&#039;setenv FORT myF90compilername&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Executing the script &#039;&#039;&#039;build_cblast&#039;&#039;&#039; sets these environment variables to inform &#039;&#039;make&#039;&#039; what do when building the CBLAST application.  The executable binary will be called &#039;&#039;romsM&#039;&#039; and the model would be run with command like:&lt;br /&gt;
&lt;br /&gt;
  cd MyProjects/cblast/Forward&lt;br /&gt;
  ./romsS &amp;lt; roms_cblast.in &amp;gt; roms_cblast.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019) all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. If you are working with a ROMS release prior to revision 933 you will need to replace &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_cblast.in&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_cblast.in&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt; with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanS&amp;lt;/span&amp;gt; in the command above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This model configuration was used to obtain the results described in: &lt;br /&gt;
&lt;br /&gt;
Wilkin, J., 2006: The summertime heat budget and circulation of southeast New England shelf waters, Journal of Physical Oceanography, 36(11), 1997-2011.&lt;br /&gt;
&lt;br /&gt;
The URL for full text article: http://ams.allenpress.com/perlserv/?request=get-document&amp;amp;doi=10.1175%2FJPO2968.1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A further study using this model set-up considers tidal circulation on the Nantucket Shoals:&lt;br /&gt;
&lt;br /&gt;
He, R. and J. Wilkin, 2006: Barotropic tides on the southeast New England shelf: A view from a hybrid data assimilative modeling approach. Journal of Geophysical Research, 111, C08002, doi:10.1029/2005JC003254.&lt;br /&gt;
&lt;br /&gt;
== LATTE ==&lt;br /&gt;
&lt;br /&gt;
Coming soon.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=makefile&amp;diff=6617</id>
		<title>makefile</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=makefile&amp;diff=6617"/>
		<updated>2024-01-24T18:11:32Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;makefile&amp;lt;/div&amp;gt;&lt;br /&gt;
{{warning}}&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Warning: Do not edit the &#039;&#039;&#039;makefile&#039;&#039;&#039;! Use the [[build Script]].&amp;lt;/span&amp;gt; This page is for informational purposes only and is not a guide for compiling ROMS source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROMS has a single &#039;&#039;&#039;makefile&#039;&#039;&#039; located in the top-level directory. Its generic structure facilitates the compiling of ROMS with other coupled models. The user usually needs to check/modify a few definitions in the &#039;&#039;&#039;makefile&#039;&#039;&#039; or the [[build Script]] before compiling a particular application. The list of the user options is given below.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;makefile&#039;&#039;&#039; builds the compiled objects in the specified build directory. It determines the compiling depedencies using the [[sfmakedepend]] script located in the &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; directory. Notice that the &#039;&#039;&#039;makefile&#039;&#039;&#039; time modification in your computer is used by &#039;&#039;&#039;make&#039;&#039;&#039; to check if the dependencies need to be updated. If you set the definitions below through a [[build Script]], you need to execute &#039;&#039;&#039;make clean&#039;&#039;&#039; whenever changes to the user options are made.&lt;br /&gt;
&lt;br /&gt;
All the other gory details of the &#039;&#039;&#039;makefile&#039;&#039;&#039; are covered in [[gmake]].&lt;br /&gt;
&lt;br /&gt;
==Environment Variables in the &#039;&#039;&#039;makefile&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
ROMS has a growing list of choices the user must make about the  compilation before starting the compile process, set in user-defined variables. Since we now use &#039;&#039;&#039;gnu make&#039;&#039;&#039;, it is possible to set the value of these variables in the Unix environment, rather than necessarily inside the &#039;&#039;&#039;Makefile&#039;&#039;&#039; (see [[gmake]]). The user-definable variables understood by the ROMS &#039;&#039;&#039;makefile&#039;&#039;&#039; are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=ROMS_APPLICATION /&amp;gt;;&amp;lt;span id=&amp;quot;ROMS_APPLICATION&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[ROMS_APPLICATION]]&lt;br /&gt;
:CPP option defining a particular application (for example, [[UPWELLING]]). The makefile will include its associated header file which is located in either the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory or the path specified in the [[MY_HEADER_DIR]] definition. The header file name is the lowercase value of [[ROMS_APPLICATION]] with the &#039;&#039;&#039;.h&#039;&#039;&#039; extension (for example, [[upwelling.h]]). Recall the CPP option defining an application must be unique.&amp;lt;section end=ROMS_APPLICATION /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_HEADER_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_HEADER_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_HEADER_DIR]]&lt;br /&gt;
: Application header file &#039;&#039;&#039;full&#039;&#039;&#039; directory path. Recall that a ROMS header file contains all the CPP options defining a particular application. This is the header file that it is included in [[cppdefs.h]]. Notice that if the header file is located in the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory, it is possible to include the same header file name located somewhere else because the full directory path is specified here. The user may copy the distributed header file(s) into a different directory and modify it to explore different CPP options.&amp;lt;section end=MY_HEADER_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_ANALYTICAL_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_ANALYTICAL_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_ANALYTICAL_DIR]]&lt;br /&gt;
: Directory containing the user&#039;s [[Functionals | analytic files]], if any. Templates of the analytic expressions are provided in the &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; directory. If analytic expressions are activated, the makefile will load first the ones located in [[MY_ANALYTICAL_DIR]] and then the ones located in &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039;. We recommended that you do not modify the analytical expressions in the &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039; directory since these are the official version of these files and updates will fight with your changes.  The user however can modify those in &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; or some other directory and specify which directory with this variable.&amp;lt;section end=MY_ANALYTICAL_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_CPP_FLAGS /&amp;gt;;&amp;lt;span id=&amp;quot;MY_CPP_FLAGS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_CPP_FLAGS]]&lt;br /&gt;
: Additional CPP options to activate.  Sometimes it is desirable to activate one or more CPP options to run different variants of the same application without modifying its header file. If this is the case, specify such options here using the &#039;&#039;&#039;-D&#039;&#039;&#039; syntax. For example, to write out time-averaged NetCDF file use &#039;&#039;&#039;-D&#039;&#039;&#039;[[AVERAGES]].&amp;lt;section end=MY_CPP_FLAGS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NestedGrids /&amp;gt;;&amp;lt;span id=&amp;quot;NestedGrids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NestedGrids]]&lt;br /&gt;
: Number of ROMS nested and/or composed grids, usually 1.&amp;lt;section end=NestedGrids /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compiler-Specific Options===&lt;br /&gt;
&lt;br /&gt;
These flags are used by the files inside the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_DEBUG /&amp;gt;;&amp;lt;span id=&amp;quot;USE_DEBUG&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_DEBUG]]&lt;br /&gt;
: Used to turn on symbolic debug information with no optimization. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_DEBUG /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;section begin=USE_MPI /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPI&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPI]]&lt;br /&gt;
:  Used to turn on distributed-memory parallelization in ROMS and linking to the [http://www.llnl.gov/computing/tutorials/mpi/ Message Passing Interface (MPI)] library. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_MPI /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_MPIF90 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPIF90&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPIF90]]&lt;br /&gt;
: Used to turn on the [http://www-unix.mcs.anl.gov/mpi/mpich1 MPICH] implementation of MPI via the compilation script &#039;&#039;&#039;mpif90&#039;&#039;&#039; which is  required in some Linux operating systems without a native MPI library (&#039;&#039;&#039;-lmpi&#039;&#039;&#039;). This definition macro is also convenient when there are several Fortran-90 compilers (&#039;&#039;&#039;ifort&#039;&#039;&#039;, &#039;&#039;&#039;pgf90&#039;&#039;&#039;, &#039;&#039;&#039;pathf90&#039;&#039;&#039;) in the system that use the &#039;&#039;&#039;mpif90&#039;&#039;&#039; compilation command. In this case, the user needs turn on both &#039;&#039;&#039;MPI&#039;&#039;&#039; and &#039;&#039;&#039;MPIF90&#039;&#039;&#039; definitions and specify the appropriate Fortran-90 compiler in &#039;&#039;&#039;FORT&#039;&#039;&#039; macro definition. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_MPIF90 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_OPENMP /&amp;gt;;&amp;lt;span id=&amp;quot;USE_OPENMP&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_OPENMP]]&lt;br /&gt;
: Used to turn on shared-memory parallelization in ROMS using the [http://www.llnl.gov/computing/tutorials/openMP/ OpenMP] compiler directives. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_OPENMP /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_LARGE /&amp;gt;;&amp;lt;span id=&amp;quot;USE_LARGE&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_LARGE]]&lt;br /&gt;
: Used to turn on 64-bit floating-point number precision. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_LARGE /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NETCDF_INCDIR /&amp;gt;;&amp;lt;span id=&amp;quot;NETCDF_INCDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NETCDF_INCDIR]]&lt;br /&gt;
: The location of the &#039;&#039;&#039;netcdf.mod&#039;&#039;&#039; and &#039;&#039;&#039;typesizes.mod&#039;&#039;&#039; files from [http://www.unidata.ucar.edu/software/netcdf/ NetCDF].&amp;lt;section end=NETCDF_INCDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NETCDF_LIBDIR /&amp;gt;;&amp;lt;span id=&amp;quot;NETCDF_LIBDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NETCDF_LIBDIR]]&lt;br /&gt;
: The location of the [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] library.&amp;lt;section end=NETCDF_LIBDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_NETCDF4 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_NETCDF4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_NETCDF4]]&lt;br /&gt;
: Set this to &#039;&#039;&#039;on&#039;&#039;&#039; if linking against the NetCDF4 library, which needs the [http://hdfgroup.com/HDF5/ HDF5] library and therefore:&amp;lt;section end=USE_NETCDF4 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=HDF5_LIBDIR /&amp;gt;;&amp;lt;span id=&amp;quot;HDF5_LIBDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[HDF5_LIBDIR]]&lt;br /&gt;
: The location of the [http://hdfgroup.com/HDF5/ HDF5] library.&amp;lt;section end=HDF5_LIBDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=FORT /&amp;gt;;&amp;lt;span id=&amp;quot;FORT&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[FORT]]&lt;br /&gt;
The user also needs to specify the appropriate Fortran-90 compiler to use.  The name of the Fortran-90 compiler depends on the operating system (see table below). This name is also used to determine the compiling configuration file to include in the &#039;&#039;&#039;makefile&#039;&#039;&#039; by concatenating the operating system (&#039;&#039;&#039;uname -s&#039;&#039;&#039;) and the chosen compiler name.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! Operating System&lt;br /&gt;
! Compiler(s)&lt;br /&gt;
|-&lt;br /&gt;
| AIX&lt;br /&gt;
| &#039;&#039;&#039;xlf&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ALPHA&lt;br /&gt;
| &#039;&#039;&#039;f90&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CYGWIN&lt;br /&gt;
| &#039;&#039;&#039;g95&#039;&#039;&#039;, &#039;&#039;&#039;df&#039;&#039;&#039;, &#039;&#039;&#039;ifort&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Darwin&lt;br /&gt;
| &#039;&#039;&#039;f90&#039;&#039;&#039;, &#039;&#039;&#039;gfortran&#039;&#039;&#039;, &#039;&#039;&#039;xlf&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Linux&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;, &#039;&#039;&#039;ifc&#039;&#039;&#039;, &#039;&#039;&#039;ifort&#039;&#039;&#039;, &#039;&#039;&#039;pgi&#039;&#039;&#039;, &#039;&#039;&#039;path&#039;&#039;&#039;, &#039;&#039;&#039;g95&#039;&#039;&#039;, &#039;&#039;&#039;gfortran&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SunOS&lt;br /&gt;
| &#039;&#039;&#039;f95&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SunOS/Linus&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| UNICOS-mp&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that others can be added as needed, using the existing files as templates.&amp;lt;section end=FORT /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Local File Options===&lt;br /&gt;
&amp;lt;section begin=BINDIR /&amp;gt;;&amp;lt;span id=&amp;quot;BINDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[BINDIR]]&lt;br /&gt;
: Directory path for the compiled executable.&amp;lt;section end=BINDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=BUILD_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;BUILD_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[BUILD_DIR]] (Fromerly SCRATCH_DIR)&lt;br /&gt;
: Directory for &#039;&#039;&#039;make&#039;&#039;&#039; temporary objects. By default it is set to &#039;&#039;&#039;Build&#039;&#039;&#039;. If building several projects simultaneously, you need to specify different values for each project.  Otherwise, you will compile the wrong files. This directory and the files within are removed when executing a &#039;&#039;&#039;make clean&#039;&#039;&#039;.&amp;lt;section end=BUILD_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Providing the Environment==&lt;br /&gt;
&lt;br /&gt;
Before compiling, you will need to find out some background information:&lt;br /&gt;
#What is the name of your compiler?&lt;br /&gt;
#What is returned by &#039;&#039;&#039;uname -s&#039;&#039;&#039; on your system?&lt;br /&gt;
#Is there a working NetCDF library?&lt;br /&gt;
#Where is it?&lt;br /&gt;
#Was it built with the above compiler?&lt;br /&gt;
#Do you have access to MPI or OpenMP?&lt;br /&gt;
As described more fully in [[gmake]], the &#039;&#039;&#039;makefile&#039;&#039;&#039; will be looking for a file in the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory with the combination of your operating system and your compiler. For instance, using Linux and the Pathscale compiler, the file would be called &#039;&#039;&#039;Linux-path.mk&#039;&#039;&#039;. Is the corresponding file for your system and compiler in the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory? If not, you will have to create it following the existing examples there.&lt;br /&gt;
&lt;br /&gt;
Next, there are two ways to provide the location for the NetCDF files (and optional HDF5 library). One is by editing the corresponding lines in your system-compiler file. Another way is through the Unix environment variables. If you are always going to be using the same compiler on each system, you can edit your &#039;&#039;&#039;.profile&#039;&#039;&#039; or &#039;&#039;&#039;.login&#039;&#039;&#039; files to globally set them. Here is an example for &#039;&#039;&#039;tcsh&#039;&#039;&#039;:&lt;br /&gt;
  setenv NETCDF_INCDIR /usr/local/netcdf4/include&lt;br /&gt;
  setenv NETCDF_LIBDIR /usr/local/netcdf4/lib&lt;br /&gt;
  setenv HDF5_LIBDIR /usr/local/hdf5/lib&lt;br /&gt;
The &#039;&#039;&#039;ksh/bash&#039;&#039;&#039; equivalent is:&lt;br /&gt;
  export NETCDF_INCDIR=/usr/local/netcdf4/include&lt;br /&gt;
  export NETCDF_LIBDIR=/usr/local/netcdf4/lib&lt;br /&gt;
  export HDF5_LIBDIR=/usr/local/hdf5/lib&lt;br /&gt;
&lt;br /&gt;
For the rest, move on to [[build Script]].&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=gmake&amp;diff=6616</id>
		<title>gmake</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=gmake&amp;diff=6616"/>
		<updated>2024-01-24T18:07:19Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;gmake&amp;lt;/div&amp;gt;&lt;br /&gt;
This article first appeared in the [http://www.arsc.edu/support/news/HPCnews.shtml|ARSC HPC Newsletter]. It as been revised and updated to more closely match the ROMS [[makefile]].&lt;br /&gt;
&lt;br /&gt;
Over the years, the community has moved from the stance of writing portable &#039;&#039;&#039;Makefiles&#039;&#039;&#039; to a stance of just using a powerful, portable &#039;&#039;&#039;make&#039;&#039;&#039;. The [[make]] section described a portable subset of &#039;&#039;&#039;make&#039;&#039;&#039; features. We now delve into some of the more powerful tools available in [http://www.gnu.org/software/make/ GNU make]. See also [http://www.oreilly.com/catalog/make3/ Managing projects with GNU Make] by Robert Mecklenburg, 2005. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Pattern Rules==&lt;br /&gt;
&lt;br /&gt;
The core of &#039;&#039;&#039;make&#039;&#039;&#039; hasn&#039;t changed in decades, but concentrating on &#039;&#039;&#039;gmake&#039;&#039;&#039; allows one to &#039;&#039;&#039;make&#039;&#039;&#039; use of its nifty little extras designed by real programmers to help with real projects. The first change that matters to my &#039;&#039;&#039;Makefiles&#039;&#039;&#039; is change from suffix rules to pattern rules. I&#039;ve always found the &#039;&#039;&#039;.SUFFIXES&#039;&#039;&#039; list to be odd, especially since &#039;&#039;&#039;.f90&#039;&#039;&#039; is not in the default list. Good riddance to all of that! For a concrete example, the old way to provide a rule for going from &#039;&#039;&#039;file.f90&#039;&#039;&#039; to &#039;&#039;&#039;file.o&#039;&#039;&#039; is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;.SUFFIXES: .o .f90 .F .F90&amp;lt;br /&amp;gt;&lt;br /&gt;
  .f90.o:&lt;br /&gt;
   &amp;lt;TAB&amp;gt; $(FC) -c $(FFLAGS) $&amp;amp;lt;&amp;lt;/span&amp;gt;&lt;br /&gt;
while the new way is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;%.o: %.f90&lt;br /&gt;
   &amp;lt;TAB&amp;gt; $(FC) -c $(FFLAGS) $&amp;amp;lt;&amp;lt;/span&amp;gt;&lt;br /&gt;
In fact, going to a uniform &#039;&#039;&#039;make&#039;&#039;&#039; means that we can figure out what symbols are defined and use their standard values - in this case, &#039;&#039;&#039;$(FC)&#039;&#039;&#039; and &#039;&#039;&#039;$(FFLAGS)&#039;&#039;&#039; are the built-in default names for the compiler and its options. If you have any questions about this, you can always run &#039;&#039;&#039;make&#039;&#039;&#039; with the &#039;&#039;&#039;-p&#039;&#039;&#039; (or &#039;&#039;&#039;--print-data-base&#039;&#039;&#039;) option. This prints out all the rules &#039;&#039;&#039;make&#039;&#039;&#039; knows about, such as:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;# default&amp;lt;br/&amp;gt;&lt;br /&gt;
  COMPILE.f = $(FC) $(FFLAGS) $(TARGET_ARCH) -c&amp;lt;/span&amp;gt;&lt;br /&gt;
Printing the rules database will show variables that &#039;&#039;&#039;make&#039;&#039;&#039; is picking up from the &#039;&#039;&#039;environment&#039;&#039;&#039;, from the &#039;&#039;&#039;Makefile&#039;&#039;&#039;, and from its built-in rules - and which of these sources is providing each value.&lt;br /&gt;
&lt;br /&gt;
==Assignments==&lt;br /&gt;
&lt;br /&gt;
In the old days, I only used one kind of assignment: &#039;&#039;&#039;=&#039;&#039;&#039; (equals sign). &#039;&#039;&#039;Gmake&#039;&#039;&#039; has several kinds of assignment (other makes might as well, but I no longer have to know or care). An example of the power of &#039;&#039;&#039;GNU make&#039;&#039;&#039; is shown by an example from my Cray X1 &#039;&#039;&#039;Makefile&#039;&#039;&#039;. There is a routine which runs much more quickly if a short function in another file is inlined. The way to accomplish this is through the &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;-O inlinefrom=file&amp;lt;/span&amp;gt; directive to the compiler. I can&#039;t add this option to &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;, since the inlined routine won&#039;t compile with this directive - it is only the one file that needs it. I had:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;FFLAGS = -O 3,aggress -e I -e m&lt;br /&gt;
  FFLAGS2 = -O 3,aggress -O inlinefrom=lmd_wscale.f90 -e I -e m&amp;lt;br /&amp;gt;&lt;br /&gt;
  lmd_skpp.o:&lt;br /&gt;
   &amp;lt;TAB&amp;gt; $(FC) -c $(FFLAGS2) $*.f90&amp;lt;/span&amp;gt;&lt;br /&gt;
The first change I can make to this using other assignments is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;FFLAGS := -O 3,aggress -e I -e m&lt;br /&gt;
  FFLAGS2 := $(FFLAGS) -O inlinefrom=lmd_wscale.f90&amp;lt;/span&amp;gt;&lt;br /&gt;
The &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;:=&amp;lt;/span&amp;gt; assignment means to evaluate the right hand side immediately. In this case, there is no reason not to, as long as the second assignment follows the first one (since it&#039;s using the value of &#039;&#039;&#039;$(FFLAGS)&#039;&#039;&#039;. For the plain equals, &#039;&#039;&#039;make&#039;&#039;&#039; doesn&#039;t evaluate the right-hand side until its second pass through the &#039;&#039;&#039;Makefile&#039;&#039;&#039;. However, &#039;&#039;&#039;gmake&#039;&#039;&#039; supports an assignment that avoids the need for &#039;&#039;&#039;FFLAGS2&#039;&#039;&#039; entirely:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;lmd_skpp.o: FFLAGS += -O inlinefrom=lmd_wscale.f90&amp;lt;/span&amp;gt;&lt;br /&gt;
What this means is that for the target &#039;&#039;&#039;lmd_skpp.o&#039;&#039;&#039; only, append the inlining directive to &#039;&#039;&#039;FFLAGS&#039;&#039;&#039;. I think this is pretty cool!&lt;br /&gt;
&lt;br /&gt;
One last kind of assignment is to set the value only if there is no value from somewhere else (the environment, for instance):&lt;br /&gt;
        &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;FC ?= mpxlf90_r&amp;lt;/span&amp;gt;&lt;br /&gt;
If we use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;:=&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;=&amp;lt;/span&amp;gt;, we would override the value from the environment.&lt;br /&gt;
&lt;br /&gt;
==Include and a Few Functions==&lt;br /&gt;
&lt;br /&gt;
One reasonably portable &#039;&#039;&#039;make&#039;&#039;&#039; feature is the &#039;&#039;&#039;include&#039;&#039;&#039; directive. It can be used to clean up the &#039;&#039;&#039;Makefile&#039;&#039;&#039; by putting bits in an include file. The syntax is simply:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;include file&amp;lt;/span&amp;gt;&lt;br /&gt;
and we use it liberally to keep the project information neat. We can also include a file with the system/compiler information in it, assuming we have some way of deciding which file to include. We can use &#039;&#039;&#039;uname -s&#039;&#039;&#039; to find out which operating system we&#039;re using. We also need to know which compiler we&#039;re using.&lt;br /&gt;
&lt;br /&gt;
One user-defined variable is called [[build Script#FORT | FORT]], the name of the Fortran compiler. This value is combined with the result of &#039;&#039;&#039;uname -s&#039;&#039;&#039; to provide a machine and compiler combination. For instance, &#039;&#039;&#039;ftn&#039;&#039;&#039; on Linux is the Cray cross-compiler. This would link to a different copy of the [[NetCDF]] library and use different compiler flags than the Intel compiler which might be on the same system.&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;# The user sets Fortran Compiler:&amp;lt;br /&amp;gt;&lt;br /&gt;
     FORT ?= ftn&amp;lt;br /&amp;gt;&lt;br /&gt;
       OS := $(shell uname -s| sed &#039;s/[\/ ]/-/g&#039;))&amp;lt;br /&amp;gt;&lt;br /&gt;
  include $(COMPILERS)/$(OS)-$(strip $(FORT)).mk&amp;lt;/span&amp;gt;&lt;br /&gt;
We pick one include file at compile time, here picking &#039;&#039;&#039;Linux-ftn.mk&#039;&#039;&#039;, containing the Cray cross-compiler information. The value &#039;&#039;&#039;Linux&#039;&#039;&#039; comes from the &#039;&#039;&#039;uname&#039;&#039;&#039; command, the &#039;&#039;&#039;ftn&#039;&#039;&#039; comes from the user, and the two are concatenated. The sed command will turn the slash in &#039;&#039;&#039;UNICOS/mp&#039;&#039;&#039; into a dash; the native Cray include file is &#039;&#039;&#039;UNICOS-mp-ftn.mk&#039;&#039;&#039;. Strip is a built-in function to strip away any extra white space.&lt;br /&gt;
&lt;br /&gt;
Another tricky system is &#039;&#039;&#039;CYGWIN&#039;&#039;&#039;, which puts a version number in the &#039;&#039;&#039;uname&#039;&#039;&#039; output, such as &#039;&#039;&#039;CYGWIN_NT-5.1&#039;&#039;&#039;. GNU &#039;&#039;&#039;make&#039;&#039;&#039; has quite a few built-in functions plus allows the user to define their own functions. One of the built-in functions allows us to do string substitution:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;MACHINE := $(patsubst CYGWIN_%,CYGWIN,$(MACHINE))&amp;lt;/span&amp;gt;&lt;br /&gt;
In &#039;&#039;&#039;make&#039;&#039;&#039;, the &#039;&#039;&#039;%&#039;&#039;&#039; symbol is a sort of wild card, much like &#039;&#039;&#039;*&#039;&#039;&#039; in the shell. Here, we match &#039;&#039;&#039;CYGWIN&#039;&#039;&#039; followed by an underscore and anything else, replacing the whole with simply &#039;&#039;&#039;CYGWIN&#039;&#039;&#039;. Another example of a built-in function is the substitution we do in:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;objects = $(subst .F,.o,$(sources))&amp;lt;/span&amp;gt;&lt;br /&gt;
where we build our list of objects from the list of sources. There are quite a few other functions, plus the user can defined their own. From the book:&lt;br /&gt;
:GNU make supports both built-in and user-defined functions.&lt;br /&gt;
:A function invocation looks much like a variable reference, but&lt;br /&gt;
:includes one or more parameters separated by commas.  Most built-in&lt;br /&gt;
:functions expand to some value that is then assigned to a variable&lt;br /&gt;
:or passed to a subshell. A user-defined function is stored in a&lt;br /&gt;
:variable or macro and expects one or more parameters to be passed&lt;br /&gt;
:by the caller.&lt;br /&gt;
&lt;br /&gt;
We will show some user-defined functions below.&lt;br /&gt;
&lt;br /&gt;
==Conditionals==&lt;br /&gt;
&lt;br /&gt;
We used to have way too many Makefiles, a separate one for each of the &#039;&#039;&#039;serial/MPI/OpenMP&#039;&#039;&#039; versions on each system (if supported). For instance, the name of the IBM compiler changes when using &#039;&#039;&#039;MPI&#039;&#039;&#039;; the options change for &#039;&#039;&#039;OpenMP&#039;&#039;&#039;. The compiler options also change when using &#039;&#039;&#039;64-bit&#039;&#039;&#039; addressing or for debugging, which we were manually setting. A better way to do this is to have the user select &#039;&#039;&#039;64-bit&#039;&#039;&#039; or not, &#039;&#039;&#039;MPI&#039;&#039;&#039; or not, etc, then use conditionals. A complete list of the user definable &#039;&#039;&#039;make&#039;&#039;&#039; variables is given in [[makefile]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GNU make&#039;&#039;&#039; supports two kinds of &#039;&#039;&#039;if&#039;&#039;&#039; test, &#039;&#039;&#039;ifdef&#039;&#039;&#039; and &#039;&#039;&#039;ifeq&#039;&#039;&#039; (plus the negative versions &#039;&#039;&#039;ifndef&#039;&#039;&#039;, &#039;&#039;&#039;ifneq&#039;&#039;&#039;). The example from the book is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifdef COMSPEC&lt;br /&gt;
  #  We are running Windows&lt;br /&gt;
  else&lt;br /&gt;
  #  We are not on Windows&lt;br /&gt;
  endif&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An example from the IBM include file is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifdef USE_DEBUG&lt;br /&gt;
    FFLAGS += -g -qfullpath&lt;br /&gt;
  else&lt;br /&gt;
    FFLAGS += -O3 -qstrict&lt;br /&gt;
  endif&amp;lt;/span&amp;gt;&lt;br /&gt;
To test for equality, an example is:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifeq ($(USE_MPI),on)&lt;br /&gt;
  #  Do MPI things&lt;br /&gt;
  endif&amp;lt;/span&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifeq &amp;quot;$(USE_MPI)&amp;quot; &amp;quot;on&amp;quot;&lt;br /&gt;
  #  Do MPI things&lt;br /&gt;
  endif&amp;lt;/span&amp;gt;&lt;br /&gt;
The user has to set values for the &#039;&#039;&#039;USE_MPI&#039;&#039;&#039;, &#039;&#039;&#039;USE_OPENMP&#039;&#039;&#039;, &#039;&#039;&#039;USE_DEBUG&#039;&#039;&#039;, and &#039;&#039;&#039;USE_LARGE&#039;&#039;&#039; switches in the&lt;br /&gt;
&#039;&#039;&#039;Makefile&#039;&#039;&#039; &#039;&#039;before&#039;&#039; the compiler-dependent piece is included:&lt;br /&gt;
     &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;USE_MPI ?= on&lt;br /&gt;
  USE_OPENMP ?=&lt;br /&gt;
   USE_DEBUG ?=&lt;br /&gt;
   USE_LARGE ?= on&amp;lt;/span&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;Makefile&#039;&#039;&#039; uses the conditional assign &#039;&#039;&#039;?=&#039;&#039;&#039; in case a build script is used to set them in the environment. Be sure to leave the switches meant to be off set to an empty string - the&lt;br /&gt;
string &#039;&#039;&#039;off&#039;&#039;&#039; will test true on an &#039;&#039;&#039;ifdef&#039;&#039;&#039; test.&lt;br /&gt;
&lt;br /&gt;
==Multiple Source Directories the ROMS Way==&lt;br /&gt;
&lt;br /&gt;
There&#039;s more than one way to divide your sources into separate directories. The choices we have made include non-recursive &#039;&#039;&#039;make&#039;&#039;&#039; and putting the temporary files in their own &#039;&#039;&#039;$(BUILD_DIR)&#039;&#039;&#039; directory. These include the &#039;&#039;&#039;.f90&#039;&#039;&#039; files which have been through the C preprocessor, object files, module files, and libraries.&lt;br /&gt;
&lt;br /&gt;
===Directory Structure===&lt;br /&gt;
&lt;br /&gt;
The directory structure of the source code has the top directory, a &#039;&#039;&#039;Master&#039;&#039;&#039; directory, a &#039;&#039;&#039;ROMS&#039;&#039;&#039; directory with a number of subdirectories, and several other directories. &#039;&#039;&#039;Master&#039;&#039;&#039; contains the main program while the rest contain sources for libraries and other files. Note that the bulk of the source code gets compiled into files that become libraries with the &#039;&#039;&#039;ar&#039;&#039;&#039; command, one library per directory. There is also a &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory for the system- and compiler-specific &#039;&#039;&#039;Makefile&#039;&#039;&#039; components.&lt;br /&gt;
&lt;br /&gt;
===Conditionally Including Components===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;makefile&#039;&#039;&#039; will build the lists of libraries to create and source files to compile. They start out empty at the top of the &#039;&#039;&#039;makefile&#039;&#039;&#039;:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;sources :=&lt;br /&gt;
  libraries :=&amp;lt;/span&amp;gt;&lt;br /&gt;
That&#039;s simple enough, but the list of directories to search for these sources will depend on the options chosen by the user, not just in the &#039;&#039;&#039;make&#039;&#039;&#039; [[makefile | options]], but inside the &#039;&#039;&#039;ROMS_HEADER&#039;&#039;&#039; file as well. How does this happen? Once &#039;&#039;&#039;make&#039;&#039;&#039; knows how to find the &#039;&#039;&#039;ROMS_HEADER&#039;&#039;&#039;, it is used by &#039;&#039;&#039;cpp&#039;&#039;&#039; to generate an include file telling &#039;&#039;&#039;make&#039;&#039;&#039; about these other options.&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;MAKE_MACROS := Compilers/make_macros.mk&lt;br /&gt;
  MACROS := $(shell cpp -P $(ROMS_CPPFLAGS) Compilers/make_macros.h &amp;gt; \&lt;br /&gt;
                   $(MAKE_MACROS); $(CLEAN) $(MAKE_MACROS))&amp;lt;/span&amp;gt;&lt;br /&gt;
The &#039;&#039;&#039;make_macros.h&#039;&#039;&#039; file contains blocks such as:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;#ifdef SWAN_COUPLING&lt;br /&gt;
    USE_SWAN := on&lt;br /&gt;
  #else&lt;br /&gt;
    USE_SWAN :=&lt;br /&gt;
  #endif&amp;lt;/span&amp;gt;&lt;br /&gt;
The resulting &#039;&#039;&#039;make_macros.mk&#039;&#039;&#039; file will simply end up with either &lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;USE_SWAN := on&amp;lt;/span&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;USE_SWAN :=&amp;lt;/span&amp;gt;&lt;br /&gt;
This file can then be included by the &#039;&#039;&#039;makefile&#039;&#039;&#039; and the variable &#039;&#039;&#039;USE_SWAN&#039;&#039;&#039; will have the correct state for this particular compilation. We can now use it and all the similar flags to build a list of directories.&lt;br /&gt;
&lt;br /&gt;
We initialize two lists:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;modules  :=&lt;br /&gt;
  includes :=    ROMS/Include&amp;lt;/span&amp;gt;&lt;br /&gt;
Add the adjoint bits:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifdef USE_ADJOINT&lt;br /&gt;
    modules  +=    ROMS/Adjoint&lt;br /&gt;
  endif&lt;br /&gt;
  ifdef USE_ADJOINT&lt;br /&gt;
    includes +=    ROMS/Adjoint&lt;br /&gt;
  endif&amp;lt;/span&amp;gt;&lt;br /&gt;
Add the bits we&#039;ll always need:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;modules  +=    ROMS/Nonlinear \&lt;br /&gt;
                 ROMS/Functionals \&lt;br /&gt;
                 ROMS/Utility \ &lt;br /&gt;
                 ROMS/Modules&lt;br /&gt;
  includes +=    ROMS/Nonlinear \&lt;br /&gt;
                 ROMS/Utility \&lt;br /&gt;
                 ROMS/Drivers&amp;lt;/span&amp;gt;&lt;br /&gt;
Then we add in some more:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifdef USE_SWAN&lt;br /&gt;
   modules  +=    Waves/SWAN/Src&lt;br /&gt;
   includes +=    Waves/SWAN/Src&lt;br /&gt;
  endif&amp;lt;br /&amp;gt;&lt;br /&gt;
  modules  +=    Master&lt;br /&gt;
  includes +=    Master Compilers&amp;lt;/span&amp;gt;&lt;br /&gt;
Now that our lists are complete, let&#039;s put them to use:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;vpath %.F $(modules)&lt;br /&gt;
  vpath %.h $(includes)&lt;br /&gt;
  vpath %.f90 $(BUILD_DIR)&lt;br /&gt;
  vpath %.o $(BUILD_DIR)&amp;lt;br /&amp;gt;&lt;br /&gt;
  include $(addsuffix /Module.mk,$(modules))&amp;lt;br /&amp;gt;&lt;br /&gt;
  CPPFLAGS += $(patsubst %,-I%,$(includes))&amp;lt;/span&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;vpath&#039;&#039;&#039; is a standard &#039;&#039;&#039;make&#039;&#039;&#039; feature for providing a list of directories for &#039;&#039;&#039;make&#039;&#039;&#039; to search for files of different types. Here we are saying that &#039;&#039;&#039;*.F&#039;&#039;&#039; files can be found in the directories provided in the &#039;&#039;&#039;$(modules)&#039;&#039;&#039; list, and so on for the others.&lt;br /&gt;
#For each directory in the &#039;&#039;&#039;$(modules)&#039;&#039;&#039; list, &#039;&#039;&#039;make&#039;&#039;&#039; will include the file &#039;&#039;&#039;Module.mk&#039;&#039;&#039; that is found there. More on these later.&lt;br /&gt;
#For each directory in the &#039;&#039;&#039;$(includes)&#039;&#039;&#039; list, add that directory to the list searched by &#039;&#039;&#039;cpp&#039;&#039;&#039; with the &#039;&#039;&#039;-I&#039;&#039;&#039; flag.&lt;br /&gt;
&lt;br /&gt;
==User-defined &#039;&#039;&#039;make&#039;&#039;&#039; Functions==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Module.mk&#039;&#039;&#039; fragments mentioned before call some user-defined functions.  It&#039;s time to show these functions and talk about how they work. They get defined in the top Makefile:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;#--------------------------------------------------------------------------&lt;br /&gt;
  #  Make functions for putting the temporary files in $(BUILD_DIR)&lt;br /&gt;
  #--------------------------------------------------------------------------&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(call source-dir-to-binary-dir, directory-list)&lt;br /&gt;
  source-dir-to-binary-dir = $(addprefix $(BUILD_DIR)/, $(notdir $1))&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(call source-to-object, source-file-list)&lt;br /&gt;
  source-to-object = $(call source-dir-to-binary-dir,   \&lt;br /&gt;
                   $(subst .F,.o,$(filter %.F,$1)))&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(call f90-source, source-file-list)&lt;br /&gt;
  f90-source = $(call source-dir-to-binary-dir,     \&lt;br /&gt;
                   $(subst .F,.f90,$1))&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(call make-library, library-name, source-file-list)&lt;br /&gt;
  define make-library&lt;br /&gt;
     libraries += $(BUILD_DIR)/$1&lt;br /&gt;
     sources   += $2&amp;lt;br /&amp;gt;&lt;br /&gt;
     $(BUILD_DIR)/$1: $(call source-dir-to-binary-dir,    \&lt;br /&gt;
                      $(subst .F,.o,$2))&lt;br /&gt;
         $(AR) $(ARFLAGS) $$@ $$^&lt;br /&gt;
         $(RANLIB) $$@&lt;br /&gt;
  endef&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(call one-compile-rule, binary-file, f90-file, source-files)&lt;br /&gt;
  define one-compile-rule&lt;br /&gt;
    $1: $2 $3&lt;br /&gt;
         cd $$(BUILD_DIR); $$(FC) -c $$(FFLAGS) $(notdir $2)&amp;lt;br /&amp;gt;&lt;br /&gt;
    $2: $3&lt;br /&gt;
         $$(CPP) $$(CPPFLAGS) $$(MY_CPP_FLAGS) $$&amp;lt; &amp;gt; $$@&lt;br /&gt;
         $$(CLEAN) $$@&lt;br /&gt;
  endef&amp;lt;br /&amp;gt;&lt;br /&gt;
  # $(compile-rules)&lt;br /&gt;
  define compile-rules&lt;br /&gt;
    $(foreach f, $(local_src),       \&lt;br /&gt;
      $(call one-compile-rule,$(call source-to-object,$f), \&lt;br /&gt;
      $(call f90-source,$f),$f))&lt;br /&gt;
  endef&amp;lt;/span&amp;gt;&lt;br /&gt;
#We define a function to convert the path from the source directory to the &#039;&#039;&#039;Build&#039;&#039;&#039; directory, called &#039;&#039;&#039;source-dir-to-binary-dir&#039;&#039;&#039;. Note that the &#039;&#039;&#039;Build&#039;&#039;&#039; directory is called &#039;&#039;&#039;$(BUILD_DIR)&#039;&#039;&#039; here. All it does is strip off the leading directory with the the built-in function &#039;&#039;&#039;notdir&#039;&#039;&#039;, then paste on the \code{Build} directory.&lt;br /&gt;
#Next comes &#039;&#039;&#039;source-to-object&#039;&#039;&#039;, which calls the function above to return the object filename when given the source filename. It assumes that all sources have a &#039;&#039;&#039;.F&#039;&#039;&#039; extension.&lt;br /&gt;
#A similar function is &#039;&#039;&#039;f90-source&#039;&#039;&#039;, which returns the name of the intermediate source which is created by &#039;&#039;&#039;cpp&#039;&#039;&#039; from our &#039;&#039;&#039;.F&#039;&#039;&#039; file.&lt;br /&gt;
#The &#039;&#039;&#039;Module.mk&#039;&#039;&#039; fragment in each library source directory invokes &#039;&#039;&#039;make-library&#039;&#039;&#039;, which takes the library name and the list of sources as its arguments. The function adds its &#039;&#039;&#039;library&#039;&#039;&#039; to the global list of &#039;&#039;&#039;libraries&#039;&#039;&#039; and provides rules for building itself. The double dollar signs are to delay the variable substitution. Note that we call &#039;&#039;&#039;source-dir-to-binary-dir&#039;&#039;&#039; instead of &#039;&#039;&#039;source-to-object&#039;&#039;&#039; - this is a work-around for a make bug.&lt;br /&gt;
#The next, &#039;&#039;&#039;one-compile-rule&#039;&#039;&#039;, takes three arguments: the &#039;&#039;&#039;.o&#039;&#039;&#039; filename, the &#039;&#039;&#039;.f90&#039;&#039;&#039; filename, and the &#039;&#039;&#039;.F&#039;&#039;&#039; filename. From these, it produces the &#039;&#039;&#039;make&#039;&#039;&#039; rules for running &#039;&#039;&#039;cpp&#039;&#039;&#039; and the compiler.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;A note on directories: &#039;&#039;&#039;make&#039;&#039;&#039; uses &#039;&#039;&#039;vpath&#039;&#039;&#039; to find the source file where it resides. It would be possible to compile from the top directory and put the &#039;&#039;&#039;.o&#039;&#039;&#039; file in &#039;&#039;&#039;Build&#039;&#039;&#039; with the appropriate arguments, but I don&#039;t know how to get the &#039;&#039;&#039;.mod&#039;&#039;&#039; file into &#039;&#039;&#039;Build&#039;&#039;&#039; short of a &#039;&#039;&#039;mv&#039;&#039;&#039; command. Likewise, if we compile in the top directory, we need to know the compiler option to tell it to look in &#039;&#039;&#039;Build&#039;&#039;&#039; for the &#039;&#039;&#039;.mod&#039;&#039;&#039; files it uses. Doing a &#039;&#039;&#039;cd&#039;&#039;&#039; to &#039;&#039;&#039;Build&#039;&#039;&#039; before compiling is just simpler.&lt;br /&gt;
#The last, &#039;&#039;&#039;compile-rules&#039;&#039;&#039;, is given a list of sources, then calls &#039;&#039;&#039;one-compile-rule&#039;&#039;&#039; once per source file.&lt;br /&gt;
&lt;br /&gt;
Again, you can invoke &#039;&#039;&#039;make -p&#039;&#039;&#039; to see how &#039;&#039;&#039;make&#039;&#039;&#039; internally transforms all this into actual targets and rules.&lt;br /&gt;
&lt;br /&gt;
==Library &#039;&#039;&#039;Module.mk&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
In each library directory, there is a file called &#039;&#039;&#039;Module.mk&#039;&#039;&#039; which gets included by the top level &#039;&#039;&#039;makefile&#039;&#039;&#039;. These &#039;&#039;&#039;Module.mk&#039;&#039;&#039; bits build onto the list of sources and libraries to be compiled and built, respectively.  These &#039;&#039;&#039;Module.mk&#039;&#039;&#039; files look something like:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;local_sub  := ROMS/Nonlinear &lt;br /&gt;
  local_lib  := libNLM.a&amp;lt;br /&amp;gt;&lt;br /&gt;
  local_src  := $(wildcard $(local_sub)/*.F)&amp;lt;br /&amp;gt;&lt;br /&gt;
  $(eval $(call make-library,$(local_lib),$(local_src)))&amp;lt;br /&amp;gt;&lt;br /&gt;
  $(eval $(compile-rules))&amp;lt;/span&amp;gt;&lt;br /&gt;
First, we provide the name of the current directory and the library to be built from the resident sources.  Next, we use the &#039;&#039;&#039;wildcard&#039;&#039;&#039; function to search the subdirectory for these sources. Note that every &#039;&#039;&#039;.F&#039;&#039;&#039; file found will be compiled. If you have half-baked files that you don&#039;t want used, make sure they have a different extension.&lt;br /&gt;
&lt;br /&gt;
Each subdirectory is resetting the &#039;&#039;&#039;local_src&#039;&#039;&#039; variable. That&#039;s OK because we&#039;re saving the values in the global &#039;&#039;&#039;sources&#039;&#039;&#039; variable inside the &#039;&#039;&#039;make-library&#039;&#039;&#039; function, which also adds the local library&lt;br /&gt;
to the &#039;&#039;&#039;libraries&#039;&#039;&#039; list. The &#039;&#039;&#039;compile-rules&#039;&#039;&#039; function uses this &#039;&#039;&#039;local_src&#039;&#039;&#039; variable to generate the rules for compiling each file, placing the resulting files in the &#039;&#039;&#039;Build&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
==Main Program==&lt;br /&gt;
&lt;br /&gt;
The main program is in a directory called &#039;&#039;&#039;Master&#039;&#039;&#039; and its &#039;&#039;&#039;Module.mk&#039;&#039;&#039; is similar to the library one:&lt;br /&gt;
  &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;local_sub  := Master&lt;br /&gt;
  local_src  := $(wildcard $(local_sub)/*.F)&amp;lt;br /&amp;gt;&lt;br /&gt;
  local_objs := $(subst .F,.o,$(local_src))&lt;br /&gt;
  local_objs := $(addprefix $(BUILD_DIR)/, $(notdir $(local_objs)))&amp;lt;br /&amp;gt;&lt;br /&gt;
  sources    += $(local_src)&amp;lt;br /&amp;gt;&lt;br /&gt;
  ifdef LD_WINDOWS&lt;br /&gt;
  $(BIN): $(libraries) $(local_objs)&lt;br /&gt;
          $(LD) $(FFLAGS) $(local_objs) -o $@ $(libraries) $(LIBS_WIN32) $(LDFLAGS)&lt;br /&gt;
  else&lt;br /&gt;
  $(BIN): $(libraries) $(local_objs)&lt;br /&gt;
          $(LD) $(FFLAGS) $(LDFLAGS) $(local_objs) -o $@ $(libraries) $(LIBS)&lt;br /&gt;
  endif&amp;lt;br /&amp;gt;&lt;br /&gt;
  $(eval $(compile-rules))&amp;lt;/span&amp;gt;&lt;br /&gt;
Instead of a rule for building a library, we have a rule for building a binary. In this case, the name of the binary is defined elsewhere. The binary depends on the &#039;&#039;&#039;libraries&#039;&#039;&#039; getting compiled first, as well as the local sources. During the link, the &#039;&#039;&#039;$(libraries)&#039;&#039;&#039; are compiled from the sources in the other directories, while &#039;&#039;&#039;$(LIBS)&#039;&#039;&#039; are external libraries such as &#039;&#039;&#039;NetCDF&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Top Level Makefile==&lt;br /&gt;
&lt;br /&gt;
Now we get to the glue that holds it all together.  We&#039;ve covered many things so far, but there&#039;s still a few bits which might be confusing:&lt;br /&gt;
#There can be rare cases where you might have special code for some systems. You can check which system you are on in the &#039;&#039;&#039;.F&#039;&#039;&#039; file with:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;#ifdef X86_64&amp;lt;br /&amp;gt;!      special stuff&amp;lt;br /&amp;gt;#endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;To be sure this is defined on each \code{X86\_64} system, it has to be passed to &#039;&#039;&#039;cpp&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;CPPFLAGS += -D$(shell echo ${OS} | tr &amp;quot;-&amp;quot; &amp;quot;_&amp;quot; | tr [a-z] [A-Z])&amp;lt;br /&amp;gt;CPPFLAGS += -D$(shell echo ${CPU} | tr &amp;quot;-&amp;quot; &amp;quot;_&amp;quot; | tr [a-z] [A-Z])&amp;lt;br /&amp;gt;CPPFLAGS += -D$(shell echo ${FORT} | tr &amp;quot;-&amp;quot; &amp;quot;_&amp;quot; | tr [a-z] [A-Z])&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;CPPFLAGS += -D&#039;ROOT_DIR=&amp;quot;$(ROOTDIR)&amp;quot;&#039;&amp;lt;br /&amp;gt;ifdef ROMS_APPLICATION&amp;lt;br /&amp;gt;  CPPFLAGS  += $(ROMS_CPPFLAGS)&amp;lt;br /&amp;gt;  CPPFLAGS  += -DNestedGrids=$(NestedGrids)&amp;lt;br /&amp;gt;  MDEPFLAGS += -DROMS_HEADER=&amp;quot;$(HEADER)&amp;quot;&amp;lt;br /&amp;gt;endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;This guarantees that &#039;&#039;&#039;CPPFLAGS&#039;&#039;&#039; will have terms in it such as:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;   -DLINUX -DX86_64 -DPGI&amp;lt;br /&amp;gt;   -D&#039;ROOT_DIR=&amp;quot;/export/staffdata/kate/roms/trunk&amp;quot;&#039; -DSHOREFACE&amp;lt;br /&amp;gt;   -D&#039;HEADER=&amp;quot;shoreface.h&amp;quot;&#039; -D&#039;ROMS_HEADER=&amp;quot;shoreface.h&amp;quot;&#039;&amp;lt;br /&amp;gt;   -DNestedGrids=1&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
#For [[mod_strings.F]], there is a special case:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;$(BUILD_DIR)/mod_strings.f90: CPPFLAGS += -DMY_OS=&#039;&amp;quot;$(OS)&amp;quot;&#039; \&amp;lt;br /&amp;gt;       -DMY_CPU=&#039;&amp;quot;$(CPU)&amp;quot;&#039; -DMY_FORT=&#039;&amp;quot;$(FORT)&amp;quot;&#039; \&amp;lt;br /&amp;gt;       -DMY_FC=&#039;&amp;quot;$(FC)&amp;quot;&#039; -DMY_FFLAGS=&#039;&amp;quot;$(FFLAGS)&amp;quot;&#039;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;allowing ROMS to report in its output:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt; Operating system : Linux&amp;lt;br /&amp;gt; CPU/hardware     : x86_64&amp;lt;br /&amp;gt; Compiler system  : pgi&amp;lt;br /&amp;gt; Compiler command : pgf90&amp;lt;br /&amp;gt; Compiler flags   :  -O3 -tp k8-64 -Mfree&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; Local Root    : /export/staffdata/kate/roms/trunk&amp;lt;br /&amp;gt; Header Dir    : ./ROMS/Include&amp;lt;br /&amp;gt; Header file   : shoreface.h&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Though this doesn&#039;t seem to work on the Mac.&lt;br /&gt;
#The very first &#039;&#039;&#039;makefile&#039;&#039;&#039; I showed had a set list of files to remove on &#039;&#039;&#039;make clean&#039;&#039;&#039;. We now build a list, called &#039;&#039;&#039;clean_list&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt; clean_list := core *.ipo $(BUILD_DIR)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;ifeq &amp;quot;$(strip $(BUILD_DIR))&amp;quot; &amp;quot;.&amp;quot;&amp;lt;br /&amp;gt;  clean_list := core *.o *.oo *.mod *.f90 lib*.a *.bak&amp;lt;br /&amp;gt;  clean_list += $(CURDIR)/*.ipo&amp;lt;br /&amp;gt;endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;In other words, we want to clean up the &#039;&#039;&#039;Build&#039;&#039;&#039; directory unless it happens to be the top level directory, in which case we only want to remove specific files there.&lt;br /&gt;
#&#039;&#039;&#039;all&#039;&#039;&#039; is the first target that gets seen by &#039;&#039;&#039;make&#039;&#039;&#039;, making it the default &#039;&#039;&#039;target&#039;&#039;&#039;. In this case, we know there is only the one binary, whose name we know - the book shows what to do with more than one binary. Both &#039;&#039;&#039;all&#039;&#039;&#039; and &#039;&#039;&#039;clean&#039;&#039;&#039; are phony targets in that no files of those names get generated - make has the &#039;&#039;&#039;.PHONY&#039;&#039;&#039; designation for such targets. Also, the &#039;&#039;&#039;clean&#039;&#039;&#039; target doesn&#039;t require any compiler information, so the compiler include doesn&#039;t happen if the target is &#039;&#039;&#039;clean&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ifneq &amp;quot;$(MAKECMDGOALS)&amp;quot; &amp;quot;clean&amp;quot;&amp;lt;br /&amp;gt;  include $(COMPILERS)/$(OS)-$(strip $(FORT)).mk&amp;lt;br /&amp;gt;endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&#039;&#039;&#039;$(MAKECMDGOALS)&#039;&#039;&#039; is a special variable containing the current &#039;&#039;&#039;make&#039;&#039;&#039; target.&lt;br /&gt;
#We&#039;ll be creating different executable names, depending on which options we&#039;ve picked:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;BIN := $(BINDIR)/romsS&amp;lt;br /&amp;gt;ifdef USE_DEBUG&amp;lt;br /&amp;gt;  BIN := $(BINDIR)/romsG&amp;lt;br /&amp;gt;else&amp;lt;br /&amp;gt; ifdef USE_MPI&amp;lt;br /&amp;gt;   BIN := $(BINDIR)/romsM&amp;lt;br /&amp;gt; endif&amp;lt;br /&amp;gt; ifdef USE_OpenMP&amp;lt;br /&amp;gt;   BIN := $(BINDIR)/romsO&amp;lt;br /&amp;gt; endif&amp;lt;br /&amp;gt;endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; In SVN revision 933 (January 26, 2019) all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean_*.in&amp;lt;/span&amp;gt; files were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms_*.in&amp;lt;/span&amp;gt; and all &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ocean*&amp;lt;/span&amp;gt; ROMS executables were renamed to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;roms*&amp;lt;/span&amp;gt; in order to facilitate and clarify model coupling efforts. More information can be found in the ROMS repository [https://www.myroms.org/projects/src/ticket/794 Trac ticket #794]. If you are working with a ROMS release prior to revision 933, you will find that &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsM&amp;lt;/span&amp;gt;, and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;romsO&amp;lt;/span&amp;gt; will read &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanS&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanG&amp;lt;/span&amp;gt;, &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanM&amp;lt;/span&amp;gt;, and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;oceanO&amp;lt;/span&amp;gt; instead.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
# The [[NetCDF]] library gets included during the final link stage. However, we are now using the Fortran 90 version of it which requires its module information as well. We just copy the &#039;&#039;&#039;.mod&#039;&#039;&#039; files into the &#039;&#039;&#039;Build&#039;&#039;&#039; directory:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;NETCDF_MODFILE := netcdf.mod&amp;lt;br /&amp;gt;TYPESIZES_MODFILE := typesizes.mod&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;$(BUILD_DIR)/$(NETCDF_MODFILE): | $(BUILD_DIR)&amp;lt;br /&amp;gt;        cp -f $(NETCDF_INCDIR)/$(NETCDF_MODFILE) $(BUILD_DIR)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;$(BUILD_DIR)/$(TYPESIZES_MODFILE): | $(BUILD_DIR)&amp;lt;br /&amp;gt;        cp -f $(NETCDF_INCDIR)/$(TYPESIZES_MODFILE) $(BUILD_DIR)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Old versions of NetCDF do not have the &#039;&#039;&#039;typesizes.mod&#039;&#039;&#039; file, in which case it has to be removed from the following dependency list:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;$(BUILD_DIR)/MakeDepend: makefile \&amp;lt;br /&amp;gt;                         $(BUILD_DIR)/$(NETCDF_MODFILE) \&amp;lt;br /&amp;gt;                         $(BUILD_DIR)/$(TYPESIZES_MODFILE) \&amp;lt;br /&amp;gt;                         | $(BUILD_DIR)&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#Then there is [[MakeDepend]] itself. This file is created by the [[Perl]] script [[sfmakedepend]]. [[MakeDepend]] gets created by &#039;&#039;&#039;make depend&#039;&#039;&#039; and included on &#039;&#039;&#039;make&#039;&#039;&#039;&#039;s second pass through the &#039;&#039;&#039;makefile&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;depend: $(BUILD_DIR)&amp;lt;br /&amp;gt;        $(SFMAKEDEPEND) $(MDEPFLAGS) $(sources) &amp;gt; $(BUILD_DIR)/MakeDepend&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;ifneq &amp;quot;$(MAKECMDGOALS)&amp;quot; &amp;quot;clean&amp;quot;&amp;lt;br /&amp;gt;  -include $(BUILD_DIR)/MakeDepend&amp;lt;br /&amp;gt;endif&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;The dash before the &#039;&#039;&#039;include&#039;&#039;&#039; tells &#039;&#039;&#039;make&#039;&#039;&#039; to ignore errors so that &#039;&#039;&#039;make depend&#039;&#039;&#039; will succeed before the file exists. The &#039;&#039;&#039;MakeDepend&#039;&#039;&#039; file will contain the include and module dependencies for each source file, such as:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Build/mod_diags.o: tile.h cppdefs.h globaldefs.h shoreface.h&amp;lt;br /&amp;gt;Build/mod_diags.f90: tile.h cppdefs.h globaldefs.h shoreface.h&amp;lt;br /&amp;gt;Build/mod_diags.o: Build/mod_kinds.o Build/mod_param.o Build/mod_diags.f90&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;Note that the &#039;&#039;&#039;.h&#039;&#039;&#039; files are included by &#039;&#039;&#039;cpp&#039;&#039;&#039;, so that both the &#039;&#039;&#039;.f90&#039;&#039;&#039; and &#039;&#039;&#039;.o&#039;&#039;&#039; files become out of date when an include file is modified. Without the module dependencies, &#039;&#039;&#039;make&#039;&#039;&#039; would try to build the sources in the wrong order and the compiler would fail with a complaint about not finding &#039;&#039;&#039;mod_param.mod&#039;&#039;&#039;, for instance.&lt;br /&gt;
&lt;br /&gt;
==Final Warnings==&lt;br /&gt;
&lt;br /&gt;
The cost of this nifty &#039;&#039;&#039;make&#039;&#039;&#039; stuff is:&lt;br /&gt;
#We&#039;re a little closer to the &#039;&#039;&#039;gnu make&#039;&#039;&#039; bugs here, and we need a newer version of &#039;&#039;&#039;gnu make&#039;&#039;&#039; than before (version 3.81, 3.80 if you&#039;re lucky). Hence this stuff at the top of the &#039;&#039;&#039;makefile&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;NEED_VERSION := 3.80 3.81&amp;lt;br&amp;gt;$(if $(filter $(MAKE_VERSION),$(NEED_VERSION)),,        \&amp;lt;br&amp;gt; $(error This makefile requires one of GNU make version $(NEED_VERSION).))&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
#The &#039;&#039;&#039;Makefile&#039;&#039;&#039; dependencies get just a little trickier every change we make. Note that &#039;&#039;&#039;F90&#039;&#039;&#039; has potentially both &#039;&#039;&#039;include&#039;&#039;&#039; and &#039;&#039;&#039;module&#039;&#039;&#039; use dependencies. The book example uses the C compiler to produce its own dependencies for each source file into a corresponding &#039;&#039;&#039;.d&#039;&#039;&#039; file to be included by &#039;&#039;&#039;make&#039;&#039;&#039;. Our Fortran compilers are not so smart. For these hairy compiles, it&#039;s critical to have accurate dependency information unless we&#039;re willing to &#039;&#039;&#039;make clean&#039;&#039;&#039; between compiles.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6615</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6615"/>
		<updated>2024-01-24T17:51:56Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Git&amp;lt;/div&amp;gt;&lt;br /&gt;
ROMS source code is now distributed using [https://git-scm.com Git]. The [https://subversion.apache.org Subversion](SVN) repository is being phased out and will no longer be updated starting January 1&amp;lt;sup&amp;gt;st&amp;lt;/sup&amp;gt;, 2025. The GitHub repository includes the full history of changes to the ROMS source code. There are command line and GUI Git clients available for nearly every operating system and a list of popular clients can be found [https://git-scm.com/downloads/guis here]. This page will help you get started with downloading ROMS with Git.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; For instructions using the deprecated and soon to be discontinued myroms.org git repository, click [[Talk:Git|here]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; Details on using the deprecated and soon to be discontinued Subversion repository can be found [[Subversion|here]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git Overview==&lt;br /&gt;
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. All the ROMS/TOMS files are stored in a Git repository on &#039;&#039;&#039;github.com&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This Git repository is the official version of the code which only the developers are allowed to change. Users should download the ROMS code to their local machines using a &#039;&#039;&#039;git client&#039;&#039;&#039;.  Don&#039;t attempt to use a regular web browser to browse or download files from the Git repository - there are much better tools for interacting with the code repository.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users always check out the current &#039;&#039;develop&#039;&#039; version since this has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; are kept largely as a historical record of stable releases at the conclusion of major code upgrades.&lt;br /&gt;
&lt;br /&gt;
If you are making changes of your own, keep them in a separate branch, leaving the &#039;&#039;develop&#039;&#039; branch to track changes from the source. Git makes it &#039;&#039;so&#039;&#039; much easier to manage your own modifications than svn for those of us without write permission on the repository.&lt;br /&gt;
&lt;br /&gt;
Below is a general description of how Git works. Please look at the [https://git-scm.com/book/en/v2 Pro Git] book for more detailed information. We have not yet tried any GUI clients but may add brief how-tos for the most popular GUIs at a later date.&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading any of &#039;&#039;&#039;ROMS&#039;&#039;&#039; repositories, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading some &#039;&#039;&#039;&#039;&#039;roms_test&#039;&#039;&#039;&#039;&#039; input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;more ~/.gitconf&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [User]&amp;lt;br /&amp;gt;        name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;        email = your@email&amp;lt;br /&amp;gt;   [credential]&amp;lt;br /&amp;gt;        helper = cache --timeout=7200&amp;lt;br /&amp;gt;        helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;   [filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;        clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;        smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;        process = git-lfs filter-process&amp;lt;br /&amp;gt;        required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you clone the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a git repository, &#039;&#039;&#039;git client&#039;&#039;&#039; software must be installed on your local machine. Most Linux distributions come with git, so shell commands may be used without installing additional software. The general form of git commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git&amp;lt;/span&amp;gt; action &amp;lt;repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;develop&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms.git&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If &#039;&#039;&#039;MyDir&#039;&#039;&#039; is omitted the code will be downloaded to a directory named &#039;&#039;&#039;roms&#039;&#039;&#039;. You only clone once because Git will keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [https://git-scm.com/book/en/v2 Pro Git] book.&lt;br /&gt;
&lt;br /&gt;
The idealized and realistic ROMS Test Cases and the Matlab processing software can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_test.git &amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_matlab.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We highly recommend that Users clone all the ROMS repositories from the same root directory in their computer and define the &#039;&#039;&#039;ROMS_ROOT_DIR&#039;&#039;&#039; variable in their computer shell login environment, specifying where the User cloned/downloaded the ROMS source code, Test Cases, and Matlab processing software. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git&lt;br /&gt;
&lt;br /&gt;
For bash shells:&lt;br /&gt;
    export ROMS_ROOT_DIR=MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
For csh/tcsh shells:&lt;br /&gt;
    setenv ROMS_ROOT_DIR  MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
The build scripts will use this environmental variable when compiling any of the ROMS Test Cases without the need to customize the location of the ROMS source code. Also, it is used for loading the path of Matlab scripts in the startup.m configuration file.&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
==Managing Your Own Modifications==&lt;br /&gt;
This assumes that you have a fresh clone of the myroms repository on the &#039;&#039;&#039;develop&#039;&#039;&#039; branch. You want to keep &#039;&#039;&#039;develop&#039;&#039;&#039; as a pure copy of the source version and keep your own changes in say the &#039;&#039;&#039;arctic&#039;&#039;&#039; branch. Start by creating a branch and switching to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git branch arctic&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can make whatever modifications you like (and test them out). To see what changed, you can use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git diff&amp;lt;/span&amp;gt;. To save your changes, do a:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git commit -a&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though if you add new files you will have to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git add&amp;lt;/span&amp;gt; them first.&lt;br /&gt;
&lt;br /&gt;
===Getting the Updates===&lt;br /&gt;
It is easy to fetch and merge the updates. Start by making sure your directory has been cleanly checked in with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt;.  Then you can update your &#039;&#039;&#039;develop&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout develop&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bring the changes into your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git merge develop&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will bring in everything that changed since your last &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;, so you might find it easier to keep on top of things by doing this often, not putting it off for years. You can also bring in changes one at a time with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git cherry-pick&amp;lt;/span&amp;gt;. Again, check the Pro Git book for much more information about all of these operations.&lt;br /&gt;
&lt;br /&gt;
Note that this will save your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch locally, under the .git directory. You can back this up as you would any other important files you have.&lt;br /&gt;
&lt;br /&gt;
==Useful Git Commands==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Command&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git add&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Add a file to the repository staging area &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch&#039;&#039;&#039;&lt;br /&gt;
| List all local branches (the asterisk denotes the current branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -a&#039;&#039;&#039;&lt;br /&gt;
| List all local and remote branches&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -d&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -D&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch forcefully&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -m&#039;&#039;&#039; &amp;lt;_OldName_&amp;gt; &amp;lt;_NewName_&amp;gt;&lt;br /&gt;
| Rename a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout -b&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Create a new local branch and switch to it&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Switch to an existing local or remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git clone&#039;&#039;&#039; &amp;lt;_RepositoryURL_&amp;gt;&lt;br /&gt;
| Clone a public repository&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot; &#039;&#039;&#039;-m&#039;&#039;&#039; &amp;quot;&amp;lt;_MessageURL_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files with two message lines&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit --amend -m&#039;&#039;&#039; &amp;quot;&amp;lt;_NewMessage_&amp;gt;&amp;quot;&lt;br /&gt;
| Amend previous commit message&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039;&lt;br /&gt;
| Show all changes between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Show changes for a specific file between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git difftool -d&#039;&#039;&#039; &amp;lt;_BranchName1_&amp;gt; &amp;lt;_BranchName2_&amp;gt;&lt;br /&gt;
| Compare the difference between two branches with &#039;&#039;&#039;`KDIFF3`&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git fetch&#039;&#039;&#039;&lt;br /&gt;
| Retrieve new work done by other people&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log&#039;&#039;&#039;&lt;br /&gt;
| View repository changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --oneline&#039;&#039;&#039;&lt;br /&gt;
| Show the list of commits in one-line format&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --summary&#039;&#039;&#039;&lt;br /&gt;
| View repository detailed changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git merge --no-ff --no-commit&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Merge a branch into the active branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git pull&#039;&#039;&#039;&lt;br /&gt;
| Update local repository or branch to the newest origin commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push origin --delete&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push -u origin&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Push changes to the remote repository (and remember the branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git reset --hard HEAD~1&#039;&#039;&#039;&lt;br /&gt;
| Undo last commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git revert&#039;&#039;&#039; &amp;lt;_CommitID_&amp;gt;&lt;br /&gt;
| Revert commit changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git status&#039;&#039;&#039;&lt;br /&gt;
| Check/display changes to the repository or particular branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git tag&#039;&#039;&#039;&lt;br /&gt;
| List all tags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complicated Commands==&lt;br /&gt;
&lt;br /&gt;
If a branch is renamed in a repository on GitHub, the local clone on a computer needs to updated:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git branch -m OldName NewName&amp;lt;br /&amp;gt;git fetch origin&amp;lt;br /&amp;gt;git branch -u origin/NewName NewName&amp;lt;br /&amp;gt;git remote set-head origin -a&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to merge changes in the &#039;&#039;&#039;feature/name1&#039;&#039;&#039; branch into the &#039;&#039;&#039;feature/name2&#039;&#039;&#039; branch:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git checkout feature/name1&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;git checkout feature/name2&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;git merge --no-ff --no-commit feature/name1&amp;lt;br /&amp;gt;git commit -am &amp;quot;Merging feature/name1 into feature/name2&amp;quot; -m &amp;quot;MessageURL&amp;quot;&amp;lt;br /&amp;gt;git difftool -d feature/name1 feature/name2&amp;lt;br /&amp;gt;git push -u origin feature/name2&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6614</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6614"/>
		<updated>2024-01-24T17:33:25Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS-JEDI_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6613</id>
		<title>Amarel</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6613"/>
		<updated>2024-01-23T14:58:44Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Using Amarel&amp;lt;/div&amp;gt;&lt;br /&gt;
==Getting Started==&lt;br /&gt;
This wiki page is a brief &amp;quot;Getting Started&amp;quot; introduction to running the ROMS ocean model and analyzing model output on the Rutgers University Office of Advanced Research Computing (OARC) cluster computer &#039;&#039;Amarel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Amarel help ===&lt;br /&gt;
There is an OARC supported user guide at https://sites.google.com/view/cluster-user-guide to which you can refer for a lot of detailed guidance.&lt;br /&gt;
&lt;br /&gt;
===Working with UNIX===&lt;br /&gt;
To work effectively on &#039;&#039;Amarel&#039;&#039; you need at least a beginner level of competency with the UNIX operating system. &lt;br /&gt;
If you are a total newcomer to UNIX computers you might find it useful to work through a structured tutorial; for example [https://ryanstutorials.net/linuxtutorial/ Ryan&#039;s Linux Tutorial].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Basic UNIX commands&lt;br /&gt;
|-&lt;br /&gt;
! Command !! What it does !! Example&lt;br /&gt;
|-&lt;br /&gt;
| ls || list contents of a directory &amp;lt;/br&amp;gt; files ending in .nc &amp;lt;/br&amp;gt; long format list and hidden files || ls &amp;lt;/br&amp;gt; ls *.nc &amp;lt;/br&amp;gt; ls -al  &lt;br /&gt;
|-&lt;br /&gt;
| cd || change directory || cd /projects/dmcs_1/courses/cod&lt;br /&gt;
|-&lt;br /&gt;
| pwd || print working directory to see where you are || pwd&lt;br /&gt;
|-&lt;br /&gt;
| cp || copy a file || cp source_file target_file&lt;br /&gt;
|-&lt;br /&gt;
| mv || rename a file &amp;lt;/br&amp;gt; move file to new directory || mv file_name new_name &amp;lt;/br&amp;gt; mv file_name dir1/dir2/new_name&lt;br /&gt;
|-&lt;br /&gt;
| rm || delete (remove) a file || rm filename&lt;br /&gt;
|-&lt;br /&gt;
| more || type contents of a file to screen one page at a time || more .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| less || like &#039;&#039;more&#039;&#039; only with more features (unix geeks are so funny) &amp;lt;/br&amp;gt;Read the man page for help || less .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| man || get the manual page (help) for a command || man less&lt;br /&gt;
|-&lt;br /&gt;
| . || the directory you are in || cp /projects/dmcs_1/courses/job.sh &#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| .. || the directory above the one you are in || cd &#039;&#039;&#039;..&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| grep || find a string in a file &amp;lt;/br&amp;gt; &#039;&#039;get regular expression and print (!)&#039;&#039; || grep COD_1DMIX *.h&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your default UNIX &#039;&#039;shell&#039;&#039; (the &amp;quot;flavor&amp;quot; of your UNIX environment) is &#039;&#039;&#039;bash&#039;&#039;&#039;, so for more advanced help it is often good to include &amp;quot;bash&amp;quot; as one of your search terms in a google search for help.&lt;br /&gt;
&lt;br /&gt;
===Editing files===&lt;br /&gt;
One of the things that stumps newcomers to UNIX is making simple edits to files. Ryan&#039;s Linux Tutorial goes over the basics of the &#039;&#039;&#039;vi&#039;&#039;&#039; editor [https://ryanstutorials.net/linuxtutorial/vi.php here], but it can be a beast to get comfortable with. &lt;br /&gt;
&lt;br /&gt;
A more intuitive editor for new users is &#039;&#039;&#039;nano&#039;&#039;&#039;, the basics of which you can read about [https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ here].&lt;br /&gt;
&lt;br /&gt;
There is also a way to edit files in the web browser based &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service that is described later in this guide.&lt;br /&gt;
&lt;br /&gt;
==Rutgers VPN==&lt;br /&gt;
If you are not on campus, you will need to connect to the Rutgers VPN. To use Rutgers VPN, you must first enroll in Duo 2 Factor Authentication (2FA) (NetID+). Most users have probably already done this. If not, navigate to https://netid.rutgers.edu/setupTwoFactorAuthentication.htm and follow the instructions.&lt;br /&gt;
&lt;br /&gt;
Once you are enrolled in NetID+ you will need to activate the VPN service, if you have not already. Navigate to https://soc.rutgers.edu/vpn/ and click the gray button titled &#039;&#039;&#039;Service Activation&#039;&#039;&#039;. If you are not already logged in you may be asked to login and/or approve your login with the Duo Mobile app. To activate the VPN service, click the checkbox next to &#039;&#039;&#039;Remote Access VPN, Cisco AnyConnect Access for Rutgers&#039;&#039;&#039; and click the &#039;&#039;&#039;Activate Services&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
You are now ready to download the Cisco VPN client and connect to the Rutgers VPN. Complete instructions can be found [https://soc.rutgers.edu/vpn/ here] by clicking the red button titled &#039;&#039;&#039;General VPN Instructions&#039;&#039;&#039; to download the PDF. The instructions are geared towards Windows so if you are using a Mac you might find [https://soc.rutgers.edu/vpn/apple/ this page] more helpful. In most cases, regardless of your operating system, pointing your browser to https://vpn.rutgers.edu/ and logging in with your NetID will lead you to downloading the correct VPN client.&lt;br /&gt;
&lt;br /&gt;
Once installed, open the &#039;&#039;&#039;Cisco AnyConnect&#039;&#039;&#039; client and type &#039;&#039;&#039;vpn.rutgers.edu&#039;&#039;&#039; in the box and click &#039;&#039;&#039;Connect&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Connect.png]]&lt;br /&gt;
&lt;br /&gt;
In the next window, shown below, &#039;&#039;&#039;Username&#039;&#039;&#039; will be your NetID.&lt;br /&gt;
&lt;br /&gt;
In the second line &#039;&#039;&#039;Password&#039;&#039;&#039; is the password for your NetID. &lt;br /&gt;
&lt;br /&gt;
The third line is the &#039;&#039;&#039;Duo Action&#039;&#039;&#039; to complete the 2FA, which can be accomplished in one of 4 possible ways:&lt;br /&gt;
&lt;br /&gt;
# Enter a 6 digit Duo Passcode. These are generated either by a Hard Token, by showing the passcode in the Duo Mobile App, or from a previous “SMS” request. Simply type in the 6 numbers and hit OK.&lt;br /&gt;
# Type the word “push”. This will send a push notification to the primary device you have enrolled with Duo through NetID+ with the option to Accept or Deny.&lt;br /&gt;
# Type the word “phone”. You will receive a phone call to the primary device you have enrolled with Duo through NetID+ with touch tone options to Accept or Deny.&lt;br /&gt;
# Type the word “sms”. You will receive a text message to the primary device you have enrolled with Duo through NetID+ containing passcodes you can use to login.&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Credentials.png]]&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;OK&#039;&#039;&#039; and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows [[Image:AnyConnect_win_connected.jpg]]) or in the menu bar (Mac OS [[Image:AnyConnect_mac_connected.png|25px]]).&lt;br /&gt;
&lt;br /&gt;
==Connecting to Amarel with SSH==&lt;br /&gt;
In order to connect to &#039;&#039;Amarel&#039;&#039; and compile and run ROMS you will need an SSH/terminal client. If you already use an SSH/terminal application you are comfortable with then stick with that and adapt the instructions below accordingly. For these instructions to work you need to either be on campus or connected to the Rutgers VPN.&lt;br /&gt;
&lt;br /&gt;
===Mac OS===&lt;br /&gt;
If you are on a Mac, open the &#039;&#039;&#039;Terminal&#039;&#039;&#039; app (found in the Applications -&amp;gt; Utilities folder) or &#039;&#039;&#039;iTerm&#039;&#039;&#039; app and type:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ssh fakeuser@amarel.rutgers.edu&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;fakeuser&amp;lt;/span&amp;gt; with your NetID. When it asks if you want to continue connecting enter &#039;&#039;&#039;yes&#039;&#039;&#039;, then enter your NetID password. &lt;br /&gt;
&lt;br /&gt;
Having to type the above command and netid password every time you login is moderately tedious, but this username/password authentication can become annoying and time consuming when repeatedly using the &#039;&#039;&#039;scp&#039;&#039;&#039; command to copy files to &#039;&#039;Amarel&#039;&#039;. Passwordless access and file transfer can be enabled using &#039;&#039;&#039;SSH keys&#039;&#039;&#039; by following the instructions below, or for more detail see the [https://sites.google.com/view/cluster-user-guide#h.jgwrkm9e9rwg OARC User Guide on this topic].&lt;br /&gt;
&lt;br /&gt;
# If you are still connected to &#039;&#039;Amarel&#039;&#039;, disconnect by entering &#039;&#039;&#039;exit&#039;&#039;&#039;&lt;br /&gt;
# At the prompt for your local machine, enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;nano ~/.ssh/config&amp;lt;/span&amp;gt;&#039;&#039;&#039; and paste the block below at the end of the file:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;Host amarel&amp;lt;br /&amp;gt;Hostname amarel.rutgers.edu&amp;lt;br /&amp;gt;HostKeyAlias amarel&amp;lt;br /&amp;gt;User NetID&amp;lt;/div&amp;gt; replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;NetID&amp;lt;/span&amp;gt; with your own NetID. Save and exit (Ctrl+o Ctrl+x). This allows you to type &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; to connect.&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ls ~/.ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If there is a file listed called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;id_rsa.pub&amp;lt;/span&amp;gt; skip to 5&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh-keygen -t rsa&amp;lt;/span&amp;gt;&#039;&#039;&#039;, then hit return to accept the default location, enter a passphase twice (or leave blank for no passphrase)&lt;br /&gt;
# Copy the public portion of the key to &#039;&#039;Amarel&#039;&#039; by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scp ~/.ssh/id_rsa.pub amarel:.&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# SSH to &#039;&#039;Amarel&#039;&#039; (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039;) and check if you already have a .ssh folder:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[rjdave@amarel1 ~]$ ls -l .ssh&amp;lt;br /&amp;gt;total 33&amp;lt;br /&amp;gt;-rw-------  1 rjdave rjdave  1069 Sep  8  2017 authorized_keys&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave   434 Jun  4  2021 config&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave  5992 Dec  2 13:47 known_hosts&amp;lt;/div&amp;gt; You probably won&#039;t have all the files above but if you instead get the message &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls: cannot access .ssh: No such file or directory&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;then enter the following command:&amp;lt;/br&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;mkdir .ssh &amp;amp;&amp;amp; chmod 700 .ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. &amp;lt;/br&amp;gt;These two commands (combined on one line) will create the .ssh folder and set the required permissions. Setting private user-only permissions (&#039;&#039;&#039;chmod 700 ...&#039;&#039;&#039;) is important, because the system will not allow you to have your keys viewable by others users. &lt;br /&gt;
# Once you have a .ssh folder with the proper permissions, enter the following commands&amp;lt;/br&amp;gt; &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;cat ~/id_rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 640 ~/.ssh/authorized_keys&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/br&amp;gt;then exit back to your local machine and execute &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; again. It should no longer ask for your password.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
For Windows, we recommend [https://mobaxterm.mobatek.net/download-home-edition.html MobaXterm] installer edition. &lt;br /&gt;
# Once installed open it, choose light or dark theme and click the &#039;&#039;&#039;Session&#039;&#039;&#039; button in the upper left.&lt;br /&gt;
# Choose &#039;&#039;&#039;SSH&#039;&#039;&#039; and enter &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; for &#039;&#039;&#039;Remote host&#039;&#039;&#039;, check the &#039;&#039;&#039;Specify username&#039;&#039;&#039; box and enter your NetID in the box and click &#039;&#039;&#039;OK&#039;&#039;&#039;.&lt;br /&gt;
# You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.&lt;br /&gt;
# In the future you can click &#039;&#039;&#039;Sessions&#039;&#039;&#039; (not Session) and select &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; and not have to enter your password.&lt;br /&gt;
&lt;br /&gt;
==Setting up your .bashrc==&lt;br /&gt;
The default software setup by OARC on &#039;&#039;Amarel&#039;&#039; does not include everything needed to compile and run ROMS. Ocean Modeling Group computing specialist David Robertson has configured, and maintains and updates, a repository of what you need for ROMS and other models that will be automatically loaded for every login session once you add some lines to the login script (.bashrc, .cshrc, etc.) in your home directory. Log in to &#039;&#039;Amarel&#039;&#039; with &#039;&#039;&#039;Terminal&#039;&#039;&#039;, &#039;&#039;&#039;iTerm2&#039;&#039;&#039; or &#039;&#039;&#039;MobaXterm&#039;&#039;&#039; and edit your login script as described below.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise requested your default shell will be bash and the following lines shown below in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt; should be added (with nano or your preferred editor) near the top of your .bashrc after the import of the global definitions as shown:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# Source global definitions&amp;lt;br /&amp;gt;if [ -f /etc/bashrc ]; then&amp;lt;br /&amp;gt;	. /etc/bashrc&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit -s unlimited&amp;lt;br /&amp;gt;export MODULEPATH=/projects/dmcs_1/sw/modulefiles/Core:${MODULEPATH}&amp;lt;br /&amp;gt;export SQUEUE_FORMAT=&amp;quot;%.18i %.9P %.8j %.8u %.2t %.10M %.10l %.4C %.6D %R&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;# Automatically load the roms module&amp;lt;br /&amp;gt;module load roms&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The line with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit&amp;lt;/span&amp;gt; allows you to take full advantage of computing resources (may be obsolete now but it won&#039;t hurt anything). &lt;br /&gt;
&lt;br /&gt;
The first &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line will tell &#039;&#039;&#039;Lmod&#039;&#039;&#039; where to find the modules that will load the custom software. &lt;br /&gt;
&lt;br /&gt;
The second &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line makes the &#039;&#039;&#039;squeue&#039;&#039;&#039; command (explained later) more useful. &lt;br /&gt;
&lt;br /&gt;
The lines in &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt; are optional and will load the &#039;&#039;&#039;roms&#039;&#039;&#039; module automatically every time you login to &#039;&#039;Amarel&#039;&#039;. They must be &#039;&#039;&#039;after&#039;&#039;&#039; the line that sets the &#039;&#039;&#039;MODULEPATH&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once you have added these lines, log out and back in for them to take effect.&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... then you may need to logout and login again so that .bashrc sets MODULEPATH as instructed above. If the error persists, you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Accessing the ROMS Source Code==&lt;br /&gt;
&lt;br /&gt;
===Register as a ROMS user===&lt;br /&gt;
If you are not already a ROMS user, you will need to fill out the registration form found [https://www.myroms.org/register here] and wait for approval. Once approved, you will be able to checkout the ROMS source code. It is highly recommended that you use the GitHub myroms repository to obtain the ROMS source code. The &#039;&#039;Subversion (SVN)&#039;&#039; repository is being phased out and will no longer be available after &#039;&#039;&#039;December 31, 2024&#039;&#039;&#039;. If you manage your own software projects using GitHub, the concepts for software version control may already be familiar to you.  Detailed directions can be found on the WikiROMS [[Git#Downloading_ROMS|Git]] page.&lt;br /&gt;
&lt;br /&gt;
===Obtaining the ROMS source code===&lt;br /&gt;
There is nothing special about obtaining the ROMS source code on &#039;&#039;Amarel&#039;&#039;. The git commands are the same as on any UNIX host. &lt;br /&gt;
Navigate to the directory where you want your ROMS source code to reside and execute this git clone command:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/myroms/roms.git &amp;lt;my_src_dir&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;my_src_dir&amp;gt; with what you want the source code directory to be called. You can also omit &amp;lt;my_src_dir&amp;gt; and git will automatically name the folder &#039;&#039;&#039;roms&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It can take a couple of minutes to download all of ROMS, but you only do this once. &lt;br /&gt;
&lt;br /&gt;
Many users simply run this command from their home directory and use &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;&#039;&#039;&#039;myroms&#039;&#039;&#039;&amp;lt;/span&amp;gt; for &amp;lt;my_src_dir&amp;gt;, but the choice is yours depending on how you want to manage your &#039;&#039;Amarel&#039;&#039; space and how many ROMS projects you think you might end up working on.&lt;br /&gt;
&lt;br /&gt;
==Loading and Unloading Modules==&lt;br /&gt;
Like many clusters, &#039;&#039;Amarel&#039;&#039; uses environment modules to load and unload software and configure the environment. Some commands you will find useful are:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&#039;&#039;&#039;module help&#039;&#039;&#039;               Display help message&amp;lt;br /&amp;gt;&#039;&#039;&#039;module help &amp;lt;m1&#039;&#039;&#039;&amp;gt;          Show help information for module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module available&#039;&#039;&#039;	  Show all modules currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module whatis &amp;lt;m1&amp;gt;&#039;&#039;&#039;        Show brief information about module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module spider&#039;&#039;&#039;             List all possible modules even if not currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module list&#039;&#039;&#039;               List currently loaded modules&amp;lt;br /&amp;gt;&#039;&#039;&#039;module load&#039;&#039;&#039;               Load the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module unload&#039;&#039;&#039;             Unload the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module swap &amp;lt;m1&amp;gt; &amp;lt;m2&amp;gt;&#039;&#039;&#039;     Unload &amp;lt;m1&amp;gt; and then load &amp;lt;m2&amp;gt; (for switching versions of the same software)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module purge&#039;&#039;&#039;              Unload all loaded modules&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Loading the ROMS Module===&lt;br /&gt;
If you &#039;&#039;&#039;did not&#039;&#039;&#039; add the optional lines from the [[#Setting_up_your_.bashrc|Setting up your .bashrc]] section, you can easily set up your environment to compile and run ROMS by manually loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module.&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;module load roms&amp;lt;br /&amp;gt;module list&amp;lt;br /&amp;gt;Currently Loaded Modules:&amp;lt;br /&amp;gt;  1) intel/17.0.4     2) mvapich2/2.2      3) mct-roms/2.6.0   4) netcdf/4.6.2&amp;lt;br /&amp;gt;  5) esmf/8.0.0_nc4   6) parpack-roms/2.1  7) hdf5/1.10.4      8) roms/intel_nc4&amp;lt;/div&amp;gt;&lt;br /&gt;
Notice that loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module will actually load 7 other modules. &lt;br /&gt;
&lt;br /&gt;
This will setup your environment to use the Intel compiler so remember to set &#039;&#039;&#039;FORT&#039;&#039;&#039; to &#039;&#039;&#039;ifort&#039;&#039;&#039; in your build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Your project/coursework working directory space==&lt;br /&gt;
&lt;br /&gt;
We recommend you create a subdirectory of your home directory in which to work, so you can keep each ROMS project separate and organized.  &lt;br /&gt;
&lt;br /&gt;
You might call this &#039;&#039;&#039;working directory&#039;&#039;&#039; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;CoastalDynamics&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, or simply &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;cod&amp;lt;/span&amp;gt; (for coastal ocean dynamics). You will be typing this a lot, so keep it simple.&lt;br /&gt;
&lt;br /&gt;
To make a new directory called &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, enter this command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;mkdir Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to this working directory with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In instructions that follow, when we refer to your &#039;&#039;&#039;working directory&#039;&#039;&#039; we mean this workspace.&lt;br /&gt;
&lt;br /&gt;
==Configuring and Compiling ROMS==&lt;br /&gt;
You will compile and run ROMS in your project/coursework &#039;&#039;&#039;working directory&#039;&#039;&#039;, so change to that directory first.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running the build script &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; is the recommended method for compiling ROMS on &#039;&#039;Amarel&#039;&#039;. For any given project you will likely only need to change &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; to reset &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;ROMS_APPLICATION&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; and make sure &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;FORT&amp;lt;/span&amp;gt; is set to &#039;&#039;&#039;ifort&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{warning}} &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;It is important to make sure &#039;&#039;&#039;USE_MY_LIBS&#039;&#039;&#039; is set to &#039;&#039;no&#039;&#039; or your compilation will fail.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A template &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; script is in subdirectory &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; of &#039;&#039;&#039;&amp;lt;my_src_dir&amp;gt;&#039;&#039;&#039; that you created when you downloaded the code. For example, if you created &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; in your home directory the copy command would be&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Bin/build_roms.sh . &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now open &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; with an editor (&#039;&#039;e.g.&#039;&#039; &#039;&#039;&#039;nano&#039;&#039;&#039;) and modify the line &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; to point to your choice for &amp;lt;my_src_dir&amp;gt;. So, you will have something like ...&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export MY_ROMS_SRC=&amp;lt;/span&amp;gt;{$HOME}/&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if the name you chose for &amp;lt;my_src_dir&amp;gt; was &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If this is your first time working with ROMS, a good starting place is to compile the default UPWELLING test case that is indicated in build_roms.sh with the default setting &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export ROMS_APPLICATION&amp;lt;/span&amp;gt;=UPWELLING.  &lt;br /&gt;
&lt;br /&gt;
To compile the UPWELLING example, you need to copy the configuration file &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;upwelling.h&amp;lt;/span&amp;gt; to your working directory. This is in subdirectory &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; of your source code. For example, the command might be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Include/upwelling.h .&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once your build script is configured and you have upwelling.h in your working directory you can compile ROMS by typing:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;./build_roms.sh -j 4&amp;lt;/div&amp;gt;&lt;br /&gt;
where the number after -j indicates the number of compute cores to use in parallel to execute the compilation. The greater the number, the faster it goes.&lt;br /&gt;
&lt;br /&gt;
However, the login node you will be compiling on is shared for the entire &#039;&#039;Amarel&#039;&#039; system. If you use a number larger than &#039;&#039;&#039;4&#039;&#039;&#039;, or omit it altogether (which says use &#039;&#039;all&#039;&#039; cores on the login node) your build might be terminated by an administrator. Be a considerate user and keep the number low.&lt;br /&gt;
&lt;br /&gt;
If compilation is processing successfully you will see a lot of information typed to your screen as each component of the source code is compiled. It will take a minute or so to complete.&lt;br /&gt;
&lt;br /&gt;
If compilation ends quickly with errors like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ ./build_roms.sh -j 4 &amp;lt;/br&amp;gt;rm -f -r core *.ipo /home/jwilkin/cod/Projects/Build_roms...&amp;lt;/br&amp;gt;which: &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;no mpif90&amp;lt;/span&amp;gt; in (/usr/lpp/mmfs/bin:/usr/local/bin:/us...&amp;lt;/br&amp;gt;cp -f /opt/intelsoft/serial/netcdf3/include/netcdf.mod /h...&amp;lt;/br&amp;gt;cp: cannot stat ‘/opt/intelsofo... No such file or directory&amp;lt;/br&amp;gt;make: *** No rule to make target netcdf.mod needed by ... Stop. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... this means you have not run the &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;module load roms&amp;lt;/span&amp;gt; command. Go back to the notes on [[Amarel#Loading_the_ROMS_Module]].&lt;br /&gt;
&lt;br /&gt;
If compilation was successful, there will be a file named &#039;&#039;&#039;romsM&#039;&#039;&#039; that is the model executable. You can check for the file with this command:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;build_roms.sh romsM&amp;lt;/span&amp;gt; upwelling.h &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; is a folder that build_roms.sh created to hold all the temporary files that the FORTRAN compilation process makes to combine into the romsM executable file.&lt;br /&gt;
&lt;br /&gt;
==Running on the Amarel Compute Nodes==&lt;br /&gt;
When you &#039;&#039;&#039;ssh&#039;&#039;&#039; to &#039;&#039;Amarel&#039;&#039; you are connected to one of the login nodes. These nodes are to be used for file editing, transfering output and input files to/from your local computer, and modest code compiling tasks and analysis, but not for compute intensive tasks. Here we explain how to connect to the compute nodes for these larger tasks.&lt;br /&gt;
&lt;br /&gt;
Note: Consult the Amarel status page (https://oarc.rutgers.edu/amarel-system-status/) before scheduling a job. Amarel is down for maintenance monthly. &lt;br /&gt;
&lt;br /&gt;
===What &#039;&#039;partitions&#039;&#039; can you run on?===&lt;br /&gt;
&lt;br /&gt;
Access to Amarel resources is controlled by &#039;&#039;partitions&#039;&#039;. You can find out the partitions you have permission to access with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;sinfo -s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show the partitions that everyone has access to. See the cluster guide [https://sites.google.com/view/cluster-user-guide#h.oeejy9yf80e4 entry on partitions] for an explanation of these. &lt;br /&gt;
&lt;br /&gt;
If you belong to a research group that own a partition you should also see that listed, for example &#039;&#039;&#039;p_omg_1&#039;&#039;&#039; for the Ocean Modeling Group. This is the partition you want to use most of the time as your job will not get pre-empted by other owner users.&lt;br /&gt;
&lt;br /&gt;
===Using the SLURM batch job scheduler===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Amarel&#039;&#039; uses SLURM workload manager to schedule compute intensive tasks. The user configures a SLURM job script for each model run and submits this script with the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command. The job script declares the resources required, such as number of CPUs for parallel jobs, maximum memory required, etc.&lt;br /&gt;
&lt;br /&gt;
We have configured a simple template job script (for the ROMS UPWELLING example) that you can copy from &#039;&#039;&#039;/projects/dmcs_1/courses/job.sh&#039;&#039;&#039; into your working directory. &lt;br /&gt;
&lt;br /&gt;
The UNIX command to copy a file is &#039;&#039;&#039;cp source_file target_file&#039;&#039;&#039;. So, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp /projects/dmcs_1/courses/job.sh .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses a &#039;&#039;dot&#039;&#039; (&#039;&#039;&#039;.&#039;&#039;&#039;) for the target_file, which causes the source_file (job.sh) to be copied to the present working directory without changing its name.&lt;br /&gt;
&lt;br /&gt;
When typing this, or any, UNIX command, you can start typing just the beginning few characters of the path then press TAB to autocomplete the filename. If the completion is ambiguous, you can continue typing more characters and press TAB again. Pressing TAB twice in a row will show you the set of possible completions. This trick can save you a lot of tedious (mis)typing.&lt;br /&gt;
&lt;br /&gt;
The contents of &#039;&#039;&#039;job.sh&#039;&#039;&#039; are shown below:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#!/bin/bash&amp;lt;br &amp;gt;#SBATCH --partition=p_omg_1             # Partition. If you are not a member of OMG enter your own partition&amp;lt;br /&amp;gt;#SBATCH --job-name=upwelling            # Assign a short name to your job&amp;lt;br/&amp;gt;#SBATCH --nodes=1                       # Number of nodes you require&amp;lt;br /&amp;gt;#SBATCH --ntasks=4                      # Total number of tasks you&#039;ll launch&amp;lt;br /&amp;gt;#SBATCH --ntasks-per-node=4             # Number of tasks you&#039;ll launch on each node&amp;lt;br /&amp;gt;#SBATCH --cpus-per-task=1               # Cores per task (&amp;gt;1 if multithread tasks)&amp;lt;br /&amp;gt;#SBATCH --mem=6400                      # Real memory (RAM) required (MB) per node&amp;lt;br /&amp;gt;#SBATCH --time=00-00:05                 # Total run time limit (DD-HH:MM)&amp;lt;br /&amp;gt;#SBATCH --output=out.%N.%j              # STDOUT output file&amp;lt;br /&amp;gt;#SBATCH --error=err.%N.%j               # STDERR output file (optional but recommended)&amp;lt;br /&amp;gt;#SBATCH --export=ALL                    # Export you current env to the job env&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;## It is important to have --mpi=pmi2 here or ROMS will not run&amp;lt;br /&amp;gt;srun --mpi=pmi2 ./romsM roms_upwelling.in&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The maximum run time is 14-00:00 (14 days). It is tempting to set this to the maximum in order to avoid a job ending too early. (&#039;&#039;i.e.&#039;&#039; Slurm stopping a ROMS run before it is finished) However, if there is maintenance scheduled during that time period the job will not start until maintenance is complete. So a runtime as close as possible to the actual run time is recommended.&lt;br /&gt;
&lt;br /&gt;
====Requesting a specific class of compute node====&lt;br /&gt;
&lt;br /&gt;
For large jobs it makes sense to use all available cores on a node, and for low priority jobs to use older less fast nodes. You can do this by requesting a specific node number, but it is better to request a particular class of nodes so you don&#039;t unwittingly pick a node already in use. The classes available from oldest to newest nodes are:&lt;br /&gt;
&lt;br /&gt;
# skylake (32 cores) (Phase I nodes) (nodes hal0116 through hal0120)&lt;br /&gt;
# cascadelake (40 cores) (Phase II nodes) (nodes hal0159 through hal0163)&lt;br /&gt;
# icelake (64 cores) (Phase V.B nodes) (nodes hal0299 through hal0302)&lt;br /&gt;
&lt;br /&gt;
Make the node class request in the SLURM script and choose the maximum number of cores to match, &#039;&#039;e.g.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#SBATCH --constraint=cascadelake               # Run on Phase II nodes (40 cores) &amp;lt;br&amp;gt;#SBATCH --ntasks=40                            # Total number of tasks to launch (like -np to mpirun) &amp;lt;br&amp;gt;#SBATCH --ntasks-per-node=40                   # Number of tasks to launch on each node&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specifically request a class of nodes the SLURM scheduler will make its own choice on the most appropriate resources to use given your request. We don&#039;t know the basis of that choice. &lt;br /&gt;
&lt;br /&gt;
If you request a class of node that is fully assigned to other users in your partition, your job will wait for the others users jobs to complete. So, coordinate with your colleagues if resource use is at a premium. You can use the &#039;&#039;&#039;squeue -p partition_name&#039;&#039;&#039; command to see what resources are being used by other users, &#039;&#039;e.g.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ squeue -p p_omg_1 &amp;lt;br&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON) &amp;lt;br&amp;gt;   26975473    p_omg_1                  fwd   levinj  R     17:15:42  14-00:00:00   80      2 hal[0159,0162]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the ROMS Upwelling Example===&lt;br /&gt;
You may have noticed that the srun command above includes a file named &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt;. You will need to copy this file and &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;varinfo.dat&amp;lt;/span&amp;gt; from the ROMS/External directory of your &amp;lt;my_src_dir&amp;gt; ROMS source code to the directory where you compiled ROMS. &lt;br /&gt;
&lt;br /&gt;
If, for example, you chose &#039;&#039;&#039;myroms&#039;&#039;&#039; as the name of your &amp;lt;my_src_dir&amp;gt; when you downloaded the code, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/External/roms_upwelling.in .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses &#039;&#039;tilde&#039;&#039; (~) as shorthand for your home directory,&lt;br /&gt;
&lt;br /&gt;
After you copy the files, you will need to make a couple of small edits (using &#039;&#039;e.g.&#039;&#039; &#039;&#039;&#039;nano&#039;&#039;&#039;) to &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; to get this to work. &lt;br /&gt;
&lt;br /&gt;
# Change the line with VARNAME to read &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;VARNAME = varinfo.dat&amp;lt;/span&amp;gt; (&#039;&#039;i.e.&#039;&#039; delete the ROMS/External part)&lt;br /&gt;
# Set &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileI == 2&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileJ == 2&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The product of NtileI and NtileJ, &#039;&#039;i.e.&#039;&#039; 2 x 2 = 4, is the number of cores the model will run on in parallel. This number must match the number in the SLURM job script options &#039;&#039;&#039;--ntasks&#039;&#039;&#039; and, in this case, &#039;&#039;&#039;--ntasks-per-node&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Now you can submit your job to &#039;&#039;&#039;sbatch&#039;&#039;&#039; with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;sbatch job.sh&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ROMS configurations for &#039;&#039;Coastal Ocean Dynamics&#039;&#039; class===&lt;br /&gt;
The files that will configure the examples we will study in class will be located in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/courses/cod&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You will find instructions for configuring and running the examples at a separate Wiki page [[COD_Class_Examples]]&lt;br /&gt;
&lt;br /&gt;
===Checking Job Status with squeue===&lt;br /&gt;
Detailed documentation for monitoring your SLURM jobs can be found [https://sites.google.com/view/cluster-user-guide#h.4bsndqufii8p here]. The easiest way to check whether your job is running is with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;squeue -p p_omg_1&amp;lt;/span&amp;gt;&#039;&#039;&#039; (or your own partition name if it is not p_omg_1). &lt;br /&gt;
&lt;br /&gt;
You should see output something like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON)&amp;lt;br /&amp;gt;   17197219     dmcs_1            watl_psas   rjdave  R   3-04:07:00   3-20:00:00    4      1 hal0035&amp;lt;br /&amp;gt;   17146609     dmcs_1            upwelling   rjdave  R     00:01:10     00:05:00    4      1 hal0035&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the job is running (the ‘R’ under ‘ST’), has been running for 1 minute, 10 seconds, and is running on node 35.&lt;br /&gt;
&lt;br /&gt;
===Checking Progress with tail===&lt;br /&gt;
You can check ROMS progress by using the tail command on the &#039;&#039;&#039;output&#039;&#039;&#039; file. For the upwelling job above the file would be called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; so the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039; will show you the most recent 10 lines written to the output log and will most likely tell you what time-step the model is on. Using the -f option (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail -f out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;) will output appended data as the file grows. Ctrl-C will escape the display.&lt;br /&gt;
&lt;br /&gt;
===Did my UPWELLING job run?===&lt;br /&gt;
If the UPWELLING test case was successful there should be an output log file named something like &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; that shows no errors, and there should be 4 output NetCDF files ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *.nc &amp;lt;/br&amp;gt;roms_avg.nc &amp;lt;/br&amp;gt;roms_dia.nc &amp;lt;/br&amp;gt;roms_his.nc &amp;lt;/br&amp;gt;roms_rst.nc &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cancelling a Job===&lt;br /&gt;
To safest way cancel a queued or running job is to use its jobid. A job can be canceled by name but that is not recommended. To cancel the upwelling job in the example above you would issue the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scancel 17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If the job has not yet started, it will be removed from the queue. If it is running, all child processes will be killed and the job will be removed from the queue. You are only able cancel jobs that you own.&lt;br /&gt;
&lt;br /&gt;
===Running an interactive session on a compute node===&lt;br /&gt;
It is possible to conduct your work interactively on one of the compute nodes (instead of the login node). For most work we will be doing in class this is not necessary, but if for some reason you have a job that needs many processors or a large amount of memory, and you want to run it interactively - say, to simply check that everything is in order for it to start correctly - there are instructions in the Cluster User Guide [https://sites.google.com/view/cluster-user-guide#h.26x9sbburvsg here].&lt;br /&gt;
&lt;br /&gt;
For compute intensive interactive work, such as model analysis using Python or MATLAB, we recommend using the OnDemand interface to launch an interactive session on a set of compute nodes.&lt;br /&gt;
&lt;br /&gt;
==Using the OnDemand desktop environment==&lt;br /&gt;
The &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service allows you to connect to &#039;&#039;Amarel&#039;&#039; using a graphical desktop environment in a web browser. One of the most useful features of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that it allows you to analyze model output by Python or Matlab on the cluster compute nodes. &lt;br /&gt;
&lt;br /&gt;
You need to be running a Rutgers VPN to use OnDemand. &lt;br /&gt;
&lt;br /&gt;
Navigate your browser to https://ondemand.hpc.rutgers.edu/pun/sys/dashboard and login with your NetID and password. At the top of the page click &#039;&#039;&#039;Interactive Apps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Python Jupyter notebook:===&lt;br /&gt;
# Select &#039;&#039;&#039;Personal Jupyter&#039;&#039;&#039; from the list on the left&lt;br /&gt;
# Make your selections for &#039;&#039;&#039;number of hours&#039;&#039;&#039; your session can remain active (&#039;&#039;e.g.&#039;&#039; 3 hours), the &#039;&#039;&#039;number of cores&#039;&#039;&#039; to run on (1), and &#039;&#039;&#039;memory&#039;&#039;&#039; (8 GB is an OK choice)&lt;br /&gt;
# For &#039;&#039;Partition&#039;&#039; enter &#039;&#039;e.g.&#039;&#039; &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; if you are in OMG. Leave &#039;&#039;Reservation&#039;&#039; and &#039;&#039;Slurm feature&#039;&#039; blank. For &#039;&#039;conda path&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/miniconda3&amp;lt;/span&amp;gt; and for &#039;&#039;conda environment&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/xroms/py38&amp;lt;/span&amp;gt;. Click [[Media:Amarel Jupyter config.png | here]] to see what the completed launch page looks like.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# You should see sub-window of the web page like this &amp;lt;/br&amp;gt; [[Image:JupyterStarting.png|600px]] &amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;When the session is ready it changes to this: &amp;lt;/br&amp;gt; [[Image:JupyterRunning.png|600px]]&lt;br /&gt;
# Start your notebook by clicking the &#039;&#039;&#039;Connect to Jupyter, Anaconda version 5.1.0&#039;&#039;&#039; button: (If this does not appear, check that you correctly entered the &#039;&#039;&#039;conda path&#039;&#039;&#039; and &#039;&#039;&#039;conda environment&#039;&#039;&#039; at step 3 above.) &amp;lt;/br&amp;gt;[[Image:JupyterConnect.png|400px]]&lt;br /&gt;
# This should place you in a file browse window from which you can navigate to one of your existing Jupyter notebooks, or, to start a new Untitled notebook, select &#039;&#039;Python 3 (ipykernel)&#039;&#039; from the &#039;&#039;New&#039;&#039; pull-down menu on the right side of the page [[Image:NewPythonNotebook.png]]&lt;br /&gt;
# Once your notebook is running, you can import the xroms package as you would any other toolbox, by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;import xroms&amp;lt;/span&amp;gt;&#039;&#039;&#039; then hold down the shift key and hit the return/enter key. You will see an asterisk [&#039;&#039;&#039;*&#039;&#039;&#039;] in the square brackets.&lt;br /&gt;
# Once that asterisk changes to a &#039;&#039;&#039;1&#039;&#039;&#039;, the xroms python module has been loaded.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;conda&#039;&#039;&#039; environment built for DMCS_1 makes available many of the Python modules you are used to using.&lt;br /&gt;
&lt;br /&gt;
===Matlab:===&lt;br /&gt;
# Select MATLAB from the list on the left &lt;br /&gt;
# As for Step 2 above for Python, choose time, cores, and memory&lt;br /&gt;
# Select MATLAB version, and enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; (or your own group name) in partition.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# Once the &#039;&#039;&#039;Launch noVNC in New Tab&#039;&#039;&#039; button appears, click it and a MatLab GUI will open.&lt;br /&gt;
&lt;br /&gt;
You are running in a graphical desktop environment, so by default Matlab will look in Documents/MATLAB/startup.m for your personal Matlab configuration file. &lt;br /&gt;
&lt;br /&gt;
Popular MATLAB utilities for working with ROMS output are in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/matlab-tools&amp;lt;/span&amp;gt;. These include the myroms.org utilities in subdirectory &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_matlab&amp;lt;/span&amp;gt;, and John Wilkin&#039;s toolbox in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_wilkin&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Reconnecting to an interactive session===&lt;br /&gt;
A particularly nifty feature of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that your interactive session is independent of the browser window instance. &lt;br /&gt;
&lt;br /&gt;
Say you are working on your office computer using a Jupyter notebook via &#039;&#039;&#039;OnDemand&#039;&#039;&#039; but haven&#039;t finished all you want to do by the end of the day. If you leave that session running, you can go home and connect once again to &#039;&#039;&#039;OnDemand&#039;&#039;&#039; and you will see your session in the list of Interactive Sessions. Launch that session and you will be placed right back where you were. &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is simply a web interface to code running on &#039;&#039;Amarel&#039;&#039;, so you can connect from any browser. &lt;br /&gt;
&lt;br /&gt;
Of course, this only works if you selected a &#039;&#039;&#039;number of hours&#039;&#039;&#039; in Step 2 above that will allow your session to remain open. &lt;br /&gt;
&lt;br /&gt;
As long as the session is active the &#039;&#039;Amarel&#039;&#039; resources (cores and memory) are reserved for you and no one else. So, be respectful of other users and close out an interactive session once you are done.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6612</id>
		<title>Amarel</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6612"/>
		<updated>2024-01-22T15:38:51Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Using Amarel&amp;lt;/div&amp;gt;&lt;br /&gt;
==Getting Started==&lt;br /&gt;
This wiki page is a brief &amp;quot;Getting Started&amp;quot; introduction to running the ROMS ocean model and analyzing model output on the Rutgers University Office of Advanced Research Computing (OARC) cluster computer &#039;&#039;Amarel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Amarel help ===&lt;br /&gt;
There is an OARC supported user guide at https://sites.google.com/view/cluster-user-guide to which you can refer for a lot of detailed guidance.&lt;br /&gt;
&lt;br /&gt;
===Working with UNIX===&lt;br /&gt;
To work effectively on &#039;&#039;Amarel&#039;&#039; you need at least a beginner level of competency with the UNIX operating system. &lt;br /&gt;
If you are a total newcomer to UNIX computers you might find it useful to work through a structured tutorial; for example [https://ryanstutorials.net/linuxtutorial/ Ryan&#039;s Linux Tutorial].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Basic UNIX commands&lt;br /&gt;
|-&lt;br /&gt;
! Command !! What it does !! Example&lt;br /&gt;
|-&lt;br /&gt;
| ls || list contents of a directory &amp;lt;/br&amp;gt; files ending in .nc &amp;lt;/br&amp;gt; long format list and hidden files || ls &amp;lt;/br&amp;gt; ls *.nc &amp;lt;/br&amp;gt; ls -al  &lt;br /&gt;
|-&lt;br /&gt;
| cd || change directory || cd /projects/dmcs_1/courses/cod&lt;br /&gt;
|-&lt;br /&gt;
| pwd || print working directory to see where you are || pwd&lt;br /&gt;
|-&lt;br /&gt;
| cp || copy a file || cp source_file target_file&lt;br /&gt;
|-&lt;br /&gt;
| mv || rename a file &amp;lt;/br&amp;gt; move file to new directory || mv file_name new_name &amp;lt;/br&amp;gt; mv file_name dir1/dir2/new_name&lt;br /&gt;
|-&lt;br /&gt;
| rm || delete (remove) a file || rm filename&lt;br /&gt;
|-&lt;br /&gt;
| more || type contents of a file to screen one page at a time || more .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| less || like &#039;&#039;more&#039;&#039; only with more features (unix geeks are so funny) &amp;lt;/br&amp;gt;Read the man page for help || less .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| man || get the manual page (help) for a command || man less&lt;br /&gt;
|-&lt;br /&gt;
| . || the directory you are in || cp /projects/dmcs_1/courses/job.sh &#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| .. || the directory above the one you are in || cd &#039;&#039;&#039;..&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| grep || find a string in a file &amp;lt;/br&amp;gt; &#039;&#039;get regular expression and print (!)&#039;&#039; || grep COD_1DMIX *.h&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your default UNIX &#039;&#039;shell&#039;&#039; (the &amp;quot;flavor&amp;quot; of your UNIX environment) is &#039;&#039;&#039;bash&#039;&#039;&#039;, so for more advanced help it is often good to include &amp;quot;bash&amp;quot; as one of your search terms in a google search for help.&lt;br /&gt;
&lt;br /&gt;
===Editing files===&lt;br /&gt;
One of the things that stumps newcomers to UNIX is making simple edits to files. Ryan&#039;s Linux Tutorial goes over the basics of the &#039;&#039;&#039;vi&#039;&#039;&#039; editor [https://ryanstutorials.net/linuxtutorial/vi.php here], but it can be a beast to get comfortable with. &lt;br /&gt;
&lt;br /&gt;
A more intuitive editor for new users is &#039;&#039;&#039;nano&#039;&#039;&#039;, the basics of which you can read about [https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ here].&lt;br /&gt;
&lt;br /&gt;
There is also a way to edit files in the web browser based &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service that is described later in this guide.&lt;br /&gt;
&lt;br /&gt;
==Rutgers VPN==&lt;br /&gt;
If you are not on campus, you will need to connect to the Rutgers VPN. To use Rutgers VPN, you must first enroll in Duo 2 Factor Authentication (2FA) (NetID+). Most users have probably already done this. If not, navigate to https://netid.rutgers.edu/setupTwoFactorAuthentication.htm and follow the instructions.&lt;br /&gt;
&lt;br /&gt;
Once you are enrolled in NetID+ you will need to activate the VPN service, if you have not already. Navigate to https://soc.rutgers.edu/vpn/ and click the gray button titled &#039;&#039;&#039;Service Activation&#039;&#039;&#039;. If you are not already logged in you may be asked to login and/or approve your login with the Duo Mobile app. To activate the VPN service, click the checkbox next to &#039;&#039;&#039;Remote Access VPN, Cisco AnyConnect Access for Rutgers&#039;&#039;&#039; and click the &#039;&#039;&#039;Activate Services&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
You are now ready to download the Cisco VPN client and connect to the Rutgers VPN. Complete instructions can be found [https://soc.rutgers.edu/vpn/ here] by clicking the red button titled &#039;&#039;&#039;General VPN Instructions&#039;&#039;&#039; to download the PDF. The instructions are geared towards Windows so if you are using a Mac you might find [https://soc.rutgers.edu/vpn/apple/ this page] more helpful. In most cases, regardless of your operating system, pointing your browser to https://vpn.rutgers.edu/ and logging in with your NetID will lead you to downloading the correct VPN client.&lt;br /&gt;
&lt;br /&gt;
Once installed, open the &#039;&#039;&#039;Cisco AnyConnect&#039;&#039;&#039; client and type &#039;&#039;&#039;vpn.rutgers.edu&#039;&#039;&#039; in the box and click &#039;&#039;&#039;Connect&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Connect.png]]&lt;br /&gt;
&lt;br /&gt;
In the next window, shown below, &#039;&#039;&#039;Username&#039;&#039;&#039; will be your NetID.&lt;br /&gt;
&lt;br /&gt;
In the second line &#039;&#039;&#039;Password&#039;&#039;&#039; is the password for your NetID. &lt;br /&gt;
&lt;br /&gt;
The third line is the &#039;&#039;&#039;Duo Action&#039;&#039;&#039; to complete the 2FA, which can be accomplished in one of 4 possible ways:&lt;br /&gt;
&lt;br /&gt;
# Enter a 6 digit Duo Passcode. These are generated either by a Hard Token, by showing the passcode in the Duo Mobile App, or from a previous “SMS” request. Simply type in the 6 numbers and hit OK.&lt;br /&gt;
# Type the word “push”. This will send a push notification to the primary device you have enrolled with Duo through NetID+ with the option to Accept or Deny.&lt;br /&gt;
# Type the word “phone”. You will receive a phone call to the primary device you have enrolled with Duo through NetID+ with touch tone options to Accept or Deny.&lt;br /&gt;
# Type the word “sms”. You will receive a text message to the primary device you have enrolled with Duo through NetID+ containing passcodes you can use to login.&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Credentials.png]]&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;OK&#039;&#039;&#039; and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows [[Image:AnyConnect_win_connected.jpg]]) or in the menu bar (Mac OS [[Image:AnyConnect_mac_connected.png|25px]]).&lt;br /&gt;
&lt;br /&gt;
==Connecting to Amarel with SSH==&lt;br /&gt;
In order to connect to &#039;&#039;Amarel&#039;&#039; and compile and run ROMS you will need an SSH/terminal client. If you already use an SSH/terminal application you are comfortable with then stick with that and adapt the instructions below accordingly. For these instructions to work you need to either be on campus or connected to the Rutgers VPN.&lt;br /&gt;
&lt;br /&gt;
===Mac OS===&lt;br /&gt;
If you are on a Mac, open the &#039;&#039;&#039;Terminal&#039;&#039;&#039; app (found in the Applications -&amp;gt; Utilities folder) or &#039;&#039;&#039;iTerm&#039;&#039;&#039; app and type:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ssh fakeuser@amarel.rutgers.edu&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;fakeuser&amp;lt;/span&amp;gt; with your NetID. When it asks if you want to continue connecting enter &#039;&#039;&#039;yes&#039;&#039;&#039;, then enter your NetID password. &lt;br /&gt;
&lt;br /&gt;
Having to type the above command and netid password every time you login is moderately tedious, but this username/password authentication can become annoying and time consuming when repeatedly using the &#039;&#039;&#039;scp&#039;&#039;&#039; command to copy files to &#039;&#039;Amarel&#039;&#039;. Passwordless access and file transfer can be enabled using &#039;&#039;&#039;SSH keys&#039;&#039;&#039; by following the instructions below, or for more detail see the [https://sites.google.com/view/cluster-user-guide#h.jgwrkm9e9rwg OARC User Guide on this topic].&lt;br /&gt;
&lt;br /&gt;
# If you are still connected to &#039;&#039;Amarel&#039;&#039;, disconnect by entering &#039;&#039;&#039;exit&#039;&#039;&#039;&lt;br /&gt;
# At the prompt for your local machine, enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;nano ~/.ssh/config&amp;lt;/span&amp;gt;&#039;&#039;&#039; and paste the block below at the end of the file:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;Host amarel&amp;lt;br /&amp;gt;Hostname amarel.rutgers.edu&amp;lt;br /&amp;gt;HostKeyAlias amarel&amp;lt;br /&amp;gt;User NetID&amp;lt;/div&amp;gt; replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;NetID&amp;lt;/span&amp;gt; with your own NetID. Save and exit (Ctrl+o Ctrl+x). This allows you to type &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; to connect.&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ls ~/.ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If there is a file listed called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;id_rsa.pub&amp;lt;/span&amp;gt; skip to 5&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh-keygen -t rsa&amp;lt;/span&amp;gt;&#039;&#039;&#039;, then hit return to accept the default location, enter a passphase twice (or leave blank for no passphrase)&lt;br /&gt;
# Copy the public portion of the key to &#039;&#039;Amarel&#039;&#039; by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scp ~/.ssh/id_rsa.pub amarel:.&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# SSH to &#039;&#039;Amarel&#039;&#039; (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039;) and check if you already have a .ssh folder:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[rjdave@amarel1 ~]$ ls -l .ssh&amp;lt;br /&amp;gt;total 33&amp;lt;br /&amp;gt;-rw-------  1 rjdave rjdave  1069 Sep  8  2017 authorized_keys&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave   434 Jun  4  2021 config&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave  5992 Dec  2 13:47 known_hosts&amp;lt;/div&amp;gt; You probably won&#039;t have all the files above but if you instead get the message &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls: cannot access .ssh: No such file or directory&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;then enter the following command:&amp;lt;/br&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;mkdir .ssh &amp;amp;&amp;amp; chmod 700 .ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. &amp;lt;/br&amp;gt;These two commands (combined on one line) will create the .ssh folder and set the required permissions. Setting private user-only permissions (&#039;&#039;&#039;chmod 700 ...&#039;&#039;&#039;) is important, because the system will not allow you to have your keys viewable by others users. &lt;br /&gt;
# Once you have a .ssh folder with the proper permissions, enter the following commands&amp;lt;/br&amp;gt; &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;cat ~/id_rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 640 ~/.ssh/authorized_keys&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/br&amp;gt;then exit back to your local machine and execute &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; again. It should no longer ask for your password.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
For Windows, we recommend [https://mobaxterm.mobatek.net/download-home-edition.html MobaXterm] installer edition. &lt;br /&gt;
# Once installed open it, choose light or dark theme and click the &#039;&#039;&#039;Session&#039;&#039;&#039; button in the upper left.&lt;br /&gt;
# Choose &#039;&#039;&#039;SSH&#039;&#039;&#039; and enter &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; for &#039;&#039;&#039;Remote host&#039;&#039;&#039;, check the &#039;&#039;&#039;Specify username&#039;&#039;&#039; box and enter your NetID in the box and click &#039;&#039;&#039;OK&#039;&#039;&#039;.&lt;br /&gt;
# You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.&lt;br /&gt;
# In the future you can click &#039;&#039;&#039;Sessions&#039;&#039;&#039; (not Session) and select &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; and not have to enter your password.&lt;br /&gt;
&lt;br /&gt;
==Setting up your .bashrc==&lt;br /&gt;
The default software setup by OARC on &#039;&#039;Amarel&#039;&#039; does not include everything needed to compile and run ROMS. Ocean Modeling Group computing specialist David Robertson has configured, and maintains and updates, a repository of what you need for ROMS and other models that will be automatically loaded for every login session once you add some lines to the login script (.bashrc, .cshrc, etc.) in your home directory. Log in to &#039;&#039;Amarel&#039;&#039; with &#039;&#039;&#039;Terminal&#039;&#039;&#039;, &#039;&#039;&#039;iTerm2&#039;&#039;&#039; or &#039;&#039;&#039;MobaXterm&#039;&#039;&#039; and edit your login script as described below.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise requested your default shell will be bash and the following lines shown below in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt; should be added (with nano or your preferred editor) near the top of your .bashrc after the import of the global definitions as shown:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# Source global definitions&amp;lt;br /&amp;gt;if [ -f /etc/bashrc ]; then&amp;lt;br /&amp;gt;	. /etc/bashrc&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit -s unlimited&amp;lt;br /&amp;gt;export MODULEPATH=/projects/dmcs_1/sw/modulefiles/Core:${MODULEPATH}&amp;lt;br /&amp;gt;export SQUEUE_FORMAT=&amp;quot;%.18i %.9P %.8j %.8u %.2t %.10M %.10l %.4C %.6D %R&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;# Automatically load the roms module&amp;lt;br /&amp;gt;module load roms&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The line with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit&amp;lt;/span&amp;gt; allows you to take full advantage of computing resources (may be obsolete now but it won&#039;t hurt anything). &lt;br /&gt;
&lt;br /&gt;
The first &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line will tell &#039;&#039;&#039;Lmod&#039;&#039;&#039; where to find the modules that will load the custom software. &lt;br /&gt;
&lt;br /&gt;
The second &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line makes the &#039;&#039;&#039;squeue&#039;&#039;&#039; command (explained later) more useful. &lt;br /&gt;
&lt;br /&gt;
The lines in &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt; are optional and will load the &#039;&#039;&#039;roms&#039;&#039;&#039; module automatically every time you login to &#039;&#039;Amarel&#039;&#039;. They must be &#039;&#039;&#039;after&#039;&#039;&#039; the line that sets the &#039;&#039;&#039;MODULEPATH&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once you have added these lines, log out and back in for them to take effect.&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... then you may need to logout and login again so that .bashrc sets MODULEPATH as instructed above. If the error persists, you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Accessing the ROMS Source Code==&lt;br /&gt;
&lt;br /&gt;
===Register as a ROMS user===&lt;br /&gt;
If you are not already a ROMS user, you will need to fill out the registration form found [https://www.myroms.org/register here] and wait for approval. Once approved, you will be able to checkout the ROMS source code. It is highly recommended that you use the GitHub myroms repository to obtain the ROMS source code. The &#039;&#039;Subversion (SVN)&#039;&#039; repository is being phased out and will no longer be available after &#039;&#039;&#039;December 31, 2024&#039;&#039;&#039;. If you manage your own software projects using GitHub, the concepts for software version control may already be familiar to you.  Detailed directions can be found on the WikiROMS [[Git#Downloading_ROMS|Git]] page.&lt;br /&gt;
&lt;br /&gt;
===Obtaining the ROMS source code===&lt;br /&gt;
There is nothing special about obtaining the ROMS source code on &#039;&#039;Amarel&#039;&#039;. The git commands are the same as on any UNIX host. &lt;br /&gt;
Navigate to the directory where you want your ROMS source code to reside and execute this git clone command:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/myroms/roms.git &amp;lt;my_src_dir&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;my_src_dir&amp;gt; with what you want the source code directory to be called. You can also omit &amp;lt;my_src_dir&amp;gt; and git will automatically name the folder &#039;&#039;&#039;roms&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
It can take a couple of minutes to download all of ROMS, but you only do this once. &lt;br /&gt;
&lt;br /&gt;
Many users simply run this command from their home directory and use &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;&#039;&#039;&#039;myroms&#039;&#039;&#039;&amp;lt;/span&amp;gt; for &amp;lt;my_src_dir&amp;gt;, but the choice is yours depending on how you want to manage your &#039;&#039;Amarel&#039;&#039; space and how many ROMS projects you think you might end up working on.&lt;br /&gt;
&lt;br /&gt;
==Loading and Unloading Modules==&lt;br /&gt;
Like many clusters, &#039;&#039;Amarel&#039;&#039; uses environment modules to load and unload software and configure the environment. Some commands you will find useful are:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&#039;&#039;&#039;module help&#039;&#039;&#039;               Display help message&amp;lt;br /&amp;gt;&#039;&#039;&#039;module help &amp;lt;m1&#039;&#039;&#039;&amp;gt;          Show help information for module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module available&#039;&#039;&#039;	  Show all modules currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module whatis &amp;lt;m1&amp;gt;&#039;&#039;&#039;        Show brief information about module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module spider&#039;&#039;&#039;             List all possible modules even if not currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module list&#039;&#039;&#039;               List currently loaded modules&amp;lt;br /&amp;gt;&#039;&#039;&#039;module load&#039;&#039;&#039;               Load the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module unload&#039;&#039;&#039;             Unload the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module swap &amp;lt;m1&amp;gt; &amp;lt;m2&amp;gt;&#039;&#039;&#039;     Unload &amp;lt;m1&amp;gt; and then load &amp;lt;m2&amp;gt; (for switching versions of the same software)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module purge&#039;&#039;&#039;              Unload all loaded modules&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Loading the ROMS Module===&lt;br /&gt;
If you &#039;&#039;&#039;did not&#039;&#039;&#039; add the optional lines from the [[#Setting_up_your_.bashrc|Setting up your .bashrc]] section, you can easily set up your environment to compile and run ROMS by manually loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module.&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;module load roms&amp;lt;br /&amp;gt;module list&amp;lt;br /&amp;gt;Currently Loaded Modules:&amp;lt;br /&amp;gt;  1) intel/17.0.4     2) mvapich2/2.2      3) mct-roms/2.6.0   4) netcdf/4.6.2&amp;lt;br /&amp;gt;  5) esmf/8.0.0_nc4   6) parpack-roms/2.1  7) hdf5/1.10.4      8) roms/intel_nc4&amp;lt;/div&amp;gt;&lt;br /&gt;
Notice that loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module will actually load 7 other modules. &lt;br /&gt;
&lt;br /&gt;
This will setup your environment to use the Intel compiler so remember to set &#039;&#039;&#039;FORT&#039;&#039;&#039; to &#039;&#039;&#039;ifort&#039;&#039;&#039; in your build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Your project/coursework working directory space==&lt;br /&gt;
&lt;br /&gt;
We recommend you create a subdirectory of your home directory in which to work, so you can keep each ROMS project separate and organized.  &lt;br /&gt;
&lt;br /&gt;
You might call this &#039;&#039;&#039;working directory&#039;&#039;&#039; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;CoastalDynamics&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, or simply &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;cod&amp;lt;/span&amp;gt; (for coastal ocean dynamics). You will be typing this a lot, so keep it simple.&lt;br /&gt;
&lt;br /&gt;
To make a new directory called &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, enter this command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;mkdir Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to this working directory with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In instructions that follow, when we refer to your &#039;&#039;&#039;working directory&#039;&#039;&#039; we mean this workspace.&lt;br /&gt;
&lt;br /&gt;
==Configuring and Compiling ROMS==&lt;br /&gt;
You will compile and run ROMS in your project/coursework &#039;&#039;&#039;working directory&#039;&#039;&#039;, so change to that directory first.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running the build script &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; is the recommended method for compiling ROMS on &#039;&#039;Amarel&#039;&#039;. For any given project you will likely only need to change &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; to reset &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;ROMS_APPLICATION&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; and make sure &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;FORT&amp;lt;/span&amp;gt; is set to &#039;&#039;&#039;ifort&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{warning}} &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;It is important to make sure &#039;&#039;&#039;USE_MY_LIBS&#039;&#039;&#039; is set to &#039;&#039;no&#039;&#039; or your compilation will fail.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A template &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; script is in subdirectory &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; of &#039;&#039;&#039;&amp;lt;my_src_dir&amp;gt;&#039;&#039;&#039; that you created when you downloaded the code. For example, if you created &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; in your home directory the copy command would be&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Bin/build_roms.sh . &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now open &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; with an editor (&#039;&#039;e.g.&#039;&#039; &#039;&#039;&#039;nano&#039;&#039;&#039;) and modify the line &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; to point to your choice for &amp;lt;my_src_dir&amp;gt;. So, you will have something like ...&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export MY_ROMS_SRC=&amp;lt;/span&amp;gt;{$HOME}/&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if the name you chose for &amp;lt;my_src_dir&amp;gt; was &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If this is your first time working with ROMS, a good starting place is to compile the default UPWELLING test case that is indicated in build_roms.sh with the default setting &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export ROMS_APPLICATION&amp;lt;/span&amp;gt;=UPWELLING.  &lt;br /&gt;
&lt;br /&gt;
To compile the UPWELLING example, you need to copy the configuration file &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;upwelling.h&amp;lt;/span&amp;gt; to your working directory. This is in subdirectory &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; of your source code. For example, the command might be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Include/upwelling.h .&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once your build script is configured and you have upwelling.h in your working directory you can compile ROMS by typing:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;./build_roms.sh -j 4&amp;lt;/div&amp;gt;&lt;br /&gt;
where the number after -j indicates the number of compute cores to use in parallel to execute the compilation. The greater the number, the faster it goes.&lt;br /&gt;
&lt;br /&gt;
However, the login node you will be compiling on is shared for the entire &#039;&#039;Amarel&#039;&#039; system. If you use a number larger than &#039;&#039;&#039;4&#039;&#039;&#039;, or omit it altogether (which says use &#039;&#039;all&#039;&#039; cores on the login node) your build might be terminated by an administrator. Be a considerate user and keep the number low.&lt;br /&gt;
&lt;br /&gt;
If compilation is processing successfully you will see a lot of information typed to your screen as each component of the source code is compiled. It will take a minute or so to complete.&lt;br /&gt;
&lt;br /&gt;
If compilation ends quickly with errors like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ ./build_roms.sh -j 4 &amp;lt;/br&amp;gt;rm -f -r core *.ipo /home/jwilkin/cod/Projects/Build_roms...&amp;lt;/br&amp;gt;which: &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;no mpif90&amp;lt;/span&amp;gt; in (/usr/lpp/mmfs/bin:/usr/local/bin:/us...&amp;lt;/br&amp;gt;cp -f /opt/intelsoft/serial/netcdf3/include/netcdf.mod /h...&amp;lt;/br&amp;gt;cp: cannot stat ‘/opt/intelsofo... No such file or directory&amp;lt;/br&amp;gt;make: *** No rule to make target netcdf.mod needed by ... Stop. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... this means you have not run the &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;module load roms&amp;lt;/span&amp;gt; command. Go back to the notes on [[Amarel#Loading_the_ROMS_Module]].&lt;br /&gt;
&lt;br /&gt;
If compilation was successful, there will be a file named &#039;&#039;&#039;romsM&#039;&#039;&#039; that is the model executable. You can check for the file with this command:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;build_roms.sh romsM&amp;lt;/span&amp;gt; upwelling.h &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; is a folder that build_roms.sh created to hold all the temporary files that the FORTRAN compilation process makes to combine into the romsM executable file.&lt;br /&gt;
&lt;br /&gt;
==Running on the Amarel Compute Nodes==&lt;br /&gt;
When you &#039;&#039;&#039;ssh&#039;&#039;&#039; to &#039;&#039;Amarel&#039;&#039; you are connected to one of the login nodes. These nodes are to be used for file editing, transfering output and input files to/from your local computer, and modest code compiling tasks and analysis, but not for compute intensive tasks. Here we explain how to connect to the compute nodes for these larger tasks.&lt;br /&gt;
&lt;br /&gt;
Note: Consult the Amarel status page (https://oarc.rutgers.edu/amarel-system-status/) before scheduling a job. Amarel is down for maintenance monthly. &lt;br /&gt;
&lt;br /&gt;
===What &#039;&#039;partitions&#039;&#039; can you run on?===&lt;br /&gt;
&lt;br /&gt;
Access to Amarel resources is controlled by &#039;&#039;partitions&#039;&#039;. You can find out the partitions you have permission to access with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;sinfo -s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show the partitions that everyone has access to. See the cluster guide [https://sites.google.com/view/cluster-user-guide#h.oeejy9yf80e4 entry on partitions] for an explanation of these. &lt;br /&gt;
&lt;br /&gt;
If you belong to a research group that own a partition you should also see that listed, for example &#039;&#039;&#039;p_omg_1&#039;&#039;&#039; for the Ocean Modeling Group. This is the partition you want to use most of the time as your job will not get pre-empted by other owner users.&lt;br /&gt;
&lt;br /&gt;
===Using the SLURM batch job scheduler===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Amarel&#039;&#039; uses SLURM workload manager to schedule compute intensive tasks. The user configures a SLURM job script for each model run and submits this script with the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command. The job script declares the resources required, such as number of CPUs for parallel jobs, maximum memory required, etc.&lt;br /&gt;
&lt;br /&gt;
We have configured a simple template job script (for the ROMS UPWELLING example) that you can copy from &#039;&#039;&#039;/projects/dmcs_1/courses/job.sh&#039;&#039;&#039; into your working directory. &lt;br /&gt;
&lt;br /&gt;
The UNIX command to copy a file is &#039;&#039;&#039;cp source_file target_file&#039;&#039;&#039;. So, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp /projects/dmcs_1/courses/job.sh .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses a &#039;&#039;dot&#039;&#039; (&#039;&#039;&#039;.&#039;&#039;&#039;) for the target_file, which causes the source_file (job.sh) to be copied to the present working directory without changing its name.&lt;br /&gt;
&lt;br /&gt;
When typing this, or any, UNIX command, you can start typing just the beginning few characters of the path then press TAB to autocomplete the filename. If the completion is ambiguous, you can continue typing more characters and press TAB again. Pressing TAB twice in a row will show you the set of possible completions. This trick can save you a lot of tedious (mis)typing.&lt;br /&gt;
&lt;br /&gt;
The contents of &#039;&#039;&#039;job.sh&#039;&#039;&#039; are shown below:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#!/bin/bash&amp;lt;br &amp;gt;#SBATCH --partition=p_omg_1             # Partition. If you are not a member of OMG enter your own partition&amp;lt;br /&amp;gt;#SBATCH --job-name=upwelling            # Assign a short name to your job&amp;lt;br/&amp;gt;#SBATCH --nodes=1                       # Number of nodes you require&amp;lt;br /&amp;gt;#SBATCH --ntasks=4                      # Total number of tasks you&#039;ll launch&amp;lt;br /&amp;gt;#SBATCH --ntasks-per-node=4             # Number of tasks you&#039;ll launch on each node&amp;lt;br /&amp;gt;#SBATCH --cpus-per-task=1               # Cores per task (&amp;gt;1 if multithread tasks)&amp;lt;br /&amp;gt;#SBATCH --mem=6400                      # Real memory (RAM) required (MB) per node&amp;lt;br /&amp;gt;#SBATCH --time=00-00:05                 # Total run time limit (DD-HH:MM)&amp;lt;br /&amp;gt;#SBATCH --output=out.%N.%j              # STDOUT output file&amp;lt;br /&amp;gt;#SBATCH --error=err.%N.%j               # STDERR output file (optional but recommended)&amp;lt;br /&amp;gt;#SBATCH --export=ALL                    # Export you current env to the job env&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;## It is important to have --mpi=pmi2 here or ROMS will not run&amp;lt;br /&amp;gt;srun --mpi=pmi2 ./romsM roms_upwelling.in&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The maximum run time is 14-00:00 (14 days). It is tempting to set this to the maximum in order to avoid a job ending too early. (&#039;&#039;i.e.&#039;&#039; Slurm stopping a ROMS run before it is finished) However, if there is maintenance scheduled during that time period the job will not start until maintenance is complete. So a runtime as close as possible to the actual run time is recommended.&lt;br /&gt;
&lt;br /&gt;
====Requesting a specific class of compute node====&lt;br /&gt;
&lt;br /&gt;
For large jobs it makes sense to use all available cores on a node, and for low priority jobs to use older less fast nodes. You can do this by requesting a specific node number, but it is better to request a particular class of nodes so you don&#039;t unwittingly pick a node already in use. The classes available from oldest to newest nodes are:&lt;br /&gt;
&lt;br /&gt;
# skylake (32 cores) (Phase I nodes) (nodes hal0116 through hal0120)&lt;br /&gt;
# cascadelake (40 cores) (Phase II nodes) (nodes hal0159 through hal0163)&lt;br /&gt;
# icelake (64 cores) (Phase V.B nodes) (nodes hal0299 through hal0302)&lt;br /&gt;
&lt;br /&gt;
Make the node class request in the SLURM script and choose the maximum number of cores to match, &#039;&#039;e.g.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#SBATCH --constraint=cascadelake               # Run on Phase II nodes (40 cores) &amp;lt;br&amp;gt;#SBATCH --ntasks=40                            # Total number of tasks to launch (like -np to mpirun) &amp;lt;br&amp;gt;#SBATCH --ntasks-per-node=40                   # Number of tasks to launch on each node&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specifically request a class of nodes the SLURM scheduler will make its own choice on the most appropriate resources to use given your request. We don&#039;t know the basis of that choice. &lt;br /&gt;
&lt;br /&gt;
If you request a class of node that is fully assigned to other users in your partition, your job will wait for the others users jobs to complete. So, coordinate with your colleagues if resource use is at a premium. You can use the &#039;&#039;&#039;squeue -p partition_name&#039;&#039;&#039; command to see what resources are being used by other users, &#039;&#039;e.g.&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ squeue -p p_omg_1 &amp;lt;br&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON) &amp;lt;br&amp;gt;   26975473    p_omg_1                  fwd   levinj  R     17:15:42  14-00:00:00   80      2 hal[0159,0162]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the ROMS Upwelling Example===&lt;br /&gt;
You may have noticed that the srun command above includes a file named &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt;. You will need to copy this file and &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;varinfo.dat&amp;lt;/span&amp;gt; from the ROMS/External directory of your &amp;lt;my_src_dir&amp;gt; ROMS source code to the directory where you compiled ROMS. &lt;br /&gt;
&lt;br /&gt;
If, for example, you chose &#039;&#039;&#039;myroms&#039;&#039;&#039; as the name of your &amp;lt;my_src_dir&amp;gt; when you downloaded the code, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/External/roms_upwelling.in .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses &#039;&#039;tilde&#039;&#039; (~) as shorthand for your home directory,&lt;br /&gt;
&lt;br /&gt;
After you copy the files, you will need to make a couple of small edits (using &#039;&#039;e.g.&#039;&#039; &#039;&#039;&#039;nano&#039;&#039;&#039;) to &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; to get this to work. &lt;br /&gt;
&lt;br /&gt;
# Change the line with VARNAME to read &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;VARNAME = varinfo.dat&amp;lt;/span&amp;gt; (&#039;&#039;i.e.&#039;&#039; delete the ROMS/External part)&lt;br /&gt;
# Set &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileI == 2&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileJ == 2&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The product of NtileI and NtileJ, &#039;&#039;i.e.&#039;&#039; 2 x 2 = 4, is the number of cores the model will run on in parallel. This number must match the number in the SLURM job script options &#039;&#039;&#039;--ntasks&#039;&#039;&#039; and, in this case, &#039;&#039;&#039;--ntasks-per-node&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Now you can submit your job to &#039;&#039;&#039;sbatch&#039;&#039;&#039; with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;sbatch job.sh&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ROMS configurations for &#039;&#039;Coastal Ocean Dynamics&#039;&#039; class===&lt;br /&gt;
The files that will configure the examples we will study in class will be located in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/courses/cod&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You will find instructions for configuring and running the examples at a separate Wiki page [[COD_Class_Examples]]&lt;br /&gt;
&lt;br /&gt;
===Checking Job Status with squeue===&lt;br /&gt;
Detailed documentation for monitoring your SLURM jobs can be found [https://sites.google.com/view/cluster-user-guide#h.4bsndqufii8p here]. The easiest way to check whether your job is running is with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;squeue -p p_omg_1&amp;lt;/span&amp;gt;&#039;&#039;&#039; (or your own partition name if it is not p_omg_1). &lt;br /&gt;
&lt;br /&gt;
You should see output something like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON)&amp;lt;br /&amp;gt;   17197219     dmcs_1            watl_psas   rjdave  R   3-04:07:00   3-20:00:00    4      1 hal0035&amp;lt;br /&amp;gt;   17146609     dmcs_1            upwelling   rjdave  R     00:01:10     00:05:00    4      1 hal0035&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the job is running (the ‘R’ under ‘ST’), has been running for 1 minute, 10 seconds, and is running on node 35.&lt;br /&gt;
&lt;br /&gt;
===Checking Progress with tail===&lt;br /&gt;
You can check ROMS progress by using the tail command on the &#039;&#039;&#039;output&#039;&#039;&#039; file. For the upwelling job above the file would be called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; so the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039; will show you the most recent 10 lines written to the output log and will most likely tell you what time-step the model is on. Using the -f option (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail -f out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;) will output appended data as the file grows. Ctrl-C will escape the display.&lt;br /&gt;
&lt;br /&gt;
===Did my UPWELLING job run?===&lt;br /&gt;
If the UPWELLING test case was successful there should be an output log file named something like &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; that shows no errors, and there should be 4 output NetCDF files ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *.nc &amp;lt;/br&amp;gt;roms_avg.nc &amp;lt;/br&amp;gt;roms_dia.nc &amp;lt;/br&amp;gt;roms_his.nc &amp;lt;/br&amp;gt;roms_rst.nc &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cancelling a Job===&lt;br /&gt;
To safest way cancel a queued or running job is to use its jobid. A job can be canceled by name but that is not recommended. To cancel the upwelling job in the example above you would issue the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scancel 17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If the job has not yet started, it will be removed from the queue. If it is running, all child processes will be killed and the job will be removed from the queue. You are only able cancel jobs that you own.&lt;br /&gt;
&lt;br /&gt;
===Running an interactive session on a compute node===&lt;br /&gt;
It is possible to conduct your work interactively on one of the compute nodes (instead of the login node). For most work we will be doing in class this is not necessary, but if for some reason you have a job that needs many processors or a large amount of memory, and you want to run it interactively - say, to simply check that everything is in order for it to start correctly - there are instructions in the Cluster User Guide [https://sites.google.com/view/cluster-user-guide#h.26x9sbburvsg here].&lt;br /&gt;
&lt;br /&gt;
For compute intensive interactive work, such as model analysis using Python or MATLAB, we recommend using the OnDemand interface to launch an interactive session on a set of compute nodes.&lt;br /&gt;
&lt;br /&gt;
==Using the OnDemand desktop environment==&lt;br /&gt;
The &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service allows you to connect to &#039;&#039;Amarel&#039;&#039; using a graphical desktop environment in a web browser. One of the most useful features of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that it allows you to analyze model output by Python or Matlab on the cluster compute nodes. &lt;br /&gt;
&lt;br /&gt;
You need to be running a Rutgers VPN to use OnDemand. &lt;br /&gt;
&lt;br /&gt;
Navigate your browser to https://ondemand.hpc.rutgers.edu/pun/sys/dashboard and login with your NetID and password. At the top of the page click &#039;&#039;&#039;Interactive Apps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Python Jupyter notebook:===&lt;br /&gt;
# Select &#039;&#039;&#039;Personal Jupyter&#039;&#039;&#039; from the list on the left&lt;br /&gt;
# Make your selections for &#039;&#039;&#039;number of hours&#039;&#039;&#039; your session can remain active (&#039;&#039;e.g.&#039;&#039; 3 hours), the &#039;&#039;&#039;number of cores&#039;&#039;&#039; to run on (1), and &#039;&#039;&#039;memory&#039;&#039;&#039; (8 GB is an OK choice)&lt;br /&gt;
# For &#039;&#039;Partition&#039;&#039; enter &#039;&#039;e.g.&#039;&#039; &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; if you are in OMG. Leave &#039;&#039;Reservation&#039;&#039; and &#039;&#039;Slurm feature&#039;&#039; blank. For &#039;&#039;conda path&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/miniconda3&amp;lt;/span&amp;gt; and for &#039;&#039;conda environment&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/xroms/py38&amp;lt;/span&amp;gt;. Click [[Media:Amarel Jupyter config.png | here]] to see what the completed launch page looks like.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# You should see sub-window of the web page like this &amp;lt;/br&amp;gt; [[Image:JupyterStarting.png|600px]] &amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;When the session is ready it changes to this: &amp;lt;/br&amp;gt; [[Image:JupyterRunning.png|600px]]&lt;br /&gt;
# Start your notebook by clicking the &#039;&#039;&#039;Connect to Jupyter, Anaconda version 5.1.0&#039;&#039;&#039; button: (If this does not appear, check that you correctly entered the &#039;&#039;&#039;conda path&#039;&#039;&#039; and &#039;&#039;&#039;conda environment&#039;&#039;&#039; at step 3 above.) &amp;lt;/br&amp;gt;[[Image:JupyterConnect.png|400px]]&lt;br /&gt;
# This should place you in a file browse window from which you can navigate to one of your existing Jupyter notebooks, or, to start a new Untitled notebook, select &#039;&#039;Python 3 (ipykernel)&#039;&#039; from the &#039;&#039;New&#039;&#039; pull-down menu on the right side of the page [[Image:NewPythonNotebook.png]]&lt;br /&gt;
# Once your notebook is running, you can import the xroms package as you would any other toolbox, by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;import xroms&amp;lt;/span&amp;gt;&#039;&#039;&#039; then hold down the shift key and hit the return/enter key. You will see an asterisk [&#039;&#039;&#039;*&#039;&#039;&#039;] in the square brackets.&lt;br /&gt;
# Once that asterisk changes to a &#039;&#039;&#039;1&#039;&#039;&#039;, the xroms python module has been loaded.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;conda&#039;&#039;&#039; environment built for DMCS_1 makes available many of the Python modules you are used to using.&lt;br /&gt;
&lt;br /&gt;
===Matlab:===&lt;br /&gt;
# Select MATLAB from the list on the left &lt;br /&gt;
# As for Step 2 above for Python, choose time, cores, and memory&lt;br /&gt;
# Select MATLAB version, and enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; (or your own group name) in partition.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# Once the &#039;&#039;&#039;Launch noVNC in New Tab&#039;&#039;&#039; button appears, click it and a MatLab GUI will open.&lt;br /&gt;
&lt;br /&gt;
You are running in a graphical desktop environment, so by default Matlab will look in Documents/MATLAB/startup.m for your personal Matlab configuration file. &lt;br /&gt;
&lt;br /&gt;
Popular MATLAB utilities for working with ROMS output are in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/matlab-tools&amp;lt;/span&amp;gt;. These include the myroms.org utilities in subdirectory &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt;, and John Wilkin&#039;s toolbox in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_wilkin&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Reconnecting to an interactive session===&lt;br /&gt;
A particularly nifty feature of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that your interactive session is independent of the browser window instance. &lt;br /&gt;
&lt;br /&gt;
Say you are working on your office computer using a Jupyter notebook via &#039;&#039;&#039;OnDemand&#039;&#039;&#039; but haven&#039;t finished all you want to do by the end of the day. If you leave that session running, you can go home and connect once again to &#039;&#039;&#039;OnDemand&#039;&#039;&#039; and you will see your session in the list of Interactive Sessions. Launch that session and you will be placed right back where you were. &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is simply a web interface to code running on &#039;&#039;Amarel&#039;&#039;, so you can connect from any browser. &lt;br /&gt;
&lt;br /&gt;
Of course, this only works if you selected a &#039;&#039;&#039;number of hours&#039;&#039;&#039; in Step 2 above that will allow your session to remain open. &lt;br /&gt;
&lt;br /&gt;
As long as the session is active the &#039;&#039;Amarel&#039;&#039; resources (cores and memory) are reserved for you and no one else. So, be respectful of other users and close out an interactive session once you are done.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6611</id>
		<title>Amarel</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Amarel&amp;diff=6611"/>
		<updated>2024-01-19T17:37:53Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Using Amarel&amp;lt;/div&amp;gt;&lt;br /&gt;
==Getting Started==&lt;br /&gt;
This wiki page is a brief &amp;quot;Getting Started&amp;quot; introduction to running the ROMS ocean model and analyzing model output on the Rutgers University Office of Advanced Research Computing (OARC) cluster computer &#039;&#039;Amarel&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
===Amarel help ===&lt;br /&gt;
There is an OARC supported user guide at https://sites.google.com/view/cluster-user-guide to which you can refer for a lot of detailed guidance.&lt;br /&gt;
&lt;br /&gt;
===Working with UNIX===&lt;br /&gt;
To work effectively on &#039;&#039;Amarel&#039;&#039; you need at least a beginner level of competency with the UNIX operating system. &lt;br /&gt;
If you are a total newcomer to UNIX computers you might find it useful to work through a structured tutorial; for example [https://ryanstutorials.net/linuxtutorial/ Ryan&#039;s Linux Tutorial].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Basic UNIX commands&lt;br /&gt;
|-&lt;br /&gt;
! Command !! What it does !! Example&lt;br /&gt;
|-&lt;br /&gt;
| ls || list contents of a directory &amp;lt;/br&amp;gt; files ending in .nc &amp;lt;/br&amp;gt; long format list and hidden files || ls &amp;lt;/br&amp;gt; ls *.nc &amp;lt;/br&amp;gt; ls -al  &lt;br /&gt;
|-&lt;br /&gt;
| cd || change directory || cd /projects/dmcs_1/courses/cod&lt;br /&gt;
|-&lt;br /&gt;
| pwd || print working directory to see where you are || pwd&lt;br /&gt;
|-&lt;br /&gt;
| cp || copy a file || cp source_file target_file&lt;br /&gt;
|-&lt;br /&gt;
| mv || rename a file &amp;lt;/br&amp;gt; move file to new directory || mv file_name new_name &amp;lt;/br&amp;gt; mv file_name dir1/dir2/new_name&lt;br /&gt;
|-&lt;br /&gt;
| rm || delete (remove) a file || rm filename&lt;br /&gt;
|-&lt;br /&gt;
| more || type contents of a file to screen one page at a time || more .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| less || like &#039;&#039;more&#039;&#039; only with more features (unix geeks are so funny) &amp;lt;/br&amp;gt;Read the man page for help || less .bashrc&lt;br /&gt;
|-&lt;br /&gt;
| man || get the manual page (help) for a command || man less&lt;br /&gt;
|-&lt;br /&gt;
| . || the directory you are in || cp /projects/dmcs_1/courses/job.sh &#039;&#039;&#039;.&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| .. || the directory above the one you are in || cd &#039;&#039;&#039;..&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| grep || find a string in a file &amp;lt;/br&amp;gt; &#039;&#039;get regular expression and print (!)&#039;&#039; || grep COD_1DMIX *.h&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Your default UNIX &#039;&#039;shell&#039;&#039; (the &amp;quot;flavor&amp;quot; of your UNIX environment) is &#039;&#039;&#039;bash&#039;&#039;&#039;, so for more advanced help it is often good to include &amp;quot;bash&amp;quot; as one of your search terms in a google search for help.&lt;br /&gt;
&lt;br /&gt;
===Editing files===&lt;br /&gt;
One of the things that stumps newcomers to UNIX is making simple edits to files. Ryan&#039;s Linux Tutorial goes over the basics of the &#039;&#039;&#039;vi&#039;&#039;&#039; editor [https://ryanstutorials.net/linuxtutorial/vi.php here], but it can be a beast to get comfortable with. &lt;br /&gt;
&lt;br /&gt;
A more intuitive editor for new users is &#039;&#039;&#039;nano&#039;&#039;&#039;, the basics of which you can read about [https://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/ here].&lt;br /&gt;
&lt;br /&gt;
There is also a way to edit files in the web browser based &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service that is described later in this guide.&lt;br /&gt;
&lt;br /&gt;
==Rutgers VPN==&lt;br /&gt;
If you are not on campus, you will need to connect to the Rutgers VPN. To use Rutgers VPN, you must first enroll in Duo 2 Factor Authentication (2FA) (NetID+). Most users have probably already done this. If not, navigate to https://netid.rutgers.edu/setupTwoFactorAuthentication.htm and follow the instructions.&lt;br /&gt;
&lt;br /&gt;
Once you are enrolled in NetID+ you will need to activate the VPN service, if you have not already. Navigate to https://soc.rutgers.edu/vpn/ and click the gray button titled &#039;&#039;&#039;Service Activation&#039;&#039;&#039;. If you are not already logged in you may be asked to login and/or approve your login with the Duo Mobile app. To activate the VPN service, click the checkbox next to &#039;&#039;&#039;Remote Access VPN, Cisco AnyConnect Access for Rutgers&#039;&#039;&#039; and click the &#039;&#039;&#039;Activate Services&#039;&#039;&#039; button.&lt;br /&gt;
&lt;br /&gt;
You are now ready to download the Cisco VPN client and connect to the Rutgers VPN. Complete instructions can be found [https://soc.rutgers.edu/vpn/ here] by clicking the red button titled &#039;&#039;&#039;General VPN Instructions&#039;&#039;&#039; to download the PDF. The instructions are geared towards Windows so if you are using a Mac you might find [https://soc.rutgers.edu/vpn/apple/ this page] more helpful. In most cases, regardless of your operating system, pointing your browser to https://vpn.rutgers.edu/ and logging in with your NetID will lead you to downloading the correct VPN client.&lt;br /&gt;
&lt;br /&gt;
Once installed, open the &#039;&#039;&#039;Cisco AnyConnect&#039;&#039;&#039; client and type &#039;&#039;&#039;vpn.rutgers.edu&#039;&#039;&#039; in the box and click &#039;&#039;&#039;Connect&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Connect.png]]&lt;br /&gt;
&lt;br /&gt;
In the next window, shown below, &#039;&#039;&#039;Username&#039;&#039;&#039; will be your NetID.&lt;br /&gt;
&lt;br /&gt;
In the second line &#039;&#039;&#039;Password&#039;&#039;&#039; is the password for your NetID. &lt;br /&gt;
&lt;br /&gt;
The third line is the &#039;&#039;&#039;Duo Action&#039;&#039;&#039; to complete the 2FA, which can be accomplished in one of 4 possible ways:&lt;br /&gt;
&lt;br /&gt;
# Enter a 6 digit Duo Passcode. These are generated either by a Hard Token, by showing the passcode in the Duo Mobile App, or from a previous “SMS” request. Simply type in the 6 numbers and hit OK.&lt;br /&gt;
# Type the word “push”. This will send a push notification to the primary device you have enrolled with Duo through NetID+ with the option to Accept or Deny.&lt;br /&gt;
# Type the word “phone”. You will receive a phone call to the primary device you have enrolled with Duo through NetID+ with touch tone options to Accept or Deny.&lt;br /&gt;
# Type the word “sms”. You will receive a text message to the primary device you have enrolled with Duo through NetID+ containing passcodes you can use to login.&lt;br /&gt;
&lt;br /&gt;
[[Image:AnyConnect_Credentials.png]]&lt;br /&gt;
&lt;br /&gt;
Click &#039;&#039;&#039;OK&#039;&#039;&#039; and you should be connected to Rutgers VPN. You should have a small AnyConnect icon with a lock on it in the task tray (Windows [[Image:AnyConnect_win_connected.jpg]]) or in the menu bar (Mac OS [[Image:AnyConnect_mac_connected.png|25px]]).&lt;br /&gt;
&lt;br /&gt;
==Connecting to Amarel with SSH==&lt;br /&gt;
In order to connect to &#039;&#039;Amarel&#039;&#039; and compile and run ROMS you will need an SSH/terminal client. If you already use an SSH/terminal application you are comfortable with then stick with that and adapt the instructions below accordingly. For these instructions to work you need to either be on campus or connected to the Rutgers VPN.&lt;br /&gt;
&lt;br /&gt;
===Mac OS===&lt;br /&gt;
If you are on a Mac, open the &#039;&#039;&#039;Terminal&#039;&#039;&#039; app (found in the Applications -&amp;gt; Utilities folder) or &#039;&#039;&#039;iTerm&#039;&#039;&#039; app and type:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ssh fakeuser@amarel.rutgers.edu&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;fakeuser&amp;lt;/span&amp;gt; with your NetID. When it asks if you want to continue connecting enter &#039;&#039;&#039;yes&#039;&#039;&#039;, then enter your NetID password. &lt;br /&gt;
&lt;br /&gt;
Having to type the above command and netid password every time you login is moderately tedious, but this username/password authentication can become annoying and time consuming when repeatedly using the &#039;&#039;&#039;scp&#039;&#039;&#039; command to copy files to &#039;&#039;Amarel&#039;&#039;. Passwordless access and file transfer can be enabled using &#039;&#039;&#039;SSH keys&#039;&#039;&#039; by following the instructions below, or for more detail see the [https://sites.google.com/view/cluster-user-guide#h.jgwrkm9e9rwg OARC User Guide on this topic].&lt;br /&gt;
&lt;br /&gt;
# If you are still connected to &#039;&#039;Amarel&#039;&#039;, disconnect by entering &#039;&#039;&#039;exit&#039;&#039;&#039;&lt;br /&gt;
# At the prompt for your local machine, enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;nano ~/.ssh/config&amp;lt;/span&amp;gt;&#039;&#039;&#039; and paste the block below at the end of the file:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;Host amarel&amp;lt;br /&amp;gt;Hostname amarel.rutgers.edu&amp;lt;br /&amp;gt;HostKeyAlias amarel&amp;lt;br /&amp;gt;User NetID&amp;lt;/div&amp;gt; replacing &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;NetID&amp;lt;/span&amp;gt; with your own NetID. Save and exit (Ctrl+o Ctrl+x). This allows you to type &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; to connect.&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ls ~/.ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If there is a file listed called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;id_rsa.pub&amp;lt;/span&amp;gt; skip to 5&lt;br /&gt;
# Enter &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh-keygen -t rsa&amp;lt;/span&amp;gt;&#039;&#039;&#039;, then hit return to accept the default location, enter a passphase twice (or leave blank for no passphrase)&lt;br /&gt;
# Copy the public portion of the key to &#039;&#039;Amarel&#039;&#039; by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scp ~/.ssh/id_rsa.pub amarel:.&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# SSH to &#039;&#039;Amarel&#039;&#039; (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039;) and check if you already have a .ssh folder:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;[rjdave@amarel1 ~]$ ls -l .ssh&amp;lt;br /&amp;gt;total 33&amp;lt;br /&amp;gt;-rw-------  1 rjdave rjdave  1069 Sep  8  2017 authorized_keys&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave   434 Jun  4  2021 config&amp;lt;br /&amp;gt;-rw-r--r--  1 rjdave rjdave  5992 Dec  2 13:47 known_hosts&amp;lt;/div&amp;gt; You probably won&#039;t have all the files above but if you instead get the message &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls: cannot access .ssh: No such file or directory&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;the enter the following command:&amp;lt;/br&amp;gt;&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;mkdir .ssh &amp;amp;&amp;amp; chmod 700 .ssh&amp;lt;/span&amp;gt;&#039;&#039;&#039;. &amp;lt;/br&amp;gt;These two commands (combined on one line) will create the .ssh folder and set the required permissions. Setting private user-only permissions (&#039;&#039;&#039;chmod 700 ...&#039;&#039;&#039;) is important, because the system will not allow you to have your keys viewable by others users. &lt;br /&gt;
# Once you have a .ssh folder with the proper permissions, enter the following commands&amp;lt;/br&amp;gt; &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;cat ~/id_rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys &amp;amp;&amp;amp; chmod 640 ~/.ssh/authorized_keys&amp;lt;/span&amp;gt;&#039;&#039;&#039;&amp;lt;/br&amp;gt;then exit back to your local machine and execute &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;ssh amarel&amp;lt;/span&amp;gt;&#039;&#039;&#039; again. It should no longer ask for your password.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
For Windows, we recommend [https://mobaxterm.mobatek.net/download-home-edition.html MobaXterm] installer edition. &lt;br /&gt;
# Once installed open it, choose light or dark theme and click the &#039;&#039;&#039;Session&#039;&#039;&#039; button in the upper left.&lt;br /&gt;
# Choose &#039;&#039;&#039;SSH&#039;&#039;&#039; and enter &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; for &#039;&#039;&#039;Remote host&#039;&#039;&#039;, check the &#039;&#039;&#039;Specify username&#039;&#039;&#039; box and enter your NetID in the box and click &#039;&#039;&#039;OK&#039;&#039;&#039;.&lt;br /&gt;
# You will be asked to type your NetID password and then asked if you want to save the password. If you choose yes you will be asked to set a master password to encrypt all your saved passwords.&lt;br /&gt;
# In the future you can click &#039;&#039;&#039;Sessions&#039;&#039;&#039; (not Session) and select &#039;&#039;&#039;amarel.rutgers.edu&#039;&#039;&#039; and not have to enter your password.&lt;br /&gt;
&lt;br /&gt;
==Setting up your .bashrc==&lt;br /&gt;
The default software setup by OARC on &#039;&#039;Amarel&#039;&#039; does not include everything needed to compile and run ROMS. Ocean Modeling Group computing specialist David Robertson has configured, and maintains and updates, a repository of what you need for ROMS and other models that will be automatically loaded for every login session once you add a some lines to the login script (.bashrc, .cshrc, etc.) in your home directory. Log in to &#039;&#039;Amarel&#039;&#039; with &#039;&#039;&#039;Terminal&#039;&#039;&#039;, &#039;&#039;&#039;iTerm2&#039;&#039;&#039; or &#039;&#039;&#039;MobaXterm&#039;&#039;&#039; and edit your login script as described below.&lt;br /&gt;
&lt;br /&gt;
Unless otherwise requested your default shell will be bash and the following lines shown below in &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; and green&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Colored text here&amp;lt;/span&amp;gt; should be added (with nano or your preferred editor) near the top of your .bashrc after the import of the global definitions as shown:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# Source global definitions&amp;lt;br /&amp;gt;if [ -f /etc/bashrc ]; then&amp;lt;br /&amp;gt;	. /etc/bashrc&amp;lt;br /&amp;gt;fi&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit -s unlimited&amp;lt;br /&amp;gt;export MODULEPATH=/projects/dmcs_1/sw/modulefiles/Core:${MODULEPATH}&amp;lt;br /&amp;gt;export SQUEUE_FORMAT=&amp;quot;%.18i %.9P %.8j %.8u %.2t %.10M %.10l %.4C %.6D %R&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;# Automatically load the roms module&amp;lt;br /&amp;gt;module load roms&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
The line with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ulimit&amp;lt;/span&amp;gt; allows you to take full advantage of computing resources (may be obsolete now but it won&#039;t hurt anything). &lt;br /&gt;
&lt;br /&gt;
The first &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line will tell &#039;&#039;&#039;Lmod&#039;&#039;&#039; where to find the modules that will load the custom software. &lt;br /&gt;
&lt;br /&gt;
The second &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;export&amp;lt;/span&amp;gt; line makes the &#039;&#039;&#039;squeue&#039;&#039;&#039; command (explained later) more useful. &lt;br /&gt;
&lt;br /&gt;
The lines in &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt; are optional and will load the &#039;&#039;&#039;roms&#039;&#039;&#039; module automatically every time you login to &#039;&#039;Amarel&#039;&#039;. They must be &#039;&#039;&#039;after&#039;&#039;&#039; the line that sets the &#039;&#039;&#039;MODULEPATH&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Once you have added these lines, log out and back in for them to take effect.&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... then you may need to logout and login again so that .bashrc sets MODULEPATH as instructed above. If the error persists, you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Accessing the ROMS Source Code==&lt;br /&gt;
&lt;br /&gt;
===Register as a ROMS user===&lt;br /&gt;
If you are not already a ROMS user, you will need to fill out the registration form found [https://www.myroms.org/register here] and wait for approval. Once approved, you will be able to checkout the ROMS source code. It is highly recommended that you use the GitHub myroms repository to obtain the ROMS source code. The &#039;&#039;Subversion (SVN)&#039;&#039; repository is being phased out and will no longer be available after &#039;&#039;&#039;December 31, 2024&#039;&#039;&#039;. If you manage your own software projects using GitHub, the concepts for software version control may already be familiar to you.  Detailed directions can be found on the WikiROMS [[Git#Downloading_ROMS|Git]] page.&lt;br /&gt;
&lt;br /&gt;
===Checking out the ROMS source code===&lt;br /&gt;
There is nothing special about checking out the ROMS source code on &#039;&#039;Amarel&#039;&#039;. The git commands are the same as on any UNIX host. &lt;br /&gt;
Navigate to the directory where you want your ROMS source code to reside and execute this git checkout command:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git clone https://github.com/myroms/roms.git &amp;lt;my_src_dir&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
replacing &amp;lt;my_src_dir&amp;gt; with what you want the source code directory to be called.&lt;br /&gt;
&lt;br /&gt;
It will take a couple of minutes to download all of ROMS, but you only do this once. You will see the list of all the files being downloaded typed to your screen. &lt;br /&gt;
&lt;br /&gt;
Many users simply run this command from their home directory and use &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;&#039;&#039;&#039;myroms&#039;&#039;&#039;&amp;lt;/span&amp;gt; for &amp;lt;my_src_dir&amp;gt;, but the choice is yours depending on how you want to manage your &#039;&#039;Amarel&#039;&#039; space and how many ROMS projects you think you might end up working on.&lt;br /&gt;
&lt;br /&gt;
==Loading and Unloading Modules==&lt;br /&gt;
Like many clusters, &#039;&#039;Amarel&#039;&#039; uses environment modules to load and unload software and configure the environment. Some commands you will find useful are:&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&#039;&#039;&#039;module help&#039;&#039;&#039;               Display help message&amp;lt;br /&amp;gt;&#039;&#039;&#039;module help &amp;lt;m1&#039;&#039;&#039;&amp;gt;          Show help information for module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module available&#039;&#039;&#039;	  Show all modules currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module whatis &amp;lt;m1&amp;gt;&#039;&#039;&#039;        Show brief information about module &amp;lt;m1&amp;gt;&amp;lt;br /&amp;gt;&#039;&#039;&#039;module spider&#039;&#039;&#039;             List all possible modules even if not currently available&amp;lt;br /&amp;gt;&#039;&#039;&#039;module list&#039;&#039;&#039;               List currently loaded modules&amp;lt;br /&amp;gt;&#039;&#039;&#039;module load&#039;&#039;&#039;               Load the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module unload&#039;&#039;&#039;             Unload the specified module(s)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module swap &amp;lt;m1&amp;gt; &amp;lt;m2&amp;gt;&#039;&#039;&#039;     Unload &amp;lt;m1&amp;gt; and then load &amp;lt;m2&amp;gt; (for switching versions of the same software)&amp;lt;br /&amp;gt;&#039;&#039;&#039;module purge&#039;&#039;&#039;              Unload all loaded modules&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Loading the ROMS Module===&lt;br /&gt;
If you &#039;&#039;&#039;did not&#039;&#039;&#039; add the optional lines from the [[#Setting_up_your_.bashrc|Setting up your .bashrc]] section, you can easily set up your environment to compile and run ROMS by manually loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module.&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;module load roms&amp;lt;br /&amp;gt;module list&amp;lt;br /&amp;gt;Currently Loaded Modules:&amp;lt;br /&amp;gt;  1) intel/17.0.4     2) mvapich2/2.2      3) mct-roms/2.6.0   4) netcdf/4.6.2&amp;lt;br /&amp;gt;  5) esmf/8.0.0_nc4   6) parpack-roms/2.1  7) hdf5/1.10.4      8) roms/intel_nc4&amp;lt;/div&amp;gt;&lt;br /&gt;
Notice that loading the &#039;&#039;&#039;roms&#039;&#039;&#039; module will actually load 7 other modules. &lt;br /&gt;
&lt;br /&gt;
This will setup your environment to use the Intel compiler so remember to set &#039;&#039;&#039;FORT&#039;&#039;&#039; to &#039;&#039;&#039;ifort&#039;&#039;&#039; in your build script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}} &#039;&#039;&#039;Note:&#039;&#039;&#039; If you see the error ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Lmod has detected the following error:&amp;lt;/span&amp;gt;  The following module(s) are unknown: &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Please check the spelling or version number. Also try &amp;quot;module spider ...&amp;quot;&amp;lt;br /&amp;gt;It is also possible your cache file is out-of-date; it may help to try:&amp;lt;br /&amp;gt;  $ module --ignore_cache load &amp;quot;roms&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Also make sure that all modulefiles written in TCL start with the string #%Module&amp;lt;/div&amp;gt;&lt;br /&gt;
... you may not have been properly added to the &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; Linux group. To check if you are part of &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; type the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;id&amp;lt;/span&amp;gt;&#039;&#039;&#039; and if &#039;&#039;&#039;dmcs_1&#039;&#039;&#039; is not listed, let us know and we will get you added to the group.&lt;br /&gt;
&lt;br /&gt;
==Your project/coursework working directory space==&lt;br /&gt;
&lt;br /&gt;
We recommend you create a subdirectory of your home directory in which to work, so you can keep each ROMS project separate and organized.  &lt;br /&gt;
&lt;br /&gt;
You might call this &#039;&#039;&#039;working directory&#039;&#039;&#039; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;CoastalDynamics&amp;lt;/span&amp;gt;, or &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, or simply &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;cod&amp;lt;/span&amp;gt; (for coastal ocean dynamics). You will be typing this a lot, so keep it simple.&lt;br /&gt;
&lt;br /&gt;
To make a new directory called &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt;, enter this command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;mkdir Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Change to this working directory with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd Projects &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In instructions that follow, when we refer to your &#039;&#039;&#039;working directory&#039;&#039;&#039; we mean this workspace.&lt;br /&gt;
&lt;br /&gt;
==Configuring and Compiling ROMS==&lt;br /&gt;
You will compile and run ROMS in your project/coursework &#039;&#039;&#039;working directory&#039;&#039;&#039;, so change to that directory first.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cd &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;Projects&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running the build script &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; is the recommended method for compiling ROMS on &#039;&#039;Amarel&#039;&#039;. For any given project you will likely only need to change &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; to reset &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;ROMS_APPLICATION&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; and make sure &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;FORT&amp;lt;/span&amp;gt; is set to &#039;&#039;&#039;ifort&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{warning}} &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;It is important to make sure &#039;&#039;&#039;USE_MY_LIBS&#039;&#039;&#039; is set to &#039;&#039;no&#039;&#039; or your compilation will fail.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A template &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; script is in subdirectory &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; of &#039;&#039;&#039;&amp;lt;my_src_dir&amp;gt;&#039;&#039;&#039; that you created when you downloaded the code. For example, if you created &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; in your home directory the copy command would be&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Bin/build_roms.sh . &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now open &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;build_roms.sh&amp;lt;/span&amp;gt; with an editor (e.g. &#039;&#039;&#039;nano&#039;&#039;&#039;) and modify the line &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;MY_ROMS_SRC&amp;lt;/span&amp;gt; to point to your choice for &amp;lt;my_src_dir&amp;gt;. So, you will have something like ...&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export MY_ROMS_SRC=&amp;lt;/span&amp;gt;{$HOME}/&amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if the name you chose for &amp;lt;my_src_dir&amp;gt; was &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If this is your first time working with ROMS, a good starting place is to compile the default UPWELLING test case that is indicated in build_roms.sh with the default setting &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;export ROMS_APPLICATION&amp;lt;/span&amp;gt;=UPWELLING.  &lt;br /&gt;
&lt;br /&gt;
To compile the UPWELLING example, you need to copy the configuration file &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;upwelling.h&amp;lt;/span&amp;gt; to your working directory. This is in subdirectory &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; of your source code. For example, the command might be:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/Include/upwelling.h .&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once your build script is configured and you have upwelling.h in your working directory you can compile ROMS by typing:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;./build_roms.sh -j 4&amp;lt;/div&amp;gt;&lt;br /&gt;
where the number after -j indicates the number of compute cores to use in parallel to execute the compilation. The greater the number, the faster it goes.&lt;br /&gt;
&lt;br /&gt;
However, the login node you will be compiling on is shared for the entire &#039;&#039;Amarel&#039;&#039; system. If you use a number larger than &#039;&#039;&#039;4&#039;&#039;&#039;, or omit it altogether (which says use &#039;&#039;all&#039;&#039; cores on the login node) your build might be terminated by an administrator. Be a considerate user and keep the number low.&lt;br /&gt;
&lt;br /&gt;
If compilation is processing successfully you will see a lot of information typed t your screen as each component of the source code is compiled. It will take a minute or so to complete.&lt;br /&gt;
&lt;br /&gt;
If compilation ends quickly with errors like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ ./build_roms.sh -j 4 &amp;lt;/br&amp;gt;rm -f -r core *.ipo /home/jwilkin/cod/Projects/Build_roms...&amp;lt;/br&amp;gt;which: &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;no mpif90&amp;lt;/span&amp;gt; in (/usr/lpp/mmfs/bin:/usr/local/bin:/us...&amp;lt;/br&amp;gt;cp -f /opt/intelsoft/serial/netcdf3/include/netcdf.mod /h...&amp;lt;/br&amp;gt;cp: cannot stat ‘/opt/intelsofo... No such file or directory&amp;lt;/br&amp;gt;make: *** No rule to make target netcdf.mod needed by ... Stop. &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
... this means you have not run the &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;module load roms&amp;lt;/span&amp;gt; command. Go back to the notes on [[Amarel#Loading_the_ROMS_Module]].&lt;br /&gt;
&lt;br /&gt;
If compilation was successful, there will be a file named &#039;&#039;&#039;romsM&#039;&#039;&#039; that is the model executable. You can check for the file with this command:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see: &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;forestGreen&amp;quot;&amp;gt;build_roms.sh romsM&amp;lt;/span&amp;gt; upwelling.h &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;Build_roms&amp;lt;/span&amp;gt; is a folder that build_roms.sh created to hold all the temporary files that the FORTRAN compilation process makes to combine into the romsM executable file&lt;br /&gt;
&lt;br /&gt;
==Running on the Amarel Compute Nodes==&lt;br /&gt;
When you &#039;&#039;&#039;ssh&#039;&#039;&#039; to &#039;&#039;Amarel&#039;&#039; you are connected to one of the login nodes. These nodes are to be used for file editing, transfering output and input files to/from your local computer, and modest code compiling tasks and analysis, but not for compute intensive tasks. Here we explain how to connect to the compute nodes for these larger tasks.&lt;br /&gt;
&lt;br /&gt;
Note: Consult the Amarel status page (https://oarc.rutgers.edu/amarel-system-status/) before scheduling a job. Amarel is down for maintenance monthly. &lt;br /&gt;
&lt;br /&gt;
===What &#039;&#039;partitions&#039;&#039; can you run on?===&lt;br /&gt;
&lt;br /&gt;
Access to Amarel resources is controlled by &#039;&#039;partitions&#039;&#039;. You can find out the partitions you have permission to access with the command&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;sinfo -s&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will show the partitions that everyone has access to. See the cluster guide [https://sites.google.com/view/cluster-user-guide#h.oeejy9yf80e4 entry on partitions] for an explanation of these. &lt;br /&gt;
&lt;br /&gt;
If you belong to a research group that own a partition you should also see that listed, for example &#039;&#039;&#039;p_omg_1&#039;&#039;&#039; for the Ocean Modeling Group. This is the partition you want to use most of the time as your job will not get pre-empted by other owner users.&lt;br /&gt;
&lt;br /&gt;
===Using the SLURM batch job scheduler===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Amarel&#039;&#039; uses SLURM workload manager to schedule compute intensive tasks. The user configures a SLURM job script for each model run and submits this script with the &#039;&#039;&#039;sbatch&#039;&#039;&#039; command. The job script declares the resources required, such as number of CPUs for parallel jobs, maximum memory required, etc.&lt;br /&gt;
&lt;br /&gt;
We have configured a simple template job script (for the ROMS UPWELLING example) that you can copy from &#039;&#039;&#039;/projects/dmcs_1/courses/job.sh&#039;&#039;&#039; into your working directory. &lt;br /&gt;
&lt;br /&gt;
The UNIX command to copy a file is &#039;&#039;&#039;cp source_file target_file&#039;&#039;&#039;. So, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp /projects/dmcs_1/courses/job.sh .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses a &#039;&#039;dot&#039;&#039; (&#039;&#039;&#039;.&#039;&#039;&#039;) for the target_file, which causes the source_file (job.sh) to be copied to the present working directory without changing its name.&lt;br /&gt;
&lt;br /&gt;
When typing this, or any, UNIX command, you can start typing just the beginning few characters of the path then press TAB to autocomplete the filename. If the completion is ambiguous, you can continue typing more characters and press TAB again. Pressing TAB twice in a row will show you the set of possible completions. This trick can save you a lot of tedious (mis)typing.&lt;br /&gt;
&lt;br /&gt;
The contents of &#039;&#039;&#039;job.sh&#039;&#039;&#039; are shown below:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#!/bin/bash&amp;lt;br &amp;gt;#SBATCH --partition=p_omg_1             # Partition. If you are not a member of OMG enter your own partition&amp;lt;br /&amp;gt;#SBATCH --job-name=upwelling            # Assign a short name to your job&amp;lt;br/&amp;gt;#SBATCH --nodes=1                       # Number of nodes you require&amp;lt;br /&amp;gt;#SBATCH --ntasks=4                      # Total number of tasks you&#039;ll launch&amp;lt;br /&amp;gt;#SBATCH --ntasks-per-node=4             # Number of tasks you&#039;ll launch on each node&amp;lt;br /&amp;gt;#SBATCH --cpus-per-task=1               # Cores per task (&amp;gt;1 if multithread tasks)&amp;lt;br /&amp;gt;#SBATCH --mem=6400                      # Real memory (RAM) required (MB) per node&amp;lt;br /&amp;gt;#SBATCH --time=00-00:05                 # Total run time limit (DD-HH:MM)&amp;lt;br /&amp;gt;#SBATCH --output=out.%N.%j              # STDOUT output file&amp;lt;br /&amp;gt;#SBATCH --error=err.%N.%j               # STDERR output file (optional but recommended)&amp;lt;br /&amp;gt;#SBATCH --export=ALL                    # Export you current env to the job env&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;## It is important to have --mpi=pmi2 here or ROMS will not run&amp;lt;br /&amp;gt;srun --mpi=pmi2 ./romsM roms_upwelling.in&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The maximum run time is 14-00:00 (14 days). It is tempting to set this to the maximum in order to avoid a job ending too early. (i.e. Slurm stopping a ROMS run before it is finished) However, if there is maintenance scheduled during that time period the job will not start until maintenance is complete. So a runtime as close as possible to the actual run time is recommended.&lt;br /&gt;
&lt;br /&gt;
====Requesting a specific class of compute node====&lt;br /&gt;
&lt;br /&gt;
For large jobs it makes sense to use all available cores on a node, and for low priority jobs to use older less fast nodes. You can do this by requesting a specific node number, but it is better to request a particular class of nodes so you don&#039;t unwittingly pick a node already in use. The classes available from oldest to newest nodes are:&lt;br /&gt;
&lt;br /&gt;
# skylake (32 cores) (Phase I nodes) (nodes hal0116 through hal0120)&lt;br /&gt;
# cascadelake (40 cores) (Phase II nodes) (nodes hal0159 through hal0163)&lt;br /&gt;
# icelake (64 cores) (Phase V.B nodes) (nodes hal0299 through hal0302)&lt;br /&gt;
&lt;br /&gt;
Make the node class request in the SLURM script and choose the maximum number of cores to match, e.g.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;#SBATCH --constraint=cascadelake               # Run on Phase II nodes (40 cores) &amp;lt;br&amp;gt;#SBATCH --ntasks=40                            # Total number of tasks to launch (like -np to mpirun) &amp;lt;br&amp;gt;#SBATCH --ntasks-per-node=40                   # Number of tasks to launch on each node&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don&#039;t specifically request a class of nodes the SLURM scheduler will make its own choice on the most appropriate resources to use given your request. We don&#039;t know the basis of that choice. &lt;br /&gt;
&lt;br /&gt;
If you request a class of node that is fully assigned to other users in your partition, your job will wait for the others users jobs to complete. So, coordinate with your colleagues if resource use is at a premium. You can use the &#039;&#039;&#039;squeue -p partition_name&#039;&#039;&#039; command to see what resources are being used by other users, e.g. &lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;$ squeue -p p_omg_1 &amp;lt;br&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON) &amp;lt;br&amp;gt;   26975473    p_omg_1                  fwd   levinj  R     17:15:42  14-00:00:00   80      2 hal[0159,0162]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the ROMS Upwelling Example===&lt;br /&gt;
You may have noticed that the srun command above includes a file named &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt;. You will need to copy this file and &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;varinfo.dat&amp;lt;/span&amp;gt; from the ROMS/External directory of your &amp;lt;my_src_dir&amp;gt; ROMS source code to the directory where you compiled ROMS. &lt;br /&gt;
&lt;br /&gt;
If, for example, you chose &#039;&#039;&#039;myroms&#039;&#039;&#039; as the name of your &amp;lt;my_src_dir&amp;gt; when you downloaded the code, you would enter&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;cp ~/myroms/ROMS/External/roms_upwelling.in .&amp;lt;/div&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
The syntax here uses &#039;&#039;tilde&#039;&#039; (~) as shorthand for your home directory,&lt;br /&gt;
&lt;br /&gt;
After you copy the files, you will need to make a couple of small edits (using e.g. &#039;&#039;&#039;nano&#039;&#039;&#039;) to &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_upwelling.in&amp;lt;/span&amp;gt; to get this to work. &lt;br /&gt;
&lt;br /&gt;
# Change the line with VARNAME to read &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;VARNAME = varinfo.dat&amp;lt;/span&amp;gt; (i.e. delete the ROMS/External part)&lt;br /&gt;
# Set &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileI == 2&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;sandyBrown&amp;quot;&amp;gt;NtileJ == 2&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The product of NtileI and NtileJ, i.e. 2 x 2 = 4, is the number of cores the model will run on in parallel. This number must match the number in the SLURM job script options &#039;&#039;&#039;--ntasks&#039;&#039;&#039; and &#039;&#039;&#039;--ntasks-per-node&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Now you can submit your job to &#039;&#039;&#039;sbatch&#039;&#039;&#039; with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;sbatch job.sh&amp;lt;/span&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===ROMS configurations for &#039;&#039;Coastal Ocean Dynamics&#039;&#039; class===&lt;br /&gt;
The files that will configure the examples we will study in class will be located in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/courses/cod&amp;lt;/span&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
You will find instructions for configuring and running the examples at a separate Wiki page [[COD_Class_Examples]]&lt;br /&gt;
&lt;br /&gt;
===Checking Job Status with squeue===&lt;br /&gt;
Detailed documentation for monitoring your SLURM jobs can be found [https://sites.google.com/view/cluster-user-guide#h.4bsndqufii8p here]. The easiest way to check whether your job is running is with the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;squeue -p p_omg_1&amp;lt;/span&amp;gt;&#039;&#039;&#039; (or your own partition name if it is not p_omg_1). &lt;br /&gt;
&lt;br /&gt;
You should see output something like this:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;      JOBID  PARTITION                 NAME     USER ST         TIME   TIME_LIMIT CPUS  NODES NODELIST(REASON)&amp;lt;br /&amp;gt;   17197219     dmcs_1            watl_psas   rjdave  R   3-04:07:00   3-20:00:00    4      1 hal0035&amp;lt;br /&amp;gt;   17146609     dmcs_1            upwelling   rjdave  R     00:01:10     00:05:00    4      1 hal0035&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the job is running (the ‘R’ under ‘ST’), has been running for 1 minute, 10 seconds, and is running on node 35.&lt;br /&gt;
&lt;br /&gt;
===Checking Progress with tail===&lt;br /&gt;
You can check ROMS progress by using the tail command on the &#039;&#039;&#039;output&#039;&#039;&#039; file. For the upwelling job above the file would be called &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; so the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039; will show you the most recent 10 lines written to the output log and will most likely tell you what time-step the model is on. Using the -f option (&#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;tail -f out.hal0035.17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;) will output appended data as the file grows. Ctrl-C will escape the display.&lt;br /&gt;
&lt;br /&gt;
===Did my UPWELLING job run?===&lt;br /&gt;
If the UPWELLING test case was successful there should be an output log file named something like &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;out.hal0035.17146609&amp;lt;/span&amp;gt; that shows no errors, and there should be 4 output NetCDF files ...&lt;br /&gt;
:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;ls -l *.nc &amp;lt;/br&amp;gt;roms_avg.nc &amp;lt;/br&amp;gt;roms_dia.nc &amp;lt;/br&amp;gt;roms_his.nc &amp;lt;/br&amp;gt;roms_rst.nc &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cancelling a Job===&lt;br /&gt;
To safest way cancel a queued or running job is to use its jobid. A job can be canceled by name but that is not recommended. To cancel the upwelling job in the example above you would issue the command &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;scancel 17146609&amp;lt;/span&amp;gt;&#039;&#039;&#039;. If the job has not yet started, it will be removed from the queue. If it is running, all child processes will be killed and the job will be removed from the queue. You are only able cancel jobs that you own.&lt;br /&gt;
&lt;br /&gt;
===Running an interactive session on a compute node===&lt;br /&gt;
It is possible to conduct your work interactively on one of the compute nodes (instead of the login node). For most work we will be doing in class this is not necessary, but if for some reason you have a job that needs many processors or a large amount of memory, and you want to run it interactively - say, to simply check that everything is in order for it to start correctly - there are instructions in the Cluster User Guide [https://sites.google.com/view/cluster-user-guide#h.26x9sbburvsg here].&lt;br /&gt;
&lt;br /&gt;
For compute intensive interactive work, such as model analysis using Python or MATLAB, we recommend using the OnDemand interface to launch an interactive session on a set of compute nodes.&lt;br /&gt;
&lt;br /&gt;
==Using the OnDemand desktop environment==&lt;br /&gt;
The &#039;&#039;&#039;OnDemand&#039;&#039;&#039; service allows you to connect to &#039;&#039;Amarel&#039;&#039; using a graphical desktop environment in a web browser. One of the most useful features of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that it allows you to analyze model output by Python or Matlab on the cluster compute nodes. &lt;br /&gt;
&lt;br /&gt;
You need to be running a Rutgers VPN to use OnDemand. &lt;br /&gt;
&lt;br /&gt;
Navigate your browser to https://ondemand.hpc.rutgers.edu/pun/sys/dashboard and login with your NetID and password. At the top of the page click &#039;&#039;&#039;Interactive Apps&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Python Jupyter notebook:===&lt;br /&gt;
# Select &#039;&#039;&#039;Personal Jupyter&#039;&#039;&#039; from the list on the left&lt;br /&gt;
# Make your selections for &#039;&#039;&#039;number of hours&#039;&#039;&#039; your session can remain active (e.g. 3 hours), the &#039;&#039;&#039;number of cores&#039;&#039;&#039; to run on (1), and &#039;&#039;&#039;memory&#039;&#039;&#039; (8 GB is an OK choice)&lt;br /&gt;
# For &#039;&#039;Partition&#039;&#039; enter e.g. &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; if you are in OMG. Leave &#039;&#039;Reservation&#039;&#039; and &#039;&#039;Slurm feature&#039;&#039; blank. For &#039;&#039;conda path&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/miniconda3&amp;lt;/span&amp;gt; and for &#039;&#039;conda environment&#039;&#039; enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/xroms/py38&amp;lt;/span&amp;gt;. Click [[Media:Amarel Jupyter config.png | here]] to see what the completed launch page looks like.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# You should see sub-window of the web page like this &amp;lt;/br&amp;gt; [[Image:JupyterStarting.png|600px]] &amp;lt;/br&amp;gt;&amp;lt;/br&amp;gt;When the session is ready it changes to this: &amp;lt;/br&amp;gt; [[Image:JupyterRunning.png|600px]]&lt;br /&gt;
# Start your notebook by clicking the &#039;&#039;&#039;Connect to Jupyter, Anaconda version 5.1.0&#039;&#039;&#039; button: (If this does not appear, check that you correctly entered the &#039;&#039;&#039;conda path&#039;&#039;&#039; and &#039;&#039;&#039;conda environment&#039;&#039;&#039; at step 3 above.) &amp;lt;/br&amp;gt;[[Image:JupyterConnect.png|400px]]&lt;br /&gt;
# This should place you in a file browse window from which you can navigate to one of your existing Jupyter notebooks, or, to start a new Untitled notebook, select &#039;&#039;Python 3 (ipykernel)&#039;&#039; from the &#039;&#039;New&#039;&#039; pull-down menu on the right side of the page [[Image:NewPythonNotebook.png]]&lt;br /&gt;
# Once your notebook is running, you can import the xroms package as you would any other toolbox, by entering &#039;&#039;&#039;&amp;lt;span style=&amp;quot;font-family: monospace;&amp;quot;&amp;gt;import xroms&amp;lt;/span&amp;gt;&#039;&#039;&#039; then hold down the shift key and hit the return/enter key. You will see an asterisk [&#039;&#039;&#039;*&#039;&#039;&#039;] in the square brackets.&lt;br /&gt;
# Once that asterisk changes to a &#039;&#039;&#039;1&#039;&#039;&#039;, the xroms python module has been loaded.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;conda&#039;&#039;&#039; environment built for DMCS_1 makes available many of the Python modules you are used to using.&lt;br /&gt;
&lt;br /&gt;
===Matlab:===&lt;br /&gt;
# Select MATLAB from the list on the left &lt;br /&gt;
# As for Step 2 above for Python, choose time, cores, and memory&lt;br /&gt;
# Select MATLAB version, and enter &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;p_omg_1&amp;lt;/span&amp;gt; (or your own group name) in partition.&lt;br /&gt;
# Click &#039;&#039;&#039;Launch&#039;&#039;&#039; and wait. This can take a couple minutes.&lt;br /&gt;
# Once the &#039;&#039;&#039;Launch noVNC in New Tab&#039;&#039;&#039; button appears, click it and a MatLab GUI will open.&lt;br /&gt;
&lt;br /&gt;
You are running in a graphical desktop environment, so by default Matlab will look in Documents/MATLAB/startup.m for your personal Matlab configuration file. &lt;br /&gt;
&lt;br /&gt;
Popular MATLAB utilities for working with ROMS output are in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;/projects/dmcs_1/sw/packages/matlab-tools&amp;lt;/span&amp;gt;. These include the myroms.org utilities in subdirectory &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;myroms&amp;lt;/span&amp;gt;, and John Wilkin&#039;s toolbox in &amp;lt;span class=&amp;quot;blue&amp;quot;&amp;gt;roms_wilkin&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Reconnecting to an interactive session===&lt;br /&gt;
A particularly nifty feature of &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is that your interactive session is independent of the browser window instance. &lt;br /&gt;
&lt;br /&gt;
Say you are working on your office computer using a Jupyter notebook via &#039;&#039;&#039;OnDemand&#039;&#039;&#039; but haven&#039;t finished all you want to do by the end of the day. If you leave that session running, you can go home and connect once again to &#039;&#039;&#039;OnDemand&#039;&#039;&#039; and you will see your session in the list of Interactive Sessions. Launch that session and you will be placed right back where you were. &#039;&#039;&#039;OnDemand&#039;&#039;&#039; is simply a web interface to code running on &#039;&#039;Amarel&#039;&#039;, so you can connect from any browser. &lt;br /&gt;
&lt;br /&gt;
Of course, this only works if you selected a &#039;&#039;&#039;number of hours&#039;&#039;&#039; in Step 2 above that will allow your session to remain open. &lt;br /&gt;
&lt;br /&gt;
As long as the session is active the &#039;&#039;Amarel&#039;&#039; resources (cores and memory) are reserved for you and no one else. So, be respectful of other users and close out an interactive session once you are done.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=makefile&amp;diff=6597</id>
		<title>makefile</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=makefile&amp;diff=6597"/>
		<updated>2023-12-01T14:40:29Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;makefile&amp;lt;/div&amp;gt;&lt;br /&gt;
{{warning}}&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;Warning: Do not edit the &#039;&#039;&#039;makefile&#039;&#039;&#039;! Use the [[build Script]].&amp;lt;/span&amp;gt; This page is for informational purposes only and is not a guide for compiling ROMS source code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ROMS has a single &#039;&#039;&#039;makefile&#039;&#039;&#039; located in the top-level directory. Its generic structure facilitates the compiling of ROMS with other coupled models. The user usually needs to check/modify a few definitions in the &#039;&#039;&#039;makefile&#039;&#039;&#039; or the [[build Script]] before compiling a particular application. The list of the user options is given below.&lt;br /&gt;
&lt;br /&gt;
This &#039;&#039;&#039;makefile&#039;&#039;&#039; builds the compiled objects in the specified scratch directory. It determines the compiling depedencies using the [[sfmakedepend]] script located in the &#039;&#039;&#039;ROMS/Bin&#039;&#039;&#039; directory. Notice that the &#039;&#039;&#039;makefile&#039;&#039;&#039; time modification in your computer is used by &#039;&#039;&#039;make&#039;&#039;&#039; to check if the dependencies need to be updated. If you set the definitions below through a [[build Script]], you need to execute &#039;&#039;&#039;make clean&#039;&#039;&#039; whenever changes to the user options are made.&lt;br /&gt;
&lt;br /&gt;
All the other gory details of the &#039;&#039;&#039;makefile&#039;&#039;&#039; are covered in [[gmake]].&lt;br /&gt;
&lt;br /&gt;
==Environment Variables in the &#039;&#039;&#039;makefile&#039;&#039;&#039;==&lt;br /&gt;
&lt;br /&gt;
ROMS has a growing list of choices the user must make about the  compilation before starting the compile process, set in user-defined variables. Since we now use &#039;&#039;&#039;gnu make&#039;&#039;&#039;, it is possible to set the value of these variables in the Unix environment, rather than necessarily inside the &#039;&#039;&#039;Makefile&#039;&#039;&#039; (see [[gmake]]). The user-definable variables understood by the ROMS &#039;&#039;&#039;makefile&#039;&#039;&#039; are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=ROMS_APPLICATION /&amp;gt;;&amp;lt;span id=&amp;quot;ROMS_APPLICATION&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[ROMS_APPLICATION]]&lt;br /&gt;
:CPP option defining a particular application (for example, [[UPWELLING]]). The makefile will include its associated header file which is located in either the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory or the path specified in the [[MY_HEADER_DIR]] definition. The header file name is the lowercase value of [[ROMS_APPLICATION]] with the &#039;&#039;&#039;.h&#039;&#039;&#039; extension (for example, [[upwelling.h]]). Recall the CPP option defining an application must be unique.&amp;lt;section end=ROMS_APPLICATION /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_HEADER_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_HEADER_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_HEADER_DIR]]&lt;br /&gt;
: Application header file &#039;&#039;&#039;full&#039;&#039;&#039; directory path. Recall that a ROMS header file contains all the CPP options defining a particular application. This is the header file that it is included in [[cppdefs.h]]. Notice that if the header file is located in the &#039;&#039;&#039;ROMS/Include&#039;&#039;&#039; directory, it is possible to include the same header file name located somewhere else because the full directory path is specified here. The user may copy the distributed header file(s) into a different directory and modify it to explore different CPP options.&amp;lt;section end=MY_HEADER_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_ANALYTICAL_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;MY_ANALYTICAL_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_ANALYTICAL_DIR]]&lt;br /&gt;
: Directory containing the user&#039;s [[Functionals | analytic files]], if any. Templates of the analytic expressions are provided in the &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; directory. If analytic expressions are activated, the makefile will load first the ones located in [[MY_ANALYTICAL_DIR]] and then the ones located in &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039;. We recommended that you do not modify the analytical expressions in the &#039;&#039;&#039;ROMS/Functionals&#039;&#039;&#039; directory since these are the official version of these files and updates will fight with your changes.  The user however can modify those in &#039;&#039;&#039;User/Functionals&#039;&#039;&#039; or some other directory and specify which directory with this variable.&amp;lt;section end=MY_ANALYTICAL_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=MY_CPP_FLAGS /&amp;gt;;&amp;lt;span id=&amp;quot;MY_CPP_FLAGS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[MY_CPP_FLAGS]]&lt;br /&gt;
: Additional CPP options to activate.  Sometimes it is desirable to activate one or more CPP options to run different variants of the same application without modifying its header file. If this is the case, specify such options here using the &#039;&#039;&#039;-D&#039;&#039;&#039; syntax. For example, to write out time-averaged NetCDF file use &#039;&#039;&#039;-D&#039;&#039;&#039;[[AVERAGES]].&amp;lt;section end=MY_CPP_FLAGS /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NestedGrids /&amp;gt;;&amp;lt;span id=&amp;quot;NestedGrids&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NestedGrids]]&lt;br /&gt;
: Number of ROMS nested and/or composed grids, usually 1.&amp;lt;section end=NestedGrids /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compiler-Specific Options===&lt;br /&gt;
&lt;br /&gt;
These flags are used by the files inside the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_DEBUG /&amp;gt;;&amp;lt;span id=&amp;quot;USE_DEBUG&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_DEBUG]]&lt;br /&gt;
: Used to turn on symbolic debug information with no optimization. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_DEBUG /&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;section begin=USE_MPI /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPI&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPI]]&lt;br /&gt;
:  Used to turn on distributed-memory parallelization in ROMS and linking to the [http://www.llnl.gov/computing/tutorials/mpi/ Message Passing Interface (MPI)] library. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_MPI /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_MPIF90 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_MPIF90&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_MPIF90]]&lt;br /&gt;
: Used to turn on the [http://www-unix.mcs.anl.gov/mpi/mpich1 MPICH] implementation of MPI via the compilation script &#039;&#039;&#039;mpif90&#039;&#039;&#039; which is  required in some Linux operating systems without a native MPI library (&#039;&#039;&#039;-lmpi&#039;&#039;&#039;). This definition macro is also convenient when there are several Fortran-90 compilers (&#039;&#039;&#039;ifort&#039;&#039;&#039;, &#039;&#039;&#039;pgf90&#039;&#039;&#039;, &#039;&#039;&#039;pathf90&#039;&#039;&#039;) in the system that use the &#039;&#039;&#039;mpif90&#039;&#039;&#039; compilation command. In this case, the user needs turn on both &#039;&#039;&#039;MPI&#039;&#039;&#039; and &#039;&#039;&#039;MPIF90&#039;&#039;&#039; definitions and specify the appropriate Fortran-90 compiler in &#039;&#039;&#039;FORT&#039;&#039;&#039; macro definition. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_MPIF90 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_OPENMP /&amp;gt;;&amp;lt;span id=&amp;quot;USE_OPENMP&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_OPENMP]]&lt;br /&gt;
: Used to turn on shared-memory parallelization in ROMS using the [http://www.llnl.gov/computing/tutorials/openMP/ OpenMP] compiler directives. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_OPENMP /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_LARGE /&amp;gt;;&amp;lt;span id=&amp;quot;USE_LARGE&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_LARGE]]&lt;br /&gt;
: Used to turn on 64-bit floating-point number precision. Set it to &#039;&#039;&#039;on&#039;&#039;&#039; or leave it blank.&amp;lt;section end=USE_LARGE /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NETCDF_INCDIR /&amp;gt;;&amp;lt;span id=&amp;quot;NETCDF_INCDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NETCDF_INCDIR]]&lt;br /&gt;
: The location of the &#039;&#039;&#039;netcdf.mod&#039;&#039;&#039; and &#039;&#039;&#039;typesizes.mod&#039;&#039;&#039; files from [http://www.unidata.ucar.edu/software/netcdf/ NetCDF].&amp;lt;section end=NETCDF_INCDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=NETCDF_LIBDIR /&amp;gt;;&amp;lt;span id=&amp;quot;NETCDF_LIBDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[NETCDF_LIBDIR]]&lt;br /&gt;
: The location of the [http://www.unidata.ucar.edu/software/netcdf/ NetCDF] library.&amp;lt;section end=NETCDF_LIBDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=USE_NETCDF4 /&amp;gt;;&amp;lt;span id=&amp;quot;USE_NETCDF4&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[USE_NETCDF4]]&lt;br /&gt;
: Set this to &#039;&#039;&#039;on&#039;&#039;&#039; if linking against the NetCDF4 library, which needs the [http://hdfgroup.com/HDF5/ HDF5] library and therefore:&amp;lt;section end=USE_NETCDF4 /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=HDF5_LIBDIR /&amp;gt;;&amp;lt;span id=&amp;quot;HDF5_LIBDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[HDF5_LIBDIR]]&lt;br /&gt;
: The location of the [http://hdfgroup.com/HDF5/ HDF5] library.&amp;lt;section end=HDF5_LIBDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=FORT /&amp;gt;;&amp;lt;span id=&amp;quot;FORT&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[FORT]]&lt;br /&gt;
The user also needs to specify the appropriate Fortran-90 compiler to use.  The name of the Fortran-90 compiler depends on the operating system (see table below). This name is also used to determine the compiling configuration file to include in the &#039;&#039;&#039;makefile&#039;&#039;&#039; by concatenating the operating system (&#039;&#039;&#039;uname -s&#039;&#039;&#039;) and the chosen compiler name.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! Operating System&lt;br /&gt;
! Compiler(s)&lt;br /&gt;
|-&lt;br /&gt;
| AIX&lt;br /&gt;
| &#039;&#039;&#039;xlf&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ALPHA&lt;br /&gt;
| &#039;&#039;&#039;f90&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| CYGWIN&lt;br /&gt;
| &#039;&#039;&#039;g95&#039;&#039;&#039;, &#039;&#039;&#039;df&#039;&#039;&#039;, &#039;&#039;&#039;ifort&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Darwin&lt;br /&gt;
| &#039;&#039;&#039;f90&#039;&#039;&#039;, &#039;&#039;&#039;gfortran&#039;&#039;&#039;, &#039;&#039;&#039;xlf&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Linux&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;, &#039;&#039;&#039;ifc&#039;&#039;&#039;, &#039;&#039;&#039;ifort&#039;&#039;&#039;, &#039;&#039;&#039;pgi&#039;&#039;&#039;, &#039;&#039;&#039;path&#039;&#039;&#039;, &#039;&#039;&#039;g95&#039;&#039;&#039;, &#039;&#039;&#039;gfortran&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SunOS&lt;br /&gt;
| &#039;&#039;&#039;f95&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| SunOS/Linus&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| UNICOS-mp&lt;br /&gt;
| &#039;&#039;&#039;ftn&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that others can be added as needed, using the existing files as templates.&amp;lt;section end=FORT /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Local File Options===&lt;br /&gt;
&amp;lt;section begin=BINDIR /&amp;gt;;&amp;lt;span id=&amp;quot;BINDIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[BINDIR]]&lt;br /&gt;
: Directory path for the compiled executable.&amp;lt;section end=BINDIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section begin=SCRATCH_DIR /&amp;gt;;&amp;lt;span id=&amp;quot;SCRATCH_DIR&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;[[SCRATCH_DIR]]&lt;br /&gt;
: Directory for &#039;&#039;&#039;make&#039;&#039;&#039; temporary objects. By default it is set to &#039;&#039;&#039;Build&#039;&#039;&#039;. If building several projects simultaneously, you need to specify different values for each project.  Otherwise, you will compile the wrong files. This directory and the files within are removed when executing a &#039;&#039;&#039;make clean&#039;&#039;&#039;.&amp;lt;section end=SCRATCH_DIR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Providing the Environment==&lt;br /&gt;
&lt;br /&gt;
Before compiling, you will need to find out some background information:&lt;br /&gt;
#What is the name of your compiler?&lt;br /&gt;
#What is returned by &#039;&#039;&#039;uname -s&#039;&#039;&#039; on your system?&lt;br /&gt;
#Is there a working NetCDF library?&lt;br /&gt;
#Where is it?&lt;br /&gt;
#Was it built with the above compiler?&lt;br /&gt;
#Do you have access to MPI or OpenMP?&lt;br /&gt;
As described more fully in [[gmake]], the &#039;&#039;&#039;makefile&#039;&#039;&#039; will be looking for a file in the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory with the combination of your operating system and your compiler. For instance, using Linux and the Pathscale compiler, the file would be called &#039;&#039;&#039;Linux-path.mk&#039;&#039;&#039;. Is the corresponding file for your system and compiler in the &#039;&#039;&#039;Compilers&#039;&#039;&#039; directory? If not, you will have to create it following the existing examples there.&lt;br /&gt;
&lt;br /&gt;
Next, there are two ways to provide the location for the NetCDF files (and optional HDF5 library). One is by editing the corresponding lines in your system-compiler file. Another way is through the Unix environment variables. If you are always going to be using the same compiler on each system, you can edit your &#039;&#039;&#039;.profile&#039;&#039;&#039; or &#039;&#039;&#039;.login&#039;&#039;&#039; files to globally set them. Here is an example for &#039;&#039;&#039;tcsh&#039;&#039;&#039;:&lt;br /&gt;
  setenv NETCDF_INCDIR /usr/local/netcdf4/include&lt;br /&gt;
  setenv NETCDF_LIBDIR /usr/local/netcdf4/lib&lt;br /&gt;
  setenv HDF5_LIBDIR /usr/local/hdf5/lib&lt;br /&gt;
The &#039;&#039;&#039;ksh/bash&#039;&#039;&#039; equivalent is:&lt;br /&gt;
  export NETCDF_INCDIR=/usr/local/netcdf4/include&lt;br /&gt;
  export NETCDF_LIBDIR=/usr/local/netcdf4/lib&lt;br /&gt;
  export HDF5_LIBDIR=/usr/local/hdf5/lib&lt;br /&gt;
&lt;br /&gt;
For the rest, move on to [[build Script]].&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6596</id>
		<title>Git</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Git&amp;diff=6596"/>
		<updated>2023-10-12T16:25:06Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Git&amp;lt;/div&amp;gt;&lt;br /&gt;
ROMS source code is distributed using both [https://git-scm.com Git] and [https://subversion.apache.org Subversion](SVN). The Git repository includes the full history of changes to the ROMS source code. Details on using Subversion can be found [[Subversion|here]]. There are command line and GUI Git clients available for nearly every operating system and a list of popular clients can be found [https://git-scm.com/downloads/guis here]. This page will help you get started with downloading ROMS with Git.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{note}}&#039;&#039;&#039;Note:&#039;&#039;&#039; For instructions using the deprecated and soon to be discontinued myroms.org git repository, click [[Talk:Git|here]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Git Overview==&lt;br /&gt;
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. All the ROMS/TOMS files are stored in a Git repository on &#039;&#039;&#039;github.com&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
This Git repository is the official version of the code which only the developers are allowed to change. Users should download the ROMS code to their local machines using a &#039;&#039;&#039;git client&#039;&#039;&#039;.  Don&#039;t attempt to use a regular web browser to browse or download files from the Git repository - there are much better tools for interacting with the code repository.&lt;br /&gt;
&lt;br /&gt;
We strongly recommend users always check out the current &#039;&#039;develop&#039;&#039; version since this has the most recent updates and bug fixes. The &#039;&#039;tags&#039;&#039; are kept largely as a historical record of stable releases at the conclusion of major code upgrades.&lt;br /&gt;
&lt;br /&gt;
If you are making changes of your own, keep them in a separate branch, leaving the &#039;&#039;develop&#039;&#039; branch to track changes from the source. Git makes it &#039;&#039;so&#039;&#039; much easier to manage your own modifications than svn for those of us without write permission on the repository.&lt;br /&gt;
&lt;br /&gt;
Below is a general description of how Git works. Please look at the [https://git-scm.com/book/en/v2 Pro Git] book for more detailed information. We have not yet tried any GUI clients but may add brief how-tos for the most popular GUIs at a later date.&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading any of &#039;&#039;&#039;ROMS&#039;&#039;&#039; repositories, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading some &#039;&#039;&#039;&#039;&#039;roms_test&#039;&#039;&#039;&#039;&#039; input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;more ~/.gitconf&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;   [User]&amp;lt;br /&amp;gt;        name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;        email = your@email&amp;lt;br /&amp;gt;   [credential]&amp;lt;br /&amp;gt;        helper = cache --timeout=7200&amp;lt;br /&amp;gt;        helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;   [filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;        clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;        smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;        process = git-lfs filter-process&amp;lt;br /&amp;gt;        required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS==&lt;br /&gt;
{{warning}}&#039;&#039;&#039;WARNING:&#039;&#039;&#039; It is strongly suggested that you clone the ROMS source code using the same operating system you wish to compile and run ROMS on. If you download the code on a Windows machine and wish to run it on a non-Windows machine you will need convert the line endings with a utility like &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;dos2unix&amp;lt;/span&amp;gt; or &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;recode&amp;lt;/span&amp;gt;. Even with these utilities you may still have problems compiling ROMS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order download source code from a git repository, &#039;&#039;&#039;git client&#039;&#039;&#039; software must be installed on your local machine. Most Linux distributions come with git, so shell commands may be used without installing additional software. The general form of git commands is:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git&amp;lt;/span&amp;gt; action &amp;lt;repository&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To check-out the files from the ROMS repository &#039;&#039;&#039;develop&#039;&#039;&#039; (latest version), enter (notice https instead of http):&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms.git&amp;lt;/nowiki&amp;gt; MyDir&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &#039;&#039;&#039;MyDir&#039;&#039;&#039; is the destination directory on your local computer. It will be created if not found. If &#039;&#039;&#039;MyDir&#039;&#039;&#039; is omitted the code will be downloaded to a directory named &#039;&#039;&#039;roms&#039;&#039;&#039;. You only clone once because Git will keep track of the source, destination and a bunch of other information. For more detail on command line use and syntax, see the [https://git-scm.com/book/en/v2 Pro Git] book.&lt;br /&gt;
&lt;br /&gt;
The idealized and realistic ROMS Test Cases and the Matlab processing software can be downloaded from:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_test.git &amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/myroms/roms_matlab.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We highly recommend that Users clone all the ROMS repositories from the same root directory in their computer and define the &#039;&#039;&#039;ROMS_ROOT_DIR&#039;&#039;&#039; variable in their computer shell login environment, specifying where the User cloned/downloaded the ROMS source code, Test Cases, and Matlab processing software. That is, use the value of pwd from the computer directory where you executed git clone https://github.com/myroms/roms.git&lt;br /&gt;
&lt;br /&gt;
For bash shells:&lt;br /&gt;
    export ROMS_ROOT_DIR=MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
For csh/tcsh shells:&lt;br /&gt;
    setenv ROMS_ROOT_DIR  MyDownlodLocationDirectory&lt;br /&gt;
&lt;br /&gt;
The build scripts will use this environmental variable when compiling any of the ROMS Test Cases without the need to customize the location of the ROMS source code. Also, it is used for loading the path of Matlab scripts in the startup.m configuration file.&lt;br /&gt;
&lt;br /&gt;
===Updates===&lt;br /&gt;
&lt;br /&gt;
Now and again, you might feel the urge to get up to speed with the latest changes that have been made to the ROMS repository. When that happens, simply go to the directory that was &amp;quot;MyDir&amp;quot; above and type:&lt;br /&gt;
&lt;br /&gt;
    &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Git will remember where you checked out from before and see if a newer revision exists. If so, it will download and apply all the relevant changes.&lt;br /&gt;
&lt;br /&gt;
==Managing Your Own Modifications==&lt;br /&gt;
This assumes that you have a fresh clone of the myroms repository on the &#039;&#039;&#039;develop&#039;&#039;&#039; branch. You want to keep &#039;&#039;&#039;develop&#039;&#039;&#039; as a pure copy of the source version and keep your own changes in say the &#039;&#039;&#039;arctic&#039;&#039;&#039; branch. Start by creating a branch and switching to it:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git branch arctic&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can make whatever modifications you like (and test them out). To see what changed, you can use &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt; and &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git diff&amp;lt;/span&amp;gt;. To save your changes, do a:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git commit -a&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though if you add new files you will have to &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git add&amp;lt;/span&amp;gt; them first.&lt;br /&gt;
&lt;br /&gt;
===Getting the Updates===&lt;br /&gt;
It is easy to fetch and merge the updates. Start by making sure your directory has been cleanly checked in with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git status&amp;lt;/span&amp;gt;.  Then you can update your &#039;&#039;&#039;develop&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout develop&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then bring the changes into your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch:&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git checkout arctic&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;gt; &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git merge develop&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will bring in everything that changed since your last &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git pull&amp;lt;/span&amp;gt;, so you might find it easier to keep on top of things by doing this often, not putting it off for years. You can also bring in changes one at a time with &amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git cherry-pick&amp;lt;/span&amp;gt;. Again, check the Pro Git book for much more information about all of these operations.&lt;br /&gt;
&lt;br /&gt;
Note that this will save your &#039;&#039;&#039;arctic&#039;&#039;&#039; branch locally, under the .git directory. You can back this up as you would any other important files you have.&lt;br /&gt;
&lt;br /&gt;
==Useful Git Commands==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Command&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git add&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Add a file to the repository staging area &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch&#039;&#039;&#039;&lt;br /&gt;
| List all local branches (the asterisk denotes the current branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -a&#039;&#039;&#039;&lt;br /&gt;
| List all local and remote branches&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -d&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -D&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a local branch forcefully&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git branch -m&#039;&#039;&#039; &amp;lt;_OldName_&amp;gt; &amp;lt;_NewName_&amp;gt;&lt;br /&gt;
| Rename a local branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout -b&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Create a new local branch and switch to it&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git checkout&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Switch to an existing local or remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git clone&#039;&#039;&#039; &amp;lt;_RepositoryURL_&amp;gt;&lt;br /&gt;
| Clone a public repository&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit -am&#039;&#039;&#039; &amp;quot;&amp;lt;_Message_&amp;gt;&amp;quot; &#039;&#039;&#039;-m&#039;&#039;&#039; &amp;quot;&amp;lt;_MessageURL_&amp;gt;&amp;quot;&lt;br /&gt;
| Commit changes to all files with two message lines&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git commit --amend -m&#039;&#039;&#039; &amp;quot;&amp;lt;_NewMessage_&amp;gt;&amp;quot;&lt;br /&gt;
| Amend previous commit message&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039;&lt;br /&gt;
| Show all changes between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git diff&#039;&#039;&#039; &amp;lt;_FileName_&amp;gt;&lt;br /&gt;
| Show changes for a specific file between HEAD and working branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git difftool -d&#039;&#039;&#039; &amp;lt;_BranchName1_&amp;gt; &amp;lt;_BranchName2_&amp;gt;&lt;br /&gt;
| Compare the difference between two branches with &#039;&#039;&#039;`KDIFF3`&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git fetch&#039;&#039;&#039;&lt;br /&gt;
| Retrieve new work done by other people&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log&#039;&#039;&#039;&lt;br /&gt;
| View repository changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --oneline&#039;&#039;&#039;&lt;br /&gt;
| Show the list of commits in one-line format&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git log --summary&#039;&#039;&#039;&lt;br /&gt;
| View repository detailed changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git merge --no-ff --no-commit&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Merge a branch into the active branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git pull&#039;&#039;&#039;&lt;br /&gt;
| Update local repository or branch to the newest origin commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push origin --delete&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Delete a remote branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git push -u origin&#039;&#039;&#039; &amp;lt;_BranchName_&amp;gt;&lt;br /&gt;
| Push changes to the remote repository (and remember the branch)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git reset --hard HEAD~1&#039;&#039;&#039;&lt;br /&gt;
| Undo last commit&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git revert&#039;&#039;&#039; &amp;lt;_CommitID_&amp;gt;&lt;br /&gt;
| Revert commit changes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git status&#039;&#039;&#039;&lt;br /&gt;
| Check/display changes to the repository or particular branch&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;git tag&#039;&#039;&#039;&lt;br /&gt;
| List all tags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complicated Commands==&lt;br /&gt;
&lt;br /&gt;
If a branch is renamed in a repository on GitHub, the local clone on a computer needs to updated:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git branch -m OldName NewName&amp;lt;br /&amp;gt;git fetch origin&amp;lt;br /&amp;gt;git branch -u origin/NewName NewName&amp;lt;br /&amp;gt;git remote set-head origin -a&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to merge changes in the &#039;&#039;&#039;feature/name1&#039;&#039;&#039; branch into the &#039;&#039;&#039;feature/name2&#039;&#039;&#039; branch:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;git checkout feature/name1&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;git checkout feature/name2&amp;lt;br /&amp;gt;git pull&amp;lt;br /&amp;gt;git merge --no-ff --no-commit feature/name1&amp;lt;br /&amp;gt;git commit -am &amp;quot;Merging feature/name1 into feature/name2&amp;quot; -m &amp;quot;MessageURL&amp;quot;&amp;lt;br /&amp;gt;git difftool -d feature/name1 feature/name2&amp;lt;br /&amp;gt;git push -u origin feature/name2&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6590</id>
		<title>ROMS-JEDI Intro</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6590"/>
		<updated>2023-08-30T20:41:18Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_logo.png|left]]&lt;br /&gt;
[[Image:romsjedi_schematic.png|1000px|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Joint Effort for Data Assimilation Integration (&#039;&#039;&#039;JEDI&#039;&#039;&#039;) framework is a unified, high-level, state-of-the-art data assimilation (&#039;&#039;&#039;DA&#039;&#039;&#039;) system for scientific exploration and operational forecasting. The diagram above shows that the &#039;&#039;&#039;JEDI&#039;&#039;&#039; building blocks are model agnostic, and any modern geophysical numerical kernels can be interfaced. Its separable generic design and abstraction allow the implementation of various &#039;&#039;&#039;DA&#039;&#039;&#039; methodologies, including variational, ensemble, hybrid, and coupled approaches that are common to any geophysical system, without the need to develop such algorithms separately for each model technically. The &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework is centered around the Object-Oriented Prediction System (&#039;&#039;&#039;OOPS&#039;&#039;&#039;) layer classes and operators implemented in &#039;&#039;&#039;C++&#039;&#039;&#039; using templates. The specific implementations like &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; are written in Fortran 2003 because of the need for class objects, polymorphism, inheritance, and interoperability between &#039;&#039;&#039;C++&#039;&#039;&#039; and &#039;&#039;&#039;Fortran&#039;&#039;&#039;. The interoperability binding allows &#039;&#039;&#039;Fortran&#039;&#039;&#039; to invoke &#039;&#039;&#039;C++&#039;&#039;&#039; functions and vice versa &#039;&#039;&#039;C++&#039;&#039;&#039; to invoke &#039;&#039;&#039;Fortran&#039;&#039;&#039; procedures.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;JEDI&#039;&#039;&#039; separation of concerns design allows the incorporation of diverse (current and future) observational data streams essential for any DA system. Observation operators can be efficiently coded and added to the Unified Forward Operator (&#039;&#039;&#039;UFO&#039;&#039;&#039;) interface, which simulates, interpolates, and relates observable data to the model component state vector, &#039;&#039;&#039;H(x)&#039;&#039;&#039;. The &#039;&#039;&#039;UFO&#039;&#039;&#039; interface also implements quality control, data thinning, and bias correction. The Interface for Observation Data Access (&#039;&#039;&#039;IODA&#039;&#039;&#039;) storage layer ingests observational data from providers into the &#039;&#039;&#039;UFO&#039;&#039;&#039; and &#039;&#039;&#039;OOPS&#039;&#039;&#039; building blocks. The immense amount of incoming data can be trimmed down, quality-controlled, and filtered by &#039;&#039;&#039;UFO&#039;&#039;&#039; operators before it is assimilated and during postprocessing when computing diagnostics, impacts, and sensitivities.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; framework is intended for users interested in ocean prediction and data assimilation. Currently, we use the &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework to incorporate physical observational data into regional &#039;&#039;&#039;ROMS&#039;&#039;&#039; applications using variational (&#039;&#039;&#039;3DVar&#039;&#039;&#039;/&#039;&#039;&#039;4DVar&#039;&#039;&#039;, &#039;&#039;&#039;3D-FGAT&#039;&#039;&#039;/&#039;&#039;&#039;4D-FGAT&#039;&#039;&#039;), ensemble (&#039;&#039;&#039;EDA&#039;&#039;&#039;, &#039;&#039;&#039;EnKF&#039;&#039;&#039;, &#039;&#039;&#039;LETKF&#039;&#039;&#039;), and hybrid (&#039;&#039;&#039;3DEnVar&#039;&#039;&#039;/&#039;&#039;&#039;4DEnVar&#039;&#039;&#039;) data assimilation methodologies. The &#039;&#039;&#039;ROMS&#039;&#039;&#039; Tangent Linear Model (&#039;&#039;&#039;TLM&#039;&#039;&#039;) and Adjoint Model (&#039;&#039;&#039;ADM&#039;&#039;&#039;) kernels are used in the &#039;&#039;&#039;4DVar&#039;&#039;&#039; family of algorithms.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:ROMS-JEDI_circle_logo.png]] &amp;amp;nbsp; [[Image:ROMS_circle_logo.png]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=File:ROMS_circle_logo.png&amp;diff=6589</id>
		<title>File:ROMS circle logo.png</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=File:ROMS_circle_logo.png&amp;diff=6589"/>
		<updated>2023-08-30T20:39:07Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=File:ROMS-JEDI_circle_logo.png&amp;diff=6588</id>
		<title>File:ROMS-JEDI circle logo.png</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=File:ROMS-JEDI_circle_logo.png&amp;diff=6588"/>
		<updated>2023-08-30T20:38:52Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6587</id>
		<title>ROMS-JEDI Intro</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6587"/>
		<updated>2023-08-30T20:24:40Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_logo.png|left]]&lt;br /&gt;
[[Image:romsjedi_schematic.png|1000px|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Joint Effort for Data Assimilation Integration (&#039;&#039;&#039;JEDI&#039;&#039;&#039;) framework is a unified, high-level, state-of-the-art data assimilation (&#039;&#039;&#039;DA&#039;&#039;&#039;) system for scientific exploration and operational forecasting. The diagram above shows that the &#039;&#039;&#039;JEDI&#039;&#039;&#039; building blocks are model agnostic, and any modern geophysical numerical kernels can be interfaced. Its separable generic design and abstraction allow the implementation of various &#039;&#039;&#039;DA&#039;&#039;&#039; methodologies, including variational, ensemble, hybrid, and coupled approaches that are common to any geophysical system, without the need to develop such algorithms separately for each model technically. The &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework is centered around the Object-Oriented Prediction System (&#039;&#039;&#039;OOPS&#039;&#039;&#039;) layer classes and operators implemented in &#039;&#039;&#039;C++&#039;&#039;&#039; using templates. The specific implementations like &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; are written in Fortran 2003 because of the need for class objects, polymorphism, inheritance, and interoperability between &#039;&#039;&#039;C++&#039;&#039;&#039; and &#039;&#039;&#039;Fortran&#039;&#039;&#039;. The interoperability binding allows &#039;&#039;&#039;Fortran&#039;&#039;&#039; to invoke &#039;&#039;&#039;C++&#039;&#039;&#039; functions and vice versa &#039;&#039;&#039;C++&#039;&#039;&#039; to invoke &#039;&#039;&#039;Fortran&#039;&#039;&#039; procedures.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;JEDI&#039;&#039;&#039; separation of concerns design allows the incorporation of diverse (current and future) observational data streams essential for any DA system. Observation operators can be efficiently coded and added to the Unified Forward Operator (&#039;&#039;&#039;UFO&#039;&#039;&#039;) interface, which simulates, interpolates, and relates observable data to the model component state vector, &#039;&#039;&#039;H(x)&#039;&#039;&#039;. The &#039;&#039;&#039;UFO&#039;&#039;&#039; interface also implements quality control, data thinning, and bias correction. The Interface for Observation Data Access (&#039;&#039;&#039;IODA&#039;&#039;&#039;) storage layer ingests observational data from providers into the &#039;&#039;&#039;UFO&#039;&#039;&#039; and &#039;&#039;&#039;OOPS&#039;&#039;&#039; building blocks. The immense amount of incoming data can be trimmed down, quality-controlled, and filtered by &#039;&#039;&#039;UFO&#039;&#039;&#039; operators before it is assimilated and during postprocessing when computing diagnostics, impacts, and sensitivities.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; framework is intended for users interested in ocean prediction and data assimilation. Currently, we use the &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework to incorporate physical observational data into regional &#039;&#039;&#039;ROMS&#039;&#039;&#039; applications using variational (&#039;&#039;&#039;3DVar&#039;&#039;&#039;/&#039;&#039;&#039;4DVar&#039;&#039;&#039;, &#039;&#039;&#039;3D-FGAT&#039;&#039;&#039;/&#039;&#039;&#039;4D-FGAT&#039;&#039;&#039;), ensemble (&#039;&#039;&#039;EDA&#039;&#039;&#039;, &#039;&#039;&#039;EnKF&#039;&#039;&#039;, &#039;&#039;&#039;LETKF&#039;&#039;&#039;), and hybrid (&#039;&#039;&#039;3DEnVar&#039;&#039;&#039;/&#039;&#039;&#039;4DEnVar&#039;&#039;&#039;) data assimilation methodologies. The &#039;&#039;&#039;ROMS&#039;&#039;&#039; Tangent Linear Model (&#039;&#039;&#039;TLM&#039;&#039;&#039;) and Adjoint Model (&#039;&#039;&#039;ADM&#039;&#039;&#039;) kernels are used in the &#039;&#039;&#039;4DVar&#039;&#039;&#039; family of algorithms.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Unit_Test_Cases&amp;diff=6586</id>
		<title>ROMS-JEDI Unit Test Cases</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Unit_Test_Cases&amp;diff=6586"/>
		<updated>2023-08-30T20:20:22Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Unit Test Cases&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are several ways to run the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; &#039;&#039;&#039;Unit Test Cases&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* Run all the available Unit Tests using &#039;&#039;&#039;ctest&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi&amp;lt;/span&amp;gt;                                    !&amp;gt; sub-directory of interface root location&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -N&amp;lt;/span&amp;gt;                                                   !&amp;gt; lists all the Unit Tests available&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -E -V get_&amp;lt;/span&amp;gt;                                           !&amp;gt; runs all the Unit Tests&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
* Run specific Unit Test using &#039;&#039;&#039;ctest&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi&amp;lt;/span&amp;gt;                                    !&amp;gt; sub-directory of interface root location&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -VV -R test_romsjedi_geometry&amp;lt;/span&amp;gt;                        !&amp;gt; run geometry Unit Test&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
* Run specific Unit Test using &#039;&#039;&#039;mpirun&#039;&#039;&#039; to facilitate TotalView debugging:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi/test&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -n 2     ../../bin/romsjedi_hofx.x testinput/hofx_4d.yaml &amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -n 2 -tv ../../bin/romsjedi_hofx.x testinput/hofx_4d.yaml &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
Currently, the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; has the following &#039;&#039;&#039;Unit Test Cases&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! ctest -VV -R !! mpirun -n 2 &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;romsjedi_coding_norms&#039;&#039;&#039; ||  NA &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_geometry&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_geometry&#039;&#039;&#039;  &#039;&#039;testinput/geometry.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_geometryiterator&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_geometryiterator&#039;&#039;&#039; &#039;&#039;testinput/geometryiterator.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_state&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_state&#039;&#039;&#039; &#039;&#039;testinput/state.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_increment&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_increment&#039;&#039;&#039; &#039;&#039;testinput/increment.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_model&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_model&#039;&#039;&#039; &#039;&#039;testinput/model.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_linearmodel&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_linearmodel&#039;&#039;&#039; &#039;&#039;testinput/linearmodel.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_error_covariance&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_error_covariance&#039;&#039;&#039; &#039;&#039;testinput/error_covariance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_hofx_nomodel&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx_nomodel.x&#039;&#039;&#039; &#039;&#039;testinput/hofx_nomodel.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_hofx_4d&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/hofx_4d.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_makeobs_4d&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/makeobs_4d.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_makeobs_4d_perturbed&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/makeobs_4d_perturbed.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_diffstates&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_diffstates.x&#039;&#039;&#039; &#039;&#039;testinput/diffstates.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_forecast_roms&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_forecast.x&#039;&#039;&#039; &#039;&#039;testinput/forecast_roms.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_bump_parameters_cor_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/parameters_bump_cor_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_bump_loc_parameters_cor_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/parameters_bump_loc_cor_nicas.yaml&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_dirac_cov_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/dirac_cov_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_pert&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_pert.x&#039;&#039;&#039; &#039;&#039;testinput/ens_perturbation.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_variance&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_variance.x&#039;&#039;&#039; &#039;&#039;testinput/ens_variance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_mean_variance&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_mean_variance.x&#039;&#039;&#039; &#039;&#039;testinput/ens_mean_variance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_recenter&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_recenter.x&#039;&#039;&#039; &#039;&#039;testinput/ens_recenter.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_hofx&#039;&#039;&#039; || &#039;&#039;&#039;mpirun -n 6&#039;&#039;&#039; &#039;&#039;&#039;../../bin/romsjedi_ens_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/ens_hofx.yaml&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_dirac_ens_cov_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/dirac_ens_cov_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_zero_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_zero_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_split_observer&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_split_observer.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_split_solver&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_split_solver.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_3dhyb&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_3dhyb.yaml&#039;&#039; &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Observations&amp;diff=6585</id>
		<title>ROMS-JEDI Observations</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Observations&amp;diff=6585"/>
		<updated>2023-08-30T20:19:53Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Observations&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following diagram shows the observations used to test the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; interface with the default &#039;&#039;&#039;WC13&#039;&#039;&#039; application:&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_obs.png|1000px|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IODA Observation files==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Observation Type   !!   NetCDF-4/HDF5 File&lt;br /&gt;
|-&lt;br /&gt;
| Absolute Dynamic Topography  || wc13_adt_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| ADT single datum             || wc13_adt_single_obs_20040105.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Potential Temperature        || wc13_ptemp_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Salinity                     || wc13_salt_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Sea Surface Temperature      || wc13_sst_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| SST single datum             || wc13_sst_single_obs_20040105.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Insitu&#039;&#039; Temperature           || wc13_temp_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Temperature-Salinity Profile || wc13_TS_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface U-velocity           || wc13_usur_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface V-velocity           || wc13_vsur_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface Currents             || wc13_uv_sur_20040103.nc4  &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Implementation&amp;diff=6584</id>
		<title>ROMS-JEDI Implementation</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Implementation&amp;diff=6584"/>
		<updated>2023-08-30T20:19:36Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Implementation&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most modern geophysical models can be connected to the &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework, provided that the following predefined abstract C++/Fortran &#039;&#039;&#039;classes&#039;&#039;&#039; or &#039;&#039;&#039;building blocks&#039;&#039;&#039; are coded:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!CLASS!!Description&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;ErrorCovarinace&#039;&#039;&#039; || Background error covariance, training, and modeling (&#039;&#039;&#039;SABER&#039;&#039;&#039;: BUMP/NICAS) &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Field/Fields&#039;&#039;&#039; || Elemental operators to manipulate a field or a set of fields to the model state/increment vector and metadata &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Geometry&#039;&#039;&#039; || Application grid definition, including coordinates, metrics, parallel decomposition, and operators &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;GeometryIterator&#039;&#039;&#039; || Methods to set/get state fields over specified grid points in &#039;&#039;&#039;LETKF&#039;&#039;&#039; applications &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Increment&#039;&#039;&#039; || Procedures to operate on the increment vector that extends/inherits from the &#039;&#039;&#039;Fields&#039;&#039;&#039; class &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;LinearModel&#039;&#039;&#039; || Initializes, run, and finalizes Tangent Linear and Adjoint model dynamical/numerical kernels &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;LinearVariableChange&#039;&#039;&#039; || Tangent/adjoint increment vector variables transformation from one field to another &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Localization&#039;&#039;&#039; || Model Ensemble Localization (&#039;&#039;&#039;SABER&#039;&#039;&#039;: BUMP/NICAS) &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Model&#039;&#039;&#039; || Initializes, run, and finalizes the Nonlinear model dynamical/numerical kernel &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;State&#039;&#039;&#039; || Procedures to operate on the state vector that extends/inherits from the &#039;&#039;&#039;Fields&#039;&#039;&#039; class &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Trajectory&#039;&#039;&#039; || Methods to process the Nonlinear trajectory that linearizes the tangent linear and adjoint models &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;VariableChange&#039;&#039;&#039; || Nonlinear state vector variables transformation from one field to another &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Code Design==&lt;br /&gt;
&lt;br /&gt;
Below is a diagram showing the interoperability mechanism for the &#039;&#039;&#039;Geometry Class&#039;&#039;&#039; that allows &#039;&#039;&#039;Fortran&#039;&#039;&#039; to invoke &#039;&#039;&#039;C++&#039;&#039;&#039; function and vice versa for &#039;&#039;&#039;C++&#039;&#039;&#039; to invoke &#039;&#039;&#039;Fortran&#039;&#039;&#039; procedures.&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_implementation_schematic.png|1000px|left]]&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Compiling&amp;diff=6583</id>
		<title>ROMS-JEDI Compiling</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Compiling&amp;diff=6583"/>
		<updated>2023-08-30T20:18:53Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Compiling ROMS-JEDI&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring GIT==&lt;br /&gt;
&lt;br /&gt;
Before downloading the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; repository, ensure that your &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039; has the appropriate &#039;&#039;&#039;git-lfs&#039;&#039;&#039; configuration for correctly downloading the default application (U.S. West Coast, &#039;&#039;&#039;WC13&#039;&#039;&#039; option) input and observation NetCDF files. Otherwise, the &#039;&#039;&#039;Unit Test Cases&#039;&#039;&#039; requiring input NetCDF files will fail. The &#039;&#039;&#039;Git LFS&#039;&#039;&#039; is a command line extension and specification for managing large files with &#039;&#039;&#039;Git&#039;&#039;&#039;. A sample of the configuration file looks like this:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;more ~/.gitconf&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;[User]&amp;lt;br /&amp;gt;     name = GivenName MiddleName FamilyName&amp;lt;br /&amp;gt;     email = your@email&amp;lt;br /&amp;gt;[credential]&amp;lt;br /&amp;gt;     helper = cache --timeout=7200&amp;lt;br /&amp;gt;     helper = store --file ~/.my-credentials&amp;lt;br /&amp;gt;[filter &amp;quot;lfs&amp;quot;]&amp;lt;br /&amp;gt;     clean = git-lfs clean -- %f&amp;lt;br /&amp;gt;     smudge = git-lfs smudge -- %f&amp;lt;br /&amp;gt;     process = git-lfs filter-process&amp;lt;br /&amp;gt;     required = true&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you may execute &#039;&#039;&#039;git lfs pull&#039;&#039;&#039; at your location of this repository to download a viable version of the &#039;&#039;&#039;Git LFS&#039;&#039;&#039; files from the remote repository in &#039;&#039;&#039;GitHub&#039;&#039;&#039;. Also, to automatically add the &#039;&#039;&#039;LFS&#039;&#039;&#039; filter to your existing &#039;&#039;&#039;~/.gitconfig&#039;&#039;&#039;, you could use &#039;&#039;&#039;git lfs install&#039;&#039;&#039; from anywhere in your computer directories.&lt;br /&gt;
&lt;br /&gt;
==Downloading ROMS-JEDI==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; repository is private within the Joint Center for Satellite Data Assimilation (&#039;&#039;&#039;JCSDA&#039;&#039;&#039;) community. Users need to be partners, contributors, or members of &#039;&#039;&#039;JCSDA&#039;&#039;&#039; to access all the &#039;&#039;&#039;JEDI&#039;&#039;&#039; components that are part of the abstract layer infrastructure centered around the Object Oriented Prediction System (&#039;&#039;&#039;OOPS&#039;&#039;&#039;). &lt;br /&gt;
&lt;br /&gt;
Use the following command to download the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; interface:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/JCSDA-internal/roms-jedi.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
* Make sure you have the &#039;&#039;&#039;spack-stack&#039;&#039;&#039; software installed for either &#039;&#039;&#039;gfortran&#039;&#039;&#039; or &#039;&#039;&#039;ifort&#039;&#039;&#039; containing several packages need to run the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; interface. For more information, please check https://github.com/JCSDA/spack-stack.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;In our computers at Rutgers University, the &#039;&#039;&#039;spack-stack&#039;&#039;&#039; can be loaded by executing either:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;module purge;  module load stack-gcc;    module list&amp;lt;/span&amp;gt;                     (gfortran compiler)&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;module purge;  module load stack-intel;  module list&amp;lt;/span&amp;gt;                     (ifort compiler)&amp;lt;/div&amp;gt;Installing the &#039;&#039;&#039;spack-stack&#039;&#039;&#039; is not trivial and requires computer software expertise.&lt;br /&gt;
&lt;br /&gt;
* We also like to define the &#039;&#039;&#039;MPIRUN&#039;&#039;&#039; environmental variable to specify the &#039;&#039;&#039;MPI&#039;&#039;&#039; executable in a particular computer (say, &#039;&#039;&#039;srun&#039;&#039;&#039;, &#039;&#039;&#039;mpirun&#039;&#039;&#039;, etc.). We need the full path for &#039;&#039;&#039;ctest&#039;&#039;&#039; to work. Notice that we specify this executable in the &#039;&#039;&#039;ecbuild&#039;&#039;&#039; command below.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;setenv MPIRUN /opt/slurm/bin/srun&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Several environment variables can be activated for &#039;&#039;&#039;verbose debugging&#039;&#039;&#039; of the building blocks for the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; interface: (use &#039;&#039;&#039;1&#039;&#039;&#039; or &#039;&#039;&#039;true&#039;&#039;&#039; to activate and &#039;&#039;&#039;0&#039;&#039;&#039; or &#039;&#039;&#039;false&#039;&#039;&#039; to deactivate)&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;twilightBlue&amp;quot;&amp;gt;setenv LdebugGeometry             1&amp;lt;br /&amp;gt;setenv LdebugAnalyticInit         1&amp;lt;br /&amp;gt;setenv LdebugField                1&amp;lt;br /&amp;gt;setenv LdebugFields               1&amp;lt;br /&amp;gt;setenv LdebugFieldsUtils          1&amp;lt;br /&amp;gt;setenv LdebugGeometry             1&amp;lt;br /&amp;gt;setenv LdebugLinearModel          1&amp;lt;br /&amp;gt;setenv LdebugLinearModel2Geovals  1&amp;lt;br /&amp;gt;setenv LdebugModel                1&amp;lt;br /&amp;gt;setenv LdebugModel2Geovals        1&amp;lt;br /&amp;gt;setenv LdebugTrajectory           1&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compiling ROMS-JEDI Default Application WC13==&lt;br /&gt;
&lt;br /&gt;
By default, &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; is configured with a coarse (54x53x30 grid points) US West Coast (&#039;&#039;&#039;WC13&#039;&#039;&#039;) application. See [[4DVar Tutorial Introduction]] for detailed information about the &#039;&#039;&#039;WC13&#039;&#039;&#039; configuration. However, any other ROMS application can be configured by including in the &#039;&#039;&#039;ecbuild&#039;&#039;&#039; command the directives &#039;&#039;&#039;`-DROMS_APP=&amp;quot;MyAppCPP&amp;quot;`&#039;&#039;&#039; and &#039;&#039;&#039;-DROMS_APP_DIR=&amp;quot;MyAppDirPath&amp;quot;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The strategy is to create a &#039;&#039;&#039;Bundle&#039;&#039;&#039; and &#039;&#039;&#039;build&#039;&#039;&#039; subdirectory for each &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; application. For &#039;&#039;&#039;WC13&#039;&#039;&#039; (default), we create &#039;&#039;&#039;Bundle_wc13&#039;&#039;&#039; and &#039;&#039;&#039;build_wc13&#039;&#039;&#039; below. Please follow the following steps to configure &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; in your computer:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;git clone &amp;lt;nowiki&amp;gt;https://github.com/JCSDA-internal/roms-jedi.git&amp;lt;/nowiki&amp;gt;&amp;lt;/span&amp;gt;  !&amp;gt; If the first time on your computer&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd roms-jedi&amp;lt;/span&amp;gt;                                               !&amp;gt; ROMS-JEDI interface directory, &amp;lt;interface_dir&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mkdir Bundle_wc13&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cp bundle/.gitignore bundle/CMakeLists.txt Bundle_wc13&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mkdir build_wc13&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ecbuild -DMPIEXEC_EXECUTABLE=$MPIRUN -DMPIEXEC_NUMPROC_FLAG=&amp;quot;-n&amp;quot; -DCMAKE_BUILD_TYPE=Release ../Bundle_wc13&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;make -j 10&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd roms-jedi&amp;lt;/span&amp;gt;                                               !&amp;gt; sub-directory: &amp;lt;interface_dir&amp;gt;/build_wc13/roms-jedi&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -N&amp;lt;/span&amp;gt;                                                   !&amp;gt; lists all the Unit Tests available&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -E -V get_&amp;lt;/span&amp;gt;                                           !&amp;gt; runs all the Unit Tests&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd test/Data&amp;lt;/span&amp;gt;                                               !&amp;gt; sub-directory: &amp;lt;interface_dir&amp;gt;/build_wc13/roms-jedi/test/Data&amp;lt;br /&amp;gt;                                                           !&amp;gt; to check the results in various sub-directories&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ecbuild&#039;&#039;&#039; command will clone the required &#039;&#039;&#039;JEDI&#039;&#039;&#039; components that are specified in &#039;&#039;&#039;Bundle_wc13/CMakeList.txt&#039;&#039;&#039;. For example:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;# Required repositories&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT roms       GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/JCSDA-internal/roms_src.git&amp;lt;/nowiki&amp;gt;&amp;quot;     BRANCH master  UPDATE )&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT oops       GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/oops.git&amp;lt;/nowiki&amp;gt;&amp;quot;         BRANCH develop UPDATE )&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT vader      GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/vader.git&amp;lt;/nowiki&amp;gt;&amp;quot;        BRANCH develop UPDATE )&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT saber      GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/saber.git&amp;lt;/nowiki&amp;gt;&amp;quot;        BRANCH develop UPDATE )&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT gsw        GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/GSW-Fortran.git&amp;lt;/nowiki&amp;gt;&amp;quot;  BRANCH develop UPDATE )&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT ioda       GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/ioda.git&amp;lt;/nowiki&amp;gt;&amp;quot;         BRANCH develop UPDATE )&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT ufo        GIT &amp;quot;&amp;lt;nowiki&amp;gt;https://github.com/jcsda-internal/ufo.git&amp;lt;/nowiki&amp;gt;&amp;quot;          BRANCH develop UPDATE )&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt; ecbuild_bundle( PROJECT roms-jedi  SOURCE ../ )&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ecbuild&#039;&#039;&#039; tool builds by default the &#039;&#039;&#039;RelWithDebInfo&#039;&#039;&#039; (&#039;&#039;&#039;-O2 -g&#039;&#039;&#039; options) for optimized with debugging information version of &#039;&#039;&#039;JEDI&#039;&#039;&#039; and &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039;, rendering slower execution. However, for faster and optimized execution, we include the directive &#039;&#039;&#039;-DCMAKE_BUILD_TYPE=Release&#039;&#039;&#039; to the &#039;&#039;&#039;ecbuild&#039;&#039;&#039; command. For debugging with TotalView, we include instead the directive &#039;&#039;&#039;-DCMAKE_BUILD_TYPE=Debug&#039;&#039;&#039;, which is much slower.&lt;br /&gt;
&lt;br /&gt;
==Compiling other ROMS-JEDI Applications==&lt;br /&gt;
&lt;br /&gt;
Any &#039;&#039;&#039;ROMS&#039;&#039;&#039; application can be run in &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; by specifying the appropriate CPP option and necessary input files. Only &#039;&#039;&#039;WC13&#039;&#039;&#039; is provided with the interface. However, we facilitate how to run such applications. Notice that the &#039;&#039;&#039;WC13&#039;&#039;&#039; configuration and input files are located in &#039;&#039;&#039;roms-jedi/test/Applications/wc13&#039;&#039;&#039;. The template input YAML files are located &#039;&#039;&#039;roms-jedi/test/templates&#039;&#039;&#039;. We use a &#039;&#039;&#039;Perl&#039;&#039;&#039; script to create the application input YAML files from the templates. Please check in &#039;&#039;&#039;roms-jedi/test/Applications/wc13/testinput&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For example, if running the U.S. East Coast &#039;&#039;&#039;DOPPIO&#039;&#039;&#039; application (240x104x40 grid points) or any other, please follow the following steps to configure &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd roms-jedi&amp;lt;/span&amp;gt;                                               !&amp;gt; ROMS-JEDI interface directory, &amp;lt;interface_dir&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mkdir Bundle_doppio&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cp bundle/.gitignore bundle/CMakeLists.txt Bundle_doppio&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mkdir build_doppio&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_doppio&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ecbuild -DMPIEXEC_EXECUTABLE=$MPIRUN -DMPIEXEC_NUMPROC_FLAG=&amp;quot;-n&amp;quot; -DROMS_APP=&amp;quot;DOPPIO&amp;quot; \&amp;lt;br /&amp;gt;-DROMS_APP_DIR=&amp;quot;DOPPIOpath&amp;quot; -DCMAKE_BUILD_TYPE=Release ../Bundle_doppio&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;make -j 10&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd roms-jedi&amp;lt;/span&amp;gt;                                               !&amp;gt; sub-directory: &amp;lt;interface_dir&amp;gt;/build_doppio/roms-jedi&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -N&amp;lt;/span&amp;gt;                                                   !&amp;gt; lists all the Unit Tests available&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -E -V get_&amp;lt;/span&amp;gt;                                           !&amp;gt; runs all the Unit Test&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd test/Data&amp;lt;/span&amp;gt;                                               !&amp;gt; sub-directory: &amp;lt;interface_dir&amp;gt;/build_doppio/roms-doppio/test/Data&amp;lt;br /&amp;gt;                                                           !&amp;gt; to check the results in various sub-directories&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6582</id>
		<title>ROMS-JEDI Intro</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Intro&amp;diff=6582"/>
		<updated>2023-08-30T20:18:31Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_logo.png|left]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Edit Template:ROMS-JEDI_TOC to modify this Table of Contents--&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;float: left;margin: 0 20px 0 0;&amp;quot;&amp;gt;{{ROMS-JEDI_TOC}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_schematic.png|1000px|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
The Joint Effort for Data Assimilation Integration (&#039;&#039;&#039;JEDI&#039;&#039;&#039;) framework is a unified, high-level, state-of-the-art data assimilation (&#039;&#039;&#039;DA&#039;&#039;&#039;) system for scientific exploration and operational forecasting. The diagram above shows that the &#039;&#039;&#039;JEDI&#039;&#039;&#039; building blocks are model agnostic, and any modern geophysical numerical kernels can be interfaced. Its separable generic design and abstraction allow the implementation of various &#039;&#039;&#039;DA&#039;&#039;&#039; methodologies, including variational, ensemble, hybrid, and coupled approaches that are common to any geophysical system, without the need to develop such algorithms separately for each model technically. The &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework is centered around the Object-Oriented Prediction System (&#039;&#039;&#039;OOPS&#039;&#039;&#039;) layer classes and operators implemented in &#039;&#039;&#039;C++&#039;&#039;&#039; using templates. The specific implementations like &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; are written in Fortran 2003 because of the need for class objects, polymorphism, inheritance, and interoperability between &#039;&#039;&#039;C++&#039;&#039;&#039; and &#039;&#039;&#039;Fortran&#039;&#039;&#039;. The interoperability binding allows &#039;&#039;&#039;Fortran&#039;&#039;&#039; to invoke &#039;&#039;&#039;C++&#039;&#039;&#039; functions and vice versa &#039;&#039;&#039;C++&#039;&#039;&#039; to invoke &#039;&#039;&#039;Fortran&#039;&#039;&#039; procedures.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;JEDI&#039;&#039;&#039; separation of concerns design allows the incorporation of diverse (current and future) observational data streams essential for any DA system. Observation operators can be efficiently coded and added to the Unified Forward Operator (&#039;&#039;&#039;UFO&#039;&#039;&#039;) interface, which simulates, interpolates, and relates observable data to the model component state vector, &#039;&#039;&#039;H(x)&#039;&#039;&#039;. The &#039;&#039;&#039;UFO&#039;&#039;&#039; interface also implements quality control, data thinning, and bias correction. The Interface for Observation Data Access (&#039;&#039;&#039;IODA&#039;&#039;&#039;) storage layer ingests observational data from providers into the &#039;&#039;&#039;UFO&#039;&#039;&#039; and &#039;&#039;&#039;OOPS&#039;&#039;&#039; building blocks. The immense amount of incoming data can be trimmed down, quality-controlled, and filtered by &#039;&#039;&#039;UFO&#039;&#039;&#039; operators before it is assimilated and during postprocessing when computing diagnostics, impacts, and sensitivities.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; framework is intended for users interested in ocean prediction and data assimilation. Currently, we use the &#039;&#039;&#039;JEDI&#039;&#039;&#039; framework to incorporate physical observational data into regional &#039;&#039;&#039;ROMS&#039;&#039;&#039; applications using variational (&#039;&#039;&#039;3DVar&#039;&#039;&#039;/&#039;&#039;&#039;4DVar&#039;&#039;&#039;, &#039;&#039;&#039;3D-FGAT&#039;&#039;&#039;/&#039;&#039;&#039;4D-FGAT&#039;&#039;&#039;), ensemble (&#039;&#039;&#039;EDA&#039;&#039;&#039;, &#039;&#039;&#039;EnKF&#039;&#039;&#039;, &#039;&#039;&#039;LETKF&#039;&#039;&#039;), and hybrid (&#039;&#039;&#039;3DEnVar&#039;&#039;&#039;/&#039;&#039;&#039;4DEnVar&#039;&#039;&#039;) data assimilation methodologies. The &#039;&#039;&#039;ROMS&#039;&#039;&#039; Tangent Linear Model (&#039;&#039;&#039;TLM&#039;&#039;&#039;) and Adjoint Model (&#039;&#039;&#039;ADM&#039;&#039;&#039;) kernels are used in the &#039;&#039;&#039;4DVar&#039;&#039;&#039; family of algorithms.&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Template:ROMS-JEDI_TOC&amp;diff=6581</id>
		<title>Template:ROMS-JEDI TOC</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Template:ROMS-JEDI_TOC&amp;diff=6581"/>
		<updated>2023-08-30T20:15:47Z</updated>

		<summary type="html">&lt;p&gt;Robertson: Created page with &amp;quot;{|class=&amp;quot;toc&amp;quot; |- ! &amp;#039;&amp;#039;&amp;#039;ROMS-JEDI Menu&amp;#039;&amp;#039;&amp;#039; |- | &amp;amp;nbsp; 1. &amp;#039;&amp;#039;&amp;#039; Introduction &amp;amp;nbsp;&amp;#039;&amp;#039;&amp;#039; |- | &amp;amp;nbsp; 2. &amp;#039;&amp;#039;&amp;#039; Compiling &amp;amp;nbsp;&amp;#039;&amp;#039;&amp;#039; |- | &amp;amp;nb...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|class=&amp;quot;toc&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! &#039;&#039;&#039;ROMS-JEDI Menu&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; 1. &#039;&#039;&#039;[[ROMS-JEDI_Intro | Introduction]] &amp;amp;nbsp;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; 2. &#039;&#039;&#039;[[ROMS-JEDI_Compiling | Compiling]] &amp;amp;nbsp;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; 3. &#039;&#039;&#039;[[ROMS-JEDI_Implementation | Implementation]] &amp;amp;nbsp;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; 4. &#039;&#039;&#039;[[ROMS-JEDI_Observations | Observations]] &amp;amp;nbsp;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; 5. &#039;&#039;&#039;[[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]] &amp;amp;nbsp;&#039;&#039;&#039;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6580</id>
		<title>Documentation Portal</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=Documentation_Portal&amp;diff=6580"/>
		<updated>2023-08-30T20:04:43Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;Documentation Portal&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;main&amp;quot; width=&amp;quot;99%&amp;quot;&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%&amp;quot; |   &amp;lt;!-- Left Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Technical Documentation&#039;&#039;&#039;&lt;br /&gt;
* [[Regional_Ocean_Modeling_System_(ROMS) | Introduction]]&lt;br /&gt;
* [[Equations of Motion]]&lt;br /&gt;
* [[Vertical S-coordinate]]&lt;br /&gt;
* [[Terrain-Following Coordinate Transformation]]&lt;br /&gt;
* [[Curvilinear Coordinates Transformation]]&lt;br /&gt;
* [[Fractional Coordinate System (&amp;amp;xi; - &amp;amp;eta; space)]]&lt;br /&gt;
* [[Time-stepping Schemes Review]]&lt;br /&gt;
* [[Numerical Solution Technique]]&lt;br /&gt;
* [[Nested Grids]]&lt;br /&gt;
* [[Boundary Conditions]]&lt;br /&gt;
* [[Horizontal Mixing]]&lt;br /&gt;
* [[Vertical Mixing Parameterizations]]&lt;br /&gt;
* [[Atmospheric Boundary Layer]]&lt;br /&gt;
* [[Bottom Boundary Layer]]&lt;br /&gt;
* [[Lagrangian Drifters]]&lt;br /&gt;
* [[Balance Term Diagnostics]]&lt;br /&gt;
* [[Biogeochemical Models]]&lt;br /&gt;
* [[Sediment Model]]&lt;br /&gt;
* [[Wave Model]]&lt;br /&gt;
* [[Atmospheric Model]]&lt;br /&gt;
* [[Model Coupling]]&lt;br /&gt;
** [[NUOPC_Cap | ROMS Native ESMF/NUOPC Cap]]&lt;br /&gt;
** [[NUOPC_Cap_UFS | ROMS Stand-Alone ESMF/NUOPC Cap]]&lt;br /&gt;
* [[Model Diagnostics]]&lt;br /&gt;
* [[Sea-Ice Model]]&lt;br /&gt;
* [[Variational Data Assimilation]]&lt;br /&gt;
* [[ROMS-JEDI_Intro| ROMS-JEDI]]&lt;br /&gt;
** [[ROMS-JEDI_Compiling | Compiling]]&lt;br /&gt;
** [[ROMS-JEDI_Implementation | Implementation]]&lt;br /&gt;
** [[ROMS-JEDI_Observations | Observations]]&lt;br /&gt;
** [[ROMS-JEDI_Unit_Test_Cases | Unit Test Cases]]&lt;br /&gt;
* [[IO | ROMS I/O]]&lt;br /&gt;
* [[Bibliography]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Middle Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;User Guide&#039;&#039;&#039;&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Nesting Examples]]&lt;br /&gt;
* [[Frequently Asked Questions]]&lt;br /&gt;
* [[Source Code]]&lt;br /&gt;
** [[Git]]&lt;br /&gt;
** [[Subversion]]&lt;br /&gt;
** [[Modules]]&lt;br /&gt;
** [[Drivers]]&lt;br /&gt;
** [[Subroutines]]&lt;br /&gt;
** [[Variables]]&lt;br /&gt;
** [[Functionals]]&lt;br /&gt;
** [[Lateral Boundary Conditions]]&lt;br /&gt;
* [[C Preprocessor]]&lt;br /&gt;
** [[Options]]&lt;br /&gt;
** [[cppdefs.h]]&lt;br /&gt;
** [[globaldefs.h]]&lt;br /&gt;
* [[Compiling and Linking]]&lt;br /&gt;
** [[makefile]]&lt;br /&gt;
** [[build_roms]]&lt;br /&gt;
** [[my_build_paths]]&lt;br /&gt;
** [[make]]&lt;br /&gt;
** [[gmake]]&lt;br /&gt;
** [[MakeDepend]]&lt;br /&gt;
** [[External Libraries]]&lt;br /&gt;
* [[Parallelization]]&lt;br /&gt;
* [[Benchmarking]]&lt;br /&gt;
* [[Matlab Scripts]]&lt;br /&gt;
* [[Visualization]]&lt;br /&gt;
|style=&amp;quot;vertical-align:top;width:33%;border-left:1px solid #aaa;padding-left:1em&amp;quot;| &amp;lt;!-- Right Column Portal --&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Examples and Applications&#039;&#039;&#039;&lt;br /&gt;
* [[Test Cases]]&lt;br /&gt;
* [[Model Coupling ESMF | Coupling Examples]]&lt;br /&gt;
* [[Lake_Jersey_Refinement_Example_Introduction | Nesting Examples]]&lt;br /&gt;
* [[Application Set-up]]&lt;br /&gt;
* [[Metadata Design]]&lt;br /&gt;
** [[YAML_Parser | YAML Parser]]&lt;br /&gt;
** [[coupling_esmf_atm.yaml]]&lt;br /&gt;
** [[roms_cmeps.yaml]] &lt;br /&gt;
** [[varinfo.yaml]]&lt;br /&gt;
* [[Grid Generation]]&lt;br /&gt;
* [[Initialization]]&lt;br /&gt;
* [[Forcing]]&lt;br /&gt;
** [[Atmospheric Forcing]]&lt;br /&gt;
** [[Tidal Forcing]]&lt;br /&gt;
** [[River Runoff]]&lt;br /&gt;
* [[Input Parameter Files]]&lt;br /&gt;
** [[roms.in]]&lt;br /&gt;
** [[s4dvar.in]]&lt;br /&gt;
** [[biology.in]]&lt;br /&gt;
** [[sediment.in]]&lt;br /&gt;
** [[floats.in]]&lt;br /&gt;
** [[stations.in]]&lt;br /&gt;
** [[ice.in]]&lt;br /&gt;
** [[swan.in]]&lt;br /&gt;
* [[Standard Output Files]]&lt;br /&gt;
|}&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Unit_Test_Cases&amp;diff=6579</id>
		<title>ROMS-JEDI Unit Test Cases</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Unit_Test_Cases&amp;diff=6579"/>
		<updated>2023-08-30T19:53:10Z</updated>

		<summary type="html">&lt;p&gt;Robertson: Created page with &amp;quot;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Unit Test Cases&amp;lt;/div&amp;gt;  There are several ways to run the &amp;#039;&amp;#039;&amp;#039;ROMS-JEDI&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Unit Test Cases&amp;#039;&amp;#039;&amp;#039;:  * Run all the available Unit Tests using &amp;#039;&amp;#039;&amp;#039;ctest...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Unit Test Cases&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several ways to run the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; &#039;&#039;&#039;Unit Test Cases&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
* Run all the available Unit Tests using &#039;&#039;&#039;ctest&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi&amp;lt;/span&amp;gt;                                    !&amp;gt; sub-directory of interface root location&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -N&amp;lt;/span&amp;gt;                                                   !&amp;gt; lists all the Unit Tests available&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -E -V get_&amp;lt;/span&amp;gt;                                           !&amp;gt; runs all the Unit Tests&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
* Run specific Unit Test using &#039;&#039;&#039;ctest&#039;&#039;&#039;:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi&amp;lt;/span&amp;gt;                                    !&amp;gt; sub-directory of interface root location&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;ctest -VV -R test_romsjedi_geometry&amp;lt;/span&amp;gt;                        !&amp;gt; run geometry Unit Test&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
* Run specific Unit Test using &#039;&#039;&#039;mpirun&#039;&#039;&#039; to facilitate TotalView debugging:&amp;lt;div class=&amp;quot;box&amp;quot;&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;cd build_wc13/roms-jedi/test&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -n 2     ../../bin/romsjedi_hofx.x testinput/hofx_4d.yaml &amp;gt; &amp;amp; log &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;span class=&amp;quot;red&amp;quot;&amp;gt;mpirun -n 2 -tv ../../bin/romsjedi_hofx.x testinput/hofx_4d.yaml &amp;amp;&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
Currently, the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; has the following &#039;&#039;&#039;Unit Test Cases&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
! ctest -VV -R !! mpirun -n 2 &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;romsjedi_coding_norms&#039;&#039;&#039; ||  NA &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_geometry&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_geometry&#039;&#039;&#039;  &#039;&#039;testinput/geometry.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_geometryiterator&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_geometryiterator&#039;&#039;&#039; &#039;&#039;testinput/geometryiterator.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_state&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_state&#039;&#039;&#039; &#039;&#039;testinput/state.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_increment&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_increment&#039;&#039;&#039; &#039;&#039;testinput/increment.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_model&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_model&#039;&#039;&#039; &#039;&#039;testinput/model.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_linearmodel&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_linearmodel&#039;&#039;&#039; &#039;&#039;testinput/linearmodel.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_error_covariance&#039;&#039;&#039; || &#039;&#039;&#039;test_romsjedi_error_covariance&#039;&#039;&#039; &#039;&#039;testinput/error_covariance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_hofx_nomodel&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx_nomodel.x&#039;&#039;&#039; &#039;&#039;testinput/hofx_nomodel.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_hofx_4d&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/hofx_4d.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_makeobs_4d&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/makeobs_4d.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_makeobs_4d_perturbed&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/makeobs_4d_perturbed.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_diffstates&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_diffstates.x&#039;&#039;&#039; &#039;&#039;testinput/diffstates.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_forecast_roms&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_forecast.x&#039;&#039;&#039; &#039;&#039;testinput/forecast_roms.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_bump_parameters_cor_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/parameters_bump_cor_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_bump_loc_parameters_cor_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/parameters_bump_loc_cor_nicas.yaml&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_dirac_cov_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/dirac_cov_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_pert&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_pert.x&#039;&#039;&#039; &#039;&#039;testinput/ens_perturbation.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_variance&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_variance.x&#039;&#039;&#039; &#039;&#039;testinput/ens_variance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_mean_variance&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_mean_variance.x&#039;&#039;&#039; &#039;&#039;testinput/ens_mean_variance.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_recenter&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_ens_recenter.x&#039;&#039;&#039; &#039;&#039;testinput/ens_recenter.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_ens_hofx&#039;&#039;&#039; || &#039;&#039;&#039;mpirun -n 6&#039;&#039;&#039; &#039;&#039;&#039;../../bin/romsjedi_ens_hofx.x&#039;&#039;&#039; &#039;&#039;testinput/ens_hofx.yaml&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_dirac_ens_cov_nicas&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_error_covariance_toolbox.x&#039;&#039;&#039; &#039;&#039;testinput/dirac_ens_cov_nicas.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_zero_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_zero_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_single_obs&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_single_obs.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dvar_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dvar_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3denvar_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3denvar_4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_regular_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_regular_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_regular_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_regular_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_4dfgat_primal&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_4dfgat_primal.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_3dhyb_4dfgat_dual&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/3dhyb_4dfgat_dual.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_split_observer&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_split_observer.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_split_solver&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_letkf.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_split_solver.yaml&#039;&#039; &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;test_romsjedi_letkf_3dhyb&#039;&#039;&#039; || &#039;&#039;&#039;../../bin/romsjedi_var.x&#039;&#039;&#039; &#039;&#039;testinput/letkf_3dhyb.yaml&#039;&#039; &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Observations&amp;diff=6578</id>
		<title>ROMS-JEDI Observations</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=ROMS-JEDI_Observations&amp;diff=6578"/>
		<updated>2023-08-30T19:32:43Z</updated>

		<summary type="html">&lt;p&gt;Robertson: Created page with &amp;quot;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Observations&amp;lt;/div&amp;gt;  The following diagram shows the observations used to test the &amp;#039;&amp;#039;&amp;#039;ROMS-JEDI&amp;#039;&amp;#039;&amp;#039; interface with the default &amp;#039;&amp;#039;&amp;#039;WC13&amp;#039;&amp;#039;&amp;#039; applicatio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;title&amp;quot;&amp;gt;ROMS-JEDI Observations&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following diagram shows the observations used to test the &#039;&#039;&#039;ROMS-JEDI&#039;&#039;&#039; interface with the default &#039;&#039;&#039;WC13&#039;&#039;&#039; application:&lt;br /&gt;
&lt;br /&gt;
[[Image:romsjedi_obs.png|1000px|left]]&lt;br /&gt;
&amp;lt;div style=&amp;quot;clear: both&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IODA Observation files==&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Observation Type   !!   NetCDF-4/HDF5 File&lt;br /&gt;
|-&lt;br /&gt;
| Absolute Dynamic Topography  || wc13_adt_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| ADT single datum             || wc13_adt_single_obs_20040105.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Potential Temperature        || wc13_ptemp_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Salinity                     || wc13_salt_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Sea Surface Temperature      || wc13_sst_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| SST single datum             || wc13_sst_single_obs_20040105.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Insitu&#039;&#039; Temperature           || wc13_temp_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Temperature-Salinity Profile || wc13_TS_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface U-velocity           || wc13_usur_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface V-velocity           || wc13_vsur_20040103.nc4 &lt;br /&gt;
|-&lt;br /&gt;
| Surface Currents             || wc13_uv_sur_20040103.nc4  &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
	<entry>
		<id>https://www.myroms.org/wiki/index.php?title=File:romsjedi_obs.png&amp;diff=6577</id>
		<title>File:romsjedi obs.png</title>
		<link rel="alternate" type="text/html" href="https://www.myroms.org/wiki/index.php?title=File:romsjedi_obs.png&amp;diff=6577"/>
		<updated>2023-08-30T19:25:13Z</updated>

		<summary type="html">&lt;p&gt;Robertson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Robertson</name></author>
	</entry>
</feed>