This commit is contained in:
Shahram Najm 2022-12-28 15:12:46 +00:00
parent b303346d0a
commit be17dfa757
7 changed files with 15 additions and 15 deletions

View File

@ -37,21 +37,21 @@ program bufr_get_keys
! We need to instruct ecCodes to expand all the descriptors
! i.e. unpack the data values
call codes_set(ibufr, "unpack", 1);
call codes_set(ibufr, "unpack", 1);
! Get as character
call codes_get(ibufr, 'typicalDate', typicalDate)
write (*, *) ' typicalDate:', typicalDate
! Get as integer
call codes_get(ibufr, 'blockNumber', blockNumber);
call codes_get(ibufr, 'blockNumber', blockNumber);
write (*, *) ' blockNumber:', blockNumber
! Get as integer
call codes_get(ibufr, 'stationNumber', stationNumber);
call codes_get(ibufr, 'stationNumber', stationNumber);
write (*, *) ' stationNumber:', stationNumber
! get as real
call codes_get(ibufr, 'airTemperatureAt2M', t2m);
call codes_get(ibufr, 'airTemperatureAt2M', t2m);
write (*, *) ' airTemperatureAt2M:', t2m
! ---- array of integer ----------------

View File

@ -36,7 +36,7 @@ program bufr_keys_iterator
! We need to instruct ecCodes to expand all the descriptors
! i.e. unpack the data values
call codes_set(ibufr, "unpack", 1);
call codes_set(ibufr, "unpack", 1);
! Create BUFR keys iterator
call codes_bufr_keys_iterator_new(ibufr, kiter, iret)

View File

@ -60,18 +60,18 @@ program bufr_read_synop
write (*, *) ' longitude:', lat
! 2m temperature
call codes_get(ibufr, 'airTemperatureAt2M', t2m);
call codes_get(ibufr, 'airTemperatureAt2M', t2m);
write (*, *) ' airTemperatureAt2M:', t2m
! 2m dewpoint temperature
call codes_get(ibufr, 'dewpointTemperatureAt2M', td2m);
call codes_get(ibufr, 'dewpointTemperatureAt2M', td2m);
write (*, *) ' dewpointTemperatureAt2M:', td2m
! 10m wind
call codes_get(ibufr, 'windSpeedAt10M', ws);
call codes_get(ibufr, 'windSpeedAt10M', ws);
write (*, *) ' windSpeedAt10M:', ws
call codes_get(ibufr, 'windDirectionAt10M', wdir);
call codes_get(ibufr, 'windDirectionAt10M', wdir);
write (*, *) ' windDirectionAt10M:', wdir
! The cloud information is stored in several blocks in the

View File

@ -59,7 +59,7 @@ program bufr_read_tempf
! we need to instruct ecCodes to expand all the descriptors
! i.e. unpack the data values
call codes_set(ibufr, "unpack", 1);
call codes_set(ibufr, "unpack", 1);
! In our BUFR message verticalSoundingSignificance is always followed by
! geopotential, airTemperature, dewpointTemperature,
! windDirection, windSpeed and pressure.

View File

@ -35,7 +35,7 @@ program bufr_subset
! We need to instruct ecCodes to expand all the descriptors
! i.e. unpack the data values
call codes_set(ibufr, 'unpack', 1);
call codes_set(ibufr, 'unpack', 1);
! Find out the number of subsets
call codes_get(ibufr, 'numberOfSubsets', numberOfSubsets)
write (*, *) ' numberOfSubsets:', numberOfSubsets
@ -50,11 +50,11 @@ program bufr_subset
write (*, *) ' subsetNumber:', i
! read and print some data values
call codes_get(ibufr, key, blockNumber);
call codes_get(ibufr, key, blockNumber);
write (*, *) ' blockNumber:', blockNumber
write (key, *) '/subsetNumber=', I, '/stationNumber'
call codes_get(ibufr, 'stationNumber', stationNumber);
call codes_get(ibufr, 'stationNumber', stationNumber);
write (*, *) ' stationNumber:', stationNumber
end do

View File

@ -13,7 +13,7 @@ program codes_ecc_1392
integer :: ifile
character(len=60) :: inputfile
call getarg(1, inputfile)
call codes_open_file(ifile, inputfile, 'R')
write (*, *) 'Opened file OK: |',inputfile,'|'

View File

@ -101,7 +101,7 @@ program get
average = 0
do i = 1, numberOfValues
average = average + values(i);
average = average + values(i);
end do
average = average/numberOfValues