get_pv.f90

How to get the list of levels.

00001 ! Copyright 2005-2007 ECMWF
00002 ! 
00003 ! Licensed under the GNU Lesser General Public License which
00004 ! incorporates the terms and conditions of version 3 of the GNU
00005 ! General Public License.
00006 ! See LICENSE and gpl-3.0.txt for details.
00007 !
00008 !
00009 !  Description: how to get PV values.
00010 !
00011 !
00012 !  Author: Anne Fouilloux
00013 !
00014 !
00015 program get_pv
00016   use grib_api
00017   implicit none
00018   integer                         :: infile
00019   integer                         :: igrib
00020   integer                         :: PVPresent, nb_pv
00021   real, dimension(:), allocatable :: pv
00022   
00023 
00024   call grib_open_file(infile, &
00025        '../../data/reduced_gaussian_model_level.grib1','r')
00026   
00027   !     a new grib message is loaded from file
00028   !     igrib is the grib id to be used in subsequent calls
00029   call grib_new_from_file(in