File: set__missing_8f90-example.html

package info (click to toggle)
grib-api 1.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,008 kB
  • ctags: 10,015
  • sloc: ansic: 63,157; sh: 9,355; f90: 2,545; makefile: 2,496; yacc: 519; perl: 240; lex: 217
file content (69 lines) | stat: -rw-r--r-- 3,633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>grib_api: set_missing.f90</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li><a href="examples.html"><span>Examples</span></a></li>
  </ul>
</div>
<h1>set_missing.f90</h1>How to set a missing value in the header.<p>
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 ! Copyright 2005-2007 ECMWF
<a name="l00002"></a>00002 ! 
<a name="l00003"></a>00003 ! Licensed under the GNU Lesser General Public License which
<a name="l00004"></a>00004 ! incorporates the terms and conditions of version 3 of the GNU
<a name="l00005"></a>00005 ! General Public License.
<a name="l00006"></a>00006 ! See LICENSE and gpl-3.0.txt <span class="keywordflow">for</span> details.
<a name="l00007"></a>00007 !
<a name="l00008"></a>00008 !
<a name="l00009"></a>00009 !  Description: how to <span class="keyword">set</span> missing a key value.
<a name="l00010"></a>00010 !
<a name="l00011"></a>00011 !
<a name="l00012"></a>00012 !  Author: Enrico Fucile
<a name="l00013"></a>00013 !
<a name="l00014"></a>00014 !
<a name="l00015"></a>00015 !
<a name="l00016"></a>00016 program <span class="keyword">set</span>
<a name="l00017"></a>00017   use grib_api
<a name="l00018"></a>00018   implicit none
<a name="l00019"></a>00019   integer              :: infile,outfile
<a name="l00020"></a>00020   integer              :: igrib
<a name="l00021"></a>00021 
<a name="l00022"></a>00022   infile=5
<a name="l00023"></a>00023   outfile=6
<a name="l00024"></a>00024 
<a name="l00025"></a>00025   call grib_open_file(infile, &amp;
<a name="l00026"></a>00026        '../../data/reduced_gaussian_pressure_level.grib2<span class="charliteral">','</span>r')
<a name="l00027"></a>00027 
<a name="l00028"></a>00028   call grib_open_file(outfile, &amp;
<a name="l00029"></a>00029        'out_surface_level.grib2','w')
<a name="l00030"></a>00030 
<a name="l00031"></a>00031   !     a new grib message is loaded from file
<a name="l00032"></a>00032   !     igrib is the grib <span class="keywordtype">id</span> to be used in subsequent calls
<a name="l00033"></a>00033   call grib_new_from_file(infile,igrib)
<a name="l00034"></a>00034 
<a name="l00035"></a>00035   call grib_set(igrib,'typeOfFirstFixedSurface','sfc')
<a name="l00036"></a>00036   call grib_set_missing(igrib,'scaleFactorOfFirstFixedSurface')
<a name="l00037"></a>00037   call grib_set_missing(igrib,'scaledValueOfFirstFixedSurface')
<a name="l00038"></a>00038 
<a name="l00039"></a>00039   call grib_write(igrib,outfile)
<a name="l00040"></a>00040 
<a name="l00041"></a>00041   call grib_release(igrib)
<a name="l00042"></a>00042 
<a name="l00043"></a>00043   call grib_close_file(infile)
<a name="l00044"></a>00044 
<a name="l00045"></a>00045   call grib_close_file(outfile)
<a name="l00046"></a>00046 
<a name="l00047"></a>00047 end program set
</pre></div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Sep 22 15:18:22 2009 for grib_api by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
</body>
</html>