Ignore:
Timestamp:
Jun 25, 2014, 5:43:19 PM (10 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2054:2070 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/physiq.F90

    r2056 r2073  
    442442  REAL beta_prec_fisrt(klon,klev) ! taux de conv de l'eau cond (fisrt)
    443443  ! RomP <<<
    444  
     444
    445445  REAL          :: calday
    446446
     
    489489  EXTERNAL fisrtilp  ! schema de condensation a grande echelle (pluie)
    490490  !AA
    491 ! JBM (3/14) fisrtilp_tr not loaded
    492 ! EXTERNAL fisrtilp_tr ! schema de condensation a grande echelle (pluie)
     491  ! JBM (3/14) fisrtilp_tr not loaded
     492  ! EXTERNAL fisrtilp_tr ! schema de condensation a grande echelle (pluie)
    493493  !                          ! stockage des coefficients necessaires au
    494494  !                          ! lessivage OFF-LINE et ON-LINE
     
    542542
    543543  !
    544 !  REAL zxsnow(klon)
     544  !  REAL zxsnow(klon)
    545545  REAL zxsnow_dummy(klon)
    546546  !
     
    636636  !======================================================================
    637637  !
    638  
     638
    639639  !
    640640  integer itau_w   ! pas de temps ecriture = itap + itau_phy
     
    689689  !
    690690  !IM 280405 BEG
    691 !  INTEGER nid_bilKPins, nid_bilKPave
    692 !  SAVE nid_bilKPins, nid_bilKPave
    693 !  !$OMP THREADPRIVATE(nid_bilKPins, nid_bilKPave)
     691  !  INTEGER nid_bilKPins, nid_bilKPave
     692  !  SAVE nid_bilKPins, nid_bilKPave
     693  !  !$OMP THREADPRIVATE(nid_bilKPins, nid_bilKPave)
    694694  !
    695695  REAL ve_lay(klon,klev) ! transport meri. de l'energie a chaque niveau vert.
     
    701701  REAL zsto
    702702  REAL zstophy, zout
    703  
     703
    704704  real zjulian
    705705  save zjulian
     
    11211121        endif
    11221122
    1123         do i = 1,klon
    1124            Ale_bl(i)=0.
    1125            Alp_bl(i)=0.
    1126         enddo
     1123!        do i = 1,klon
     1124!           Ale_bl(i)=0.
     1125!           Alp_bl(i)=0.
     1126!        enddo
    11271127
    11281128        !================================================================================
     
    15881588
    15891589     IF (solarlong0<-999.) then
    1590      ! Generic case with evolvoing season
     1590        ! Generic case with evolvoing season
    15911591        zzz=real(days_elapsed+1)
    15921592     ELSE IF (abs(solarlong0-1000.)<1.e-4) then
    1593      ! Particular case with annual mean insolation
     1593        ! Particular case with annual mean insolation
    15941594        zzz=real(90) ! could be revisited
    15951595        IF (read_climoz/=-1) THEN
     
    15981598        ENDIF
    15991599     ELSE
    1600      ! Case where the season is imposed with solarlong0
     1600        ! Case where the season is imposed with solarlong0
    16011601        zzz=real(90) ! could be revisited
    16021602     ENDIF
     
    17641764     IF (klon_glo==1) THEN
    17651765        CALL add_pbl_tend &
    1766           (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,paprs,'vdf')
     1766             (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,paprs,'vdf')
    17671767     ELSE
    17681768        CALL add_phys_tend &
    1769           (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,paprs,'vdf')
     1769             (d_u_vdf,d_v_vdf,d_t_vdf+d_t_diss,d_q_vdf,dql0,paprs,'vdf')
    17701770     ENDIF
    17711771     !--------------------------------------------------------------------
     
    19871987!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    19881988
     1989
    19891990     endif
    19901991     do i=1,klon
     
    23692370                   s_trig,s2,n2
    23702371           ENDIF
    2371  
    2372 !Option pour re-activer l'ancien calcul de Ale_bl (iflag_trig_bl=2)
     2372
     2373           !Option pour re-activer l'ancien calcul de Ale_bl (iflag_trig_bl=2)
    23732374           IF (iflag_trig_bl.eq.1) then
    23742375
    2375            !----Tirage al\'eatoire et calcul de ale_bl_trig
    2376            do i=1,klon
    2377               if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) )  then
    2378                  proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
    2379                       (n2(i)*dtime/tau_trig(i))
    2380                  !        print *, 'proba_notrig(i) ',proba_notrig(i)
    2381                  if (random_notrig(i) .ge. proba_notrig(i)) then
    2382                     ale_bl_trig(i)=ale_bl_stat(i)
     2376              !----Tirage al\'eatoire et calcul de ale_bl_trig
     2377              do i=1,klon
     2378                 if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) )  then
     2379                    proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
     2380                         (n2(i)*dtime/tau_trig(i))
     2381                    !        print *, 'proba_notrig(i) ',proba_notrig(i)
     2382                    if (random_notrig(i) .ge. proba_notrig(i)) then
     2383                       ale_bl_trig(i)=ale_bl_stat(i)
     2384                    else
     2385                       ale_bl_trig(i)=0.
     2386                    endif
    23832387                 else
     2388                    proba_notrig(i)=1.
     2389                    random_notrig(i)=0.
    23842390                    ale_bl_trig(i)=0.
    23852391                 endif
    2386               else
    2387                  proba_notrig(i)=1.
    2388                  random_notrig(i)=0.
    2389                  ale_bl_trig(i)=0.
    2390               endif
    2391            enddo
     2392              enddo
    23922393
    23932394           ELSE IF (iflag_trig_bl.eq.2) then
    23942395
    2395            do i=1,klon
    2396               if ( (Ale_bl(i) .gt. abs(cin(i))+1.e-10) )  then
    2397                  proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
    2398                       (n2(i)*dtime/tau_trig(i))
    2399                  !        print *, 'proba_notrig(i) ',proba_notrig(i)
    2400                  if (random_notrig(i) .ge. proba_notrig(i)) then
    2401                     ale_bl_trig(i)=Ale_bl(i)
     2396              do i=1,klon
     2397                 if ( (Ale_bl(i) .gt. abs(cin(i))+1.e-10) )  then
     2398                    proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** &
     2399                         (n2(i)*dtime/tau_trig(i))
     2400                    !        print *, 'proba_notrig(i) ',proba_notrig(i)
     2401                    if (random_notrig(i) .ge. proba_notrig(i)) then
     2402                       ale_bl_trig(i)=Ale_bl(i)
     2403                    else
     2404                       ale_bl_trig(i)=0.
     2405                    endif
    24022406                 else
     2407                    proba_notrig(i)=1.
     2408                    random_notrig(i)=0.
    24032409                    ale_bl_trig(i)=0.
    24042410                 endif
    2405               else
    2406                  proba_notrig(i)=1.
    2407                  random_notrig(i)=0.
    2408                  ale_bl_trig(i)=0.
    2409               endif
    2410            enddo
     2411              enddo
    24112412
    24122413           ENDIF
     
    24242425
    24252426           do i=1,klon
    2426 !CR: alp probabiliste
    2427                if (ale_bl_trig(i).gt.0.) then
    2428                   alp_bl(i)=alp_bl(i)/(1.-min(proba_notrig(i),0.999))
    2429                endif
    2430            enddo       
    2431  
     2427              !CR: alp probabiliste
     2428              if (ale_bl_trig(i).gt.0.) then
     2429                 alp_bl(i)=alp_bl(i)/(1.-min(proba_notrig(i),0.999))
     2430              endif
     2431           enddo
     2432
    24322433        else if (iflag_clos_bl.eq.2) then
    24332434
    2434 !CR: alp calculee dans thermcell_main
     2435           !CR: alp calculee dans thermcell_main
    24352436           do i=1,klon
    24362437              alp_bl(i)=alp_bl_stat(i)
     
    24692470
    24702471        do i=1,klon
    2471 !           zmax_th(i)=pphi(i,lmax_th(i))/rg
    2472 !CR:04/05/12:correction calcul zmax
    2473          zmax_th(i)=zmax0(i)
     2472           !           zmax_th(i)=pphi(i,lmax_th(i))/rg
     2473           !CR:04/05/12:correction calcul zmax
     2474           zmax_th(i)=zmax0(i)
    24742475        enddo
    24752476
     
    25002501
    25012502        if (iflag_thermals==0) then
    2502         ! Calling adjustment alone (but not the thermal plume model)
     2503           ! Calling adjustment alone (but not the thermal plume model)
    25032504           CALL ajsec_convV2(paprs, pplay, t_seri,q_seri &
    25042505                , d_t_ajsb, d_q_ajsb)
    25052506        else if (iflag_thermals>0) then
    2506         ! Calling adjustment above the top of thermal plumes
     2507           ! Calling adjustment above the top of thermal plumes
    25072508           CALL ajsec(paprs, pplay, t_seri,q_seri,limbas &
    25082509                , d_t_ajsb, d_q_ajsb)
     
    26782679        IF (.NOT. aerosol_couple) THEN
    26792680           IF (iflag_rrtm .EQ. 0) THEN !--old radiation
    2680 !
    2681              CALL readaerosol_optic( &
    2682              debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, &
    2683              pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
    2684              mass_solu_aero, mass_solu_aero_pi,  &
    2685              tau_aero, piz_aero, cg_aero,  &
    2686              tausum_aero, tau3d_aero)
    2687 !
     2681              !
     2682              CALL readaerosol_optic( &
     2683                   debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, &
     2684                   pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
     2685                   mass_solu_aero, mass_solu_aero_pi,  &
     2686                   tau_aero, piz_aero, cg_aero,  &
     2687                   tausum_aero, tau3d_aero)
     2688              !
    26882689           ELSE                       ! RRTM radiation
    2689 !
     2690              !
    26902691#ifdef CPP_RRTM
    2691              CALL readaerosol_optic_rrtm( &
    2692              debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, &
    2693              pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
    2694              mass_solu_aero, mass_solu_aero_pi,  &
    2695              tau_aero_rrtm, piz_aero_rrtm, cg_aero_rrtm,  &
    2696              tausum_aero, tau3d_aero)
     2692              CALL readaerosol_optic_rrtm( &
     2693                   debut, new_aod, flag_aerosol, itap, jD_cur-jD_ref, &
     2694                   pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
     2695                   mass_solu_aero, mass_solu_aero_pi,  &
     2696                   tau_aero_rrtm, piz_aero_rrtm, cg_aero_rrtm,  &
     2697                   tausum_aero, tau3d_aero)
    26972698#else
    26982699
    2699             abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    2700             call abort_gcm(modname,abort_message,1)
     2700              abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
     2701              call abort_gcm(modname,abort_message,1)
    27012702#endif
    2702 !
     2703              !
    27032704           ENDIF
    27042705        ENDIF
     
    27062707        tausum_aero(:,:,:) = 0.
    27072708        IF (iflag_rrtm .EQ. 0) THEN !--old radiation
    2708           tau_aero(:,:,:,:) = 0.
    2709           piz_aero(:,:,:,:) = 0.
    2710           cg_aero(:,:,:,:)  = 0.
     2709           tau_aero(:,:,:,:) = 0.
     2710           piz_aero(:,:,:,:) = 0.
     2711           cg_aero(:,:,:,:)  = 0.
    27112712        ELSE
    2712           tau_aero_rrtm(:,:,:,:)=0.0
    2713           piz_aero_rrtm(:,:,:,:)=0.0
    2714           cg_aero_rrtm(:,:,:,:)=0.0
     2713           tau_aero_rrtm(:,:,:,:)=0.0
     2714           piz_aero_rrtm(:,:,:,:)=0.0
     2715           cg_aero_rrtm(:,:,:,:)=0.0
    27152716        ENDIF
    27162717     ENDIF
     
    27212722        PRINT *,'appel a readaerosolstrat', mth_cur
    27222723        IF (iflag_rrtm.EQ.0) THEN
    2723          CALL readaerosolstrato(debut)
     2724           CALL readaerosolstrato(debut)
    27242725        ELSE
    27252726#ifdef CPP_RRTM
    2726          CALL readaerosolstrato_rrtm(debut)
     2727           CALL readaerosolstrato_rrtm(debut)
    27272728#else
    27282729
    2729          abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    2730          call abort_gcm(modname,abort_message,1)
     2730           abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
     2731           call abort_gcm(modname,abort_message,1)
    27312732#endif
    27322733        ENDIF
     
    29512952     IF (iflag_rrtm.NE.0) THEN
    29522953#ifdef CPP_RRTM
    2953        IF (ok_cdnc.AND.NRADLP.NE.3) THEN
    2954          abort_message='RRTM choix incoherent NRADLP doit etre egal a 3 pour ok_cdnc'
    2955          call abort_gcm(modname,abort_message,1)
    2956        endif
     2954        IF (ok_cdnc.AND.NRADLP.NE.3) THEN
     2955           abort_message='RRTM choix incoherent NRADLP doit etre egal a 3 pour ok_cdnc'
     2956           call abort_gcm(modname,abort_message,1)
     2957        endif
    29572958#else
    29582959
    2959        abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
    2960        call abort_gcm(modname,abort_message,1)
     2960        abort_message='You should compile with -rrtm if running with iflag_rrtm=1'
     2961        call abort_gcm(modname,abort_message,1)
    29612962#endif
    29622963     ENDIF
Note: See TracChangeset for help on using the changeset viewer.