[Dart-dev] [6654] DART/trunk/models/gitm: Files that were part of Alexey' s patchfile and some updated

nancy at ucar.edu nancy at ucar.edu
Fri Dec 6 14:45:27 MST 2013


Revision: 6654
Author:   thoar
Date:     2013-12-06 14:45:26 -0700 (Fri, 06 Dec 2013)
Log Message:
-----------
Files that were part of Alexey's patchfile and some updated
html that I wrote.

Added Paths:
-----------
    DART/trunk/models/gitm/dart_to_gitm.html
    DART/trunk/models/gitm/dart_to_gitm.nml
    DART/trunk/models/gitm/gitm_to_dart.html
    DART/trunk/models/gitm/gitm_to_dart.nml
    DART/trunk/models/gitm/matlab/
    DART/trunk/models/gitm/matlab/GC.m
    DART/trunk/models/gitm/matlab/MakeManyObs.m
    DART/trunk/models/gitm/matlab/PlotVerticalObs.m
    DART/trunk/models/gitm/matlab/binsat2txt_champ_m.m
    DART/trunk/models/gitm/matlab/calc_vtec.m
    DART/trunk/models/gitm/matlab/calc_vtec_grid.m
    DART/trunk/models/gitm/matlab/champ2txt_m.m
    DART/trunk/models/gitm/matlab/dat.m
    DART/trunk/models/gitm/matlab/dat2mat.m
    DART/trunk/models/gitm/matlab/data2mat3d_m.m
    DART/trunk/models/gitm/matlab/dats.m
    DART/trunk/models/gitm/matlab/dats2mat.m
    DART/trunk/models/gitm/matlab/f107_p.m
    DART/trunk/models/gitm/matlab/imagescn.m
    DART/trunk/models/gitm/matlab/interp1np.m
    DART/trunk/models/gitm/matlab/interp1nr.m
    DART/trunk/models/gitm/matlab/interpolateN.m
    DART/trunk/models/gitm/matlab/interpolateN_CIRC.m
    DART/trunk/models/gitm/matlab/interpolateN_b.m
    DART/trunk/models/gitm/matlab/loc.m
    DART/trunk/models/gitm/matlab/m90.m
    DART/trunk/models/gitm/matlab/mat2dart.m
    DART/trunk/models/gitm/matlab/mat2dat.m
    DART/trunk/models/gitm/matlab/om.m
    DART/trunk/models/gitm/matlab/pbs_ma.sh
    DART/trunk/models/gitm/matlab/plot_champ.m
    DART/trunk/models/gitm/matlab/plot_cr6.m
    DART/trunk/models/gitm/matlab/plot_rmse_xxx_evolution.m
    DART/trunk/models/gitm/matlab/plott.m
    DART/trunk/models/gitm/matlab/rst2mat.m
    DART/trunk/models/gitm/matlab/subplota.m
    DART/trunk/models/gitm/matlab/subview.m
    DART/trunk/models/gitm/matlab/sun_rot.m
    DART/trunk/models/gitm/matlab/time_plot.m
    DART/trunk/models/gitm/matlab/time_plot_bw.m
    DART/trunk/models/gitm/matlab/time_plot_old.m
    DART/trunk/models/gitm/matlab/time_plot_old_bw.m
    DART/trunk/models/gitm/model_mod.nml
    DART/trunk/models/gitm/python/
    DART/trunk/models/gitm/python/README
    DART/trunk/models/gitm/python/create_init_distr.py
    DART/trunk/models/gitm/python/map.py
    DART/trunk/models/gitm/python/map.txt
    DART/trunk/models/gitm/python/mapper.py
    DART/trunk/models/gitm/python/mapper_old.py
    DART/trunk/models/gitm/python/pbs_py.sh
    DART/trunk/models/gitm/python/plot_champ.py
    DART/trunk/models/gitm/python/plot_data_2d.py
    DART/trunk/models/gitm/python/plot_diff_2d.py
    DART/trunk/models/gitm/python/plot_diff_2d_f107.py
    DART/trunk/models/gitm/python/plot_gps_3d.py
    DART/trunk/models/gitm/python/plot_gps_3d_interp.py
    DART/trunk/models/gitm/python/plot_tec.py
    DART/trunk/models/gitm/python/plot_tec_lib.py
    DART/trunk/models/gitm/python/read_gitm_bin.py
    DART/trunk/models/gitm/python/read_gps_txt.py
    DART/trunk/models/gitm/python/write_gps_txt.py
    DART/trunk/models/gitm/work/clean.sh
    DART/trunk/models/gitm/work/pbs_file.sh
    DART/trunk/models/gitm/work/run_f.bash

Removed Paths:
-------------
    DART/trunk/models/gitm/matlab/GC.m
    DART/trunk/models/gitm/matlab/MakeManyObs.m
    DART/trunk/models/gitm/matlab/PlotVerticalObs.m
    DART/trunk/models/gitm/matlab/binsat2txt_champ_m.m
    DART/trunk/models/gitm/matlab/calc_vtec.m
    DART/trunk/models/gitm/matlab/calc_vtec_grid.m
    DART/trunk/models/gitm/matlab/champ2txt_m.m
    DART/trunk/models/gitm/matlab/dat.m
    DART/trunk/models/gitm/matlab/dat2mat.m
    DART/trunk/models/gitm/matlab/data2mat3d_m.m
    DART/trunk/models/gitm/matlab/dats.m
    DART/trunk/models/gitm/matlab/dats2mat.m
    DART/trunk/models/gitm/matlab/f107_p.m
    DART/trunk/models/gitm/matlab/imagescn.m
    DART/trunk/models/gitm/matlab/interp1np.m
    DART/trunk/models/gitm/matlab/interp1nr.m
    DART/trunk/models/gitm/matlab/interpolateN.m
    DART/trunk/models/gitm/matlab/interpolateN_CIRC.m
    DART/trunk/models/gitm/matlab/interpolateN_b.m
    DART/trunk/models/gitm/matlab/loc.m
    DART/trunk/models/gitm/matlab/m90.m
    DART/trunk/models/gitm/matlab/mat2dart.m
    DART/trunk/models/gitm/matlab/mat2dat.m
    DART/trunk/models/gitm/matlab/om.m
    DART/trunk/models/gitm/matlab/pbs_ma.sh
    DART/trunk/models/gitm/matlab/plot_champ.m
    DART/trunk/models/gitm/matlab/plot_cr6.m
    DART/trunk/models/gitm/matlab/plot_rmse_xxx_evolution.m
    DART/trunk/models/gitm/matlab/plott.m
    DART/trunk/models/gitm/matlab/rst2mat.m
    DART/trunk/models/gitm/matlab/subplota.m
    DART/trunk/models/gitm/matlab/subview.m
    DART/trunk/models/gitm/matlab/sun_rot.m
    DART/trunk/models/gitm/matlab/time_plot.m
    DART/trunk/models/gitm/matlab/time_plot_bw.m
    DART/trunk/models/gitm/matlab/time_plot_old.m
    DART/trunk/models/gitm/matlab/time_plot_old_bw.m
    DART/trunk/models/gitm/python/README
    DART/trunk/models/gitm/python/create_init_distr.py
    DART/trunk/models/gitm/python/map.py
    DART/trunk/models/gitm/python/map.txt
    DART/trunk/models/gitm/python/mapper.py
    DART/trunk/models/gitm/python/mapper_old.py
    DART/trunk/models/gitm/python/pbs_py.sh
    DART/trunk/models/gitm/python/plot_champ.py
    DART/trunk/models/gitm/python/plot_data_2d.py
    DART/trunk/models/gitm/python/plot_diff_2d.py
    DART/trunk/models/gitm/python/plot_diff_2d_f107.py
    DART/trunk/models/gitm/python/plot_gps_3d.py
    DART/trunk/models/gitm/python/plot_gps_3d_interp.py
    DART/trunk/models/gitm/python/plot_tec.py
    DART/trunk/models/gitm/python/plot_tec_lib.py
    DART/trunk/models/gitm/python/read_gitm_bin.py
    DART/trunk/models/gitm/python/read_gps_txt.py
    DART/trunk/models/gitm/python/write_gps_txt.py

