[Dart-dev] [9017] DART/trunk/models/CESM: Removing the bits and pieces that were the test for the

nancy at ucar.edu nancy at ucar.edu
Mon Nov 9 14:43:15 MST 2015


Revision: 9017
Author:   thoar
Date:     2015-11-09 14:43:14 -0700 (Mon, 09 Nov 2015)
Log Message:
-----------
Removing the bits and pieces that were the test for the 
cross-component, fully-coupled data assimilation. This will not be
supported in the TRUNK, and if anyone actually tries to run
quickbuild.csh in the CESM/work directory, it dies because the
model-specific [pop,clm,cam]_model_mod.f90 files were deleted in

r6897 | thoar | 2014-04-17 15:08:01 -0600 (Thu, 17 Apr 2014)

Only the single-component, fully-coupled assimilation is possible
with the trunk version of CESM. More information is in the README.

This closes JIRA ticket DARTSUP-282

Modified Paths:
--------------
    DART/trunk/models/CESM/README
    DART/trunk/models/CESM/shell_scripts/CESM_DART_config

Removed Paths:
-------------
    DART/trunk/models/CESM/cesm_to_dart.f90
    DART/trunk/models/CESM/cesm_to_dart.html
    DART/trunk/models/CESM/cesm_to_dart.nml
    DART/trunk/models/CESM/dart_to_cesm.f90
    DART/trunk/models/CESM/dart_to_cesm.html
    DART/trunk/models/CESM/dart_to_cesm.nml
    DART/trunk/models/CESM/model_mod.f90
    DART/trunk/models/CESM/model_mod.html
    DART/trunk/models/CESM/model_mod.nml
    DART/trunk/models/CESM/work/README
    DART/trunk/models/CESM/work/input.nml
    DART/trunk/models/CESM/work/mkmf_cesm_to_dart
    DART/trunk/models/CESM/work/mkmf_create_fixed_network_seq
    DART/trunk/models/CESM/work/mkmf_create_obs_sequence
    DART/trunk/models/CESM/work/mkmf_dart_to_cesm
    DART/trunk/models/CESM/work/mkmf_filter
    DART/trunk/models/CESM/work/mkmf_obs_diag
    DART/trunk/models/CESM/work/mkmf_obs_seq_to_netcdf
    DART/trunk/models/CESM/work/mkmf_obs_sequence_tool
    DART/trunk/models/CESM/work/mkmf_perfect_model_obs
    DART/trunk/models/CESM/work/mkmf_preprocess
    DART/trunk/models/CESM/work/mkmf_restart_file_tool
    DART/trunk/models/CESM/work/mkmf_wakeup_filter
    DART/trunk/models/CESM/work/path_names_cesm_to_dart
    DART/trunk/models/CESM/work/path_names_create_fixed_network_seq
    DART/trunk/models/CESM/work/path_names_create_obs_sequence
    DART/trunk/models/CESM/work/path_names_dart_to_cesm
    DART/trunk/models/CESM/work/path_names_filter
    DART/trunk/models/CESM/work/path_names_obs_diag
    DART/trunk/models/CESM/work/path_names_obs_seq_to_netcdf
    DART/trunk/models/CESM/work/path_names_obs_sequence_tool
    DART/trunk/models/CESM/work/path_names_perfect_model_obs
    DART/trunk/models/CESM/work/path_names_preprocess
    DART/trunk/models/CESM/work/path_names_restart_file_tool
    DART/trunk/models/CESM/work/path_names_wakeup_filter
    DART/trunk/models/CESM/work/quickbuild.csh

-------------- next part --------------
Modified: DART/trunk/models/CESM/README
===================================================================
--- DART/trunk/models/CESM/README	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/README	2015-11-09 21:43:14 UTC (rev 9017)
@@ -11,4 +11,35 @@
 of the existing POP (ocean), CLM (land), and CAM (atmosphere) 
 model_mod codes.
 
+Mon Nov  9 13:44:50 MST 2015
 
+We have adopted some terminology to help us keep things straight.
+1) CESM already uses the term 'fully-coupled', so we use that in
+   reference to CESM components only.
+2) We use the term 'single-component, fully-coupled' to denote the
+   situation in which the assimilations are performed separately for
+   any/all active model components. Atmospheric obs directly impact 
+   the atmosphere, ocean obs directly impact the ocean, land obs 
+   directly impact the land - any impact from the atmosphere to the ocean
+   happens through interaction with the CESM coupler.
+3) 'cross-component, fully-coupled' is used to specify the case
+   when observations of one component can directly impact any/all of
+   the other components without going through the coupler.
+
+Prior to 9 Nov 2015, models/CESM  had programs that were an attempt to
+achieve the cross-component, fully-coupled data assimilation. Since
+this is being implemented with the Remote Memory Access (RMA) strategy
+that is not consistent with the current SVN trunk, the files that allow
+that usage pattern are being removed from the SVN trunk.
+
+Only the single-component, fully-coupled assimilation pattern will 
+be supported in the SVN trunk.
+
+The models/CESM/work directory has nothing of use in it, since there 
+are no programs to interact with a cross-component DART state vector
+(a DART state that consists of atmosphere and/or ocean and/or land).
+
+The models/CESM/shell_scripts directory DOES have the scripts that 
+illustrate how to set up and run a single-component, fully-coupled 
+assimilation.
+

