Changeset 1645 for LMDZ5/trunk/libf/dyn3dpar/disvert.F90
- Timestamp:
- Jul 30, 2012, 6:01:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3dpar/disvert.F90
r1623 r1645 7 7 use new_unit_m, only: new_unit 8 8 use ioipsl, only: getin 9 use assert_m, only: assert 9 10 10 11 IMPLICIT NONE … … 21 22 22 23 real,intent(in) :: pa, preff 23 real,intent(out) :: ap(llmp1), bp(llmp1) 24 real,intent(out) :: ap(llmp1) ! in Pa 25 real, intent(out):: bp(llmp1) 24 26 real,intent(out) :: dpres(llm), nivsigs(llm), nivsig(llmp1) 25 27 real,intent(out) :: presnivs(llm) … … 79 81 80 82 sig(llm+1)=0. 83 84 bp(: llm) = EXP(1. - 1. / sig(: llm)**2) 85 bp(llmp1) = 0. 86 87 ap = pa * (sig - bp) 81 88 case("tropo") 82 89 DO l = 1, llm … … 89 96 sig(l) = sig(l+1) + dsig(l) 90 97 ENDDO 98 99 bp(1)=1. 100 bp(2: llm) = EXP(1. - 1. / sig(2: llm)**2) 101 bp(llmp1) = 0. 102 103 ap(1)=0. 104 ap(2: llm + 1) = pa * (sig(2: llm + 1) - bp(2: llm + 1)) 91 105 case("strato") 92 106 if (llm==39) then … … 110 124 sig(l) = sig(l+1) + dsig(l) 111 125 ENDDO 126 127 bp(1)=1. 128 bp(2: llm) = EXP(1. - 1. / sig(2: llm)**2) 129 bp(llmp1) = 0. 130 131 ap(1)=0. 132 ap(2: llm + 1) = pa * (sig(2: llm + 1) - bp(2: llm + 1)) 112 133 case("read") 134 ! Read "ap" and "bp". First line is skipped (title line). "ap" 135 ! should be in Pa. First couple of values should correspond to 136 ! the surface, that is : "bp" should be in descending order. 113 137 call new_unit(unit) 114 138 open(unit, file="hybrid.txt", status="old", action="read", & … … 116 140 read(unit, fmt=*) ! skip title line 117 141 do l = 1, llm + 1 118 read(unit, fmt=*) sig(l)142 read(unit, fmt=*) ap(l), bp(l) 119 143 end do 120 144 close(unit) 145 call assert(ap(1) == 0., ap(llm + 1) == 0., bp(1) == 1., & 146 bp(llm + 1) == 0., "disvert: bad ap or bp values") 121 147 case default 122 148 call abort_gcm("disvert", 'Wrong value for "vert_sampling"', 1) … … 130 156 nivsig(l)= REAL(l) 131 157 ENDDO 132 133 ! .... Calculs de ap(l) et de bp(l) ....134 ! ..... pa et preff sont lus sur les fichiers start par lectba .....135 136 bp(llmp1) = 0.137 138 DO l = 1, llm139 bp(l) = EXP( 1. -1./( sig(l)*sig(l)) )140 ap(l) = pa * ( sig(l) - bp(l) )141 ENDDO142 143 bp(1)=1.144 ap(1)=0.145 146 ap(llmp1) = pa * ( sig(llmp1) - bp(llmp1) )147 158 148 159 write(lunout, *) trim(modname),': BP '
Note: See TracChangeset
for help on using the changeset viewer.