mirror of https://github.com/ecmwf/eccodes.git
Examples: Cleanup
This commit is contained in:
parent
263b7d1519
commit
e63c3c0ce8
|
@ -8,8 +8,8 @@
|
|||
!
|
||||
!
|
||||
!
|
||||
! Description: How to create a multi field message in memory and write
|
||||
! it in a file. The multi field messages can be created
|
||||
! Description: How to create a multi-field message in memory and write
|
||||
! it to a file. The multi-field messages can be created
|
||||
! only in GRIB edition 2.
|
||||
!
|
||||
!
|
||||
|
@ -22,24 +22,22 @@ program grib2_multi_write
|
|||
integer :: multi_gribid
|
||||
integer :: step, startsection
|
||||
|
||||
! multi field messages can be created only in edition 2
|
||||
! Multi-field messages can be created only in edition 2
|
||||
call codes_open_file(infile, '../../data/sample.grib2', 'r')
|
||||
|
||||
call codes_open_file(outfile, 'multi_created.grib2', 'w')
|
||||
|
||||
! a grib message is loaded from file
|
||||
! in_gribid is the grib id to be used in subsequent calls
|
||||
! A GRIB message is loaded from file
|
||||
! in_gribid is the GRIB id to be used in subsequent calls
|
||||
call codes_grib_new_from_file(infile, in_gribid)
|
||||
|
||||
startsection = 4
|
||||
do step = 0, 240, 12
|
||||
|
||||
call codes_set(in_gribid, "step", step)
|
||||
call codes_grib_multi_append(in_gribid, startsection, multi_gribid)
|
||||
|
||||
end do
|
||||
|
||||
! write messages to a file
|
||||
! Write messages to a file
|
||||
call codes_grib_multi_write(multi_gribid, outfile)
|
||||
|
||||
call codes_release(in_gribid)
|
||||
|
|
|
@ -23,10 +23,10 @@ program multi
|
|||
|
||||
call codes_open_file(ifile, '../../data/multi.grib2', 'r')
|
||||
|
||||
! turn on support for multi fields messages */
|
||||
! Turn on support for multi-field messages */
|
||||
call codes_grib_multi_support_on()
|
||||
|
||||
! turn off support for multi fields messages */
|
||||
! Turn off support for multi-field messages */
|
||||
!call codes_grib_multi_support_off()
|
||||
|
||||
call codes_grib_new_from_file(ifile, igrib)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
!
|
||||
! Fortran 90 Implementation: print_data_fortran
|
||||
!
|
||||
! Description: prints all the data contained in a grib file
|
||||
! Description: prints all the data contained in a GRIB file
|
||||
!
|
||||
!
|
||||
!
|
||||
|
@ -23,11 +23,10 @@ program print_data_fortran
|
|||
real(kind=8) :: max
|
||||
real(kind=8) :: min
|
||||
|
||||
call codes_open_file(ifile, &
|
||||
'../../data/constant_field.grib1', 'r')
|
||||
call codes_open_file(ifile, '../../data/constant_field.grib1', 'r')
|
||||
|
||||
! A new grib message is loaded from file
|
||||
! igrib is the grib id to be used in subsequent calls
|
||||
! A new GRIB message is loaded from file
|
||||
! igrib is the GRIB id to be used in subsequent calls
|
||||
call codes_grib_new_from_file(ifile, igrib)
|
||||
|
||||
call codes_get(igrib, 'values', values)
|
||||
|
|
|
@ -24,8 +24,8 @@ program set
|
|||
call codes_open_file(outfile, &
|
||||
'out_surface_level.grib2', 'w')
|
||||
|
||||
! a new grib message is loaded from file
|
||||
! igrib is the grib id to be used in subsequent calls
|
||||
! A new GRIB message is loaded from file
|
||||
! igrib is the GRIB id to be used in subsequent calls
|
||||
call codes_grib_new_from_file(infile, igrib)
|
||||
|
||||
call codes_set(igrib, 'typeOfFirstFixedSurface', 'sfc')
|
||||
|
|
Loading…
Reference in New Issue