Changeset 24 for trunk/src/gridcheck_nests.f90
- Timestamp:
- May 23, 2014, 11:48:41 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gridcheck_nests.f90
r4 r24 48 48 integer :: igrib 49 49 integer :: gribVer,parCat,parNum,typSurf,valSurf,discipl 50 integer :: parID !added by mc for making it consistent with new gridcheck.f90 50 51 integer :: gotGrib 51 52 !HSO end … … 55 56 real(kind=4) :: xaux1,xaux2,yaux1,yaux2 56 57 real(kind=8) :: xaux1in,xaux2in,yaux1in,yaux2in 58 real :: conversion_factor !added by mc to make it consistent with new gridchek.f90 57 59 58 60 ! VARIABLES AND ARRAYS NEEDED FOR GRIB DECODING … … 150 152 call grib_get_int(igrib,'level',valSurf,iret) 151 153 call grib_check(iret,gribFunction,gribErrorMsg) 154 call grib_get_int(igrib,'paramId',parId,iret) !added by mc to make it consisitent with new grid_check.f90 155 call grib_check(iret,gribFunction,gribErrorMsg) !added by mc to make it consisitent with new grid_check.f90 152 156 153 157 !print*,discipl,parCat,parNum,typSurf,valSurf … … 170 174 elseif ((parCat.eq.2).and.(parNum.eq.32)) then ! W, actually eta dot 171 175 isec1(6)=135 ! indicatorOfParameter 176 elseif ((parCat.eq.128).and.(parNum.eq.77)) then ! W, actually eta dot !added bymc to make it consistent with new gridchek.f90 177 isec1(6)=135 ! indicatorOfParameter ! ! " " " " " " " " " " " " " " " " " " " " " " " " " " " 172 178 elseif ((parCat.eq.3).and.(parNum.eq.0).and.(typSurf.eq.101)) then !SLP 173 179 isec1(6)=151 ! indicatorOfParameter … … 182 188 elseif ((parCat.eq.1).and.(parNum.eq.11).and.(typSurf.eq.1)) then ! SD 183 189 isec1(6)=141 ! indicatorOfParameter 184 elseif ((parCat.eq.6).and.(parNum.eq.1) ) then ! CC190 elseif ((parCat.eq.6).and.(parNum.eq.1) .or. parId .eq. 164) then ! CC !added by mc to make it consistent with new gridchek.f90 185 191 isec1(6)=164 ! indicatorOfParameter 186 elseif ((parCat.eq.1).and.(parNum.eq.9)) then ! LSP192 elseif ((parCat.eq.1).and.(parNum.eq.9) .or. parId .eq. 142) then ! LSP !added by mc to make it consistent with new gridchek.f90 187 193 isec1(6)=142 ! indicatorOfParameter 188 194 elseif ((parCat.eq.1).and.(parNum.eq.10)) then ! CP … … 192 198 elseif ((parCat.eq.4).and.(parNum.eq.9).and.(typSurf.eq.1)) then ! SR 193 199 isec1(6)=176 ! indicatorOfParameter 194 elseif ((parCat.eq.2).and.(parNum.eq.17) ) then ! EWSS200 elseif ((parCat.eq.2).and.(parNum.eq.17) .or. parId .eq. 180) then ! EWSS !added by mc to make it consistent with new gridchek.f90 195 201 isec1(6)=180 ! indicatorOfParameter 196 elseif ((parCat.eq.2).and.(parNum.eq.18) ) then ! NSSS202 elseif ((parCat.eq.2).and.(parNum.eq.18) .or. parId .eq. 181) then ! NSSS !added by mc to make it consistent with new gridchek.f90 197 203 isec1(6)=181 ! indicatorOfParameter 198 204 elseif ((parCat.eq.3).and.(parNum.eq.4)) then ! ORO 199 205 isec1(6)=129 ! indicatorOfParameter 200 elseif ((parCat.eq.3).and.(parNum.eq.7) ) then ! SDO206 elseif ((parCat.eq.3).and.(parNum.eq.7) .or. parId .eq. 160) then ! SDO !added by mc to make it consistent with new gridchek.f90 201 207 isec1(6)=160 ! indicatorOfParameter 202 208 elseif ((discipl.eq.2).and.(parCat.eq.0).and.(parNum.eq.0).and. & … … 207 213 parCat,parNum,typSurf 208 214 endif 215 if(parId .ne. isec1(6) .and. parId .ne. 77) then !added by mc to make it consistent with new gridchek.f90 216 write(*,*) 'parId',parId, 'isec1(6)',isec1(6) 217 ! stop 218 endif 209 219 210 220 endif … … 237 247 238 248 !HSO get the second part of the grid dimensions only from GRiB1 messages 239 if ( (gribVer.eq.1).and.(gotGrib.eq.0)) then240 call grib_get_real8(igrib,'longitudeOfFirstGridPointInDegrees', & 249 if (isec1(6) .eq. 167 .and. (gotGrib.eq.0)) then !added by mc to make it consistent with new gridchek.f90 note that gotGrid must be changed in gotGrib!! 250 call grib_get_real8(igrib,'longitudeOfFirstGridPointInDegrees', & !comment by mc: note that this was in the (if (ifield.eq.1) ..end above in gridchek.f90 see line 257 241 251 xaux1in,iret) 242 252 call grib_check(iret,gribFunction,gribErrorMsg) … … 254 264 yaux1=yaux1in 255 265 yaux2=yaux2in 256 if(xaux1.gt.180 ) xaux1=xaux1-360.0257 if(xaux2.gt.180 ) xaux2=xaux2-360.0258 if(xaux1.lt.-180 ) xaux1=xaux1+360.0259 if(xaux2.lt.-180 ) xaux2=xaux2+360.0260 if (xaux2.lt.xaux1) xaux2=xaux2+360. 266 if(xaux1.gt.180.) xaux1=xaux1-360.0 267 if(xaux2.gt.180.) xaux2=xaux2-360.0 268 if(xaux1.lt.-180.) xaux1=xaux1+360.0 269 if(xaux2.lt.-180.) xaux2=xaux2+360.0 270 if (xaux2.lt.xaux1) xaux2=xaux2+360.0 261 271 xlon0n(l)=xaux1 262 272 ylat0n(l)=yaux1 263 273 dxn(l)=(xaux2-xaux1)/real(nxn(l)-1) 264 274 dyn(l)=(yaux2-yaux1)/real(nyn(l)-1) 265 gotGrib=1 275 gotGrib=1 !commetn by mc note tahthere gotGRIB is used instead of gotGrid!!! 266 276 endif ! ifield.eq.1 267 277 … … 341 351 342 352 write(*,'(a,i2)') 'Nested domain #: ',l 343 write(*,'(a,f10. 2,a1,f10.2,a,f10.2)') ' Longitude range: ', &353 write(*,'(a,f10.5,a,f10.5,a,f10.5)') ' Longitude range: ', & 344 354 xlon0n(l),' to ',xlon0n(l)+(nxn(l)-1)*dxn(l), & 345 355 ' Grid distance: ',dxn(l) 346 write(*,'(a,f10. 2,a1,f10.2,a,f10.2)') ' Latitude range: ', &356 write(*,'(a,f10.5,a,f10.5,a,f10.5)') ' Latitude range: ', & 347 357 ylat0n(l),' to ',ylat0n(l)+(nyn(l)-1)*dyn(l), & 348 358 ' Grid distance: ',dyn(l)
Note: See TracChangeset
for help on using the changeset viewer.