Ignore:
Timestamp:
Dec 29, 2022, 10:58:39 AM (2 years ago)
Author:
llange
Message:

PEM
Fixing bug when updating tracer mass mixing ratio (ccn_number and dust_number were previously set to 1)
Tiny edits in evol_h2o_ice and criterion_ice_stop_mod_water
LL

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/criterion_ice_stop_mod_water_slope.F90

    r2835 r2857  
    6262    STOPPING=.FALSE.
    6363  endif
    64 
    6564END SUBROUTINE criterion_ice_stop_water_slope
    6665
  • trunk/LMDZ.COMMON/libf/evolution/evol_h2o_ice_s_mod_slope.F90

    r2849 r2857  
    2626!   OUTPUT
    2727  REAL, INTENT(INOUT) ::  qsurf(ngrid,nslope)                ! physical point field : Previous and actual density of water ice
    28   LOGICAL :: STOPPING
     28  LOGICAL, INTENT(INOUT) :: STOPPING
    2929  REAL, intent(inout) ::  tendencies_h2o_ice_phys(ngrid,nslope) ! physical point field : Evolution of perenial ice over one year
    3030
     
    8080    print *, "Tendencies on ice increasing=", pos_tend
    8181    print *, "This can be due to the absence of water ice in the PCM run!!"
    82       call criterion_ice_stop_water_slope(cell_area,1,qsurf(:,:)*0.,STOPPING,ngrid,cell_area)
     82      call criterion_ice_stop_water_slope(cell_area,1.,qsurf(:,:)*0.,STOPPING,ngrid,cell_area)
    8383      do i=1,ngrid
    8484         do islope=1,nslope
     
    101101    enddo
    102102  enddo
     103 
    103104
    104105  real_coefficient=negative_part/pos_tend
     106  if(pos_tend.eq.0) real_coefficient = 0.
    105107
    106108  do i=1,ngrid
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r2856 r2857  
    843843!------------------------
    844844     year_iter=0
    845      print *, "Max_iter_pem", Max_iter_pem
    846      print *, 'year_iter_max',year_iter_max
    847845     do while (year_iter.LT.year_iter_max)
    848846
     
    852850       do islope=1,nslope
    853851           global_ave_press_new=global_ave_press_new-g*cell_area(i)*tendencies_co2_ice_phys_slope(i,islope)*subslope_dist(i,islope)/cos(pi*def_slope_mean(islope)/180.)/Total_surface
    854        enddo
     852      enddo
    855853     enddo
    856854       print *, 'Global average pressure old time step',global_ave_press_old
     
    932930     call evol_h2o_ice_s_slope(qsurf_slope(:,igcm_h2o_ice,:),tendencies_h2o_ice_phys_slope,iim,jjm,ngrid,cell_area,STOPPING_1_water,nslope)
    933931
     932
    934933      print *, "Evolution of co2 ice"
    935934     call evol_co2_ice_s_slope(co2ice_slope,tendencies_co2_ice_phys_slope,iim,jjm,ngrid,cell_area,STOPPING_1_co2,nslope)
     
    972971      DO ig = 1,ngrid
    973972        DO islope = 1,nslope
    974           if(initial_co2_ice_slope(ig,islope).gt.0.5 .and. co2ice_slope(ig,islope).LT. 1E-5) THEN !co2ice disappeared, look for closest point without co2ice
     973          if(initial_co2_ice_slope(ig,islope).gt.0.5 .and. co2ice_slope(ig,islope).LT. 1E-10) THEN !co2ice disappeared, look for closest point without co2ice
    975974            if(latitude_deg(ig).gt.0) then
    976975              do ig_loop=ig,ngrid
    977976                DO islope_loop=islope,iflat,-1
    978                   if(initial_co2_ice_slope(ig_loop,islope_loop).lt.0.5 .and. co2ice_slope(ig_loop,islope_loop).LT. 1E-5) then
     977                  if(initial_co2_ice_slope(ig_loop,islope_loop).lt.0.5 .and. co2ice_slope(ig_loop,islope_loop).LT. 1E-10) then
    979978                    tsurf_ave_phys(ig,islope)=tsurf_ave_phys(ig_loop,islope_loop)
    980979                    bool_sublim=1
     
    989988              do ig_loop=ig,1,-1
    990989                DO islope_loop=islope,iflat
    991                   if(initial_co2_ice_slope(ig_loop,islope_loop).lt.0.5 .and. co2ice_slope(ig_loop,islope_loop).LT. 1E-5) then
     990                  if(initial_co2_ice_slope(ig_loop,islope_loop).lt.0.5 .and. co2ice_slope(ig_loop,islope_loop).LT. 1E-10) then
    992991                    tsurf_ave_phys(ig,islope)=tsurf_ave_phys(ig_loop,islope_loop)
    993992                    bool_sublim=1
     
    10011000            endif
    10021001            initial_co2_ice_slope(ig,islope)=0
    1003             if ((co2ice_slope(ig,islope).lt.1e-5).and. (qsurf_slope(ig,igcm_h2o_ice,islope).gt.frost_albedo_threshold))  then   
     1002            if ((co2ice_slope(ig,islope).lt.1e-10).and. (qsurf_slope(ig,igcm_h2o_ice,islope).gt.frost_albedo_threshold))  then   
    10041003              albedo_slope(ig,1,islope) = albedo_h2o_frost
    10051004              albedo_slope(ig,2,islope) = albedo_h2o_frost
     
    10091008              emiss_slope(ig,islope) = emissiv         
    10101009            endif
    1011           elseif( (co2ice_slope(ig,islope).GT. 1E-3).and.(tendencies_co2_ice_phys_slope(ig,islope).gt.1e-5) )THEN !Put tsurf as tcond co2
     1010          elseif( (co2ice_slope(ig,islope).GT. 1E-3).and.(tendencies_co2_ice_phys_slope(ig,islope).gt.1e-10) )THEN !Put tsurf as tcond co2
    10121011            ave=0.
    10131012            do t=1,timelen
     
    10651064          if(isnan(Tsoil_locslope(ig,isoil))) then
    10661065             write(*,*)'Tsoil=',ig,isoil,Tsoil_locslope(ig,isoil)
     1066             stop
    10671067          endif
    10681068         enddo
     
    11481148        print *, "STOPPING because tendencies on co2 ice=0, see message above", STOPPING_1_co2
    11491149      endif
     1150
     1151
    11501152
    11511153      if (STOPPING_water .or. STOPPING_1_water .or. STOPPING_co2 .or. STOPPING_1_co2)  then
     
    12601262     enddo
    12611263
     1264     write(*,*) 'rapport ps',global_ave_press_new/global_ave_press_GCM
     1265
    12621266! III_a.5 Tracer (for start)
    12631267     allocate(zplev_new(ngrid,nlayer+1))
     
    12941298       DO ig=1,ngrid
    12951299         DO l=1,llm-1
    1296            if(q(ig,l,nnq).GT.1 .and. (noms(nnq).NE."dust_number" .or. noms(nnq).NE."ccn_number") ) then
     1300           if(q(ig,l,nnq).GT.1 .and. (noms(nnq).NE."dust_number") .and. (noms(nnq).NE."ccn_number") ) then
    12971301             extra_mass=(q(ig,l,nnq)-1)*(zplev_new(ig,l)-zplev_new(ig,l+1))
    12981302             q(ig,l,nnq)=1.
    12991303             q(ig,l+1,nnq)=q(ig,l+1,nnq)+extra_mass*(zplev_new(ig,l+1)-zplev_new(ig,l+2))
     1304             write(*,*) 'extra ',noms(nnq),extra_mass, noms(nnq).NE."dust_number",noms(nnq).NE."ccn_number"
    13001305           endif
    13011306           if(q(ig,l,nnq).LT.0) then
Note: See TracChangeset for help on using the changeset viewer.