-------------- next part --------------
Copied: DART/trunk/models/gitm/dart_to_gitm.html (from rev 6652, DART/branches/gitm_lanai/models/gitm/dart_to_gitm.html)
===================================================================
--- DART/trunk/models/gitm/dart_to_gitm.html	                        (rev 0)
+++ DART/trunk/models/gitm/dart_to_gitm.html	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,311 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<HTML>
+<HEAD>
+<TITLE>program dart_to_gitm</TITLE>
+<link rel="stylesheet" type="text/css" href="../../doc/html/doc.css" />
+<link href="../../doc/images/dart.ico" rel="shortcut icon" />
+</HEAD>
+<BODY>
+<A NAME="TOP"></A>
+
+<table border=0 summary="" cellpadding=5>
+<tr>
+    <td valign=middle>
+    <img src="../../doc/images/Dartboard7.png" alt="DART project logo" height=70 />
+    </td>
+    <td>
+       <P><a href="../../index.html">DART Documentation Main Index</a><br />
+          <small>version information for this file: <br />
+          <!-- version tag follows, do not edit -->
+          $Id$</small>
+       </P></td>
+</tr>
+</table>
+
+<A HREF="#Namelist">NAMELIST</A> /
+<A HREF="#Modules">MODULES</A> /
+<A HREF="#FilesUsed">FILES</A> /
+<A HREF="#References">REFERENCES</A> /
+<A HREF="#Errors">ERRORS</A> /
+<A HREF="#FuturePlans">PLANS</A> /
+<A HREF="#Legalese">TERMS OF USE</A>
+
+<H1>PROGRAM <em class=program>dart_to_gitm</em></H1>
+
+<P> The <a href="http://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM"
+    >Global Ionosphere Thermosphere Model (GITM)</a> is a 3-dimensional spherical 
+    code that models the Earth's thermosphere and ionosphere system using a 
+    stretched grid in latitude and altitude. For a fuller description of using
+    GITM within DART, please see the 
+    <a href="model_mod.html">DART GITM model documentation</a>.
+   <br />
+   <br />
+   <em class=program>dart_to_gitm</em> is the program that updates the
+   GITM restart files (i.e. <em class=file>b?????.rst</em>) 
+   with the information from a DART output/restart file
+   (e.g.&nbsp;<em class=file>perfect_ics,&nbsp;filter_ics,&nbsp;...&nbsp;</em>).
+   <br />
+   <br />
+   The list of variables used to create the DART state vector are specified in
+   the <em class="file">input.nml</em> file.
+   <br />
+   <br />
+   Conditions required for successful execution of <em class=program>dart_to_gitm</em>:
+</P>
+
+<UL>
+   <LI>a valid <em class=file>input.nml</em> namelist file for DART</LI>
+   <LI>a valid <em class=file>UAM.in</em> control file for GITM</LI>
+   <LI>a set of <em class=file>b?????.rst</em> data files for GITM</LI>
+   <LI>a <em class=file>header.rst</em> file for GITM</LI>
+   <LI>the DART/GITM interfaces must be compiled in a manner consistent 
+       with the GITM data and control files. The following GITM
+       source files are required to build <em>any</em> DART interface:
+       <ul><li>models/gitm/GITM2/src/ModConstants.f90</li>
+           <li>models/gitm/GITM2/src/ModEarth.f90</li>
+           <li>models/gitm/GITM2/src/ModKind.f90</li>
+           <li>models/gitm/GITM2/src/ModSize.f90</li>
+           <li>models/gitm/GITM2/src/ModTime.f90</li>
+           <li>models/gitm/GITM2/src/time_routines.f90</li>
+       </ul>Versions of these are included in the DART release.
+       <em class=file>ModSize.f90</em>, in particular, must match what 
+       was used to create the <em class=file>b????.rst</em> files.</LI>
+</UL>
+
+<P>
+The individual model instances are run in unique directories.
+This is also where the converter routines 
+<em class=program>gitm_to_dart</em> and
+<em class=program>dart_to_gitm</em> are run.
+This makes it easy to use a single 'static' name for the input
+and output filenames.
+<em class=program>advance_model.csh</em> is responsibile for 
+linking the appropriate files to these static filenames.
+</P>
+
+
+<P>
+The simplest way to test the converter is to compile GITM and run a single 
+model state forward using <em class=program>work/clean.sh</em>. 
+To build GITM ... download GITM and unpack the code into
+<em class=file>DART/models/gitm/GITM2</em> and follow these instructions:
+</P>
+<div class=unix>
+<pre>
+cd models/gitm/GITM2
+./Config.pl -install -compiler=ifortmpif90 -earth
+make
+cd ../work
+./clean.sh 1 1 0 150.0 170.0 1.0 
+</pre>
+<P>And then manually run <em class=program>dart_to_gitm</em> on the result.
+</P>
+</div>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+<!--=================== DESCRIPTION OF A NAMELIST ====================-->
+<!--==================================================================-->
+
+<A NAME="Namelist"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>NAMELIST</H2>
+<P>We adhere to the F90 standard of starting a namelist with an ampersand
+'&amp;' and terminating with a slash '/' for all our namelist input.
+Character strings that contain a '/' must be
+enclosed in quotes to prevent them from prematurely terminating the namelist.
+</P>
+<div class=namelist>
+<pre>
+&amp;dart_to_gitm_nml
+   dart_to_gitm_output_file = 'dart_restart',
+   advance_time_present     = .false.
+   /
+
+&amp;model_nml
+   gitm_restart_dirname         = 'advance_temp_e1/UA/restartOUT',
+   assimilation_period_days     = 0,
+   assimilation_period_seconds  = 1800,
+   model_perturbation_amplitude = 0.2,
+   output_state_vector          = .false.,
+   calendar                     = 'Gregorian',
+   debug                        = 0,
+   gitm_state_variables = 'Temperature',            'KIND_TEMPERATURE',
+                          'eTemperature',           'KIND_TEMPERATURE_ELECTRON',
+                          'ITemperature',           'KIND_TEMPERATURE_ION',
+                          'iO_3P_NDensityS',        'KIND_DENSITY_NEUTRAL_O3P',
+   ...
+</pre>
+</div>
+
+<TABLE border=0 cellpadding=3 width=100% summary='dart_to_gitm namelist description'>
+<TR><TH align=left>Contents    </TH>
+    <TH align=left>Type        </TH>
+    <TH align=left>Description </TH>
+</TR>
+
+<TR><!--contents--><TD valign=top>dart_to_gitm_output_file&nbsp;&nbsp;&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=128)&nbsp;&nbsp;</TD>
+    <!--descript--><TD>The name of the DART file containing the model state
+                       derived from the GITM restart files.</TD>
+</TR>
+
+<TR><!--contents--><TD>advance_time_present</TD>
+    <!--  type  --><TD>logical</TD>
+    <!--descript--><TD>If you are manually converting a DART initial conditions or 
+    restart file this should be <em class=code>.false.</em>; these files have 
+    a single timestamp describing the valid time of the model state.
+    If <em class=code>.true.</em>, TWO timestamps are expected in the DART 
+    file header and <em class=file>DART_GITM_time_control.txt</em>) is created with
+    the settings appropriate to advance GITM to the time requested by DART.</TD>
+</TR>
+
+</TABLE>
+<br />
+
+<P>
+The full description of the <em class=code>model_nml</em> namelist is documented
+in the <a href="model_mod.html#Namelist">gitm model_mod</a>, but the most important
+variable for <em class=program>dart_to_gitm</em> is repeated here.
+</P>
+<TABLE border=0 cellpadding=3 width=100% summary='partial model_nml namelist description'>
+<TR><TH align=left>Contents    </TH>
+    <TH align=left>Type        </TH>
+    <TH align=left>Description </TH>
+</TR>
+
+<TR><!--contents--><TD valign=top>gitm_restart_dirname&nbsp;&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=256)&nbsp;&nbsp;</TD>
+    <!--descript--><TD>The name of the directory containing the
+                       GITM restart files and runtime control information.</TD>
+</TR>
+
+<TR><!--contents--><TD valign=top>gitm_state_variables&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=32),&nbsp;&nbsp;<br />
+                              dimension(2,80)   </TD>
+    <!--descript--><TD>The list of variable names in the gitm restart file to use to
+                       create the DART state vector and their corresponding DART kind.
+                       The default list is specified in 
+                       <a href="model_mod.nml">model_mod.nml</a></TD>
+</TR>
+</TABLE>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+
+<A NAME="Modules"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>MODULES USED</H2>
+<PRE>
+obs_def/obs_def_upper_atm_mod.f90
+assim_model/assim_model_mod.f90
+common/types_mod.f90
+location/threed_sphere/location_mod.f90
+models/gitm/GITM2/src/ModConstants.f90
+models/gitm/GITM2/src/ModEarth.f90
+models/gitm/GITM2/src/ModKind.f90
+models/gitm/GITM2/src/ModSize.f90
+models/gitm/GITM2/src/ModTime.f90
+models/gitm/GITM2/src/time_routines.f90
+models/gitm/dart_gitm_mod.f90
+models/gitm/dart_to_gitm.f90
+models/gitm/model_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+obs_kind/obs_kind_mod.f90
+random_seq/random_seq_mod.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
+</PRE>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+<!-- Describe the Files Used by this module.                          -->
+<!--==================================================================-->
+
+<A NAME="FilesUsed"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>FILES Read</H2>
+<UL>
+    <LI>gitm restart files: <em class=file>b????.rst</em></LI>
+    <LI>gitm control files: <em class=file>header.rst</em></LI>
+    <LI>gitm control files: <em class=file>UAM.in.rst</em></LI>
+    <LI>DART namelist file: <em class=file>input.nml</em></LI>
+</UL>
+
+<H2>FILES Written</H2>
+<UL><LI>DART initial conditions/restart file; e.g. <em class=file>dart_ics</em></LI>
+</UL>
+
+<!--==================================================================-->
+<!-- Cite references, if need be.                                     -->
+<!--==================================================================-->
+
+<A NAME="References"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>REFERENCES</H2>
+<ul>
+<li>The official <em class=program>GITM</em> site is:
+can be found at <a href="http://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM"
+                               >ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM</a>
+</ul>
+
+<!--==================================================================-->
+<!-- Describe all the error conditions and codes.                     -->
+<!--==================================================================-->
+
+<A NAME="Errors"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>ERROR CODES and CONDITIONS</H2>
+<P>
+none - all error messages come from modules that have their own documentation.
+</P>
+
+<H2>KNOWN BUGS</H2>
+<P>
+none
+</P>
+
+<!--==================================================================-->
+<!-- Describe Future Plans.                                           -->
+<!--==================================================================-->
+
+<A NAME="FuturePlans"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>FUTURE PLANS</H2>
+<P>
+None.
+</P>
+
+<!--==================================================================-->
+<!-- Legalese & Metadata                                              -->
+<!--==================================================================-->
+
+<A NAME="Legalese"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>Terms of Use</H2>
+
+<P>
+DART software - Copyright 2004 - 2013 UCAR.<br />
+This open source software is provided by UCAR, "as is",<br />
+without charge, subject to all terms of use at<br />
+<a href="http://www.image.ucar.edu/DAReS/DART/DART_download">
+http://www.image.ucar.edu/DAReS/DART/DART_download</a>
+</P>
+
+<TABLE border=0 cellpadding=0 width=100% summary="">
+<TR><TD valign=top>Contact:       </TD><TD> Tim Hoar </TD></TR>
+<TR><TD valign=top>Revision:      </TD><TD> $Revision$ </TD></TR>
+<TR><TD valign=top>Source:        </TD><TD> $URL$ </TD></TR>
+<TR><TD valign=top>Change Date:   </TD><TD> $Date$ </TD></TR>
+<TR><TD valign=top>Change history: </TD><TD> try "svn log" or "svn diff" </TD></TR>
+</TABLE>
+
+<!--==================================================================-->
+
+</BODY>
+</HTML>

