Changeset 875 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Feb 11, 2013, 11:06:56 AM (12 years ago)
Author:
jleconte
Message:

11/02/2013 == JL

  • Updated moist convection scheme to handle situations with a large water vapor content
  • Added a keyword to enable ocean runoff in callphys.def (activerunoff)


Location:
trunk/LMDZ.GENERIC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r873 r875  
    896896- Cosmetic changes in optcv (mostly spaces and line breaks)
    897897    ... so that comparisons with optci are easy e.g. through vimdiff
     898   
     899== 11/02/2013 == JL
     900- Updated moist convection scheme to handle situations with a large water vapor content
     901- Added a keyword to enable ocean runoff in callphys.def (activerunoff)
     902
     903 
     904
  • trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90

    r863 r875  
    33     albedo0,albedo,mu0,pdtsurf,pdtsurf_hyd,hice)
    44
     5  use ioipsl_getincom
    56  use watercommon_h, only: T_h2O_ice_liq, RLFTT, rhowater, mx_eau_sol
    67  USE surfdat_h
     
    5556      parameter (oceantime=10*24*3600)
    5657
    57       logical oceanbulkavg ! relax ocean temperatures to a GLOBAL mean value?
    58       logical activerunoff ! enable simple runoff scheme?
    59       logical oceanalbvary ! ocean albedo varies with the diurnal cycle?
     58      logical,save :: oceanbulkavg ! relax ocean temperatures to a GLOBAL mean value?
     59      logical,save :: activerunoff ! enable simple runoff scheme?
     60      logical,save :: oceanalbvary ! ocean albedo varies with the diurnal cycle?
    6061
    6162!     Arguments
     
    9798      data firstcall /.true./
    9899
    99       oceanbulkavg=.false.
    100       activerunoff=.false.
    101       oceanalbvary=.false.
    102100
    103101      if(firstcall)then
    104102
     103         oceanbulkavg=.false.
     104         oceanalbvary=.false.
     105         write(*,*)"Activate runnoff into oceans?"
     106         activerunoff=.false.
     107         call getin("activerunoff",activerunoff)
     108         write(*,*)" activerunoff = ",activerunoff
     109         
     110         
     111         
    105112         ALLOCATE(runoff(ngrid))
    106113
  • trunk/LMDZ.GENERIC/libf/phystd/largescale.F90

    r863 r875  
    5050      EXTERNAL CBRT
    5151      INTEGER i, k , nn
    52       INTEGER,PARAMETER :: nitermax=1000
    53       REAL,PARAMETER :: alpha=.5,qthreshold=1.e-6
     52      INTEGER,PARAMETER :: nitermax=2000
     53      REAL,PARAMETER :: alpha=.5,qthreshold=1.e-6
     54      ! JL13: if "careful, T<Tmin in psat water" appears often, you may want to stabilise the model by
     55      !                   decreasing alpha and increasing nitermax accordingly
    5456      REAL zt(ngrid), zq(ngrid)
    5557      REAL zcond(ngrid),zcond_iter
    5658      REAL zdelq(ngrid)
    5759      REAL zqs(ngrid), zdqs(ngrid)
    58       REAL psat_tmp
     60      REAL psat_tmp,dlnpsat_tmp
    5961     
    6062! evaporation calculations
     
    115117            Do nn=1,nitermax 
    116118               call Psat_water(zt(i),pplay(i,k),psat_tmp,zqs(i))
    117                call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i))
     119               call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp)
    118120               zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.+zdqs(i))   
    119121                  !zcond can be negative here
     
    131133            zcond(i) = 0.0
    132134            Do nn=1,nitermax 
    133                call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i))
     135               call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp)
    134136               zcond_iter = MAX(0.0,alpha*(zx_q(i)-zqs(i))/(1.+zdqs(i)))           
    135137                  !zcond always postive! cannot evaporate clouds!
  • trunk/LMDZ.GENERIC/libf/phystd/moistadj.F90

    r787 r875  
    11subroutine moistadj(ngrid, nq, pt, pq, pdq, pplev, pplay, pdtmana, pdqmana, ptimestep, rneb)
    22
    3   use watercommon_h, only: T_h2O_ice_liq, RLVTT, RCPD, Psat_water, Lcpdqsat_water
     3  use watercommon_h, only: T_h2O_ice_liq, RLVTT, RCPD, RCPV, Psat_water, Lcpdqsat_water
    44  USE tracer_h
    55
     
    5959      REAL cp_delta_t(nlayermx)
    6060      REAL v_cptj(nlayermx), v_cptjk1, v_ssig
    61       REAL v_cptt(ngrid,nlayermx), v_p, v_t, zpsat
    62       REAL zqs(ngrid,nlayermx), zdqs(ngrid,nlayermx)
     61      REAL v_cptt(ngrid,nlayermx), v_p, v_t, v_zqs,v_cptt2,v_pratio,v_dlnpsat
     62      REAL zqs(ngrid,nlayermx), zdqs(ngrid,nlayermx),zpsat(ngrid,nlayermx),zdlnpsat(ngrid,nlayermx)
    6363      REAL zq1(ngrid), zq2(ngrid)
    6464      REAL gamcpdz(ngrid,2:nlayermx)
     
    122122            v_p = pplay(i,k)
    123123
    124             call Psat_water(v_t,v_p,zpsat,zqs(i,k))
    125             call Lcpdqsat_water(v_t,v_p,zpsat,zqs(i,k),zdqs(i,k))
     124            call Psat_water(v_t,v_p,zpsat(i,k),zqs(i,k))
     125            call Lcpdqsat_water(v_t,v_p,zpsat(i,k),zqs(i,k),zdqs(i,k),zdlnpsat(i,k))
    126126         ENDDO
    127127      ENDDO
     
    132132            zdp = pplev(i,k)-pplev(i,k+1)
    133133            zdpm = pplev(i,k-1)-pplev(i,k)
    134             gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)          &
    135                 +  RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) )                           &
    136                 * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) )                                          &
    137                 / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) )                   
     134!            gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)          &
     135!                +  RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) )                           &
     136!               * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) )                                          &
     137!                / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) )                   
     138! general case where water is not a trace gas (JL13)
     139            v_zqs     = (zqs(i,k-1)*zdpm + zqs(i,k)*zdp)/(zdpm+zdp)
     140            v_cptt2   = (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)/(zdpm+zdp)
     141            v_pratio  = ((1./(1.+zpsat(i,k-1)/pplay(i,k-1)))*zdpm + (1./(1.+zpsat(i,k)/pplay(i,k)))*zdp)/(zdpm+zdp)
     142            v_dlnpsat = (zdlnpsat(i,k-1)*zdpm + zdlnpsat(i,k)*zdp)/(zdpm+zdp)
     143            gamcpdz(i,k) = v_pratio*( (R/RCPD*v_cptt2*(1.- v_zqs) + RLVTT*v_zqs) * (pplay(i,k-1)-pplay(i,k))/pplev(i,k) )  &
     144                / ((1.- v_zqs) + v_zqs * RCPV/RCPD + v_zqs * v_pratio * v_dlnpsat)                   
    138145         ENDDO
    139146      ENDDO
     
    200207         v_p = pplay(i,k)
    201208         
    202          call Psat_water(v_t,v_p,zpsat,zqs(i,k))
    203          call Lcpdqsat_water(v_t,v_p,zpsat,zqs(i,k),zdqs(i,k))
     209         call Psat_water(v_t,v_p,zpsat(i,k),zqs(i,k))
     210         call Lcpdqsat_water(v_t,v_p,zpsat(i,k),zqs(i,k),zdqs(i,k),zdlnpsat(i,k))
    204211
    205212
     
    226233         zdpm = pplev(i,k-1) - pplev(i,k)
    227234         zdp = pplev(i,k) - pplev(i,k+1)
    228          gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)             &
    229                 +  RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) )                           &
    230                 * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) )                                          &
    231                 / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) )                   
     235!         gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)          &
     236!             +  RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) )                           &
     237!             * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) )                                          &
     238!             / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) )                   
     239! general case where water is not a trace gas (JL13)
     240         v_zqs     = (zqs(i,k-1)*zdpm + zqs(i,k)*zdp)/(zdpm+zdp)
     241         v_cptt2   = (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)/(zdpm+zdp)
     242         v_pratio  = ((1./(1.+zpsat(i,k-1)/pplay(i,k-1)))*zdpm + (1./(1.+zpsat(i,k)/pplay(i,k)))*zdp)/(zdpm+zdp)
     243         v_dlnpsat = (zdlnpsat(i,k-1)*zdpm + zdlnpsat(i,k)*zdp)/(zdpm+zdp)
     244         gamcpdz(i,k) = v_pratio*( (R/RCPD*v_cptt2*(1.- v_zqs) + RLVTT*v_zqs) * (pplay(i,k-1)-pplay(i,k))/pplev(i,k) )  &
     245                / ((1.- v_zqs) + v_zqs * RCPV/RCPD + v_zqs * v_pratio * v_dlnpsat)                   
    232246      ENDDO
    233247
  • trunk/LMDZ.GENERIC/libf/phystd/su_watercycle.F90

    r728 r875  
    11      subroutine su_watercycle
    22
    3 ! to use  'getin'
    4       use ioipsl_getincom
    53      use watercommon_h
    64      implicit none
     
    2826      RV = 1000.*8.314/mH2O ! caution! R is R/mugaz already!
    2927
    30       RCPV   = 4. *RV    ! could be more precise...
    31       !RCPV   = 5/2 *8.31*1000/mH2O ! BC modif here: doesn't appear to be correct
     28      RCPV   = 1.88e3 ! specific heat capacity of water vapor at 350K
    3229
    3330      RVTMP2 = RCPV/RCPD-1. ! not currently used...
  • trunk/LMDZ.GENERIC/libf/phystd/watercommon_h.F90

    r786 r875  
    7777
    7878!==================================================================
    79       subroutine Lcpdqsat_water(T,p,psat,qsat,dqsat)
     79      subroutine Lcpdqsat_water(T,p,psat,qsat,dqsat,dlnpsat)
    8080
    8181         implicit none
     
    8484!     Purpose
    8585!     -------
    86 !     Compute L/cp*d (q_sat)/d T
     86!     Compute dqsat=L/cp*d (q_sat)/d T and dlnpsat=L/cp d(ln Psat)/d T
    8787!     for a given temperature (K)!
    8888!     Based on the Tetens formula from L.Li physical parametrization manual
     
    9898 
    9999!        output
    100          real dqsat
     100         real dqsat,dlnpsat
    101101
    102102! JL12 variables for tetens formula
     
    125125
    126126         dqsat=RLVTT/RCPD*qsat*(p/(p-(1.-epsi)*psat))*dummy
     127         dlnpsat=RLVTT/RCPD*dummy
    127128         return
    128129      end subroutine Lcpdqsat_water
Note: See TracChangeset for help on using the changeset viewer.