1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
|
|
|
4 |
#include "PACKAGES_CONFIG.h" |
#include "PACKAGES_CONFIG.h" |
5 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
6 |
|
#ifdef ALLOW_AUTODIFF |
7 |
c#ifdef ALLOW_GMREDI |
# include "AUTODIFF_OPTIONS.h" |
8 |
c# include "GMREDI_OPTIONS.h" |
#endif |
9 |
c#endif |
#ifdef ALLOW_COST |
10 |
c#ifdef ALLOW_OBCS |
# include "COST_OPTIONS.h" |
11 |
c# include "OBCS_OPTIONS.h" |
#endif |
12 |
c#endif |
#ifdef ALLOW_CTRL |
13 |
|
# include "CTRL_OPTIONS.h" |
14 |
|
#endif |
15 |
|
#ifdef ALLOW_EXF |
16 |
|
# include "EXF_OPTIONS.h" |
17 |
|
#endif |
18 |
|
|
19 |
CBOP |
CBOP |
20 |
C !ROUTINE: LOAD_FIELDS_DRIVER |
C !ROUTINE: LOAD_FIELDS_DRIVER |
36 |
C | |
C | |
37 |
C |-- EXF_GETFORCING |
C |-- EXF_GETFORCING |
38 |
C | |
C | |
39 |
C |-- EXTERNAL_FIELDS_LOAD |
C |-- CHEAPAML_FIELDS_LOAD |
40 |
C | |
C | |
41 |
C |-- OFFLINE_FIELDS_LOAD |
C |-- EXTERNAL_FIELDS_LOAD |
42 |
C | |
C | |
43 |
C |-- GCHEM_FIELDS_LOAD |
C |-- GCHEM_FIELDS_LOAD |
44 |
C | |
C | |
45 |
C |-- RBCS_FIELDS_LOAD |
C |-- RBCS_FIELDS_LOAD |
46 |
C | |
C | |
47 |
C |-- AIM_FIELDS_LOAD |
C |-- AIM_FIELDS_LOAD |
|
C | |
|
|
C |-- CHEAPAML_FIELDS_LOAD |
|
|
|
|
48 |
|
|
49 |
C !USES: |
C !USES: |
50 |
IMPLICIT NONE |
IMPLICIT NONE |
52 |
#include "SIZE.h" |
#include "SIZE.h" |
53 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
54 |
#include "PARAMS.h" |
#include "PARAMS.h" |
55 |
c#include "DYNVARS.h" |
#include "FFIELDS.h" |
|
|
|
|
c#ifdef ALLOW_SHAP_FILT |
|
|
c# include "SHAP_FILT.h" |
|
|
c#endif |
|
|
c#ifdef ALLOW_ZONAL_FILT |
|
|
c# include "ZONAL_FILT.h" |
|
|
c#endif |
|
|
c#ifdef COMPONENT_MODULE |
|
|
c# include "CPL_PARAMS.h" |
|
|
c#endif |
|
|
|
|
|
#ifdef ALLOW_AUTODIFF_TAMC |
|
56 |
|
|
57 |
|
#ifdef ALLOW_AUTODIFF |
58 |
# include "tamc.h" |
# include "tamc.h" |
59 |
|
# include "CTRL_SIZE.h" |
60 |
# include "ctrl.h" |
# include "ctrl.h" |
61 |
# include "ctrl_dummy.h" |
# include "ctrl_dummy.h" |
62 |
# include "cost.h" |
# include "cost.h" |
|
# include "FFIELDS.h" |
|
63 |
# include "EOS.h" |
# include "EOS.h" |
|
c# if (defined NONLIN_FRSURF) || (defined ALLOW_DEPTH_CONTROL) |
|
|
c# include "GRID.h" |
|
|
c# endif |
|
64 |
# ifdef ALLOW_EXF |
# ifdef ALLOW_EXF |
65 |
# include "EXF_FIELDS.h" |
# include "EXF_FIELDS.h" |
66 |
# ifdef ALLOW_BULKFORMULAE |
# include "EXF_CONSTANTS.h" |
|
# include "EXF_CONSTANTS.h" |
|
|
# endif |
|
67 |
# endif |
# endif |
68 |
c# ifdef ALLOW_OBCS |
#endif /* ALLOW_AUTODIFF */ |
|
c# include "OBCS.h" |
|
|
c# ifdef ALLOW_PTRACERS |
|
|
c# include "PTRACERS_SIZE.h" |
|
|
c# include "OBCS_PTRACERS.h" |
|
|
c# endif |
|
|
c# endif |
|
|
c# ifdef ALLOW_CD_CODE |
|
|
c# include "CD_CODE_VARS.h" |
|
|
c# endif |
|
|
c# ifdef ALLOW_THSICE |
|
|
c# include "THSICE_VARS.h" |
|
|
c# endif |
|
|
c# ifdef ALLOW_EBM |
|
|
c# include "EBM.h" |
|
|
c# endif |
|
|
c# ifdef EXACT_CONSERV |
|
|
c# include "SURFACE.h" |
|
|
c# endif |
|
|
c# ifdef ALLOW_KPP |
|
|
c# include "KPP.h" |
|
|
c# endif |
|
|
c# ifdef ALLOW_GMREDI |
|
|
c# include "GMREDI.h" |
|
|
c# endif |
|
|
#endif /* ALLOW_AUTODIFF_TAMC */ |
|
69 |
|
|
70 |
C !LOCAL VARIABLES: |
C !INPUT/OUTPUT PARAMETERS: |
|
C == Routine arguments == |
|
71 |
C myTime :: time counter for this thread |
C myTime :: time counter for this thread |
72 |
C myIter :: iteration counter for this thread |
C myIter :: iteration counter for this thread |
73 |
C myThid :: thread number for this instance of the routine. |
C myThid :: thread number for this instance of the routine. |
75 |
INTEGER myIter |
INTEGER myIter |
76 |
INTEGER myThid |
INTEGER myThid |
77 |
|
|
78 |
C == Local variables == |
C !LOCAL VARIABLES: |
79 |
|
#if (defined ALLOW_ADDFLUID) || (defined ALLOW_FRICTION_HEATING) |
80 |
|
INTEGER i,j,k,bi,bj |
81 |
|
#endif |
82 |
CEOP |
CEOP |
83 |
|
|
84 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
85 |
IF (debugMode) CALL DEBUG_ENTER( 'LOAD_FIELDS_DRIVER', myThid ) |
IF (debugMode) CALL DEBUG_ENTER( 'LOAD_FIELDS_DRIVER', myThid ) |
86 |
#endif |
#endif |
87 |
|
|
88 |
|
C-- Initialise forcing arrays that may receive multiple contributions |
89 |
|
#ifdef ALLOW_ADDFLUID |
90 |
|
IF ( selectAddFluid.NE.0 .AND. addMassFile.EQ.' ' ) THEN |
91 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
92 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
93 |
|
DO k=1,Nr |
94 |
|
DO j=1-OLy,sNy+OLy |
95 |
|
DO i=1-OLx,sNx+OLx |
96 |
|
addMass(i,j,k,bi,bj) = 0. _d 0 |
97 |
|
ENDDO |
98 |
|
ENDDO |
99 |
|
ENDDO |
100 |
|
ENDDO |
101 |
|
ENDDO |
102 |
|
ENDIF |
103 |
|
#endif /* ALLOW_ADDFLUID */ |
104 |
|
|
105 |
|
#ifdef ALLOW_FRICTION_HEATING |
106 |
|
IF ( addFrictionHeating .AND. staggerTimeStep ) THEN |
107 |
|
DO bj=myByLo(myThid),myByHi(myThid) |
108 |
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
109 |
|
DO k=1,Nr |
110 |
|
DO j=1-OLy,sNy+OLy |
111 |
|
DO i=1-OLx,sNx+OLx |
112 |
|
frictionHeating(i,j,k,bi,bj) = 0. _d 0 |
113 |
|
ENDDO |
114 |
|
ENDDO |
115 |
|
ENDDO |
116 |
|
ENDDO |
117 |
|
ENDDO |
118 |
|
ENDIF |
119 |
|
#endif /* ALLOW_FRICTION_HEATING */ |
120 |
|
|
121 |
|
C-- Map generic time varying controls to xx_gentim2d |
122 |
|
#ifdef ALLOW_CTRL |
123 |
|
if (useCTRL) CALL CTRL_MAP_GENTIM2D( myTime, myIter, myThid ) |
124 |
|
#endif |
125 |
|
|
126 |
#ifdef ALLOW_BULK_FORCE |
#ifdef ALLOW_BULK_FORCE |
127 |
IF ( useBulkForce ) THEN |
IF ( useBulkForce ) THEN |
128 |
C-- Bulk-Formulae pkg: load all forcing fields at current time |
C-- Bulk-Formulae pkg: load all forcing fields at current time |
157 |
ENDIF |
ENDIF |
158 |
#endif /*ALLOW_CHEAPAML */ |
#endif /*ALLOW_CHEAPAML */ |
159 |
|
|
160 |
c IF ( .NOT.useEXF ) THEN |
#ifdef ALLOW_AUTODIFF |
161 |
C- note (useEBM): needs modifications to be compatible with this call |
IF ( .NOT. useEXF ) THEN |
162 |
IF ( .NOT.(useEXF.OR.useEBM) ) THEN |
#endif /* ALLOW_AUTODIFF */ |
163 |
#ifdef ALLOW_DEBUG |
#ifdef ALLOW_DEBUG |
164 |
IF (debugMode) CALL DEBUG_CALL('EXTERNAL_FIELDS_LOAD',myThid) |
IF (debugMode) CALL DEBUG_CALL('EXTERNAL_FIELDS_LOAD',myThid) |
165 |
#endif |
#endif |
166 |
CALL TIMER_START('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
CALL TIMER_START('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
167 |
CALL EXTERNAL_FIELDS_LOAD( myTime, myIter, myThid ) |
CALL EXTERNAL_FIELDS_LOAD( myTime, myIter, myThid ) |
168 |
CALL TIMER_STOP ('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
CALL TIMER_STOP ('EXTERNAL_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
169 |
|
#ifdef ALLOW_AUTODIFF |
170 |
|
ENDIF |
171 |
|
#endif /* ALLOW_AUTODIFF */ |
172 |
#ifdef NONLIN_FRSURF |
#ifdef NONLIN_FRSURF |
173 |
CADJ STORE SST = comlev1, key = ikey_dynamics, kind = isbyte |
CADJ STORE SST = comlev1, key = ikey_dynamics, kind = isbyte |
174 |
CADJ STORE SSS = comlev1, key = ikey_dynamics, kind = isbyte |
CADJ STORE SSS = comlev1, key = ikey_dynamics, kind = isbyte |
176 |
CADJ STORE Qsw = comlev1, key = ikey_dynamics, kind = isbyte |
CADJ STORE Qsw = comlev1, key = ikey_dynamics, kind = isbyte |
177 |
# endif |
# endif |
178 |
#endif |
#endif |
|
ENDIF |
|
|
|
|
|
#ifdef ALLOW_OFFLINE |
|
|
IF ( useOffLine ) THEN |
|
|
#ifdef ALLOW_DEBUG |
|
|
IF (debugMode) CALL DEBUG_CALL('OFFLINE_FIELDS_LOAD',myThid) |
|
|
#endif /* ALLOW_DEBUG */ |
|
|
CALL TIMER_START('OFFLINE_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
|
|
CALL OFFLINE_FIELDS_LOAD( myTime, myIter, myThid ) |
|
|
CALL TIMER_STOP ('OFFLINE_FLDS_LOAD [LOAD_FLDS_DRIVER]',myThid) |
|
|
ENDIF |
|
|
#endif /* ALLOW_OFFLINE */ |
|
179 |
|
|
180 |
#ifdef ALLOW_GCHEM |
#ifdef ALLOW_GCHEM |
181 |
IF ( useGCHEM ) THEN |
IF ( useGCHEM ) THEN |