Copied: DART/trunk/models/gitm/dart_to_gitm.nml (from rev 6652, DART/branches/gitm_lanai/models/gitm/dart_to_gitm.nml)
===================================================================
--- DART/trunk/models/gitm/dart_to_gitm.nml	                        (rev 0)
+++ DART/trunk/models/gitm/dart_to_gitm.nml	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,5 @@
+&dart_to_gitm_nml
+   dart_to_gitm_input_file = 'dart_restart',
+   advance_time_present    = .true.,
+   /
+

Copied: DART/trunk/models/gitm/gitm_to_dart.html (from rev 6652, DART/branches/gitm_lanai/models/gitm/gitm_to_dart.html)
===================================================================
--- DART/trunk/models/gitm/gitm_to_dart.html	                        (rev 0)
+++ DART/trunk/models/gitm/gitm_to_dart.html	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,297 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<HTML>
+<HEAD>
+<TITLE>program gitm_to_dart</TITLE>
+<link rel="stylesheet" type="text/css" href="../../doc/html/doc.css" />
+<link href="../../doc/images/dart.ico" rel="shortcut icon" />
+</HEAD>
+<BODY>
+<A NAME="TOP"></A>
+
+<table border=0 summary="" cellpadding=5>
+<tr>
+    <td valign=middle>
+    <img src="../../doc/images/Dartboard7.png" alt="DART project logo" height=70 />
+    </td>
+    <td>
+       <P><a href="../../index.html">DART Documentation Main Index</a><br />
+          <small>version information for this file: <br />
+          <!-- version tag follows, do not edit -->
+          $Id$</small>
+       </P></td>
+</tr>
+</table>
+
+<A HREF="#Namelist">NAMELIST</A> /
+<A HREF="#Modules">MODULES</A> /
+<A HREF="#FilesUsed">FILES</A> /
+<A HREF="#References">REFERENCES</A> /
+<A HREF="#Errors">ERRORS</A> /
+<A HREF="#FuturePlans">PLANS</A> /
+<A HREF="#Legalese">TERMS OF USE</A>
+
+<H1>PROGRAM <em class=program>gitm_to_dart</em></H1>
+
+<P> The <a href="http://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM"
+    >Global Ionosphere Thermosphere Model (GITM)</a> is a 3-dimensional spherical 
+    code that models the Earth's thermosphere and ionosphere system using a 
+    stretched grid in latitude and altitude. For a fuller description of using
+    GITM within DART, please see the 
+    <a href="model_mod.html">DART GITM model documentation</a>.
+   <br />
+   <br />
+   <em class=program>gitm_to_dart</em> is the program that reads
+   GITM restart files (i.e. <em class=file>b?????.rst</em>) 
+   and creates a DART output/restart file
+   (e.g.&nbsp;<em class=file>perfect_ics,&nbsp;filter_ics,&nbsp;...&nbsp;</em>).
+   <br />
+   <br />
+   The list of variables used to create the DART state vector are specified in
+   the <em class="file">input.nml</em> file.
+   <br />
+   <br />
+   Conditions required for successful execution of <em class=program>gitm_to_dart</em>:
+</P>
+
+<UL>
+   <LI>a valid <em class=file>input.nml</em> namelist file for DART</LI>
+   <LI>a valid <em class=file>UAM.in</em> control file for GITM</LI>
+   <LI>a set of <em class=file>b?????.rst</em> data files for GITM</LI>
+   <LI>a <em class=file>header.rst</em> file for GITM</LI>
+   <LI>the DART/GITM interfaces must be compiled in a manner consistent 
+       with the GITM data and control files. The following GITM
+       source files are required to build <em>any</em> DART interface:
+       <ul><li>models/gitm/GITM2/src/ModConstants.f90</li>
+           <li>models/gitm/GITM2/src/ModEarth.f90</li>
+           <li>models/gitm/GITM2/src/ModKind.f90</li>
+           <li>models/gitm/GITM2/src/ModSize.f90</li>
+           <li>models/gitm/GITM2/src/ModTime.f90</li>
+           <li>models/gitm/GITM2/src/time_routines.f90</li>
+       </ul>Versions of these are included in the DART release.
+       <em class=file>ModSize.f90</em>, in particular, must match what 
+       was used to create the <em class=file>b????.rst</em> files.</LI>
+</UL>
+
+<P>
+The individual model instances are run in unique directories.
+This is also where the converter routines 
+<em class=program>gitm_to_dart</em> and
+<em class=program>dart_to_gitm</em> are run.
+This makes it easy to use a single 'static' name for the input
+and output filenames.
+<em class=program>advance_model.csh</em> is responsibile for 
+linking the appropriate files to these static filenames.
+</P>
+
+
+<P>
+The simplest way to test the converter is to compile GITM and run a single 
+model state forward using <em class=program>work/clean.sh</em>. 
+To build GITM ... download GITM and unpack the code into
+<em class=file>DART/models/gitm/GITM2</em> and follow these instructions:
+</P>
+<div class=unix>
+<pre>
+cd models/gitm/GITM2
+./Config.pl -install -compiler=ifortmpif90 -earth
+make
+cd ../work
+./clean.sh 1 1 0 150.0 170.0 1.0 
+</pre>
+</div>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+<!--=================== DESCRIPTION OF A NAMELIST ====================-->
+<!--==================================================================-->
+
+<A NAME="Namelist"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>NAMELIST</H2>
+<P>We adhere to the F90 standard of starting a namelist with an ampersand
+'&amp;' and terminating with a slash '/' for all our namelist input.
+Character strings that contain a '/' must be
+enclosed in quotes to prevent them from prematurely terminating the namelist.
+</P>
+<div class=namelist>
+<pre>
+&amp;gitm_to_dart_nml
+   gitm_to_dart_output_file = 'dart_ics',
+   /
+
+&amp;model_nml
+   gitm_restart_dirname         = 'advance_temp_e1/UA/restartOUT',
+   assimilation_period_days     = 0,
+   assimilation_period_seconds  = 1800,
+   model_perturbation_amplitude = 0.2,
+   output_state_vector          = .false.,
+   calendar                     = 'Gregorian',
+   debug                        = 0,
+   gitm_state_variables = 'Temperature',            'KIND_TEMPERATURE',
+                          'eTemperature',           'KIND_TEMPERATURE_ELECTRON',
+                          'ITemperature',           'KIND_TEMPERATURE_ION',
+                          'iO_3P_NDensityS',        'KIND_DENSITY_NEUTRAL_O3P',
+   ...
+</pre>
+</div>
+
+<TABLE border=0 cellpadding=3 width=100% summary='gitm_to_dart namelist description'>
+<TR><TH align=left>Contents    </TH>
+    <TH align=left>Type        </TH>
+    <TH align=left>Description </TH>
+</TR>
+
+<TR><!--contents--><TD valign=top>gitm_to_dart_output_file&nbsp;&nbsp;&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=128)&nbsp;&nbsp;</TD>
+    <!--descript--><TD>The name of the DART file containing the model state
+                       derived from the GITM restart files.</TD>
+</TR>
+</TABLE>
+<br />
+
+<P>
+The full description of the <em class=code>model_nml</em> namelist is documented
+in the <a href="model_mod.html#Namelist">gitm model_mod</a>, but the most important
+variable for <em class=program>gitm_to_dart</em> is repeated here.
+</P>
+<TABLE border=0 cellpadding=3 width=100% summary='partial model_nml namelist description'>
+<TR><TH align=left>Contents    </TH>
+    <TH align=left>Type        </TH>
+    <TH align=left>Description </TH>
+</TR>
+
+<TR><!--contents--><TD valign=top>gitm_restart_dirname&nbsp;&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=256)&nbsp;&nbsp;</TD>
+    <!--descript--><TD>The name of the directory containing the
+                       GITM restart files and runtime control information.</TD>
+</TR>
+
+<TR><!--contents--><TD valign=top>gitm_state_variables&nbsp;</TD>
+    <!--  type  --><TD valign=top>character(len=32),&nbsp;&nbsp;<br />
+                              dimension(2,80)   </TD>
+    <!--descript--><TD>The list of variable names in the gitm restart file to use to
+                       create the DART state vector and their corresponding DART kind.
+                       The default list is specified in 
+                       <a href="model_mod.nml">model_mod.nml</a></TD>
+</TR>
+</TABLE>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+
+<A NAME="Modules"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>MODULES USED</H2>
+<PRE>
+obs_def/obs_def_upper_atm_mod.f90
+assim_model/assim_model_mod.f90
+common/types_mod.f90
+location/threed_sphere/location_mod.f90
+models/gitm/GITM2/src/ModConstants.f90
+models/gitm/GITM2/src/ModEarth.f90
+models/gitm/GITM2/src/ModKind.f90
+models/gitm/GITM2/src/ModSize.f90
+models/gitm/GITM2/src/ModTime.f90
+models/gitm/GITM2/src/time_routines.f90
+models/gitm/dart_gitm_mod.f90
+models/gitm/gitm_to_dart.f90
+models/gitm/model_mod.f90
+mpi_utilities/null_mpi_utilities_mod.f90
+obs_kind/obs_kind_mod.f90
+random_seq/random_seq_mod.f90
+time_manager/time_manager_mod.f90
+utilities/utilities_mod.f90
+</PRE>
+
+<P><!-- makes the 'top' link line up correctly --></P>
+
+<!--==================================================================-->
+<!-- Describe the Files Used by this module.                          -->
+<!--==================================================================-->
+
+<A NAME="FilesUsed"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>FILES Read</H2>
+<UL>
+    <LI>gitm restart files: <em class=file>b????.rst</em></LI>
+    <LI>gitm control files: <em class=file>header.rst</em></LI>
+    <LI>gitm control files: <em class=file>UAM.in.rst</em></LI>
+    <LI>DART namelist file: <em class=file>input.nml</em></LI>
+</UL>
+
+<H2>FILES Written</H2>
+<UL><LI>DART initial conditions/restart file; e.g. <em class=file>dart_ics</em></LI>
+</UL>
+
+<!--==================================================================-->
+<!-- Cite references, if need be.                                     -->
+<!--==================================================================-->
+
+<A NAME="References"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>REFERENCES</H2>
+<ul>
+<li>The official <em class=program>GITM</em> site is:
+can be found at <a href="http://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM"
+                               >ccmc.gsfc.nasa.gov/models/modelinfo.php?model=GITM</a>
+</ul>
+
+<!--==================================================================-->
+<!-- Describe all the error conditions and codes.                     -->
+<!--==================================================================-->
+
+<A NAME="Errors"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>ERROR CODES and CONDITIONS</H2>
+<P>
+none - all error messages come from modules that have their own documentation.
+</P>
+
+<H2>KNOWN BUGS</H2>
+<P>
+none
+</P>
+
+<!--==================================================================-->
+<!-- Describe Future Plans.                                           -->
+<!--==================================================================-->
+
+<A NAME="FuturePlans"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>FUTURE PLANS</H2>
+<P>
+None.
+</P>
+
+<!--==================================================================-->
+<!-- Legalese & Metadata                                              -->
+<!--==================================================================-->
+
+<A NAME="Legalese"></A>
+<div class="top">[<a href="#">top</a>]</div><hr />
+<H2>Terms of Use</H2>
+
+<P>
+DART software - Copyright 2004 - 2013 UCAR.<br />
+This open source software is provided by UCAR, "as is",<br />
+without charge, subject to all terms of use at<br />
+<a href="http://www.image.ucar.edu/DAReS/DART/DART_download">
+http://www.image.ucar.edu/DAReS/DART/DART_download</a>
+</P>
+
+<TABLE border=0 cellpadding=0 width=100% summary="">
+<TR><TD valign=top>Contact:       </TD><TD> Tim Hoar </TD></TR>
+<TR><TD valign=top>Revision:      </TD><TD> $Revision$ </TD></TR>
+<TR><TD valign=top>Source:        </TD><TD> $URL$ </TD></TR>
+<TR><TD valign=top>Change Date:   </TD><TD> $Date$ </TD></TR>
+<TR><TD valign=top>Change history: </TD><TD> try "svn log" or "svn diff" </TD></TR>
+</TABLE>
+
+<!--==================================================================-->
+
+</BODY>
+</HTML>