Deleted: DART/trunk/models/CESM/cesm_to_dart.f90
===================================================================
--- DART/trunk/models/CESM/cesm_to_dart.f90	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/cesm_to_dart.f90	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,112 +0,0 @@
-! DART software - Copyright 2004 - 2013 UCAR. This open source software is
-! provided by UCAR, "as is", without charge, subject to all terms of use at
-! http://www.image.ucar.edu/DAReS/DART/DART_download
-!
-! $Id$
-
-program cesm_to_dart
-
-!----------------------------------------------------------------------
-! purpose: interface between CESM and DART
-!
-! method: Read CESM "restart" files of model state
-!         Reform fields into a DART state vector (control vector).
-!         Write out state vector in "proprietary" format for DART.
-!         The output is a "DART restart file" format.
-!
-! USAGE:  The CESM filename is read from the cesm_in namelist
-!         <edit cesm_to_dart_output_file in input.nml:cesm_to_dart_nml>
-!         cesm_to_dart
-!
-! author: Tim Hoar 6/24/09
-!----------------------------------------------------------------------
-
-use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, finalize_utilities, &
-                             find_namelist_in_file, check_namelist_read, &
-                             error_handler, E_MSG
-use        model_mod, only : restart_file_to_sv, static_init_model, &
-                             get_model_size, get_cesm_restart_filename
-use  assim_model_mod, only : awrite_state_restart, open_restart_write, close_restart
-use time_manager_mod, only : time_type, print_time, print_date
-
-use netcdf
-implicit none
-
-! version controlled file description for error handling, do not edit
-character(len=256), parameter :: source   = &
-   "$URL$"
-character(len=32 ), parameter :: revision = "$Revision$"
-character(len=128), parameter :: revdate  = "$Date$"
-
-!-----------------------------------------------------------------------
-! namelist parameters with default values.
-!-----------------------------------------------------------------------
-
-character (len = 128) :: cesm_to_dart_output_file  = 'dart_ics'
-
-namelist /cesm_to_dart_nml/ cesm_to_dart_output_file
-
-!----------------------------------------------------------------------
-! global storage
-!----------------------------------------------------------------------
-
-integer               :: io, iunit, x_size
-type(time_type)       :: model_time
-real(r8), allocatable :: statevector(:)
-character (len = 128) :: cesm_restart_filename = 'no_cesm_restart_filename'
-
-!----------------------------------------------------------------------
-
-call initialize_utilities(progname='cesm_to_dart')
-
-!----------------------------------------------------------------------
-! Call model_mod:static_init_model(), which reads the namelists
-! to set calendar type, starting date, deltaT, etc.
-!----------------------------------------------------------------------
-
-call static_init_model()
-
-!----------------------------------------------------------------------
-! Read the namelist to get the input and output filenames.
-!----------------------------------------------------------------------
-
-call find_namelist_in_file("input.nml", "cesm_to_dart_nml", iunit)
-read(iunit, nml = cesm_to_dart_nml, iostat = io)
-call check_namelist_read(iunit, io, "cesm_to_dart_nml") ! closes, too.
-
-call get_cesm_restart_filename( cesm_restart_filename )
-
-write(*,*)
-write(*,'(''cesm_to_dart:converting CESM restart file '',A, &
-      &'' to DART file '',A)') &
-       trim(cesm_restart_filename), trim(cesm_to_dart_output_file)
-
-!----------------------------------------------------------------------
-! Now that we know the names, get to work.
-!----------------------------------------------------------------------
-
-x_size = get_model_size()
-allocate(statevector(x_size))
-call restart_file_to_sv(cesm_restart_filename, statevector, model_time)
-
-iunit = open_restart_write(cesm_to_dart_output_file)
-
-call awrite_state_restart(model_time, statevector, iunit)
-call close_restart(iunit)
-
-!----------------------------------------------------------------------
-! Call finalize_utilities()
-!----------------------------------------------------------------------
-
-call print_date(model_time, str='cesm_to_dart:CESM model date')
-call print_time(model_time, str='cesm_to_dart:DART model time')
-call finalize_utilities('cesm_to_dart')
-
-end program cesm_to_dart
-
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$

