/[MITgcm]/MITgcm/pkg/down_slope/dwnslp_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/down_slope/dwnslp_readparms.F

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


Revision 1.1 - (show annotations) (download)
Sun Aug 17 02:01:27 2008 UTC (15 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61c, checkpoint61l, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i
pkg Down_Slope : density-driven downsloping flow parameterization.

1 C $Header: $
2 C $Name: $
3
4 #include "DWNSLP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: DWNSLP_READPARMS
8 C !INTERFACE:
9 SUBROUTINE DWNSLP_READPARMS( myThid )
10 C !DESCRIPTION: \bv
11 C *==========================================================*
12 C | SUBROUTINE DWNSLP_READPARMS
13 C | o Routine to initialize Down-Sloping Parameters
14 C *==========================================================*
15 C \ev
16
17 C !USES:
18 IMPLICIT NONE
19
20 C === Global variables ===
21 #include "SIZE.h"
22 #include "EEPARAMS.h"
23 #include "PARAMS.h"
24 #include "DWNSLP_PARAMS.h"
25
26 C !INPUT/OUTPUT PARAMETERS:
27 C === Routine arguments ===
28 INTEGER myThid
29
30 #ifdef ALLOW_DOWN_SLOPE
31
32 NAMELIST /DWNSLP_PARM01/
33 & DWNSLP_slope, DWNSLP_rec_mu, DWNSLP_drFlow,
34 & temp_useDWNSLP, salt_useDWNSLP
35
36 C !LOCAL VARIABLES:
37 C === Local variables ===
38 C msgBuf - Informational/error meesage buffer
39 C iUnit - Work variable for IO unit number
40 CHARACTER*(MAX_LEN_MBUF) msgBuf
41 INTEGER iUnit
42 CEOP
43
44 _BEGIN_MASTER(myThid)
45
46 WRITE(msgBuf,'(A)')' DWNSLP_READPARMS: opening data.down_slope'
47 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
48 & SQUEEZE_RIGHT , 1)
49
50 CALL OPEN_COPY_DATA_FILE(
51 I 'data.down_slope', 'DWNSLP_READPARMS',
52 O iUnit,
53 I myThid )
54
55 C-- Default flags and values for DownSlope Parameterisation
56 temp_useDWNSLP = tempStepping
57 salt_useDWNSLP = saltStepping
58 DWNSLP_slope = 0.
59 DWNSLP_rec_mu = 0.
60 DWNSLP_drFlow = 0.
61
62 C-- Read parameters from open data file
63 READ(UNIT=iUnit,NML=DWNSLP_PARM01)
64
65 WRITE(msgBuf,'(A)')
66 & ' DWNSLP_READPARMS: finished reading data.downslp'
67 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
68 & SQUEEZE_RIGHT , 1)
69
70 C-- Close the open data file
71 CLOSE(iUnit)
72 _END_MASTER(myThid)
73
74 C-- Everyone else must wait for the parameters to be loaded
75 _BARRIER
76
77 C-- Check the parameters :
78 IF ( temp_useDWNSLP .AND. .NOT. tempStepping ) THEN
79 WRITE(msgBuf,'(A)')
80 & 'need tempStepping=T to apply DWNSLP to Temp (temp_useDWNSLP=T)'
81 CALL PRINT_ERROR( msgBuf , myThid )
82 STOP 'ABNORMAL END: S/R DWNSLP_READPARMS'
83 ENDIF
84 IF ( salt_useDWNSLP .AND. .NOT. saltStepping ) THEN
85 WRITE(msgBuf,'(A)')
86 & 'need saltStepping=T to apply DWNSLP to Salt (salt_useDWNSLP=T)'
87 CALL PRINT_ERROR( msgBuf , myThid )
88 STOP 'ABNORMAL END: S/R DWNSLP_READPARMS'
89 ENDIF
90
91 C- print out some kee parameters :
92 _BEGIN_MASTER(myThid)
93
94 CALL WRITE_0D_R8( DWNSLP_slope, INDEX_NONE,'DWNSLP_slope =',
95 & ' /* DOWNSLP fixed slope (=0 => use local slope) */')
96 CALL WRITE_0D_R8( DWNSLP_rec_mu,INDEX_NONE,'DWNSLP_rec_mu =',
97 & ' /* DOWNSLP recip. friction parameter (time, s ) */')
98 CALL WRITE_0D_R8( DWNSLP_drFlow,INDEX_NONE,'DWNSLP_drFlow =',
99 & ' /* DOWNSLP effective layer thickness ( m ) */')
100
101 _END_MASTER(myThid)
102
103 #endif /* ALLOW_DOWN_SLOPE */
104 RETURN
105 END

  ViewVC Help
Powered by ViewVC 1.1.22