Copied: DART/trunk/models/gitm/gitm_to_dart.nml (from rev 6652, DART/branches/gitm_lanai/models/gitm/gitm_to_dart.nml)
===================================================================
--- DART/trunk/models/gitm/gitm_to_dart.nml	                        (rev 0)
+++ DART/trunk/models/gitm/gitm_to_dart.nml	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,4 @@
+&gitm_to_dart_nml
+   gitm_to_dart_input_file = 'dart_ics',
+   /
+

Deleted: DART/trunk/models/gitm/matlab/GC.m
===================================================================
--- DART/branches/gitm_lanai/models/gitm/matlab/GC.m	2013-12-06 20:14:49 UTC (rev 6652)
+++ DART/trunk/models/gitm/matlab/GC.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -1,19 +0,0 @@
-function y=GC(c,z)
-
-% DART $Id$
-
-cz1=[-1/4 1/2 5/8 -5/3 0 1]; %in powers of (abs(z)/c), abs(z)>=0 & abs(z)<=c 
-cz2=[1/12 -1/2 5/8 5/3 -5 4 -2/3]; %/(abs(z)/c) and abs(z)>=c & abs(z)<=2c
-cz3=0; %abs(z)>=2c
-
-y=zeros(size(z));
-
-test=find(abs(z)>=0 & abs(z)<=c);
-z1=z(test);
-y(test) = polyval(cz1,abs(z1)/c);
-
-test=find(abs(z)>=c & abs(z)<=2*c);
-z1=z(test);
-y(test) = polyval(cz2,abs(z1)/c)./(abs(z1)/c);
-
-end