Deleted: DART/trunk/models/CESM/cesm_to_dart.html
===================================================================
--- DART/trunk/models/CESM/cesm_to_dart.html	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/cesm_to_dart.html	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,204 +0,0 @@
-<!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_CESM</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>
-
-<H1>PROGRAM <em class=program>CESM_to_dart</em></H1>
-
-<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>Jump to <a href="../../index.html">DART Documentation Main Index</a><br />
-          <small><small>version information for this file: <br />
-          <!-- version tag follows, do not edit -->
-          $Id$</small></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>
-
-<H2>Overview</H2>
-
-<P>
-<em class=program>xxx_to_dart</em> are a set of programs that 
-convert from the
-native file(s) a model writes after an advance to a
-DART state vector format (a 1D fortran array) file.
-See the documentation
-for each of the individual model pages for more information
-on the details of each converter:
-</P>
-<UL>
-<LI> <a href="../cam/cam_to_dart.html">cam_to_dart</a></LI>
-<LI> <a href="../POP/pop_to_dart.html">pop_to_dart</a></LI>
-<LI> <a href="../clm/clm_to_dart.html">clm_to_dart</a></LI>
-</UL>
-
-<P>
-Since this program is invoked from a unique directory for every ensemble member,
-we have found it convenient to link to default filenames, e.g. (<em class=file>dart_ics</em>). 
-</P>
-
-<!--==================================================================-->
-<!--=================== DESCRIPTION OF A NAMELIST ====================-->
-<!--==================================================================-->
-
-<A NAME="Namelist"></A>
-<hr />
-<H2>NAMELIST</H2>
-<P>
-This namelist is read from the file <em class=file>input.nml</em>.
-Namelists start with an ampersand
-'&amp;' and terminate with a slash '/'.
-Character strings that contain a '/' must be
-enclosed in quotes to prevent them from
-prematurely terminating the namelist.
-</P>
-
-<div class=namelist>
-<pre>
-
-&amp;cam_to_dart_nml
-   cam_to_dart_input_file  = 'caminput.nc',
-   cam_to_dart_output_file = 'dart_ics', 
-   /
-
-&amp;pop_to_dart_nml
-   pop_to_dart_output_file = 'dart_ics'  
-   /
-
-&amp;clm_to_dart_nml
-   clm_to_dart_output_file = 'dart_ics',
-   /
-
-</pre>
-</div>
-
-<P> See each of the model html pages for details on the
-namelist defaults and values.
-</P>
-
-<br />
-
-<!--==================================================================-->
-
-<A NAME="Modules"></A>
-<hr />
-<H2>MODULES USED</H2>
-<P>Depends on the component; see the individual module pages
-for each of the converters:
-</P>
-<UL>
-<LI><a href="../cam/cam_to_dart.html">cam_to_dart</a></LI>
-<LI><a href="../POP/pop_to_dart.html">pop_to_dart</a></LI>
-<LI><a href="../clm/clm_to_dart.html">clm_to_dart</a></LI>
-</UL>
-
-<!--==================================================================-->
-<!-- Describe the Files Used by this module.                          -->
-<!--==================================================================-->
-
-<A NAME="FilesUsed"></A>
-<hr />
-<H2>FILES Read</H2>
-<UL><LI>model restart file</LI>
-    <LI>model namelist file</LI>
-    <LI>DART namelist file; <em class=file>input.nml</em></LI>
-    <LI>any model geometry files needed</LI>
-    <LI>possibly model restart file (to get grid values)</LI>
-</UL>
-
-<H2>FILES Written</H2>
-<UL><LI>DART initial conditions/restart file; e.g. <em class=file>filter_ic</em></LI>
-</UL>
-
-
-<!--==================================================================-->
-<!-- Cite references, if need be.                                     -->
-<!--==================================================================-->
-
-<A NAME="References"></A>
-<hr />
-<H2>REFERENCES</H2>
-<ul>
-<li>Anderson,&nbsp;J.,&nbsp;T.&nbsp;Hoar,&nbsp;K.&nbsp;Raeder,
-    H.&nbsp;Liu,&nbsp;N.&nbsp;Collins,&nbsp;R.&nbsp;Torn,
-    and&nbsp;A.&nbsp;Arellano,&nbsp;2009:<br />
-    The Data Assimilation Research Testbed: A Community Facility. 
-    <span style="font-style: italic;">Bull. Amer. Meteor. Soc.</span>,
-    <span style="font-weight: bold;">90</span>, 1283-1296.<br />
-    <a href="http://ams.allenpress.com/perlserv/?doi=10.1175%2F2009BAMS2618.1&amp;request=get-abstract">DOI: 10.1175/2009BAMS2618.1</a></li>
-</ul>
-<br />
-
-<!--==================================================================-->
-<!-- Describe all the error conditions and codes.                     -->
-<!--==================================================================-->
-
-<A NAME="Errors"></A>
-<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>
-<hr />
-<H2>FUTURE PLANS</H2>
-<P>
-None.
-</P>
-
-<!--==================================================================-->
-<!-- Legalese & Metadata                                              -->
-<!--==================================================================-->
-
-<A NAME="Legalese"></A>
-<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> DART core group   </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&nbsp;history:&nbsp;</TD><TD> try "svn&nbsp;log" or "svn&nbsp;diff" </TD></TR>
-</TABLE>
-
-<!--==================================================================-->
-
-</BODY>
-</HTML>

