Changeset 1356


Ignore:
Timestamp:
Oct 8, 2014, 9:26:28 AM (10 years ago)
Author:
slebonnois
Message:

SL: update to newstart/start2archive tools in Venus+Titan / additional diagnostics in radiative fluxes for Titan

Location:
trunk
Files:
4 added
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/Tools/angmom.F90

    r842 r1356  
    242242call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
    243243if (ierr1.ne.NF_NOERR) then
    244   write(*,*) "  looking for psol instead... "
    245   text="psol"
     244  write(*,*) "  looking for ps instead... "
     245  text="ps"
    246246  call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
    247   if (ierr1.ne.NF_NOERR) stop "Error: Failed to get psol ID"
     247  if (ierr1.ne.NF_NOERR) then
     248    write(*,*) "  looking for psol instead... "
     249    text="psol"
     250    call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
     251    if (ierr1.ne.NF_NOERR) stop "Error: Failed to get psol ID"
     252  endif
    248253endif
    249254if (ierr2.ne.NF_NOERR) stop "Error: Failed reading surface pressure"
     
    467472  do ilev=1,altlength
    468473! Need to be consistent with GCM computations
    469 !    if (za(ilon,ilat,ilev,itim).ne.miss_val) then
     474    if (vitu(ilon,ilat,ilev,itim).ne.miss_val) then
    470475     rayon(ilon,ilat,ilev,itim) = a0
    471476!     rayon(ilon,ilat,ilev,itim) = za(ilon,ilat,ilev,itim) + a0
    472477      grav(ilon,ilat,ilev,itim) = g0*a0*a0 &
    473478                 /(rayon(ilon,ilat,ilev,itim)*rayon(ilon,ilat,ilev,itim))
    474 !    else
    475 !     rayon(ilon,ilat,ilev,itim) = miss_val
    476 !      grav(ilon,ilat,ilev,itim) = miss_val
    477 !    endif
     479    else
     480     rayon(ilon,ilat,ilev,itim) = miss_val
     481      grav(ilon,ilat,ilev,itim) = miss_val
     482    endif
    478483  enddo
    479484 enddo
     
    526531 do ilat=1,latlength
    527532  do ilev=1,altlength
     533    if (rayon(ilon,ilat,ilev,itim).ne.miss_val) then
    528534      oaam(itim) = oaam(itim) &
    529535       + osam(ilon,ilat,ilev,itim)/ hadday * dmass(ilon,ilat,ilev,itim)
    530536      raam(itim) = raam(itim) &
    531537       + rsam(ilon,ilat,ilev,itim)/ hadday * dmass(ilon,ilat,ilev,itim)
     538    endif
    532539  enddo
    533540 enddo
  • trunk/LMDZ.TITAN/Tools/compile_pgf

    r816 r1356  
    11# path for netcdf should be adapted to your configuration !
    22
    3 \rm planet.h
    4 ln -s $2.h planet.h
     3\cp -f $2.h planet.h
    54 pgf95 -Bstatic cpdet.F90 moyzon.F moyzon2.F moytim.F dx_dp.F epflux.F90 \
    65    io.F90 dmass.F90 reverse.F90 $1.F90 \
  • trunk/LMDZ.TITAN/Tools/planet.h

    r816 r1356  
    11! Parameters needed to integrate hydrostatic equation:
    22
    3 real,parameter :: g0=8.87
    4 !g0: exact mean gravity at radius=6051.km
     3real,parameter :: g0=1.35
     4!g0: exact mean gravity at radius=2575.km
    55
    6 real,parameter :: a0=6051.E3
    7 !a0: 'mean' radius=6051.km
     6real,parameter :: a0=2575.E3
     7!a0: 'mean' radius=2575.km
    88
    9 real,parameter :: R0=191.4 ! molecular gas constant
     9real,parameter :: R0=296.9 ! molecular gas constant
    1010
    11 real,parameter :: psref=9.2e6 ! reference pressure at surface (Pa)
     11real,parameter :: psref=1.4e5 ! reference pressure at surface (Pa)
    1212
    13 real,parameter :: omega=2.992677e-7 ! angular rotation speed (s-1)
     13real,parameter :: omega=4.5238899E-06 ! angular rotation speed (s-1)
    1414
    15 real,parameter :: localday=1.0087e7 ! local day (s)
     15real,parameter :: localday=1.37889e6 ! local day (s)
    1616
    17 character (len=5),parameter :: planet="Venus"
     17character (len=5),parameter :: planet="Titan"
    1818
    19 real,parameter :: cp0=1000. !doit etre egal a cpp (dyn) et RCPD (phy)
    20 real,parameter :: t0=460.
    21 real,parameter :: nu=0.35
    22 
     19real,parameter :: cp0=1039. !doit etre egal a cpp (dyn) et RCPD (phy)
     20real,parameter :: t0=0.
     21real,parameter :: nu=0.
  • trunk/LMDZ.TITAN/libf/phytitan/cirs_haze.F90

    r1126 r1356  
    1 subroutine cirs_haze(press,wno,taeros,taeroscat)
     1subroutine cirs_haze(press,wno,taeros,taeroscat,cbar)
    22IMPLICIT NONE
    33
    44real,intent(in)   :: press,wno
    5 real,intent(inout):: taeros,taeroscat
     5real,intent(inout):: taeros,taeroscat,cbar
    66
    77!---------------------------
     
    2121
    2222if (wno.eq.600.) then
    23  print*,press,wno,taeros,taeroscat
     23 print*,press,wno,taeros,taeroscat,cbar
    2424endif
    2525
  • trunk/LMDZ.TITAN/libf/phytitan/cooling.F

    r888 r1356  
    1       SUBROUTINE COOLING(NG,NL,PRESS,TEMP,Z,Q0,lwnet,pfluxi,icld)
     1      SUBROUTINE COOLING(NG,NL,PRESS,TEMP,Z,Q0,zlwup,zlwdn,pfluxi,icld)
    22
    33c=======================================================================
     
    3636c
    3737c      q0(nl-1)         radiative cooling in K/sec
    38 c      lwnet(nl)        net fluxes, (+) upward
     38c      zlwup(nl)         up fluxes,   (+) upward
     39c      zlwdn(nl)         down fluxes, (+) downward
    3940c      pfluxi          IR descendant a la surface (+ vers le bas)
    4041c
     
    7374      REAL PRESS(NG,NL),TEMP(NG,NL)
    7475      REAL Z(NG,NL),Q0(NG,NL-1)
    75       REAL lwnet(NG,NL),UBARI2
     76      REAL zlwup(NG,NL),zlwdn(NG,NL),UBARI2
    7677      real pfluxi(NG)
    7778
     
    147148      UBARI2=UBARI
    148149
    149 C ZERO THE NET FLUXES
     150C ZERO THE FLUXES
    150151         Q0    = 0.0
    151          lwnet = 0.0
     152         zlwup = 0.0
     153         zlwdn = 0.0
    152154
    153155c-----------------------------------------------------------------------
     
    2752773520      CONTINUE
    276278
    277 c compute the net IR flux, (+) upward:
     279c compute the up (+ upward) and down (+ downward) IR fluxes:
    278280c
    279281          DO J=1,NL
    280282          DO ig=1,NG
    281              lwnet(ig,J)= lwnet(ig,J)+ DWNI(K)*(FUPI(ig,J)-FDI(ig,J))
     283             zlwup(ig,J)= zlwup(ig,J)+ DWNI(K)*FUPI(ig,J)
     284             zlwdn(ig,J)= zlwdn(ig,J)+ DWNI(K)*FDI(ig,J)
    282285          ENDDO
    283286          ENDDO
     
    312315      DO 3550 ig=1,NG
    313316         pfluxi(ig)  = 1.e-3*pfluxi(ig)
    314          lwnet(ig,:) = 1.e-3*lwnet(ig,:)
     317         zlwup(ig,:) = 1.e-3*zlwup(ig,:)
     318         zlwdn(ig,:) = 1.e-3*zlwdn(ig,:)
    3153193550  CONTINUE
    316320
  • trunk/LMDZ.TITAN/libf/phytitan/drag_noro.F

    r1056 r1356  
    3030c paprs---input-R-Pressure in semi layers    (Pa)
    3131c pplay---input-R-Pressure model-layers      (Pa)
    32 c pgeop---input-R-Geopotential model layers      (m)
     32c pgeop---input-R-Geopotential model layers (reference ground)
    3333c pn2-----input-R-Brunt-Vaisala freq.^2 at 1/2 layers
    3434c t-------input-R-temperature (K)
     
    6666c ================
    6767c
    68 c zgeom-----R: Altitude of layer above ground
     68c zgeom-----R: Altitude (m) of layer above ground (from top to bottom)
    6969c pt, pu, pv --R: t u v from top to bottom
    7070c pdtdt, pdudt, pdvdt --R: t u v tendencies (from top to bottom)
     
    137137      DO k = klev, 1, -1
    138138      DO i = 1, klon
    139          zgeom(i,k) = pgeop(i,klev-k+1)
     139         zgeom(i,k) = pgeop(i,klev-k+1)/RG
    140140         zn2(i,k)   = pn2(i,klev-k+1)
    141141      ENDDO
  • trunk/LMDZ.TITAN/libf/phytitan/grid_noro.F

    r1056 r1356  
    9393      REAL zpic(imar+1,jmar),zval(imar+1,jmar)
    9494      real num_tot(2200,1100),num_lan(2200,1100)
    95 c
     95
    9696      REAL a(2200),b(2200),c(1100),d(1100)
    97 c
     97
     98c pas defini puisque pas de physique dans newstart...
     99      RPI=2.*ASIN(1.)
     100      RA=2575000.
     101
    98102      print *,' parametres de l orographie a l echelle sous maille'
    99103
  • trunk/LMDZ.TITAN/libf/phytitan/heating.F

    r495 r1356  
    1        SUBROUTINE heating(dist,rmu0,fract,falbe,sol_htg,swnet,icld)
     1       SUBROUTINE heating(dist,rmu0,fract,falbe,sol_htg,zswup,zswdn,
     2     .                    icld)
    23
    34
     
    2324c      -------
    2425c sol_htg-----output-R- echauffement atmospherique (visible) (K/s)
    25 c swnet-------output-R- flux solaire net (+ vers le bas)     (W/m2)
     26c zswup-------output-R- flux solaire upward  (+ vers le haut)     (W/m2)
     27c zswdn-------output-R- flux solaire downward (+ vers le bas)     (W/m2)
    2628c
    2729c=======================================================================
     
    5153
    5254      real sol_htg(klon,klev)
    53       real swnet(klon,klev+1)
     55      real zswup(klon,klev+1)
     56      real zswdn(klon,klev+1)
    5457     
    5558c   Local:
     
    8790         fnetv  = 0.0
    8891         sol_htg= 0.0
    89          swnet  = 0.0
     92         zswup  = 0.0
     93         zswdn  = 0.0
    9094c pour sorties dans gfluxv...
    9195         iprint = 0
     
    101105               CALL sfluxv(iprint,ig,dist,falbe,icld)      ! #3
    102106
    103                fnetv(ig,:) = fnetv(ig,:) *fract(ig)   ! >0 vers le haut
    104 c >0 vers le bas + conversion en W/m2:
    105                swnet(ig,:) = -1.e-3*fnetv(ig,:)         
     107               do K=1,NSPECV
     108                 zswup(ig,:) = zswup(ig,:)+FUPV(ig,:,K)*fract(ig) ! >0 up
     109                 zswdn(ig,:) = zswdn(ig,:)+FDV(ig,:,K) *fract(ig) ! >0 down
     110               enddo
     111               fnetv(ig,:) = fnetv(ig,:) *fract(ig)   ! >0 up
     112
     113c conversion en W/m2:
     114               zswup(ig,:) = 1.e-3*zswup(ig,:)
     115               zswdn(ig,:) = 1.e-3*zswdn(ig,:)
    106116               
    107117               DO j=1,nlayer
  • trunk/LMDZ.TITAN/libf/phytitan/ini_histmth.h

    r1056 r1356  
    236236     .                32, "ave(X)", zsto1,zout)
    237237
     238c        CALL histdef(nid_mth, "SWup", "upward SW flux","W/m2",
     239c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
     240c    .                32, "ave(X)", zsto1,zout)
     241
     242c        CALL histdef(nid_mth, "SWdn", "downward SW flux","W/m2",
     243c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
     244c    .                32, "ave(X)", zsto1,zout)
     245
    238246         CALL histdef(nid_mth, "LWnet", "Net LW flux","W/m2",
    239247     .                iim,jj_nb,nhori, klev,1,klev,nvert,
    240248     .                32, "ave(X)", zsto1,zout)
     249
     250c        CALL histdef(nid_mth, "LWup", "upward LW flux","W/m2",
     251c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
     252c    .                32, "ave(X)", zsto1,zout)
     253
     254c        CALL histdef(nid_mth, "LWdn", "downward LW flux","W/m2",
     255c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
     256c    .                32, "ave(X)", zsto1,zout)
     257
     258         CALL histdef(nid_mth, "fluxvdf", "PBL net flux","W/m2",
     259     .                iim,jj_nb,nhori, klev,1,klev,nvert,
     260     .                32, "ave(X)", zsto,zout)
     261
     262         CALL histdef(nid_mth, "fluxdyn", "Dyn. net flux","W/m2",
     263     .                iim,jj_nb,nhori, klev,1,klev,nvert,
     264     .                32, "ave(X)", zsto,zout)
     265
     266         CALL histdef(nid_mth, "fluxajs", "Dry adj. net flux","W/m2",
     267     .                iim,jj_nb,nhori, klev,1,klev,nvert,
     268     .                32, "ave(X)", zsto,zout)
     269
     270c        CALL histdef(nid_mth, "fluxec", "Cin. net flux","W/m2",
     271c    .                iim,jj_nb,nhori, klev,1,klev,nvert,
     272c    .                32, "ave(X)", zsto,zout)
    241273
    242274c --------------
  • trunk/LMDZ.TITAN/libf/phytitan/newstart.F

    r1056 r1356  
    2222      USE infotrac
    2323      use cpdet_mod, only: ini_cpdet,t2tpot
     24      use exner_hyb_m, only: exner_hyb
     25      use exner_milieu_m, only: exner_milieu
    2426
    2527      implicit none
     
    135137      integer, dimension(4) :: start,counter
    136138      REAL phisinverse(iip1,jjp1)  ! geopotentiel au sol avant inversion
    137       logical topoflag,albedoflag
     139      logical topoflag,albedoflag,razvitu,razvitv
    138140      real    albedo
    139141     
     
    969971c--------------------------------------------------------------
    970972
     973!!! ATTENTION TEMPORAIRE
     974c     ps(:,:)=146700.
     975
    971976      ptotal =  0.
    972977      DO j=1,jjp1
     
    10041009      CALL pression(ip1jmp1, ap, bp, ps, p3d)
    10051010         if (disvert_type==1) then
    1006            CALL exner_hyb(  ip1jmp1, ps, p3d,alpha,beta,pks, pk, pkf )
     1011           CALL exner_hyb(  ip1jmp1, ps, p3d, pks, pk, pkf )
    10071012         else ! we assume that we are in the disvert_type==2 case
    1008            CALL exner_milieu( ip1jmp1, ps, p3d, beta, pks, pk, pkf )
     1013           CALL exner_milieu( ip1jmp1, ps, p3d, pks, pk, pkf )
    10091014         endif
    10101015     
     
    10121017
    10131018c ATTENTION: peut servir, mais bon...
    1014 c modif: profil uniforme
    10151019c     do l=1,lmold
    10161020c      do j=1,jmold+1
    10171021c       do i=1,imold+1
     1022c modif: profil uniforme
    10181023c          told(i,j,l)=told(1,jmold/2,l)
     1024c mean T profile:
     1025c       told(i,j,l) = 142.1*exp(-((p3d(i,j,l)/100.+21.45)/40.11)**2.)
     1026c    .              + 106.3*exp(-((p3d(i,j,l)/100.-3183.)/4737.)**2.)
    10191027c       enddo
    10201028c      enddo
     
    10401048c on assure la periodicite
    10411049      teta(iip1,:,:) =  teta(1,:,:)
     1050
     1051! RESETING U TO 0: may be done through run.def
     1052       razvitu = . FALSE .
     1053       CALL getin('razvitu',razvitu)
     1054       razvitv = . FALSE .
     1055       CALL getin('razvitv',razvitv)
    10421056
    10431057c calcul des champ de vent; passage en vent covariant
     
    10571071     &                   rlonuold,rlatvold,rlonu,rlatv)
    10581072      call scal_wind(us,vs,unat,vnat)
     1073! Reseting u=0
     1074      if (razvitu) then
     1075           unat(:,:,:) = 0.
     1076      endif
    10591077      write (*,*) 'unat ', unat (1,2,1)    ! INFO
    10601078      do l=1,llm
     
    10701088      write (*,*) 'ucov ', ucov (1,2,1)  ! INFO
    10711089c     write(48,*) 'ucov',ucov
     1090! Reseting v=0
     1091      if (razvitv) then
     1092           vnat(:,:,:) = 0.
     1093      endif
     1094      write (*,*) 'vnat ', vnat (1,2,1)    ! INFO
    10721095      do l=1,llm
    10731096        do j = 1, jjm
  • trunk/LMDZ.TITAN/libf/phytitan/phys_state_var_mod.F90

    r1056 r1356  
    5151! toplwdown : downward CS LW flux at TOA
    5252! toplwdownclr : downward CS LW flux at TOA
    53       REAL,ALLOCATABLE,SAVE :: swnet(:,:)   
    54 !$OMP THREADPRIVATE(swnet)
    55       REAL,ALLOCATABLE,SAVE :: lwnet(:,:)   
    56 !$OMP THREADPRIVATE(lwnet)
     53! swnet,swdn,lwdn: + downward
     54! lwnet,swup,lwup: + upward
     55      REAL,ALLOCATABLE,SAVE :: swnet(:,:),swup(:,:),swdn(:,:)   
     56!$OMP THREADPRIVATE(swnet,swup,swdn)
     57      REAL,ALLOCATABLE,SAVE :: lwnet(:,:),lwup(:,:),lwdn(:,:)
     58!$OMP THREADPRIVATE(lwnet,lwup,lwdn)
    5759      REAL,ALLOCATABLE,SAVE :: heat(:,:)   
    5860!$OMP THREADPRIVATE(heat)
     
    124126!
    125127      ALLOCATE(swnet(klon,klev+1), lwnet(klon,klev+1))
     128      ALLOCATE(swup(klon,klev+1), lwup(klon,klev+1))
     129      ALLOCATE(swdn(klon,klev+1), lwdn(klon,klev+1))
    126130      ALLOCATE(heat(klon,klev), heat0(klon,klev))
    127131      ALLOCATE(cool(klon,klev), cool0(klon,klev))
     
    152156      deallocate(zuthe, zvthe)
    153157      deallocate(swnet, lwnet)
     158      deallocate(swup, lwup)
     159      deallocate(swdn, lwdn)
    154160      deallocate(heat, heat0)
    155161      deallocate(cool, cool0)
  • trunk/LMDZ.TITAN/libf/phytitan/physiq.F

    r1126 r1356  
    77     .            paprs,pplay,ppk,pphi,pphis,presnivs,
    88     .            u,v,t,qx,
    9      .            omega,
     9     .            flxmw,
    1010     .            d_u, d_v, d_t, d_qx, d_ps)
    1111
     
    4646c qx------input-R-mass mixing ratio traceurs (kg/kg)
    4747c d_t_dyn-input-R-tendance dynamique pour "t" (K/s)
    48 c omega---input-R-vitesse verticale en Pa/s
     48c flxmw---input-R-flux de masse vertical en kg/s
    4949c
    5050c d_u-----output-R-tendance physique de "u" (m/s/s)
     
    133133      REAL d_t_dyn(klon,klev)
    134134
    135       REAL omega(klon,klev)
     135      REAL flxmw(klon,klev)
    136136
    137137      REAL d_u(klon,klev)
     
    146146      INTEGER,save :: itap        ! compteur pour la physique
    147147      REAL delp(klon,klev)        ! epaisseur d'une couche
     148      REAL omega(klon,klev)
    148149     
    149150      INTEGER igwd,idx(klon),itest(klon)
     
    722723c====================================================================
    723724c
     725c Calcule de vitesse verticale a partir de flux de masse verticale
     726      DO k = 1, klev
     727       DO i = 1, klon
     728        omega(i,k) = RG*flxmw(i,k) / airephy(i)
     729       END DO
     730      END DO
     731
    724732c Ajouter le geopotentiel du sol:
    725733c
     
    13161324c
    13171325c A ADAPTER POUR VENUS!!!
    1318         CALL drag_noro(klon,klev,dtime,paprs,pplay,zphi,zn2,
     1326        CALL drag_noro(klon,klev,dtime,paprs,pplay,pphi,zn2,
    13191327     e                   zmea,zstd, zsig, zgam, zthe,zpic,zval,
    13201328     e                   igwd,idx,itest,
  • trunk/LMDZ.TITAN/libf/phytitan/radlwsw.F

    r1056 r1356  
    3737      USE comgeomphy
    3838      USE phys_state_var_mod, only: falbe,heat,cool,radsol,
    39      .      topsw,toplw,solsw,sollw,sollwdown,lwnet,swnet
     39     .      topsw,toplw,solsw,sollw,sollwdown,lwnet,swnet,
     40     .      lwup,lwdn,swup,swdn
    4041      USE write_field_phy
    4142       IMPLICIT none
     
    6061      real zheatc(klon,klev), zcoolc(klon,klev)
    6162      real zheatp(klon,klev), zcoolp(klon,klev)
    62       REAL zswnetc(klon,klev+1),zlwnetp(klon,klev+1)
    63       REAL zswnetp(klon,klev+1),zlwnetc(klon,klev+1)
     63      REAL zswupc(klon,klev+1),zlwupc(klon,klev+1)
     64      REAL zswupp(klon,klev+1),zlwupp(klon,klev+1)
     65      REAL zswdnc(klon,klev+1),zlwdnc(klon,klev+1)
     66      REAL zswdnp(klon,klev+1),zlwdnp(klon,klev+1)
    6467      REAL zsollwdownc(klon),zsollwdownp(klon)
    6568      INTEGER icld
     
    124127       IF (clouds.eq.1) THEN
    125128         ICLD = 1   ! colonne avec nuages
    126          CALL heating(dist,rmu0,fract,falbe,zheatc,zswnetc,icld)
     129         CALL heating(dist,rmu0,fract,falbe,zheatc,zswupc,zswdnc,icld)
    127130       ELSE
    128131         zheatc  = 0.
    129          zswnetc = 0.
     132         zswupc = 0.
     133         zswdnc = 0.
    130134       ENDIF
    131135       ICLD = 0   ! colonne sans nuages
    132        CALL heating(dist,rmu0,fract,falbe,zheatp,zswnetp,icld)
     136       CALL heating(dist,rmu0,fract,falbe,zheatp,zswupp,zswdnp,icld)
    133137
    134138c inversion de l'axe vertical
     
    141145       do l=1,klev+1
    142146         do i=1,klon
    143            swnet(i,l)=zswnetc(i,klev+2-l)*xnuf +
    144      &                zswnetp(i,klev+2-l)*(1.-xnuf)
     147           swup(i,l) =zswupc(i,klev+2-l)*xnuf +
     148     &                zswupp(i,klev+2-l)*(1.-xnuf)
     149           swdn(i,l) =zswdnc(i,klev+2-l)*xnuf +
     150     &                zswdnp(i,klev+2-l)*(1.-xnuf)
     151           swnet(i,l)=swdn(i,l)-swup(i,l)
    145152         enddo
    146153       enddo
     
    157164       IF (clouds.eq.1) THEN
    158165         ICLD = 1
    159          CALL cooling(klon,klev+1,zp,zt,zz,zcoolc,zlwnetc,zsollwdownc,
    160      &   icld)
     166         CALL cooling(klon,klev+1,zp,zt,zz,zcoolc,zlwupc,zlwdnc,
     167     &   zsollwdownc,icld)
    161168       ELSE
    162169         zcoolc      = 0.
    163          zlwnetc     = 0.
     170         zlwupc      = 0.
     171         zlwdnc      = 0.
    164172         zsollwdownc = 0.
    165173       ENDIF
    166174       ICLD = 0
    167        CALL cooling(klon,klev+1,zp,zt,zz,zcoolp,zlwnetp,zsollwdownp,
    168      & icld)
     175       CALL cooling(klon,klev+1,zp,zt,zz,zcoolp,zlwupp,zlwdnp,
     176     & zsollwdownp,icld)
    169177
    170178c inversion de l'axe vertical
     
    177185       do l=1,klev+1
    178186         do i=1,klon
    179            lwnet(i,l)=zlwnetc(i,klev+2-l)*xnuf +
    180      &                zlwnetp(i,klev+2-l)*(1.-xnuf)
     187           lwup(i,l) =zlwupc(i,klev+2-l)*xnuf +
     188     &                zlwupp(i,klev+2-l)*(1.-xnuf)
     189           lwdn(i,l) =zlwdnc(i,klev+2-l)*xnuf +
     190     &                zlwdnp(i,klev+2-l)*(1.-xnuf)
     191           lwnet(i,l)=lwup(i,l)-lwdn(i,l)
    181192         enddo
    182193       enddo
  • trunk/LMDZ.TITAN/libf/phytitan/start2archive.F

    r1056 r1356  
    1818      USE infotrac
    1919      USE control_mod
    20       use cpdet_mod, only: tpot2t
     20      use cpdet_mod, only: tpot2t,ini_cpdet
     21      use exner_hyb_m, only: exner_hyb
     22      use exner_milieu_m, only: exner_milieu
    2123
    2224      implicit none
     
    140142c-----------------------------------------------------------------------
    141143
     144      CALL conf_gcm( 99, .TRUE. )
    142145      call iniconst
    143146      call inigeom
    144147      call inifilr
     148      call ini_cpdet
     149
    145150      CALL pression(ip1jmp1, ap, bp, ps, p3d)
    146151         if (disvert_type==1) then
    147            CALL exner_hyb(  ip1jmp1, ps, p3d,alpha,beta,pks, pk, pkf )
     152           CALL exner_hyb(  ip1jmp1, ps, p3d, pks, pk, pkf )
    148153         else ! we assume that we are in the disvert_type==2 case
    149            CALL exner_milieu( ip1jmp1, ps, p3d, beta, pks, pk, pkf )
     154           CALL exner_milieu( ip1jmp1, ps, p3d, pks, pk, pkf )
    150155         endif
    151156
  • trunk/LMDZ.TITAN/libf/phytitan/write_histmth.h

    r1056 r1356  
    188188      call histwrite_phy(nid_mth,.false.,"SWnet",
    189189     .          itau_w,swnet(1:klon,1:klev))
     190c     call histwrite_phy(nid_mth,.false.,"SWup",
     191c    .          itau_w,swup(1:klon,1:klev))
     192c     call histwrite_phy(nid_mth,.false.,"SWdn",
     193c    .          itau_w,swdn(1:klon,1:klev))
    190194      call histwrite_phy(nid_mth,.false.,"LWnet",
    191195     .          itau_w,lwnet(1:klon,1:klev))
     196c     call histwrite_phy(nid_mth,.false.,"LWup",
     197c    .          itau_w,lwup(1:klon,1:klev))
     198c     call histwrite_phy(nid_mth,.false.,"LWdn",
     199c    .          itau_w,lwdn(1:klon,1:klev))
     200      call histwrite_phy(nid_mth,.false.,"fluxvdf",itau_w,fluxt)
     201      call histwrite_phy(nid_mth,.false.,"fluxdyn",itau_w,flux_dyn)
     202      call histwrite_phy(nid_mth,.false.,"fluxajs",itau_w,flux_ajs)
     203c     call histwrite_phy(nid_mth,.false.,"fluxec",itau_w,flux_ec)
    192204
    193205c --------------
  • trunk/LMDZ.VENUS/Tools/angmom.F90

    r842 r1356  
    242242call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
    243243if (ierr1.ne.NF_NOERR) then
    244   write(*,*) "  looking for psol instead... "
    245   text="psol"
     244  write(*,*) "  looking for ps instead... "
     245  text="ps"
    246246  call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
    247   if (ierr1.ne.NF_NOERR) stop "Error: Failed to get psol ID"
     247  if (ierr1.ne.NF_NOERR) then
     248    write(*,*) "  looking for psol instead... "
     249    text="psol"
     250    call get_var3d(infid,lonlength,latlength,timelength,text,ps,ierr1,ierr2)
     251    if (ierr1.ne.NF_NOERR) stop "Error: Failed to get psol ID"
     252  endif
    248253endif
    249254if (ierr2.ne.NF_NOERR) stop "Error: Failed reading surface pressure"
     
    467472  do ilev=1,altlength
    468473! Need to be consistent with GCM computations
    469 !    if (za(ilon,ilat,ilev,itim).ne.miss_val) then
     474    if (vitu(ilon,ilat,ilev,itim).ne.miss_val) then
    470475     rayon(ilon,ilat,ilev,itim) = a0
    471476!     rayon(ilon,ilat,ilev,itim) = za(ilon,ilat,ilev,itim) + a0
    472477      grav(ilon,ilat,ilev,itim) = g0*a0*a0 &
    473478                 /(rayon(ilon,ilat,ilev,itim)*rayon(ilon,ilat,ilev,itim))
    474 !    else
    475 !     rayon(ilon,ilat,ilev,itim) = miss_val
    476 !      grav(ilon,ilat,ilev,itim) = miss_val
    477 !    endif
     479    else
     480     rayon(ilon,ilat,ilev,itim) = miss_val
     481      grav(ilon,ilat,ilev,itim) = miss_val
     482    endif
    478483  enddo
    479484 enddo
     
    526531 do ilat=1,latlength
    527532  do ilev=1,altlength
     533    if (rayon(ilon,ilat,ilev,itim).ne.miss_val) then
    528534      oaam(itim) = oaam(itim) &
    529535       + osam(ilon,ilat,ilev,itim)/ hadday * dmass(ilon,ilat,ilev,itim)
    530536      raam(itim) = raam(itim) &
    531537       + rsam(ilon,ilat,ilev,itim)/ hadday * dmass(ilon,ilat,ilev,itim)
     538    endif
    532539  enddo
    533540 enddo
  • trunk/LMDZ.VENUS/Tools/compile_pgf

    r816 r1356  
    11# path for netcdf should be adapted to your configuration !
    22
    3 \rm planet.h
    4 ln -s $2.h planet.h
     3#\rm planet.h
     4#ln -s $2.h planet.h
    55 pgf95 -Bstatic cpdet.F90 moyzon.F moyzon2.F moytim.F dx_dp.F epflux.F90 \
    66    io.F90 dmass.F90 reverse.F90 $1.F90 \
  • trunk/LMDZ.VENUS/libf/phyvenus/newstart.F

    r1301 r1356  
    2222      USE infotrac
    2323      use cpdet_mod, only: ini_cpdet,t2tpot
     24      use exner_hyb_m, only: exner_hyb
     25      use exner_milieu_m, only: exner_milieu
    2426
    2527      implicit none
     
    10481050      CALL pression(ip1jmp1, ap, bp, ps, p3d)
    10491051         if (disvert_type==1) then
    1050            CALL exner_hyb(  ip1jmp1, ps, p3d,alpha,beta,pks, pk, pkf )
     1052           CALL exner_hyb(  ip1jmp1, ps, p3d, pks, pk, pkf )
    10511053         else ! we assume that we are in the disvert_type==2 case
    1052            CALL exner_milieu( ip1jmp1, ps, p3d, beta, pks, pk, pkf )
     1054           CALL exner_milieu( ip1jmp1, ps, p3d, pks, pk, pkf )
    10531055         endif
    10541056     
  • trunk/LMDZ.VENUS/libf/phyvenus/start2archive.F

    r1301 r1356  
    1919      USE control_mod
    2020      use cpdet_mod, only: tpot2t,ini_cpdet
     21      use exner_hyb_m, only: exner_hyb
     22      use exner_milieu_m, only: exner_milieu
    2123
    2224      implicit none
     
    150152      CALL pression(ip1jmp1, ap, bp, ps, p3d)
    151153         if (disvert_type==1) then
    152            CALL exner_hyb(  ip1jmp1, ps, p3d,alpha,beta,pks, pk, pkf )
     154           CALL exner_hyb(  ip1jmp1, ps, p3d, pks, pk, pkf )
    153155         else ! we assume that we are in the disvert_type==2 case
    154            CALL exner_milieu( ip1jmp1, ps, p3d, beta, pks, pk, pkf )
     156           CALL exner_milieu( ip1jmp1, ps, p3d, pks, pk, pkf )
    155157         endif
    156158
Note: See TracChangeset for help on using the changeset viewer.