43 |
C | |
C | |
44 |
C |-INITIALISE_FIXED :: Set fixed model arrays such as topography, |
C |-INITIALISE_FIXED :: Set fixed model arrays such as topography, |
45 |
C | | :: grid, solver matrices etc.. |
C | | :: grid, solver matrices etc.. |
46 |
C | | |
C | | |
47 |
C | |-INI_PARMS :: Routine to set kernel model parameters. |
C | |-INI_PARMS :: Routine to set kernel model parameters. |
48 |
C | | :: By default kernel parameters are read from file |
C | | :: By default kernel parameters are read from file |
49 |
C | | :: "data" in directory in which code executes. |
C | | :: "data" in directory in which code executes. |
163 |
C | | | | |-FIND_RHO :: Find adjacent densities. |
C | | | | |-FIND_RHO :: Find adjacent densities. |
164 |
C | | | | |-CONVECT :: Mix static instability. |
C | | | | |-CONVECT :: Mix static instability. |
165 |
C | | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
C | | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
166 |
C | | | | |
C | | | | |
167 |
C | | | |-CALC_EXACT_ETA :: Change SSH to flow divergence. |
C | | | |-CALC_EXACT_ETA :: Change SSH to flow divergence. |
168 |
C | | | |
C | | | |
169 |
C | | |-CONVECTIVE_ADJUSTMENT_INI :: Control static instability mixing |
C | | |-CONVECTIVE_ADJUSTMENT_INI :: Control static instability mixing |
170 |
C | | | | :: Extra time history interactions. |
C | | | | :: Extra time history interactions. |
171 |
C | | | | |
C | | | | |
172 |
C | | | |-FIND_RHO :: Find adjacent densities. |
C | | | |-FIND_RHO :: Find adjacent densities. |
173 |
C | | | |-CONVECT :: Mix static instability. |
C | | | |-CONVECT :: Mix static instability. |
174 |
C | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
C | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
178 |
C | | | | |
C | | | | |
179 |
C | | | |-GMREDI_INIT :: GM package. ( see pkg/gmredi ) |
C | | | |-GMREDI_INIT :: GM package. ( see pkg/gmredi ) |
180 |
C | | | |-KPP_INIT :: KPP package. ( see pkg/kpp ) |
C | | | |-KPP_INIT :: KPP package. ( see pkg/kpp ) |
181 |
C | | | |-KPP_OPEN_DIAGS |
C | | | |-KPP_OPEN_DIAGS |
182 |
C | | | |-OBCS_INIT_VARIABLES :: Open bndy. package. ( see pkg/obcs ) |
C | | | |-OBCS_INIT_VARIABLES :: Open bndy. package. ( see pkg/obcs ) |
183 |
C | | | |-PTRACERS_INIT :: multi. tracer package,(see pkg/ptracers) |
C | | | |-PTRACERS_INIT :: multi. tracer package,(see pkg/ptracers) |
184 |
C | | | |-GCHEM_INIT :: tracer interface pkg (see pkh/gchem) |
C | | | |-GCHEM_INIT :: tracer interface pkg (see pkh/gchem) |
222 |
C/\ | | |-EXTERNAL_FIELDS_LOAD :: Control loading time dep. external data. |
C/\ | | |-EXTERNAL_FIELDS_LOAD :: Control loading time dep. external data. |
223 |
C/\ | | | | :: Simple interpolation between end-points |
C/\ | | | | :: Simple interpolation between end-points |
224 |
C/\ | | | | :: for forcing datasets. |
C/\ | | | | :: for forcing datasets. |
225 |
C/\ | | | | |
C/\ | | | | |
226 |
C/\ | | | |-EXCH :: Sync forcing. in overlap regions. |
C/\ | | | |-EXCH :: Sync forcing. in overlap regions. |
227 |
C/\ | | |-SEAICE_MODEL :: Compute sea-ice terms. ( pkg/seaice ) |
C/\ | | |-SEAICE_MODEL :: Compute sea-ice terms. ( pkg/seaice ) |
228 |
C/\ | | |-FREEZE :: Limit surface temperature. |
C/\ | | |-FREEZE :: Limit surface temperature. |
307 |
C/\ | | | | Potential anomaly. |
C/\ | | | | Potential anomaly. |
308 |
C/\ | | | |-CALC_VISCOSITY :: Calculate net vertical viscosity |
C/\ | | | |-CALC_VISCOSITY :: Calculate net vertical viscosity |
309 |
C/\ | | | | |-KPP_CALC_VISC :: KPP package ( see pkg/kpp ). |
C/\ | | | | |-KPP_CALC_VISC :: KPP package ( see pkg/kpp ). |
310 |
C/\ | | | | |
C/\ | | | | |
311 |
C/\ | | | |-CALC_PHI_HYD :: Integrate the hydrostatic relation. |
C/\ | | | |-CALC_PHI_HYD :: Integrate the hydrostatic relation. |
312 |
C/\ | | | |-MOM_FLUXFORM :: Flux form mom eqn. package ( see |
C/\ | | | |-MOM_FLUXFORM :: Flux form mom eqn. package ( see |
313 |
C/\ | | | | pkg/mom_fluxform ). |
C/\ | | | | pkg/mom_fluxform ). |
349 |
C/\ | | | | |-CONVECT :: Mix static instability. |
C/\ | | | | |-CONVECT :: Mix static instability. |
350 |
C/\ | | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
C/\ | | | | |-TIMEAVE_CUMULATE :: Update convection statistics. |
351 |
C/\ | | | | |
C/\ | | | | |
352 |
C/\ | | | |-CALC_EXACT_ETA :: Change SSH to flow divergence. |
C/\ | | | |-CALC_EXACT_ETA :: Change SSH to flow divergence. |
353 |
C/\ | | | |
C/\ | | | |
354 |
C/\ | | |-DO_FIELDS_BLOCKING_EXCHANGES :: Sync up overlap regions. |
C/\ | | |-DO_FIELDS_BLOCKING_EXCHANGES :: Sync up overlap regions. |
355 |
C/\ | | | |-EXCH |
C/\ | | | |-EXCH |
356 |
C/\ | | | |
C/\ | | | |
357 |
C/\ | | |-GCHEM_FORCING_SEP :: tracer forcing for gchem pkg (if |
C/\ | | |-GCHEM_FORCING_SEP :: tracer forcing for gchem pkg (if |
358 |
C/\ | | | tracer dependent tendencies calculated |
C/\ | | | tracer dependent tendencies calculated |
410 |
|
|
411 |
C !DESCRIPTION: \bv |
C !DESCRIPTION: \bv |
412 |
C *==========================================================* |
C *==========================================================* |
413 |
C | SUBROUTINE THE_MODEL_MAIN |
C | SUBROUTINE THE_MODEL_MAIN |
414 |
C | o Master controlling routine for model using the MITgcm |
C | o Master controlling routine for model using the MITgcm |
415 |
C | UV parallel wrapper. |
C | UV parallel wrapper. |
416 |
C *==========================================================* |
C *==========================================================* |
417 |
C | THE_MODEL_MAIN is invoked by the MITgcm UV parallel |
C | THE_MODEL_MAIN is invoked by the MITgcm UV parallel |
418 |
C | wrapper with a single integer argument "myThid". This |
C | wrapper with a single integer argument "myThid". This |
419 |
C | variable identifies the thread number of an instance of |
C | variable identifies the thread number of an instance of |
420 |
C | THE_MODEL_MAIN. Each instance of THE_MODEL_MAIN works |
C | THE_MODEL_MAIN. Each instance of THE_MODEL_MAIN works |
421 |
C | on a particular region of the models domain and |
C | on a particular region of the models domain and |
422 |
C | synchronises with other instances as necessary. The |
C | synchronises with other instances as necessary. The |
423 |
C | routine has to "understand" the MITgcm parallel |
C | routine has to "understand" the MITgcm parallel |
424 |
C | environment and the numerical algorithm. Editing this |
C | environment and the numerical algorithm. Editing this |
425 |
C | routine is best done with some knowledge of both aspects. |
C | routine is best done with some knowledge of both aspects. |
426 |
C | Notes |
C | Notes |
427 |
C | ===== |
C | ===== |
428 |
C | C*P* comments indicating place holders for which code is |
C | C*P* comments indicating place holders for which code is |
429 |
C | presently being developed. |
C | presently being developed. |
430 |
C *==========================================================* |
C *==========================================================* |
431 |
C \ev |
C \ev |
432 |
|
|
474 |
C !INPUT/OUTPUT PARAMETERS: |
C !INPUT/OUTPUT PARAMETERS: |
475 |
C == Routine arguments == |
C == Routine arguments == |
476 |
C myThid - Thread number for this instance of the routine. |
C myThid - Thread number for this instance of the routine. |
477 |
INTEGER myThid |
INTEGER myThid |
478 |
|
|
479 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
480 |
C == Local variables == |
C == Local variables == |
627 |
|
|
628 |
#endif /* ALLOW_TANGENTLINEAR_RUN ALLOW_ADJOINT_RUN ALLOW_ADMTLM */ |
#endif /* ALLOW_TANGENTLINEAR_RUN ALLOW_ADJOINT_RUN ALLOW_ADMTLM */ |
629 |
|
|
|
C-- Final checkpoint (in case the in-loop checkpoint was missed) |
|
|
CALL TIMER_START('DO_WRITE_PICKUP [THE_MODEL_MAIN]',myThid) |
|
|
CALL DO_WRITE_PICKUP( |
|
|
I .TRUE., myCurrentTime, myCurrentIter, myThid ) |
|
|
CALL TIMER_STOP ('DO_WRITE_PICKUP [THE_MODEL_MAIN]',myThid) |
|
|
|
|
|
CALL TIMER_STOP ('ALL [THE_MODEL_MAIN]',myThid) |
|
|
|
|
630 |
#ifdef ALLOW_DIAGNOSTICS |
#ifdef ALLOW_DIAGNOSTICS |
631 |
IF (useDiagnostics) THEN |
IF (useDiagnostics) THEN |
632 |
C Close all diagnostics output files |
C Close all diagnostics output files |
643 |
ENDIF |
ENDIF |
644 |
#endif |
#endif |
645 |
|
|
646 |
|
C-- This timer encompasses the whole code |
647 |
|
CALL TIMER_STOP ('ALL [THE_MODEL_MAIN]',myThid) |
648 |
|
|
649 |
C-- Write timer statistics |
C-- Write timer statistics |
650 |
IF ( myThid .EQ. 1 ) THEN |
IF ( myThid .EQ. 1 ) THEN |
651 |
CALL TIMER_PRINTALL( myThid ) |
CALL TIMER_PRINTALL( myThid ) |