Changes in trunk/src/readwind_nests.f90 [24:4]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/readwind_nests.f90
r24 r4 51 51 integer :: igrib 52 52 integer :: gribVer,parCat,parNum,typSurf,valSurf,discipl 53 integer :: parId !!added by mc for making it consistent with new readwind.f9054 53 integer :: gotGrid 55 54 !HSO end … … 70 69 integer :: isec1(56),isec2(22+nxmaxn+nymaxn) 71 70 real(kind=4) :: zsec4(jpunp) 72 real(kind=4) :: xaux,yaux73 71 real(kind=8) :: xauxin,yauxin 74 real ,parameter :: eps=1.e-472 real(kind=4) :: xaux,yaux,xaux0,yaux0 75 73 real :: ewss(0:nxmaxn-1,0:nymaxn-1),nsss(0:nxmaxn-1,0:nymaxn-1) 76 74 real :: plev1,pmean,tv,fu,hlev1,ff10m,fflev1 77 real :: conversion_factor !added by mc to make it consistent with new gridchek.f9078 75 79 76 logical :: hflswitch,strswitch … … 137 134 endif 138 135 139 conversion_factor=1.140 141 142 136 else 143 137 … … 154 148 call grib_get_int(igrib,'level',valSurf,iret) 155 149 call grib_check(iret,gribFunction,gribErrorMsg) 156 call grib_get_int(igrib,'paramId',parId,iret) !added by mc to make it consisitent with new readwind.f90157 call grib_check(iret,gribFunction,gribErrorMsg) !added by mc to make it consisitent with new readwind.f90158 150 159 151 !print*,discipl,parCat,parNum,typSurf,valSurf … … 164 156 isec1(8)=-1 165 157 isec1(8)=valSurf ! level 166 conversion_factor=1.167 158 if ((parCat.eq.0).and.(parNum.eq.0).and.(typSurf.eq.105)) then ! T 168 159 isec1(6)=130 ! indicatorOfParameter … … 175 166 elseif ((parCat.eq.3).and.(parNum.eq.0).and.(typSurf.eq.1)) then !SP 176 167 isec1(6)=134 ! indicatorOfParameter 177 elseif ((parCat.eq.2).and.(parNum.eq.32)) then ! W, actually eta dot !168 elseif ((parCat.eq.2).and.(parNum.eq.32)) then ! W, actually eta dot 178 169 isec1(6)=135 ! indicatorOfParameter 179 elseif ((parCat.eq.128).and.(parNum.eq.77)) then ! W, actually eta dot !added by mc to make it consisitent with new readwind.f90180 isec1(6)=135 ! indicatorOfParameter !added by mc to make it consisitent with new readwind.f90181 170 elseif ((parCat.eq.3).and.(parNum.eq.0).and.(typSurf.eq.101)) then !SLP 182 171 isec1(6)=151 ! indicatorOfParameter … … 191 180 elseif ((parCat.eq.1).and.(parNum.eq.11).and.(typSurf.eq.1)) then ! SD 192 181 isec1(6)=141 ! indicatorOfParameter 193 conversion_factor=1000. !added by mc to make it consisitent with new readwind.f90 194 elseif ((parCat.eq.6).and.(parNum.eq.1) .or. parId .eq. 164) then ! CC !added by mc to make it consisitent with new readwind.f90 182 elseif ((parCat.eq.6).and.(parNum.eq.1)) then ! CC 195 183 isec1(6)=164 ! indicatorOfParameter 196 elseif ((parCat.eq.1).and.(parNum.eq.9) .or. parId .eq. 142) then ! LSP !added by mc to make it consisitent with new readwind.f90184 elseif ((parCat.eq.1).and.(parNum.eq.9)) then ! LSP 197 185 isec1(6)=142 ! indicatorOfParameter 198 186 elseif ((parCat.eq.1).and.(parNum.eq.10)) then ! CP 199 187 isec1(6)=143 ! indicatorOfParameter 200 conversion_factor=1000. !added by mc to make it consisitent with new readwind.f90201 188 elseif ((parCat.eq.0).and.(parNum.eq.11).and.(typSurf.eq.1)) then ! SHF 202 189 isec1(6)=146 ! indicatorOfParameter 203 190 elseif ((parCat.eq.4).and.(parNum.eq.9).and.(typSurf.eq.1)) then ! SR 204 191 isec1(6)=176 ! indicatorOfParameter 205 elseif ((parCat.eq.2).and.(parNum.eq.17) .or. parId .eq. 180) then ! EWSS !added by mc to make it consisitent with new readwind.f90192 elseif ((parCat.eq.2).and.(parNum.eq.17)) then ! EWSS 206 193 isec1(6)=180 ! indicatorOfParameter 207 elseif ((parCat.eq.2).and.(parNum.eq.18) .or. parId .eq. 181) then ! NSSS !added by mc to make it consisitent with new readwind.f90194 elseif ((parCat.eq.2).and.(parNum.eq.18)) then ! NSSS 208 195 isec1(6)=181 ! indicatorOfParameter 209 196 elseif ((parCat.eq.3).and.(parNum.eq.4)) then ! ORO 210 197 isec1(6)=129 ! indicatorOfParameter 211 elseif ((parCat.eq.3).and.(parNum.eq.7) .or. parId .eq. 160) then ! SDO !added by mc to make it consisitent with new readwind.f90198 elseif ((parCat.eq.3).and.(parNum.eq.7)) then ! SDO 212 199 isec1(6)=160 ! indicatorOfParameter 213 200 elseif ((discipl.eq.2).and.(parCat.eq.0).and.(parNum.eq.0).and. & … … 215 202 isec1(6)=172 ! indicatorOfParameter 216 203 else 217 print*,'*** WARNING: undefined GRiB2 message found!',discipl, &204 print*,'***ERROR: undefined GRiB2 message found!',discipl, & 218 205 parCat,parNum,typSurf 219 endif220 if(parId .ne. isec1(6) .and. parId .ne. 77) then !added by mc to make it consisitent with new readwind.f90221 write(*,*) 'parId',parId, 'isec1(6)',isec1(6) !222 ! stop223 206 endif 224 207 … … 244 227 ! CHECK GRID SPECIFICATIONS 245 228 if(isec2(2).ne.nxn(l)) stop & 246 'READWIND: NX NOT CONSISTENT FOR A NESTING LEVEL'229 'READWIND: NX NOT CONSISTENT FOR A NESTING LEVEL' 247 230 if(isec2(3).ne.nyn(l)) stop & 248 'READWIND: NY NOT CONSISTENT FOR A NESTING LEVEL'231 'READWIND: NY NOT CONSISTENT FOR A NESTING LEVEL' 249 232 if(isec2(12)/2-1.ne.nlev_ec) stop 'READWIND: VERTICAL DISCRET& 250 IZATION NOT CONSISTENT FOR A NESTING LEVEL'233 &IZATION NOT CONSISTENT FOR A NESTING LEVEL' 251 234 endif ! ifield 252 235 253 236 !HSO get the second part of the grid dimensions only from GRiB1 messages 254 if (isec1(6) .eq. 167 .and. (gotGrid.eq.0)) then ! !added by mc to make it consisitent with new readwind.f90237 if ((gribVer.eq.1).and.(gotGrid.eq.0)) then 255 238 call grib_get_real8(igrib,'longitudeOfFirstGridPointInDegrees', & 256 239 xauxin,iret) … … 259 242 yauxin,iret) 260 243 call grib_check(iret,gribFunction,gribErrorMsg) 261 if (xauxin.gt.180.) xauxin=xauxin-360.0262 if (xauxin.lt.-180.) xauxin=xauxin+360.0263 264 244 xaux=xauxin 265 245 yaux=yauxin 266 if (abs(xaux-xlon0n(l)).gt.eps) & 267 stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT FOR A NESTING LEVEL' 268 if (abs(yaux-ylat0n(l)).gt.eps) & 269 stop 'READWIND: LOWER LEFT LATITUDE NOT CONSISTENT FOR A NESTING LEVEL' 246 xaux0=xlon0n(l) 247 yaux0=ylat0n(l) 248 if(xaux.lt.0.) xaux=xaux+360. 249 if(yaux.lt.0.) yaux=yaux+360. 250 if(xaux0.lt.0.) xaux0=xaux0+360. 251 if(yaux0.lt.0.) yaux0=yaux0+360. 252 if(xaux.ne.xaux0) & 253 stop 'READWIND: LOWER LEFT LONGITUDE NOT CONSISTENT FOR A NES& 254 &TING LEVEL' 255 if(yaux.ne.yaux0) & 256 stop 'READWIND: LOWER LEFT LATITUDE NOT CONSISTENT FOR A NEST& 257 &ING LEVEL' 270 258 gotGrid=1 271 259 endif … … 292 280 zsec4(nxn(l)*(nyn(l)-j-1)+i+1) 293 281 if(isec1(6).eq.141) sdn(i,j,1,n,l)= &!! SNOW DEPTH 294 zsec4(nxn(l)*(nyn(l)-j-1)+i+1) /conversion_factor !added by mc to make it consisitent with new readwind.f90!282 zsec4(nxn(l)*(nyn(l)-j-1)+i+1) 295 283 if(isec1(6).eq.151) msln(i,j,1,n,l)= &!! SEA LEVEL PRESS. 296 284 zsec4(nxn(l)*(nyn(l)-j-1)+i+1) … … 310 298 endif 311 299 if(isec1(6).eq.143) then !! CONVECTIVE PREC. 312 convprecn(i,j,1,n,l)=zsec4(nxn(l)*(nyn(l)-j-1)+i+1) /conversion_factor !added by mc to make it consisitent with new readwind.f90300 convprecn(i,j,1,n,l)=zsec4(nxn(l)*(nyn(l)-j-1)+i+1) 313 301 if (convprecn(i,j,1,n,l).lt.0.) convprecn(i,j,1,n,l)=0. 314 302 endif
Note: See TracChangeset
for help on using the changeset viewer.