/[MITgcm]/MITgcm/pkg/ptracers/ptracers_readparms.F
ViewVC logotype

Contents of /MITgcm/pkg/ptracers/ptracers_readparms.F

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


Revision 1.1 - (show annotations) (download)
Mon Mar 4 19:01:29 2002 UTC (22 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint44f_post, checkpoint46b_post, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint44h_pre, checkpoint48h_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint46b_pre, checkpoint48a_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, checkpoint44g_post, checkpoint46e_pre, checkpoint48c_post, checkpoint45b_post, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint51e_post, checkpoint47, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint48g_post, checkpoint47h_post, checkpoint46d_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-exfmods-curt, ecco-branch
Added PTRACERS package

This allows an arbitrary number of passive tracers to be integrated
forward simultaneously with the dynamicaly model.
 + Implemented so far:
    - basic forward algorithm (time-stepping, advection, diffusion, convection)
    - I/O and checkpointing
    - GM/Redi  *but*  using the GM/Redi coefficient of Salt
 + Not implemented so far:
    - KPP
    - OBCS
 + No specific example supplied (yet) but global_ocean.90x40x15 has the
   necessary data.ptracer file. Simply use -enable=ptracers and uncomment
   line in data.pkg. PTRACER01 then reproduces Salt exactly.
 + This package is disabled by default since it increases storage.

1 C $Header: $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_READPARMS
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_READPARMS( myThid )
11
12 C !DESCRIPTION:
13 C Initialize PTRACERS parameters, read in data.ptracers
14
15 C !USES: ===============================================================
16 IMPLICIT NONE
17 #include "SIZE.h"
18 #include "EEPARAMS.h"
19 #include "PTRACERS.h"
20
21 C !INPUT PARAMETERS: ===================================================
22 C myThid :: thread number
23 INTEGER myThid
24
25 C !OUTPUT PARAMETERS: ==================================================
26 C none
27
28 #ifdef ALLOW_PTRACERS
29
30 C !LOCAL VARIABLES: ====================================================
31 C iTracer :: loop indices
32 C iUnit :: unit number for I/O
33 C msgBuf :: message buffer
34 INTEGER iTracer
35 INTEGER iUnit
36 CHARACTER*(MAX_LEN_MBUF) msgBuf
37 CEOP
38
39 C This routine has been called by the main model so we set our
40 C internal flag to indicate we are in business
41 PTRACERSisON=.TRUE.
42
43 C Set defaults values for parameters in PTRACERS.h
44 PTRACERS_numInUse=-1
45 DO iTracer=1,PTRACERS_num
46 PTRACERS_advScheme(iTracer)=0
47 PTRACERS_diffKh(iTracer)=0.
48 PTRACERS_diffK4(iTracer)=0.
49 PTRACERS_diffKr(iTracer)=0.
50 PTRACERS_useGMRedi(iTracer)=.FALSE.
51 PTRACERS_useKPP(iTracer)=.FALSE.
52 PTRACERS_initialFile(iTracer)=' '
53 ENDDO
54
55 C Open and read the data.ptracers file
56 _BEGIN_MASTER(myThid)
57 WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers'
58 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
59 & SQUEEZE_RIGHT , 1)
60 CALL OPEN_COPY_DATA_FILE(
61 I 'data.ptracers', 'PTRACERS_READPARMS',
62 O iUnit,
63 I myThid )
64 READ(UNIT=iUnit,NML=PTRACERS_PARM01)
65 WRITE(msgBuf,'(A)')
66 & ' PTRACERS_READPARMS: finished reading data.ptracers'
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 Now set-up any remaining parameters that result from the input parameters
78
79 C If PTRACERS_numInUse was not set in data.ptracers then we can assume
80 C that all PTRACERS fields will be in use
81 IF (PTRACERS_numInUse.LT.0) THEN
82 PTRACERS_numInUse=PTRACERS_num
83 ENDIF
84 C Check we are not trying to use more tracers than allowed
85 IF (PTRACERS_numInUse.GT.PTRACERS_num) THEN
86 WRITE(msgBuf,'(A,I2,A,I2,A)')
87 & ' PTRACERS_READPARMS: You requested ',PTRACERS_numInUse,
88 & ' tracers at run time when only ',PTRACERS_num,
89 & ' were specified at compile time. Naughty! '
90 CALL PRINT_ERROR(msgBuf, 1)
91 STOP 'ABNORMAL END: S/R PTRACERS_READPARMS'
92 ENDIF
93 C Check that enough parameters were specified
94 DO iTracer=1,PTRACERS_numInUse
95 IF (PTRACERS_advScheme(iTracer).EQ.0) THEN
96 WRITE(msgBuf,'(A,I2)')
97 & ' PTRACERS_READPARMS: No advect. scheme specified for tracer #',
98 & iTracer
99 CALL PRINT_ERROR(msgBuf, 1)
100 STOP 'ABNORMAL END: S/R PTRACERS_READPARMS'
101 ENDIF
102 ENDDO
103
104
105 #endif /* ALLOW_PTRACERS */
106
107 RETURN
108 END

  ViewVC Help
Powered by ViewVC 1.1.22