/[lmdze]/trunk/IOIPSL/find_str.f
ViewVC logotype

Annotation of /trunk/IOIPSL/find_str.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations)
Tue Apr 6 17:52:58 2010 UTC (14 years, 2 months ago) by guez
Original Path: trunk/libf/IOIPSL/Stringop/find_str.f90
File size: 1218 byte(s)
Split "stringop.f90" into single-procedure files. Gathered files in directory
"IOIPSL/Stringop".

Split "flincom.f90" into "flincom.f90" and "flinget.f90". Removed
unused procedures from module "flincom". Removed unused argument
"filename" of procedure "flinopen_nozoom".

Removed unused files.

Split "grid_change.f90" into "grid_change.f90" and
"gr_phy_write_3d.f90".

Removed unused procedures from modules "calendar", "ioipslmpp",
"grid_atob", "gath_cpl" and "getincom". Removed unused procedures in
files "ppm3d.f" and "thermcell.f".

Split "mathelp.f90" into "mathelp.f90" and "mathop.f90".

Removed unused variable "dpres" of module "comvert".

Use argument "itau" instead of local variables "iadvtr" and "first" to
control algorithm in procedure "fluxstokenc".

Removed unused arguments of procedure "integrd".

Removed useless computations at the end of procedure "leapfrog".

Merged common block "matrfil" into module "parafilt".

1 guez 32 module find_str_m
2    
3     implicit none
4    
5     contains
6    
7     !=
8     SUBROUTINE find_str (nb_str,str_tab,str_len_tab,str,pos)
9     !---------------------------------------------------------------------
10     !- This subroutine looks for a string in a table
11     !---------------------------------------------------------------------
12     !- INPUT
13     !- nb_str : length of table
14     !- str_tab : Table of strings
15     !- str_len_tab : Table of string-length
16     !- str : Target we are looking for
17     !- OUTPUT
18     !- pos : -1 if str not found, else value in the table
19     !---------------------------------------------------------------------
20     IMPLICIT NONE
21     !-
22     INTEGER :: nb_str
23     CHARACTER(LEN=*),DIMENSION(nb_str) :: str_tab
24     INTEGER,DIMENSION(nb_str) :: str_len_tab
25     CHARACTER(LEN=*) :: str
26     INTEGER :: pos
27     !-
28     INTEGER :: i,il
29     !---------------------------------------------------------------------
30     pos = -1
31     il = LEN_TRIM(str)
32     IF ( nb_str > 0 ) THEN
33     DO i=1,nb_str
34     IF ( (INDEX(str_tab(i),str(1:il)) > 0) &
35     .AND.(str_len_tab(i) == il) ) THEN
36     pos = i
37     EXIT
38     ENDIF
39     ENDDO
40     ENDIF
41     !-------------------------
42     END SUBROUTINE find_str
43    
44     end module find_str_m

  ViewVC Help
Powered by ViewVC 1.1.21