Changeset 600 for LMDZ.3.3/branches
- Timestamp:
- Feb 25, 2005, 6:01:31 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ.3.3/branches/rel-LF/libf/phylmd/readsulfate.F
r523 r600 1 c 2 c $Header$ 3 c 1 4 SUBROUTINE readsulfate (r_day, first, sulfate) 2 5 … … 48 51 c ---------------- 49 52 INTEGER i, ig, k, it 50 INTEGER j, iday, ny, iyr 53 INTEGER j, iday, ny, iyr, iyr1, iyr2 51 54 parameter (ny=jjm+1) 52 55 53 56 INTEGER ismaller 54 INTEGER idec1, idec2 ! The two decadal data read ini57 CJLD INTEGER idec1, idec2 ! The two decadal data read ini 55 58 CHARACTER*4 cyear 56 59 … … 100 103 ENDDO 101 104 102 IF (iyr .lt. 1930) THEN 103 WRITE(*,*) 'iyr=', iyr105 106 IF (iyr .lt. 1850) THEN 104 107 cyear='.nat' 108 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 109 CALL getso4fromfile(cyear, so4_1) 110 ELSE IF (iyr .ge. 2100) THEN 111 cyear='2100' 112 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 105 113 CALL getso4fromfile(cyear, so4_1) 106 114 ELSE 107 115 108 ! Read in data:116 ! Read in data: 109 117 ! a) from actual 10-yr-period 110 118 111 idec1 = (iyr-1900)/10 112 IF (idec1.LT.10) THEN 113 cyear='19'//char(idec1+48)//'0' 114 ELSE 115 cyear='20'//char(idec1-10+48)//'0' 119 IF (iyr.LT.1900) THEN 120 iyr1 = 1850 121 iyr2 = 1900 122 ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN 123 iyr1 = 1900 124 iyr2 = 1920 125 ELSE 126 iyr1 = INT(iyr/10)*10 127 iyr2 = INT(1+iyr/10)*10 116 128 ENDIF 129 WRITE(cyear,'(I4)') iyr1 130 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 117 131 CALL getso4fromfile(cyear, so4_1) 118 132 … … 120 134 ! If to read two decades: 121 135 IF (.NOT.lonlyone) THEN 122 idec2=idec1+1123 136 124 137 ! b) from the next following one 125 IF (idec2.LT.10) THEN126 cyear='19'//char(idec2+48)//'0'127 ELSE128 cyear='20'//char(idec2-10+48)//'0' 138 WRITE(cyear,'(I4)') iyr2 139 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 140 CALL getso4fromfile(cyear, so4_2) 141 129 142 ENDIF 130 CALL getso4fromfile(cyear, so4_2) 131 132 ENDIF 133 143 134 144 ! Interpolate linarily to the actual year: 135 145 DO it=1,12 … … 138 148 DO i=1,iim 139 149 so4_1(i,j,k,it)=so4_1(i,j,k,it) 140 . - FLOAT(iyr- 1900-10*idec1)/10.150 . - FLOAT(iyr-iyr1)/FLOAT(iyr2-iyr1) 141 151 . * (so4_1(i,j,k,it) - so4_2(i,j,k,it)) 142 152 ENDDO … … 231 241 232 242 233 ! The sulfate concentration [molec cm-3] is read in. 234 ! Convert it into mass [ug SO4/m3] 235 ! masse_so4 in [g/mol], n_avogadro in [molec/mol] 243 CJLD ! The sulfate concentration [molec cm-3] is read in. 244 CJLD ! Convert it into mass [ug SO4/m3] 245 CJLD ! masse_so4 in [g/mol], n_avogadro in [molec/mol] 246 ! The sulfate mass [ug SO4/m3] is read in. 236 247 DO k=1,klev 237 248 DO i=1,klon 238 sulfate(i,k) = sulfate(i,k)*masse_so4239 . /n_avogadro*1.e+12249 CJLD sulfate(i,k) = sulfate(i,k)*masse_so4 250 CJLD . /n_avogadro*1.e+12 240 251 so4_out(i,k) = sulfate(i,k) 241 252 IF (so4_out(i,k).LT.0) … … 448 459 449 460 450 ! The sulfate concentration [molec cm-3] is read in.451 ! Convert it into mass [ug SO4/m3]452 ! masse_so4 in [g/mol], n_avogadro in [molec/mol]461 CJLD ! The sulfate concentration [molec cm-3] is read in. 462 CJLD ! Convert it into mass [ug SO4/m3] 463 CJLD ! masse_so4 in [g/mol], n_avogadro in [molec/mol] 453 464 DO k=1,klev 454 465 DO i=1,klon 455 pi_sulfate(i,k) = pi_sulfate(i,k)*masse_so4456 . /n_avogadro*1.e+12466 CJLD pi_sulfate(i,k) = pi_sulfate(i,k)*masse_so4 467 CJLD . /n_avogadro*1.e+12 457 468 pi_so4_out(i,k) = pi_sulfate(i,k) 458 469 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.