source: trunk/LMDZ.PLUTO/libf/phypluto/mp2m_inimufi.F90 @ 3559

Last change on this file since 3559 was 3559, checked in by debatzbr, 5 days ago

Addition of the interface between the physics and the microphysics model.

File size: 1.9 KB
Line 
1subroutine inimufi(ptimestep)
2  use callkeys_mod, only : call_haze_prod_pCH4, haze_p_prod, haze_tx_prod, haze_rc_prod, haze_rm, haze_df, haze_rho, air_rad
3  use tracer_h
4  use comcstfi_mod, only : g, rad, mugaz
5  use datafile_mod
6
7  ! Microphysical model MP2M
8  use mp2m_intgcm
9
10  implicit none
11
12  !============================================================================
13  !
14  !     Purpose
15  !     -------
16  !     This routine call mm_initialize which perform the global initialization
17  !     for the microphysical YAMMS model.
18  !     It also performs some sanity checks on microphysical tracer names.
19  !
20  !     Authors
21  !     -------
22  !     B. de Batz de Trenquelléon (11/2024)
23  !
24  !============================================================================
25
26
27  !----------------
28  ! 0. Declarations
29  !----------------
30
31  integer :: i,idx
32  real, intent(in) :: ptimestep ! Timestep (s)
33
34  character(len=30), dimension(4), parameter :: aernames = &
35     (/"mu_m0as              ", "mu_m3as              ",   &
36       "mu_m0af              ", "mu_m3af              "/)
37 
38  logical :: err
39
40  !--------------------------
41  ! 1. Check names of tracers
42  !--------------------------
43  err = .false.
44
45  DO i=1,size(aernames)
46    idx = indexOfTracer(TRIM(aernames(i)),.false.)
47    IF (idx <= 0) THEN
48      WRITE(*,*) "inimufi: '"//TRIM(aernames(i))//"' not found in tracers table."
49      err = .true.
50    ENDIF
51  ENDDO
52
53  IF (err) THEN
54    WRITE(*,*) "You loose in inimufi.F90.... Try again"
55    STOP
56  ENDIF
57
58  !--------------------------------------------------
59  ! 2. Call microphysical model global initialization
60  !--------------------------------------------------
61 
62  ! /!\ mugaz [g/mol] --> [kg/mol] !!
63  call mm_initialize(ptimestep,call_haze_prod_pCH4,haze_p_prod,haze_tx_prod,haze_rc_prod, &
64                      haze_rm,haze_df,haze_rho,rad,g,air_rad,mugaz*1e-3,                  &
65                      config_mufi)
66
67end subroutine inimufi
Note: See TracBrowser for help on using the repository browser.