1 |
stephd |
1.11 |
C $Header: /u/gcmpack/MITgcm/pkg/dic/dic_ini_forcing.F,v 1.10 2007/11/05 19:02:08 jmc Exp $ |
2 |
jmc |
1.3 |
C $Name: $ |
3 |
|
|
|
4 |
stephd |
1.1 |
#include "DIC_OPTIONS.h" |
5 |
|
|
#include "GCHEM_OPTIONS.h" |
6 |
|
|
|
7 |
stephd |
1.2 |
CBOP |
8 |
|
|
C !ROUTINE: GCHEM_FORCING_INT |
9 |
|
|
|
10 |
|
|
C !INTERFACE: ========================================================== |
11 |
stephd |
1.1 |
SUBROUTINE DIC_INI_FORCING( myThid ) |
12 |
|
|
|
13 |
stephd |
1.2 |
C !DESCRIPTION: |
14 |
|
|
c initializes forcing fields to zero |
15 |
stephd |
1.5 |
c (or to reasonable values) |
16 |
stephd |
1.2 |
|
17 |
|
|
C !USES: =============================================================== |
18 |
stephd |
1.1 |
IMPLICIT NONE |
19 |
|
|
#include "SIZE.h" |
20 |
|
|
#include "DYNVARS.h" |
21 |
|
|
#include "EEPARAMS.h" |
22 |
|
|
#include "PARAMS.h" |
23 |
|
|
#include "GRID.h" |
24 |
jmc |
1.10 |
c#include "PTRACERS_SIZE.h" |
25 |
|
|
c#include "PTRACERS_PARAMS.h" |
26 |
|
|
c#include "PTRACERS_FIELDS.h" |
27 |
stephd |
1.1 |
#include "GCHEM.h" |
28 |
|
|
#include "DIC_ABIOTIC.h" |
29 |
|
|
#include "DIC_BIOTIC.h" |
30 |
|
|
#include "DIC_LOAD.h" |
31 |
|
|
|
32 |
stephd |
1.2 |
C !INPUT PARAMETERS: =================================================== |
33 |
|
|
C myThid :: thread number |
34 |
stephd |
1.1 |
INTEGER myThid |
35 |
stephd |
1.2 |
CEOP |
36 |
stephd |
1.1 |
|
37 |
|
|
#ifdef ALLOW_PTRACERS |
38 |
stephd |
1.5 |
|
39 |
|
|
c !LOCAL VARIABLES: =================================================== |
40 |
|
|
INTEGER bi,bj,i,j |
41 |
stephd |
1.6 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
42 |
stephd |
1.1 |
c |
43 |
|
|
C First call requires that we initialize everything to zero for safety |
44 |
|
|
CALL LEF_ZERO( wspeed0,myThid ) |
45 |
|
|
CALL LEF_ZERO( wspeed1,myThid ) |
46 |
|
|
CALL LEF_ZERO( atmosp0,myThid ) |
47 |
|
|
CALL LEF_ZERO( atmosp1,myThid ) |
48 |
|
|
CALL LEF_ZERO( silica0,myThid ) |
49 |
|
|
CALL LEF_ZERO( silica1,myThid ) |
50 |
|
|
CALL LEF_ZERO( ice0,myThid ) |
51 |
|
|
CALL LEF_ZERO( ice1,myThid ) |
52 |
stephd |
1.4 |
#ifdef READ_PAR |
53 |
|
|
CALL LEF_ZERO( par0,myThid ) |
54 |
|
|
CALL LEF_ZERO( par1,myThid ) |
55 |
|
|
#endif |
56 |
stephd |
1.1 |
# ifdef ALLOW_FE |
57 |
|
|
CALL LEF_ZERO( feinput0,myThid ) |
58 |
|
|
CALL LEF_ZERO( feinput1,myThid ) |
59 |
|
|
# endif |
60 |
|
|
|
61 |
|
|
_EXCH_XY_R4(wspeed0, myThid ) |
62 |
|
|
_EXCH_XY_R4(wspeed1, myThid ) |
63 |
|
|
_EXCH_XY_R4(atmosp0, myThid ) |
64 |
|
|
_EXCH_XY_R4(atmosp1, myThid ) |
65 |
|
|
_EXCH_XY_R4(silica0, myThid ) |
66 |
|
|
_EXCH_XY_R4(silica1, myThid ) |
67 |
|
|
_EXCH_XY_R4(ice0, myThid ) |
68 |
|
|
_EXCH_XY_R4(ice1, myThid ) |
69 |
stephd |
1.4 |
#ifdef READ_PAR |
70 |
|
|
_EXCH_XY_R4(par0, myThid ) |
71 |
|
|
_EXCH_XY_R4(par1, myThid ) |
72 |
|
|
#endif |
73 |
stephd |
1.1 |
# ifdef ALLOW_FE |
74 |
|
|
_EXCH_XY_R4(feinput0, myThid ) |
75 |
|
|
_EXCH_XY_R4(feinput1, myThid ) |
76 |
|
|
# endif |
77 |
|
|
|
78 |
stephd |
1.6 |
#ifdef READ_PAR |
79 |
stephd |
1.7 |
#ifdef USE_QSW |
80 |
stephd |
1.6 |
WRITE(msgBuf,'(2A)') |
81 |
|
|
& ' DIC_INI_FORCING: You can not use READ_PAR ', |
82 |
stephd |
1.7 |
& ' and USE_QSW' |
83 |
stephd |
1.6 |
CALL PRINT_ERROR( msgBuf, myThid ) |
84 |
|
|
STOP 'ABNORMAL END: S/R DIC_INI_FORCING' |
85 |
|
|
#endif |
86 |
|
|
#endif |
87 |
|
|
|
88 |
stephd |
1.11 |
QSW_underice=.FALSE. |
89 |
|
|
#ifdef USE_QSW_UNDERICE |
90 |
|
|
QSW_underice=.TRUE. |
91 |
|
|
#endif |
92 |
|
|
#if (defined (ALLOW_SEAICE) && defined (USE_QSW)) |
93 |
|
|
c if using Qsw and seaice, then ice fraction is already |
94 |
|
|
c taken into account |
95 |
|
|
QSW_underice=.TRUE. |
96 |
|
|
#endif |
97 |
|
|
#if (defined (ALLOW_THSICE) && defined (USE_QSW)) |
98 |
|
|
QSW_underice=.TRUE. |
99 |
|
|
#endif |
100 |
|
|
|
101 |
|
|
|
102 |
stephd |
1.5 |
c set reasonable values to those that need at least something |
103 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
104 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
105 |
|
|
DO j=1-Oly,sNy+Oly |
106 |
|
|
DO i=1-Olx,sNx+Olx |
107 |
dfer |
1.9 |
WIND(i,j,bi,bj) = 5. _d 0*maskC(i,j,1,bi,bj) |
108 |
|
|
AtmosP(i,j,bi,bj) = 1. _d 0*maskC(i,j,1,bi,bj) |
109 |
|
|
SILICA(i,j,bi,bj) = 7.6838 _d -3*maskC(i,j,1,bi,bj) |
110 |
|
|
FIce(i,j,bi,bj) = 0. _d 0 |
111 |
stephd |
1.5 |
#ifdef READ_PAR |
112 |
dfer |
1.9 |
PAR(i,j,bi,bj) = 100. _d 0*maskC(i,j,1,bi,bj) |
113 |
stephd |
1.5 |
#endif |
114 |
|
|
#ifdef ALLOW_FE |
115 |
dfer |
1.9 |
InputFe(i,j,bi,bj)= 1. _d -11*maskC(i,j,1,bi,bj) |
116 |
stephd |
1.5 |
#endif |
117 |
|
|
ENDDO |
118 |
|
|
ENDDO |
119 |
|
|
ENDDO |
120 |
|
|
ENDDO |
121 |
|
|
|
122 |
|
|
|
123 |
stephd |
1.1 |
#endif |
124 |
|
|
RETURN |
125 |
|
|
END |