SUBROUTINE cosurf(ngrid,nlayer,nq,ptimestep, & tsurf,pplev,pdpsurf,pq,pdq,pqsurf,pdqsurf,pdqco,pdqsco) use planet_h use comgeomfi_h IMPLICIT NONE c---------------- c declarations: c ------------- #include "dimensions.h" #include "dimphys.h" #include "comcstfi.h" #include "callkeys.h" #include "surfdat.h" #include "tracer.h" ! Routine for nogcm : sublimation/condensation scheme at the surface ! Output : tendancy for methane mixing ratio and surface reservoir : ! pdqco, pdqs_co !----------------------------------------------------------------------- ! Arguments INTEGER ngrid,nlayer,nq REAL ptimestep INTEGER ig,iq ! input : REAL tsurf(ngrid) REAL pplev(ngrid,nlayer+1) REAL pdpsurf(ngrid) REAL pq(ngrid,nlayer,nq) REAL pdq(ngrid,nlayer,nq) REAL pqsurf(ngrid,nq) REAL pdqsurf(ngrid,nq) REAL qsurf_n2(ngrid) ! Output REAL pdqco(ngrid) REAL pdqsco(ngrid) ! local REAL qsat(ngridmx) REAL zpsrf(ngridmx) REAL zq_co(ngridmx) REAL rho,u,v,uv,z00,cdrag,alt REAL vonk ! Von Karman Constant SAVE vonk DATA vonk/0.4/ ! Calculation of turbulent flux : F=rho*cdrag*uv*(qsat-zq) ! Calcul de cdrag alt=5. ! m z00=z0 !1.e-2 ! rugosity cdrag=(vonk/log(alt/z00))**2 u=6. v=3. uv=sqrt(u**2+v**2) DO ig=1,ngridmx pdqsco(ig)=0. pdqco(ig)=0. ENDDO DO ig=1,ngridmx zpsrf(ig)=pplev(ig,1) zq_co(ig)=pq(ig,1,igcm_co_gas) ! & + pdq(ig,1,igcm_co_gas)*ptimestep ! pas utile si fast ENDDO call cosat(ngridmx,tsurf,zpsrf,qsat,pqsurf(:,igcm_n2), & pqsurf(:,igcm_ch4_ice)) DO ig=1,ngridmx rho = zpsrf(ig) / (r * tsurf(ig) ) pdqsco(ig)=(-rho*uv*cdrag*(qsat(ig)-zq_co(ig))) if ((-pdqsco(ig)*ptimestep).gt.(pqsurf(ig,igcm_co_ice))) then !write(*,*)'cosurf : on sublime plus que qsurf_co!' pdqsco(ig)=-pqsurf(ig,igcm_co_ice)/ptimestep endif pdqco(ig)=-pdqsco(ig)*g/zpsrf(ig) ENDDO RETURN END