Deleted: DART/trunk/models/CESM/cesm_to_dart.nml
===================================================================
--- DART/trunk/models/CESM/cesm_to_dart.nml	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/cesm_to_dart.nml	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,4 +0,0 @@
-&cesm_to_dart_nml
-   cesm_to_dart_output_file = 'dart_ics'
-   /
-

Deleted: DART/trunk/models/CESM/dart_to_cesm.f90
===================================================================
--- DART/trunk/models/CESM/dart_to_cesm.f90	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/dart_to_cesm.f90	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,136 +0,0 @@
-! DART software - Copyright 2004 - 2013 UCAR. This open source software is
-! provided by UCAR, "as is", without charge, subject to all terms of use at
-! http://www.image.ucar.edu/DAReS/DART/DART_download
-!
-! $Id$
-
-program dart_to_cesm
-
-!----------------------------------------------------------------------
-! purpose: interface between DART and the CESM model
-!
-! method: Read DART state vector and overwrite values in a CESM restart file.
-!         If the DART state vector has an 'advance_to_time' present, a
-!         file called cesm_in.DART is created with a time_manager_nml namelist
-!         appropriate to advance CESM to the requested time.
-!
-!         The dart_to_cesm_nml namelist setting for advance_time_present
-!         determines whether or not the input file has an 'advance_to_time'.
-!         Typically, only temporary files like 'assim_model_state_ic' have
-!         an 'advance_to_time'.
-!
-! author: Tim Hoar 25 Jun 09, revised 12 July 2010
-!----------------------------------------------------------------------
-
-use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, finalize_utilities, &
-                             find_namelist_in_file, check_namelist_read, &
-                             logfileunit, error_handler, E_MSG
-use  assim_model_mod, only : open_restart_read, aread_state_restart, close_restart
-use time_manager_mod, only : time_type, print_time, print_date, operator(-)
-use        model_mod, only : static_init_model, sv_to_restart_file, &
-                             get_model_size, get_cesm_restart_filename
-!use     dart_cesm_mod, only : write_cesm_namelist
-
-implicit none
-
-! version controlled file description for error handling, do not edit
-character(len=256), parameter :: source   = &
-   "$URL$"
-character(len=32 ), parameter :: revision = "$Revision$"
-character(len=128), parameter :: revdate  = "$Date$"
-
-!------------------------------------------------------------------
-! The namelist variables
-!------------------------------------------------------------------
-
-character (len = 128) :: dart_to_cesm_input_file  = 'dart_restart'
-logical               :: advance_time_present     = .false.
-
-namelist /dart_to_cesm_nml/ dart_to_cesm_input_file, &
-                           advance_time_present
-
-!----------------------------------------------------------------------
-
-integer               :: iunit, io, x_size
-type(time_type)       :: model_time, adv_to_time
-real(r8), allocatable :: statevector(:)
-character (len = 128) :: cesm_restart_filename = 'no_cesm_restart_file'
-
-!----------------------------------------------------------------------
-
-call initialize_utilities(progname='dart_to_cesm')
-
-!----------------------------------------------------------------------
-! Call model_mod:static_init_model() which reads the CESM namelists
-! to set grid sizes, etc.
-!----------------------------------------------------------------------
-
-call static_init_model()
-
-x_size = get_model_size()
-allocate(statevector(x_size))
-
-! Read the namelist to get the input filename.
-
-call find_namelist_in_file("input.nml", "dart_to_cesm_nml", iunit)
-read(iunit, nml = dart_to_cesm_nml, iostat = io)
-call check_namelist_read(iunit, io, "dart_to_cesm_nml")
-
-call get_cesm_restart_filename( cesm_restart_filename )
-
-write(*,*)
-write(*,'(''dart_to_cesm:converting DART file '',A, &
-      &'' to CESM restart file '',A)') &
-     trim(dart_to_cesm_input_file), trim(cesm_restart_filename)
-
-!----------------------------------------------------------------------
-! Reads the valid time, the state, and the target time.
-!----------------------------------------------------------------------
-
-iunit = open_restart_read(dart_to_cesm_input_file)
-
-if ( advance_time_present ) then
-   call aread_state_restart(model_time, statevector, iunit, adv_to_time)
-else
-   call aread_state_restart(model_time, statevector, iunit)
-endif
-call close_restart(iunit)
-
-!----------------------------------------------------------------------
-! update the current CESM state vector
-! Convey the amount of time to integrate the model ...
-! time_manager_nml: stop_option, stop_count increments
-!----------------------------------------------------------------------
-
-call sv_to_restart_file(statevector, cesm_restart_filename, model_time)
-
-if ( advance_time_present ) then
-   ! call write_cesm_namelist(model_time, adv_to_time)
-endif
-
-!----------------------------------------------------------------------
-! Log what we think we're doing, and exit.
-!----------------------------------------------------------------------
-
-call print_date( model_time,'dart_to_cesm:CESM model date')
-call print_time( model_time,'dart_to_cesm:DART model time')
-call print_date( model_time,'dart_to_cesm:CESM model date',logfileunit)
-call print_time( model_time,'dart_to_cesm:DART model time',logfileunit)
-
-if ( advance_time_present ) then
-call print_time(adv_to_time,'dart_to_cesm:advance_to time')
-call print_date(adv_to_time,'dart_to_cesm:advance_to date')
-call print_time(adv_to_time,'dart_to_cesm:advance_to time',logfileunit)
-call print_date(adv_to_time,'dart_to_cesm:advance_to date',logfileunit)
-endif
-
-call finalize_utilities('dart_to_cesm')
-
-end program dart_to_cesm
-
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$

