Bugfix in the calculations of immediate melting and supersaturation dynamical tendenc...
[WRF.git] / main / wrf.F
blob945dee2192a619f47798d0ad25df5952a1eae281
1 !WRF:DRIVER_LAYER:MAIN
4 PROGRAM wrf
6    USE module_wrf_top, only : wrf_init, wrf_dfi, wrf_run, wrf_finalize
7 #if ( WRFPLUS == 1 )
8    USE module_wrf_top, only : config_flags, wrf_adtl_check, &
9                               wrf_run_tl_standalone, wrf_run_ad_standalone
10    USE module_state_description, only : dyn_em, dyn_em_tl, dyn_em_ad
11 #endif
13 !<DESCRIPTION>
14 ! Main program of WRF model.  Responsible for starting up the model, reading in (and
15 ! broadcasting for distributed memory) configuration data, defining and initializing
16 ! the top-level domain, either from initial or restart data, setting up time-keeping, and
17 ! then calling the <a href=integrate.html>integrate</a> routine to advance the domain
18 ! to the ending time of the simulation. After the integration is completed, the model
19 ! is properly shut down.
21 !</DESCRIPTION>
23    IMPLICIT NONE
25 #ifdef _OPENMP
26   CALL setfeenv()
27 #endif
29   ! Set up WRF model.  
30   CALL wrf_init
32   ! Run digital filter initialization if requested.
33   CALL wrf_dfi
35 #if ( WRFPLUS == 1 )
36   ! Run adjoint check and tangent linear check if requested.
37   CALL wrf_adtl_check
38 #endif
40   ! WRF model time-stepping.  Calls integrate().  
41 #if ( WRFPLUS == 1 )
42   IF  ( config_flags%dyn_opt .EQ. dyn_em ) &
43 #endif
44   CALL wrf_run
46 #if ( WRFPLUS == 1 )
47   ! WRF model time-stepping.  Calls integrate().  
48   IF  ( config_flags%dyn_opt .EQ. dyn_em_tl .and. config_flags%tl_standalone ) &
49   CALL wrf_run_tl_standalone
51   ! WRF model time-stepping.  Calls integrate().  
52   IF  ( config_flags%dyn_opt .EQ. dyn_em_ad ) &
53   CALL wrf_run_ad_standalone
54 #endif
56   ! WRF model clean-up.  This calls MPI_FINALIZE() for DM parallel runs.  
57   CALL wrf_finalize
59 END PROGRAM wrf