Changeset 3179 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jan 18, 2024, 5:23:14 PM (11 months ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars/dyn1d
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
r3174 r3179 406 406 read(3,*) header, (qsurf(1,iq,j), j = 1,size(qsurf,3)), (q(1,ilayer,iq), ilayer = 1,nlayer) 407 407 if (trim(tname(iq)) /= trim(header)) then 408 write(*,*) 'Tracer names not compatible for initialization with "'//trim(start1Dname)//'"!' 408 write(*,*) 'Tracer names between "traceur.def" and "'//trim(start1Dname)//'" do not match!' 409 write(*,*) 'Please, write the tracer names in the same order for both files.' 409 410 error stop 410 411 endif … … 498 499 ! Initialize winds for first time step 499 500 if (.not. therestart1D) then 500 u (:)= gru501 v (:)= grv501 u = gru 502 v = grv 502 503 else 503 504 read(3,*) header, (u(ilayer), ilayer = 1,nlayer) … … 542 543 call init_vertical_layers(nlayer,preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt) 543 544 544 plev (:) = ap(:) + psurf*bp(:)545 play (:) = aps(:) + psurf*bps(:)546 zlay (:) = -200.*r*log(play(:)/plev(1))/g545 plev = ap + psurf*bp 546 play = aps + psurf*bps 547 zlay = -200.*r*log(play/plev(1))/g 547 548 548 549 ! Initialize temperature profile … … 552 553 ! Altitude in km in profile: divide zlay by 1000 553 554 tmp1(0) = 0. 554 tmp1(1:) = zlay (:)/1000.555 tmp1(1:) = zlay/1000. 555 556 556 557 call profile(nlayer + 1,tmp1,tmp2) … … 609 610 ! Initialize soil content 610 611 ! ----------------- 611 if (.not. therestartfi) qsoil (:,:,:,:)= 0.612 if (.not. therestartfi) qsoil = 0. 612 613 613 614 ! Initialize depths -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3142 r3179 187 187 ! Compute geopotential 188 188 ! ~~~~~~~~~~~~~~~~~~~~ 189 s (:) = (aps(:)/psurf + bps(:))**rcp190 h (:) = cpp*temp(:)/(pks*s(:))189 s = (aps/psurf + bps)**rcp 190 h = cpp*temp/(pks*s) 191 191 192 192 phi(1) = pks*h(1)*(1. - s(1)) … … 203 203 ! If atmospheric water is monitored 204 204 if (atm_wat_tau < 0.) then ! Prescribed atm_wat_profile: wet if >0, dry if =0 205 q(1,:,igcm_h2o_vap) = min(zqsat (:),atm_wat_profile*g/psurf)205 q(1,:,igcm_h2o_vap) = min(zqsat,atm_wat_profile*g/psurf) 206 206 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice 207 207 else ! Relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau 208 208 q(1,:,igcm_h2o_vap) = atm_wat_profile*g/psurf + (q(1,:,igcm_h2o_vap) - atm_wat_profile*g/psurf)*dexp(-dttestphys/atm_wat_tau) 209 q(1,:,igcm_h2o_vap) = min(zqsat (:),q(1,:,igcm_h2o_vap))209 q(1,:,igcm_h2o_vap) = min(zqsat,q(1,:,igcm_h2o_vap)) 210 210 q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice 211 211 endif … … 240 240 ! For some tests: No coriolis force at equator 241 241 !if (latitude(1) == 0.) then 242 du (:) = du(:) + (gru - u(:))/1.e4243 dv (:) = dv(:) + (grv - v(:))/1.e4242 du = du + (gru - u)/1.e4 243 dv = dv + (grv - v)/1.e4 244 244 !endif 245 245 … … 262 262 ! ----------------------------------- 263 263 psurf = psurf + dttestphys*dpsurf(1) ! surface pressure change 264 plev (:) = ap(:) + psurf*bp(:)265 play (:) = aps(:) + psurf*bps(:)264 plev = ap + psurf*bp 265 play = aps + psurf*bps 266 266 267 267 ! Increment tracers
Note: See TracChangeset
for help on using the changeset viewer.