Copied: DART/trunk/models/gitm/matlab/GC.m (from rev 6652, DART/branches/gitm_lanai/models/gitm/matlab/GC.m)
===================================================================
--- DART/trunk/models/gitm/matlab/GC.m	                        (rev 0)
+++ DART/trunk/models/gitm/matlab/GC.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,19 @@
+function y=GC(c,z)
+
+% DART $Id$
+
+cz1=[-1/4 1/2 5/8 -5/3 0 1]; %in powers of (abs(z)/c), abs(z)>=0 & abs(z)<=c 
+cz2=[1/12 -1/2 5/8 5/3 -5 4 -2/3]; %/(abs(z)/c) and abs(z)>=c & abs(z)<=2c
+cz3=0; %abs(z)>=2c
+
+y=zeros(size(z));
+
+test=find(abs(z)>=0 & abs(z)<=c);
+z1=z(test);
+y(test) = polyval(cz1,abs(z1)/c);
+
+test=find(abs(z)>=c & abs(z)<=2*c);
+z1=z(test);
+y(test) = polyval(cz2,abs(z1)/c)./(abs(z1)/c);
+
+end

Deleted: DART/trunk/models/gitm/matlab/MakeManyObs.m
===================================================================
--- DART/branches/gitm_lanai/models/gitm/matlab/MakeManyObs.m	2013-12-06 20:14:49 UTC (rev 6652)
+++ DART/trunk/models/gitm/matlab/MakeManyObs.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -1,71 +0,0 @@
-function MakeManyObs
-%
-%
-%
-
-obcount = 1;
-
-%----------------------------------------------------------------------
-%% Create obs exactly on heights (verttype == 3)
-
-ALT = [100000, 101663.3, 103337.4, 105035.3, 106773.5, 108573.3, 110464.5, ...
-       112492.9, 114729.3, 117279.1, 120304, 124025.5, 128512, 133760.8, ...
-       139833.2, 146773.5, 154606.7, 163337.8, 172952.9, 183422, 194703.2, ...
-       206747.6, 219503.3, 232918.5, 246943.8, 261533, 276642.7, 292232.6, ...
-       308263.8, 324695.1, 341495.2, 358628.3, 376059.6, 393755.4, 411684.1, ...
-       429816.1, 448123.9, 466582.8, 485170.7, 503868.2, 522658.4, 541526.7, ...
-       560460.4, 579449, 598483.4, 617556, 636660.5, 655791.5, 674944.6, 694116.2] ;
-
-N = length(ALT);
-
-obcount = write_obs(obcount, 0.0, 3)
-for height = 1:N
-   obcount = write_obs(obcount, ALT(height), 3)
-end
-obcount = write_obs(obcount, 700000.0, 3)
-
-%----------------------------------------------------------------------
-%% Create lots of obs evenly spaced in heights (verttype == 3)
-
-ALT = [0:1000:700000];
-
-for height = 1:length(ALT)
-   obcount = write_obs(obcount, ALT(height), 3)
-end
-
-%----------------------------------------------------------------------
-%% Create obs on many levels (verttype == 1)
-
-for height = 0:0.05:(N+1)
-   obcount = write_obs(obcount, height, 1)
-end
-
-
-%----------------------------------------------------------------------
-% helper function
-%----------------------------------------------------------------------
-
-function obcount = write_obs(iobs, vert, verttype )
-
-fname = sprintf('obs_seq.%04d.in',iobs);
-
-fid = fopen(fname,'wt');
-fprintf(fid,' obs_sequence\n');
-fprintf(fid,'obs_kind_definitions\n');
-fprintf(fid,'           1\n');
-fprintf(fid,'          38 GND_GPS_VTEC \n');
-fprintf(fid,'  num_copies:            0  num_qc:            0\n');
-fprintf(fid,'  num_obs:            1  max_num_obs:            1\n');
-fprintf(fid,'  first:            1  last:            1\n');
-fprintf(fid,' OBS            1\n');
-fprintf(fid,'          -1          -1          -1\n');
-fprintf(fid,'obdef\n');
-fprintf(fid,'loc3d\n');
-fprintf(fid,sprintf('     2.321287905152458        -1.431169986635350         %f      %d\n', vert, verttype));
-fprintf(fid,'kind\n');
-fprintf(fid,'          38\n');
-fprintf(fid,'    90     146796\n');
-fprintf(fid,'   27.0400000000000\n');
-fclose(fid);
-obcount = iobs + 1
-

Copied: DART/trunk/models/gitm/matlab/MakeManyObs.m (from rev 6652, DART/branches/gitm_lanai/models/gitm/matlab/MakeManyObs.m)
===================================================================
--- DART/trunk/models/gitm/matlab/MakeManyObs.m	                        (rev 0)
+++ DART/trunk/models/gitm/matlab/MakeManyObs.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,71 @@
+function MakeManyObs
+%
+% DART $Id$
+%
+
+obcount = 1;
+
+%----------------------------------------------------------------------
+%% Create obs exactly on heights (verttype == 3)
+
+ALT = [100000, 101663.3, 103337.4, 105035.3, 106773.5, 108573.3, 110464.5, ...
+       112492.9, 114729.3, 117279.1, 120304, 124025.5, 128512, 133760.8, ...
+       139833.2, 146773.5, 154606.7, 163337.8, 172952.9, 183422, 194703.2, ...
+       206747.6, 219503.3, 232918.5, 246943.8, 261533, 276642.7, 292232.6, ...
+       308263.8, 324695.1, 341495.2, 358628.3, 376059.6, 393755.4, 411684.1, ...
+       429816.1, 448123.9, 466582.8, 485170.7, 503868.2, 522658.4, 541526.7, ...
+       560460.4, 579449, 598483.4, 617556, 636660.5, 655791.5, 674944.6, 694116.2] ;
+
+N = length(ALT);
+
+obcount = write_obs(obcount, 0.0, 3)
+for height = 1:N
+   obcount = write_obs(obcount, ALT(height), 3)
+end
+obcount = write_obs(obcount, 700000.0, 3)
+
+%----------------------------------------------------------------------
+%% Create lots of obs evenly spaced in heights (verttype == 3)
+
+ALT = [0:1000:700000];
+
+for height = 1:length(ALT)
+   obcount = write_obs(obcount, ALT(height), 3)
+end
+
+%----------------------------------------------------------------------
+%% Create obs on many levels (verttype == 1)
+
+for height = 0:0.05:(N+1)
+   obcount = write_obs(obcount, height, 1)
+end
+
+
+%----------------------------------------------------------------------
+% helper function
+%----------------------------------------------------------------------
+
+function obcount = write_obs(iobs, vert, verttype )
+
+fname = sprintf('obs_seq.%04d.in',iobs);
+
+fid = fopen(fname,'wt');
+fprintf(fid,' obs_sequence\n');
+fprintf(fid,'obs_kind_definitions\n');
+fprintf(fid,'           1\n');
+fprintf(fid,'          38 GND_GPS_VTEC \n');
+fprintf(fid,'  num_copies:            0  num_qc:            0\n');
+fprintf(fid,'  num_obs:            1  max_num_obs:            1\n');
+fprintf(fid,'  first:            1  last:            1\n');
+fprintf(fid,' OBS            1\n');
+fprintf(fid,'          -1          -1          -1\n');
+fprintf(fid,'obdef\n');
+fprintf(fid,'loc3d\n');
+fprintf(fid,sprintf('     2.321287905152458        -1.431169986635350         %f      %d\n', vert, verttype));
+fprintf(fid,'kind\n');
+fprintf(fid,'          38\n');
+fprintf(fid,'    90     146796\n');
+fprintf(fid,'   27.0400000000000\n');
+fclose(fid);
+obcount = iobs + 1
+

