source: flexpart.git/src/openreceptors.f90 @ 3481cc1

10.4.1_peseiGFS_025bugfixes+enhancementsdevrelease-10release-10.4.1scaling-bug
Last change on this file since 3481cc1 was 3481cc1, checked in by Ignacio Pisso <ip@…>, 4 years ago

move license from headers to a different file

  • Property mode set to 100644
File size: 3.1 KB
Line 
1subroutine openreceptors
2
3  !*****************************************************************************
4  !                                                                            *
5  !  This routine opens the receptor output files and writes out the receptor  *
6  !  names and the receptor locations. The receptor output files are not       *
7  !  closed, but kept open throughout the simulation. Concentrations are       *
8  !  continuously  dumped to these files.                                      *
9  !                                                                            *
10  !     Author: A. Stohl                                                       *
11  !                                                                            *
12  !     7 August 2002                                                          *
13  !                                                                            *
14  !*****************************************************************************
15  !                                                                            *
16  ! Variables:                                                                 *
17  ! numreceptor            actual number of receptor points specified          *
18  ! receptornames          names of the receptor points                        *
19  ! xreceptor,yreceptor    coordinates of the receptor points                  *
20  !                                                                            *
21  !*****************************************************************************
22
23  use par_mod
24  use com_mod
25
26  implicit none
27
28  integer :: j
29
30  ! Open output file for receptor points and write out a short header
31  ! containing receptor names and locations
32  !******************************************************************
33
34  if (numreceptor.ge.1) then           ! do it only if receptors are specified
35
36  ! Concentration output
37  !*********************
38
39    if ((iout.eq.1).or.(iout.eq.3).or.(iout.eq.5)) then
40      open(unitoutrecept,file=path(2)(1:length(2))//'receptor_conc', &
41           form='unformatted',err=997)
42      write(unitoutrecept) (receptorname(j),j=1,numreceptor)
43      write(unitoutrecept) (xreceptor(j)*dx+xlon0, &
44           yreceptor(j)*dy+ylat0,j=1,numreceptor)
45    endif
46
47  ! Mixing ratio output
48  !********************
49
50    if ((iout.eq.2).or.(iout.eq.3)) then
51      open(unitoutreceptppt,file=path(2)(1:length(2))//'receptor_pptv', &
52           form='unformatted',err=998)
53      write(unitoutreceptppt) (receptorname(j),j=1,numreceptor)
54      write(unitoutreceptppt) (xreceptor(j)*dx+xlon0, &
55           yreceptor(j)*dy+ylat0,j=1,numreceptor)
56    endif
57  endif
58
59  return
60
61
62997   write(*,*) ' #### FLEXPART MODEL ERROR! THE FILE           #### '
63  write(*,*) ' ####              receptor_conc               #### '
64  write(*,*) ' #### CANNOT BE OPENED.                        #### '
65  stop
66
67998   write(*,*) ' #### FLEXPART MODEL ERROR! THE FILE           #### '
68  write(*,*) ' ####              receptor_pptv               #### '
69  write(*,*) ' #### CANNOT BE OPENED.                        #### '
70  stop
71
72end subroutine openreceptors
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG