1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm_phys/atm_phys_check.F,v 1.2 2013/06/28 21:25:25 jmc Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ATM_PHYS_OPTIONS.h" |
5 |
|
6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
CBOP 0 |
8 |
C !ROUTINE: ATM_PHYS_CHECK |
9 |
|
10 |
C !INTERFACE: |
11 |
SUBROUTINE ATM_PHYS_CHECK( myThid ) |
12 |
|
13 |
C !DESCRIPTION: |
14 |
C Check dependances with other packages |
15 |
|
16 |
C !USES: |
17 |
IMPLICIT NONE |
18 |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
20 |
#include "PARAMS.h" |
21 |
#include "ATM_PHYS_PARAMS.h" |
22 |
|
23 |
C !INPUT PARAMETERS: |
24 |
C myThid :: my Thread Id number |
25 |
INTEGER myThid |
26 |
CEOP |
27 |
|
28 |
#ifdef ALLOW_ATM_PHYS |
29 |
C !LOCAL VARIABLES: |
30 |
C msgBuf :: Informational/error message buffer |
31 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
32 |
|
33 |
_BEGIN_MASTER(myThid) |
34 |
|
35 |
WRITE(msgBuf,'(A)') 'ATM_PHYS_CHECK: #define ALLOW_ATM_PHYS' |
36 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
37 |
& SQUEEZE_RIGHT , 1) |
38 |
|
39 |
C-- Print out some kee parameters : |
40 |
CALL WRITE_0D_L( atmPhys_addTendT, INDEX_NONE, |
41 |
& 'atmPhys_addTendT =', |
42 |
& ' /* apply Atm-Phys tendency to Temperature Eq.*/') |
43 |
CALL WRITE_0D_L( atmPhys_addTendS, INDEX_NONE, |
44 |
& 'atmPhys_addTendS =', |
45 |
& ' /* apply Atm-Phys tendency to Salinity Eq.*/') |
46 |
CALL WRITE_0D_L( atmPhys_addTendU, INDEX_NONE, |
47 |
& 'atmPhys_addTendU =', |
48 |
& ' /* apply Atm-Phys tendency to U momentum Eq.*/') |
49 |
CALL WRITE_0D_L( atmPhys_addTendV, INDEX_NONE, |
50 |
& 'atmPhys_addTendV =', |
51 |
& ' /* apply Atm-Phys tendency to V momentum Eq.*/') |
52 |
CALL WRITE_0D_L( atmPhys_stepSST, INDEX_NONE, |
53 |
& 'atmPhys_stepSST =', ' /* step forward SST field */') |
54 |
IF ( atmPhys_tauDampUV.LE.zeroRL ) THEN |
55 |
CALL WRITE_0D_RL( atmPhys_tauDampUV, INDEX_NONE, |
56 |
& 'atmPhys_tauDampUV =', ' /* U,V damping time-scale (s) */') |
57 |
ELSE |
58 |
CALL WRITE_1D_RL( atmPhys_dampUVfac, Nr, INDEX_K, |
59 |
& 'atmPhys_dampUVfac =', ' /* U,V danping coefficient (1/s) */') |
60 |
ENDIF |
61 |
|
62 |
CALL WRITE_0D_C( atmPhys_sstFile, -1, INDEX_NONE, |
63 |
& 'atmPhys_sstFile =',' /* SST input file */') |
64 |
CALL WRITE_0D_C( atmPhys_QflxFile, -1, INDEX_NONE, |
65 |
& 'atmPhys_qFlxFile =',' /* Q-flux input file */') |
66 |
CALL WRITE_0D_C( atmPhys_mxldFile, -1, INDEX_NONE, |
67 |
& 'atmPhys_mxldFile =',' /* Mixed-Layer Depth inp. file */') |
68 |
CALL WRITE_0D_C( atmPhys_albedoFile, -1, INDEX_NONE, |
69 |
& 'atmPhys_albedoFile =',' /* Albedo input file */') |
70 |
|
71 |
C-- Check parameters: |
72 |
|
73 |
C- Put stops here if some flags are wrongly chosen. |
74 |
C- For example, require this package to use tempStepping |
75 |
IF ( .NOT.tempStepping .AND. atmPhys_addTendT ) THEN |
76 |
WRITE(msgBuf,'(A)') 'An example requirement is:' |
77 |
CALL PRINT_ERROR( msgBuf , 1) |
78 |
WRITE(msgBuf,'(A)') 'atmPhys_addTendT needs tempStepping=.true.' |
79 |
CALL PRINT_ERROR( msgBuf , 1) |
80 |
CALL ALL_PROC_DIE( 0 ) |
81 |
STOP 'ABNORMAL END: S/R ATM_PHYS_CHECK' |
82 |
ENDIF |
83 |
|
84 |
WRITE(msgBuf,'(A)') ' ' |
85 |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
86 |
& SQUEEZE_RIGHT , 1) |
87 |
_END_MASTER(myThid) |
88 |
|
89 |
#endif /* ALLOW_ATM_PHYS */ |
90 |
|
91 |
RETURN |
92 |
END |