Deleted: DART/trunk/models/gitm/matlab/PlotVerticalObs.m
===================================================================
--- DART/branches/gitm_lanai/models/gitm/matlab/PlotVerticalObs.m	2013-12-06 20:14:49 UTC (rev 6652)
+++ DART/trunk/models/gitm/matlab/PlotVerticalObs.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -1,51 +0,0 @@
-function obs = PlotVerticalObs
-% try to plot a vertical profile of observations
-% 1) run MakeManyObs.m to generate a thousand independent obs.
-% 2) run obs_sequence_tool to generate a single obs_seq.in
-% 3) run perfect_model_obs to apply the forward observation operator
-% 4) run obs_seq_to_netcdf to create something we can query
-% 5) run this script to  read and plot
-
-fname         = '../work/obs_epoch_001.nc';
-region        = [0 360 -90 90 -Inf Inf];
-CopyString    = 'truth';
-QCString      = 'Quality Control';
-verbose       = 1;
-
-% nancy ... geometric or geopotential height
-ObsTypeString = 'RADIOSONDE_GEOPOTENTIAL_HGT';
-ObsTypeString = 'RADIOSONDE_TEMPERATURE';
-ObsTypeString = 'GND_GPS_VTEC';
-ObsTypeString = 'SAT_TEMPERATURE_ION';
-
-obs   = read_obs_netcdf(fname, ObsTypeString, region, CopyString, QCString, verbose);
-
-verts = unique(obs.Ztyp);
-
-for i = 1:length(verts)
-
-   figure(i); clf; orient tall;
-
-   % find the observations on this vertical coordinate type
-   inds = find(obs.Ztyp == verts(i));
-
-   length(inds)
-
-   X  = obs.obs(inds);
-   Y  = obs.z(inds);
-   qc = obs.qc(inds);
-
-   fprintf('lon and lat are %d   %d\n',obs.lons(inds(1)), obs.lats(inds(1)))
-   fprintf('min and max QC values are %d   %d\n',min(qc(:)), max(qc(:)))
-
-   plot(X,Y,'.')
-   title(sprintf('observations on coordinate type %d',verts(i)))
-
-end
-
-% integer, parameter :: VERTISUNDEF       = -2
-% integer, parameter :: VERTISSURFACE     = -1
-% integer, parameter :: VERTISLEVEL       =  1
-% integer, parameter :: VERTISPRESSURE    =  2
-% integer, parameter :: VERTISHEIGHT      =  3
-% integer, parameter :: VERTISSCALEHEIGHT =  4

Copied: DART/trunk/models/gitm/matlab/PlotVerticalObs.m (from rev 6652, DART/branches/gitm_lanai/models/gitm/matlab/PlotVerticalObs.m)
===================================================================
--- DART/trunk/models/gitm/matlab/PlotVerticalObs.m	                        (rev 0)
+++ DART/trunk/models/gitm/matlab/PlotVerticalObs.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -0,0 +1,55 @@
+function obs = PlotVerticalObs
+% try to plot a vertical profile of observations
+% 1) run MakeManyObs.m to generate a thousand independent obs.
+% 2) run obs_sequence_tool to generate a single obs_seq.in
+% 3) run perfect_model_obs to apply the forward observation operator
+% 4) run obs_seq_to_netcdf to create something we can query
+% 5) run this script to  read and plot
+
+%
+% DART $Id$
+%
+
+fname         = '../work/obs_epoch_001.nc';
+region        = [0 360 -90 90 -Inf Inf];
+CopyString    = 'truth';
+QCString      = 'Quality Control';
+verbose       = 1;
+
+% nancy ... geometric or geopotential height
+ObsTypeString = 'RADIOSONDE_GEOPOTENTIAL_HGT';
+ObsTypeString = 'RADIOSONDE_TEMPERATURE';
+ObsTypeString = 'GND_GPS_VTEC';
+ObsTypeString = 'SAT_TEMPERATURE_ION';
+
+obs   = read_obs_netcdf(fname, ObsTypeString, region, CopyString, QCString, verbose);
+
+verts = unique(obs.Ztyp);
+
+for i = 1:length(verts)
+
+   figure(i); clf; orient tall;
+
+   % find the observations on this vertical coordinate type
+   inds = find(obs.Ztyp == verts(i));
+
+   length(inds)
+
+   X  = obs.obs(inds);
+   Y  = obs.z(inds);
+   qc = obs.qc(inds);
+
+   fprintf('lon and lat are %d   %d\n',obs.lons(inds(1)), obs.lats(inds(1)))
+   fprintf('min and max QC values are %d   %d\n',min(qc(:)), max(qc(:)))
+
+   plot(X,Y,'.')
+   title(sprintf('observations on coordinate type %d',verts(i)))
+
+end
+
+% integer, parameter :: VERTISUNDEF       = -2
+% integer, parameter :: VERTISSURFACE     = -1
+% integer, parameter :: VERTISLEVEL       =  1
+% integer, parameter :: VERTISPRESSURE    =  2
+% integer, parameter :: VERTISHEIGHT      =  3
+% integer, parameter :: VERTISSCALEHEIGHT =  4