Deleted: DART/trunk/models/CESM/dart_to_cesm.html
===================================================================
--- DART/trunk/models/CESM/dart_to_cesm.html	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/dart_to_cesm.html	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,206 +0,0 @@
-<!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_CESM</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>
-
-<H1>PROGRAM <em class=program>dart_to_CESM</em></H1>
-
-<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>Jump to <a href="../../index.html">DART Documentation Main Index</a><br />
-          <small><small>version information for this file: <br />
-          <!-- version tag follows, do not edit -->
-          $Id$</small></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>
-
-<H2>Overview</H2>
-
-<P>
-<em class=program>dart_to_xxx</em> are a set of programs that 
-convert from DART state vector format (a 1D fortran array) file to the
-native file(s) a model needs to advance.  See the documentation
-for each of the individual model pages for more information
-on the details of each converter:
-</P>
-<UL>
-<LI> <a href="../cam/dart_to_cam.html">dart_to_cam</a></LI>
-<LI> <a href="../POP/dart_to_pop.html">dart_to_pop</a></LI>
-<LI> <a href="../clm/dart_to_clm.html">dart_to_clm</a></LI>
-</UL>
-
-<P>
-Since this program is invoked from a unique directory for every ensemble member,
-we have found it convenient to link to default filenames, e.g. (<em class=file>dart_restart</em>). 
-</P>
-
-<!--==================================================================-->
-<!--=================== DESCRIPTION OF A NAMELIST ====================-->
-<!--==================================================================-->
-
-<A NAME="Namelist"></A>
-<hr />
-<H2>NAMELIST</H2>
-<P>
-This namelist is read from the file <em class=file>input.nml</em>.
-Namelists start with an ampersand
-'&amp;' and terminate with a slash '/'.
-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_cam_nml
-   dart_to_cam_input_file  = 'dart_restart',
-   dart_to_cam_output_file = 'caminput.nc',
-   advance_time_present    = .false.,
-   /
-
-&amp;dart_to_pop_nml
-   dart_to_pop_input_file = 'dart_restart',
-   advance_time_present   = .false.  
-   /
-
-&amp;dart_to_clm_nml
-   dart_to_clm_output_file = 'dart_restart',
-   advance_time_present    = .false.,
-   /
-
-</pre>
-</div>
-
-<P> See each of the converter html pages for details on the
-namelist defaults and values.
-</P>
-
-<br />
-
-<!--==================================================================-->
-
-<A NAME="Modules"></A>
-<hr />
-<H2>MODULES USED</H2>
-<P>Depends on the component; see the individual module pages
-for each of the converters:
-</P>
-<UL>
-<LI><a href="../cam/dart_to_cam.html">dart_to_cam</a></LI>
-<LI><a href="../POP/dart_to_pop.html">dart_to_pop</a></LI>
-<LI><a href="../clm/dart_to_clm.html">dart_to_clm</a></LI>
-</UL>
-
-<!--==================================================================-->
-<!-- Describe the Files Used by this module.                          -->
-<!--==================================================================-->
-
-<A NAME="FilesUsed"></A>
-<hr />
-<H2>FILES Read</H2>
-<UL><LI>DART initial conditions/restart file; e.g. <em class=file>filter_restart</em></LI>
-    <LI>DART namelist file; <em class=file>input.nml</em></LI>
-    <LI>model namelist file</LI>
-    <LI>any model geometry files needed</LI>
-    <LI>possibly model restart file (to get grid values)</LI>
-</UL>
-
-<H2>FILES Written</H2>
-<UL><LI>model restart file</LI>
-    <LI>model namelist file</LI>
-</UL>
-
-
-<!--==================================================================-->
-<!-- Cite references, if need be.                                     -->
-<!--==================================================================-->
-
-<A NAME="References"></A>
-<hr />
-<H2>REFERENCES</H2>
-<ul>
-<li>Anderson,&nbsp;J.,&nbsp;T.&nbsp;Hoar,&nbsp;K.&nbsp;Raeder,
-    H.&nbsp;Liu,&nbsp;N.&nbsp;Collins,&nbsp;R.&nbsp;Torn,
-    and&nbsp;A.&nbsp;Arellano,&nbsp;2009:<br />
-    The Data Assimilation Research Testbed: A Community Facility. 
-    <span style="font-style: italic;">Bull. Amer. Meteor. Soc.</span>,
-    <span style="font-weight: bold;">90</span>, 1283-1296.<br />
-    <a href="http://ams.allenpress.com/perlserv/?doi=10.1175%2F2009BAMS2618.1&amp;request=get-abstract">DOI: 10.1175/2009BAMS2618.1</a></li>
-</ul>
-<br />
-
-<!--==================================================================-->
-<!-- Describe all the error conditions and codes.                     -->
-<!--==================================================================-->
-
-<A NAME="Errors"></A>
-<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>
-<hr />
-<H2>FUTURE PLANS</H2>
-<P>
-None.
-</P>
-
-<!--==================================================================-->
-<!-- Legalese & Metadata                                              -->
-<!--==================================================================-->
-
-<A NAME="Legalese"></A>
-<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> DART core group   </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&nbsp;history:&nbsp;</TD><TD> try "svn&nbsp;log" or "svn&nbsp;diff" </TD></TR>
-</TABLE>
-
-<!--==================================================================-->
-
-</BODY>
-</HTML>

