source: trunk/src/readOHfield.f90 @ 28

Last change on this file since 28 was 4, checked in by mlanger, 11 years ago
File size: 3.7 KB
Line 
1!**********************************************************************
2! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010         *
3! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa,             *
4! Caroline Forster, Sabine Eckhardt, John Burkhart, Harald Sodemann   *
5!                                                                     *
6! This file is part of FLEXPART.                                      *
7!                                                                     *
8! FLEXPART is free software: you can redistribute it and/or modify    *
9! it under the terms of the GNU General Public License as published by*
10! the Free Software Foundation, either version 3 of the License, or   *
11! (at your option) any later version.                                 *
12!                                                                     *
13! FLEXPART is distributed in the hope that it will be useful,         *
14! but WITHOUT ANY WARRANTY; without even the implied warranty of      *
15! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *
16! GNU General Public License for more details.                        *
17!                                                                     *
18! You should have received a copy of the GNU General Public License   *
19! along with FLEXPART.  If not, see <http://www.gnu.org/licenses/>.   *
20!**********************************************************************
21
22subroutine readOHfield
23
24  !*****************************************************************************
25  !                                                                            *
26  ! Reads the OH field into memory                                             *
27  !                                                                            *
28  ! AUTHOR: Sabine Eckhardt, June 2007                                         *
29  !                                                                            *
30  !*****************************************************************************
31  !                                                                            *
32  ! Variables:                                                                 *
33  ! i                       loop indices                                       *
34  ! LENGTH(numpath)         length of the path names                           *
35  ! PATH(numpath)           contains the path names                            *
36  ! unitoh                  unit connected with OH field                       *
37  !                                                                            *
38  ! -----                                                                      *
39  !                                                                            *
40  !*****************************************************************************
41
42  use oh_mod
43  use par_mod
44  use com_mod
45
46  implicit none
47
48  integer :: ix,jy,lev,m
49
50
51  ! Read OH field and level heights
52  !********************************
53
54! write (*,*) 'reading OH'
55  open(unitOH,file=path(1)(1:length(1))//'OH_7lev_agl.dat', &
56       status='old',form='UNFORMATTED', err=998)
57  do m=1,12
58    do lev=1,maxzOH
59      do ix=0,maxxOH-1
60  !      do 10 jy=0,maxyOH-1
61          read(unitOH) (OH_field(m,ix,jy,lev),jy=0,maxyOH-1)
62  !      if ((ix.eq.20).and.(lev.eq.1)) then
63  !          write(*,*) 'reading: ', m, OH_field(m,ix,20,lev)
64  !      endif
65      end do
66    end do
67  end do
68  close(unitOH)
69
70  do lev=1,7
71    OH_field_height(lev)=1000+real(lev-1)*2.*1000.
72  end do
73
74!  write (*,*) 'OH read'
75  return
76
77  ! Issue error messages
78  !*********************
79
80998   write(*,*) ' #### FLEXPART ERROR! FILE CONTAINING          ####'
81  write(*,*) ' #### OH FIELD DOES NOT EXIST                  ####'
82  stop
83
84end subroutine readohfield
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG