Page 1 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 1 program BUFR_TRANMLS 2 3 !$$$ MAIN PROGRAM DOCUMENTATION BLOCK 4 ! 5 ! MAIN PROGRAM: BUFR_TRANMLS 6 ! PRGMMR: KEYSER ORG: NP22 DATE: 2012-12-07 7 ! 8 ! Abstract: Reads in Aura MLS ozone mixing ratio data from a raw HDF5 format 9 ! file (ML2O3) and reformats them into BUFR in preparation for their ingest 10 ! into the BUFR data base on the NCEP supercompers. 11 ! 12 ! Program history log: 13 ! 2010-06-16 Haixia Liu - Modify the tranomi.f90 for MLS data set. 14 ! 2011-11-02 Greg Krasowski - Final modifications incorporated. 15 ! 2012-12-03 Haixia Liu - Read in the nATscans and nLevels from the HDF5 16 ! data file rather than hardwire to 3494 and 37, 17 ! resp. (will prevent bogus scans between actual # 18 ! and 3494 from being processed and later rejected 19 ! n tranjb; MLS Version 2 has 37 levels, Version 3 20 ! in 2013 has 55 levels). 21 ! 2012-12-03 Dennis Keyser - Updated to use delayed replication to write out 22 ! BUFR levels (allows smooth transition from v2 23 ! with 37 levels to v3 with 55 levels). 24 ! 2012-12-07 Dennis Keyser - Changes to run on WCOSS (minor). 25 ! 26 ! Usage: 27 ! 28 ! Input files: 29 ! command line argument 30 ! - HDF5 binary file containing raw MLS ML2O3 ozone mixing 31 ! ratio data 32 ! unit 31 - NCEP BUFR mnemonic table 33 ! 34 ! Output files: 35 ! unit 06 - printout 36 ! unit 51 - NCEP BUFR file containing MLS data 37 ! unit 52 - diagnostic (ASCII) output file (currently not written to) 38 ! 39 ! Subprograms called: 40 ! Unique: - O3MR_DATASETS GRANULE_CALENDAR_DATE CHECK_ERROR 41 ! Library: 42 ! W3NCO - W3TAGB W3FI01 ERREXIT W3MOVDAT GBYTE 43 ! BUFRLIB - DATELEN OPENBF OPENMB UFBINT WRITSB 44 ! CLOSBF UPFTBV 45 ! HDF5LIB - H5OPEN_F H5FOPEN_F H5GOPEN_F H5AOPEN_NAME_F H5AREAD_F 46 ! H5ACLOSE_F H5DOPEN_F H5DREAD_F H5DCLOSE_F H5GCLOSE_F 47 ! H5FCLOSE_F H5CLOSE_F H5DGET_SPACE_F 48 ! H5SGET_SIMPLE_EXTENT_NDIMS_F H5SGET_SIMPLE_EXTENT_DIMS_F 49 ! SYSTEM - GET_COMMAND_ARGUMENT 50 ! 51 ! 52 ! Exit states 53 ! 0 = no errors detected 54 ! >0 = some type of error detected 55 ! 1 = Cannot open HDF5 interface 56 ! 2 = Cannot open HDF5 file 57 ! 3 = Cannot open a groupname Page 2 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 58 ! 4 = Cannot open an attribute (e.g., GranuleDay, GranuleMonth, 59 ! GranuleYear) 60 ! 5 = Cannot read attribute-based variable ((e.g., GranuleDay, 61 ! GranuleMonth, GranuleYear) 62 ! 6 = Invalid number of scan lines or levels in file 63 ! 7 = Cannot close a groupname 64 ! 8 = Error returned from an HDF5 interface routine 65 ! 9 = Error returned from H5SGET_SIMPLE_EXTENT_NDIMS_F 66 ! 10 = Error returned from H5SGET_SIMPLE_EXTENT_DIMS_F 67 ! 68 ! Remarks: 69 ! Note that input file is specified from command line argument. 70 ! 71 ! Code proceeds as follows: 72 ! 73 ! 1) Open the file. 74 ! 2) Read the calendar date (UTC). 75 ! 3) Read the number of scans and number of levels. 76 ! 4) Allocate the variables, based on number of scans. 77 ! 5) Read the datasets, one at a time. 78 ! 6) Enocde dataset into BUFR. 79 ! 7) Close interfaces and deallocate variables. 80 ! 81 ! 82 ! 83 ! Attributes: 84 ! Language: FORTRAN 90 (free format) 85 ! Machine: NCEP WCOSS 86 ! 87 !$$$ 88 89 use o3mr_datasets 90 91 ! 92 ! ***MUST DEFINE ALL VARIABLES*** 93 implicit none 94 95 ! Set parameters and declare variables 96 ! ------------------------------------ 97 integer :: nLevels ! MLS vertical pressure levels 98 99 real :: rinc(5) 100 real(8) :: obs_8(13),bmiss 101 real(8), allocatable, dimension(:,:) :: o3mrp_8 102 real :: max,min 103 real(8) :: max_8,min_8 104 105 real(kind=4), allocatable, dimension(:,:) :: press2 106 real(kind=4), allocatable, dimension(:) :: bnry 107 108 integer :: imin,jmin,imax,jmax 109 integer :: error ! Error flag returned by HDF5 interface calls 110 integer :: fid ! File ID number 111 integer :: gid ! Group ID number 112 integer :: space_id ! Dataspace identifier 113 integer :: ndims ! Number of dimensions 114 integer :: attr_id ! Attribute ID Page 3 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 115 integer :: nLev ! Index pointing to limb-Sounder measurement (sounder 116 ! position, 1 to nLevels) 117 integer :: nscan ! Index pointing to scan (1 to nATscans) 118 integer :: lunbfr, lunprt, lundx, iwrite, iskip, iread, iret 119 integer :: idat(8), jdat(8), ibit(18), ii, nib 120 integer :: idate, iunpk, toqc, toqf, nbytw, nbitw, stko 121 integer(hsize_t), dimension(1) :: data_dims ! Required for call to read 122 ! attribute 123 integer(hsize_t), dimension(2) :: swath_dims ! Required for call to read 124 ! dataset 125 integer(hsize_t), dimension(1) :: temp_dims ! Required for call to read 126 ! dataset 127 integer(hsize_t), allocatable, dimension(:) :: dims ! Array to store 128 ! dimension sizes 129 integer(hsize_t), allocatable, dimension(:) :: maxdims ! Array to store max 130 ! dimension sizes 131 integer(kind=4) :: granuleyear,granulemonth,granuleday 132 133 integer :: decimal,binary(18),intbf 134 135 character(LEN=256) :: o3mr_name ! Input filename, read from command line 136 ! argument 137 character(LEN=256) :: o3mr_output 138 character(LEN=8) :: subset 139 character(LEN=*), parameter :: o3mr_swath=& 140 "/HDFEOS/SWATHS/O3" 141 142 data lunbfr/51/, lunprt/52/, lundx/31/, bmiss/10e10/, iread/0/, iskip/0/, & 143 iwrite/0/ 144 145 !============================================================================= 146 !============================================================================= 147 148 call W3TAGB('BUFR_TRANMLS',2012,0342,0068,'NP22') 149 150 print * 151 print *, 'Welcome to BUFR_TRANMLS - Version 12-07-2012' 152 print * 153 154 155 ! Get machine word length (nbytw) and specify number of bits per word (nbitw) 156 ! --------------------------------------------------------------------------- 157 call W3FI01(nbytw) 158 nbitw = 8*nbytw 159 160 161 o3mr_output='mls_output' 162 163 164 ! Command line argument is input filename 165 ! --------------------------------------- 166 call GET_COMMAND_ARGUMENT(1,o3mr_name) 167 168 169 ! Initialize HDF5 interface 170 ! ------------------------- 171 call H5OPEN_F(error) Page 4 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 172 if(error.ne.0) then 173 write(*,*) "##### Cannot open HDF5 interface, error = ",error 174 call W3TAGE('BUFR_TRANMLS') 175 call ERREXIT(1) 176 endif 177 178 179 ! Open HDF5 file 180 ! -------------- 181 call H5FOPEN_F( o3mr_name, H5F_ACC_RDONLY_F, fid, error) 182 if(error.ne.0) then 183 write(*,*) "##### PROBLEM: Cannot open HDF5 file ", trim(o3mr_name), & 184 ", error = ", error 185 call W3TAGE('BUFR_TRANMLS') 186 call ERREXIT(2) 187 endif 188 189 190 ! Get file (granule) start date (UTC) (YYYYMMDD) 191 ! ---------------------------------------------- 192 call GRANULE_CALENDAR_DATE(granuleyear,granulemonth,granuleday) 193 194 print * 195 write(*,'("File (granule) start Date (UTC): ", I04,I0.2,I0.2)') & 196 granuleyear,granulemonth,granuleday 197 print * 198 199 200 ! Open groupname "/HDFEOS/SWATHS/O3" 201 ! ---------------------------------- 202 call H5GOPEN_F(fid,trim(o3mr_swath), gid, error) 203 if(error.ne.0) then 204 write(*,*) "##### Cannot open groupname ", trim(o3mr_swath), & 205 ", error = ",error 206 call W3TAGE('BUFR_TRANMLS') 207 call ERREXIT(3) 208 endif 209 210 ! Extract number of scan lines in file and set to "nATscans" 211 ! ---------------------------------------------------------- 212 call H5DOPEN_F(gid, "Data Fields/"//ds_o3mr%name , ds_o3mr%dataset_id, error) 213 call CHECK_ERROR(error) 214 call H5DGET_SPACE_F(ds_o3mr%dataset_id, space_id, error) 215 call CHECK_ERROR(error) 216 call H5SGET_SIMPLE_EXTENT_NDIMS_F(space_id, ndims, error) 217 if(error.lt.0) then 218 write(*,*) "error encountered at H5SGET_SIMPLE_EXTENT_NDIMS_F" 219 call W3TAGE('BUFR_TRANMLS') 220 call ERREXIT(9) 221 end if 222 allocate(dims(ndims)) 223 allocate(maxdims(ndims)) 224 call H5SGET_SIMPLE_EXTENT_DIMS_F(space_id, dims, maxdims, error) 225 if(error.lt.0) then 226 write(*,*) "error encountered at H5SGET_SIMPLE_EXTENT_DIMS_F" 227 call W3TAGE('BUFR_TRANMLS') 228 call ERREXIT(10) Page 5 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 229 end if 230 231 nATscans=dims(2) 232 nLevels=dims(1) 233 if(nATscans.le.0 .or. nLevels.le.0 .or. nLevels.gt.255) then 234 write(*,*) "##### Invalid number of scan lines or levels in file (=", & 235 nATscans,nLevels,")" 236 call W3TAGE('BUFR_TRANMLS') 237 call ERREXIT(6) 238 endif 239 240 print * 241 write(*,*) "Number of pressure level measurements = ",nLevels 242 write(*,*) "Number of scan lines = ",nATscans 243 print * 244 245 ! Allocate fields that will next be read 246 ! -------------------------------------- 247 allocate(o3mr(nLevels,nATscans)) 248 allocate(precisn(nLevels,nATscans)) 249 allocate(qualt(nATscans)) 250 allocate(lat(nATscans)) 251 allocate(lon(nATscans)) 252 allocate(sza(nATscans)) 253 allocate(time(nATscans)) 254 allocate(press(nLevels)) 255 allocate(press2(nLevels,nATscans)) 256 allocate(stat(nATscans)) 257 allocate(bnry(nATscans)) 258 allocate(conv(nATscans)) 259 260 swath_dims=(/nLevels, nATscans /) 261 262 263 ! Extract ozone mixing ratio values (in "Data Fields" swath) & set to "o3mr" 264 ! -------------------------------------------------------------------------- 265 call H5DOPEN_F(gid, "Data Fields/"//ds_o3mr%name , ds_o3mr%dataset_id, error) 266 call CHECK_ERROR(error) 267 call H5DREAD_F(ds_o3mr%dataset_id ,H5T_NATIVE_REAL , o3mr, swath_dims, error) 268 call CHECK_ERROR(error) 269 call H5DCLOSE_F(ds_o3mr%dataset_id, error) 270 call CHECK_ERROR(error) 271 272 min=1.0e06 273 max=-1.0e-06 274 do nscan=1,nATscans 275 do nLev=1,nLevels 276 o3mr(nLev,nscan)=o3mr(nLev,nscan)*1.0e+06 ! convert to ppmv 277 if(o3mr(nLev,nscan) > max ) then 278 max=o3mr(nLev,nscan) 279 imax=nLev;jmax=nscan 280 end if 281 if(o3mr(nLev,nscan) < min ) then 282 min=o3mr(nLev,nscan) 283 imin=nLev;jmin=nscan 284 end if 285 end do Page 6 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 286 end do 287 print*, 'the minimum value of o3mr is:', min, ' at level/scan ', imin,jmin 288 print*, 'the maximum value of o3mr is:', max, ' at level/scan ', imax,jmax 289 290 291 ! Extract radiative cloud fraction (in "Data Fields" swath) & set to "precisn" 292 ! --------------------------------------------------------------------------- 293 call H5DOPEN_F(gid, "Data Fields/"//ds_precisn%name , ds_precisn%dataset_id, & 294 error) 295 call CHECK_ERROR(error) 296 call H5DREAD_F(ds_precisn%dataset_id ,H5T_NATIVE_REAL , precisn, swath_dims, & 297 error) 298 call CHECK_ERROR(error) 299 call H5DCLOSE_F(ds_precisn%dataset_id, error) 300 call CHECK_ERROR(error) 301 302 min=1.0e06 303 max=-1.0e-06 304 do nscan=1,nATscans 305 do nLev=1,nLevels 306 precisn(nLev,nscan)=precisn(nLev,nscan)*1.0e+06 ! convert to ppmv 307 if(precisn(nLev,nscan) > max ) then 308 max=precisn(nLev,nscan) 309 imax=nLev;jmax=nscan 310 end if 311 if(precisn(nLev,nscan) < min ) then 312 min=precisn(nLev,nscan) 313 imin=nLev;jmin=nscan 314 end if 315 end do 316 end do 317 print*, 'the minimum value of precisn is:', min, ' at level/scan ', imin,jmin 318 print*, 'the maximum value of precisn is:', max, ' at level/scan ', imax,jmax 319 320 temp_dims=(/nAtscans/) 321 322 323 ! Extract quality (in "Data Fields" swath) and set to "qualt" 324 ! ------------------------------------------------------------------ 325 call H5DOPEN_F(gid, "Data Fields/"//ds_qualt%name , ds_qualt%dataset_id, & 326 error) 327 call CHECK_ERROR(error) 328 call H5DREAD_F(ds_qualt%dataset_id ,H5T_NATIVE_REAL , qualt, temp_dims, & 329 error) 330 call CHECK_ERROR(error) 331 call H5DCLOSE_F(ds_qualt%dataset_id, error) 332 call CHECK_ERROR(error) 333 334 min=1.0e06 335 max=-1.0e-06 336 do nscan=1,nATscans 337 qualt(nscan)=qualt(nscan)*10.0 338 if(qualt(nscan) > max ) then 339 max=qualt(nscan) 340 jmax=nscan 341 end if 342 if(qualt(nscan) < min ) then Page 7 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 343 min=qualt(nscan) 344 jmin=nscan 345 end if 346 end do 347 print*, 'the minimum value of qualt is:', min, ' at scan ', jmin 348 print*, 'the maximum value of qualt is:', max, ' at scan ', jmax 349 350 351 ! Extract status (in "Data Fields" swath) and set to "stat" 352 ! ------------------------------------------------------------------ 353 call H5DOPEN_F(gid, "Data Fields/"//ds_stat%name , ds_stat%dataset_id, & 354 error) 355 call CHECK_ERROR(error) 356 call H5DREAD_F(ds_stat%dataset_id ,H5T_NATIVE_REAL , stat, temp_dims, & 357 error) 358 call CHECK_ERROR(error) 359 call H5DCLOSE_F(ds_stat%dataset_id, error) 360 call CHECK_ERROR(error) 361 362 min=1.0e06 363 max=-1.0e-06 364 do nscan=1,nATscans 365 if(stat(nscan) > max ) then 366 max=stat(nscan) 367 jmax=nscan 368 end if 369 if(stat(nscan) < min ) then 370 min=stat(nscan) 371 jmin=nscan 372 end if 373 end do 374 print*, 'the minimum value of stat is:', min, ' at scan ', jmin 375 print*, 'the maximum value of stat is:', max, ' at scan ', jmax 376 377 ! ------------------------------------------------------------------ 378 ! convert decimal to binary for the parameter status 379 do nscan=1,nATscans 380 decimal=stat(nscan) 381 call dec2bin(decimal,binary) 382 call bin2int(binary,intbf) 383 ! print*, 'decimal, binary= ', stat(nscan),'-----', binary,'-----',intbf 384 bnry(nscan)=intbf 385 end do 386 if(1==0) then 387 print*,'--------------------------------------------------------' 388 call dec2bin(1,binary) 389 call bin2int(binary,intbf) 390 print*, 'decimal, binary= ', 1,'-----', binary,'-----',intbf 391 call dec2bin(2,binary) 392 call bin2int(binary,intbf) 393 print*, 'decimal, binary= ', 2,'-----', binary,'-----',intbf 394 call dec2bin(3,binary) 395 call bin2int(binary,intbf) 396 print*, 'decimal, binary= ', 3,'-----', binary,'-----',intbf 397 call dec2bin(5,binary) 398 call bin2int(binary,intbf) 399 print*, 'decimal, binary= ', 5,'-----', binary,'-----',intbf Page 8 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 400 print*,'--------------------------------------------------------' 401 end if 402 403 ! ------------------------------------------------------------------ 404 405 ! Extract convergence (in "Data Fields" swath) and set to "conv" 406 ! ------------------------------------------------------------------ 407 call H5DOPEN_F(gid, "Data Fields/"//ds_conv%name , ds_conv%dataset_id, & 408 error) 409 call CHECK_ERROR(error) 410 call H5DREAD_F(ds_conv%dataset_id ,H5T_NATIVE_REAL , conv, temp_dims, & 411 error) 412 call CHECK_ERROR(error) 413 call H5DCLOSE_F(ds_conv%dataset_id, error) 414 call CHECK_ERROR(error) 415 416 ! print*,conv(1),conv(1000),conv(2000),conv(3000),conv(nATscans) 417 418 min=1.0e06 419 max=-1.0e-06 420 do nscan=1,nATscans 421 if(conv(nscan) > max ) then 422 max=conv(nscan) 423 jmax=nscan 424 end if 425 if(conv(nscan) < min ) then 426 min=conv(nscan) 427 jmin=nscan 428 end if 429 end do 430 print*, 'the minimum value of conv is:', min, ' at scan ', jmin 431 print*, 'the maximum value of conv is:', max, ' at scan ', jmax 432 433 ! Extract latitude (in "Geolocation Fields" swath) and set to "lat" 434 ! ----------------------------------------------------------------- 435 call H5DOPEN_F(gid, "Geolocation Fields/"//ds_lat%name , ds_lat%dataset_id, & 436 error) 437 call CHECK_ERROR(error) 438 call H5DREAD_F(ds_lat%dataset_id ,H5T_NATIVE_REAL , lat, temp_dims, error) 439 call CHECK_ERROR(error) 440 call H5DCLOSE_F(ds_lat%dataset_id, error) 441 call CHECK_ERROR(error) 442 443 min=1.0e06 444 max=-1.0e-06 445 do nscan=1,nATscans 446 if(lat(nscan) > max ) then 447 max=lat(nscan) 448 jmax=nscan 449 end if 450 if(lat(nscan) < min ) then 451 min=lat(nscan) 452 jmin=nscan 453 end if 454 end do 455 print*, 'the minimum value of lat is:', min, ' at scan ', jmin 456 print*, 'the maximum value of lat is:', max, ' at scan ', jmax Page 9 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 457 458 459 ! Extract longitude (in "Geolocation Fields" swath) and set to "lon" 460 ! ------------------------------------------------------------------ 461 call H5DOPEN_F(gid, "Geolocation Fields/"//ds_lon%name , ds_lon%dataset_id, & 462 error) 463 call CHECK_ERROR(error) 464 call H5DREAD_F(ds_lon%dataset_id ,H5T_NATIVE_REAL , lon, temp_dims, error) 465 call CHECK_ERROR(error) 466 call H5DCLOSE_F(ds_lon%dataset_id, error) 467 call CHECK_ERROR(error) 468 469 min=1.0e06 470 max=-1.0e-06 471 do nscan=1,nATscans 472 if(lon(nscan) > max ) then 473 max=lon(nscan) 474 jmax=nscan 475 end if 476 if(lon(nscan) < min ) then 477 min=lon(nscan) 478 jmin=nscan 479 end if 480 end do 481 print*, 'the minimum value of lon is:', min, ' at scan ', jmin 482 print*, 'the maximum value of lon is:', max, ' at scan ', jmax 483 484 485 ! Extract solar zenith angle (in "Geolocation Fields" swath) and set to "sza" 486 ! --------------------------------------------------------------------------- 487 call H5DOPEN_F(gid, "Geolocation Fields/"//ds_sza%name , ds_sza%dataset_id, & 488 error) 489 call CHECK_ERROR(error) 490 call H5DREAD_F(ds_sza%dataset_id ,H5T_NATIVE_REAL , sza, temp_dims, error) 491 call CHECK_ERROR(error) 492 call H5DCLOSE_F(ds_sza%dataset_id, error) 493 call CHECK_ERROR(error) 494 495 min=1.0e06 496 max=-1.0e-06 497 do nscan=1,nATscans 498 sza(nscan)=sza(nscan)-90.0 ! range (-90, 90) 499 if(sza(nscan) > max ) then 500 max=sza(nscan) 501 jmax=nscan 502 end if 503 if(sza(nscan) < min ) then 504 min=sza(nscan) 505 jmin=nscan 506 end if 507 end do 508 print*, 'the minimum value of sza is:', min, ' at scan ', jmin 509 print*, 'the maximum value of sza is:', max, ' at scan ', jmax 510 511 512 ! Extract local solar time (in "Geolocation Fields" swath) and set to "time" 513 ! ----------------------------------------------------------------------------- Page 10 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 514 call H5DOPEN_F(gid,"Geolocation Fields/"//ds_time%name , ds_time%dataset_id, & 515 error) 516 call CHECK_ERROR(error) 517 call H5DREAD_F(ds_time%dataset_id ,H5T_NATIVE_DOUBLE , time, temp_dims, error) 518 call CHECK_ERROR(error) 519 call H5DCLOSE_F(ds_time%dataset_id, error) 520 call CHECK_ERROR(error) 521 522 print('(1X,"Time at scan 1",4(1X,I0),": ",5F12.0)'), (nATscans/4)*1, & 523 (nATscans/4)*2,(nATscans/4)*3,nATscans,time(1),time((nATscans/4)*1), & 524 time((nATscans/4)*2),time((nATscans/4)*3),time(nATscans) 525 526 min_8=1.0e09 527 max_8=-1.0e-09 528 do nscan=1,nATscans 529 if(time(nscan) > max_8 ) then 530 max_8=time(nscan) 531 jmax=nscan 532 end if 533 if(time(nscan) < min_8 ) then 534 min_8=time(nscan) 535 jmin=nscan 536 end if 537 end do 538 print('(" the minimum value of time is:",F12.0," at scan ",I0)'), min_8,jmin 539 print('(" the maximum value of time is:",F12.0," at scan ",I0)'), max_8,jmax 540 541 ! Extract pressure level (in "Geolocation Fields" swath) and set to "press" 542 ! ----------------------------------------------------------------------------- 543 call H5DOPEN_F(gid,"Geolocation Fields/"//ds_press%name,ds_press%dataset_id, & 544 error) 545 call CHECK_ERROR(error) 546 call H5DREAD_F(ds_press%dataset_id ,H5T_NATIVE_REAL , press, swath_dims,error) 547 call CHECK_ERROR(error) 548 call H5DCLOSE_F(ds_press%dataset_id, error) 549 call CHECK_ERROR(error) 550 551 min=1.0e06 552 max=-1.0e-06 553 do nLev=1,nLevels 554 do nscan=1,nATscans 555 press2(nLev,nscan)=press(nLev)*100.0 !mb to Pascal 556 ! print*, 'press(',nLev,')=',press(nLev) 557 ! print*, 'press2(',nLev,',',nscan,')=',press2(nLev,nscan) 558 end do 559 if(press(nLev) > max ) then 560 max=press(nLev)*100.0 561 jmax=nLev 562 end if 563 if(press(nLev) < min ) then 564 min=press(nLev)*100.0 565 jmin=nLev 566 end if 567 end do 568 print*, 'the minimum value of press is:', min, ' at level ', jmin 569 print*, 'the maximum value of press is:', max, ' at level ', jmax 570 Page 11 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 571 572 subset = 'NC008015' ! Message type for MLS is "NC008015" 573 574 575 call DATELEN(10) 576 577 578 ! Open output BUFR file 579 ! --------------------- 580 !!!!! call OPENBF(lunbfr,'OUT',lundx) 581 call OPENBF(lunbfr,'NODX',lundx) 582 583 ! Allocate fields that will next hold bufr data 584 ! --------------------------------------------- 585 allocate(o3mrp_8(3,nLevels)) 586 587 ! Open output diagnostic print file 588 ! --------------------------------- 589 open(lunprt,file=o3mr_output,form='formatted') 590 591 592 ! Loop through the scans in the file 593 ! ---------------------------------- 594 do nscan=1,nATscans 595 596 write(lunprt,*) " ---> At scan ",nscan 597 !!! write(*,*) "==> At scan ",nscan 598 599 write(lunprt,*) "pressure values on ", nLevels, " levels:" 600 write(lunprt,*) press2(:,nscan) 601 602 write(lunprt,*) "ozone mixing ratio values on ", nLevels, " levels:" 603 write(lunprt,*) o3mr(:,nscan) 604 605 write(lunprt,*) "precision on ", nLevels, " levels:" 606 write(lunprt,*) precisn(:,nscan) 607 iread = iread + 1 608 609 ! if(time(nscan).lt.0. .or. time(nscan).gt.24.) then 610 ! write(*,*) "##### Invalid date at scan ", & 611 ! nscan,", number of hours in LocalSolarTime = ",time(nscan), & 612 ! " -- skip!!" 613 ! iskip = iskip + 1 614 ! cycle 615 ! endif 616 if(lat(nscan).lt.-90. .or. lat(nscan) .gt.90.) then 617 write(*,*) "##### Invalid latitude at scan ", & 618 nscan,", latitude = ",lat(nscan)," -- skip!!" 619 iskip = iskip + 1 620 cycle 621 endif 622 if(lon(nscan).lt.-180. .or. lon(nscan).gt.180.) then 623 write(*,*) "#### Invalid longitude at scan ", & 624 nscan,", longitude = ",lon(nscan)," -- skip!!" 625 iskip = iskip + 1 626 cycle 627 endif Page 12 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 628 629 rinc=0.0 630 rinc(4)=time(nscan) 631 632 idat=0 633 idat(1)=granuleyear 634 idat(2)=granulemonth 635 idat(3)=granuleday 636 idat(1)=1993 637 idat(2)=01 638 idat(3)=01 639 640 call W3MOVDAT(rinc,idat,jdat) 641 642 idate = jdat(1)*1000000 + jdat(2)*10000 + jdat(3)*100 + jdat(5) 643 644 ! print*, "idate= ", idate, "year month day: ", idat(1),idat(2),idat(3) 645 646 write(lunprt,*) " time of scan (HH : MM : SS)=",jdat(5), & 647 ":",jdat(6),":",jdat(7) 648 649 ! print*, 'seconds from TAI93: ', time(nscan) 650 ! print*, 'jdate= ',jdat 651 ! print*, " time of scan (HH : MM : SS)=",jdat(5), & 652 ! ":",jdat(6),":",jdat(7) 653 654 655 ! Open a new output BUFR message (first time in, or if idate is different than 656 ! for previous output message 657 ! ---------------------------------------------------------------------------- 658 call OPENMB(lunbfr,subset,idate) 659 660 ! stop 661 662 663 ! TRANSLATE THE MLS REPORT TO BUFR FORMAT 664 ! --------------------------------------------------------------------- 665 ! NC008015 | SAID CLAT CLON SOZA YEAR MNTH 666 ! NC008015 | DAYS HOUR MINU SECO PCCF CONV MLST 667 ! NC008015 | {OZOMXPSQ} 668 ! | 669 ! OZOMXPSQ | PRLC OZMX OZMP 670 ! --------------------------------------------------------------------- 671 672 obs_8 = bmiss 673 674 obs_8(1) = 785 ! satellite id (Aura = 785) 675 obs_8(2) = lat(nscan) ! latitude (N+, S-) 676 obs_8(3) = lon(nscan) ! longitude (-180 to +180, W-, E+) 677 obs_8(4) = sza(nscan) ! solar zenith angle 678 obs_8(5) = jdat(1) ! year 679 obs_8(6) = jdat(2) ! month 680 obs_8(7) = jdat(3) ! day 681 obs_8(8) = jdat(5) ! hour 682 obs_8(9) = jdat(6) ! minute 683 obs_8(10) = jdat(7) ! second 684 obs_8(11) = qualt(nscan) ! Quality*10 Page 13 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 685 obs_8(12) = conv(nscan) ! convergence 686 687 !!! BE CAREFUL - NEED TO REDEFINE stat(nscan) as bnry(nscan) TO COMPLY WITH 688 !!! BUFR FLAG TABLE DEFINITION (BUFR BITS ARE DEFINED FROM 1,2,3,...,18 689 !!! WHERE AS HDF BITS ARE DEFINED FROM 18,17,16,....,0) 690 obs_8(13) = bnry(nscan) ! status 691 692 if(nscan.eq.1 .or. nscan.eq.50) then ! sample scans 1 and 50 693 write(*,*)" ----> At scan ",nscan 694 write(*,'(" satellite id = ",F7.0)') obs_8(1) 695 write(*,'(" latitude = ",F7.2)') obs_8(2) 696 write(*,'(" longitude = ",F7.2)') obs_8(3) 697 write(*,'(" solar zenith angle = ",F7.2)') obs_8(4) 698 ! write(*,'(" UTC seconds in day = ",)',*) time(nscan) 699 write(*,*)" UTC seconds in day = ", time(nscan) 700 write(*,& 701 '(" UTC time of scan = ",I4,3I2.2,2(":",I2.2))') & 702 jdat(1),jdat(2),jdat(3),jdat(5),jdat(6),jdat(7) 703 write(*,'(" quality = ",F7.0)') obs_8(11) 704 write(*,'(" convergence = ",F7.3)') obs_8(12) 705 write(*,'(" ozone status = ",F7.0)') obs_8(13) 706 endif 707 708 ! Loop through the levels in this scan 709 ! ------------------------------------ 710 do nLev=1,nLevels 711 712 o3mrp_8(1,nLev) = press2(nLev,nscan) ! pressure in Pascals 713 o3mrp_8(2,nLev) = o3mr(nLev,nscan) ! ozone mixing ratio on pressure 714 ! level in PPMV 715 o3mrp_8(3,nLev) = precisn(nLev,nscan) ! precision of the data in PPMV 716 717 if(nscan.eq.1 .or. nscan.eq.50) then ! sample scans 1 and 50 718 write(*,*)" ----> On level = ", nLev 719 write(*,*)" pressure level = ", o3mrp_8(1,nLev) 720 write(*,*)" ozone mixing ratio = ", o3mrp_8(2,nLev) 721 write(*,*)" ozone mixing ratio precision = ", o3mrp_8(3,nLev) 722 endif 723 724 enddo 725 726 ! Store obs_8 array into BUFR subset 727 ! ---------------------------------- 728 call UFBINT(lunbfr,obs_8(1),7,1,iret, & 729 'SAID CLAT CLON SOZA YEAR MNTH DAYS') 730 call UFBINT(lunbfr,obs_8(8),6,1,iret, & 731 'HOUR MINU SECO PCCF CONV MLST') 732 call UFBINT(lunbfr,o3mrp_8,3,nLevels,iret,'PRLC OZMX OZMP') 733 734 ! Encode subset into BUFR message 735 ! ------------------------------- 736 call WRITSB(lunbfr) 737 iwrite = iwrite + 1 738 739 enddo 740 741 ! All reports have been processed Page 14 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 742 ! Close output BUFR file & write out any incomplete messages 743 ! ---------------------------------------------------------- 744 745 call CLOSBF(lunbfr) 746 747 748 ! Deallocate allocated arrays 749 ! --------------------------- 750 deallocate(o3mr) 751 deallocate(precisn) 752 deallocate(lat) 753 deallocate(lon) 754 deallocate(sza) 755 deallocate(time) 756 deallocate(qualt) 757 deallocate(press) 758 deallocate(press2) 759 deallocate(stat) 760 deallocate(bnry) 761 deallocate(conv) 762 763 764 close(lunprt) 765 766 767 ! Close the Group 768 ! --------------- 769 call H5GCLOSE_F(gid,error) 770 771 772 ! Close the file 773 ! -------------- 774 call H5FCLOSE_F(fid,error) 775 call CHECK_ERROR(error) 776 777 778 ! Close FORTRAN interface 779 ! ----------------------- 780 call H5CLOSE_F(error) 781 call CHECK_ERROR(error) 782 783 print * 784 print *, 'Number of scans read = ',iread 785 print *, 'Number of scans skipped = ',iskip 786 print *, 'Number of scans written = ',iwrite 787 print * 788 789 call W3TAGE('BUFR_TRANMLS') 790 791 stop 792 793 contains 794 795 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 796 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 797 798 ! Subroutine to get year, month, day at start of file (granule) Page 15 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 799 ! ------------------------------------------------------------- 800 801 subroutine GRANULE_CALENDAR_DATE(year,month,day) 802 803 ! ***MUST DEFINE ALL VARIABLES*** 804 implicit none 805 806 integer, intent(inout) :: year,month,day 807 integer :: fileattrib_gid 808 integer :: date(1) ! Must be array of one, for calling hdf5 attribute 809 ! function 810 character(LEN=*), parameter :: file_attr_swath=& 811 "/HDFEOS/ADDITIONAL/FILE_ATTRIBUTES/" 812 character(LEN=256) :: datename 813 814 815 ! Open groupname "/HDFEOS/ADDITIONAL/FILE_ATTRIBUTES/" 816 ! ---------------------------------------------------- 817 call H5GOPEN_F(fid,file_attr_swath, fileattrib_gid, error) 818 if(error.ne.0) then 819 write(*,*) "##### Cannot open groupname ",file_attr_swath, & 820 ", error = ",error 821 call W3TAGE('BUFR_TRANMLS') 822 call ERREXIT(3) 823 endif 824 825 826 ! Extract file day (day of month at start of the granule) and set to "day" 827 ! ------------------------------------------------------------------------ 828 datename="GranuleDay" 829 call H5AOPEN_NAME_F(fileattrib_gid, trim(datename), attr_id, error) 830 if(error.ne.0) then 831 write(*,*) "##### Cannot open GranuleDay attribute, error = ",error 832 call W3TAGE('BUFR_TRANMLS') 833 call ERREXIT(4) 834 endif 835 call H5AREAD_F(attr_id, H5T_NATIVE_INTEGER, date,data_dims,error) 836 if(error.ne.0) then 837 write(*,*) "##### Cannot read GranuleDay, error = ",error 838 call W3TAGE('BUFR_TRANMLS') 839 call ERREXIT(5) 840 endif 841 call H5ACLOSE_F(attr_id,error) 842 if(error.ne.0) then 843 write(*,*) & 844 "----- Cannot close GranuleDay attribute (non-fatal), error = ",error 845 endif 846 day=date(1) 847 848 849 ! Extract file month (month at start of granule) and set to "month" 850 ! ----------------------------------------------------------------- 851 datename="GranuleMonth" 852 call H5AOPEN_NAME_F(fileattrib_gid, trim(datename), attr_id, error) 853 if(error.ne.0) then 854 write(*,*) "##### Cannot open GranuleMonth attribute, error = ",error 855 call W3TAGE('BUFR_TRANMLS') Page 16 Source Listing GRANULE_CALENDAR_DATE 2013-01-11 18:25 tranmls.f90 856 call ERREXIT(4) 857 endif 858 call H5AREAD_F(attr_id, H5T_NATIVE_INTEGER, date,data_dims,error) 859 if(error.ne.0) then 860 write(*,*) "##### Cannot read GranuleMonth, error = ",error 861 call W3TAGE('BUFR_TRANMLS') 862 call ERREXIT(5) 863 endif 864 call H5ACLOSE_F(attr_id,error) 865 if(error.ne.0) then 866 write(*,*) & 867 "----- Cannot close GranuleMonth attribute (non-fatal), error = ",error 868 endif 869 month=date(1) 870 871 872 ! Extract file year (4-digit year at start of granule) and set to "year" 873 ! ---------------------------------------------------------------------- 874 datename="GranuleYear" 875 call H5AOPEN_NAME_F(fileattrib_gid, trim(datename), attr_id, error) 876 if(error.ne.0) then 877 write(*,*) "##### Cannot open GranuleYear attribute, error = ",error 878 call W3TAGE('BUFR_TRANMLS') 879 call ERREXIT(4) 880 endif 881 call H5AREAD_F(attr_id, H5T_NATIVE_INTEGER, date,data_dims,error) 882 if(error.ne.0) then 883 write(*,*) "##### Cannot read GranuleYear, error = ",error 884 call W3TAGE('BUFR_TRANMLS') 885 call ERREXIT(5) 886 endif 887 call H5ACLOSE_F(attr_id,error) 888 if(error.ne.0) then 889 write(*,*) & 890 "----- Cannot close GranuleYear attribute (non-fatal), error = ",error 891 endif 892 year=date(1) 893 894 895 ! Close the Group 896 ! --------------- 897 call H5GCLOSE_F( fileattrib_gid, error) 898 if(error.ne.0) then 899 write(*,*) "##### Cannot close groupname ", file_attr_swath, & 900 ", error = ",error 901 call W3TAGE('BUFR_TRANMLS') 902 call ERREXIT(7) 903 endif 904 905 !!!!write(*,*) "granule_calendar_date day is ", day, month, year 906 907 end subroutine GRANULE_CALENDAR_DATE Page 17 Source Listing GRANULE_CALENDAR_DATE 2013-01-11 18:25 Entry Points tranmls.f90 ENTRY POINTS Name bufr_tranmls_IP_granule_calendar_date_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References ATTR_ID Local 829 I(4) 4 scalar 829,835,841,852,858,864,875,881,88 7 DATA_DIMS Local 835 I(8) 8 1 1 835,858,881 DATE Local 808 I(4) 4 1 1 835,846,858,869,881,892 DATENAME Local 812 CHAR 256 scalar 828,829,851,852,874,875 DAY Dummy 801 I(4) 4 scalar ARG,INOUT 846 ERREXIT Subr 822 175,186,207,220,228,237,822,833,83 9,856,862,879,885,902,923 ERROR Local 817 I(4) 4 scalar 171,172,173,181,182,184,202,203,20 5,212,213,214,215,216,217,224,225, 265,266,267,268,269,270,294,295,29 7,298,299,300,326,327,329,330,331, 332,354,355,357,358,359,360,408,40 9,411,412,413,414,436,437,438,439, 440,441,462,463,464,465,466,467,48 8,489,490,491,492,493,515,516,517, 518,519,520,544,545,546,547,548,54 9,769,774,775,780,781,817,818,820, 829,830,831,835,836,837,841,842,84 4,852,853,854,858,859,860,864,865, 867,875,876,877,881,882,883,887,88 8,890,897,898,900,921 FID Local 817 I(4) 4 scalar 181,202,774,817 FILEATTRIB_GID Local 807 I(4) 4 scalar 817,829,852,875,897 FILE_ATTR_SWATH Param 810 CHAR 35 scalar 817,819,899 GRANULE_CALENDAR_DATE Subr 801 192 H5ACLOSE_F Subr 841 841,864,887 H5AOPEN_NAME_F Subr 829 829,852,875 H5AREAD_F Local 835 scalar 835,858,881 H5AREAD_INTEGER_1 Subr 835 835,858,881 H5GCLOSE_F Subr 897 769,897 H5GOPEN_F Subr 817 202,817 H5T_NATIVE_INTEGER Scalar 835 I(4) 4 scalar COM 835,858,881 MONTH Dummy 801 I(4) 4 scalar ARG,INOUT 869 TRIM Func 829 scalar 183,202,204,829,852,875 W3TAGE Subr 821 174,185,206,219,227,236,789,821,83 2,838,855,861,878,884,901,922 YEAR Dummy 801 I(4) 4 scalar ARG,INOUT 892 Page 18 Source Listing GRANULE_CALENDAR_DATE 2013-01-11 18:25 tranmls.f90 908 909 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 911 912 ! Generic check_error subroutine 913 ! ------------------------------ 914 915 subroutine CHECK_ERROR(error_code) 916 implicit none 917 integer, intent(in) :: error_code 918 919 if(error_code.ne.0) then 920 write(*,*) & 921 "#### Error returned from an HDF5 interface routine, error = ",error 922 call W3TAGE('BUFR_TRANMLS') 923 call ERREXIT(8) 924 endif 925 926 end subroutine CHECK_ERROR ENTRY POINTS Name bufr_tranmls_IP_check_error_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References CHECK_ERROR Subr 915 213,215,266,268,270,295,298,300,32 7,330,332,355,358,360,409,412,414, 437,439,441,463,465,467,489,491,49 3,516,518,520,545,547,549,775,781 ERROR_CODE Dummy 915 I(4) 4 scalar ARG,IN 919 Page 19 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 927 928 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 929 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 930 931 end program BUFR_TRANMLS ENTRY POINTS Name MAIN__ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References BIN2INT Subr 382 382,389,392,395,398 BINARY Local 133 I(4) 4 1 18 381,382,388,389,390,391,392,393,39 4,395,396,397,398,399 BMISS Local 100 R(8) 8 scalar 142,672 BNRY Local 106 R(4) 4 1 1 ALC 257,384,690,760 BUFR_TRANMLS Prog 1 CLOSBF Subr 745 745 CONV Local 258 R(4) 4 1 1 ALC 258,410,421,422,425,426,685,761 DATASET_ID Local 212 I(4) 4 scalar 212,214,265,267,269,293,296,299,32 5,328,331,353,356,359,407,410,413, 435,438,440,461,464,466,487,490,49 2,514,517,519,543,546,548 DATELEN Subr 575 575 DEC2BIN Subr 381 381,388,391,394,397 DECIMAL Local 133 I(4) 4 scalar 380,381 DIMS Local 127 I(8) 8 1 1 ALC 222,224,231,232 DS_CONV Local 407 DSH5_T 144 scalar 407,410,413 DS_LAT Local 435 DSH5_T 144 scalar 435,438,440 DS_LON Local 461 DSH5_T 144 scalar 461,464,466 DS_O3MR Local 212 DSH5_T 144 scalar 212,214,265,267,269 DS_PRECISN Local 293 DSH5_T 144 scalar 293,296,299 DS_PRESS Local 543 DSH5_T 144 scalar 543,546,548 DS_QUALT Local 325 DSH5_T 144 scalar 325,328,331 DS_STAT Local 353 DSH5_T 144 scalar 353,356,359 DS_SZA Local 487 DSH5_T 144 scalar 487,490,492 DS_TIME Local 514 DSH5_T 144 scalar 514,517,519 GET_COMMAND_ARGUMENT Intrin 166 166 GID Local 111 I(4) 4 scalar 202,212,265,293,325,353,407,435,46 1,487,514,543,769 GRANULEDAY Local 131 I(4) 4 scalar 192,196,635 GRANULEMONTH Local 131 I(4) 4 scalar 192,196,634 GRANULEYEAR Local 131 I(4) 4 scalar 192,196,633 H5CLOSE_F Subr 780 780 H5DCLOSE_F Subr 269 269,299,331,359,413,440,466,492,51 9,548 H5DGET_SPACE_F Subr 214 214 H5DOPEN_F Subr 212 212,265,293,325,353,407,435,461,48 7,514,543 H5DREAD_DOUBLE_1 Subr 517 517 Page 20 Source Listing CHECK_ERROR 2013-01-11 18:25 Symbol Table tranmls.f90 Name Object Declared Type Bytes Dimen Elements Attributes References H5DREAD_F Local 267 scalar 267,296,328,356,410,438,464,490,51 7,546 H5DREAD_REAL_1 Subr 328 328,356,410,438,464,490,546 H5DREAD_REAL_2 Subr 267 267,296 H5FCLOSE_F Subr 774 774 H5FOPEN_F Subr 181 181 H5F_ACC_RDONLY_F Scalar 181 I(4) 4 scalar COM 181 H5OPEN_F Subr 171 171 H5SGET_SIMPLE_EXTENT_DIMS_ F Subr 224 224 H5SGET_SIMPLE_EXTENT_NDIMS _F Subr 216 216 H5T_NATIVE_DOUBLE Scalar 517 I(4) 4 scalar COM 517 H5T_NATIVE_REAL Scalar 267 I(4) 4 scalar COM 267,296,328,356,410,438,464,490,54 6 HSIZE_T Param 121 I(4) 4 scalar 121,123,125,127,129 IBIT Local 119 I(4) 4 1 18 IDAT Local 119 I(4) 4 1 8 632,633,634,635,636,637,638,640 IDATE Local 120 I(4) 4 scalar 642,658 II Local 119 I(4) 4 scalar IMAX Local 108 I(4) 4 scalar 279,288,309,318 IMIN Local 108 I(4) 4 scalar 283,287,313,317 INTBF Local 133 I(4) 4 scalar 382,384,389,390,392,393,395,396,39 8,399 IREAD Local 118 I(4) 4 scalar 142,607,784 IRET Local 118 I(4) 4 scalar 728,730,732 ISKIP Local 118 I(4) 4 scalar 142,619,625,785 IUNPK Local 120 I(4) 4 scalar IWRITE Local 118 I(4) 4 scalar 143,737,786 JDAT Local 119 I(4) 4 1 8 640,642,646,647,678,679,680,681,68 2,683,702 JMAX Local 108 I(4) 4 scalar 279,288,309,318,340,348,367,375,42 3,431,448,456,474,482,501,509,531, 539,561,569 JMIN Local 108 I(4) 4 scalar 283,287,313,317,344,347,371,374,42 7,430,452,455,478,481,505,508,535, 538,565,568 LAT Local 250 R(4) 4 1 1 ALC 250,438,446,447,450,451,616,618,67 5,752 LON Local 251 R(4) 4 1 1 ALC 251,464,472,473,476,477,622,624,67 6,753 LUNBFR Local 118 I(4) 4 scalar 142,581,658,728,730,732,736,745 LUNDX Local 118 I(4) 4 scalar 142,581 LUNPRT Local 118 I(4) 4 scalar 142,589,596,599,600,602,603,605,60 6,646,764 MAX Local 102 R(4) 4 scalar 273,277,278,288,303,307,308,318,33 5,338,339,348,363,365,366,375,419, 421,422,431,444,446,447,456,470,47 2,473,482,496,499,500,509,552,559, 560,569 MAXDIMS Local 129 I(8) 8 1 1 ALC 223,224 MAX_8 Local 103 R(8) 8 scalar 527,529,530,539 MIN Local 102 R(4) 4 scalar 272,281,282,287,302,311,312,317,33 4,342,343,347,362,369,370,374,418, 425,426,430,443,450,451,455,469,47 Page 21 Source Listing CHECK_ERROR 2013-01-11 18:25 Symbol Table tranmls.f90 Name Object Declared Type Bytes Dimen Elements Attributes References 6,477,481,495,503,504,508,551,563, 564,568 MIN_8 Local 103 R(8) 8 scalar 526,533,534,538 NAME Local 212 CHAR 80 scalar 212,265,293,325,353,407,435,461,48 7,514,543 NATSCANS Local 231 I(4) 4 scalar 231,233,235,242,247,248,249,250,25 1,252,253,255,256,257,258,260,274, 304,320,336,364,379,420,445,471,49 7,522,523,524,528,554,594 NBITW Local 120 I(4) 4 scalar 158 NBYTW Local 120 I(4) 4 scalar 157,158 NDIMS Local 113 I(4) 4 scalar 216,222,223 NIB Local 119 I(4) 4 scalar NLEV Local 115 I(4) 4 scalar 275,276,277,278,279,281,282,283,30 5,306,307,308,309,311,312,313,553, 555,559,560,561,563,564,565,710,71 2,713,715,718,719,720,721 NLEVELS Local 97 I(4) 4 scalar 232,233,235,241,247,248,254,255,26 0,275,305,553,585,599,602,605,710, 732 NSCAN Local 117 I(4) 4 scalar 274,276,277,278,279,281,282,283,30 4,306,307,308,309,311,312,313,336, 337,338,339,340,342,343,344,364,36 5,366,367,369,370,371,379,380,384, 420,421,422,423,425,426,427,445,44 6,447,448,450,451,452,471,472,473, 474,476,477,478,497,498,499,500,50 1,503,504,505,528,529,530,531,533, 534,535,554,555,594,596,600,603,60 6,616,618,622,624,630,675,676,677, 684,685,690,692,693,699,712,713,71 5,717 O3MR Local 247 R(4) 4 2 1 ALC 247,267,276,277,278,281,282,603,71 3,750 O3MRP_8 Local 101 R(8) 8 2 1 ALC 585,712,713,715,719,720,721,732 O3MR_DATASETS Module 89 89 O3MR_NAME Local 135 CHAR 256 scalar 166,181,183 O3MR_OUTPUT Local 137 CHAR 256 scalar 161,589 O3MR_SWATH Param 139 CHAR 17 scalar 202,204 OBS_8 Local 100 R(8) 8 1 13 672,674,675,676,677,678,679,680,68 1,682,683,684,685,690,694,695,696, 697,703,704,705,728,730 OPENBF Subr 581 581 OPENMB Subr 658 658 PRECISN Local 248 R(4) 4 2 1 ALC 248,296,306,307,308,311,312,606,71 5,751 PRESS Local 254 R(4) 4 1 1 ALC 254,546,555,559,560,563,564,757 PRESS2 Local 105 R(4) 4 2 1 ALC 255,555,600,712,758 QUALT Local 249 R(4) 4 1 1 ALC 249,328,337,338,339,342,343,684,75 6 RINC Local 99 R(4) 4 1 5 629,630,640 SPACE_ID Local 112 I(4) 4 scalar 214,216,224 STAT Local 256 R(4) 4 1 1 ALC 256,356,365,366,369,370,380,759 STKO Local 120 I(4) 4 scalar SUBSET Local 138 CHAR 8 scalar 572,658 Page 22 Source Listing CHECK_ERROR 2013-01-11 18:25 Symbol Table tranmls.f90 Name Object Declared Type Bytes Dimen Elements Attributes References SWATH_DIMS Local 123 I(8) 8 1 2 260,267,296,546 SZA Local 252 R(4) 4 1 1 ALC 252,490,498,499,500,503,504,677,75 4 TEMP_DIMS Local 125 I(8) 8 1 1 320,328,356,410,438,464,490,517 TIME Local 253 R(8) 8 1 1 ALC 253,517,523,524,529,530,533,534,63 0,699,755 TOQC Local 120 I(4) 4 scalar TOQF Local 120 I(4) 4 scalar UFBINT Subr 728 728,730,732 W3FI01 Subr 157 157 W3MOVDAT Subr 640 640 W3TAGB Subr 148 148 WRITSB Subr 736 736 Page 23 Source Listing CHECK_ERROR 2013-01-11 18:25 tranmls.f90 932 933 SUBROUTINE dec2bin(dec,bin) 934 935 !$$$ subprogram documentation block 936 ! . . . . 937 ! subprogram: dec2bin convert decimal number to binary 938 ! prgmmr: unknown org: np23 date: 2010-04-06 939 ! 940 ! abstract: This routine convert a decimal number to binary 941 ! 942 ! program history log: 943 ! 2010-04-06 hliu 944 945 ! input argument list: 946 ! dec - observation type to process 947 ! 948 ! output argument list: 949 ! bin - number of mls ozone observations read 950 ! 951 ! remarks: 952 ! 953 ! attributes: 954 ! language: FORTRAN 90 (free format) 955 ! machine: NCEP WCOSS 956 ! 957 958 implicit none 959 960 ! Declare passed variables 961 integer,intent(inout) :: dec 962 integer,intent(out) :: bin(18) 963 964 ! Declare local variables 965 integer:: bindec, i 966 967 ! Check to determine decimal # is within bounds 968 i = 18 969 IF ((dec - 2**i) >= 0) THEN 970 STOP 'Decimal Number too Large. Must be < 2^17' 971 END IF 972 973 ! Determine the scalar for each of the decimal positions 974 DO WHILE (i >= 1) 975 bindec = 2**(i-1) 976 IF ((dec - bindec) >= 0) THEN 977 bin(i) = 1 978 dec = dec - bindec 979 ELSE 980 bin(i) = 0 981 END IF 982 i = i - 1 983 END DO 984 985 RETURN 986 END subroutine dec2bin Page 24 Source Listing DEC2BIN 2013-01-11 18:25 Entry Points tranmls.f90 ENTRY POINTS Name dec2bin_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References BIN Dummy 933 I(4) 4 1 18 ARG,OUT 977,980 BINDEC Local 965 I(4) 4 scalar 975,976,978 DEC Dummy 933 I(4) 4 scalar ARG,INOUT 969,976,978 DEC2BIN Subr 933 I Local 965 I(4) 4 scalar 968,969,974,975,977,980,982 Page 25 Source Listing DEC2BIN 2013-01-11 18:25 tranmls.f90 987 988 subroutine bin2int(bin,intbf) 989 990 implicit none 991 992 ! Declare passed variables 993 integer,intent(out) :: intbf 994 integer,intent(in) :: bin(18) 995 996 ! Declare local variables 997 integer:: i 998 999 intbf=0 1000 do i=1,18 1001 intbf=intbf+bin(i)*2**(18-i) 1002 end do 1003 1004 RETURN 1005 END subroutine bin2int ENTRY POINTS Name bin2int_ SYMBOL CROSS REFERENCE Name Object Declared Type Bytes Dimen Elements Attributes References BIN Dummy 988 I(4) 4 1 18 ARG,IN 1001 BIN2INT Subr 988 I Local 997 I(4) 4 scalar 1000,1001 INTBF Dummy 988 I(4) 4 scalar ARG,OUT 999,1001 Page 26 Source Listing BIN2INT 2013-01-11 18:25 Subprograms/Common Blocks tranmls.f90 SUBPROGRAMS/COMMON BLOCKS Name Object Declared Type Bytes Dimen Elements Attributes References BIN2INT Subr 988 BUFR_TRANMLS Prog 1 CHECK_ERROR Subr 915 213,215,266,268,270,295,298,300,32 7,330,332,355,358,360,409,412,414, 437,439,441,463,465,467,489,491,49 3,516,518,520,545,547,549,775,781 DEC2BIN Subr 933 GRANULE_CALENDAR_DATE Subr 801 192 COMPILER OPTIONS BEING USED -align nocommons -align nodcommons -align noqcommons -align records -align nosequence -align norec1byte -align norec2byte -align norec4byte -align norec8byte -align norec16byte -altparam -assume accuracy_sensitive -assume nobscc -assume nobuffered_io -assume nobyterecl -assume nocc_omp -assume nocstring -assume nodummy_aliases -assume nofpe_summary -assume noieee_fpe_flags -assume nominus0 -assume noold_boz -assume old_unit_star -assume noold_ldout_format -assume noold_logical_ldio -assume old_maxminloc -assume old_xor -assume protect_constants -assume noprotect_parens -assume split_common -assume source_include -assume nostd_intent_in -assume nostd_mod_proc_name -assume norealloc_lhs -assume underscore -assume no2underscores -auto no -auto_scalar no -bintext -ccdefault default -check noargs -check noarg_temp_created -check nobounds -check noformat -check nooutput_conversion -check nooverflow -check nopointers -check power -check noshape -check nounderflow -check nouninitialized -coarray-num-procs 0 no -coarray-config-file -convert big_endian -cross_reference -D __INTEL_COMPILER=1210 -D __unix__ -D __unix -D __linux__ -D __linux -D __gnu_linux__ -D unix -D linux -D __ELF__ -D __x86_64 -D __x86_64__ -D _MT -D __INTEL_COMPILER_BUILD_DATE=20120612 -D __i686 -D __i686__ -D __pentiumpro -D __pentiumpro__ -D __pentium4 -D __pentium4__ -D __tune_pentium4__ -D __SSE2__ -D __SSE__ -D __MMX__ -double_size 64 no -d_lines Page 27 Source Listing BIN2INT 2013-01-11 18:25 tranmls.f90 no -Qdyncom -error_limit 30 no -f66 no -f77rtl no -fast -fpscomp nofilesfromcmd -fpscomp nogeneral -fpscomp noioformat -fpscomp noldio_spacing -fpscomp nologicals no -fpconstant -fpe3 -fprm nearest no -ftz -fp_model noprecise -fp_model fast -fp_model nostrict -fp_model nosource -fp_model nodouble -fp_model noextended -fp_model novery_fast -fp_model noexcept -fp_model nono_except -heap_arrays 0 no -threadprivate_compat -free -g0 -iface nomixed_str_len_arg -iface nono_mixed_str_len_arg no -intconstant -integer_size 32 no -mixed_str_len_arg no -module -names lowercase no -noinclude -O2 no -pad_source -real_size 32 no -recursive -reentrancy none no -sharable_localsaves -vec=simd -show noinclude -show map -show options no -syntax_only no -threadcom no -U no -vms -w noall -w nonone -w alignments -w noargument_checking -w nodeclarations -w general -w noignore_bounds -w noignore_loc -w nointerfaces -w notruncated_source -w uncalled -w uninitialized -w nounused -w usage -includepath : /usrx/local/intel/composerxe/tbb/include/,/usr/include/,./,/usrx/local/hdf5-1.8.9/include/, /usrx/local/hdf5-1.8.9/lib/,/usrx/local/intel/composerxe/mkl/include/,/usrx/local/intel/composerxe/tbb/include/, /gpfs/tp2/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/intel64/,/gpfs/tp2/usrx/local/intel/composer_xe_2011_sp1.11.339/compiler/include/, /usr/local/include/,/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/,/usr/include/,/usr/include/ -list filename : tranmls.lst -o filename : none COMPILER: Intel(R) Fortran 12.1-2100