1 |
C $Header: /u/gcmpack/MITgcm/pkg/longstep/longstep_init_fixed.F,v 1.1 2009/06/26 23:10:10 jahn Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "LONGSTEP_OPTIONS.h" |
5 |
|
6 |
CBOP |
7 |
C !ROUTINE: LONGSTEP_INIT_FIXED |
8 |
|
9 |
C !INTERFACE: |
10 |
SUBROUTINE LONGSTEP_INIT_FIXED( myThid ) |
11 |
|
12 |
C !DESCRIPTION: |
13 |
C Initialize longstep constant |
14 |
|
15 |
C !USES: |
16 |
IMPLICIT NONE |
17 |
#include "SIZE.h" |
18 |
#include "EEPARAMS.h" |
19 |
#include "PARAMS.h" |
20 |
#include "LONGSTEP_PARAMS.h" |
21 |
|
22 |
C !INPUT PARAMETERS: |
23 |
INTEGER myThid |
24 |
CEOP |
25 |
|
26 |
#ifdef ALLOW_LONGSTEP |
27 |
|
28 |
C !LOCAL VARIABLES: |
29 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
30 |
|
31 |
C whether to average EmPmR or PmEpR in LS_fwFlux |
32 |
#ifdef EXACT_CONSERV |
33 |
IF ( (nonlinFreeSurf.GT.0 .OR. usingPCoords) |
34 |
& .AND. useRealFreshWaterFlux ) THEN |
35 |
LS_usePmEpR = .TRUE. |
36 |
C can only do LS_staggerTimeStep if staggerTimeStep |
37 |
IF ( staggerTimeStep .AND. LS_whenToSample.LT.2 ) THEN |
38 |
WRITE(msgBuf,'(2A)') |
39 |
& ' LONGSTEP: staggerTimeStep with EXACT_CONSERV,', |
40 |
& ' useRealFreshWaterFlux' |
41 |
CALL PRINT_ERROR( msgBuf, myThid ) |
42 |
WRITE(msgBuf,'(2A)') |
43 |
& ' LONGSTEP: and nonlinFreeSurf or PCoords', |
44 |
& ' requires LS_whenToSample=2' |
45 |
CALL PRINT_ERROR( msgBuf, myThid ) |
46 |
STOP 'ABNORMAL END: S/R LONGSTEP_INIT_FIXED' |
47 |
ENDIF |
48 |
ELSE |
49 |
#else /* EXACT_CONSERV */ |
50 |
IF (.TRUE.) THEN |
51 |
#endif /* EXACT_CONSERV */ |
52 |
LS_usePmEpR = .FALSE. |
53 |
ENDIF |
54 |
|
55 |
#ifdef ALLOW_DIAGNOSTICS |
56 |
IF ( useDiagnostics ) THEN |
57 |
CALL LONGSTEP_DIAGNOSTICS_INIT( myThid ) |
58 |
ENDIF |
59 |
#endif |
60 |
|
61 |
#endif /* ALLOW_LONGSTEP */ |
62 |
|
63 |
RETURN |
64 |
END |