Changeset 859 for LMDZ4/branches/LMDZ4_V3_patches/libf
- Timestamp:
- Nov 5, 2007, 12:24:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/readsulfate.F
r857 r859 132 132 IF (aer_type == 'actuel ') then 133 133 cyear='1980' 134 CALL getso4fromfile(cyear, so4_1) 134 135 ELSE IF (aer_type == 'preind ') THEN 135 136 cyear='.nat' 137 CALL getso4fromfile(cyear, so4_1) 136 138 ELSE 137 139 IF (iyr .lt. 1850) THEN … … 148 150 ! a) from actual 10-yr-period 149 151 150 IF (iyr.LT.1900) THEN 151 iyr1 = 1850 152 iyr2 = 1900 153 ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN 154 iyr1 = 1900 155 iyr2 = 1920 156 ELSE 157 iyr1 = INT(iyr/10)*10 158 iyr2 = INT(1+iyr/10)*10 152 IF (iyr.LT.1900) THEN 153 iyr1 = 1850 154 iyr2 = 1900 155 ELSE IF (iyr.ge.1900.and.iyr.lt.1920) THEN 156 iyr1 = 1900 157 iyr2 = 1920 158 ELSE 159 iyr1 = INT(iyr/10)*10 160 iyr2 = INT(1+iyr/10)*10 161 ENDIF 162 WRITE(cyear,'(I4)') iyr1 159 163 ENDIF 160 WRITE(cyear,'(I4)') iyr1 161 ENDIF 162 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 163 CALL getso4fromfile(cyear, so4_1) 164 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 165 CALL getso4fromfile(cyear, so4_1) 164 166 165 167 166 168 ! If to read two decades: 167 IF (.NOT.lonlyone) THEN169 IF (.NOT.lonlyone) THEN 168 170 169 171 ! b) from the next following one 170 WRITE(cyear,'(I4)') iyr2171 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear172 CALL getso4fromfile(cyear, so4_2)173 174 ENDIF172 WRITE(cyear,'(I4)') iyr2 173 WRITE(*,*) 'getso4 iyr=', iyr,' ',cyear 174 CALL getso4fromfile(cyear, so4_2) 175 176 ENDIF !lonlyone 175 177 176 178 ! Interpolate linarily to the actual year: 177 DO it=1,12178 DO k=1,klev179 DO j=1,jjm180 DO i=1,iim181 so4_1(i,j,k,it)=so4_1(i,j,k,it)179 DO it=1,12 180 DO k=1,klev 181 DO j=1,jjm 182 DO i=1,iim 183 so4_1(i,j,k,it)=so4_1(i,j,k,it) 182 184 . - FLOAT(iyr-iyr1)/FLOAT(iyr2-iyr1) 183 185 . * (so4_1(i,j,k,it) - so4_2(i,j,k,it)) 184 ENDDO185 ENDDO186 ENDDO187 ENDDO188 189 ENDIF ! lonlyone186 ENDDO 187 ENDDO 188 ENDDO 189 ENDDO 190 191 ENDIF !aer_type 190 192 191 193 ! Transform the horizontal 2D-field into the physics-field
Note: See TracChangeset
for help on using the changeset viewer.