Deleted: DART/trunk/models/gitm/matlab/binsat2txt_champ_m.m
===================================================================
--- DART/branches/gitm_lanai/models/gitm/matlab/binsat2txt_champ_m.m	2013-12-06 20:14:49 UTC (rev 6652)
+++ DART/trunk/models/gitm/matlab/binsat2txt_champ_m.m	2013-12-06 21:45:26 UTC (rev 6654)
@@ -1,252 +0,0 @@
-%% CHAMP-flown-through-GITM data reader (from GITM binary)
-
-% DART $Id$
-
-%run champ2txt.m first
-
-% clear
-% clc
-% close all
-
-format compact
-
-% cd ~/Downloads/sats/data
-% cd /Users/admin/gitm/GITM2/run/UA/data/
-% cd /Applications/HEAD/DART9/models/gitm/work/advance_temp_e4/UA/data
-% cd /Applications/HEAD/DART10/models/gitm/work/advance_temp_e4/UA/data
-
-
-
-%  ns=1; %NUMBER OF SATELLITES
-%  sns=num2str(ns); %name of the output text file is ['text' sns '.txt']
-idt=fopen('text.txt','w');
-
-[~,wlon]=min(abs(LongitudeT-(96.2626+180) )) %lon closest to AA (WI in 9x9)
-[~,wlat]=min(abs(LatitudeT-42.2526)) %lat closest to AA (WI in 9x9)
-
-% wlon=5;
-% wlat=14;
-walt=35; 
-
-LongitudeT(wlon)
-LatitudeT(wlat)
-AltitudeT(walt)
-
-
-LonCi=interp1(tc,LongitudeChamp2,tg);
-LatCi=interp1(tc,LatitudeChamp2,tg);
-AltCi=interp1(tc,AltitudeChamp2,tg);
-
-
-Alt38=nan(size(tg));
-AltitudeG2=nan(size(tg));
-RhoG38=nan(size(tg));
-RhoG2=nan(size(tg));
-LongitudeSat=nan(size(tg));
-LatitudeSat=nan(size(tg));
-AltitudeSat=nan(1,nAlts);
-RhoGITM=nan(1,nAlts);
-Rw=nan(size(tg));
-
-yy=nan(size(tg));
-mo=yy;
-dd=yy;
-hh=yy;
-mm=yy;
-ss=yy;
-
-for m=1:length(tg) %iterate over number of minutes
-    [yy(m) mo(m) dd(m) hh(m) mm(m) ss(m)]=datevec(datenum(2000+y2,0,0)+d1+tg(m)/1440);
-    
-    
-    fname=['cham_001_t' ...
-        num2str(yy(m)-2000,'%02.0f') ...
-        num2str(mo(m),'%02.0f') ...
-        num2str(dd(m),'%02.0f') ...
-        '_' ...
-        num2str(hh(m),'%02.0f') ...
-        num2str(mm(m),'%02.0f') ...
-        num2str(ss(m),'%02.0f') ...
-        '.sat'];
-    
-    disp(fname)
-    
-    idf=fopen(fname,'r');
-    
-    
-    
-    for iAlt=1:54 %iterate over altitudes
-        nvars=fread(idf,1,'int32')/8;
-        temp=fread(idf,nvars,'float64');
-        nvars=fread(idf,1,'int32')/8;
-        
-        AltitudeSat(iAlt)     = temp(3); %km
-        RhoGITM(iAlt)          = temp(4);
-    end
-    fclose(idf);
-    
-    % disp(        AltitudeSat(38))
-    % disp(' ')
-    Alt38(m) = AltitudeSat(38);
-    RhoG38(m) = RhoGITM(38);
-    
-    %%simple way (no interpolation, just closest altitude/time)
-    %        [~, sec_ind] = min(abs(sec(:) - m(1)*60));
-    %        [~, a_ind  ] = min(abs(Altitude(3:52) - AltitudeChamp(sec_ind) ));
-    %        a_ind=a_ind+2; %add 2 because search array is an exerpt
-    %        AltitudeG1(m)=Altitude(a_ind);
-    %        RhoG1(m)=RhoGITM(a_ind);
-    
-    %%harder - interpolate altitude
-    AltitudeG2(m) = AltCi(m);
-    RhoG2(m)=interp1(AltitudeSat,RhoGITM,AltCi(m));
-    
-    %%hardest - interpolate altitude AND then time %need to search over m and
-    %%save Alt(m,ialt). meh, don't feel like it
-    %         [~, sec_ind] = min(abs(sec(:) - m(1)*60)); %m(1): (1) is to remind me that m is a scalar and sec(:) is the array I'm searching over
-    %         a_ind = find(Altitude(3:52) < AltitudeChamp(sec_ind) );
-    %         a_ind = a_ind(end) + 2; % last one smaller than the champ and add 2 because search array is an exerpt
-    %         a = ( Altitude(a_ind+1) - Altitude(a_ind) )/( Altitude(a_ind+1)-Altitude(a_ind) ); %I know this is always 1, just a (in?)sanity check
-    %         b = ( Altitude(a_ind)*Altitude(a_ind+1) - Altitude(a_ind+1)*Altitude(a_ind) )/( Altitude(a_ind+1)-Altitude(a_ind) ); %zero
-    %         AltitudeG2(m) = a*AltitudeChamp(sec_ind) + b ;
-    %         a = ( RhoGITM(a_ind+1) - RhoGITM(a_ind) )/( Altitude(a_ind+1)-Altitude(a_ind) ) ;
-    %         b = ( RhoGITM(a_ind)*Altitude(a_ind+1) - RhoGITM(a_ind+1)*Altitude(a_ind) )/( Altitude(a_ind+1)-Altitude(a_ind) ) ;
-    %         RhoG3(m) = a*AltitudeChamp(sec_ind) + b ;
-    
-    %%hardester - interpolate altitude and time %implausible in this loop as
-    %%Alt is not stored over time.
-    %         si = find(m(:) < sec(ii)/60 );
-    %         ai = find(Altitude(3:52) < AltitudeChamp(jj) );
-    %         ai = ai(end) + 2;
-    %         abc=[Altitude(ai:ai+2)' (m(si:si+2))' ones(3,1)]\RhoGITM(ai:ai+2)';
-    %         RhoG4(m) = abc*[AltitudeChamp(jj); sec(ii)/60 ;  1];
-    
-    LongitudeSat(m)    = temp(1)*180/pi; %for these numbers see  3DALL_... .header file
-    LatitudeSat(m)     = temp(2)*180/pi;
-    %         Altitude(m)     = temp(3);
-    %        Temperature(m)  = temp(16);
-    %        NDSo3(m)        = temp(5);
-    %        IDSe(m)         = temp(34);
-    %         RhoGITM(m)          = temp(4);
-    
-    
-    
-    
-    Rw(m)=RhoT(wlon,wlat,walt,m);
-    
-    
-end
-

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list