/[MITgcm]/MITgcm/pkg/ggl90/ggl90_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/ggl90/ggl90_readparms.F

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


Revision 1.2 - (hide annotations) (download)
Mon Sep 27 08:02:04 2004 UTC (19 years, 7 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint57m_post, checkpoint57s_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint57g_pre, checkpoint56c_post, checkpoint57y_pre, checkpoint57f_pre, checkpoint57a_post, checkpoint55g_post, checkpoint55f_post, checkpoint57r_post, 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, checkpoint57q_post, checkpoint57z_post, checkpoint57c_post, checkpoint55e_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +3 -1 lines
  - add horizontal diffusion of TKE, requires exchanges in
    do_fields_blocking_exchanges, horizontal diffusivity is zero by
    default. In OPA there is no horizontal diffusion of TKE but the
    mixing coefficients are computed from a horizontal average of TKE of
    6 points or so. I think that diffusion has a little more physical
    justification.
  - clean up ggl90_calc in the hope of reducing memory usage (this hope
    was in vain)
  - mask tke-variable in ggl90_init

1 mlosch 1.2 C $Header: /u/gcmpack/MITgcm/pkg/ggl90/ggl90_readparms.F,v 1.1 2004/09/16 11:27:18 mlosch Exp $
2 mlosch 1.1 C $Name: $
3     #include "GGL90_OPTIONS.h"
4    
5     SUBROUTINE GGL90_READPARMS( myThid )
6     C /==========================================================\
7     C | SUBROUTINE GGL90_READPARMS |
8     C | o Routine to read in file data.ggl90 |
9     C \==========================================================/
10     IMPLICIT NONE
11    
12     C === Global variables ===
13     #include "SIZE.h"
14     #include "EEPARAMS.h"
15     #include "PARAMS.h"
16     #include "GRID.h"
17     #include "GGL90.h"
18    
19     C === Routine arguments ===
20     C myThid - Number of this instance of GGL90_READPARMS
21     INTEGER myThid
22    
23     #ifdef ALLOW_GGL90
24    
25     C === Local variables ===
26     C msgBuf - Informational/error meesage buffer
27     C errIO - IO error flag
28     C iUnit - Work variable for IO unit number
29    
30     CHARACTER*(MAX_LEN_MBUF) msgBuf
31     INTEGER errIO, iUnit
32    
33     C-- GGL90 vertical mixing parameters
34     NAMELIST /GGL90_PARM01/
35     & GGL90dumpFreq, GGL90taveFreq,
36 mlosch 1.2 & GGL90diffTKEh,
37 mlosch 1.1 & GGL90mixingMaps, GGL90writeState,
38     & GGL90ck, GGL90ceps, GGL90alpha, GGL90m2,
39     & GGL90TKEmin, GGL90TKEbottom,
40     & GGL90mixingLengthMin, GGL90viscMax, GGL90diffMax,
41     & GGL90TKEFile
42     _BEGIN_MASTER(myThid)
43    
44     WRITE(msgBuf,'(A)') ' GGL90_READPARMS: opening data.ggl90'
45     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
46     & SQUEEZE_RIGHT , 1)
47    
48    
49     CALL OPEN_COPY_DATA_FILE(
50     I 'data.ggl90', 'GGL90_READPARMS',
51     O iUnit,
52     I myThid )
53    
54     C-- set default TKE vertical mixing parameters
55     GGL90dumpFreq = dumpFreq
56     GGL90taveFreq = taveFreq
57     GGL90mixingMaps = .FALSE.
58     GGL90writeState = .FALSE.
59     GGL90ck = 0.1 _d 0
60     GGL90ceps = 0.7 _d 0
61     GGL90alpha = 1.0 _d 0
62     GGL90m2 = 3.0 _d 0
63     GGL90TKEmin = 1.0 _d -11
64     GGL90TKEbottom = UNSET_RL
65     GGL90viscMax = 1.0 _d 0
66     GGL90diffMax = 1.0 _d 1
67 mlosch 1.2 GGL90diffTKEh = 0.0 _d 0
68 mlosch 1.1 GGL90mixingLengthMin = 1.0 _d -08
69     GGL90TKEFile = ' '
70    
71     C-----------------------------------------------------------------------
72     C define some non-dimensional constants and
73     C the vertical mixing coefficients in m-k-s units
74     C-----------------------------------------------------------------------
75    
76     C-- Read settings from model parameter file "data.ggl90".
77     READ(UNIT=iUnit,NML=GGL90_PARM01,IOSTAT=errIO)
78     IF ( errIO .LT. 0 ) THEN
79     WRITE(msgBuf,'(A)')
80     & 'S/R INI_PARMS'
81     CALL PRINT_ERROR( msgBuf , 1)
82     WRITE(msgBuf,'(A)')
83     & 'Error reading numerical model '
84     CALL PRINT_ERROR( msgBuf , 1)
85     WRITE(msgBuf,'(A)')
86     & 'parameter file "data.ggl90"'
87     CALL PRINT_ERROR( msgBuf , 1)
88     WRITE(msgBuf,'(A)')
89     & 'Problem in namelist GGL90_PARM01'
90     CALL PRINT_ERROR( msgBuf , 1)
91     C CALL MODELDATA_EXAMPLE( myThid )
92     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
93     ENDIF
94    
95     CLOSE(iUnit)
96    
97     WRITE(msgBuf,'(A)')
98     & ' GGL90_READPARMS: finished reading data.ggl90'
99     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
100     & SQUEEZE_RIGHT , 1)
101    
102     _END_MASTER(myThid)
103    
104     C-- Everyone else must wait for the parameters to be loaded
105     _BARRIER
106    
107     C Now set-up any remaining parameters that result from the input parameters
108     IF ( GGL90TKEbottom .EQ. UNSET_RL ) THEN
109     GGL90TKEbottom = GGL90TKEmin
110     ENDIF
111     IF ( GGL90TKEmin .LE. 0. ) THEN
112     WRITE(msgBuf,'(A)')
113     & 'GGL90TKEmin must be greater than zero'
114     CALL PRINT_ERROR( msgBuf , 1)
115     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
116     ENDIF
117     IF ( GGL90TKEbottom .LT. 0. ) THEN
118     WRITE(msgBuf,'(A)')
119     & 'GGL90TKEbottom must not be less than zero'
120     CALL PRINT_ERROR( msgBuf , 1)
121     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
122     ENDIF
123     IF ( GGL90mixingLengthMin .LE. 0. ) THEN
124     WRITE(msgBuf,'(A)')
125     & 'GGL90mixingLengthMin must be greater than zero'
126     CALL PRINT_ERROR( msgBuf , 1)
127     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
128     ENDIF
129     IF ( GGL90viscMax .LE. 0. ) THEN
130     WRITE(msgBuf,'(A)') 'GGL90viscMax must be greater than zero'
131     CALL PRINT_ERROR( msgBuf , 1)
132     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
133     ENDIF
134     IF ( GGL90diffMax .LE. 0. ) THEN
135     WRITE(msgBuf,'(A)') 'GGL90diffMax must be greater than zero'
136     CALL PRINT_ERROR( msgBuf , 1)
137     STOP 'ABNORMAL END: S/R GGL90_READPARMS'
138     ENDIF
139    
140     #endif /* ALLOW_GGL90 */
141    
142     return
143     end

  ViewVC Help
Powered by ViewVC 1.1.22