| [3421] | 1 | SUBROUTINE cosurf(ngrid,nlayer,nq,ptimestep, |
|---|
| 2 | & tsurf,pplev,pdpsurf,pq,pdq,pqsurf,pdqsurf,pdqco,pdqsco) |
|---|
| 3 | |
|---|
| 4 | use callkeys_mod, only: dayfrac |
|---|
| 5 | use comcstfi_mod, only: g, r |
|---|
| 6 | use comgeomfi_h |
|---|
| 7 | use comsaison_h, only: fract |
|---|
| 8 | use planete_mod, only: z0 |
|---|
| 9 | use tracer_h, only: igcm_co_gas,igcm_co_ice,igcm_ch4_ice, |
|---|
| 10 | & igcm_n2,mmol |
|---|
| 11 | IMPLICIT NONE |
|---|
| 12 | |
|---|
| 13 | c---------------- |
|---|
| 14 | c declarations: |
|---|
| 15 | c ------------- |
|---|
| 16 | |
|---|
| 17 | #include "dimensions.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(ngrid) |
|---|
| 47 | REAL zpsrf(ngrid) |
|---|
| 48 | REAL zq_co(ngrid) |
|---|
| 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 | |
|---|
| [3539] | 61 | u=0.3 |
|---|
| 62 | v=0.4 |
|---|
| [3421] | 63 | uv=sqrt(u**2+v**2) |
|---|
| 64 | |
|---|
| 65 | DO ig=1,ngrid |
|---|
| 66 | pdqsco(ig)=0. |
|---|
| 67 | pdqco(ig)=0. |
|---|
| 68 | ENDDO |
|---|
| 69 | |
|---|
| 70 | DO ig=1,ngrid |
|---|
| 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(ngrid,tsurf,zpsrf,qsat,pqsurf(:,igcm_n2), |
|---|
| 77 | & pqsurf(:,igcm_ch4_ice)) |
|---|
| 78 | |
|---|
| 79 | DO ig=1,ngrid |
|---|
| 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 |
|---|