Ignore:
Timestamp:
Mar 20, 2014, 10:57:19 AM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r1920:1997 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phy1d/lmdz1d.F

    r1921 r1999  
    8181      integer :: an
    8282 
    83 !
    84       real :: paire    = 1.     ! aire de la maille
    85 !**      common /flux_arp/fsens,flat,ok_flux_surf
    86 
    8783!---------------------------------------------------------------------
    8884!  Declarations related to forcing and initial profiles
     
    9086
    9187        integer :: kmax = llm
    92         integer nlev_max,llm700
    93         parameter (nlev_max = 1000)
    94         real timestep, frac, timeit
     88        integer llm700,nq1,nq2
     89        INTEGER, PARAMETER :: nlev_max=1000, nqmx=1000
     90        real timestep, frac
    9591        real height(nlev_max),tttprof(nlev_max),qtprof(nlev_max),
    9692     .              uprof(nlev_max),vprof(nlev_max),e12prof(nlev_max),
    9793     .              ugprof(nlev_max),vgprof(nlev_max),wfls(nlev_max),
    9894     .              dqtdxls(nlev_max),dqtdyls(nlev_max),
    99      .              dqtdtls(nlev_max),thlpcar(nlev_max)
    100 
    101         real    :: fff
     95     .              dqtdtls(nlev_max),thlpcar(nlev_max),
     96     .              qprof(nlev_max,nqmx)
     97
    10298c        integer :: forcing_type
    10399        logical :: forcing_les     = .false.
     
    143139!---------------------------------------------------------------------
    144140
    145       integer :: iq
    146141      real :: phi(llm)
    147142      real :: teta(llm),tetal(llm),temp(llm),u(llm),v(llm),w(llm)
     
    151146      real :: sfdt, cfdt
    152147      real :: du_phys(llm),dv_phys(llm),dt_phys(llm)
    153       real :: du_dyn(llm),dv_dyn(llm),dt_dyn(llm)
    154       real :: dt_cooling(llm),d_t_cool(llm),d_th_adv(llm)
    155       real :: dq_cooling(llm),d_q_cool(llm)
    156       real :: tmpvar(llm)
     148      real :: dt_dyn(llm)
     149      real :: dt_cooling(llm),d_th_adv(llm)
    157150      real :: alpha
     151      real :: ttt
    158152
    159153      REAL, ALLOCATABLE, DIMENSION(:,:):: q
     
    161155      REAL, ALLOCATABLE, DIMENSION(:,:):: dq_dyn
    162156      REAL, ALLOCATABLE, DIMENSION(:,:):: d_q_adv
     157!     REAL, ALLOCATABLE, DIMENSION(:):: d_th_adv
    163158
    164159!---------------------------------------------------------------------
     
    204199!  Fichiers et d'autres variables
    205200!---------------------------------------------------------------------
    206       real ttt,bow,q1
    207       integer :: ierr,k,l,i,it=1,mxcalc
     201      integer :: k,l,i,it=1,mxcalc
    208202      integer jjmp1
    209203      parameter (jjmp1=jjm+1-1/jjm)
     
    230224!---------------------------------------------------------------------
    231225cAl1
    232         call conf_unicol(99)
     226        call conf_unicol
    233227cAl1 moves this gcssold var from common fcg_gcssold to
    234228        Turb_fcg_gcssold = xTurb_fcg_gcssold
     
    357351c      Le numero du jour est dans "day". L heure est traitee separement.
    358352c      La date complete est dans "daytime" (l'unite est le jour).
    359       fnday=nday
     353      if (nday>0) then
     354         fnday=nday
     355      else
     356         fnday=-nday/float(day_step)
     357      endif
     358
    360359c Special case for arm_cu which lasts less than one day : 53100s !! (MPL 20111026)
    361360      IF(forcing_type .EQ. 61) fnday=53100./86400.
     
    369368      itau_phy = 0
    370369      call ymds2ju(annee_ref,mois,day_ref,heure,day)
    371       day_ini = day
    372       day_end = day_ini + nday
     370      day_ini = int(day)
     371      day_end = day_ini + fnday
    373372
    374373      IF (forcing_type .eq.2) THEN
     
    422421      call infotrac_init
    423422
     423      if (nqtot>nqmx) STOP'Augmenter nqmx dans lmdz1d.F'
    424424      allocate(q(llm,nqtot)) ; q(:,:)=0.
    425425      allocate(dq(llm,nqtot))
    426426      allocate(dq_dyn(llm,nqtot))
    427427      allocate(d_q_adv(llm,nqtot))
     428!     allocate(d_th_adv(llm))
    428429
    429430c
     
    463464!! mpl et jyg le 22/08/2012 :
    464465!!  pour que les cas a flux de surface imposes marchent
    465       IF(.NOT.ok_flux_surf) THEN
     466      IF(.NOT.ok_flux_surf.or.max(abs(wtsurf),abs(wqsurf))>0.) THEN
    466467       fsens=-wtsurf*rcpd*rho(1)
    467468       flat=-wqsurf*rlvtt*rho(1)
    468469       print *,'Flux: ok_flux wtsurf wqsurf',ok_flux_surf,wtsurf,wqsurf
    469470      ENDIF
     471      print*,'Flux sol ',fsens,flat
    470472!!      ok_flux_surf=.false.
    471473!!      fsens=-wtsurf*rcpd*rho(1)
     
    851853!
    852854        du_age(1:mxcalc)= -2.*sfdt/timestep*
    853      :          (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) -
    854      :           cfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
     855     s          (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) -
     856     s           cfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
    855857!!     : fcoriolis*(v(1:mxcalc)-vg(1:mxcalc))
    856858!
    857859       dv_age(1:mxcalc)= -2.*sfdt/timestep*
    858      :          (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) +
    859      :           sfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
     860     s          (cfdt*(u(1:mxcalc)-ug(1:mxcalc)) +
     861     s           sfdt*(v(1:mxcalc)-vg(1:mxcalc))  )
    860862!!     : -fcoriolis*(u(1:mxcalc)-ug(1:mxcalc))
    861863!
     
    870872!! Increment state variables
    871873!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     874! pour les cas sandu et astex, on reclacule u,v,q,temp et teta dans 1D_nudge_sandu_astex.h
     875! au dessus de 700hpa, on relaxe vers les profils initiaux
     876      if (forcing_sandu .OR. forcing_astex) then
     877#include "1D_nudge_sandu_astex.h"
     878      else
    872879        u(1:mxcalc)=u(1:mxcalc) + timestep*(
    873      :              du_phys(1:mxcalc)
    874      :             +du_age(1:mxcalc) )           
     880     s              du_phys(1:mxcalc)
     881     s             +du_age(1:mxcalc) )           
    875882        v(1:mxcalc)=v(1:mxcalc) + timestep*(
    876                   dv_phys(1:mxcalc)
    877      :             +dv_age(1:mxcalc) )
     883     s              dv_phys(1:mxcalc)
     884     s             +dv_age(1:mxcalc) )
    878885        q(1:mxcalc,:)=q(1:mxcalc,:)+timestep*(
    879      :                dq(1:mxcalc,:)
    880      :               +d_q_adv(1:mxcalc,:) )
     886     s                dq(1:mxcalc,:)
     887     s               +d_q_adv(1:mxcalc,:) )
    881888
    882889        if (prt_level.ge.1) then
     
    893900     .             +d_th_adv(1:mxcalc)
    894901     .             +dt_cooling(1:mxcalc))  ! Taux de chauffage ou refroid.
     902
     903      endif  ! forcing_sandu or forcing_astex
    895904
    896905        teta=temp*(pzero/play)**rkappa
Note: See TracChangeset for help on using the changeset viewer.