1 |
adcroft |
1.4 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/shap_filt/shap_filt_readparms.F,v 1.3 2001/06/15 15:14:56 jmc Exp $ |
2 |
jmc |
1.3 |
C $Name: $ |
3 |
adcroft |
1.2 |
|
4 |
|
|
#include "SHAP_FILT_OPTIONS.h" |
5 |
|
|
|
6 |
|
|
SUBROUTINE SHAP_FILT_READPARMS( myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE SHAP_FILT_READPARMS | |
9 |
|
|
C | o Routine to initialize Shapiro Filter parameters | |
10 |
|
|
C |==========================================================| |
11 |
|
|
C \==========================================================/ |
12 |
|
|
IMPLICIT NONE |
13 |
|
|
|
14 |
|
|
C === Global variables === |
15 |
|
|
#include "SIZE.h" |
16 |
|
|
#include "EEPARAMS.h" |
17 |
|
|
#include "PARAMS.h" |
18 |
|
|
#include "SHAP_FILT.h" |
19 |
|
|
|
20 |
|
|
C === Routine arguments === |
21 |
|
|
INTEGER myThid |
22 |
|
|
|
23 |
|
|
#ifdef ALLOW_SHAP_FILT |
24 |
|
|
|
25 |
jmc |
1.3 |
NAMELIST /SHAP_PARM01/ Shap_funct, |
26 |
|
|
& nShapT, nShapTrPhys, |
27 |
|
|
& nShapUV, nShapUVPhys, |
28 |
|
|
& Shap_Trtau, Shap_TrLength, |
29 |
|
|
& Shap_uvtau, Shap_uvLength |
30 |
adcroft |
1.2 |
|
31 |
|
|
C === Local variables === |
32 |
|
|
C msgBuf - Informational/error meesage buffer |
33 |
|
|
C iUnit - Work variable for IO unit number |
34 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
35 |
|
|
INTEGER iUnit |
36 |
|
|
|
37 |
|
|
C-- SHAP_FILT_READPARMS has been called so we know that |
38 |
|
|
C the package is active. |
39 |
|
|
c SHAPIsOn=.TRUE. |
40 |
|
|
|
41 |
|
|
_BEGIN_MASTER(myThid) |
42 |
|
|
|
43 |
|
|
WRITE(msgBuf,'(A)') ' SHAP_FILT_READPARMS: opening data.shap' |
44 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
45 |
|
|
& SQUEEZE_RIGHT , 1) |
46 |
|
|
|
47 |
|
|
CALL OPEN_COPY_DATA_FILE( |
48 |
|
|
I 'data.shap', 'SHAP_FILT_READPARMS', |
49 |
|
|
O iUnit, |
50 |
|
|
I myThid ) |
51 |
|
|
|
52 |
|
|
C-- Default flags and values for Shapiro Filter |
53 |
jmc |
1.3 |
Shap_funct = 2 |
54 |
adcroft |
1.2 |
nShapT = 0 |
55 |
|
|
nShapUV = 0 |
56 |
jmc |
1.3 |
nShapTrPhys = 0 |
57 |
|
|
nShapUVPhys = 0 |
58 |
adcroft |
1.2 |
Shap_Trtau = deltaTtracer |
59 |
|
|
Shap_TrLength = 0. |
60 |
|
|
Shap_uvtau = deltaTMom |
61 |
|
|
Shap_TrLength = 0. |
62 |
|
|
|
63 |
|
|
C-- Read parameters from open data file |
64 |
|
|
READ(UNIT=iUnit,NML=SHAP_PARM01) |
65 |
|
|
|
66 |
|
|
WRITE(msgBuf,'(A)') |
67 |
|
|
& ' SHAP_FILT_READPARMS: finished reading data.shap' |
68 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
69 |
|
|
& SQUEEZE_RIGHT , 1) |
70 |
|
|
|
71 |
adcroft |
1.4 |
write(*,*) 'Shap_funct, nShap_Tr,UV _Phys=', |
72 |
jmc |
1.3 |
& Shap_funct, nShapT, nShapUV, nShapTrPhys, nShapUVPhys |
73 |
adcroft |
1.4 |
write(*,*) 'Shap_Trtau,Shap_uvtau=',Shap_Trtau,Shap_uvtau |
74 |
adcroft |
1.2 |
C-- Close the open data file |
75 |
|
|
CLOSE(iUnit) |
76 |
|
|
_END_MASTER(myThid) |
77 |
|
|
|
78 |
|
|
C-- Everyone else must wait for the parameters to be loaded |
79 |
|
|
_BARRIER |
80 |
|
|
|
81 |
|
|
#endif /* ALLOW_SHAP_FILT */ |
82 |
|
|
RETURN |
83 |
|
|
END |