source: trunk/LMDZ.VENUS/libf/phyvenus/sw_venus_rh_1Dglobave.F @ 3567

Last change on this file since 3567 was 1621, checked in by emillour, 8 years ago

Further work on full dynamics/physics separation.

LMDZ.COMMON:

  • added phy_common/vertical_layers_mod.F90 to store information on vertical grid. This is where routines in the physics should get the information.
  • The contents of vertical_layers_mod intialized via dynphy_lonlat/inigeomphy_mod.F90.

LMDZ.MARS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • created an "ini_tracer_mod" routine in module "tracer_mod" for a cleaner initialization of the later.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.GENERIC:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added nqtot to tracer_h.F90.
  • removed some purely dynamics-related outputs (etot0, zoom parameters, etc.) from diagfi.nc and stats.nc outputs as these informations are not available in the physics.

LMDZ.VENUS:

  • physics now completely decoupled from dynamics; the physics package may now be compiled as a library (-libphy option of makelmdz_fcm).
  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics. Initialized via iniphysiq. IMPORTANT: there are some hard-coded constants! These should match what is in cpdet_mod.F90 in the dynamics.
  • got rid of references to moyzon_mod module within the physics. The required variables (tmoy, plevmoy) are passed to the physics as arguments to physiq.

LMDZ.TITAN:

  • added infotrac_phy.F90 to store information on tracers in the physics. Initialized via iniphysiq.
  • added cpdet_phy_mod.F90 to store t2tpot etc. functions to be used in the physics.
  • Extra work required to completely decouple physics and dynamics: moyzon_mod should be cleaned up and information passed from dynamics to physics as as arguments. Likewise moyzon_ch and moyzon_mu should not be queried from logic_mod (which is in the dynamics).

EM

