/[MITgcm]/MITgcm/pkg/pp81/pp81_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/pp81/pp81_readparms.F

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


Revision 1.1 - (show annotations) (download)
Thu Sep 2 09:11:54 2004 UTC (19 years, 9 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint58q_post, checkpoint54f_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint55a_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
o add two new packages
  - pp81 (Packanowski and Philander, 1981), Richardson number and
    stratification dependent mixing
  - my82 (Mellor and Yamada, 1982) level 2 turbulence closure scheme

1 C $Header: $
2 C $Name: $
3
4 #include "PP81_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PP81_READPARMS
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PP81_READPARMS( myThid )
11
12 C !DESCRIPTION:
13 C Initialize PP81 parameters, read in data.pp81
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PP81.h"
20 #include "PARAMS.h"
21
22 C !INPUT PARAMETERS: ===================================================
23 C myThid :: thread number
24 INTEGER myThid
25
26 C !OUTPUT PARAMETERS: ==================================================
27 C none
28
29 #ifdef ALLOW_PP81
30
31 C !LOCAL VARIABLES: ====================================================
32 C iUnit :: unit number for I/O
33 C msgBuf :: message buffer
34 INTEGER iUnit
35 CHARACTER*(MAX_LEN_MBUF) msgBuf
36 CEOP
37
38 NAMELIST /PP81_PARM01/
39 & PPnRi,
40 & PPviscMin,
41 & PPdiffMin,
42 & PPviscMax,
43 & PPnu0,
44 & PPalpha,
45 & PPdumpFreq,
46 & PPMixingMaps,
47 & PPwriteState,
48 & PPtaveFreq
49
50 C This routine has been called by the main model so we set our
51 C internal flag to indicate we are in business
52 PP81isON=.TRUE.
53
54 C Set defaults values for parameters in PP81.h
55 PPnRi = 2
56 PPviscMin = 0. _d 0
57 PPdiffMin = 0. _d 0
58 PPviscMax = 1. _d 0
59 PPnu0 = 1. _d -02
60 PPalpha = 5. _d 0
61 RiLimit = UNSET_RL
62 PPdumpFreq = dumpFreq
63 PPtaveFreq = taveFreq
64 PPMixingMaps = .FALSE.
65 PPwriteState = .FALSE.
66
67 C Open and read the data.pp81 file
68 _BEGIN_MASTER(myThid)
69 WRITE(msgBuf,'(A)') ' PP81_READPARMS: opening data.pp81'
70 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
71 & SQUEEZE_RIGHT , 1)
72 CALL OPEN_COPY_DATA_FILE(
73 I 'data.pp81', 'PP81_READPARMS',
74 O iUnit,
75 I myThid )
76 READ(UNIT=iUnit,NML=PP81_PARM01)
77 WRITE(msgBuf,'(A)')
78 & ' PP81_READPARMS: finished reading data.pp81'
79 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
80 & SQUEEZE_RIGHT , 1)
81
82 C Close the open data file
83 CLOSE(iUnit)
84 _END_MASTER(myThid)
85
86 C Everyone else must wait for the parameters to be loaded
87 _BARRIER
88
89 C Now set-up any remaining parameters that result from the input parameters
90 IF ( PPviscMax .LE. 0. ) THEN
91 WRITE(msgBuf,'(A)') 'PPviscMax must be greater than zero'
92 CALL PRINT_ERROR( msgBuf , 1)
93 STOP 'ABNORMAL END: S/R PP81_READPARMS'
94 ENDIF
95 IF ( PPalpha .EQ. 0. ) THEN
96 WRITE(msgBuf,'(A)') 'PPalpha must not be zero'
97 CALL PRINT_ERROR( msgBuf , 1)
98 STOP 'ABNORMAL END: S/R PP81_READPARMS'
99 ENDIF
100 IF ( PPnRi .EQ. 0 ) THEN
101 WRITE(msgBuf,'(A)') 'PPnRi must not be zero'
102 CALL PRINT_ERROR( msgBuf , 1)
103 STOP 'ABNORMAL END: S/R PP81_READPARMS'
104 ENDIF
105 IF ( RiLimit .EQ. UNSET_RL ) THEN
106 RiLimit=(((PPnu0+viscAr)/PPviscMax)**(1./REAL(PPnRi))-1.)
107 & /PPalpha
108 ENDIF
109 #endif /* ALLOW_PP81 */
110
111 RETURN
112 END

  ViewVC Help
Powered by ViewVC 1.1.22