Deleted: DART/trunk/models/CESM/dart_to_cesm.nml
===================================================================
--- DART/trunk/models/CESM/dart_to_cesm.nml	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/dart_to_cesm.nml	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,5 +0,0 @@
-&dart_to_cesm_nml
-   dart_to_cesm_input_file = 'dart_restart',
-   advance_time_present    = .false.
-   /
-

Deleted: DART/trunk/models/CESM/model_mod.f90
===================================================================
--- DART/trunk/models/CESM/model_mod.f90	2015-11-09 16:09:01 UTC (rev 9016)
+++ DART/trunk/models/CESM/model_mod.f90	2015-11-09 21:43:14 UTC (rev 9017)
@@ -1,723 +0,0 @@
-! DART software - Copyright 2004 - 2013 UCAR. This open source software is
-! provided by UCAR, "as is", without charge, subject to all terms of use at
-! http://www.image.ucar.edu/DAReS/DART/DART_download
-!
-! $Id$
-
-module model_mod
-
-! This is the interface between the CESM whole-system climate model and DART.
-
-! Modules that are absolutely required for use are listed
-use        types_mod, only : r8, missing_r8
-use time_manager_mod, only : time_type, set_time, set_date, get_date, get_time,&
-                             print_time, print_date,                           &
-                             operator(*),  operator(+), operator(-),           &
-                             operator(>),  operator(<), operator(/),           &
-                             operator(/=), operator(<=)
-use     location_mod, only : location_type, get_dist, get_close_maxdist_init,  &
-                             get_close_obs_init, set_location,                 &
-                             get_location, loc_get_close_obs => get_close_obs, &
-                             get_close_type
-use    utilities_mod, only : register_module, error_handler,                   &
-                             E_ERR, E_WARN, E_MSG, logfileunit, get_unit,      &
-                             nc_check, do_output, to_upper,                    &
-                             find_namelist_in_file, check_namelist_read,       &
-                             open_file, file_exist, find_textfile_dims,        &
-                             file_to_text, do_output
-use     obs_kind_mod     ! for now, include all
-
-
-use pop_model_mod
-use clm_model_mod
-use cam_model_mod
-
-
-use typesizes
-use netcdf 
-
-implicit none
-private
-
-! these routines must be public and you cannot change
-! the arguments - they will be called *from* the DART code.
-public :: get_model_size,         &
-          adv_1step,              &
-          get_state_meta_data,    &
-          model_interpolate,      &
-          get_model_time_step,    &
-          static_init_model,      &
-          end_model,              &
-          init_time,              &
-          init_conditions,        &
-          nc_write_model_atts,    &
-          nc_write_model_vars,    &
-          pert_model_state,       &
-          get_close_maxdist_init, &
-          get_close_obs_init,     &
-          get_close_obs,          &
-          ens_mean_for_model, &
-  restart_file_to_sv, &
-  sv_to_restart_file, &
-  get_cesm_restart_filename
-
-! version controlled file description for error handling, do not edit
-character(len=256), parameter :: source   = &
-   "$URL$"
-character(len=32 ), parameter :: revision = "$Revision$"
-character(len=128), parameter :: revdate  = "$Date$"
-
-integer :: cam_model_size, clm_model_size, pop_model_size
-
-character(len=256) :: msgstring
-logical, save :: module_initialized = .false.
-
-! FIXME: for now make cam the only default
-logical :: include_CAM = .true.
-logical :: include_POP = .false.
-logical :: include_CLM = .false.
-
-integer  :: debug = 0   ! turn up for more and more debug messages
-
-
-namelist /model_nml/  &
-   include_CAM, &
-   include_POP, &
-   include_CLM, &
-   debug
-
-type(time_type) :: model_time, model_timestep
-integer :: model_size    ! the state vector length
-
-
-contains
-
-!------------------------------------------------------------------
-!------------------------------------------------------------------
-
-subroutine static_init_model()
-
-integer :: iunit, io, days, ss, dd, model_size
-
-if ( module_initialized ) return ! only need to do this once.
-
-! Print module information to log file and stdout.
-call register_module(source, revision, revdate)
-
-! Since this routine calls other routines that could call this routine
-! we'll say we've been initialized pretty dang early.
-module_initialized = .true.
-
-! Read the DART namelist for this model
-call find_namelist_in_file('input.nml', 'model_nml', iunit)
-read(iunit, nml = model_nml, iostat = io)
-call check_namelist_read(iunit, io, 'model_nml')
-
-! Record the namelist values used for the run
-call error_handler(E_MSG,'static_init_model','model_nml values are',' ',' ',' ')
-if (do_output()) write(logfileunit, nml=model_nml)
-if (do_output()) write(     *     , nml=model_nml)
-
-
-if (include_CAM) call cam_static_init_model()
-if (include_POP) call pop_static_init_model()
-if (include_CLM) call clm_static_init_model()
-
-
-model_timestep = get_model_time_step()
-call get_time(model_timestep,ss,dd) ! set_time() assures the seconds [0,86400)
-write(msgstring,*)'assimilation period is ',dd,' days ',ss,' seconds'
-call error_handler(E_MSG,'static_init_model',msgstring,source,revision,revdate)
-
-model_size = get_model_size()
-write(msgstring,*)'model_size = ', model_size
-call error_handler(E_MSG,'static_init_model',msgstring,source,revision,revdate)
-
-end subroutine static_init_model
-
-!------------------------------------------------------------
-
-subroutine init_conditions(x)
- real(r8), intent(out) :: x(:)
-
-! Returns a model state vector, x, that is some sort of appropriate
-! initial condition for starting up a long integration of the model.
-! At present, this is only used if the namelist parameter 
-! start_from_restart is set to .false. in the program perfect_model_obs.
-
-character(len=128) :: msgstring2, msgstring3
-
-msgstring2 = "cannot run perfect_model_obs with 'start_from_restart = .false.' "
-msgstring3 = 'use cesm_to_dart to generate an initial state'
-call error_handler(E_ERR,'init_conditions', &
-                  'WARNING!!  CESM model has no built-in default state', &
-                  source, revision, revdate, &
-                  text2=msgstring2, text3=msgstring3)
-
-! this code never reached - just here to avoid compiler warnings
-! about an intent(out) variable not being set to a value.
-x = 0.0_r8
-
-end subroutine init_conditions
-
-!------------------------------------------------------------------
-
-subroutine adv_1step(x, time)
- real(r8),        intent(inout) :: x(:)
- type(time_type), intent(in)    :: time
-
-! If the model could be called as a subroutine, does a single
-! timestep advance.  CESM cannot be called this way, so fatal error
-! if this routine is called.
-
-call error_handler(E_ERR,'adv_1step', &
-                  'CESM model cannot be called as a subroutine; async cannot = 0', &
-                  source, revision, revdate)
-
-end subroutine adv_1step
-
-!------------------------------------------------------------------
-
-function get_model_size()
- integer :: get_model_size
-
-! Returns the size of the model as an integer. Required for all
-! applications.
-
-if ( .not. module_initialized ) call static_init_model
-
-cam_model_size = 0
-pop_model_size = 0
-clm_model_size = 0
-
-if (include_CAM) cam_model_size = cam_get_model_size()
-if (include_POP) pop_model_size = pop_get_model_size()
-if (include_CLM) clm_model_size = clm_get_model_size()
-
-get_model_size = cam_model_size + clm_model_size + pop_model_size
-
-end function get_model_size
-
-!------------------------------------------------------------------
-
-subroutine init_time(time)
- type(time_type), intent(out) :: time
-
-! Companion interface to init_conditions. Returns a time that is
-! appropriate for starting up a long integration of the model.
-! At present, this is only used if the namelist parameter 
-! start_from_restart is set to .false. in the program perfect_model_obs.
-
-character(len=128) :: msgstring2, msgstring3
-
-msgstring2 = "cannot run perfect_model_obs with 'start_from_restart = .false.' "
-msgstring3 = 'use cesm_to_dart to generate an initial state which contains a timestamp'
-call error_handler(E_ERR,'init_time', &
-                  'WARNING!!  CESM model has no built-in default time', &
-                  source, revision, revdate, &
-                  text2=msgstring2, text3=msgstring3)
-
-! this code never reached - just here to avoid compiler warnings
-! about an intent(out) variable not being set to a value.
-time = set_time(0,0)
-
-end subroutine init_time
-
-!------------------------------------------------------------------
-
-subroutine model_interpolate(x, location, obs_type, interp_val, istatus)
- real(r8),            intent(in) :: x(:)
- type(location_type), intent(in) :: location
- integer,             intent(in) :: obs_type
- real(r8),           intent(out) :: interp_val
- integer,            intent(out) :: istatus
-
-! Model interpolate will interpolate any state variable to
-! the given location given a state vector. The type of the variable being
-! interpolated is obs_type since normally this is used to find the expected
-! value of an observation at some location. The interpolated value is 
-! returned in interp_val and istatus is 0 for success.
-
-real(r8) :: llon, llat, lvert, loc_array(3)
-integer  :: x_start, x_end
-character(len=32) :: modelname
-
-if ( .not. module_initialized ) call static_init_model
-
-
-! Let's assume failure.  Set return val to missing, then the code can
-! just set istatus to something indicating why it failed, and return.
-! If the interpolation is good, the interp_val will be set to the 
-! good value, and the last line here sets istatus to 0.
-! make any error codes set here be in the 10s
-
-interp_val = MISSING_R8     ! the DART bad value flag
-istatus = 99                ! unknown error
-
-! Get the individual locations values
-loc_array = get_location(location)
-llon  = loc_array(1)
-llat  = loc_array(2)
-lvert = loc_array(3)
-
-if (debug > 1) print *, 'requesting interpolation of ', obs_type, ' at ', llon, llat, lvert
-
-call which_model_obs(obs_type, modelname)
-call set_start_end(modelname, x_start, x_end)
-
-if (modelname == 'CAM') then
-   call cam_model_interpolate(x(x_start:x_end), location, obs_type, interp_val, istatus)
-else if (modelname == 'POP') then
-   call pop_model_interpolate(x(x_start:x_end), location, obs_type, interp_val, istatus)
-else if (modelname == 'CLM') then
-   call clm_model_interpolate(x(x_start:x_end), location, obs_type, interp_val, istatus)
-else
-   return
-endif
-
-if (debug > 1) print *, 'interp val, istatus = ', interp_val, istatus
-
-end subroutine model_interpolate
-
-!------------------------------------------------------------------
-
-function get_model_time_step()
- type(time_type) :: get_model_time_step
-
-! Returns the the time step of the model; the smallest increment
-! in time that the model is capable of advancing the state in a given
-! implementation. This interface is required for all applications.
-
-type(time_type) :: cam_time, clm_time, pop_time
-
-if ( .not. module_initialized ) call static_init_model
-
-if (include_CAM) cam_time = cam_get_model_time_step()
-if (include_POP) pop_time = pop_get_model_time_step()
-if (include_CLM) clm_time = clm_get_model_time_step()
-
-! FIXME:
-! make sure they are compatible here
-
-get_model_time_step = cam_time
-
-end function get_model_time_step
-
-!------------------------------------------------------------------
-
-subroutine get_state_meta_data(index_in, location, var_type)
- integer,             intent(in)  :: index_in
- type(location_type), intent(out) :: location
- integer,             intent(out), optional :: var_type
-
-! Given an integer index into the state vector structure, returns the
-! associated location. A second intent(out) optional argument kind
-! can be returned if the model has more than one type of field (for
-! instance temperature and zonal wind component). This interface is
-! required for all filter applications as it is required for computing
-! the distance between observations and state variables.
-
-real(r8) :: lat, lon, vert
-integer  :: x_start, x_end
-character(len=32) :: modelname
-
-! figure out what offset in the state vector we are at, and then
-! call the right sub-model
-
-call which_model_state(index_in, modelname)
-call set_start_end(modelname, x_start, x_end)
-
-if (modelname == 'CAM') then
-   call cam_get_state_meta_data(index_in - x_start, location, var_type)
-
-else if (modelname == 'POP') then
-   call pop_get_state_meta_data(index_in - x_start, location, var_type)
-
-else if (modelname == 'CLM') then
-   call clm_get_state_meta_data(index_in - x_start, location, var_type)
-
-else
-   call error_handler(E_ERR, 'get_state_meta_data', 'offset beyond state vector length', &
-                      source, revision, revdate)
-endif
-
-
-end subroutine get_state_meta_data
-
-!------------------------------------------------------------------
-
-subroutine end_model()
-
-! Shutdown and clean-up.
-
-if (include_CAM) call cam_end_model()
-if (include_POP) call pop_end_model()
-if (include_CLM) call clm_end_model()
-
-end subroutine end_model
-
-!------------------------------------------------------------------
-
-function nc_write_model_atts(ncFileID)
- integer, intent(in)  :: ncFileID            ! netCDF file identifier
- integer              :: nc_write_model_atts ! function return value
-
-integer :: rc
-
-if ( .not. module_initialized ) call static_init_model
-
-if (include_CAM) then
-   rc = cam_nc_write_model_atts(ncFileID)
-   if (rc /= 0) then
-      nc_write_model_atts = rc
-      return
-   endif
-endif
-
-if (include_POP) then
-   rc = pop_nc_write_model_atts(ncFileID)
-   if (rc /= 0) then
-      nc_write_model_atts = rc
-      return
-   endif
-endif
-
-if (include_CLM) then
-   rc = clm_nc_write_model_atts(ncFileID)
-   if (rc /= 0) then
-      nc_write_model_atts = rc
-      return
-   endif
-endif
-
-nc_write_model_atts = 0 ! If we got here, things went well.
-
-end function nc_write_model_atts
-
-!------------------------------------------------------------------
-
-function nc_write_model_vars(ncFileID, statevec, copyindex, timeindex) 

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list