1 | SUBROUTINE cosurf(ngrid,nlayer,nq,ptimestep, |
---|
2 | & tsurf,pplev,pdpsurf,pq,pdq,pqsurf,pdqsurf,pdqco,pdqsco) |
---|
3 | |
---|
4 | use planet_h |
---|
5 | use comgeomfi_h |
---|
6 | IMPLICIT NONE |
---|
7 | |
---|
8 | c---------------- |
---|
9 | c declarations: |
---|
10 | c ------------- |
---|
11 | |
---|
12 | #include "dimensions.h" |
---|
13 | #include "dimphys.h" |
---|
14 | #include "comcstfi.h" |
---|
15 | #include "callkeys.h" |
---|
16 | #include "surfdat.h" |
---|
17 | #include "tracer.h" |
---|
18 | |
---|
19 | ! Routine for nogcm : sublimation/condensation scheme at the surface |
---|
20 | ! Output : tendancy for methane mixing ratio and surface reservoir : |
---|
21 | ! pdqco, pdqs_co |
---|
22 | |
---|
23 | !----------------------------------------------------------------------- |
---|
24 | ! Arguments |
---|
25 | |
---|
26 | |
---|
27 | INTEGER ngrid,nlayer,nq |
---|
28 | REAL ptimestep |
---|
29 | INTEGER ig,iq |
---|
30 | |
---|
31 | ! input : |
---|
32 | REAL tsurf(ngrid) |
---|
33 | REAL pplev(ngrid,nlayer+1) |
---|
34 | REAL pdpsurf(ngrid) |
---|
35 | REAL pq(ngrid,nlayer,nq) |
---|
36 | REAL pdq(ngrid,nlayer,nq) |
---|
37 | REAL pqsurf(ngrid,nq) |
---|
38 | REAL pdqsurf(ngrid,nq) |
---|
39 | REAL qsurf_n2(ngrid) |
---|
40 | |
---|
41 | ! Output |
---|
42 | REAL pdqco(ngrid) |
---|
43 | REAL pdqsco(ngrid) |
---|
44 | |
---|
45 | ! local |
---|
46 | REAL qsat(ngridmx) |
---|
47 | REAL zpsrf(ngridmx) |
---|
48 | REAL zq_co(ngridmx) |
---|
49 | REAL rho,u,v,uv,z00,cdrag,alt |
---|
50 | REAL vonk ! Von Karman Constant |
---|
51 | SAVE vonk |
---|
52 | DATA vonk/0.4/ |
---|
53 | |
---|
54 | ! Calculation of turbulent flux : F=rho*cdrag*uv*(qsat-zq) |
---|
55 | |
---|
56 | ! Calcul de cdrag |
---|
57 | alt=5. ! m |
---|
58 | z00=z0 !1.e-2 ! rugosity |
---|
59 | cdrag=(vonk/log(alt/z00))**2 |
---|
60 | |
---|
61 | u=6. |
---|
62 | v=3. |
---|
63 | uv=sqrt(u**2+v**2) |
---|
64 | |
---|
65 | DO ig=1,ngridmx |
---|
66 | pdqsco(ig)=0. |
---|
67 | pdqco(ig)=0. |
---|
68 | ENDDO |
---|
69 | |
---|
70 | DO ig=1,ngridmx |
---|
71 | zpsrf(ig)=pplev(ig,1) |
---|
72 | zq_co(ig)=pq(ig,1,igcm_co_gas) |
---|
73 | ! & + pdq(ig,1,igcm_co_gas)*ptimestep ! pas utile si fast |
---|
74 | ENDDO |
---|
75 | |
---|
76 | call cosat(ngridmx,tsurf,zpsrf,qsat,pqsurf(:,igcm_n2), |
---|
77 | & pqsurf(:,igcm_ch4_ice)) |
---|
78 | |
---|
79 | DO ig=1,ngridmx |
---|
80 | rho = zpsrf(ig) / (r * tsurf(ig) ) |
---|
81 | |
---|
82 | pdqsco(ig)=(-rho*uv*cdrag*(qsat(ig)-zq_co(ig))) |
---|
83 | |
---|
84 | if ((-pdqsco(ig)*ptimestep).gt.(pqsurf(ig,igcm_co_ice))) then |
---|
85 | !write(*,*)'cosurf : on sublime plus que qsurf_co!' |
---|
86 | pdqsco(ig)=-pqsurf(ig,igcm_co_ice)/ptimestep |
---|
87 | endif |
---|
88 | pdqco(ig)=-pdqsco(ig)*g/zpsrf(ig) |
---|
89 | ENDDO |
---|
90 | RETURN |
---|
91 | END |
---|