<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://ccrm.vims.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eli</id>
	<title>ccrmwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://ccrm.vims.edu/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Eli"/>
	<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php/Special:Contributions/Eli"/>
	<updated>2026-05-07T07:59:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Hydraulic_structures&amp;diff=1394</id>
		<title>Hydraulic structures</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Hydraulic_structures&amp;diff=1394"/>
		<updated>2019-04-08T07:08:28Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Hydraulic Structures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hydraulic Structures ==&lt;br /&gt;
&lt;br /&gt;
The hydraulic structures module is a facility to represent structures such as tidal radial gates, weirs and culverts with the model using common representations from 1D hydraulic modeling. Fairly complete documentation may be found in the Hydraulic Structures in SCHISM.&lt;br /&gt;
&lt;br /&gt;
Besides this manual, there are two things you might want to explore:&lt;br /&gt;
* California Dept. Water Resources (DWR preprocessor includes structures and uses geophysical coordinates rather than node numbers in its interface. This may be a convenient if you regularly update grids.&lt;br /&gt;
* The Submerged Aquatic Vegetation module reduces to fairly straightforward drag formula for the case of emergent vegetation. If you have something like bridge piers that you want to represent using the usual A*C_d*|U|*U approximation, you might want to use the vegetation module.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Hydraulic_structures&amp;diff=1393</id>
		<title>Hydraulic structures</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Hydraulic_structures&amp;diff=1393"/>
		<updated>2019-04-08T06:57:41Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot;== Hydraulic Structures ==  The hydraulic structures module is a facility to represent structures such as tidal radial gates, weirs and culverts with the model using simple (e...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Hydraulic Structures ==&lt;br /&gt;
&lt;br /&gt;
The hydraulic structures module is a facility to represent structures such as tidal radial gates, weirs and culverts with the model using simple (essentially 1D) representation.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=1392</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=1392"/>
		<updated>2019-04-08T06:54:58Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Part I: Formal documentation pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;!-- The map below indicates the location of visitors to this site. Click on the map to see a larger view.&lt;br /&gt;
{|&lt;br /&gt;
|[http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= SCHISM Forum =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this site under 'User contribution' is contributed by users and developers alike, and therefore the developers cannot guarantee all info is correct and up to date, although they are committed to patrolling the site regularly. Verify if necessary by sending a message to the SCHISM mailing-list: schism_list@vims.edu&lt;br /&gt;
&amp;lt;LI&amp;gt;Click the logo on the left anytime to get back to this main wiki page. 'SCHISM web' below is a link to the main SCHISM web site &lt;br /&gt;
&amp;lt;LI&amp;gt; Some info may be version sensitive, and so consult the files in your source code bundle for up-to-date info&lt;br /&gt;
&amp;lt;LI&amp;gt; Please consider contributing to any topic and suggest new topics of your interest. You first need to have an account created for you (we do not allow people to create accounts themselves to prevent spams). If you would like to contribute to the page please send an e-mail to [mailto:yjzhang@vims.edu Joseph Zhang]. &lt;br /&gt;
&amp;lt;LI&amp;gt; The links below that have content are in blue.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{|&lt;br /&gt;
|The map below indicates the location of visitors to this site. &amp;lt;br&amp;gt;Click on the map to see a larger view  || || || || || || || || || || || || [http://ccrm.vims.edu/schismweb/ '''SCHISM web''']   &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|     [http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png] || ||  || ||  || || &lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Part I: Formal documentation pages ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [http://ccrm.vims.edu/schismweb/ SCHISM web]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
** [[Downloading and compiling SCHISM and utilities]]&lt;br /&gt;
** [[Installation on Mac]]&lt;br /&gt;
** [[Running SCHISM on Windows]]&lt;br /&gt;
** [[Compiling SCHISM on Windows]]&lt;br /&gt;
** [[Docker container]]&lt;br /&gt;
** [[Visualization with VisIT]]&lt;br /&gt;
&lt;br /&gt;
* [[Online tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Extra model documentation]]&lt;br /&gt;
**[http://ccrm.vims.edu/schismweb/combined_theory_manual.pdf Theory Manual]&lt;br /&gt;
** [http://ccrm.vims.edu/schismweb/manual.html Description of some input files]&lt;br /&gt;
** [[For developers]] &lt;br /&gt;
**[http://ccrm.vims.edu/yinglong/wiki_files/MPI_developers_notes.pdf Developer's notes on the code] &lt;br /&gt;
&lt;br /&gt;
** [[Windwave module]] &lt;br /&gt;
** [[Sediment Transport Module (3D)]]&lt;br /&gt;
** [[Sediment Transport Module (2D)]] &lt;br /&gt;
** [[Water quality module]]--&amp;gt;&lt;br /&gt;
** [[Ecosystem modules]]&lt;br /&gt;
** [[Oil spill module]]&lt;br /&gt;
** [[Hydraulic structures]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--*[[User manual]]&lt;br /&gt;
** [http://ccrm.vims.edu/schism/manual.html Hydrodynamics]&lt;br /&gt;
** [[Scalar Transport]]&lt;br /&gt;
** [[Sediment Transport]]&lt;br /&gt;
** [[Windwave]]&lt;br /&gt;
** [[Ecology]] &lt;br /&gt;
** [[Hydraulic module]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Part II: User contributions ==&lt;br /&gt;
* [[Jobs and positions available]]&lt;br /&gt;
&amp;lt;!-- * [[SCHISM FAQ]] --&amp;gt;&lt;br /&gt;
* [[Special topics]]&lt;br /&gt;
** [[Convergence study with SCHISM]]&lt;br /&gt;
** [[Conservation]]&lt;br /&gt;
** [[ACE tools]]&lt;br /&gt;
&amp;lt;!-- ** [[Mesh generation]] &lt;br /&gt;
** [[Simulating wetting and drying with SCHISM]]&lt;br /&gt;
** [[Salt intrusion study with SCHISM]]&lt;br /&gt;
** [[2D vs. 3D mode]] &lt;br /&gt;
**[[Debugging after a run crashes]]&lt;br /&gt;
** [[Hydrostatic vs. non-hydrostatic calculation]]&lt;br /&gt;
** [[Explicit vs. implicit calculation]]&lt;br /&gt;
** [[Spatial and temporal discretization]]--&amp;gt;&lt;br /&gt;
** [[Updating a simulation after changing an existing mesh]]&lt;br /&gt;
** [[Tides]]&lt;br /&gt;
** [[Salinity and temperature nudging]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/Report-ChezyFlow-Sept2011.pdf  Bottom boundary layer formulation in SCHISM]&lt;br /&gt;
** [[Baroclinic vs. barotropic mode]]&lt;br /&gt;
** [[Atmospheric forcing]]&lt;br /&gt;
** [[Tsunami simulation]]&lt;br /&gt;
** [[How to download HYCOM]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [[Output formats and postprocessing]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
 ** [[Visualization]]&lt;br /&gt;
** [[Parallel output: time and processor blocks]]&lt;br /&gt;
** [[One way nesting]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Share your tools]]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=1391</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=1391"/>
		<updated>2019-04-08T06:53:46Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Part I: Formal documentation pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;!-- The map below indicates the location of visitors to this site. Click on the map to see a larger view.&lt;br /&gt;
{|&lt;br /&gt;
|[http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= SCHISM Forum =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this site under 'User contribution' is contributed by users and developers alike, and therefore the developers cannot guarantee all info is correct and up to date, although they are committed to patrolling the site regularly. Verify if necessary by sending a message to the SCHISM mailing-list: schism_list@vims.edu&lt;br /&gt;
&amp;lt;LI&amp;gt;Click the logo on the left anytime to get back to this main wiki page. 'SCHISM web' below is a link to the main SCHISM web site &lt;br /&gt;
&amp;lt;LI&amp;gt; Some info may be version sensitive, and so consult the files in your source code bundle for up-to-date info&lt;br /&gt;
&amp;lt;LI&amp;gt; Please consider contributing to any topic and suggest new topics of your interest. You first need to have an account created for you (we do not allow people to create accounts themselves to prevent spams). If you would like to contribute to the page please send an e-mail to [mailto:yjzhang@vims.edu Joseph Zhang]. &lt;br /&gt;
&amp;lt;LI&amp;gt; The links below that have content are in blue.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
{|&lt;br /&gt;
|The map below indicates the location of visitors to this site. &amp;lt;br&amp;gt;Click on the map to see a larger view  || || || || || || || || || || || || [http://ccrm.vims.edu/schismweb/ '''SCHISM web''']   &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|     [http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png] || ||  || ||  || || &lt;br /&gt;
|- &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Part I: Formal documentation pages ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [http://ccrm.vims.edu/schismweb/ SCHISM web]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
** [[Downloading and compiling SCHISM and utilities]]&lt;br /&gt;
** [[Installation on Mac]]&lt;br /&gt;
** [[Running SCHISM on Windows]]&lt;br /&gt;
** [[Compiling SCHISM on Windows]]&lt;br /&gt;
** [[Docker container]]&lt;br /&gt;
** [[Visualization with VisIT]]&lt;br /&gt;
&lt;br /&gt;
* [[Online tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Extra model documentation]]&lt;br /&gt;
**[http://ccrm.vims.edu/schismweb/combined_theory_manual.pdf Theory Manual]&lt;br /&gt;
** [http://ccrm.vims.edu/schismweb/manual.html Description of some input files]&lt;br /&gt;
** [[For developers]] &lt;br /&gt;
**[http://ccrm.vims.edu/yinglong/wiki_files/MPI_developers_notes.pdf Developer's notes on the code] &lt;br /&gt;
&lt;br /&gt;
** [[Windwave module]] &lt;br /&gt;
** [[Sediment Transport Module (3D)]]&lt;br /&gt;
** [[Sediment Transport Module (2D)]] &lt;br /&gt;
** [[Water quality module]]--&amp;gt;&lt;br /&gt;
** [[Ecosystem modules]]&lt;br /&gt;
** [[Oil spill module]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--*[[User manual]]&lt;br /&gt;
** [http://ccrm.vims.edu/schism/manual.html Hydrodynamics]&lt;br /&gt;
** [[Scalar Transport]]&lt;br /&gt;
** [[Sediment Transport]]&lt;br /&gt;
** [[Windwave]]&lt;br /&gt;
** [[Ecology]] &lt;br /&gt;
** [[Hydraulic module]]--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Part II: User contributions ==&lt;br /&gt;
* [[Jobs and positions available]]&lt;br /&gt;
&amp;lt;!-- * [[SCHISM FAQ]] --&amp;gt;&lt;br /&gt;
* [[Special topics]]&lt;br /&gt;
** [[Convergence study with SCHISM]]&lt;br /&gt;
** [[Conservation]]&lt;br /&gt;
** [[ACE tools]]&lt;br /&gt;
&amp;lt;!-- ** [[Mesh generation]] &lt;br /&gt;
** [[Simulating wetting and drying with SCHISM]]&lt;br /&gt;
** [[Salt intrusion study with SCHISM]]&lt;br /&gt;
** [[2D vs. 3D mode]] &lt;br /&gt;
**[[Debugging after a run crashes]]&lt;br /&gt;
** [[Hydrostatic vs. non-hydrostatic calculation]]&lt;br /&gt;
** [[Explicit vs. implicit calculation]]&lt;br /&gt;
** [[Spatial and temporal discretization]]--&amp;gt;&lt;br /&gt;
** [[Updating a simulation after changing an existing mesh]]&lt;br /&gt;
** [[Tides]]&lt;br /&gt;
** [[Salinity and temperature nudging]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/Report-ChezyFlow-Sept2011.pdf  Bottom boundary layer formulation in SCHISM]&lt;br /&gt;
** [[Baroclinic vs. barotropic mode]]&lt;br /&gt;
** [[Atmospheric forcing]]&lt;br /&gt;
** [[Tsunami simulation]]&lt;br /&gt;
** [[How to download HYCOM]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- * [[Output formats and postprocessing]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
 ** [[Visualization]]&lt;br /&gt;
** [[Parallel output: time and processor blocks]]&lt;br /&gt;
** [[One way nesting]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Share your tools]]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1011</id>
		<title>New UGRID netcdf format v0.9</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1011"/>
		<updated>2015-06-30T21:23:33Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found &lt;br /&gt;
[https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md here].&lt;br /&gt;
&lt;br /&gt;
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;UL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt; CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;&lt;br /&gt;
  &amp;lt;LI&amp;gt; MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;&lt;br /&gt;
  &amp;lt;LI&amp;gt; Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;&lt;br /&gt;
  &amp;lt;LI&amp;gt; OHSU &amp;amp; VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed &amp;gt;8 years ago;&lt;br /&gt;
&amp;lt;/UL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs. &lt;br /&gt;
&lt;br /&gt;
Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netcdf example_compressed {&lt;br /&gt;
dimensions:&lt;br /&gt;
    nSCHISM_hgrid_node          = 144773 ;&lt;br /&gt;
    nSCHISM_hgrid_face          = 238116 ;&lt;br /&gt;
    nSCHISM_hgrid_edge          = 400000 ;&lt;br /&gt;
    nMaxSCHISM_hgrid_face_nodes = 4 ;&lt;br /&gt;
    SCHISM_vgrid_layers         = 51;&lt;br /&gt;
    two                  = 2 ;&lt;br /&gt;
    time = UNLIMITED ; &lt;br /&gt;
variables:&lt;br /&gt;
	float time(time) ;&lt;br /&gt;
	time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
	time:units = &amp;quot;seconds since 2013-28-08  00:00:00 PST&amp;quot; ;&lt;br /&gt;
	time:base_date = &amp;quot;08/28/2013 00:00:00 PST                         &amp;quot; ;&lt;br /&gt;
	time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    int SCHISM_hgrid ;&lt;br /&gt;
	SCHISM_hgrid:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:long_name = &amp;quot;Topology data of 2d unstructured mesh&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:topology_dimension = 2 ;&lt;br /&gt;
	SCHISM_hgrid:node_coordinates = &amp;quot;SCHISM_hgrid_node_x SCHISM_hgrid_node_y&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:face_node_connectivity = &amp;quot;SCHISM_hgrid_face_nodes&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_coordinates  = &amp;quot;SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:face_coordinates  = &amp;quot;SCHISM_hgrid_face_x SCHISM_hgrid_face_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_node_connectivity = &amp;quot;SCHISM_hgrid_edge_nodes&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    int Mesh3D;&lt;br /&gt;
        Mesh3D:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	Mesh3D:long_name = &amp;quot;Topology data of 3d unstructured mesh&amp;quot; ;&lt;br /&gt;
	Mesh3D:topology_dimension = 3 ;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:long_name = &amp;quot;Horizontal Triangular Element Table&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:units = &amp;quot;non-dimensional&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:cf_role = &amp;quot;face_node_connectivity&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:start_index = 1 ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:_FillValue = -999999;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:cf_role =&amp;quot;edge_node_connectivity&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:long_name =&amp;quot;Map every edge to the two nodes that it connects&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:start_index =1;  &lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;&lt;br /&gt;
        SCHISM_hgrid_node_x:long_name = &amp;quot;x_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:units = &amp;quot;meters&amp;quot; ;       # alternatively, degrees lat/lon&lt;br /&gt;
	SCHISM_hgrid_node_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;&lt;br /&gt;
	SCHISM_hgrid_node_y:long_name = &amp;quot;y_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:units = &amp;quot;meters&amp;quot; ;       # alternatively, degrees lat/lon&lt;br /&gt;
	SCHISM_hgrid_node_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:location = &amp;quot;node&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_x:long_name = &amp;quot;x_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:location = &amp;quot;face&amp;quot; ;    &lt;br /&gt;
     &lt;br /&gt;
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_y:long_name = &amp;quot;y_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:location = &amp;quot;face&amp;quot; ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:long_name = &amp;quot;x_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:location = &amp;quot;edge&amp;quot; ;   &lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:long_name = &amp;quot;y_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:location = &amp;quot;edge&amp;quot; ;           &lt;br /&gt;
      &lt;br /&gt;
        &lt;br /&gt;
    float depth(nSCHISM_hgrid_node) ;&lt;br /&gt;
	depth:long_name = &amp;quot;Bathymetry&amp;quot; ;&lt;br /&gt;
	depth:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	depth:positive = &amp;quot;down&amp;quot; ;&lt;br /&gt;
	depth:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	depth:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 61 elev.61&lt;br /&gt;
 &lt;br /&gt;
    float elev(time,nSCHISM_hgrid_node);&lt;br /&gt;
    elev:long_name =&amp;quot;water surface height above reference datum&amp;quot;;&lt;br /&gt;
    elev:missing_value = &amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
    elev:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    elev:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 62 wind.62&lt;br /&gt;
 &lt;br /&gt;
    float u(time, nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Wind Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time, nv, node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Wind Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 63, salt.63 temp.63&lt;br /&gt;
 &lt;br /&gt;
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
    salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    salt:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    salt:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
    temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    temp:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    temp:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 64, hvel.64&lt;br /&gt;
&lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 65 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 // type 66 dtbe.66&lt;br /&gt;
 &lt;br /&gt;
    float dtbe(time,nSCHISM_hgrid_face);&lt;br /&gt;
    dtbe:long_name =&amp;quot;minimal time step allowed at each element&amp;quot;;&lt;br /&gt;
    dtbe:missing_value =&amp;quot;-999999.&amp;quot;;&lt;br /&gt;
    dtbe:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    dtbe:location=&amp;quot;node&amp;quot;; &amp;lt;--edge?&lt;br /&gt;
    &lt;br /&gt;
 // type 67 vector at 3d mesh edge center&lt;br /&gt;
 &lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 //type 68 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 //type 69 vert.69 &lt;br /&gt;
 &lt;br /&gt;
   float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   w:long_name=&amp;quot;vertical velocity at face center at all levels&amp;quot;;&lt;br /&gt;
   w:missing_value =&amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
   w:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   w:location =&amp;quot;face&amp;quot;;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
 //type 70 temp.70 salt.70&lt;br /&gt;
   &lt;br /&gt;
   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
   salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   salt:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   salt:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
   temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   temp:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   temp:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
    :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
data:&lt;br /&gt;
&lt;br /&gt;
 time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, &lt;br /&gt;
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, &lt;br /&gt;
    75600, 79200, 82800, 86400 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1010</id>
		<title>New UGRID netcdf format v0.9</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1010"/>
		<updated>2015-06-30T21:15:18Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found &lt;br /&gt;
[https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md here].&lt;br /&gt;
&lt;br /&gt;
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;UL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt; CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;&lt;br /&gt;
  &amp;lt;LI&amp;gt; MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;&lt;br /&gt;
  &amp;lt;LI&amp;gt; Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;&lt;br /&gt;
  &amp;lt;LI&amp;gt; OHSU &amp;amp; VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed &amp;gt;8 years ago;&lt;br /&gt;
&amp;lt;/UL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs. &lt;br /&gt;
&lt;br /&gt;
Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netcdf example_compressed {&lt;br /&gt;
dimensions:&lt;br /&gt;
    nSCHISM_hgrid_node          = 144773 ;&lt;br /&gt;
    nSCHISM_hgrid_face          = 238116 ;&lt;br /&gt;
    nSCHISM_hgrid_edge          = 400000 ;&lt;br /&gt;
    nMaxSCHISM_hgrid_face_nodes = 4 ;&lt;br /&gt;
    SCHISM_vgrid_layers         = 51;&lt;br /&gt;
    two                  = 2 ;&lt;br /&gt;
    time = UNLIMITED ; &lt;br /&gt;
variables:&lt;br /&gt;
	float time(time) ;&lt;br /&gt;
	time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
&lt;br /&gt;
	time:units = &amp;quot;seconds since 2013-28-08  00:00:00 PST&amp;quot; ;&lt;br /&gt;
	time:base_date = &amp;quot;08/28/2013 00:00:00 PST                         &amp;quot; ;&lt;br /&gt;
	time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    int SCHISM_hgrid ;&lt;br /&gt;
	SCHISM_hgrid:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:long_name = &amp;quot;Topology data of 2d unstructured mesh&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:topology_dimension = 2 ;&lt;br /&gt;
	SCHISM_hgrid:node_coordinates = &amp;quot;SCHISM_hgrid_node_x SCHISM_hgrid_node_y&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:face_node_connectivity = &amp;quot;SCHISM_hgrid_face_nodes&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_coordinates  = &amp;quot;SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:face_coordinates  = &amp;quot;SCHISM_hgrid_face_x SCHISM_hgrid_face_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_node_connectivity = &amp;quot;SCHISM_hgrid_edge_nodes&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    int Mesh3D;&lt;br /&gt;
        Mesh3D:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	Mesh3D:long_name = &amp;quot;Topology data of 3d unstructured mesh&amp;quot; ;&lt;br /&gt;
	Mesh3D:topology_dimension = 3 ;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:long_name = &amp;quot;Horizontal Triangular Element Table&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:units = &amp;quot;non-dimensional&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:cf_role = &amp;quot;face_node_connectivity&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:start_index = 1 ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:_FillValue = -999999;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:cf_role =&amp;quot;edge_node_connectivity&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:long_name =&amp;quot;Map every edge to the two nodes that it connects&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:start_index =1;  &lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;&lt;br /&gt;
        SCHISM_hgrid_node_x:long_name = &amp;quot;x_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;&lt;br /&gt;
	SCHISM_hgrid_node_y:long_name = &amp;quot;y_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:location = &amp;quot;node&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_x:long_name = &amp;quot;x_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:location = &amp;quot;face&amp;quot; ;    &lt;br /&gt;
     &lt;br /&gt;
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_y:long_name = &amp;quot;y_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:location = &amp;quot;face&amp;quot; ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:long_name = &amp;quot;x_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:location = &amp;quot;edge&amp;quot; ;   &lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:long_name = &amp;quot;y_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:location = &amp;quot;edge&amp;quot; ;           &lt;br /&gt;
      &lt;br /&gt;
        &lt;br /&gt;
    float depth(nSCHISM_hgrid_node) ;&lt;br /&gt;
	depth:long_name = &amp;quot;Bathymetry&amp;quot; ;&lt;br /&gt;
	depth:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	depth:positive = &amp;quot;down&amp;quot; ;&lt;br /&gt;
	depth:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	depth:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 61 elev.61&lt;br /&gt;
 &lt;br /&gt;
    float elev(time,nSCHISM_hgrid_node);&lt;br /&gt;
    elev:long_name =&amp;quot;water surface height above reference datum&amp;quot;;&lt;br /&gt;
    elev:missing_value = &amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
    elev:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    elev:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 62 wind.62&lt;br /&gt;
 &lt;br /&gt;
    float u(time, nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Wind Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time, nv, node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Wind Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 63, salt.63 temp.63&lt;br /&gt;
 &lt;br /&gt;
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
    salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    salt:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    salt:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
    temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    temp:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    temp:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 64, hvel.64&lt;br /&gt;
&lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 65 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 // type 66 dtbe.66&lt;br /&gt;
 &lt;br /&gt;
    float dtbe(time,nSCHISM_hgrid_face);&lt;br /&gt;
    dtbe:long_name =&amp;quot;minimal time step allowed at each element&amp;quot;;&lt;br /&gt;
    dtbe:missing_value =&amp;quot;-999999.&amp;quot;;&lt;br /&gt;
    dtbe:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    dtbe:location=&amp;quot;node&amp;quot;; &amp;lt;--edge?&lt;br /&gt;
    &lt;br /&gt;
 // type 67 vector at 3d mesh edge center&lt;br /&gt;
 &lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 //type 68 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 //type 69 vert.69 &lt;br /&gt;
 &lt;br /&gt;
   float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   w:long_name=&amp;quot;vertical velocity at face center at all levels&amp;quot;;&lt;br /&gt;
   w:missing_value =&amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
   w:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   w:location =&amp;quot;face&amp;quot;;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
 //type 70 temp.70 salt.70&lt;br /&gt;
   &lt;br /&gt;
   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
   salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   salt:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   salt:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
   temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   temp:mesh = &amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
   temp:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
    :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
data:&lt;br /&gt;
&lt;br /&gt;
 time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, &lt;br /&gt;
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, &lt;br /&gt;
    75600, 79200, 82800, 86400 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1008</id>
		<title>New UGRID netcdf format v0.9</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1008"/>
		<updated>2015-06-30T16:16:29Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found &lt;br /&gt;
[https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md here].&lt;br /&gt;
&lt;br /&gt;
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;UL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt; CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;&lt;br /&gt;
  &amp;lt;LI&amp;gt; MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;&lt;br /&gt;
  &amp;lt;LI&amp;gt; Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;&lt;br /&gt;
  &amp;lt;LI&amp;gt; OHSU &amp;amp; VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed &amp;gt;8 years ago;&lt;br /&gt;
&amp;lt;/UL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs. &lt;br /&gt;
&lt;br /&gt;
Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netcdf example_compressed {&lt;br /&gt;
dimensions:&lt;br /&gt;
    nSCHISM_hgrid_node          = 144773 ;&lt;br /&gt;
    nSCHISM_hgrid_face          = 238116 ;&lt;br /&gt;
    nSCHISM_hgrid_edge          = 400000 ;&lt;br /&gt;
    nMaxSCHISM_hgrid_face_nodes = 4 ;&lt;br /&gt;
    SCHISM_vgrid_layers         = 51;&lt;br /&gt;
    two                  = 2 ;&lt;br /&gt;
    time = UNLIMITED ; &lt;br /&gt;
variables:&lt;br /&gt;
	float time(time) ;&lt;br /&gt;
	time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
	time:units = &amp;quot;seconds since 2013-28-08  00:00:00 PST&amp;quot; ;&lt;br /&gt;
	time:base_date = &amp;quot;08/28/2013 00:00:00 PST                         &amp;quot; ;&lt;br /&gt;
	time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    int SCHISM_hgrid ;&lt;br /&gt;
	SCHISM_hgrid:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:long_name = &amp;quot;Topology data of 2d unstructured mesh&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:topology_dimension = 2 ;&lt;br /&gt;
	SCHISM_hgrid:node_coordinates = &amp;quot;SCHISM_hgrid_node_x SCHISM_hgrid_node_y&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid:face_node_connectivity = &amp;quot;SCHISM_hgrid_face_nodes&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_coordinates  = &amp;quot;SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:face_coordinates  = &amp;quot;SCHISM_hgrid_face_x SCHISM_hgrid_face_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_node_connectivity = &amp;quot;SCHISM_hgrid_edge_nodes&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    int Mesh3D;&lt;br /&gt;
        Mesh3D:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
	Mesh3D:long_name = &amp;quot;Topology data of 3d unstructured mesh&amp;quot; ;&lt;br /&gt;
	Mesh3D:topology_dimension = 3 ;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:long_name = &amp;quot;Horizontal Triangular Element Table&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:units = &amp;quot;non-dimensional&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:cf_role = &amp;quot;face_node_connectivity&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:start_index = 1 ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:_FillValue = -999999;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:cf_role =&amp;quot;edge_node_connectivity&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:long_name =&amp;quot;Map every edge to the two nodes that it connects&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:start_index =1;  &lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;&lt;br /&gt;
        SCHISM_hgrid_node_x:long_name = &amp;quot;x_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;&lt;br /&gt;
	SCHISM_hgrid_node_y:long_name = &amp;quot;y_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:location = &amp;quot;node&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_x:long_name = &amp;quot;x_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_x:location = &amp;quot;face&amp;quot; ;    &lt;br /&gt;
     &lt;br /&gt;
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;&lt;br /&gt;
	SCHISM_hgrid_face_y:long_name = &amp;quot;y_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_y:location = &amp;quot;face&amp;quot; ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:long_name = &amp;quot;x_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_x:location = &amp;quot;edge&amp;quot; ;   &lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:long_name = &amp;quot;y_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_edge_y:location = &amp;quot;edge&amp;quot; ;           &lt;br /&gt;
      &lt;br /&gt;
        &lt;br /&gt;
    float depth(nSCHISM_hgrid_node) ;&lt;br /&gt;
	depth:long_name = &amp;quot;Bathymetry&amp;quot; ;&lt;br /&gt;
	depth:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	depth:positive = &amp;quot;down&amp;quot; ;&lt;br /&gt;
	depth:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	depth:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 61 elev.61&lt;br /&gt;
 &lt;br /&gt;
    float elev(time,nSCHISM_hgrid_node);&lt;br /&gt;
    elev:long_name =&amp;quot;water surface height agove reference datum&amp;quot;;&lt;br /&gt;
    elev:missing_value = &amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
    elev:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    elev:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 62 wind.62&lt;br /&gt;
 &lt;br /&gt;
    float u(time, nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Wind Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time, nv, node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Wind Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 63, salt.63 temp.63&lt;br /&gt;
 &lt;br /&gt;
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
    salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    salt:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
    temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    temp:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 64, hvel.64&lt;br /&gt;
&lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 65 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 // type 66 dtbe.66&lt;br /&gt;
 &lt;br /&gt;
    float dtbe(time,nSCHISM_hgrid_face);&lt;br /&gt;
    dtbe:long_name =&amp;quot;minimal time step allowed at each element&amp;quot;;&lt;br /&gt;
    dtbe:missing_value =&amp;quot;-999999.&amp;quot;;&lt;br /&gt;
    dtbe:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    dtbe:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 67 vector at 3d mesh edge center&lt;br /&gt;
 &lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 //type 68 omit&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 //type 69 vert.69 &lt;br /&gt;
 &lt;br /&gt;
   float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   w:long_name=&amp;quot;vertical velocity at face center at all levels&amp;quot;;&lt;br /&gt;
   w:missing_value =&amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
   w:mesh =&amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   w:location =&amp;quot;face&amp;quot;;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
 //type 70 temp.70 salt.70&lt;br /&gt;
   &lt;br /&gt;
   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
   salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   salt:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
   temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   temp:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
    :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
data:&lt;br /&gt;
&lt;br /&gt;
 time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, &lt;br /&gt;
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, &lt;br /&gt;
    75600, 79200, 82800, 86400 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1007</id>
		<title>New UGRID netcdf format v0.9</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1007"/>
		<updated>2015-06-30T16:11:23Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found &lt;br /&gt;
[https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md here].&lt;br /&gt;
&lt;br /&gt;
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;UL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt; CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and our evolving understanding of the v0.9 format;&lt;br /&gt;
  &amp;lt;LI&amp;gt; MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;&lt;br /&gt;
  &amp;lt;LI&amp;gt; Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;&lt;br /&gt;
  &amp;lt;LI&amp;gt; OHSU &amp;amp; VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed &amp;gt;8 years ago;&lt;br /&gt;
&amp;lt;/UL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a proposal for how to present SCHISM data in UGRID format. It is meant as a straw man for discussion, but we (California DWR) will act on it because we need make our VisIt visualization plugin a continuous, reasonably well-maintained offering and so far the only stable version has been based on native binary outputs. &lt;br /&gt;
&lt;br /&gt;
Below is the schema. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netcdf example_compressed {&lt;br /&gt;
dimensions:&lt;br /&gt;
	nSCHISM_hgrid_node          = 144773 ;&lt;br /&gt;
	nSCHISM_hgrid_face          = 238116 ;&lt;br /&gt;
    nSCHISM_hgrid_edge          = 400000 ;&lt;br /&gt;
	nMaxSCHISM_hgrid_face_nodes = 4 ;&lt;br /&gt;
	SCHISM_vgrid_layers         = 51;&lt;br /&gt;
	two                  = 2 ;&lt;br /&gt;
	time = UNLIMITED ; &lt;br /&gt;
variables:&lt;br /&gt;
	float time(time) ;&lt;br /&gt;
		time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
		time:units = &amp;quot;seconds since 2013-28-08  00:00:00 PST&amp;quot; ;&lt;br /&gt;
		time:base_date = &amp;quot;08/28/2013 00:00:00 PST                         &amp;quot; ;&lt;br /&gt;
		time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    int SCHISM_hgrid ;&lt;br /&gt;
		SCHISM_hgrid:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:long_name = &amp;quot;Topology data of 2d unstructured mesh&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:topology_dimension = 2 ;&lt;br /&gt;
		SCHISM_hgrid:node_coordinates = &amp;quot;SCHISM_hgrid_node_x SCHISM_hgrid_node_y&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:face_node_connectivity = &amp;quot;SCHISM_hgrid_face_nodes&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_coordinates  = &amp;quot;SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:face_coordinates  = &amp;quot;SCHISM_hgrid_face_x SCHISM_hgrid_face_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_node_connectivity = &amp;quot;SCHISM_hgrid_edge_nodes&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    int Mesh3D;&lt;br /&gt;
        Mesh3D:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
		Mesh3D:long_name = &amp;quot;Topology data of 3d unstructured mesh&amp;quot; ;&lt;br /&gt;
		Mesh3D:topology_dimension = 3 ;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:long_name = &amp;quot;Horizontal Triangular Element Table&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:units = &amp;quot;non-dimensional&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:cf_role = &amp;quot;face_node_connectivity&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_face_nodes:start_index = 1 ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:_FillValue = -999999;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:cf_role =&amp;quot;edge_node_connectivity&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:long_name =&amp;quot;Map every edge to the two nodes that it connects&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:start_index =1;  &lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;&lt;br /&gt;
        SCHISM_hgrid_node_x:long_name = &amp;quot;x_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_x:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;&lt;br /&gt;
	SCHISM_hgrid_node_y:long_name = &amp;quot;y_coordinates&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
	SCHISM_hgrid_node_y:location = &amp;quot;node&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;&lt;br /&gt;
		SCHISM_hgrid_face_x:long_name = &amp;quot;x_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:location = &amp;quot;face&amp;quot; ;    &lt;br /&gt;
     &lt;br /&gt;
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;&lt;br /&gt;
		SCHISM_hgrid_face_y:long_name = &amp;quot;y_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:location = &amp;quot;face&amp;quot; ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:long_name = &amp;quot;x_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:location = &amp;quot;edge&amp;quot; ;   &lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:long_name = &amp;quot;y_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:location = &amp;quot;edge&amp;quot; ;           &lt;br /&gt;
      &lt;br /&gt;
        &lt;br /&gt;
    float depth(nSCHISM_hgrid_node) ;&lt;br /&gt;
		depth:long_name = &amp;quot;Bathymetry&amp;quot; ;&lt;br /&gt;
		depth:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		depth:positive = &amp;quot;down&amp;quot; ;&lt;br /&gt;
		depth:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		depth:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 61 elev.61&lt;br /&gt;
 &lt;br /&gt;
    float elev(time,nSCHISM_hgrid_node);&lt;br /&gt;
    elev:long_name =&amp;quot;water surface height agove reference datum&amp;quot;;&lt;br /&gt;
    elev:missing_value = &amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
    elev:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    elev:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 62 wind.62&lt;br /&gt;
 &lt;br /&gt;
    float u(time, nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Wind Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time, nv, node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Wind Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 63, salt.63 temp.63&lt;br /&gt;
 &lt;br /&gt;
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
    salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    salt:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
    temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    temp:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 64, hvel.64&lt;br /&gt;
&lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 65 missing&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 // type 66 dtbe.66&lt;br /&gt;
 &lt;br /&gt;
    float dtbe(time,nSCHISM_hgrid_face);&lt;br /&gt;
    dtbe:long_name =&amp;quot;minimal time step allowed at each element&amp;quot;;&lt;br /&gt;
    dtbe:missing_value =&amp;quot;-999999.&amp;quot;;&lt;br /&gt;
    dtbe:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    dtbe:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 67 vector at 3d mesh edge center&lt;br /&gt;
 &lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 //type 68 missing&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 //type 69 vert.69 &lt;br /&gt;
 &lt;br /&gt;
   float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   w:long_name=&amp;quot;vertical velocity at face center at all levels&amp;quot;;&lt;br /&gt;
   w:missing_value =&amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
   w:mesh =&amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   w:location =&amp;quot;face&amp;quot;;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
 //type 70 temp.70 salt.70&lt;br /&gt;
   &lt;br /&gt;
   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
   salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   salt:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
   temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   temp:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
		:Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
data:&lt;br /&gt;
&lt;br /&gt;
 time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, &lt;br /&gt;
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, &lt;br /&gt;
    75600, 79200, 82800, 86400 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1006</id>
		<title>New UGRID netcdf format v0.9</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=New_UGRID_netcdf_format_v0.9&amp;diff=1006"/>
		<updated>2015-06-29T23:01:32Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An IOOS working group led by Dr. Rich Signell have been working on a standard for unstructured grids. The latest is v0.9 as found &lt;br /&gt;
[https://github.com/ugrid-conventions/ugrid-conventions/blob/v0.9.0/ugrid-conventions.md here].&lt;br /&gt;
&lt;br /&gt;
A few SCHISM user groups have either built their own tools that use this new format or are working on this. Below is a summary of progress so far (as well as links if available):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;UL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt; CAL-DWR (Eli Ateljevich et al): have built VisIT plug-ins for the native binary and v0.9 format;&lt;br /&gt;
  &amp;lt;LI&amp;gt; MetOcean, NZ (Brett Beamsley): have made attempt to output into this format. Wish to build 1-way nesting util based on it;&lt;br /&gt;
  &amp;lt;LI&amp;gt; Nat. Univ Singapore (Haihua Xu): have built a [http://ccrm.vims.edu/yinglong/wiki_files/Xu-Netcdf-VisIT/ package] (including VisIT plug-in) based on some older UGRID netcdf standard, for ELCIRC and SELFE;&lt;br /&gt;
  &amp;lt;LI&amp;gt; OHSU &amp;amp; VIMS: the combine scripts can optionally output into netcdf format based on an older UGRID standard proposed &amp;gt;8 years ago;&lt;br /&gt;
&amp;lt;/UL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is a proposal for how to present SCHISM data in UGRID format. We are still working on names for the grids and variables, so it isn't too late right now to say you hate what we have. The biggest problem at the moment is a seeming lack of guidance as to how to refer to data that is on a layered 2D grid such as temperature in the example below. Also, though we purport to be CF compliant ... we don't really seem to be headed that way for variable names. &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
netcdf example_compressed {&lt;br /&gt;
dimensions:&lt;br /&gt;
	nSCHISM_hgrid_node          = 144773 ;&lt;br /&gt;
	nSCHISM_hgrid_face          = 238116 ;&lt;br /&gt;
    nSCHISM_hgrid_edge          = 400000 ;&lt;br /&gt;
	nMaxSCHISM_hgrid_face_nodes = 4 ;&lt;br /&gt;
	SCHISM_vgrid_layers         = 51;&lt;br /&gt;
	two                  = 2 ;&lt;br /&gt;
	time = UNLIMITED ; &lt;br /&gt;
variables:&lt;br /&gt;
	float time(time) ;&lt;br /&gt;
		time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
		time:units = &amp;quot;seconds since 2013-28-08  00:00:00 PST&amp;quot; ;&lt;br /&gt;
		time:base_date = &amp;quot;08/28/2013 00:00:00 PST                         &amp;quot; ;&lt;br /&gt;
		time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    int SCHISM_hgrid ;&lt;br /&gt;
		SCHISM_hgrid:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:long_name = &amp;quot;Topology data of 2d unstructured mesh&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:topology_dimension = 2 ;&lt;br /&gt;
		SCHISM_hgrid:node_coordinates = &amp;quot;SCHISM_hgrid_node_x SCHISM_hgrid_node_y&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid:face_node_connectivity = &amp;quot;SCHISM_hgrid_face_nodes&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_coordinates  = &amp;quot;SCHISM_hgrid_edge_x SCHISM_hgrid_edge_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:face_coordinates  = &amp;quot;SCHISM_hgrid_face_x SCHISM_hgrid_face_y&amp;quot; ;&lt;br /&gt;
        SCHISM_hgrid:edge_node_connectivity = &amp;quot;SCHISM_hgrid_edge_nodes&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    int Mesh3D;&lt;br /&gt;
        Mesh3D:cf_role = &amp;quot;mesh_topology&amp;quot; ;&lt;br /&gt;
		Mesh3D:long_name = &amp;quot;Topology data of 3d unstructured mesh&amp;quot; ;&lt;br /&gt;
		Mesh3D:topology_dimension = 3 ;&lt;br /&gt;
        &lt;br /&gt;
  &lt;br /&gt;
	int SCHISM_hgrid_face_nodes(nSCHISM_hgrid_face, nMaxSCHISM_hgrid_face_nodes) ;&lt;br /&gt;
	    SCHISM_hgrid_face_nodes:long_name = &amp;quot;Horizontal Triangular Element Table&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_nodes:units = &amp;quot;non-dimensional&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_nodes:cf_role = &amp;quot;face_node_connectivity&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_nodes:start_index = 1 ;&lt;br /&gt;
        SCHISM_hgrid_face_nodes:_FillValue = -999999;&lt;br /&gt;
        &lt;br /&gt;
    int SCHISM_hgrid_edge_nodes(nSCHISM_hgrid_edge,two);&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:cf_role =&amp;quot;edge_node_connectivity&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:long_name =&amp;quot;Map every edge to the two nodes that it connects&amp;quot;;&lt;br /&gt;
        SCHISM_hgrid_edge_nodes:start_index =1;  &lt;br /&gt;
        &lt;br /&gt;
	float SCHISM_hgrid_node_x(nSCHISM_hgrid_node) ;&lt;br /&gt;
		SCHISM_hgrid_node_x:long_name = &amp;quot;x_coordinates&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_x:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
	float SCHISM_hgrid_node_y(nSCHISM_hgrid_node) ;&lt;br /&gt;
		SCHISM_hgrid_node_y:long_name = &amp;quot;y_coordinates&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_y:mesh = &amp;quot;mesh&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_node_y:location = &amp;quot;node&amp;quot;;&lt;br /&gt;
        &lt;br /&gt;
    float SCHISM_hgrid_face_x(nSCHISM_hgrid_face) ;&lt;br /&gt;
		SCHISM_hgrid_face_x:long_name = &amp;quot;x_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_x:location = &amp;quot;face&amp;quot; ;    &lt;br /&gt;
     &lt;br /&gt;
    float SCHISM_hgrid_face_y(nSCHISM_hgrid_face) ;&lt;br /&gt;
		SCHISM_hgrid_face_y:long_name = &amp;quot;y_coordinates of 2D mesh face&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_face_y:location = &amp;quot;face&amp;quot; ; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_x(nSCHISM_hgrid_edge) ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:long_name = &amp;quot;x_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_x:location = &amp;quot;edge&amp;quot; ;   &lt;br /&gt;
&lt;br /&gt;
    float SCHISM_hgrid_edge_y(nSCHISM_hgrid_edge) ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:long_name = &amp;quot;y_coordinates of 2D mesh edge&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		SCHISM_hgrid_edge_y:location = &amp;quot;edge&amp;quot; ;           &lt;br /&gt;
      &lt;br /&gt;
        &lt;br /&gt;
	float depth(nSCHISM_hgrid_node) ;&lt;br /&gt;
		depth:long_name = &amp;quot;Bathymetry&amp;quot; ;&lt;br /&gt;
		depth:units = &amp;quot;meters&amp;quot; ;&lt;br /&gt;
		depth:positive = &amp;quot;down&amp;quot; ;&lt;br /&gt;
		depth:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
		depth:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 61 elev.61&lt;br /&gt;
 &lt;br /&gt;
    float elev(time,nSCHISM_hgrid_node);&lt;br /&gt;
    elev:long_name =&amp;quot;water surface height agove reference datum&amp;quot;;&lt;br /&gt;
    elev:missing_value = &amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
    elev:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    elev:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 62 wind.62&lt;br /&gt;
 &lt;br /&gt;
    float u(time, nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Wind Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time, nv, node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Wind Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;SCHISM_hgrid&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
 // type 63, salt.63 temp.63&lt;br /&gt;
 &lt;br /&gt;
    float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
    salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    salt:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node);&lt;br /&gt;
    temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
    temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
    temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
    temp:location =&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 64, hvel.64&lt;br /&gt;
&lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_node) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;node&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 // type 65 missing&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 // type 66 dtbe.66&lt;br /&gt;
 &lt;br /&gt;
    float dtbe(time,nSCHISM_hgrid_face);&lt;br /&gt;
    dtbe:long_name =&amp;quot;minimal time step allowed at each element&amp;quot;;&lt;br /&gt;
    dtbe:missing_value =&amp;quot;-999999.&amp;quot;;&lt;br /&gt;
    dtbe:mesh =&amp;quot;SCHISM_hgrid&amp;quot;;&lt;br /&gt;
    dtbe:location=&amp;quot;node&amp;quot;;&lt;br /&gt;
    &lt;br /&gt;
 // type 67 vector at 3d mesh edge center&lt;br /&gt;
 &lt;br /&gt;
    float u(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    u:long_name = &amp;quot;Eastward Water Velocity&amp;quot; ;&lt;br /&gt;
    u:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    u:mesh = &amp;quot;mesh3D&amp;quot; ;&lt;br /&gt;
    u:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    float v(time,SCHISM_vgrid_layers,nSCHISM_hgrid_edge) ;&lt;br /&gt;
    v:long_name = &amp;quot;Northward Water Velocity&amp;quot; ;&lt;br /&gt;
    v:missing_value = &amp;quot;-999999.&amp;quot; ;&lt;br /&gt;
    v:mesh = &amp;quot;Mesh3D&amp;quot; ;&lt;br /&gt;
    v:location = &amp;quot;edge&amp;quot; ;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
 //type 68 missing&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 //type 69 vert.69 &lt;br /&gt;
 &lt;br /&gt;
   float w(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   w:long_name=&amp;quot;vertical velocity at face center at all levels&amp;quot;;&lt;br /&gt;
   w:missing_value =&amp;quot;-999999.0&amp;quot;;&lt;br /&gt;
   w:mesh =&amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   w:location =&amp;quot;face&amp;quot;;&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
 //type 70 temp.70 salt.70&lt;br /&gt;
   &lt;br /&gt;
   float salt(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   salt:long_name =&amp;quot;water practical salinity&amp;quot;;&lt;br /&gt;
   salt:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   salt:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   salt:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
   float temp(time,SCHISM_vgrid_layers,nSCHISM_hgrid_face);&lt;br /&gt;
   temp:long_name =&amp;quot;water temperature&amp;quot;;&lt;br /&gt;
   temp:missing_value =&amp;quot;-9999999.0&amp;quot;;&lt;br /&gt;
   temp:mesh = &amp;quot;Mesh3D&amp;quot;;&lt;br /&gt;
   temp:location =&amp;quot;volume&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    &lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
// global attributes:&lt;br /&gt;
		:Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
data:&lt;br /&gt;
&lt;br /&gt;
 time = 3600, 7200, 10800, 14400, 18000, 21600, 25200, 28800, 32400, 36000, &lt;br /&gt;
    39600, 43200, 46800, 50400, 54000, 57600, 61200, 64800, 68400, 72000, &lt;br /&gt;
    75600, 79200, 82800, 86400 ;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=798</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=798"/>
		<updated>2014-10-24T01:17:45Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* A few details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter originally provided the time step for an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column. The parameter is also used as a sampling interval for the NetCDF files. &lt;br /&gt;
In this case, odd behavior will result unless wtiminc comfortably oversamples the data in the file. &lt;br /&gt;
The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is might be blended with a file called 2_air.003.nc. The &amp;quot;.003&amp;quot; component of the name represents the order of the file within the stack of provided input files. For instance, there might be a new file (001,002,003) produced every 12 hours in a forecast cycle.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
As was remarked above, the files are arranged temporally in a stack of files starting with &amp;quot;.001&amp;quot;. Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below are some details from sflux_9c.F90, near the beginning of the code.&lt;br /&gt;
&lt;br /&gt;
* Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* The grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* Search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=797</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=797"/>
		<updated>2014-10-24T01:15:01Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Interpolation and prioritization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter originally provided the time step for an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column. The parameter is also used as a sampling interval for the NetCDF files. &lt;br /&gt;
In this case, odd behavior will result unless wtiminc comfortably oversamples the data in the file. &lt;br /&gt;
The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is might be blended with a file called 2_air.003.nc. The &amp;quot;.003&amp;quot; component of the name represents the order of the file within the stack of provided input files. For instance, there might be a new file (001,002,003) produced every 12 hours in a forecast cycle.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
As was remarked above, the files are arranged temporally in a stack of files starting with &amp;quot;.001&amp;quot;. Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=796</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=796"/>
		<updated>2014-10-24T01:12:44Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* File description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter originally provided the time step for an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column. The parameter is also used as a sampling interval for the NetCDF files. &lt;br /&gt;
In this case, odd behavior will result unless wtiminc comfortably oversamples the data in the file. &lt;br /&gt;
The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is might be blended with a file called 2_air.003.nc. The &amp;quot;.003&amp;quot; component of the name represents the order of the file within the stack of provided input files. For instance, there might be a new file (001,002,003) produced every 12 hours in a forecast cycle.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=795</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=795"/>
		<updated>2014-10-24T01:11:56Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* File description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter originally provided the time step for an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column. The parameter is also used as a sampling interval for the NetCDF files. &lt;br /&gt;
In this case, odd behavior will result unless wtiminc comfortably oversamples the data in the file. &lt;br /&gt;
The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is might be blended with a file called 2_air.003.nc. The &amp;quot;.003&amp;quot; component of the name represents the order of the file temporally. For instance, there might be a new file (001,002,003) produced every 12 hours in a forecast cycle.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=794</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=794"/>
		<updated>2014-10-24T01:08:22Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Summary of inputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter originally provided the time step for an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column. The parameter is also used as a sampling interval for the NetCDF files. &lt;br /&gt;
In this case, odd behavior will result unless wtiminc comfortably oversamples the data in the file. &lt;br /&gt;
The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=793</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=793"/>
		<updated>2014-10-24T01:07:10Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Summary of inputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
There are several other parameters associated with these choices. For instance for nws=1 it is possible&lt;br /&gt;
to scale the wind spatially using a gr3 file. &lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter is used with an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column, only uwind and vwind velocities as columns. The parameter provides the time step. &lt;br /&gt;
The parameter is also used as a sampling interval for the NetCDF files. In this case, odd behavior will result unless&lt;br /&gt;
wtiminc comfortably oversamples the data in the file. The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=792</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=792"/>
		<updated>2014-10-24T01:06:00Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
;nws=1 : wind.th for wind&lt;br /&gt;
;nws=2 : NetCDF forcing (wind, pressure and heat module)&lt;br /&gt;
;nws=4 : ascii wind and pressure (only documented in source code)&lt;br /&gt;
&lt;br /&gt;
One parameter that you should treat with some care is wtiminc, which is the time step for atmospheric forcing.&lt;br /&gt;
This parameter is used with an older version of wind.th that was a little different from others &lt;br /&gt;
in that it had no time column, only uwind and vwind velocities as columns. The parameter provides the time step. &lt;br /&gt;
The parameter is also used as a sampling interval for the NetCDF files. In this case, odd behavior will result unless&lt;br /&gt;
wtiminc comfortably oversamples the data in the file. The safest value to use is the model time step.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=791</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=791"/>
		<updated>2014-10-24T00:58:53Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
;nws=0 : no forcing&lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=790</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=790"/>
		<updated>2014-10-24T00:53:22Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==Summary of inputs==&lt;br /&gt;
Production modeling is generally done using netcdf formatted inputs as described below. However there are facilities&lt;br /&gt;
for producing sample wind fields for test problems as well. The choice of atmospheric formats is controlled by the &lt;br /&gt;
parameter &amp;lt;em&amp;gt;nws&amp;lt;/em&amp;gt; in file &amp;lt;em&amp;gt;param.in&amp;lt;/em&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=789</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=789"/>
		<updated>2014-10-24T00:45:58Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Interpolation and prioritization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the _2 file. This blending of the fields is only adjustable in the fortran as described in notes below. The default in sflux_9c.F90 is a 99:1 blend of the _2_ file to the _1_ file. &lt;br /&gt;
&lt;br /&gt;
Given the sequence of forecasting and analysis, it is common for atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that a new file indicates the injection of information, so when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=788</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=788"/>
		<updated>2014-10-21T16:46:21Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the higher number. This blending of the fields is not user configurable, but users with Fortran background can change it at compile time by manipulating sflux_9c.F90. The default ratio is a 99:1 blend of the _2_ file to the _1_ file.  Additional notes are given below.&lt;br /&gt;
&lt;br /&gt;
Given the nature of forecasting and analysis, it is common for sequential atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that the data quality deteriorates in this way. So when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=787</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=787"/>
		<updated>2014-10-21T16:41:53Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* File description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be blended with a file called 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the higher number. This blending of the fields is not user configurable, but users with Fortran background can change it at compile time by manipulating sflux_9c.F90. The default ratio is a 99:1 blend of the _2_ file to the _1_ file.  &lt;br /&gt;
&lt;br /&gt;
Wind fields are also interpolated in time. When two sources are used, a window of 120 hours is used for the maximum length over which such interpolation is considered legitimate (otherwise the value is dropped from the blending). As with the blending ratio, this period is not user configurable in the input, but users with Fortran background can change it at compile time by manipulating sflux_9c.F90.&lt;br /&gt;
&lt;br /&gt;
Given the nature of forecasting and analysis, it is common for sequential atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that the data quality deteriorates in this way. So when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=786</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=786"/>
		<updated>2014-10-21T16:41:18Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be overridden by 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Interpolation and prioritization==&lt;br /&gt;
Using air as an example, it is assumed that the file sflux_air_2.001.nc is more resolved or accurate than sflux_air_1.001.nc. The two will be blended in the model in a way that favors the higher number. This blending of the fields is not user configurable, but users with Fortran background can change it at compile time by manipulating sflux_9c.F90. The default ratio is a 99:1 blend of the _2_ file to the _1_ file.  &lt;br /&gt;
&lt;br /&gt;
Wind fields are also interpolated in time. When two sources are used, a window of 120 hours is used for the maximum length over which such interpolation is considered legitimate (otherwise the value is dropped from the blending). As with the blending ratio, this period is not user configurable in the input, but users with Fortran background can change it at compile time by manipulating sflux_9c.F90.&lt;br /&gt;
&lt;br /&gt;
Given the nature of forecasting and analysis, it is common for sequential atmospheric files to overlap. A file might begin with a brief period of data assimilation plus a few days of forecast. SELFE assumes that the data quality deteriorates in this way. So when it encounters overlap, it advances to the later file.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. As described above, the number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes the first data set used, with the second set taking priority; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=785</id>
		<title>Atmospheric forcing</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Atmospheric_forcing&amp;diff=785"/>
		<updated>2014-10-21T16:29:53Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* File description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Theory==&lt;br /&gt;
&lt;br /&gt;
[http://ccrm.vims.edu/yinglong/wiki_files/HeatExchange-Theory.pdf Here] is some info about the heat exchange module inside SELFE, based on Dr. Mike Zuluaf's slides. &lt;br /&gt;
&lt;br /&gt;
==File description==&lt;br /&gt;
In SELFE, atmoserpic forcings include wind, air pressure and temperature, precipitation, humidity and longwave and shortwave fluxes. These are specified in the netcdf files inside sflux/ dir, and conform to the [http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.0/cf-conventions.html NetCDF Climate and Forecast (CF) Metadata Convention 1.0].&lt;br /&gt;
&lt;br /&gt;
There are 4 types of files in sflux/dir; see [http://www.stccmop.org/CORIE/modeling/selfe/NARR/narr.html this site] for sample files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_inputs.txt: &amp;lt;br/&amp;gt;&lt;br /&gt;
$cat sflux_inputs.txt &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;amp;sflux_inputs   ! file name &amp;lt;br/&amp;gt;&lt;br /&gt;
start_year  = 1998, ! start year &amp;lt;br/&amp;gt;&lt;br /&gt;
start_month = 09, ! start month &amp;lt;br/&amp;gt;&lt;br /&gt;
start_day   = 01, ! start day &amp;lt;br/&amp;gt;&lt;br /&gt;
start_hour  = 0.0, ! start hour &amp;lt;br/&amp;gt;&lt;br /&gt;
utc_start   = 0.0, ! offset from UTC in hours, with positive numbers for western hemishpere &amp;lt;br/&amp;gt;&lt;br /&gt;
/ &amp;lt;br/&amp;gt;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_air_1.0*.nc: netcdf files that have time, wind speed, air temperature and pressure and specific humidity;&lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_prc_1.0*.nc: netcdf files that have precipitation data; &lt;br /&gt;
  &amp;lt;LI&amp;gt;sflux_rad_1.0*.nc: netcdf files that have downward long and short (solar) wave radiation fluxes.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Two sources of data are allowed, and the relative priority is fixed by the file name. For instance 1_air.003.nc is the &amp;quot;lower priority file on day 3 of the simulation for the variables in the air NetCDF file&amp;quot;. This file might be overridden by 2_air.003.nc.&lt;br /&gt;
&lt;br /&gt;
==Using NARR files for your simulation (North America only)==&lt;br /&gt;
&lt;br /&gt;
 First, make sure the  [http://ccrm.vims.edu/yinglong/wiki_files/narr.ll NARR grid] covers your hgrid.ll. &lt;br /&gt;
&lt;br /&gt;
In your run directory, mkdir sflux and inside it, create symbolic links to the NARR files. e.g., if you run starts from June 10, 2004 and ends June 20, 2004, then&lt;br /&gt;
&lt;br /&gt;
sflux_air_1.001.nc --&amp;gt; narr_air.2004_06_10.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.002.nc --&amp;gt; narr_air.2004_06_11.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
...&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.011.nc --&amp;gt; narr_air.2004_06_20.nc&amp;lt;br/&amp;gt;&lt;br /&gt;
sflux_air_1.012.nc --&amp;gt; narr_air.2004_06_21.nc (extra day to account for time zone difference)&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly for sflux_rad_*.nc and sflux_prc_*.nc. The number &amp;quot;1&amp;quot; after &amp;quot;air_&amp;quot; denotes first data set used; you can use up to 2 sets in SELFE (which combines them with some given weights set in sflux_subs.F90); here you only use 1 set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't forget to update sflux_inputs.txt also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Preparing your own sflux inputs==&lt;br /&gt;
&lt;br /&gt;
After familiarize yourself with the NARR files and their format, you may embark on creating your own nc files. The best way is to modify existing matlab scripts (src/Utility/Sflux_nc/readnc*.m) included in the source code bundle, which have extensively in-line comments to guide you along the way.&lt;br /&gt;
&lt;br /&gt;
'''Conventions for .nc-files in sflux directory and additional files needed for sflux run:'''&lt;br /&gt;
&lt;br /&gt;
'''wind:''' u-component is eastward, v-comp. is northward (normal math convention, not compass convention)&lt;br /&gt;
&lt;br /&gt;
'''windrot_geo2proj.gr3:''' rotates winds in case they do not align with coordinate axes,&lt;br /&gt;
i.e. lat/lon&lt;br /&gt;
&lt;br /&gt;
'''watertype.gr3:''' 6 is clear water, 7 is muddiest. Search in selfe_init.F90 for watertype.&lt;br /&gt;
&lt;br /&gt;
==A few details==&lt;br /&gt;
Below is from sflux_9c.F90; search for &amp;quot;Joseph Z&amp;quot; near the beginning of the code for up to date info.&lt;br /&gt;
&lt;br /&gt;
*Of all attributes in nc file, only 'base_date' is required;&lt;br /&gt;
* air, rad and prc each can have up to 2 sources;&lt;br /&gt;
* grids for air, rad and prc can be different (but must be the same within each type and each source). Additional requirements for the structured grid in .nc: [lon,lat](nx,ny) give x,y coord., nx is # of pts in x. Suppose a node in the grid is given by (i,j) (1&amp;lt;=i&amp;lt;=nx), then the quad (i,j), (i+1,j), (i+1,j+1,i,j+1) must be along counter-clockwise direction;&lt;br /&gt;
* search for &amp;quot;relative_weight&amp;quot; (inside netcdf_io) to change relative weights of the 2 sources for air, rad and prc if needed. All weights must &amp;gt; 0!&lt;br /&gt;
* in case of 2 sources/grids for a variable, use &amp;quot;1&amp;quot; as larger grid (i.e. encompassing hgrid.ll) and &amp;quot;2&amp;quot; as smaller grid. The code will calculate weights associated with the 2 grids, and if some nodes in hgrid.ll fall outside grid &amp;quot;2&amp;quot; the interpolation will be done on grid &amp;quot;1&amp;quot; only (see combine_sflux_data, in particular, bad_node_ based on area coordinates outside [0,1]). Both grids must start from stack  1 and have same # of stacks for each variable. However, within each nc file # of time steps can vary;&lt;br /&gt;
*air_1_max_window_hours (etc) are set in netcdf_io to define the max. time stamp (offset from start time in each) within each nc file. Besides those in netcdf_io,   max_file_times (max. # of time records in each nc file) in routine get_times_etc ()  may need to be adjusted as well.&lt;br /&gt;
&lt;br /&gt;
===air-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_air_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float uwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 uwind:long_name = &amp;quot;Surface Eastward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 uwind:standard_name = &amp;quot;eastward_wind&amp;quot; ;&lt;br /&gt;
                 uwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float vwind(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 vwind:long_name = &amp;quot;Surface Northward Air Velocity (10m AGL)&amp;quot; ;&lt;br /&gt;
                 vwind:standard_name = &amp;quot;northward_wind&amp;quot; ;&lt;br /&gt;
                 vwind:units = &amp;quot;m/s&amp;quot; ;&lt;br /&gt;
         float prmsl(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prmsl:long_name = &amp;quot;Pressure reduced to MSL&amp;quot; ;&lt;br /&gt;
                 prmsl:standard_name = &amp;quot;air_pressure_at_sea_level&amp;quot; ;&lt;br /&gt;
                 prmsl:units = &amp;quot;Pa&amp;quot; ;&lt;br /&gt;
         float stmp(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 stmp:long_name = &amp;quot;Surface Air Temperature (2m AGL)&amp;quot; ;&lt;br /&gt;
                 stmp:standard_name = &amp;quot;air_temperature&amp;quot; ;&lt;br /&gt;
                 stmp:units = &amp;quot;K&amp;quot; ;&lt;br /&gt;
         float spfh(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 spfh:long_name = &amp;quot;Surface Specific Humidity (2m AGL)&amp;quot; ;&lt;br /&gt;
                 spfh:standard_name = &amp;quot;specific_humidity&amp;quot; ;&lt;br /&gt;
                 spfh:units = &amp;quot;1&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===rad-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_rad_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float dlwrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dlwrf:long_name = &amp;quot;Downward Long Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dlwrf:standard_name = &amp;quot;surface_downwelling_longwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dlwrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
         float dswrf(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 dswrf:long_name = &amp;quot;Downward Short Wave Radiation Flux&amp;quot; ;&lt;br /&gt;
                 dswrf:standard_name = &amp;quot;surface_downwelling_shortwave_flux_in_air&amp;quot; ;&lt;br /&gt;
                 dswrf:units = &amp;quot;W/m^2&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===prc-files (header displayed using the ncdump utility)===&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 netcdf sflux_prc_1.001 {&lt;br /&gt;
 dimensions:&lt;br /&gt;
         nx_grid = 349 ;&lt;br /&gt;
         ny_grid = 277 ;&lt;br /&gt;
         time = UNLIMITED ; // (8 currently)&lt;br /&gt;
 variables:&lt;br /&gt;
         float time(time) ;&lt;br /&gt;
                 time:long_name = &amp;quot;Time&amp;quot; ;&lt;br /&gt;
                 time:standard_name = &amp;quot;time&amp;quot; ;&lt;br /&gt;
                 time:units = &amp;quot;days since 2001-01-01&amp;quot; ;&lt;br /&gt;
                 time:base_date = 2001, 1, 1, 0 ;&lt;br /&gt;
         float lon(ny_grid, nx_grid) ;&lt;br /&gt;
                 lon:long_name = &amp;quot;Longitude&amp;quot; ;&lt;br /&gt;
                 lon:standard_name = &amp;quot;longitude&amp;quot; ;&lt;br /&gt;
                 lon:units = &amp;quot;degrees_east&amp;quot; ;&lt;br /&gt;
         float lat(ny_grid, nx_grid) ;&lt;br /&gt;
                 lat:long_name = &amp;quot;Latitude&amp;quot; ;&lt;br /&gt;
                 lat:standard_name = &amp;quot;latitude&amp;quot; ;&lt;br /&gt;
                 lat:units = &amp;quot;degrees_north&amp;quot; ;&lt;br /&gt;
         float prate(time, ny_grid, nx_grid) ;&lt;br /&gt;
                 prate:long_name = &amp;quot;Surface Precipitation Rate&amp;quot; ;&lt;br /&gt;
                 prate:standard_name = &amp;quot;precipitation_flux&amp;quot; ;&lt;br /&gt;
                 prate:units = &amp;quot;kg/m^2/s&amp;quot; ;&lt;br /&gt;
 &lt;br /&gt;
 // global attributes:&lt;br /&gt;
                 :Conventions = &amp;quot;CF-1.0&amp;quot; ;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=635</id>
		<title>CMake Build System</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=635"/>
		<updated>2013-04-09T16:56:50Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Basic CMake Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;     &lt;br /&gt;
== Introduction ==&lt;br /&gt;
CMake is one option currently available for building SELFE. This documentation covers the SELFE cmake build system under Linux. While CMake is highly portable and probably could be made to work under Windows and Mac, no one has tested it under those operating systems. For more information on cmake and documentation, see the [http://www.cmake.org cmake] web site.&lt;br /&gt;
&lt;br /&gt;
== User Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Basic CMake Usage ===&lt;br /&gt;
On Linux, Cmake is just a preprocessor for Make much like a typical ''configure'' script. There are also generators for Eclipse and some other native build systems including Windows and Mac. When you reconfigure the project a lot by swapping modules, compiler options, build type (debug/release) or changing compilers, you re-run cmake ... but most of the time you just use ''make'' or some other build tool. You can create an out-of-source build from the /selfe directory by doing the following:&lt;br /&gt;
&lt;br /&gt;
 (make sure you have the following directories: src/, test/unittest/ besides the cmake/ dir)&lt;br /&gt;
 &amp;gt; mkdir build&lt;br /&gt;
 &amp;gt; cd build&lt;br /&gt;
 &amp;gt; setenv FC ifort/pgf90/gfortran    # Might be shell-dependent. The default (no action needed) is gfortran&lt;br /&gt;
                      # on bash, use export FC=ifort&lt;br /&gt;
 &amp;gt; cmake ../src (or: cmake -C ../cmake/SELFE.local.cmake ../src; in order to define paths to some local settings; see below)&lt;br /&gt;
 &amp;gt; make -j8&lt;br /&gt;
 (executables are stored in bin/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have the prerequisites in typical places or set up your environment as recommended below this sequence will produce a Hydro-only build with default options including the selfe executable and all utilities. More realistically, you will probably have to set some library locations. Configuration is considered in more detail below.&lt;br /&gt;
&lt;br /&gt;
In this case CMake is really just building a Makefile. The Makefile that gets produced has the following targets:&lt;br /&gt;
* all (default)&lt;br /&gt;
* individual libraries: sediment, ecosim, wwm (assuming you configured CMAKE with USE_XXX)&lt;br /&gt;
* pelfe (with whatever features you toggled on)&lt;br /&gt;
* utility (all utility scripts)&lt;br /&gt;
* pyutil (all python utilities)&lt;br /&gt;
* install (installs the system to the &amp;quot;usual&amp;quot; spots /usr/bin etc. The install location is configurable and respects DESTDIR. See cmake docs.&lt;br /&gt;
&lt;br /&gt;
The Makefile is robust if you make source file changes, and can manage complex Fortran module dependencies. If you add a file or alter the project you will have to re-run Cmake so that the new addition gets included. CMake does this well and you can run it with the very simple 'cmake ../src' command. The Makefile scales very well to 8 threads.&lt;br /&gt;
&lt;br /&gt;
There are cases where you should make clean and rebuild all the source. If you toggle compiler define options (-D), you are effectively changing the source code that reaches the compiler net of the preprocessor, yet not actually touching the text of the source file.  The GNU Makefile system does not recognize such a change. There is a best practice for making sure that configuration changes are source changes -- configuration &amp;quot;include files&amp;quot; -- but we are not there yet. '''If you change #definitions, make clean'''.&lt;br /&gt;
&lt;br /&gt;
If you change the library or compiler options -- or run into problems -- you should consider blowing away the whole /build directory and starting over:&lt;br /&gt;
 &amp;gt; rm -rf build/*&lt;br /&gt;
 &amp;gt; cd build&lt;br /&gt;
 &amp;gt; cmake ../src&lt;br /&gt;
&lt;br /&gt;
=== SELFE Prerequisites === &lt;br /&gt;
To build the model, you will need the following libraries:&lt;br /&gt;
;CMake:  The build system is tested against version 2.6 and 2.8&lt;br /&gt;
;Parmetis: Domain decomposition and sparse matrix ordering library&lt;br /&gt;
* Required for Hydro.&lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment PARMETIS_DIR to locate another build.&lt;br /&gt;
* Location can also be given by a full path in configuration. See below.&lt;br /&gt;
;GOTM:  Optional turbulence closure for Hydro. &lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment GOTM_DIR to locate another build&lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;NetCDF: File format library for Hydro. &lt;br /&gt;
* Assumed to be installed separately&lt;br /&gt;
* If you set the environment variable NETCDF_DIR (all caps) or put it in /usr/lib /usr/include detection is automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;HDF5: Parallel backend for some NetCDF 4 (parallel) builds. CMake will tell you if it is needed.&lt;br /&gt;
* If you set HDF5_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;PETSc: Numerical algorithm library required for the Wind-wave module. &lt;br /&gt;
* If you set PETSC_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;MPI: Message passing library used for parallel processing&lt;br /&gt;
* MPI wrappers (mpif90) are needed to locate the MPI tools and dependencies (but are not used for the build)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use a Linux &amp;quot;environment module&amp;quot; system, the XXX_DIR etc may be automatically set (just watch out for case). Alternatively, the libraries should be found if they are in system lib and include directories as well (e.g. /usr/lib). Finally, XXX_DIR is not the only environment variable that can be used as a hint to cmake. You can also set up pointers to the libraries and includes individually. See the file FindNetCDF.cmake for examples ... but the easiest way is just NetCDF_DIR.&lt;br /&gt;
&lt;br /&gt;
=== Configuration === &lt;br /&gt;
==== Examples of things you will want to configure====&lt;br /&gt;
*  custom compiler flags (but see below!!!!)&lt;br /&gt;
*  the name of the compiler &lt;br /&gt;
*  custom library locations, &lt;br /&gt;
*  choosing selfe modules to include in the driver&lt;br /&gt;
*  performance/build parameters (BUILD_TYPE=Debug, MPIVERSION=2, USE_TIMING)&lt;br /&gt;
&lt;br /&gt;
'''Custom compiler flags''': Flag choices are often re-usable across similar systems.  If you are setting up flags that should be the standard for your architecture, I would urge you to contribute to selfe/cmake/SELFECompile.cmake so that others can make use of your work and so that your personal configuration is not mixed up with stuff that is just standard for your architecture. If you are tweaking the flags for real then you should follow the directions below. &lt;br /&gt;
&lt;br /&gt;
One class of flags that seems to be a bit of a special case are the flags that force static linking such as '''-Bstatic''' or '''-static'''. I am pretty open to fixing the cmake files so that they will do what you want, but rather than instinctively adding these flags you should investigate first whether maybe CMake already will do what you want ... it generally favors static linking, although MPI can be an exception.&lt;br /&gt;
&lt;br /&gt;
The '''compiler''' can be identified with the '''FC''' environmental variable or the CMAKE_Fortran_COMPILER variable -- case sensitive. Almost everyone seems to do it using the environent, and if you are using the linux [http://linux.die.net/man/1/module module system].&lt;br /&gt;
&lt;br /&gt;
==== Options for configuring CMake ====&lt;br /&gt;
Please do not edit the CMakeLists.txt file to add your own directories and configuration info. User-specific data does not belong in CMakeLists.txt. There are two ways to get user selections and variables into CMake, which are not mutually exclusive:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== METHOD #1: Use the -D option and a shell/batch file =====&lt;br /&gt;
&lt;br /&gt;
The CMake -D option forcibly defines a variable. It might be more immediately intuitive for GNU make users who set a variable &lt;br /&gt;
and expect their orders to be followed.  To use the -D method, create a shell script in /selfe that looks like this:&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DUSE_ECO=1 \&lt;br /&gt;
      -DMPIVERSION=1 \&lt;br /&gt;
      ...&lt;br /&gt;
 make&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
The only unintuitive part is that you need an argument for all the variables (ON/TRUE/1 all work for turning something on).&lt;br /&gt;
&lt;br /&gt;
===== METHOD #2 Use -C &amp;lt;cache-init-file&amp;gt; to populate the cmake cache. =====&lt;br /&gt;
The notion of the CMake cache takes some getting used to.  The first time you run cmake, a number of compiler and build options will be placed in a file called CMakeCache.txt. The -C option allows you to specify an input cmake script that has nothing but SET statements that the user can use to populate options ... an example of such a file is /selfe/cmake/SELFE.local.cmake&lt;br /&gt;
&lt;br /&gt;
After the first run, the cache can be manipulated with text, cursor or graphical tools (ccmake or QT based) or by repeating the cmake invocation with new -D options. I don't use the graphical tools much, but ccmake in non-advanced view is nice because it shows you an all-encompassing view of user-configurable variables. &lt;br /&gt;
&lt;br /&gt;
Now here is the funny thing about SET (whether in your &amp;lt;init-cache&amp;gt; file or in the build system): once the cache is initialized, any variable that SETs the value of a cached variable will no longer be evaluated unless the FORCE tag is used. As a consequence the -C &amp;lt;init-file&amp;gt; will not be influential ever again unless &lt;br /&gt;
# you use FORCE in your SET statements or &lt;br /&gt;
# you blow away the cache and rebuild it.&lt;br /&gt;
&lt;br /&gt;
My experience is that if you are making a single well-managed change like turning on Sediment, then this persistence is actually nice because you can set one change (perhaps -DUSE_SEDIMENT=1) and not worry about the rest of your setup falling apart. When you toggle multiple options it is often safer to blow away the whole build directory and start again with CMake and a &amp;lt;cache-init&amp;gt; file:&lt;br /&gt;
 $ rm -rf build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ cmake  -C ../cmake/SELFE.local.cmake ../src&lt;br /&gt;
&lt;br /&gt;
== Developer Documentation ==&lt;br /&gt;
In contrast to users, developers will use the CMakeLists.txt in /src and its subdirectories. I'll keep this short, because most folks will learn by mimicking examples anyway and there is documentation at [http://www.cmake.org|cmake].&lt;br /&gt;
&lt;br /&gt;
Here are common use cases:&lt;br /&gt;
=== Modifying SELFE modules ===&lt;br /&gt;
Here are some common cases:&lt;br /&gt;
==== Adding a file to an existing module ====&lt;br /&gt;
Just add the name of the file to the pre-existing list in CMakeLists.txt.&lt;br /&gt;
==== Adding an algorithmic option to an existing module. ====&lt;br /&gt;
Please do this at the module directory (not /src) level CMakeLists.txt. You may need the following components to create your addition:&lt;br /&gt;
# either the OPTION cmake command or the SET command. OPTION is an easy way to set up boolean options, SET is used for boolean, strings, paths. If your option is to be user configurable, the SET call has include the CACHE keyword.&lt;br /&gt;
# to pass the option to the compiler using the cmake add_definitions. Good examples to follow include MPIVERSION, USE_TIMER&lt;br /&gt;
# you may want code it so that an environment variable is passed on to the system. See MPI_VERSION.&lt;br /&gt;
&lt;br /&gt;
==== Adding a utility module or file ==== &lt;br /&gt;
If you are creating a new directory, you will need to add_directory() in the /utility level CMakeLists.txt. The rest happens at the directory level of the script. Make sure to create a dependency of &amp;quot;utility&amp;quot; on your new script so that &amp;quot;make utility&amp;quot; works correctly.&lt;br /&gt;
&lt;br /&gt;
==== Adding a new selfe module ====&lt;br /&gt;
Again, learning by example is a good way to tackle this. There is a macro for CMakeLists.txt in the /src level CMakeLists.txt. It will help you bind together:&lt;br /&gt;
# a directory name (usually capitalized)&lt;br /&gt;
# a USE_XXX variable and &lt;br /&gt;
# a (lower case) library name.&lt;br /&gt;
# creation of a dependency of the main driver on your module&lt;br /&gt;
# cause cmake to recurse into your directory and configure it IF the USE_XXX option is enabled&lt;br /&gt;
&lt;br /&gt;
That should be all you need at the /src CMakeLists.txt level. After that, you just add a subdirectory for the module under /src, add the source files and a CMakeLists.txt and copy the style of CMakeLists.txt from an existing module such as /EcoSim or /Sediment. This will create a library and estabish dependencies. In general, you want to depend on the /Core library but not on any of the other modules. &lt;br /&gt;
&lt;br /&gt;
=== Library dependencies ===&lt;br /&gt;
First one obvious caveat -- extra libraries should be avoided if possible. &lt;br /&gt;
&lt;br /&gt;
Dependencies should also be introduced to cmake at the lowest level they are needed. You can introduce the dependency in the /src level CMakeLists.txt if it is going to be used by several modules including Hydro (e.g. NetCDF). However, if it is only going to be used by one module for the moment, (as PETSc is needed by WWM) try to keep it in the module directory. Among other things, you then do not have to put an IF block around it to check if the selfe module is being used because the whole directory will be skipped if the module is toggled off. Someone who isn't using your module can skip the dependency entirely.&lt;br /&gt;
&lt;br /&gt;
The first step with dependent libraries is to get a FindXXX.cmake script for the library if one is not already included in CMake 2.6 and put it in selfe/cmake/modules. You may be tempted to avoid this and try to figure another way, but a suitable script is almost always available on the web and I have found that subverting this feature of CMake makes it fragile. There are some slight tricks making it compatible with cmake 2.6 (specifically the way you include other scripts). The names of the scripts that are included are usually always about the same, so you can probably just look at a script that is already in selfe/cmake/modules. If you have any issues feel free to email me (eli@water.ca.gov).&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=634</id>
		<title>CMake Build System</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=634"/>
		<updated>2013-04-09T16:55:56Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Basic CMake Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;     &lt;br /&gt;
== Introduction ==&lt;br /&gt;
CMake is one option currently available for building SELFE. This documentation covers the SELFE cmake build system under Linux. While CMake is highly portable and probably could be made to work under Windows and Mac, no one has tested it under those operating systems. For more information on cmake and documentation, see the [http://www.cmake.org cmake] web site.&lt;br /&gt;
&lt;br /&gt;
== User Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Basic CMake Usage ===&lt;br /&gt;
On Linux, Cmake is just a preprocessor for Make much like a typical ''configure'' script. There are also generators for Eclipse and some other native build systems including Windows and Mac. When you reconfigure the project a lot by swapping modules, compiler options, build type (debug/release) or changing compilers, you re-run cmake ... but most of the time you just use ''make'' or some other build tool. You can create an out-of-source build from the /selfe directory by doing the following:&lt;br /&gt;
&lt;br /&gt;
 (make sure you have the following directories: src/, test/unittest/ besides the cmake/ dir)&lt;br /&gt;
 &amp;gt; mkdir build&lt;br /&gt;
 &amp;gt; cd build&lt;br /&gt;
 &amp;gt; setenv FC ifort/pgf90/gfortran    # Might be shell-dependent. The default (no action needed) is gfortran&lt;br /&gt;
                      # on bash, use export FC=ifort&lt;br /&gt;
 &amp;gt; cmake ../src (or: cmake -C ../cmake/SELFE.local.cmake ../src; in order to define paths to some local settings; see below)&lt;br /&gt;
 &amp;gt; make -j8&lt;br /&gt;
 (executables are stored in bin/)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have the prerequisites in typical places or set up your environment as recommended below this sequence will produce a Hydro-only build with default options including the selfe executable and all utilities. More realistically, you will probably have to set some library locations. Configuration is considered in more detail below.&lt;br /&gt;
&lt;br /&gt;
In this case CMake is really just building a Makefile. The Makefile that gets produced has the following targets:&lt;br /&gt;
* all (default)&lt;br /&gt;
* individual libraries: sediment, ecosim, wwm (assuming you configured CMAKE with USE_XXX)&lt;br /&gt;
* pelfe (with whatever features you toggled on)&lt;br /&gt;
* utility (all utility scripts)&lt;br /&gt;
* pyutil (all python utilities)&lt;br /&gt;
* install (installs the system to the &amp;quot;usual&amp;quot; spots /usr/bin etc. The install location is configurable and respects DESTDIR. See cmake docs.&lt;br /&gt;
&lt;br /&gt;
The Makefile is robust if you make source file changes, and can manage complex Fortran module dependencies. If you add a file or alter the project you will have to re-run Cmake so that the new addition gets included. CMake does this well and you can run it with the very simple 'cmake ../src' command. The Makefile scales very well to 8 threads.&lt;br /&gt;
&lt;br /&gt;
There are cases where you should make clean and rebuild all the source. If you toggle compiler define options (-D), you are effectively changing the source code that reaches the compiler net of the preprocessor, yet not actually touching the text of the source file.  The GNU Makefile system does not recognize such a change. There is a best practice for making sure that configuration changes are source changes -- configuration &amp;quot;include files&amp;quot; -- but we are not there yet. '''If you change #definitions, make clean'''.&lt;br /&gt;
&lt;br /&gt;
If you change the library or compiler options -- or run into problems -- you should consider blowing away the whole /build directory and starting over:&lt;br /&gt;
 $ rm -rf build/*&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ cmake ../src&lt;br /&gt;
&lt;br /&gt;
=== SELFE Prerequisites === &lt;br /&gt;
To build the model, you will need the following libraries:&lt;br /&gt;
;CMake:  The build system is tested against version 2.6 and 2.8&lt;br /&gt;
;Parmetis: Domain decomposition and sparse matrix ordering library&lt;br /&gt;
* Required for Hydro.&lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment PARMETIS_DIR to locate another build.&lt;br /&gt;
* Location can also be given by a full path in configuration. See below.&lt;br /&gt;
;GOTM:  Optional turbulence closure for Hydro. &lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment GOTM_DIR to locate another build&lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;NetCDF: File format library for Hydro. &lt;br /&gt;
* Assumed to be installed separately&lt;br /&gt;
* If you set the environment variable NETCDF_DIR (all caps) or put it in /usr/lib /usr/include detection is automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;HDF5: Parallel backend for some NetCDF 4 (parallel) builds. CMake will tell you if it is needed.&lt;br /&gt;
* If you set HDF5_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;PETSc: Numerical algorithm library required for the Wind-wave module. &lt;br /&gt;
* If you set PETSC_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;MPI: Message passing library used for parallel processing&lt;br /&gt;
* MPI wrappers (mpif90) are needed to locate the MPI tools and dependencies (but are not used for the build)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use a Linux &amp;quot;environment module&amp;quot; system, the XXX_DIR etc may be automatically set (just watch out for case). Alternatively, the libraries should be found if they are in system lib and include directories as well (e.g. /usr/lib). Finally, XXX_DIR is not the only environment variable that can be used as a hint to cmake. You can also set up pointers to the libraries and includes individually. See the file FindNetCDF.cmake for examples ... but the easiest way is just NetCDF_DIR.&lt;br /&gt;
&lt;br /&gt;
=== Configuration === &lt;br /&gt;
==== Examples of things you will want to configure====&lt;br /&gt;
*  custom compiler flags (but see below!!!!)&lt;br /&gt;
*  the name of the compiler &lt;br /&gt;
*  custom library locations, &lt;br /&gt;
*  choosing selfe modules to include in the driver&lt;br /&gt;
*  performance/build parameters (BUILD_TYPE=Debug, MPIVERSION=2, USE_TIMING)&lt;br /&gt;
&lt;br /&gt;
'''Custom compiler flags''': Flag choices are often re-usable across similar systems.  If you are setting up flags that should be the standard for your architecture, I would urge you to contribute to selfe/cmake/SELFECompile.cmake so that others can make use of your work and so that your personal configuration is not mixed up with stuff that is just standard for your architecture. If you are tweaking the flags for real then you should follow the directions below. &lt;br /&gt;
&lt;br /&gt;
One class of flags that seems to be a bit of a special case are the flags that force static linking such as '''-Bstatic''' or '''-static'''. I am pretty open to fixing the cmake files so that they will do what you want, but rather than instinctively adding these flags you should investigate first whether maybe CMake already will do what you want ... it generally favors static linking, although MPI can be an exception.&lt;br /&gt;
&lt;br /&gt;
The '''compiler''' can be identified with the '''FC''' environmental variable or the CMAKE_Fortran_COMPILER variable -- case sensitive. Almost everyone seems to do it using the environent, and if you are using the linux [http://linux.die.net/man/1/module module system].&lt;br /&gt;
&lt;br /&gt;
==== Options for configuring CMake ====&lt;br /&gt;
Please do not edit the CMakeLists.txt file to add your own directories and configuration info. User-specific data does not belong in CMakeLists.txt. There are two ways to get user selections and variables into CMake, which are not mutually exclusive:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== METHOD #1: Use the -D option and a shell/batch file =====&lt;br /&gt;
&lt;br /&gt;
The CMake -D option forcibly defines a variable. It might be more immediately intuitive for GNU make users who set a variable &lt;br /&gt;
and expect their orders to be followed.  To use the -D method, create a shell script in /selfe that looks like this:&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DUSE_ECO=1 \&lt;br /&gt;
      -DMPIVERSION=1 \&lt;br /&gt;
      ...&lt;br /&gt;
 make&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
The only unintuitive part is that you need an argument for all the variables (ON/TRUE/1 all work for turning something on).&lt;br /&gt;
&lt;br /&gt;
===== METHOD #2 Use -C &amp;lt;cache-init-file&amp;gt; to populate the cmake cache. =====&lt;br /&gt;
The notion of the CMake cache takes some getting used to.  The first time you run cmake, a number of compiler and build options will be placed in a file called CMakeCache.txt. The -C option allows you to specify an input cmake script that has nothing but SET statements that the user can use to populate options ... an example of such a file is /selfe/cmake/SELFE.local.cmake&lt;br /&gt;
&lt;br /&gt;
After the first run, the cache can be manipulated with text, cursor or graphical tools (ccmake or QT based) or by repeating the cmake invocation with new -D options. I don't use the graphical tools much, but ccmake in non-advanced view is nice because it shows you an all-encompassing view of user-configurable variables. &lt;br /&gt;
&lt;br /&gt;
Now here is the funny thing about SET (whether in your &amp;lt;init-cache&amp;gt; file or in the build system): once the cache is initialized, any variable that SETs the value of a cached variable will no longer be evaluated unless the FORCE tag is used. As a consequence the -C &amp;lt;init-file&amp;gt; will not be influential ever again unless &lt;br /&gt;
# you use FORCE in your SET statements or &lt;br /&gt;
# you blow away the cache and rebuild it.&lt;br /&gt;
&lt;br /&gt;
My experience is that if you are making a single well-managed change like turning on Sediment, then this persistence is actually nice because you can set one change (perhaps -DUSE_SEDIMENT=1) and not worry about the rest of your setup falling apart. When you toggle multiple options it is often safer to blow away the whole build directory and start again with CMake and a &amp;lt;cache-init&amp;gt; file:&lt;br /&gt;
 $ rm -rf build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ cmake  -C ../cmake/SELFE.local.cmake ../src&lt;br /&gt;
&lt;br /&gt;
== Developer Documentation ==&lt;br /&gt;
In contrast to users, developers will use the CMakeLists.txt in /src and its subdirectories. I'll keep this short, because most folks will learn by mimicking examples anyway and there is documentation at [http://www.cmake.org|cmake].&lt;br /&gt;
&lt;br /&gt;
Here are common use cases:&lt;br /&gt;
=== Modifying SELFE modules ===&lt;br /&gt;
Here are some common cases:&lt;br /&gt;
==== Adding a file to an existing module ====&lt;br /&gt;
Just add the name of the file to the pre-existing list in CMakeLists.txt.&lt;br /&gt;
==== Adding an algorithmic option to an existing module. ====&lt;br /&gt;
Please do this at the module directory (not /src) level CMakeLists.txt. You may need the following components to create your addition:&lt;br /&gt;
# either the OPTION cmake command or the SET command. OPTION is an easy way to set up boolean options, SET is used for boolean, strings, paths. If your option is to be user configurable, the SET call has include the CACHE keyword.&lt;br /&gt;
# to pass the option to the compiler using the cmake add_definitions. Good examples to follow include MPIVERSION, USE_TIMER&lt;br /&gt;
# you may want code it so that an environment variable is passed on to the system. See MPI_VERSION.&lt;br /&gt;
&lt;br /&gt;
==== Adding a utility module or file ==== &lt;br /&gt;
If you are creating a new directory, you will need to add_directory() in the /utility level CMakeLists.txt. The rest happens at the directory level of the script. Make sure to create a dependency of &amp;quot;utility&amp;quot; on your new script so that &amp;quot;make utility&amp;quot; works correctly.&lt;br /&gt;
&lt;br /&gt;
==== Adding a new selfe module ====&lt;br /&gt;
Again, learning by example is a good way to tackle this. There is a macro for CMakeLists.txt in the /src level CMakeLists.txt. It will help you bind together:&lt;br /&gt;
# a directory name (usually capitalized)&lt;br /&gt;
# a USE_XXX variable and &lt;br /&gt;
# a (lower case) library name.&lt;br /&gt;
# creation of a dependency of the main driver on your module&lt;br /&gt;
# cause cmake to recurse into your directory and configure it IF the USE_XXX option is enabled&lt;br /&gt;
&lt;br /&gt;
That should be all you need at the /src CMakeLists.txt level. After that, you just add a subdirectory for the module under /src, add the source files and a CMakeLists.txt and copy the style of CMakeLists.txt from an existing module such as /EcoSim or /Sediment. This will create a library and estabish dependencies. In general, you want to depend on the /Core library but not on any of the other modules. &lt;br /&gt;
&lt;br /&gt;
=== Library dependencies ===&lt;br /&gt;
First one obvious caveat -- extra libraries should be avoided if possible. &lt;br /&gt;
&lt;br /&gt;
Dependencies should also be introduced to cmake at the lowest level they are needed. You can introduce the dependency in the /src level CMakeLists.txt if it is going to be used by several modules including Hydro (e.g. NetCDF). However, if it is only going to be used by one module for the moment, (as PETSc is needed by WWM) try to keep it in the module directory. Among other things, you then do not have to put an IF block around it to check if the selfe module is being used because the whole directory will be skipped if the module is toggled off. Someone who isn't using your module can skip the dependency entirely.&lt;br /&gt;
&lt;br /&gt;
The first step with dependent libraries is to get a FindXXX.cmake script for the library if one is not already included in CMake 2.6 and put it in selfe/cmake/modules. You may be tempted to avoid this and try to figure another way, but a suitable script is almost always available on the web and I have found that subverting this feature of CMake makes it fragile. There are some slight tricks making it compatible with cmake 2.6 (specifically the way you include other scripts). The names of the scripts that are included are usually always about the same, so you can probably just look at a script that is already in selfe/cmake/modules. If you have any issues feel free to email me (eli@water.ca.gov).&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=613</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=613"/>
		<updated>2013-02-12T20:44:57Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Formulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging are also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SESAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged, $\hat{\alpha_0}$ are the analysis data to be assimilated, $F()$ represents the ordinary SELFE dynamics and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality is bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations.&lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=612</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=612"/>
		<updated>2013-02-12T20:43:34Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Salt and Temperature Nudging in SELFE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging are also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SESAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged, $\hat{\alpha_0}$ are the analysis data to be assimilated, $F()$ represents the ordinary SELFE dynamics and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=611</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=611"/>
		<updated>2013-02-12T20:06:49Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging is also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SESAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged, $\hat{\alpha_0}$ are the analysis data to be assimilated, $F()$ represents the ordinary SELFE dynamics and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=610</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=610"/>
		<updated>2013-02-12T20:05:34Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging is also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SESAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged, $F()$ represents the ordinary SELFE dynamics and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=609</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=609"/>
		<updated>2013-02-12T18:28:15Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging is also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SESAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged at every location (node, side) and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=608</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=608"/>
		<updated>2013-02-12T18:27:45Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging is also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged at every location (node, side) and the $W_\alpha$ are relaxation weights that are in turn the product of horizontal and vertical contributions:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=607</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=607"/>
		<updated>2013-02-12T18:25:07Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
'''Note: This entry only covers salt and temperature, although similar types of nudging is also available for hydrodynamic variables and tracers.'''&lt;br /&gt;
&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast. In this case velocity was also nudged.&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged at every location (node, side) and the $W_\alpha$ are relaxation weights that are decomposed:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=606</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=606"/>
		<updated>2013-02-12T18:22:11Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
* CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
* The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast&lt;br /&gt;
* Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged at every location (node, side) and the $W_\alpha$ are relaxation weights that are decomposed:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Files and Parameters ==&lt;br /&gt;
The following files and parameters are used to include nudging&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
;inu_st: Enables nudging for inu_st = 1.&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets try it.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=605</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=605"/>
		<updated>2013-02-12T18:16:41Z</updated>

		<summary type="html">&lt;p&gt;Eli: /* Formulation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
 - CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
 - The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast&lt;br /&gt;
 - Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
 - CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
 - The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast&lt;br /&gt;
 - Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial \alpha}{\partial t} = F(\alpha,x,t) + W_{\alpha}(x,t)(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
where $\alpha$ comprises the state variables to be nudged at every location (node, side) and the $W_\alpha$ are relaxation weights that are decomposed:&lt;br /&gt;
$W_{\alpha} = w_{xy} \cdot w_{z}$&lt;br /&gt;
&lt;br /&gt;
The horizontal, vertical and time parameters for the model are described below. Observation quality and the global nudging factor are bundled into $w_{xy}$. Time weighting is constant, though data are linearly interpolated between observations. &lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
The following files and parameters are used&lt;br /&gt;
&lt;br /&gt;
=== param.in ===&lt;br /&gt;
&lt;br /&gt;
;step_nu: This is the nudging data time step, the rate at which new data are introduced to the model. It should be a multiple of the model time step. Nudging is performed every time step, through the entire simulation. Between data time steps, data is linearly interpolated.&lt;br /&gt;
 &lt;br /&gt;
;vnh1, vnh2, vnf1, vnf2: These are parameters used to compose $w_z$ composing the relaxation weights. For a model location between the surface and depth of vnh1, vnf1 is used. Deeper than vnh1 but less than vnh2, the weight is interpolated between vnf1 and vnf2. At depths greater than vnh2, vnf2 is used.&lt;br /&gt;
 &lt;br /&gt;
=== x_nudge.gr3 ===&lt;br /&gt;
The gr3 files represent the horizontal relaxation weights associated with each model node. Sides are given a horizontal relaxation interpolated from their nodes. Note that the weights may contain estimates of data availability and quality as well as scaling considerations. Hence, the weights may be related to the analysis methods that are used to prepare data (salt_nu.in and temp_nu.in)&lt;br /&gt;
 &lt;br /&gt;
=== salt_nu.in and temp_nu.in ===&lt;br /&gt;
These files contain the actual data used for the nudging. Nudging data are given for all nodes, not the locations of observations, and the analysis of data is assumed precalculated. The analysis quality of locations (ie lower far from any good observations) would thus be handled by:&lt;br /&gt;
1.       a low assignment in the horizontal weight, probably with finite support so there are many zeros in this file&lt;br /&gt;
2.       an arbitrary value in salt_nu.in.&lt;br /&gt;
&lt;br /&gt;
The fortran format for creating an xxx_nu.in file is illustrated by this code block:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
         open(35,file='salt_nu.in',form='unformatted')&lt;br /&gt;
         do istep=0,nsteps&lt;br /&gt;
           write(35)istep*dt_nu     ! time stamp in sec (starting from 0)&lt;br /&gt;
            do inode=1,np           ! all nodes&lt;br /&gt;
               write(35)(saltout(jvert,inode),jvert=1,nvrt)   ! all vertical layers&lt;br /&gt;
            enddo&lt;br /&gt;
          enddo&lt;br /&gt;
&amp;lt;/nowiki&lt;br /&gt;
&lt;br /&gt;
Now lets try it.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=604</id>
		<title>Salinity and temperature nudging</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Salinity_and_temperature_nudging&amp;diff=604"/>
		<updated>2013-02-12T16:56:51Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot;== Salt and Temperature Nudging in SELFE == Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state t...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Salt and Temperature Nudging in SELFE ==&lt;br /&gt;
Salt and temperature nudging is available by means of analysis nudging (Newtonian relaxation). The nudging allows the model state to be reconciled with observations in four dimensions. There are three known examples of this nudging:&lt;br /&gt;
 - CORIE applications on the Columbia River, assimilating NCOM results near the ocean boundary&lt;br /&gt;
 - The SEMAME project, using nudging to couple ROMS on the California coast and SELFE on the San Francisco Bay-Delta in a common band along the coast&lt;br /&gt;
 - Salinity initialization of the Bay-Delta project, which uses salt nudging to shorten long spin up times far upstream of the ocean boundary&lt;br /&gt;
&lt;br /&gt;
== Formulation ==&lt;br /&gt;
The nudging formula is an analysis nudging model:&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
$$&lt;br /&gt;
\frac{\partial}p^*\alpha}{\partial t} = F(\alpha,x,t) + G_{\alpha} \dot W_{\alpha}(x,t)\dot \epsilon_{\alpha}(x) \p^*(\hat{\alpha_0} - \alpha)&lt;br /&gt;
$$&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=603</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=603"/>
		<updated>2013-02-12T16:24:20Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The map below indicates the location of visitors to this site. Click on the map to see a larger view.&lt;br /&gt;
{|&lt;br /&gt;
|[http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this wiki site are contributed by users and developers alike, and therefore the developers cannot guarantee all info is correct and up to date, although they are committed to patrolling the site regularly. Verify if necessary by sending a message to the SELFE mailing-list&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this wiki site is appropriate for MPI SELFE only; some info may be version sensitive, and so consult the files in your source code bundle for up-to-date info&lt;br /&gt;
&amp;lt;LI&amp;gt; Please consider contributing to any topic and suggest new topics of your interest. You first need to have an account created for you (we do not allow people to create accounts themselves to prevent spams). If you would like to contribute to the page please send an e-mail to [mailto:yjzhang@vims.edu Joseph Zhang], with some basic info: your ''real'' name and email address. &lt;br /&gt;
&amp;lt;LI&amp;gt; The links below that have content are in blue.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [[About SELFE]]&lt;br /&gt;
* [[SELFE news and announcements]]&lt;br /&gt;
* [[SELFE case studies]]&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
** [[Downloading and compiling SELFE and utilities]]&lt;br /&gt;
** [[Navigating the source code bundle]]&lt;br /&gt;
** [[How to set up a model]]&lt;br /&gt;
** [[Examples]]&lt;br /&gt;
** [[SELFE registration and mailing list]]&lt;br /&gt;
&lt;br /&gt;
*[[Beta version testing]]&lt;br /&gt;
* [[Online tutorials]]&lt;br /&gt;
* [[Test cases and benchmarks]]&lt;br /&gt;
&lt;br /&gt;
* [[Model documentation]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/MPI_developers_notes.pdf Developer's notes on the code]&lt;br /&gt;
** [[Barotropic module]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/transport.pdf Scalar Transport module]&lt;br /&gt;
** [[Windwave module]]&lt;br /&gt;
** [[Sediment Transport module]]&lt;br /&gt;
** [[Ecological modules]]&lt;br /&gt;
** [[Oil spill module]]&lt;br /&gt;
&lt;br /&gt;
* [[Special topics]]&lt;br /&gt;
** [[ACE tools]]&lt;br /&gt;
** [[Mesh generation]]&lt;br /&gt;
** [[Updating a simulation after changing an existing mesh]]&lt;br /&gt;
** [[Convergence study with SELFE]]&lt;br /&gt;
** [[Tides]]&lt;br /&gt;
** [[Salinity and temperature nudging]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[Spatial and temporal discretization]]&lt;br /&gt;
** [[Explicit vs. implicit calculation]]&lt;br /&gt;
** [[Hydrostatic vs. non-hydrostatic calculation]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/Report-ChezyFlow-Sept2011.pdf  Bottom boundary layer formulation in SELFE]&lt;br /&gt;
** [[Simulating wetting and drying with SELFE]]&lt;br /&gt;
** [[Baroclinic vs. barotropic mode]]&lt;br /&gt;
** [[Salt intrusion study with SELFE]]&lt;br /&gt;
** [[2D vs. 3D mode]]&lt;br /&gt;
** [[Atmospheric forcing]]&lt;br /&gt;
&lt;br /&gt;
* [[User manual]]&lt;br /&gt;
** [[Hydrodynamics]]&lt;br /&gt;
** [[Scalar Transport]]&lt;br /&gt;
** [[Sediment Transport]]&lt;br /&gt;
** [[Windwave]]&lt;br /&gt;
** [[Ecology]]&lt;br /&gt;
&lt;br /&gt;
* [[Output formats and postprocessing]]&lt;br /&gt;
** [[Parallel output: time and processor blocks]]&lt;br /&gt;
** [[Visualization]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[One way nesting]]&lt;br /&gt;
&lt;br /&gt;
* [[Sharing your tools]]&lt;br /&gt;
&lt;br /&gt;
* [[SELFE FAQ]]&lt;br /&gt;
&lt;br /&gt;
* [http://www.stccmop.org/CORIE/modeling/elcirc/elcircjour.html References]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=506</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=506"/>
		<updated>2012-10-23T17:10:11Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The map below indicates the location of visitors to this site. Click on the map to see a larger view.&lt;br /&gt;
{|&lt;br /&gt;
|[http://www.revolvermaps.com/?target=enlarge&amp;amp;amp;i=3r854vj4vdn&amp;amp;amp;color=ff0000&amp;amp;amp;m=0 http://rd.revolvermaps.com/h/m/a/0/ff0000/139/0/3r854vj4vdn.png]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;OL&amp;gt;&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this wiki site are contributed by users and developers alike, and therefore the developers cannot guarantee all info is correct and up to date, although they are committed to patrolling the site regularly. Verify if necessary by sending a message to the SELFE mailing-list&lt;br /&gt;
&amp;lt;LI&amp;gt; The information on this wiki site is appropriate for MPI SELFE only; some info may be version sensitive, and so consult the files in your source code bundle for up-to-date info&lt;br /&gt;
&amp;lt;LI&amp;gt; Please consider contribute to any topic and suggest new topics of your interest. You need to register yourself first at this site. For inquiries, email yjzhang@vims.edu&lt;br /&gt;
&amp;lt;LI&amp;gt; The links below that have content are in blue.&lt;br /&gt;
&amp;lt;/OL&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* [[About SELFE]]&lt;br /&gt;
* [[SELFE news and announcements]]&lt;br /&gt;
* [[SELFE case studies]]&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
** [[Downloading and compiling SELFE and utilities]]&lt;br /&gt;
** [[Navigating the source code bundle]]&lt;br /&gt;
** [[How to set up a model]]&lt;br /&gt;
** [[Examples]]&lt;br /&gt;
** [[SELFE registration and mailing list]]&lt;br /&gt;
&lt;br /&gt;
*[[Beta version testing]]&lt;br /&gt;
* [[Online tutorials]]&lt;br /&gt;
* [[Test cases and benchmarks]]&lt;br /&gt;
&lt;br /&gt;
* [[Model documentation]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/MPI_developers_notes.pdf Developer's notes on the code]&lt;br /&gt;
** [[Barotropic module]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/transport.pdf Scalar Transport module]&lt;br /&gt;
** [[Windwave module]]&lt;br /&gt;
** [[Sediment Transport module]]&lt;br /&gt;
** [[Ecological modules]]&lt;br /&gt;
** [[Oil spill module]]&lt;br /&gt;
&lt;br /&gt;
* [[Special topics]]&lt;br /&gt;
** [[ACE tools]]&lt;br /&gt;
** [[Mesh generation]]&lt;br /&gt;
** [[Updating a simulation after changing an existing mesh]]&lt;br /&gt;
** [[Convergence study with SELFE]]&lt;br /&gt;
** [[Tides]]&lt;br /&gt;
** [[Salinity initialization and nudging]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[Spatial and temporal discretization]]&lt;br /&gt;
** [[Explicit vs. implicit calculation]]&lt;br /&gt;
** [[Hydrostatic vs. non-hydrostatic calculation]]&lt;br /&gt;
** [http://ccrm.vims.edu/yinglong/wiki_files/Report-ChezyFlow-Sept2011.pdf  Bottom boundary layer formulation in SELFE]&lt;br /&gt;
** [[Baroclinic vs. barotropic mode]]&lt;br /&gt;
** [[Salt intrusion study with SELFE]]&lt;br /&gt;
** [[2D vs. 3D mode]]&lt;br /&gt;
** [[Atmospheric forcing]]&lt;br /&gt;
&lt;br /&gt;
* [[User manual]]&lt;br /&gt;
** [[Hydrodynamics]]&lt;br /&gt;
** [[Scalar Transport]]&lt;br /&gt;
** [[Sediment Transport]]&lt;br /&gt;
** [[Windwave]]&lt;br /&gt;
** [[Ecology]]&lt;br /&gt;
&lt;br /&gt;
* [[Output formats and postprocessing]]&lt;br /&gt;
** [[Parallel output: time and processor blocks]]&lt;br /&gt;
** [[Visualization]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[One way nesting]]&lt;br /&gt;
&lt;br /&gt;
* [[Sharing your tools]]&lt;br /&gt;
&lt;br /&gt;
* [[SELFE FAQ]]&lt;br /&gt;
&lt;br /&gt;
* [http://www.stccmop.org/CORIE/modeling/elcirc/elcircjour.html References]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Baroclinic_vs._barotropic_mode&amp;diff=7</id>
		<title>Baroclinic vs. barotropic mode</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Baroclinic_vs._barotropic_mode&amp;diff=7"/>
		<updated>2012-08-27T17:08:32Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mode descriptions ==&lt;br /&gt;
Some description of the Baroclinic and Barotropic equations is given in the SELFE paper. A little elaboration will convey how these are implemented and used in practice. &lt;br /&gt;
&lt;br /&gt;
The baroclinic and barotropic modes are toggled in the model by means of the parameter ***. They differ in that in Baroclinic mode, the contribution of salinity-induced density differences is included in the momentum equations. In contrast, in Barotropic mode salt and temperature are (at most) considered passive tracers. &lt;br /&gt;
&lt;br /&gt;
In barotropic mode:&lt;br /&gt;
* You can choose whether to calculate salt and temperature transport by toggling the ''itracer'' parameter in the ''param.in'' file. &lt;br /&gt;
* This choice affects performance (see below) and also data requirements for salt and temperature. The model (****is/isn't smart) about ...&lt;br /&gt;
* The contribution of density to horizontal pressure gradients is dropped.&lt;br /&gt;
* The turbulence closure is still calculated in 3D, but the supression of turbulence due to stratification is not included.&lt;br /&gt;
&lt;br /&gt;
== Performance considerations ==&lt;br /&gt;
Barotropic mode calculation can be a lot faster than baroclinic. A key speedup is achieved by setting ''itracer=0'' and neglecting salt and temperature entirely, which is particularly common in the case that subcycling of transport is a performance limiter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Boundary and well-posedness issues ==&lt;br /&gt;
&lt;br /&gt;
== Sequential barotropic-baroclinic analysis ==&lt;br /&gt;
One common usage pattern is to use a sequence of barotropic-baroclinic model runs. The barotropic simulation is used in a preliminary sweep in order to calculate 3D boundary conditions for the subsequent baroclinic analysis. Typically this is done with transport off, maximizing speed for the barotropic step.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Baroclinic_vs._barotropic_mode&amp;diff=6</id>
		<title>Baroclinic vs. barotropic mode</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Baroclinic_vs._barotropic_mode&amp;diff=6"/>
		<updated>2012-08-27T17:07:29Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot; == Mode descriptions == Some description of the Baroclinic and Barotropic equations is given in the SELFE paper. A little elaboration will convey how these are implemented an...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Mode descriptions ==&lt;br /&gt;
Some description of the Baroclinic and Barotropic equations is given in the SELFE paper. A little elaboration will convey how these are implemented and used in practice. &lt;br /&gt;
&lt;br /&gt;
The Baroclinic and Barotropic modes are toggled in the model by means of the parameter ***. They differ in that in Baroclinic mode, the contribution of salinity-induced density differences is included in the momentum equations. In contrast, in Barotropic mode salt and temperature are (at most) considered passive tracers. &lt;br /&gt;
&lt;br /&gt;
In barotropic mode:&lt;br /&gt;
* You can choose whether to calculate salt and temperature transport by toggling the ''itracer'' parameter in the ''param.in'' file. &lt;br /&gt;
* This choice affects performance (see below) and also data requirements for salt and temperature. The model (****is/isn't smart) about ...&lt;br /&gt;
* The contribution of density to horizontal pressure gradients is dropped.&lt;br /&gt;
* The turbulence closure is still calculated in 3D, but the supression of turbulence due to stratification is not included.&lt;br /&gt;
&lt;br /&gt;
== Performance considerations ==&lt;br /&gt;
Barotropic mode calculation can be a lot faster than Baroclinic. A key speedup is achieved by setting ''itracer=0'' and neglecting salt and temperature entirely, which is particularly common in the case that subcycling of transport is a performance limiter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Boundary and well-posedness issues ==&lt;br /&gt;
&lt;br /&gt;
== Sequential barotropic-baroclinic analysis ==&lt;br /&gt;
One common usage pattern is to use a sequence of barotropic-baroclinic model runs. The barotropic simulation is used in a preliminary sweep in order to calculate 3D boundary conditions for the subsequent baroclinic analysis. Typically this is done with transport off, maximizing speed for the barotropic step.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Parallel_output:_time_and_processor_blocks&amp;diff=5</id>
		<title>Parallel output: time and processor blocks</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Parallel_output:_time_and_processor_blocks&amp;diff=5"/>
		<updated>2012-08-27T17:05:54Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot;SELFE binary state output is emitted in a directory called /outputs. This directory must exist or you will get an immediate warning from the model. Depending on your MPI confi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SELFE binary state output is emitted in a directory called /outputs. This directory must exist or you will get an immediate warning from the model. Depending on your MPI configuration, the /outputs directory may exist in a central location (this is more common) or each processor may have an instance in which case you need to collect together the contents into a central location.&lt;br /&gt;
&lt;br /&gt;
An example file name is 9_0000_elev.61. More generally, the file name is:&lt;br /&gt;
[time_block]_[processor_no]_[variable_name].[fortran_unit]&lt;br /&gt;
&lt;br /&gt;
; Variable name &lt;br /&gt;
The variable name is transparent and covered in the documentation. &lt;br /&gt;
&lt;br /&gt;
; Time block&lt;br /&gt;
The time blocks start from 1 and are sequential. The model buffers and writes data occasionally. Every ihfskip time steps it opens a new time block. For instance, if the time step is 120 seconds and ihfskip = 10080 each block will be 14 days long. &lt;br /&gt;
# &amp;quot;Neat&amp;quot; time lengths that will make meaningful analysis (e.g. 14 days) are usually easiest later when you postprocess.&lt;br /&gt;
# Some of the output post-processing scripts will run a lot better if the length of your simulation is an even multiple of ihfskip. This can be done by altering ihfskip or the simulation length -- at the risk of lengthening the simulation a bit, the latter often produces a neater result.&lt;br /&gt;
# If your simulation length is not an even multiple of the time block length, the last time block will be truncated on the last block. This will cause some minor errors and warnings in the post-processing tools. In addition, if you then restart the run it is best to repeat and overwrite the truncated block -- the post-processing tools do not work well with blocks that grow and shrink in the middle of the run.&lt;br /&gt;
# Even if the output blocks match the end of the simulation very neatly, the model (at the time of writing) will open a new block that will be unused. This is odd but harmless.&lt;br /&gt;
&lt;br /&gt;
; Processor number&lt;br /&gt;
The mpi_processor number starts at 0 and represents the mpi processor id from the task that wrote the output. If your processor writes to a shared directory, the files for different processors will be collocated, but since clusters are not always set up the same way and each process is writing locally this isn't always the case. The per-processor outputs are usually gathered into a global binary. The scripts that do this are called combine_output*. Once you are done, you will have a binary file called something like 9_elev.61. The time block and the variable name remain. There is no utility for gathering the outputs in time, instead most post-processing tools are able to work with multiple files.&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=4</id>
		<title>CMake Build System</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=CMake_Build_System&amp;diff=4"/>
		<updated>2012-08-27T17:02:43Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot;      == Introduction == CMake is one option currently available for building SELFE. This documentation covers the SELFE cmake build system under Linux. While CMake is highly ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;     &lt;br /&gt;
== Introduction ==&lt;br /&gt;
CMake is one option currently available for building SELFE. This documentation covers the SELFE cmake build system under Linux. While CMake is highly portable and probably could be made to work under Windows and Mac, no one has tested it under those operating systems. For more information on cmake and documentation, see the [http://www.cmake.org cmake] web site.&lt;br /&gt;
&lt;br /&gt;
== User Documentation ==&lt;br /&gt;
&lt;br /&gt;
=== Basic CMake Usage ===&lt;br /&gt;
On Linux, Cmake is just a preprocessor for Make much like a typical ''configure'' script. There are also generators for Eclipse and some other native build systems including Windows and Mac. When you reconfigure the project a lot by swapping modules, compiler options, build type (debug/release) or changing compilers, you re-run cmake ... but most of the time you just use ''make'' or some other build tool. You can create an out-of-source build from the /selfe directory by doing the following:&lt;br /&gt;
 &amp;gt; mkdir build&lt;br /&gt;
 &amp;gt; cd build&lt;br /&gt;
 &amp;gt; setenv FC ifort    # Might be shell-dependent. The default (no action needed) is gfortran&lt;br /&gt;
 &amp;gt; cmake ../src&lt;br /&gt;
 &amp;gt; make -j8&lt;br /&gt;
&lt;br /&gt;
If you have the prerequisites in typical places or set up your environment as recommended below this sequence will produce a Hydro-only build with default options including the selfe executable and all utilities. More realistically, you will probably have to set some library locations. Configuration is considered in more detail below.&lt;br /&gt;
&lt;br /&gt;
In this case CMake is really just building a Makefile. The Makefile that gets produced has the following targets:&lt;br /&gt;
* all (default)&lt;br /&gt;
* individual libraries: sediment, ecosim, wwm (assuming you configured CMAKE with USE_XXX)&lt;br /&gt;
* pelfe (with whatever features you toggled on)&lt;br /&gt;
* utility (all utility scripts)&lt;br /&gt;
* pyutil (all python utilities)&lt;br /&gt;
* install (installs the system to the &amp;quot;usual&amp;quot; spots /usr/bin etc. The install location is configurable and respects DESTDIR. See cmake docs.&lt;br /&gt;
&lt;br /&gt;
The Makefile is robust if you make source file changes, and can manage complex Fortran module dependencies. If you add a file or alter the project you will have to re-run Cmake so that the new addition gets included. CMake does this well and you can run it with the very simple 'cmake ../src' command. The Makefile scales very well to 8 threads.&lt;br /&gt;
&lt;br /&gt;
There are cases where you should make clean and rebuild all the source. If you toggle compiler define options (-D), you are effectively changing the source code that reaches the compiler net of the preprocessor, yet not actually touching the text of the source file.  The GNU Makefile system does not recognize such a change. There is a best practice for making sure that configuration changes are source changes -- configuration &amp;quot;include files&amp;quot; -- but we are not there yet. '''If you change #definitions, make clean'''.&lt;br /&gt;
&lt;br /&gt;
If you change the library or compiler options -- or run into problems -- you should consider blowing away the whole /build directory and starting over:&lt;br /&gt;
 selfe$ rm -rf build/*&lt;br /&gt;
 selfe$ cd build&lt;br /&gt;
 selfe$ cmake ../src&lt;br /&gt;
&lt;br /&gt;
=== SELFE Prerequisites === &lt;br /&gt;
To build the model, you will need the following libraries:&lt;br /&gt;
;CMake:  The build system is tested against version 2.6 and 2.8&lt;br /&gt;
;Parmetis: Domain decomposition and sparse matrix ordering library&lt;br /&gt;
* Required for Hydro.&lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment PARMETIS_DIR to locate another build.&lt;br /&gt;
* Location can also be given by a full path in configuration. See below.&lt;br /&gt;
;GOTM:  Optional turbulence closure for Hydro. &lt;br /&gt;
* Included in distro. &lt;br /&gt;
* If you build the included one, linking is automatic.&lt;br /&gt;
* You can also set the environment GOTM_DIR to locate another build&lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;NetCDF: File format library for Hydro. &lt;br /&gt;
* Assumed to be installed separately&lt;br /&gt;
* If you set the environment variable NETCDF_DIR (all caps) or put it in /usr/lib /usr/include detection is automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;HDF5: Parallel backend for some NetCDF 4 (parallel) builds. CMake will tell you if it is needed.&lt;br /&gt;
* If you set HDF5_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.&lt;br /&gt;
;PETSc: Numerical algorithm library required for the Wind-wave module. &lt;br /&gt;
* If you set PETSC_DIR environment variable or put it in usr/lib usr/include, detection automatic. &lt;br /&gt;
* Location can also be hard coded in configuration. See below.          &lt;br /&gt;
;MPI: Message passing library used for parallel processing&lt;br /&gt;
* MPI wrappers (mpif90) are needed to locate the MPI tools and dependencies (but are not used for the build)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use a Linux &amp;quot;environment module&amp;quot; system, the XXX_DIR etc may be automatically set (just watch out for case). Alternatively, the libraries should be found if they are in system lib and include directories as well (e.g. /usr/lib). Finally, XXX_DIR is not the only environment variable that can be used as a hint to cmake. You can also set up pointers to the libraries and includes individually. See the file FindNetCDF.cmake for examples ... but the easiest way is just NetCDF_DIR.&lt;br /&gt;
&lt;br /&gt;
=== Configuration === &lt;br /&gt;
==== Examples of things you will want to configure====&lt;br /&gt;
*  custom compiler flags (but see below!!!!)&lt;br /&gt;
*  the name of the compiler &lt;br /&gt;
*  custom library locations, &lt;br /&gt;
*  choosing selfe modules to include in the driver&lt;br /&gt;
*  performance/build parameters (BUILD_TYPE=Debug, MPIVERSION=2, USE_TIMING)&lt;br /&gt;
&lt;br /&gt;
'''Custom compiler flags''': Flag choices are often re-usable across similar systems.  If you are setting up flags that should be the standard for your architecture, I would urge you to contribute to selfe/cmake/SELFECompile.cmake so that others can make use of your work and so that your personal configuration is not mixed up with stuff that is just standard for your architecture. If you are tweaking the flags for real then you should follow the directions below. &lt;br /&gt;
&lt;br /&gt;
One class of flags that seems to be a bit of a special case are the flags that force static linking such as '''-Bstatic''' or '''-static'''. I am pretty open to fixing the cmake files so that they will do what you want, but rather than instinctively adding these flags you should investigate first whether maybe CMake already will do what you want ... it generally favors static linking, although MPI can be an exception.&lt;br /&gt;
&lt;br /&gt;
The '''compiler''' can be identified with the '''FC''' environmental variable or the CMAKE_Fortran_COMPILER variable -- case sensitive. Almost everyone seems to do it using the environent, and if you are using the linux [http://linux.die.net/man/1/module module system].&lt;br /&gt;
&lt;br /&gt;
==== Options for configuring CMake ====&lt;br /&gt;
Please do not edit the CMakeLists.txt file to add your own directories and configuration info. User-specific data does not belong in CMakeLists.txt. There are two ways to get user selections and variables into CMake, which are not mutually exclusive:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== METHOD #1: Use the -D option and a shell/batch file =====&lt;br /&gt;
&lt;br /&gt;
The CMake -D option forcibly defines a variable. It might be more immediately intuitive for GNU make users who set a variable &lt;br /&gt;
and expect their orders to be followed.  To use the -D method, create a shell script in /selfe that looks like this:&lt;br /&gt;
 mkdir build&lt;br /&gt;
 cd build&lt;br /&gt;
 cmake -DUSE_ECO=1 \&lt;br /&gt;
      -DMPIVERSION=1 \&lt;br /&gt;
      ...&lt;br /&gt;
 make&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
The only unintuitive part is that you need an argument for all the variables (ON/TRUE/1 all work for turning something on).&lt;br /&gt;
&lt;br /&gt;
===== METHOD #2 Use -C &amp;lt;cache-init-file&amp;gt; to populate the cmake cache. =====&lt;br /&gt;
The notion of the CMake cache takes some getting used to.  The first time you run cmake, a number of compiler and build options will be placed in a file called CMakeCache.txt. The -C option allows you to specify an input cmake script that has nothing but SET statements that the user can use to populate options ... an example of such a file is /selfe/cmake/SELFE.local.cmake&lt;br /&gt;
&lt;br /&gt;
After the first run, the cache can be manipulated with text, cursor or graphical tools (ccmake or QT based) or by repeating the cmake invocation with new -D options. I don't use the graphical tools much, but ccmake in non-advanced view is nice because it shows you an all-encompassing view of user-configurable variables. &lt;br /&gt;
&lt;br /&gt;
Now here is the funny thing about SET (whether in your &amp;lt;init-cache&amp;gt; file or in the build system): once the cache is initialized, any variable that SETs the value of a cached variable will no longer be evaluated unless the FORCE tag is used. As a consequence the -C &amp;lt;init-file&amp;gt; will not be influential ever again unless &lt;br /&gt;
# you use FORCE in your SET statements or &lt;br /&gt;
# you blow away the cache and rebuild it.&lt;br /&gt;
&lt;br /&gt;
My experience is that if you are making a single well-managed change like turning on Sediment, then this persistence is actually nice because you can set one change (perhaps -DUSE_SEDIMENT=1) and not worry about the rest of your setup falling apart. When you toggle multiple options it is often safer to blow away the whole build directory and start again with CMake and a &amp;lt;cache-init&amp;gt; file:&lt;br /&gt;
 $ rm -rf build&lt;br /&gt;
 $ cd build&lt;br /&gt;
 $ cmake  -C ../cmake/SELFE.local.cmake ../src&lt;br /&gt;
&lt;br /&gt;
== Developer Documentation ==&lt;br /&gt;
In contrast to users, developers will use the CMakeLists.txt in /src and its subdirectories. I'll keep this short, because most folks will learn by mimicking examples anyway and there is documentation at [http://www.cmake.org|cmake].&lt;br /&gt;
&lt;br /&gt;
Here are common use cases:&lt;br /&gt;
=== Modifying SELFE modules ===&lt;br /&gt;
Here are some common cases:&lt;br /&gt;
==== Adding a file to an existing module ====&lt;br /&gt;
Just add the name of the file to the pre-existing list in CMakeLists.txt.&lt;br /&gt;
==== Adding an algorithmic option to an existing module. ====&lt;br /&gt;
Please do this at the module directory (not /src) level CMakeLists.txt. You may need the following components to create your addition:&lt;br /&gt;
# either the OPTION cmake command or the SET command. OPTION is an easy way to set up boolean options, SET is used for boolean, strings, paths. If your option is to be user configurable, the SET call has include the CACHE keyword.&lt;br /&gt;
# to pass the option to the compiler using the cmake add_definitions. Good examples to follow include MPIVERSION, USE_TIMER&lt;br /&gt;
# you may want code it so that an environment variable is passed on to the system. See MPI_VERSION.&lt;br /&gt;
&lt;br /&gt;
==== Adding a utility module or file ==== &lt;br /&gt;
If you are creating a new directory, you will need to add_directory() in the /utility level CMakeLists.txt. The rest happens at the directory level of the script. Make sure to create a dependency of &amp;quot;utility&amp;quot; on your new script so that &amp;quot;make utility&amp;quot; works correctly.&lt;br /&gt;
&lt;br /&gt;
==== Adding a new selfe module ====&lt;br /&gt;
Again, learning by example is a good way to tackle this. There is a macro for CMakeLists.txt in the /src level CMakeLists.txt. It will help you bind together:&lt;br /&gt;
# a directory name (usually capitalized)&lt;br /&gt;
# a USE_XXX variable and &lt;br /&gt;
# a (lower case) library name.&lt;br /&gt;
# creation of a dependency of the main driver on your module&lt;br /&gt;
# cause cmake to recurse into your directory and configure it IF the USE_XXX option is enabled&lt;br /&gt;
&lt;br /&gt;
That should be all you need at the /src CMakeLists.txt level. After that, you just add a subdirectory for the module under /src, add the source files and a CMakeLists.txt and copy the style of CMakeLists.txt from an existing module such as /EcoSim or /Sediment. This will create a library and estabish dependencies. In general, you want to depend on the /Core library but not on any of the other modules. &lt;br /&gt;
&lt;br /&gt;
=== Library dependencies ===&lt;br /&gt;
First one obvious caveat -- extra libraries should be avoided if possible. &lt;br /&gt;
&lt;br /&gt;
Dependencies should also be introduced to cmake at the lowest level they are needed. You can introduce the dependency in the /src level CMakeLists.txt if it is going to be used by several modules including Hydro (e.g. NetCDF). However, if it is only going to be used by one module for the moment, (as PETSc is needed by WWM) try to keep it in the module directory. Among other things, you then do not have to put an IF block around it to check if the selfe module is being used because the whole directory will be skipped if the module is toggled off. Someone who isn't using your module can skip the dependency entirely.&lt;br /&gt;
&lt;br /&gt;
The first step with dependent libraries is to get a FindXXX.cmake script for the library if one is not already included in CMake 2.6 and put it in selfe/cmake/modules. You may be tempted to avoid this and try to figure another way, but a suitable script is almost always available on the web and I have found that subverting this feature of CMake makes it fragile. There are some slight tricks making it compatible with cmake 2.6 (specifically the way you include other scripts). The names of the scripts that are included are usually always about the same, so you can probably just look at a script that is already in selfe/cmake/modules. If you have any issues feel free to email me (eli@water.ca.gov).&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Downloading_and_compiling_SELFE_and_utilities&amp;diff=3</id>
		<title>Downloading and compiling SELFE and utilities</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Downloading_and_compiling_SELFE_and_utilities&amp;diff=3"/>
		<updated>2012-08-27T17:01:06Z</updated>

		<summary type="html">&lt;p&gt;Eli: Created page with &amp;quot;You can download SELFE from the CORIE [http://www.stccmop.org/CORIE/modeling/selfe/ home page]  There are currently several build systems being used to build SELFE, including ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You can download SELFE from the CORIE [http://www.stccmop.org/CORIE/modeling/selfe/ home page]&lt;br /&gt;
&lt;br /&gt;
There are currently several build systems being used to build SELFE, including GNU Make and CMake. The traditional GNU Makefiles are documented internally, but are not particularly powerful. &lt;br /&gt;
&lt;br /&gt;
[[CMake Build System]]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
	<entry>
		<id>http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=2</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://ccrm.vims.edu/w/index.php?title=Main_Page&amp;diff=2"/>
		<updated>2012-08-27T17:00:24Z</updated>

		<summary type="html">&lt;p&gt;Eli: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SELFE ==&lt;br /&gt;
... please change this organization where ever it does not fit your needs!!&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started]]&lt;br /&gt;
** [[Downloading and compiling SELFE and utilities]]&lt;br /&gt;
** [[How to set up a model]]&lt;br /&gt;
** [[Examples]]&lt;br /&gt;
&lt;br /&gt;
* [[Model documentation]]&lt;br /&gt;
** [[Hydrodynamics module]]&lt;br /&gt;
** [[Scalar Transport module]]&lt;br /&gt;
** [[Windwave module]]&lt;br /&gt;
** [[Sediment Transport module]]&lt;br /&gt;
&lt;br /&gt;
* [[Special topics]]&lt;br /&gt;
** [[Tidal boundary]]&lt;br /&gt;
** [[Mesh creation]]&lt;br /&gt;
** [[Salinity initialization and nudging]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[Spatial and temporal discretization]]&lt;br /&gt;
** [[Explicit vs. implicit calculation]]&lt;br /&gt;
** [[Hydrostatic vs. non-hydrostatic calculation]]&lt;br /&gt;
** [[Baroclinic vs. barotropic mode]]&lt;br /&gt;
** [[2D vs. 3D mode]]&lt;br /&gt;
&lt;br /&gt;
* [[User manual]]&lt;br /&gt;
** [[Hydrodynamics]]&lt;br /&gt;
** [[Scalar Transport]]&lt;br /&gt;
** [[Sediment Transport]]&lt;br /&gt;
** [[Windwave]]&lt;br /&gt;
&lt;br /&gt;
* [[Case studies and links]]&lt;br /&gt;
&lt;br /&gt;
* [[Output formats and postprocessing]]&lt;br /&gt;
** [[Parallel output: time and processor blocks]]&lt;br /&gt;
** [[Visualization]]&lt;br /&gt;
** [[Harmonic analysis]]&lt;br /&gt;
** [[One way nesting]]&lt;br /&gt;
&lt;br /&gt;
* [[References]]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software.&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Eli</name></author>
		
	</entry>
</feed>