NADCON5-ng  0.0.2
NADCON5 Next Generation Documentation
getgridbounds.f
Go to the documentation of this file.
1 c> \ingroup core
2 c> \if MANPAGE
3 c> \page getgridbounds
4 c> \endif
5 c>
6 c> Subroutine to collect up the GRID boundaries
7 c> for use in creating NADCON 5
8 c>
9 c> This CAN BE different than the MAP boundaries
10 c> as such:
11 c>
12 c> GRID boundaries will be just four values (n/s/w/e) for any region
13 c>
14 c> MAP boundaries will allow multiple maps to be made and may or may
15 c> not align with the GRID boundaries. Used to allow for more
16 c> "close up" maps and such, without the need to screw up the
17 c> MAP boundaries.
18 c>
19 c> \param[in] region Region Name
20 c> \param[out] xn north boundary for this region
21 c> \param[out] xs south boundary for this region
22 c> \param[out] xw west boundary for this region
23 c> \param[out] xe east boundary for this region
24 c>
25 c> ### Subroutine Input Files:
26 c>
27 c> - `Data/grid.parameters
28 c>
29  subroutine getgridbounds(region,xn,xs,xw,xe)
30 c
31 c - Subroutine to collect up the GRID boundaries
32 c - for use in creating NADCON 5
33 c
34 c - This CAN BE different than the MAP boundaries
35 c - as such:
36 c
37 c - GRID boundaries will be just four values (n/s/w/e) for any region
38 c
39 c - MAP boundaries will allow multiple maps to be made and may or may
40 c - not align with the GRID boundaries. Used to allow for more
41 c - "close up" maps and such, without the need to screw up the
42 c - MAP boundaries.
43 
44 c - Input:
45 c region
46 c - Output:
47 c xn,xs,xw,xe = N/S/W/E boundaries of the grid to be
48 c created for this region
49 
50  character*10 region
51  real*8 xn,xs,xw,xe
52  character*80 card
53 
54  ifile = 3
55 
56  open(ifile,
57  *file='Data/grid.parameters',
58  *status='old',form='formatted')
59 
60 c - Read 2 header lines
61  read(ifile,'(a)')card
62  read(ifile,'(a)')card
63 
64 c - Now loop and find our region
65  1 read(ifile,'(a)',end=2)card
66  if(trim(card(1:10)).eq.trim(region))then
67  read(card(14:23),*)xn
68  read(card(27:36),*)xs
69  read(card(40:49),*)xw
70  read(card(53:62),*)xe
71  close(ifile)
72  return
73  endif
74  goto 1
75 
76 c - If we get here, the region sent to this subroutine wasn't found
77 c - in our file /Data/grid.parameters. Crash and burn.
78  2 write(6,100)trim(region)
79  stop 10001
80  100 format(6x,'FATAL Subroutine getgridbounds: Unknown region: ',a)
81 
82  end
subroutine getgridbounds(region, xn, xs, xw, xe)
Subroutine to collect up the GRID boundaries for use in creating NADCON 5.
Definition: getgridbounds.f:30