source: trunk/LMDZ.VENUS/libf/phyvenus/nlthermeq.F @ 1530

Last change on this file since 1530 was 1530, checked in by emillour, 9 years ago

Venus and Titan GCMs:
Updates in the physics to keep up with updates in LMDZ5 (up to
LMDZ5 trunk, rev 2350) concerning dynamics/physics separation:

  • Adapted makelmdz and makelmdz_fcm script to stop if trying to compile 1d model or newstart or start2archive in parallel.
  • got rid of references to "dimensions.h" in physics. Within physics packages, use nbp_lon (=iim), nbp_lat (=jjmp1) and nbp_lev (=llm) from module mod_grid_phy_lmdz (in phy_common) instead. Only partially done for Titan, because of many hard-coded commons; a necessary first step will be to clean these up (using modules).

EM

File size: 2.1 KB
Line 
1      subroutine nlthermeq(nlon, nlayer, pplev, pplay)
2c
3c  Compute the number of layers nlaylte (stored in common yomlw.h)
4c  over which local thermodynamic equilibrium
5c  radiation scheme should be run to be sure of covering at least to a
6c  height greater than (pressure lower than) p=pminte, set in nlteparams.h.
7c  The maximum layer needed is found for the worst possible case.
8c  Stephen Lewis 6/2000
9c  Modified Y. Wanherdrick/ F. Forget 09/2000
10      use dimphy
11      implicit none
12c#include "dimradmars.h"
13#include "nlteparams.h"
14c#include "yomlw.h"
15#include "clesphys.h"
16
17c
18c     Input:
19      integer nlon, nlayer
20      real pplev(nlon, nlayer+1)
21      real pplay(nlon, nlayer)
22c
23c     Local:
24      integer igpmax, ismax
25      logical firstcall
26      data firstcall /.true./
27      save firstcall, igpmax
28
29
30      INTEGER i,ix
31      real sxmax
32
33ccc     
34      if(firstcall) then
35c     Find the location of maximum surface pressure.
36c     Location won't vary much so only do it at the start;
37c     with no topography location would vary, but this is only
38c     needed for an estimate so any point would do in that case.
39      ismax=1 
40      sxmax=pplev(1,1)
41      ix=1
42        do i=1,nlon-1
43         if(pplev(i,ix).gt.sxmax) then
44           sxmax=pplev(i,ix)
45           ismax=i+1
46         endif
47       enddo
48
49
50         igpmax = ismax            ! longitude/ latitude where pression is maximum
51         write(*, 10) ptrans
52         write(*, 20) zw
53         write(*, 30) pminte
54         firstcall = .false.
55      endif
56
57      IF(callnlte .or. callnirco2) THEN
58c       Find first layer above pminte at this location
59        do nlaylte = nlayer, 1, -1
60      if (pplay(igpmax, nlaylte).gt.pminte)  go to 100
61        enddo
62      ELSE
63        nlaylte=nlayer       
64      END IF
65
66c    write(*,*) 'LTE rad. calculations up to layer ',  nlaylte
67
68c
69 100    return
70c
71
72   10 format(' nlthermeq: transition to NLTE centred at ',f6.2,'Pa')
73   20 format('               half-width (scale heights) ',f6.2)
74   30 format('          suggested LTE coverage at least ',f6.2,'Pa')
75   40 format(' nlthermeq: purely NLTE contribution over (nlayer) ',f6.2) 
76
77      end
Note: See TracBrowser for help on using the repository browser.