cta_util_methods.h

Go to the documentation of this file.
00001 /*
00002 COSTA: Problem solving environment for data assimilation
00003 Copyright (C) 2005  Nils van Velzen
00004 
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Lesser General Public
00007 License as published by the Free Software Foundation; either
00008 version 2.1 of the License, or (at your option) any later version.
00009 
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 Lesser General Public License for more details.
00014 
00015 You should have received a copy of the GNU Lesser General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 */
00019 
00020 /**
00021 \file  cta_util_methods.h
00022 \brief Utility routines for creating data assimilation methods. 
00023 \note This is just a set of utility routines it does not define any COSTA component
00024 
00025 */
00026 
00027 #ifndef CTA_UTIL_METHODS_H
00028 #define CTA_UTIL_METHODS_H
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 /** \brief print the predicted values and the observed values
00035  *
00036  * \param fgModel     :Model of foreground run (with data
00037  *                     assimilation) or Vector with the predicted
00038  *                     values of the foreground run.
00039  *                     if set to CTA_NULL NaN will be printed as result
00040  * \param bgModel     :Model of background run (without data
00041  *                     assimilation) or Vector with the predicted
00042  *                     values of the background run.
00043  *                     if set to CTA_NULL NaN will be printed as result
00044  * \param sObs        :Stochastic observer
00045  * \param time        :Corresponding time
00046  * \param file        :Output file (note CTA_FILE_STDOUT prints to screen)
00047  * \param printHeader :Print header CTA_TRUE/CTA_FALSE
00048  *
00049  * \return error status: CTA_OK if successful
00050  */
00051 CTAEXPORT int CTA_Util_MethodsPrintObservations(CTA_Handle fgModel,
00052    CTA_Handle bgModel, CTA_StochObs sObs, CTA_Time time, CTA_File file,
00053     int printHeader);
00054 
00055 /** \brief Make an initial selection of the observations
00056  *
00057  *  The selection of observations is based on the given simulation timespan
00058  *  and the criterion provided by the model (CTA_Model_GetObsSelect)
00059  *
00060  *  \note sObsSel is created and should be freed by the caller of this routine
00061  *
00062  * \param model      (I) Model (for CTA_Model_GetObsSelect)
00063  * \param sObsAll    (I) All observations
00064  * \param spanSim    (I) Simulation timespan
00065  * \param sObsSel    (O) Selection of observations
00066  *
00067  * \return error status: CTA_OK if successful
00068  */
00069 CTAEXPORT int CTA_Util_MethodsSelectObservations(CTA_Model model, CTA_StochObs sObsAll, CTA_Time spanSim, CTA_StochObs *sObsSel);
00070 
00071 /** \brief Create an output file for filter predictions at station
00072  *         locations
00073  *
00074  *  The routine  CTA_Util_MethodsPrintObservations can be used for writing
00075  *  the results. 
00076  *  \note the header is written by this call
00077  *
00078  * \param   stationFile  (I) Name of result file
00079  * \param   fStationFile (O) Handle to result file
00080  *
00081  * \return error status: CTA_OK if successful
00082  */
00083 CTAEXPORT int CTA_Util_MethodsOpenResultFile(char *stationFile,
00084                                    CTA_File *fStationFile);
00085 
00086 #ifdef __cplusplus
00087 }
00088 #endif
00089 #endif
00090 

Generated on Mon Apr 6 14:05:58 2009 for COSTA by  doxygen 1.5.2