Changeset 3036 for trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
- Timestamp:
- Sep 8, 2023, 6:47:24 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r3027 r3036 23 23 & obliquit, emin_turb, lmixmin 24 24 use comcstfi_h, only: pi, rad, omeg, g, mugaz, rcp, r, cpp 25 use time_phylmdz_mod, only: daysec, dtphys, day_step, 26 & ecritphy, iphysiq 25 use time_phylmdz_mod, only: daysec, day_step, ecritphy, iphysiq 27 26 use dimradmars_mod, only: tauvis,totcloudfrac 28 27 use dust_param_mod, only: tauscaling … … 95 94 real,parameter :: odpref=610. ! DOD reference pressure (Pa) 96 95 c 97 INTEGER day0,dayn ! date initial (sol ; =0 a Ls=0) and final 98 REAL day ! date durant le run 99 REAL time ! time (0<time<1 ; time=0.5 a midi) 96 INTEGER day0,dayn ! initial (sol ; =0 at Ls=0) and final date 97 REAL day ! date during the run 98 REAL time ! time (0<time<1 ; time=0.5 a midi) 99 REAL dttestphys ! testphys1d timestep 100 100 REAL play(nlayer) ! Pressure at the middle of the layers (Pa) 101 101 REAL plev(nlayer+1) ! intermediate pressure levels (pa) 102 102 REAL psurf,tsurf(1) 103 REAL u(nlayer),v(nlayer) 104 REAL gru,grv ! prescribed "geostrophic" background wind105 REAL temp(nlayer) ! temperature at the middle of the layers106 REAL,ALLOCATABLE :: q(:,:) ! tracer mixing ratio (e.g. kg/kg)103 REAL u(nlayer),v(nlayer) ! zonal, meridional wind 104 REAL gru,grv ! prescribed "geostrophic" background wind 105 REAL temp(nlayer) ! temperature at the middle of the layers 106 REAL,ALLOCATABLE :: q(:,:) ! tracer mixing ratio (e.g. kg/kg) 107 107 REAL,ALLOCATABLE :: qsurf(:) ! tracer surface budget (e.g. kg.m-2) 108 108 REAL tsoil(nsoilmx) ! subsurface soik temperature (K) 109 109 REAL emis(1) ! surface layer 110 110 REAL albedo(1,1) ! surface albedo 111 REAL :: wstar(1)=0. 112 REAL q2(nlayer+1) ! Turbulent Kinetic Energy113 REAL zlay(nlayer) ! altitude estimee dans les couches (km)111 REAL :: wstar(1)=0. ! Thermals vertical velocity 112 REAL q2(nlayer+1) ! Turbulent Kinetic Energy 113 REAL zlay(nlayer) ! altitude estimee dans les couches (km) 114 114 115 115 c Physical and dynamical tandencies (e.g. m.s-2, K/s, Pa/s) … … 416 416 dayn=day0+ndt 417 417 ndt=ndt*day_step 418 dt phys=daysec/day_step418 dttestphys=daysec/day_step 419 419 420 420 c Imposed surface pressure … … 498 498 ! some initializations (some of which have already been 499 499 ! done above!) and loads parameters set in callphys.def 500 ! and allocates some arrays 501 ! Mars possible matter with dtphys in input and include!!!500 ! and allocates some arrays 501 ! Mars possible matter with dttestphys in input and include!!! 502 502 ! Initializations below should mimick what is done in iniphysiq for 3D GCM 503 503 call init_interface_dyn_phys … … 513 513 call phys_state_var_init(1,llm,nq,tname, 514 514 . day0,dayn,time, 515 . daysec,dt phys,515 . daysec,dttestphys, 516 516 . rad,g,r,cpp, 517 517 . nqperes,nqfils)! MVals: variables isotopes … … 838 838 atm_wat_tau = -1. ! Default: no time relaxation 839 839 if (water) then 840 print*,'Relax atmospheric water vapor profile?'840 write(*,*) 'Relax atmospheric water vapor profile?' 841 841 call getin("atm_wat_tau",atm_wat_tau) 842 842 write(*,*) "atm_wat_tau = ", atm_wat_tau … … 864 864 865 865 call physdem0("startfi.nc",longitude,latitude,nsoilmx,ngrid, 866 & llm,nq,dt phys,float(day0),0.,cell_area,866 & llm,nq,dttestphys,float(day0),0.,cell_area, 867 867 & albedodat,inertiedat,def_slope,subslope_dist) 868 868 call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq, 869 & dt phys,time,869 & dttestphys,time, 870 870 & tsurf,tsoil,inertiesoil,albedo,emis, 871 871 & q2,qsurf,tauscaling, … … 922 922 else ! Relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau 923 923 q(:,igcm_h2o_vap) = atm_wat_profile*g/psurf + (q(:,igcm_h2o_vap) 924 & - atm_wat_profile*g/psurf)*dexp(-dtphys/atm_wat_tau)924 & - atm_wat_profile*g/psurf)*dexp(-dttestphys/atm_wat_tau) 925 925 q(:,igcm_h2o_vap) = min(zqsat(:),q(:,igcm_h2o_vap)) 926 926 q(:,igcm_h2o_ice) = 0. ! reset h2o ice … … 932 932 c call physics 933 933 c -------------------- 934 CALL physiq (1,llm,nq, 935 , firstcall,lastcall, 936 , day,time,dtphys, 937 , plev,play,phi, 938 , u, v,temp, q, 939 , w, 934 CALL physiq (1,llm,nq,firstcall,lastcall, 935 , day,time,dttestphys,plev,play,phi, 936 , u,v,temp,q,w, 940 937 C - outputs 941 938 s du, dv, dtemp, dq,dpsurf) … … 963 960 c --------------------------------------- 964 961 firstcall=.false. 965 time=time+dt phys/daysec962 time=time+dttestphys/daysec 966 963 IF (time.gt.1.E+0) then 967 964 time=time-1.E+0 … … 973 970 974 971 DO ilayer=1,nlayer 975 u(ilayer)=u(ilayer)+dt phys*du(ilayer)976 v(ilayer)=v(ilayer)+dt phys*dv(ilayer)977 temp(ilayer)=temp(ilayer)+dt phys*dtemp(ilayer)972 u(ilayer)=u(ilayer)+dttestphys*du(ilayer) 973 v(ilayer)=v(ilayer)+dttestphys*dv(ilayer) 974 temp(ilayer)=temp(ilayer)+dttestphys*dtemp(ilayer) 978 975 ENDDO 979 976 980 977 c compute pressure for next time step 981 978 c ---------------------------------------------------------- 982 psurf=psurf+dt phys*dpsurf(1) ! surface pressure change979 psurf=psurf+dttestphys*dpsurf(1) ! surface pressure change 983 980 DO ilevel=1,nlevel 984 981 plev(ilevel)=ap(ilevel)+psurf*bp(ilevel) … … 991 988 DO iq = 1, nq 992 989 DO ilayer=1,nlayer 993 q(ilayer,iq)=q(ilayer,iq)+dt phys*dq(ilayer,iq)990 q(ilayer,iq)=q(ilayer,iq)+dttestphys*dq(ilayer,iq) 994 991 ENDDO 995 992 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.