mirror of https://github.com/ecmwf/eccodes.git
Clean up
This commit is contained in:
parent
bfcc2e150f
commit
836a0cd7c9
|
@ -27,19 +27,18 @@ program clone
|
||||||
call codes_open_file(infile,'../../data/constant_field.grib1','r')
|
call codes_open_file(infile,'../../data/constant_field.grib1','r')
|
||||||
call codes_open_file(outfile,'out.clone.grib1','w')
|
call codes_open_file(outfile,'out.clone.grib1','w')
|
||||||
|
|
||||||
! a new grib message is loaded from file
|
! A new GRIB message is loaded from file.
|
||||||
! igrib is the grib id to be used in subsequent calls
|
! igrib is the GRIB id to be used in subsequent calls
|
||||||
call codes_grib_new_from_file(infile,igrib_in)
|
call codes_grib_new_from_file(infile,igrib_in)
|
||||||
|
|
||||||
call codes_get(igrib_in,"Ni", nx)
|
call codes_get(igrib_in,'Ni', nx)
|
||||||
|
call codes_get(igrib_in,'Nj', ny)
|
||||||
call codes_get(igrib_in,"Nj",ny)
|
|
||||||
|
|
||||||
allocate(field2D(nx,ny),stat=err)
|
allocate(field2D(nx,ny),stat=err)
|
||||||
|
|
||||||
if (err .ne. 0) then
|
if (err .ne. 0) then
|
||||||
print*, 'Failed to allocate ', nx*ny, ' values'
|
print*, 'Failed to allocate ', nx*ny, ' values'
|
||||||
STOP
|
STOP
|
||||||
end if
|
end if
|
||||||
! clone the constant field to create 4 new GRIB messages
|
! clone the constant field to create 4 new GRIB messages
|
||||||
do i=0,18,6
|
do i=0,18,6
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
. ./include.sh
|
. ./include.sh
|
||||||
|
|
||||||
REDIRECT=/dev/null
|
REDIRECT=/dev/null
|
||||||
$PYTHON $examples_src/grib_clone.py 2> $REDIRECT > $REDIRECT
|
$PYTHON $examples_src/grib_clone.py
|
||||||
rm -f out.clone.grib || true
|
rm -f out.clone.grib
|
||||||
|
|
Loading…
Reference in New Issue