Ignore:
Timestamp:
Jul 7, 2023, 6:32:57 PM (19 months ago)
Author:
jbclement
Message:

Minor fix of initialization of tracers indices + rework of atm_wat_profile. JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F

    r2981 r2991  
    196196      endif
    197197
    198       write(*,*)'Do you want to start with a startfi and write 
    199      &           a restartfi?'
     198      write(*,*)'Do you want to start with a startfi and write
     199     & a restartfi?'
    200200      startfile_1D=.false.
    201201      call getin("startfile_1D",startfile_1D)
     
    885885      ENDDO
    886886
    887 c       Force atmospheric water if asked
    888 c       Added "atm_wat_profile" flag (JN)
    889 c       -------------------------------------
     887!       Force atmospheric water if asked
     888!       Added "atm_wat_profile" flag (JN)
     889!       -------------------------------------
    890890        call watersat(nlayer,temp,play,zqsat)
    891         DO iq = 1, nq
    892           IF ((iq.eq.igcm_h2o_vap).and.(atm_wat_profile.eq.0)) THEN
    893             DO ilayer=1,nlayer
    894              q(ilayer,igcm_h2o_vap)=0.
    895 c             write(*,*) "atm_wat_profile dry"
    896             ENDDO! ilayer=1,nlayer
    897           ELSE IF((iq.eq.igcm_h2o_vap).and.(atm_wat_profile.gt.0)
    898      &             .and.(atm_wat_profile.le.1)) THEN
    899             DO ilayer=1,nlayer
    900              q(ilayer,igcm_h2o_vap)=min(zqsat(ilayer),atm_wat_profile)
    901 c             write(*,*) "atm_wat_profile wet"
    902             ENDDO! ilayer=1,nlayer
    903           ELSE IF ((iq.eq.igcm_h2o_ice).and.
    904      &                  (atm_wat_profile.ne.-1)) THEN
    905             DO ilayer=1,nlayer
    906              q(ilayer,igcm_h2o_ice)=0.
    907 c             write(*,*) "atm_wat_profile : reset ice"
    908             ENDDO! ilayer=1,nlayer
    909           ENDIF  !((iq.eq.igcm_h2o_vap).and.(atm_wat_profile.eq.2)) THEN
    910         ENDDO
    911         CALL write_output('qsat',
    912      &                         'qsat',
    913      &                         'kg/kg',zqsat(:))
    914 
     891        if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then
     892          q(:,igcm_h2o_vap) = min(zqsat(:),atm_wat_profile)
     893!          write(*,*) "prescribed atm_wat_profile (wet if >0, dry if =0)"
     894          q(:,igcm_h2o_ice) = 0.
     895!          write(*,*) "atm_wat_profile: reset h2o ice"
     896        endif
     897!        CALL write_output('qsat',
     898!     &                         'qsat',
     899!     &                         'kg/kg',zqsat)
     900!        CALL write_output('qvap',
     901!     &                         'qvap',
     902!     &                         'kg/kg',q(:,igcm_h2o_vap))
    915903
    916904
Note: See TracChangeset for help on using the changeset viewer.