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

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

Location:
trunk/LMDZ.MARS/libf/phymars/dyn1d
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/read_profile_mod.F90

    r2878 r2991  
    3939
    4040  use infotrac, only: tname
    41   use tracer_mod, only: igcm_co2
     41  use tracer_mod, only: igcm_co2, igcm_h2o_vap, igcm_h2o_ice, &
     42                        igcm_dust_number, igcm_dust_mass,     &
     43                        igcm_ccn_number, igcm_ccn_mass
    4244  implicit none
    4345!---------------------------------------------------------------------------------------------------------------------!
     
    110112    if (ierr.eq.0) then
    111113      read(91,*)qsurf(iq)
    112       if (trim(name_tracer(iq)) == 'co2') then
    113          igcm_co2 = iq
    114       endif
     114      if (trim(name_tracer(iq)) == 'co2') igcm_co2 = iq
     115      if (trim(name_tracer(iq)) == 'h2o_vap') igcm_h2o_vap = iq
     116      if (trim(name_tracer(iq)) == 'h2o_ice') igcm_h2o_ice = iq
     117      if (trim(name_tracer(iq)) == 'dust_number') igcm_dust_number = iq
     118      if (trim(name_tracer(iq)) == 'dust_mass') igcm_dust_mass = iq
     119      if (trim(name_tracer(iq)) == 'ccn_number') igcm_ccn_number = iq
     120      if (trim(name_tracer(iq)) == 'ccn_mass') igcm_ccn_mass = iq
    115121      do ilayer = 1, nb_layer
    116122        read(91,*)q(ilayer,iq)
  • 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.