1 | include(dom.inc)
2 |
3 | SUBROUTINE PARAM_SLAVE(pathspec,nb_base)
4 |
5 | USE mod_slave
6 | USE mod_pmm
7 |
8 | IMPLICIT NONE
9 |
10 | INCLUDE 'dom_constants.h'
11 | include 'pmm_constants.h'
12 |
13 | ! IN
14 | CHARACTER*80 :: pathspec, nb_base
15 |
16 | ! LOCAL
17 | DOM_INT :: I, J
18 |
19 | IF (nb_base.eq.'SNB') THEN
20 |
21 | IF(pmm_rank.eq.PMM_HOST) THEN
22 | PRINT*, " -> Using narrow band database SNB from EM2C"
23 | ENDIF
24 |
25 | OPEN(UNIT=1010,FILE=trim(pathspec)//'/SNBH2O_K')
26 | OPEN(UNIT=1020,FILE=trim(pathspec)//'/SNBH2O_Phi')
27 | OPEN(UNIT=1030,FILE=trim(pathspec)//'/SNBCO2_K')
28 | OPEN(UNIT=1040,FILE=trim(pathspec)//'/SNBCO2_Phi')
29 | OPEN(UNIT=1050,FILE=trim(pathspec)//'/SNBCO_K')
30 | OPEN(UNIT=1060,FILE=trim(pathspec)//'/SNBCO_Phi')
31 |
32 | DO I=1,is_nbandes(GAZ_CO)
33 | READ(1050,*) (s_KCO(J,I),J=1,14)
34 | READ(1060,*) (s_DCO(J,I),J=1,14)
35 | END DO
36 |
37 | DO I=1,is_nbandes(GAZ_C)
38 | READ(1030,*) (s_KC(J,I),J=1,14)
39 | READ(1040,*) (s_DC(J,I),J=1,14)
40 | END DO
41 |
42 | DO I=1,is_nbandes(GAZ_H)
43 | READ(1010,*) (s_KH(J,I),J=1,14)
44 | READ(1020,*) (s_DH(J,I),J=1,14)
45 | END DO
46 |
47 | CLOSE(1010)
48 | CLOSE(1020)
49 | CLOSE(1030)
50 | CLOSE(1040)
51 | CLOSE(1050)
52 | CLOSE(1060)
53 |
54 | ELSEIF(nb_base.eq.'NBKM') THEN
55 |
56 | IF(pmm_rank.eq.PMM_HOST) THEN
57 | PRINT*, " -> Using narrow band database NBKM from CETHIL"
58 | ENDIF
59 |
60 | OPEN(UNIT=1010,FILE=trim(pathspec)//'/NBKMH2O')
61 | OPEN(UNIT=1020,FILE=trim(pathspec)//'/NBKMCO2')
62 | OPEN(UNIT=1030,FILE=trim(pathspec)//'/NBKMCO')
63 |
64 | DO I=1,is_nbandes(GAZ_CO)
65 | READ(1030,*) (s_KCO(J,I),J=1,14)
66 | END DO
67 |
68 | DO I=1,is_nbandes(GAZ_CO)
69 | READ(1030,*) (s_DCO(J,I),J=1,14)
70 | END DO
71 |
72 | DO I=1,is_nbandes(GAZ_C)
73 | READ(1020,*) (s_KC(J,I),J=1,14)
74 | END DO
75 |
76 | DO I=1,is_nbandes(GAZ_C)
77 | READ(1020,*) (s_DC(J,I),J=1,14)
78 | END DO
79 |
80 | DO I=1,is_nbandes(GAZ_H)
81 | READ(1010,*) (s_KH(J,I),J=1,14)
82 | END DO
83 |
84 | DO I=1,is_nbandes(GAZ_H)
85 | READ(1010,*) (s_DH(J,I),J=1,14)
86 | END DO
87 |
88 | CLOSE(1010)
89 | CLOSE(1020)
90 | CLOSE(1030)
91 |
92 | ELSE
93 | PRINT*, "ERROR : Unknown narrow band database"
94 | STOP
95 | ENDIF
96 |
97 | END SUBROUTINE PARAM_SLAVE
param_slave.F could be called by: