Changeset 1464 for trunk


Ignore:
Timestamp:
Jul 2, 2015, 5:16:43 PM (10 years ago)
Author:
flefevre
Message:

Sorties chimiques:

  • reorganisation et nettoyage
  • suppression de redondances
  • ajout du calcul de la masse globale de chaque traceur
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/physiq.F

    r1432 r1464  
    3737     &                      fill_data_thermos, allocate_param_thermos
    3838      use iono_h, only: allocate_param_iono
     39      use planetwide_mod
    3940#ifdef MESOSCALE
    4041      use comsoil_h, only: mlayer,layer
     
    311312      real rhopart(ngrid,nlayer) ! number density of a given species
    312313      real colden(ngrid,nq)     ! vertical column of tracers
     314      real mass(nq)             ! global mass of tracers (g)
    313315      REAL mtot(ngrid)          ! Total mass of water vapor (kg/m2)
    314316      REAL icetot(ngrid)        ! Total mass of water ice (kg/m2)
     
    18861888             endif ! (scavenging)
    18871889         
    1888           endif ! (dustbin.ne.0)
    1889 
    1890 
    1891              if (thermochem.or.photochem) then
    1892                 do iq=1,nq
    1893                   if (noms(iq) .ne. "dust_mass" .and.
    1894      $                 noms(iq) .ne. "dust_number" .and.
    1895      $                 noms(iq) .ne. "ccn_mass" .and.
    1896      $                 noms(iq) .ne. "ccn_number" .and.
    1897      $                 noms(iq) .ne. "h2o_vap" .and.
    1898      $                 noms(iq) .ne. "h2o_ice") then
     1890           endif ! (dustbin.ne.0)
     1891
     1892           if (thermochem .or. photochem) then
     1893              do iq=1,nq
     1894                 if (noms(iq) .ne. "dust_mass" .and.
     1895     $               noms(iq) .ne. "dust_number" .and.
     1896     $               noms(iq) .ne. "ccn_mass" .and.
     1897     $               noms(iq) .ne. "ccn_number") then
     1898
     1899!                   volume mixing ratio
     1900
    18991901                    vmr(1:ngrid,1:nlayer)=zq(1:ngrid,1:nlayer,iq)
    1900      &                          *mmean(1:ngrid,1:nlayer)/mmol(iq)
     1902     &                            *mmean(1:ngrid,1:nlayer)/mmol(iq)
     1903
     1904                    call wstats(ngrid,"vmr_"//trim(noms(iq)),
     1905     $                        "Volume mixing ratio","mol/mol",3,vmr)
     1906                    if ((noms(iq).eq."o")
     1907     $             .or. (noms(iq).eq."co2")
     1908     $             .or. (noms(iq).eq."o3")
     1909     $             .or. (noms(iq).eq."ar")
     1910     $             .or. (noms(iq).eq."o2")
     1911     $             .or. (noms(iq).eq."h2o_vap") ) then
     1912                      call writediagfi(ngrid,"vmr_"//trim(noms(iq)),
     1913     $                         "Volume mixing ratio","mol/mol",3,vmr)
     1914                    end if
     1915
     1916!                   number density (molecule.cm-3)
     1917
    19011918                    rhopart(1:ngrid,1:nlayer)=zq(1:ngrid,1:nlayer,iq)
    19021919     &                          *rho(1:ngrid,1:nlayer)*n_avog/
    19031920     &                           (1000*mmol(iq))
    1904                    call wstats(ngrid,"vmr_"//trim(noms(iq)),
    1905      $                         "Volume mixing ratio","mol/mol",3,vmr)
     1921
    19061922!                   call wstats(ngrid,"rho_"//trim(noms(iq)),
    1907 !     $                     "Number density","cm-3",3,rhopart)
     1923!    $                     "Number density","cm-3",3,rhopart)
    19081924!                   call writediagfi(ngrid,"rho_"//trim(noms(iq)),
    1909 !     $                     "Number density","cm-3",3,rhopart)
    1910                    do ig = 1,ngrid
    1911                       colden(ig,iq) = 0.                           
    1912                    end do
    1913                    do l=1,nlayer                                   
    1914                       do ig=1,ngrid                                 
    1915                          colden(ig,iq) = colden(ig,iq) + zq(ig,l,iq)
    1916      $                                  *(zplev(ig,l)-zplev(ig,l+1))
    1917      $                                  *6.022e22/(mmol(iq)*g)       
    1918                       end do                                       
    1919                    end do                                         
    1920                    call wstats(ngrid,"c_"//trim(noms(iq)),           
    1921      $                         "column","mol cm-2",2,colden(1,iq)) 
    1922                   end if ! of if (noms(iq) .ne. "dust_mass" ...)
    1923                 end do ! of do iq=1,nq
    1924              end if ! of if (thermochem.or.photochem)
     1925!    $                     "Number density","cm-3",3,rhopart)
     1926
     1927!                   vertical column (molecule.cm-2)
     1928
     1929                    do ig = 1,ngrid
     1930                       colden(ig,iq) = 0.                           
     1931                    end do
     1932                    do l=1,nlayer                                   
     1933                       do ig=1,ngrid                                 
     1934                          colden(ig,iq) = colden(ig,iq) + zq(ig,l,iq)
     1935     $                                   *(zplev(ig,l)-zplev(ig,l+1))
     1936     $                                   *6.022e22/(mmol(iq)*g)       
     1937                       end do                                       
     1938                    end do                                         
     1939
     1940                    call wstats(ngrid,"c_"//trim(noms(iq)),           
     1941     $                          "column","mol cm-2",2,colden(1,iq)) 
     1942                    call writediagfi(ngrid,"c_"//trim(noms(iq)),
     1943     $                          "column","mol cm-2",2,colden(1,iq))
     1944
     1945!                   global mass (g)
     1946               
     1947                    call planetwide_sumval(colden(:,iq)/6.022e23
     1948     $                            *mmol(iq)*1.e4*area(:),mass(iq))
     1949
     1950                    call writediagfi(ngrid,"mass_"//trim(noms(iq)),
     1951     $                              "global mass","g",0,mass(iq))
     1952
     1953                 end if ! of if (noms(iq) .ne. "dust_mass" ...)
     1954              end do ! of do iq=1,nq
     1955           end if ! of if (thermochem .or. photochem)
    19251956
    19261957           end if ! of if (tracer)
     
    22902321     $           3,zdtnirco2)
    22912322
    2292 
    2293              if (thermochem.or.photochem) then
    2294                 do iq=1,nq
    2295                   if (noms(iq) .ne. "dust_mass" .and.
    2296      $                 noms(iq) .ne. "dust_number" .and.
    2297      $                 noms(iq) .ne. "ccn_mass" .and.
    2298      $                 noms(iq) .ne. "ccn_number" .and.
    2299      $                 noms(iq) .ne. "h2o_vap" .and.
    2300      $                 noms(iq) .ne. "h2o_ice") then
    2301                     vmr(1:ngrid,1:nlayer)=zq(1:ngrid,1:nlayer,iq)
    2302      &                          *mmean(1:ngrid,1:nlayer)/mmol(iq)
    2303                     rhopart(1:ngrid,1:nlayer)=zq(1:ngrid,1:nlayer,iq)
    2304      &                          *rho(1:ngrid,1:nlayer)*n_avog/
    2305      &                           (1000*mmol(iq))
    2306                    call writediagfi(ngrid,"rho_"//trim(noms(iq)),
    2307      $                     "Number density","cm-3",3,rhopart)
    2308                    if ((noms(iq).eq."o") .or. (noms(iq).eq."co2").or.
    2309      $                 (noms(iq).eq."o3")) then
    2310                       call writediagfi(ngrid,"vmr_"//trim(noms(iq)),
    2311      $                         "Volume mixing ratio","mol/mol",3,vmr)
    2312                    end if
    2313                    do ig = 1,ngrid
    2314                       colden(ig,iq) = 0.
    2315                    end do
    2316                    do l=1,nlayer
    2317                       do ig=1,ngrid
    2318                          colden(ig,iq) = colden(ig,iq) + zq(ig,l,iq)
    2319      $                                  *(zplev(ig,l)-zplev(ig,l+1))
    2320      $                                  *6.022e22/(mmol(iq)*g)
    2321                       end do
    2322                    end do
    2323                    call writediagfi(ngrid,"c_"//trim(noms(iq)),
    2324      $                             "column","mol cm-2",2,colden(1,iq))
    2325                   end if ! of if (noms(iq) .ne. "dust_mass" ...)
    2326                 end do ! of do iq=1,nq
    2327              end if ! of if (thermochem.or.photochem)
    2328 
    2329 
    23302323         endif  !(callthermos)
    23312324
Note: See TracChangeset for help on using the changeset viewer.