Ignore:
Timestamp:
Mar 20, 2024, 3:05:14 PM (8 months ago)
Author:
afalco
Message:

Pluto PCM:
Changed _vap to _gas;
Included surfprop.F90;
callcorrk includes methane
AF

Location:
trunk/LMDZ.PLUTO/libf/phypluto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/phypluto

    • Property svn:ignore set to
      *.mod
      vdifc_mod.F.save
  • trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90

    r3258 r3275  
    300300      real omega(ngrid,nlayer)            ! omega velocity (Pa/s, >0 when downward)
    301301
    302       integer i,l,ig,ierr,iq,nw,isoil,iesp, igcm_generic_vap, igcm_generic_ice
    303       logical call_ice_vap_generic ! to call only one time the ice/vap pair of a tracer
     302      integer i,l,ig,ierr,iq,nw,isoil,iesp, igcm_generic_gas, igcm_generic_ice
     303      logical call_ice_gas_generic ! to call only one time the ice/vap pair of a tracer
    304304
    305305      real zls                       ! Solar longitude (radians).
     
    638638         qsurf_hist(:,:)=qsurf(:,:)
    639639
    640 !!         call WriteField_phy("post_qsurf_hist_qsurf",qsurf(1:ngrid,igcm_h2o_vap),1)
     640!!         call WriteField_phy("post_qsurf_hist_qsurf",qsurf(1:ngrid,igcm_h2o_gas),1)
    641641
    642642!        Initialize variable for dynamical heating and zonal wind tendency diagnostic
     
    681681         endif
    682682
    683 !!         call WriteField_phy("post_physdem_qsurf",qsurf(1:ngrid,igcm_h2o_vap),1)
     683!!         call WriteField_phy("post_physdem_qsurf",qsurf(1:ngrid,igcm_h2o_gas),1)
    684684#endif
    685685         if (corrk) then
     
    702702         endif
    703703
    704 !!         call WriteField_phy("post_corrk_firstcall_qsurf",qsurf(1:ngrid,igcm_h2o_vap),1)
     704!!         call WriteField_phy("post_corrk_firstcall_qsurf",qsurf(1:ngrid,igcm_h2o_gas),1)
    705705         ! XIOS outputs
    706706#ifdef CPP_XIOS
     
    711711#endif
    712712
    713 !!         call WriteField_phy("post_xios_qsurf",qsurf(1:ngrid,igcm_h2o_vap),1)
     713!!         call WriteField_phy("post_xios_qsurf",qsurf(1:ngrid,igcm_h2o_gas),1)
    714714
    715715         write(*,*) "physiq: end of firstcall"
    716716      endif ! end of 'firstcall'
    717717
    718 !!      call WriteField_phy("post_firstcall_qsurf",qsurf(1:ngrid,igcm_h2o_vap),1)
    719 !!      call writediagfi(ngrid,"firstcall_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     718!!      call WriteField_phy("post_firstcall_qsurf",qsurf(1:ngrid,igcm_h2o_gas),1)
     719!!      call writediagfi(ngrid,"firstcall_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    720720
    721721      if (check_physics_inputs) then
     
    882882            ! Eclipse incoming sunlight !AF24: removed
    883883
    884 !!            call writediagfi(ngrid,"corrk_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    885 !!            call writediagfi(ngrid,"corrk_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     884!!            call writediagfi(ngrid,"corrk_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     885!!            call writediagfi(ngrid,"corrk_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    886886
    887887
     
    900900                  do iq=1,nq
    901901
    902                      call generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic)
    903 
    904                      if (call_ice_vap_generic) then ! to call only one time the ice/vap pair of a tracer
     902                     call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
     903
     904                     if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    905905
    906906                        epsi_generic=constants_epsi_generic(iq)
    907907
    908                         muvar(1:ngrid,1:nlayer)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,1:nlayer,igcm_generic_vap))
    909                         muvar(1:ngrid,nlayer+1)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,nlayer,igcm_generic_vap))
     908                        muvar(1:ngrid,1:nlayer)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,1:nlayer,igcm_generic_gas))
     909                        muvar(1:ngrid,nlayer+1)=mugaz/(1.e0+(1.e0/epsi_generic-1.e0)*pq(1:ngrid,nlayer,igcm_generic_gas))
    910910
    911911                     endif
     
    931931                call callcorrk(ngrid,nlayer,pq,nq,qsurf,                          &
    932932                              albedo,albedo_equivalent,emis,mu0,pplev,pplay,pt,   &
    933                               tsurf,fract,dist_star,aerosol,muvar,                &
     933                              zzlay,tsurf,fract,dist_star,aerosol,muvar,                &
    934934                              zdtlw,zdtsw,fluxsurf_lw,fluxsurf_sw,                &
    935935                              fluxsurfabs_sw,fluxtop_lw,                          &
     
    10391039      endif ! of if (callrad)
    10401040
    1041 !!      call writediagfi(ngrid,"vdifc_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1042 !!      call writediagfi(ngrid,"vdifc_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     1041!!      call writediagfi(ngrid,"vdifc_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1042!!      call writediagfi(ngrid,"vdifc_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    10431043
    10441044
     
    11371137         ! endif
    11381138
    1139 !!         call writediagfi(ngrid,"vdifc_post_zdqsdif"," "," ",2,zdqsdif(1:ngrid,igcm_h2o_vap))
     1139!!         call writediagfi(ngrid,"vdifc_post_zdqsdif"," "," ",2,zdqsdif(1:ngrid,igcm_h2o_gas))
    11401140
    11411141         if (tracer) then
     
    11441144         end if ! of if (tracer)
    11451145
    1146 !!         call writediagfi(ngrid,"vdifc_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1147 !!         call writediagfi(ngrid,"vdifc_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     1146!!         call writediagfi(ngrid,"vdifc_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1147!!         call writediagfi(ngrid,"vdifc_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    11481148
    11491149         ! test energy conservation
     
    12641264         dqsurf(1:ngrid,igcm_n2) = dqsurf(1:ngrid,igcm_n2) + zdqsc(1:ngrid,igcm_n2)
    12651265
    1266 !!         call writediagfi(ngrid,"condense_n2_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1267 !!         call writediagfi(ngrid,"condense_n2_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     1266!!         call writediagfi(ngrid,"condense_n2_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1267!!         call writediagfi(ngrid,"condense_n2_post_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    12681268
    12691269         ! test energy conservation
     
    14581458               cloudfrac(:,:)=0.0
    14591459               do iq=1,nq
    1460                   call generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic)
    1461                   if (call_ice_vap_generic) then ! to call only one time the ice/vap pair of a tracer
     1460                  call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
     1461                  if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    14621462                     do l = 1, nlayer
    14631463                        do ig=1,ngrid
     
    14911491            dqsurf(1:ngrid,1:nq) = dqsurf(1:ngrid,1:nq) + zdqssed(1:ngrid,1:nq)
    14921492
    1493 !!            call writediagfi(ngrid,"callsedim_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
     1493!!            call writediagfi(ngrid,"callsedim_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
    14941494
    14951495            ! ! Test water conservation !AF24: removed
     
    14971497         end if ! end of 'sedimentation'
    14981498
    1499 !!         call writediagfi(ngrid,"mass_redist_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1500 !!         call writediagfi(ngrid,"mass_redist_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     1499!!         call writediagfi(ngrid,"mass_redist_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1500!!         call writediagfi(ngrid,"mass_redist_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    15011501
    15021502  ! ---------------
     
    15091509            zdmassmr(1:ngrid,1:nlayer) = mass(1:ngrid,1:nlayer) * 0
    15101510            !    (   zdqevap(1:ngrid,1:nlayer)                          &
    1511             !    !   + zdqrain(1:ngrid,1:nlayer,igcm_h2o_vap)             &
    1512             !    !   + dqmoist(1:ngrid,1:nlayer,igcm_h2o_vap)             &
     1511            !    !   + zdqrain(1:ngrid,1:nlayer,igcm_h2o_gas)             &
     1512            !    !   + dqmoist(1:ngrid,1:nlayer,igcm_h2o_gas)             &
    15131513            !      + dqvaplscale(1:ngrid,1:nlayer) )
    15141514
     
    15361536         endif
    15371537
    1538 !         call writediagfi(ngrid,"mass_redistribution_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1539 
    1540 !!         call writediagfi(ngrid,"slab_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_vap))
    1541 !!         call writediagfi(ngrid,"slab_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_vap))
     1538!         call writediagfi(ngrid,"mass_redistribution_post_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1539
     1540!!         call writediagfi(ngrid,"slab_pre_dqsurf"," "," ",2,dqsurf(1:ngrid,igcm_h2o_gas))
     1541!!         call writediagfi(ngrid,"slab_pre_qsurf"," "," ",2,qsurf(1:ngrid,igcm_h2o_gas))
    15421542
    15431543
     
    17941794         do iq=1,nq
    17951795
    1796             call generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic)
    1797 
    1798             if (call_ice_vap_generic) then ! to call only one time the ice/vap pair of a tracer
     1796            call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
     1797
     1798            if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    17991799
    18001800               do l = 1, nlayer
    18011801                  do ig=1,ngrid
    18021802                     call Psat_generic(zt(ig,l),pplay(ig,l),metallicity,psat_tmp_generic,qsat_generic(ig,l,iq))
    1803                      RH_generic(ig,l,iq) = zq(ig,l,igcm_generic_vap) / qsat_generic(ig,l,iq)
     1803                     RH_generic(ig,l,iq) = zq(ig,l,igcm_generic_gas) / qsat_generic(ig,l,iq)
    18041804                  enddo
    18051805               enddo
     
    23642364
    23652365      do iq=1,nq
    2366          call generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic)
    2367 
    2368          if (call_ice_vap_generic) then ! to call only one time the ice/vap pair of a tracer
     2366         call generic_tracer_index(nq,iq,igcm_generic_gas,igcm_generic_ice,call_ice_gas_generic)
     2367
     2368         if (call_ice_gas_generic) then ! to call only one time the ice/vap pair of a tracer
    23692369
    23702370            reffrad_generic_zeros_for_wrf(:,:) = 1.
     
    23732373            comm_TOTCLOUDFRAC(1:ngrid) = totcloudfrac(1:ngrid) !??????
    23742374            comm_SURFRAIN(1:ngrid) = zdqsrain_generic(1:ngrid,iq)
    2375             comm_DQVAP(1:ngrid,1:nlayer) = pdq(1:ngrid,1:nlayer,igcm_generic_vap)
     2375            comm_DQVAP(1:ngrid,1:nlayer) = pdq(1:ngrid,1:nlayer,igcm_generic_gas)
    23762376            comm_DQICE(1:ngrid,1:nlayer)=pdq(1:ngrid,1:nlayer,igcm_generic_ice)
    23772377            ! comm_H2OICE_REFF(1:ngrid,1:nlayer) = reffrad_generic_zeros_for_wrf(1:ngrid,1:nlayer) ! for now zeros !
     
    24172417!        do ig=1,ngrid
    24182418!          if ((tracer).and.(water)) then
    2419 !           pdq(ig,:,igcm_h2o_vap) = pdq(ig,:,igcm_h2o_vap) + lsf_dq(:)
     2419!           pdq(ig,:,igcm_h2o_gas) = pdq(ig,:,igcm_h2o_gas) + lsf_dq(:)
    24202420!          endif
    24212421!          pdt(ig,:) = pdt(ig,:) + lsf_dt(:)
Note: See TracChangeset for help on using the changeset viewer.