Ignore:
Timestamp:
Jan 23, 2013, 2:09:25 PM (12 years ago)
Author:
jleconte
Message:

23/01/2013 == JL

  • Correction in largescale. a rneb factor was forgotten
  • Added some spectra in ave_stelpec
  • Corrected reevaporation in rain. Now conserve water better


Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/ave_stelspec.F90

    r786 r863  
    9898           Case(6)
    9999            file_id='/stellar_spectra/BD_Teff-1600K.txt'
    100             tstellar=1600. ! Segura et al. (2003)
     100            tstellar=1600.
    101101            file_id_lam='/stellar_spectra/lamBD.txt'
    102102            Nfine=5000
    103103           Case(7)
    104104            file_id='/stellar_spectra/BD_Teff-1000K.txt'
    105             tstellar=1000. ! Segura et al. (2003)
     105            tstellar=1000.
    106106            file_id_lam='/stellar_spectra/lamBD.txt'
    107107            Nfine=5000
     108           Case(8)
     109            file_id='/stellar_spectra/Flux_K5_Teff4700_logg4.5_Met-0.5_BTsettle.dat'
     110            tstellar=4700.
     111            file_id_lam='/stellar_spectra/lambda_K5_Teff4700_logg4.5_Met-0.5_BTsettle.dat'
     112            Nfine=3986
    108113           Case Default
    109114            print*,'Error: unknown star type chosen'
  • trunk/LMDZ.GENERIC/libf/phystd/dimphys.h

    r787 r863  
    99! nsoilmx : number of subterranean layers
    1010      !integer, parameter :: nsoilmx = 4 ! for a test
    11       integer, parameter :: nsoilmx = 18 ! for z1=0.0002 cm, depth = 18 m => mars case
    12       !integer, parameter :: nsoilmx = 13 ! for z1=0.03 cm, depth = 104.8 m => earth case
     11      integer, parameter :: nsoilmx = 18 ! for z1=0.0002 m, depth = 18 m => mars case
     12      !integer, parameter :: nsoilmx = 13 ! for z1=0.03 m, depth = 104.8 m => earth case
    1313!-----------------------------------------------------------------------
    1414
  • trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90

    r787 r863  
    9191      real ztsurf(ngrid)
    9292
    93       integer ivap, iliq, iice
    94       save ivap, iliq, iice
    95 
    96       logical firstcall
    97       save firstcall
     93      integer, save :: ivap, iliq, iice
     94
     95      logical, save :: firstcall
    9896
    9997      data firstcall /.true./
     
    333331         enddo
    334332
    335       endif
     333      endif         
     334
    336335
    337336!     Re-add the albedo effects of CO2 ice if necessary
  • trunk/LMDZ.GENERIC/libf/phystd/largescale.F90

    r787 r863  
    138138               zcond(i) = zcond(i) + zcond_iter
    139139               if (ABS(zcond_iter/alpha).lt.qthreshold) exit
    140                zt(i) = zt(i) + zcond_iter*RLVTT/RCPD
     140               zt(i) = zt(i) + zcond_iter*RLVTT/RCPD*rneb(i,k)
    141141               call Psat_water(zt(i),pplay(i,k),psat_tmp,zqs(i))
    142142            End do ! niter
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r862 r863  
    240240     
    241241      real zdmassmr(ngrid,nlayermx),zdpsrfmr(ngrid)
     242      real zdmassmr_col(ngridmx)
    242243
    243244      real zdqdif(ngrid,nlayermx,nq), zdqsdif(ngrid,nq)
     
    12421243                 + dqmoist(1:ngrid,1:nlayermx,igcm_h2o_vap)             &
    12431244                 + dqvaplscale(1:ngrid,1:nlayermx) )
    1244                  
     1245
     1246            do ig = 1, ngrid
     1247               zdmassmr_col(ig)=SUM(zdmassmr(ig,1:nlayermx))
     1248            enddo
    12451249           
    12461250            call writediagfi(ngrid,"mass_evap","mass gain"," ",3,zdmassmr)
     1251            call writediagfi(ngrid,"mass_evap_col","mass gain col"," ",2,zdmassmr_col)
    12471252            call writediagfi(ngrid,"mass","mass"," ",3,mass)
    12481253
     
    17021707!     Temporary inclusions for heating diagnostics
    17031708!        call writediagfi(ngrid,"zdtdyn","Dyn. heating","T s-1",3,zdtdyn)
    1704 !        call writediagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw)
    1705 !        call writediagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw)
    1706 !        call writediagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad)
     1709        call writediagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw)
     1710        call writediagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw)
     1711        call writediagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad)
    17071712
    17081713        ! debugging
  • trunk/LMDZ.GENERIC/libf/phystd/radii_mod.F90

    r858 r863  
    119119
    120120!==================================================================
    121 !   subroutine h2o_reffrad(ngrid,nq,pq,pt,reffrad,nueffrad)
    122121   subroutine h2o_reffrad(ngrid,pq,pt,reffrad,nueffrad)
    123122!==================================================================
     
    131130!
    132131!==================================================================
    133 !      use radinc_h, only: naerkind
    134132      use watercommon_h, Only: T_h2O_ice_liq,T_h2O_ice_clouds,rhowater,rhowaterice
    135 !      use aerosol_mod, only : iaero_h2o
    136 !      USE tracer_h, only: igcm_h2o_ice
    137133      Implicit none
    138134
     
    143139
    144140      integer,intent(in) :: ngrid
    145 !      intent,integer(in) :: nq
    146 
    147 !      real, intent(in) :: pq(ngrid,nlayermx,nq) !tracer mixing ratios (kg/kg)
     141
    148142      real, intent(in) :: pq(ngrid,nlayermx) !water ice mixing ratios (kg/kg)
    149143      real, intent(in) :: pt(ngrid,nlayermx) !temperature (K)
    150144      real, intent(out) :: reffrad(ngrid,nlayermx)      !aerosol radii
    151 !      real, intent(out) :: reffrad(ngrid,nlayermx,naerkind)      !aerosols radii
    152145      real, intent(out) :: nueffrad(ngrid,nlayermx) ! dispersion     
    153 !      real, intent(out) :: nueffrad(ngrid,nlayermx,naerkind) ! dispersion     
    154146
    155147      integer :: ig,l
     
    163155               zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds)
    164156               zfice = MIN(MAX(zfice,0.0),1.0)
    165 !               reffrad(ig,l,iaero_h2o)= rad_h2o * (1.-zfice) + rad_h2o_ice * zfice
    166157               reffrad(ig,l)= rad_h2o * (1.-zfice) + rad_h2o_ice * zfice
    167 !               nueffrad(ig,l,iaero_h2o) = coef_chaud * (1.-zfice) + coef_froid * zfice
    168158               nueffrad(ig,l) = coef_chaud * (1.-zfice) + coef_froid * zfice
    169159            enddo
     
    174164               zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds)
    175165               zfice = MIN(MAX(zfice,0.0),1.0)
    176 !              zrad_liq  = CBRT( 3*pq(ig,l,igcm_h2o_ice)/(4*Nmix_h2o*pi*rhowater) )
    177166               zrad_liq  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o*pi*rhowater) )
    178 !              zrad_ice  = CBRT( 3*pq(ig,l,igcm_h2o_ice)/(4*Nmix_h2o_ice*pi*rhowaterice) )
    179167               zrad_ice  = CBRT( 3*pq(ig,l)/(4*Nmix_h2o_ice*pi*rhowaterice) )
    180 !               nueffrad(ig,l,iaero_h2o) = coef_chaud * (1.-zfice) + coef_froid * zfice
    181168               nueffrad(ig,l) = coef_chaud * (1.-zfice) + coef_froid * zfice
    182169               zrad = zrad_liq * (1.-zfice) + zrad_ice * zfice
    183 !              reffrad(ig,l,iaero_h2o) = min(max(zrad,1.e-6),100.e-6)
    184                reffrad(ig,l) = min(max(zrad,1.e-6),100.e-6)
     170
     171               reffrad(ig,l) = min(max(zrad,1.e-6),1000.e-6)
    185172               enddo
    186173            enddo     
     
    204191!==================================================================
    205192      use watercommon_h, Only: rhowater,rhowaterice
    206 !      USE tracer_h
    207193      Implicit none
    208194
     
    225211      else
    226212         reffliq(1:ngrid,1:nlayermx)  = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o*pi*rhowater) )
    227          reffliq(1:ngrid,1:nlayermx)  = min(max(reffliq(1:ngrid,1:nlayermx),1.e-6),100.e-6)
     213         reffliq(1:ngrid,1:nlayermx)  = min(max(reffliq(1:ngrid,1:nlayermx),1.e-6),1000.e-6)
    228214         reffice(1:ngrid,1:nlayermx)  = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o_ice*pi*rhowaterice) )
    229          reffice(1:ngrid,1:nlayermx)  = min(max(reffice(1:ngrid,1:nlayermx),1.e-6),100.e-6)
     215         reffice(1:ngrid,1:nlayermx)  = min(max(reffice(1:ngrid,1:nlayermx),1.e-6),1000.e-6)
    230216      end if
    231217
     
    247233!
    248234!==================================================================
    249 !      use radinc_h, only: naerkind
    250 !      use aerosol_mod, only : iaero_co2
    251235      USE tracer_h, only:igcm_co2_ice,rho_co2
    252236      Implicit none
     
    260244
    261245      real, intent(in) :: pq(ngrid,nlayermx,nq) !tracer mixing ratios (kg/kg)
    262 !      real, intent(out) :: reffrad(ngrid,nlayermx,naerkind)      !aerosols radii (K)
    263       real, intent(out) :: reffrad(ngrid,nlayermx)      !aerosols radii (K)
     246      real, intent(out) :: reffrad(ngrid,nlayermx)      !co2 ice particles radii (K)
    264247
    265248      integer :: ig,l
     
    270253
    271254      if (radfixed) then
    272 !         reffrad(1:ngrid,1:nlayermx,iaero_co2) = 5.e-5 ! CO2 ice
    273255         reffrad(1:ngrid,1:nlayermx) = 5.e-5 ! CO2 ice
    274256      else
     
    276258            do ig=1,ngrid
    277259               zrad = CBRT( 3*pq(ig,l,igcm_co2_ice)/(4*Nmix_co2*pi*rho_co2) )
    278 !               reffrad(ig,l,iaero_co2) = min(max(zrad,1.e-6),100.e-6)
    279260               reffrad(ig,l) = min(max(zrad,1.e-6),100.e-6)
    280261            enddo
     
    299280!
    300281!==================================================================
    301 !      use radinc_h, only: naerkind
    302 !      use aerosol_mod, only : iaero_dust
    303       Implicit none
    304 
    305 #include "callkeys.h"
    306 #include "dimensions.h"
    307 #include "dimphys.h"
    308 
    309       integer,intent(in) :: ngrid
    310 
    311 !      real, intent(out) :: reffrad(ngrid,nlayermx,naerkind)      !aerosols radii (K)
    312       real, intent(out) :: reffrad(ngrid,nlayermx)      !aerosols radii (K)
     282      Implicit none
     283
     284#include "callkeys.h"
     285#include "dimensions.h"
     286#include "dimphys.h"
     287
     288      integer,intent(in) :: ngrid
     289
     290      real, intent(out) :: reffrad(ngrid,nlayermx)      !dust particles radii (K)
    313291           
    314 !      reffrad(1:ngrid,1:nlayermx,iaero_dust) = 2.e-6 ! dust
    315292      reffrad(1:ngrid,1:nlayermx) = 2.e-6 ! dust
    316293
     
    331308!
    332309!==================================================================
    333 !      use radinc_h, only: naerkind
    334 !      use aerosol_mod, only : iaero_h2so4
    335       Implicit none
    336 
    337 #include "callkeys.h"
    338 #include "dimensions.h"
    339 #include "dimphys.h"
    340 
    341       integer,intent(in) :: ngrid
    342 
    343 !      real, intent(out) :: reffrad(ngrid,nlayermx,naerkind)      !aerosols radii (K)
    344       real, intent(out) :: reffrad(ngrid,nlayermx)      !aerosols radii (K)
     310      Implicit none
     311
     312#include "callkeys.h"
     313#include "dimensions.h"
     314#include "dimphys.h"
     315
     316      integer,intent(in) :: ngrid
     317
     318      real, intent(out) :: reffrad(ngrid,nlayermx)      !h2so4 particle radii (K)
    345319               
    346 !      reffrad(1:ngrid,1:nlayermx,iaero_h2so4) = 1.e-6 ! h2so4
    347320      reffrad(1:ngrid,1:nlayermx) = 1.e-6 ! h2so4
    348321
  • trunk/LMDZ.GENERIC/libf/phystd/rain.F90

    r858 r863  
    209209
    210210                  if(zt(i,k).gt.Tsat(i,k))then
    211 !                    treat the case where all liquid water should boil
    212                      zqev=MIN((zt(i,k)-Tsat(i,k))*RCPD*l2c(i,k)/RLVTT,zrfl(i))
     211!!                   treat the case where all liquid water should boil
     212                     zqev=MIN((zt(i,k)-Tsat(i,k))*RCPD*l2c(i,k)/RLVTT/ptimestep,zrfl(i))
    213213                     zrfl(i)=MAX(zrfl(i)-zqev,0.)
    214                      d_q(i,k)=zqev/l2c(i,k)
     214                     d_q(i,k)=zqev/l2c(i,k)*ptimestep
    215215                     d_t(i,k) = - d_q(i,k) * RLVTT/RCPD
    216216                  else
Note: See TracChangeset for help on using the changeset viewer.