mirror of https://github.com/ecmwf/eccodes.git
Examples: Fortran
This commit is contained in:
parent
080f08363d
commit
3b86b179c4
|
@ -10,7 +10,7 @@
|
|||
! Description: How to copy a BUFR message in memory
|
||||
!
|
||||
!
|
||||
program copy
|
||||
program bufr_copy_message
|
||||
use eccodes
|
||||
implicit none
|
||||
integer :: err, sub_centre
|
||||
|
@ -50,4 +50,4 @@ program copy
|
|||
call codes_close_file(outfile)
|
||||
deallocate (message)
|
||||
|
||||
end program copy
|
||||
end program
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
! Description: Count messages before processing
|
||||
!
|
||||
!
|
||||
program get
|
||||
program grib_count_messages
|
||||
use eccodes
|
||||
implicit none
|
||||
|
||||
|
@ -25,11 +25,10 @@ program get
|
|||
integer :: numberOfPointsAlongAParallel
|
||||
integer :: numberOfPointsAlongAMeridian
|
||||
real, dimension(:), allocatable :: values
|
||||
integer :: numberOfValues
|
||||
integer(8) :: numberOfValues
|
||||
real :: average, min_val, max_val
|
||||
|
||||
call codes_open_file(ifile, &
|
||||
'../../data/tigge_pf_ecmwf.grib2', 'r')
|
||||
call codes_open_file(ifile, '../../data/tigge_pf_ecmwf.grib2', 'r')
|
||||
|
||||
! count the messages in the file
|
||||
call codes_count_in_file(ifile, n)
|
||||
|
@ -106,4 +105,4 @@ program get
|
|||
|
||||
deallocate (igrib)
|
||||
|
||||
end program get
|
||||
end program
|
||||
|
|
|
@ -21,8 +21,8 @@ program grib_get_keys
|
|||
real :: longitudeOfFirstPointInDegrees
|
||||
real :: latitudeOfLastPointInDegrees
|
||||
real :: longitudeOfLastPointInDegrees
|
||||
integer :: numberOfPointsAlongAParallel
|
||||
integer :: numberOfPointsAlongAMeridian
|
||||
integer(4) :: numberOfPointsAlongAParallel
|
||||
integer(8) :: numberOfPointsAlongAMeridian
|
||||
real, dimension(:), allocatable :: values
|
||||
integer :: numberOfValues
|
||||
real :: average, min_val, max_val
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
! rather than the new ALLOCATABLE array
|
||||
!
|
||||
!
|
||||
program print_data
|
||||
program print_data_static
|
||||
use grib_api
|
||||
implicit none
|
||||
integer :: ifile
|
||||
|
@ -55,4 +55,4 @@ program print_data
|
|||
call grib_release(igrib)
|
||||
call grib_close_file(ifile)
|
||||
|
||||
end program print_data
|
||||
end program
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
!
|
||||
!
|
||||
!
|
||||
program set
|
||||
program set_missing
|
||||
use eccodes
|
||||
implicit none
|
||||
integer :: infile, outfile
|
||||
|
@ -48,4 +48,4 @@ program set
|
|||
call codes_close_file(infile)
|
||||
call codes_close_file(outfile)
|
||||
|
||||
end program set
|
||||
end program
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
! Description: how to set key values.
|
||||
!
|
||||
!
|
||||
program set
|
||||
program set_missing_fortran
|
||||
use eccodes
|
||||
implicit none
|
||||
integer :: infile, outfile
|
||||
|
@ -40,4 +40,4 @@ program set
|
|||
|
||||
call codes_close_file(outfile)
|
||||
|
||||
end program set
|
||||
end program
|
||||
|
|
Loading…
Reference in New Issue