/[MITgcm]/MITgcm/eesupp/src/nml_filter.F
ViewVC logotype

Annotation of /MITgcm/eesupp/src/nml_filter.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Fri Sep 21 03:54:35 2001 UTC (22 years, 7 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint44e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50g_post, checkpoint46b_post, checkpoint43a-release1mods, checkpoint44g_post, checkpoint48c_post, ecco_c50_e32, ecco_c50_e33, ecco_c50_e30, ecco_c50_e31, release1_p13, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, chkpt44d_post, checkpoint51, release1_p8, release1_p9, checkpoint50d_post, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint50b_pre, checkpoint44e_pre, checkpoint51f_post, release1_b1, ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, checkpoint48b_post, checkpoint43, checkpoint51d_post, checkpoint48c_pre, release1_chkpt44d_post, checkpoint48d_pre, checkpoint51j_post, checkpoint47i_post, release1_p11, checkpoint47d_post, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, ecco_c50_e28, checkpoint47d_pre, chkpt44a_post, checkpoint44h_pre, checkpoint48h_post, ecco_c50_e29, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint46b_pre, chkpt44c_pre, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47a_post, ecco_c50_e33a, branchpoint-genmake2, checkpoint46e_pre, checkpoint45b_post, release1-branch-end, release1_final_v1, checkpoint51b_post, release1_p12_pre, checkpoint46c_pre, checkpoint44f_post, checkpoint47b_post, checkpoint44b_post, ecco_c51_e34, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50c_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, checkpoint51c_post, checkpoint46i_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, ecco_c44_e25, checkpoint51i_pre, checkpoint48a_post, checkpoint47j_post, branch-exfmods-tag, checkpoint47f_post, checkpoint50e_post, chkpt44a_pre, ecco_c44_e22, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint51e_post, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint46, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint50, checkpoint51f_pre, chkpt44c_post, checkpoint47h_post, checkpoint44f_pre, checkpoint51g_post, checkpoint46d_post, checkpoint50b_post, release1-branch_branchpoint, checkpoint51a_post, checkpoint48g_post
Branch point for: c24_e25_ice, branch-exfmods-curt, release1_coupled, release1_final, release1-branch, branch-genmake2, release1, ecco-branch, release1_50yr, icebear
Changes since 1.2: +47 -48 lines
Starting to bring comments up to date and format comments
for document extraction of "prototypes".

1 cnh 1.3 C $Header: /u/gcmpack/models/MITgcmUV/eesupp/src/nml_filter.F,v 1.2 2001/02/04 14:38:44 cnh Exp $
2     C $Name: $
3 heimbach 1.1
4     #include "CPP_OPTIONS.h"
5    
6     #define FTN_NML_F90
7    
8 cnh 1.3 CBOP
9    
10     C !ROUTINE: NML_FILTER
11    
12     C !INTERFACE:
13     SUBROUTINE NML_FILTER(
14     I fName
15     O , outUnit
16 heimbach 1.1 I , myThid
17     & )
18 cnh 1.3 IMPLICIT NONE
19 heimbach 1.1
20 cnh 1.3 C !DESCRIPTION:
21     C *=================================================================*
22     C | SUBROUTINE NML_FILTER
23     C | o Remove comments from namelist.
24     C *=================================================================*
25     C |
26     C | Started: Ralf.Giering@FastOpt.de 15-Mai-2000
27     C |
28     C | - remove comments from namelist file
29     c | - usage
30     C |
31     C | CALL NML_FILTER( 'datafile', iUnit, myThid )
32     C | READ ( UNIT = iunit, NML = the_namelist )
33     C | CLOSE ( iUnit )
34     C |
35     C *=================================================================*
36 heimbach 1.1
37 cnh 1.3 C !USES:
38     C == Global variables ==
39 heimbach 1.1 #include "EEPARAMS.h"
40 cnh 1.3 INTEGER ILNBLNK
41     EXTERNAL ILNBLNK
42 heimbach 1.1
43 cnh 1.3 C !INPUT/OUTPUT PARAMETERS:
44     C == Routine arguments ==
45     CHARACTER*(*) fName
46     INTEGER outUnit
47     INTEGER myThid
48    
49     C !LOCAL VARIABLES:
50     C == Local variables ==
51     INTEGER errIo
52     INTEGER il
53     INTEGER inUnit
54     CHARACTER*(MAX_LEN_MBUF) msgBuf
55     CHARACTER*(MAX_LEN_PREC) record
56     CEOP
57 heimbach 1.1
58 cnh 1.3 C-- Open the data file
59 heimbach 1.1
60 cnh 1.3 CALL mdsFindUnit( inunit, mythid )
61 heimbach 1.1
62     open( unit = inunit
63     & , file = fname
64     & , status = 'old'
65     & , iostat = errio
66     & )
67    
68     c-- open the filtered data file
69     call mdsfindunit( outunit, mythid )
70     open( unit=outunit, status='scratch' )
71    
72     if ( errio .lt. 0 ) then
73     write(msgBuf,'(A)') 'S/R nml_filter'
74     call PRINT_ERROR( msgBuf , 1)
75     write(msgBuf,'(A)') 'Unable to open execution environment'
76     call PRINT_ERROR( msgBuf , 1)
77     write(msgBuf,'(3a)') 'namelist file "', fname, '"'
78     call PRINT_ERROR( msgBuf , 1)
79     close(outunit)
80     outunit = 0
81     stop ' stopped in nml_filter'
82     endif
83    
84     do while ( .true. )
85     read(inunit, fmt='(a)', iostat=errio) record
86     if ( errio .ne. 0 ) then
87     goto 1001
88     end if
89     il = max(ilnblnk(record),1)
90     if ( record(1:1) .eq. commentcharacter ) then
91     else if ( record(1:1) .eq. '/' ) then
92     #ifdef FTN_NML_F90
93     write(outunit, fmt='(a)') record(:il)
94     #else
95     write(outunit, fmt='(a)') ' &'
96     #endif
97     else if ( record(1:2) .eq. ' /' ) then
98     #ifdef FTN_NML_F90
99     write(outunit, fmt='(a)') record(:il)
100     #else
101     write(outunit, fmt='(a)') ' &'
102     #endif
103     else
104     write(outunit, fmt='(a)') record(:il)
105     end if
106     enddo
107     1001 continue
108     close( inunit )
109    
110     rewind( outunit )
111    
112     end
113    

  ViewVC Help
Powered by ViewVC 1.1.22