Changeset 3179 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
Jan 18, 2024, 5:23:14 PM (11 months ago)
Author:
jbclement
Message:

Mars PCM:
Improvement of the error message for tracers initialization with a 1D start file + update of "start1D.txt" in the deftank + small cleanings.
JBC

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  
    406406        read(3,*) header, (qsurf(1,iq,j), j = 1,size(qsurf,3)), (q(1,ilayer,iq), ilayer = 1,nlayer)
    407407        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.'
    409410            error stop
    410411        endif
     
    498499! Initialize winds for first time step
    499500if (.not. therestart1D) then
    500     u(:) = gru
    501     v(:) = grv
     501    u = gru
     502    v = grv
    502503else
    503504    read(3,*) header, (u(ilayer), ilayer = 1,nlayer)
     
    542543call init_vertical_layers(nlayer,preff,scaleheight,ap,bp,aps,bps,presnivs,pseudoalt)
    543544
    544 plev(:) = ap(:) + psurf*bp(:)
    545 play(:) = aps(:) + psurf*bps(:)
    546 zlay(:) = -200.*r*log(play(:)/plev(1))/g
     545plev = ap + psurf*bp
     546play = aps + psurf*bps
     547zlay = -200.*r*log(play/plev(1))/g
    547548
    548549! Initialize temperature profile
     
    552553! Altitude in km in profile: divide zlay by 1000
    553554tmp1(0) = 0.
    554 tmp1(1:) = zlay(:)/1000.
     555tmp1(1:) = zlay/1000.
    555556
    556557call profile(nlayer + 1,tmp1,tmp2)
     
    609610! Initialize soil content
    610611! -----------------
    611 if (.not. therestartfi) qsoil(:,:,:,:) = 0.
     612if (.not. therestartfi) qsoil = 0.
    612613
    613614! Initialize depths
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90

    r3142 r3179  
    187187    ! Compute geopotential
    188188    ! ~~~~~~~~~~~~~~~~~~~~
    189     s(:) = (aps(:)/psurf + bps(:))**rcp
    190     h(:) = cpp*temp(:)/(pks*s(:))
     189    s = (aps/psurf + bps)**rcp
     190    h = cpp*temp/(pks*s)
    191191
    192192    phi(1) = pks*h(1)*(1. - s(1))
     
    203203        ! If atmospheric water is monitored
    204204            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)
    206206                q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
    207207            else ! Relaxation towards the value atm_wat_profile with relaxation time atm_wat_tau
    208208                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))
    210210                q(1,:,igcm_h2o_ice) = 0. ! reset h2o ice
    211211            endif
     
    240240    ! For some tests: No coriolis force at equator
    241241    !if (latitude(1) == 0.) then
    242     du(:) = du(:) + (gru - u(:))/1.e4
    243     dv(:) = dv(:) + (grv - v(:))/1.e4
     242    du = du + (gru - u)/1.e4
     243    dv = dv + (grv - v)/1.e4
    244244    !endif
    245245
     
    262262    ! -----------------------------------
    263263    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
    266266
    267267    ! Increment tracers
Note: See TracChangeset for help on using the changeset viewer.