UPP  001
 All Data Structures Files Functions Pages
retrieve_index.f
Go to the documentation of this file.
1 
20  subroutine retrieve_index(index,string,varname_all,nrecs,iret)
21 
22 
23  implicit none
24 
25  integer,intent(out)::iret
26  integer,intent(in)::nrecs
27  integer,intent(out):: index
28  character(*), intent(in):: string
29  character(132),intent(in)::varname_all(nrecs)
30 
31  integer i
32 
33  iret=0
34 
35  do i=1,nrecs
36  if(trim(string) == trim(varname_all(i))) then
37  index=i
38  return
39  end if
40  end do
41 
42  write(6,*)' problem reading wrf nmm binary file, rec id "',trim(string),'" not found'
43 
44  iret=-1
45 
46 end subroutine retrieve_index