File size: 4.7 KB
Line 
1      SUBROUTINE SW_venus_rh_1Dglobave(PRMU0, PFRAC,
2     S              PPB, pt,
3     S              PHEAT,
4     S              PTOPSW,PSOLSW,ZFSNET)
5     
6      use dimphy
7      use cpdet_phy_mod, only: cpdet
8      IMPLICIT none
9
10#include "YOMCST.h"
11C
12C     ------------------------------------------------------------------
13C
14C     PURPOSE.
15C     --------
16C
17c      this routine loads and interpolates the shortwave radiation
18c     fluxes taken from Rainer Haus calculations for Venus.
19c     Ref: Haus et al. 2016
20C
21C     AUTHOR.
22C     -------
23C        Sebastien Lebonnois
24C
25C     MODIFICATIONS.
26C     --------------
27C        ORIGINAL : 5/2016
28C     ------------------------------------------------------------------
29C
30C* ARGUMENTS:
31C
32c inputs
33
34      REAL   PRMU0  ! COSINE OF ZENITHAL ANGLE
35      REAL   PFRAC  ! fraction de la journee
36      REAL   PPB(klev+1)  ! inter-couches PRESSURE (bar)
37      REAL   pt(klev)     ! mid-layer temperature
38C
39c output
40
41      REAL   PHEAT(klev)  ! SHORTWAVE HEATING (K/s) within each layer
42      REAL   PTOPSW       ! SHORTWAVE FLUX AT T.O.A. (net)
43      REAL   PSOLSW       ! SHORTWAVE FLUX AT SURFACE (net)
44      REAL   ZFSNET(klev+1) ! net solar flux at ppb levels
45
46C
47C* LOCAL VARIABLES:
48C
49      integer nlrh,nszarh,nlatrh
50      parameter (nlrh=118)  ! fichiers Rainer Haus
51      parameter (nszarh=7) ! fichiers Rainer Haus
52      parameter (nlatrh=19) ! fichiers Rainer Haus
53     
54      integer i,j,lat,nsza,nsza0,nl0
55      real   zsnetmoy(nlrh+1,nlatrh)    ! net solar flux (W/m**2) (+ vers bas)
56      real   presrh(nlrh+1)             ! pressure in table (bar)
57      real   altrh(nlrh+1)              ! altitude in table (km)
58      real   latrh(nlatrh)              ! latitude in table (degrees)
59      real   zsolnet(nlrh+1)            ! for mean net solar flux in RH
60      character*22 nullchar
61      real   factflux
62      real   zsnet(nszarh)    ! net solar flux (W/m**2) (+ vers bas)
63      real   deltalat
64      logical firstcall
65      data    firstcall/.true./
66      save   zsolnet,altrh,presrh
67      save   firstcall
68     
69c ------------------------
70c Loading the file
71c ------------------------
72
73      if (firstcall) then
74
75       open(11,file='SolarNetFlux_RH.dat')
76
77       do i=1,nlrh+1
78          read(11,'(E5.1,4x,F8.2)') altrh(i),presrh(i)
79       enddo
80
81       do lat=1,nlatrh
82         latrh(lat)=5.*(lat-1)
83         read(11,*) nullchar
84         read(11,*) nullchar
85         read(11,*) nullchar
86         read(11,*) nullchar
87
88         do i=1,nlrh+1
89          read(11,'(E6.1,7(2x,F11.5),7x,F11.5)')
90     .          altrh(i),zsnet,zsnetmoy(i,lat)
91         enddo
92         read(11,*) nullchar
93       enddo
94       latrh(nlatrh)=89.
95
96       close(11)
97
98c ----------- TEST ------------
99c      Moyenne planetaire
100c -----------------------------
101
102      zsolnet=0.
103      do lat=1,nlatrh-1
104        deltalat=(latrh(lat+1)-latrh(lat))*RPI/180.
105        do j=1,nlrh+1
106        zsolnet(j) = zsolnet(j)+
107     .         (zsnetmoy(j,lat+1)+zsnetmoy(j,lat))/2.*
108     .       deltalat*cos((latrh(lat+1)+latrh(lat))*RPI/360.)
109        enddo
110      enddo
111c -----------------------------
112c --------  FIN TEST ----------
113
114       firstcall=.false.
115      endif
116
117c --------------------------------------
118c Interpolation in the GCM vertical grid
119c --------------------------------------
120
121c Pressure levels
122c ---------------
123
124      do j=1,klev+1
125        nl0 = nlrh
126        do i=nlrh+1,2,-1
127           if (presrh(i).ge.PPB(j)) then
128                nl0 = i-1
129           endif
130        enddo
131       
132        factflux = (log10(max(PPB(j),presrh(1)))-log10(presrh(nl0+1)))
133     .            /(log10(presrh(nl0))-log10(presrh(nl0+1)))
134
135        ZFSNET(j) =  factflux     *zsolnet(nl0)
136     .             + (1.-factflux)*zsolnet(nl0+1)
137       
138c-----TEST-------
139c tayloring the solar flux...
140c        if ((PPB(j).gt.0.236).and.(PPB(j).le.22.52)) then
141c         ZFSNET(j) = ZFSNET(j)+2.5*(1.+cos((log10(PPB(j)/3.5)/
142c     .                                  log10(0.236/3.5))*RPI))
143c        endif
144c----------------
145      enddo
146
147      PTOPSW = ZFSNET(klev+1)
148      PSOLSW = ZFSNET(1)
149     
150c Heating rates
151c -------------
152c On utilise le gradient du flux pour calculer le taux de chauffage:
153c   heat(K/s) = d(fluxnet)  (W/m2)
154c              *g           (m/s2)
155c              /(-dp)  (epaisseur couche, en Pa=kg/m/s2)
156c              /cp  (J/kg/K)
157
158      do j=1,klev
159! ADAPTATION GCM POUR CP(T)
160        PHEAT(j) = (ZFSNET(j+1)-ZFSNET(j))
161     .            *RG/cpdet(pt(j)) / ((PPB(j)-PPB(j+1))*1.e5)
162c-----TEST-------
163c tayloring the solar flux...
164        if ((PPB(j).gt.1.4).and.(PPB(j).le.10.)) then
165          PHEAT(j) = PHEAT(j)*3
166c       elseif ((PPB(j).gt.10.).and.(PPB(j).le.30.)) then
167c         PHEAT(j) = PHEAT(j)*1.5
168        endif
169c----------------
170c       print*,PPB(j),ZFSNET(j),PHEAT(j)
171      enddo
172c     stop
173      return
174      end
175
Note: See TracBrowser for help on using the repository browser.