Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/simu_airs.F90

    r2585 r3605  
    22        module m_simu_airs
    33
     4        USE print_control_mod, ONLY: prt_level,lunout
     5         
    46        implicit none
    57
    6         real, parameter :: tau_thresh = 0.05 ! seuil nuages detectables
    7         real, parameter :: p_thresh = 445.   ! seuil nuages hauts
    8         real, parameter :: em_min = 0.2      ! seuils nuages semi-transp
    9         real, parameter :: em_max = 0.85
    10         real, parameter :: undef = 999.
     8        REAL, PARAMETER :: tau_thresh = 0.05 ! seuil nuages detectables
     9        REAL, PARAMETER :: p_thresh = 445.   ! seuil nuages hauts
     10        REAL, PARAMETER :: em_min = 0.2      ! seuils nuages semi-transp
     11        REAL, PARAMETER :: em_max = 0.85
     12        REAL, PARAMETER :: undef = 999.
    1113
    1214        contains
    1315
    14         real function search_tropopause(P,T,alt,N) result(P_tropo)
     16        REAL function search_tropopause(P,T,alt,N) result(P_tropo)
    1517! this function searches for the tropopause pressure in [hPa].
    1618! The search is based on ideology described in
     
    1820! GRL, 30(20) 2042, doi:10.1029/2003GL018240, 2003
    1921
    20         integer N,i,i_lev,first_point,exit_flag,i_dir
    21         real P(N),T(N),alt(N),slope(N)
    22         real P_min, P_max, slope_limit,slope_2km, &
     22        INTEGER N,i,i_lev,first_point,exit_flag,i_dir
     23        REAL P(N),T(N),alt(N),slope(N)
     24        REAL P_min, P_max, slope_limit,slope_2km, &
    2325     & delta_alt_limit,tmp,delta_alt
    24         parameter(P_min=75.0, P_max=470.0)   ! hPa
    25         parameter(slope_limit=0.002)         ! 2 K/km converted to K/m
    26         parameter(delta_alt_limit=2000.0)    ! 2000 meters
     26        PARAMETER(P_min=75.0, P_max=470.0)   ! hPa
     27        PARAMETER(slope_limit=0.002)         ! 2 K/km converted to K/m
     28        PARAMETER(delta_alt_limit=2000.0)    ! 2000 meters
    2729
    2830        do i=1,N-1
     
    9395
    9496     
    95         integer :: i, n, nss
    96 
    97         integer, intent(in) :: len_cs
    98         real, dimension(:), intent(in) :: rneb_cs, temp_cs
    99         real, dimension(:), intent(in) :: emis_cs, iwco_cs, rad_cs
    100         real, dimension(:), intent(in) :: pres_cs, dz_cs, rhodz_cs
    101 
    102         real, intent(out) :: cc_tot_cs, cc_hc_cs, cc_hist_cs, &
     97        INTEGER :: i, n, nss
     98
     99        INTEGER, intent(in) :: len_cs
     100        REAL, DIMENSION(:), intent(in) :: rneb_cs, temp_cs
     101        REAL, DIMENSION(:), intent(in) :: emis_cs, iwco_cs, rad_cs
     102        REAL, DIMENSION(:), intent(in) :: pres_cs, dz_cs, rhodz_cs
     103
     104        REAL, intent(out) :: cc_tot_cs, cc_hc_cs, cc_hist_cs, &
    103105     & cc_Cb_cs, cc_ThCi_cs, cc_Anv_cs, &
    104106     & pcld_hc_cs, tcld_hc_cs, em_hc_cs, iwp_hc_cs, &
     
    109111     & deltaz_hc_cs, deltaz_hist_cs, rad_hist_cs
    110112
    111         real, dimension(len_cs) :: rneb_ord
    112         real :: rneb_min
    113 
    114         real, dimension(:), allocatable :: s, s_hc, s_hist, rneb_max
    115         real, dimension(:), allocatable :: sCb, sThCi, sAnv
    116         real, dimension(:), allocatable :: iwp_ss, pcld_ss, tcld_ss,&
     113        REAL, DIMENSION(len_cs) :: rneb_ord
     114        REAL :: rneb_min
     115
     116        REAL, DIMENSION(:), allocatable :: s, s_hc, s_hist, rneb_max
     117        REAL, DIMENSION(:), allocatable :: sCb, sThCi, sAnv
     118        REAL, DIMENSION(:), allocatable :: iwp_ss, pcld_ss, tcld_ss,&
    117119     & emis_ss
    118         real, dimension(:), allocatable :: deltaz_ss, rad_ss
    119 
    120 
    121         write(*,*) 'dans cloud_structure'
     120        REAL, DIMENSION(:), allocatable :: deltaz_ss, rad_ss
     121
     122        CHARACTER (len = 50)      :: modname = 'simu_airs.cloud_structure'
     123        CHARACTER (len = 160)     :: abort_message
     124       
     125
     126        write(lunout,*) 'dans cloud_structure'
    122127
    123128        call ordonne(len_cs, rneb_cs, rneb_ord)
     
    300305        if (cc_tot_cs .gt. maxval(rneb_cs) .and. &
    301306     & abs(cc_tot_cs-maxval(rneb_cs)) .gt. 1.e-4 )  then
    302         write(*,*) 'cc_tot_cs > max rneb_cs'
    303         write(*,*) cc_tot_cs, maxval(rneb_cs)
    304         STOP
     307          WRITE(abort_message,*) 'cc_tot_cs > max rneb_cs', cc_tot_cs, maxval(rneb_cs)
     308          CALL abort_physic(modname,abort_message,1)
    305309        endif
    306310
    307311        if (iwp_hc_cs .lt. 0.) then
    308         write(*,*) 'cloud_structure:'
    309         write(*,*) 'iwp_hc_cs < 0'
    310         STOP
     312          abort_message= 'cloud_structure: iwp_hc_cs < 0'
     313          CALL abort_physic(modname,abort_message,1)
    311314        endif
    312315 
     
    316319        subroutine normal_undef(num, den)
    317320
    318         real, intent(in) :: den
    319         real, intent(inout) :: num
     321        REAL, intent(in) :: den
     322        REAL, intent(inout) :: num
    320323
    321324        if (den .ne. 0) then
     
    330333        subroutine normal2_undef(res,num,den)
    331334
    332         real, intent(in) :: den
    333         real, intent(in) :: num
    334         real, intent(out) :: res
     335        REAL, intent(in) :: den
     336        REAL, intent(in) :: num
     337        REAL, intent(out) :: res
    335338
    336339        if (den .ne. 0.) then
     
    350353     & emis, pcld, tcld, iwp, deltaz, rad)
    351354
    352         integer, intent(in) :: len_cs
    353         real, dimension(len_cs), intent(in) :: rneb_cs, temp_cs
    354         real, dimension(len_cs), intent(in) :: emis_cs, iwco_cs, &
     355        INTEGER, intent(in) :: len_cs
     356        REAL, DIMENSION(len_cs), intent(in) :: rneb_cs, temp_cs
     357        REAL, DIMENSION(len_cs), intent(in) :: emis_cs, iwco_cs, &
    355358     & rneb_ord
    356         real, dimension(len_cs), intent(in) :: pres_cs, dz_cs, rad_cs
    357         real, dimension(len_cs), intent(in) :: rhodz_cs
    358         real, dimension(len_cs) :: tau_cs, w
    359         real, intent(in) :: rnebmax
    360         real, intent(inout) :: stot, shc, shist
    361         real, intent(inout) :: sCb, sThCi, sAnv
    362         real, intent(out) :: emis, pcld, tcld, iwp, deltaz, rad
    363 
    364         integer :: i, ideb, ibeg, iend, nuage, visible
    365         real :: som, som_tau, som_iwc, som_dz, som_rad, tau
     359        REAL, DIMENSION(len_cs), intent(in) :: pres_cs, dz_cs, rad_cs
     360        REAL, DIMENSION(len_cs), intent(in) :: rhodz_cs
     361        REAL, DIMENSION(len_cs) :: tau_cs, w
     362        REAL, intent(in) :: rnebmax
     363        REAL, intent(inout) :: stot, shc, shist
     364        REAL, intent(inout) :: sCb, sThCi, sAnv
     365        REAL, intent(out) :: emis, pcld, tcld, iwp, deltaz, rad
     366
     367        INTEGER :: i, ideb, ibeg, iend, nuage, visible
     368        REAL :: som, som_tau, som_iwc, som_dz, som_rad, tau
     369
     370        CHARACTER (len = 50)      :: modname = 'simu_airs.sous_section'
     371        CHARACTER (len = 160)     :: abort_message
    366372
    367373
     
    491497
    492498        if (iwp .lt. 0.) then
    493         write(*,*) 'ideb iwp =', ideb, iwp
    494         STOP
     499          WRITE(abort_message,*) 'ideb iwp =', ideb, iwp
     500          CALL abort_physic(modname,abort_message,1)
    495501        endif
    496502
    497503        if (deltaz .lt. 0.) then
    498         write(*,*) 'ideb deltaz =', ideb, deltaz
    499         STOP
     504          WRITE(abort_message,*)'ideb deltaz =', ideb, deltaz
     505          CALL abort_physic(modname,abort_message,1)
    500506        endif
    501507
    502508        if (emis .lt. 0.048 .and. emis .ne. 0.) then
    503         write(*,*) 'ideb emis =', ideb, emis
    504         STOP
     509          WRITE(abort_message,*) 'ideb emis =', ideb, emis
     510          CALL abort_physic(modname,abort_message,1)
    505511        endif
    506512
     
    511517     & visible, w)
    512518
    513         integer, intent(in) :: ibeg, iend
    514         real, intent(in) :: som_tau
    515 
    516         integer, intent(inout) :: visible
    517         real, dimension(:), intent(inout) :: w
    518 
    519         integer :: i
     519        INTEGER, intent(in) :: ibeg, iend
     520        REAL, intent(in) :: som_tau
     521
     522        INTEGER, intent(inout) :: visible
     523        REAL, DIMENSION(:), intent(inout) :: w
     524
     525        INTEGER :: i
    520526
    521527
     
    553559     & som_tau, som_iwc, som_dz, som_rad)
    554560
    555         integer, intent(in) :: ibeg, iend
    556         real, dimension(:), intent(in) :: tau_cs, iwco_cs, temp_cs
    557         real, dimension(:), intent(in) :: pres_cs, dz_cs, rad_cs
    558         real, dimension(:), intent(in) :: rhodz_cs
    559         real, intent(out) :: som_tau, som_iwc, som_dz, som_rad
    560         real , intent(out) :: pcld, tcld
    561 
    562         integer :: i, ibase, imid
     561        INTEGER, intent(in) :: ibeg, iend
     562        REAL, DIMENSION(:), intent(in) :: tau_cs, iwco_cs, temp_cs
     563        REAL, DIMENSION(:), intent(in) :: pres_cs, dz_cs, rad_cs
     564        REAL, DIMENSION(:), intent(in) :: rhodz_cs
     565        REAL, intent(out) :: som_tau, som_iwc, som_dz, som_rad
     566        REAL , intent(out) :: pcld, tcld
     567
     568        INTEGER :: i, ibase, imid
     569
     570        CHARACTER (len = 50)      :: modname = 'simu_airs.caract'
     571        CHARACTER (len = 160)     :: abort_message
    563572
    564573! Somme des epaisseurs optiques et des contenus en glace sur le nuage
     
    585594
    586595        if (som_dz .ne. 0.) then
    587         som_rad = som_rad/som_dz
     596          som_rad = som_rad/som_dz
    588597        else
    589         write(*,*) 'som_dez = 0 STOP'
    590         write(*,*) 'ibeg, iend =', ibeg, iend
    591         do i = ibeg, iend
    592         write(*,*) dz_cs(i), rhodz_cs(i)
    593         enddo
    594         STOP
     598          write(*,*) 'som_dez = 0 STOP'
     599          write(*,*) 'ibeg, iend =', ibeg, iend
     600          do i = ibeg, iend
     601             write(*,*) dz_cs(i), rhodz_cs(i)
     602          enddo
     603          abort_message='see above'
     604          CALL abort_physic(modname,abort_message,1)
    595605        endif
    596606
     
    611621        subroutine topbot(ideb,w,ibeg,iend)
    612622
    613         integer, intent(in) :: ideb
    614         real, dimension(:), intent(in) :: w
    615         integer, intent(out) :: ibeg, iend
    616 
    617         integer :: i, itest
     623        INTEGER, intent(in) :: ideb
     624        REAL, DIMENSION(:), intent(in) :: w
     625        INTEGER, intent(out) :: ibeg, iend
     626
     627        INTEGER :: i, itest
    618628
    619629        itest = 0
     
    642652        subroutine ordonne(len_cs, rneb_cs, rneb_ord)
    643653
    644         integer, intent(in) :: len_cs
    645         real, dimension(:), intent(in) :: rneb_cs
    646         real, dimension(:), intent(out) :: rneb_ord
    647 
    648         integer :: i, j, ind_min
    649 
    650         real, dimension(len_cs) :: rneb
    651         real :: rneb_max
     654        INTEGER, intent(in) :: len_cs
     655        REAL, DIMENSION(:), intent(in) :: rneb_cs
     656        REAL, DIMENSION(:), intent(out) :: rneb_ord
     657
     658        INTEGER :: i, j, ind_min
     659
     660        REAL, DIMENSION(len_cs) :: rneb
     661        REAL :: rneb_max
    652662
    653663
     
    689699       USE dimphy
    690700
    691        real, dimension(klev), intent(in) :: rneb_1D, temp_1D, emis_1D, &
     701       REAL, DIMENSION(klev), intent(in) :: rneb_1D, temp_1D, emis_1D, &
    692702     & iwcon_1D, rad_1D
    693         real, dimension(klev), intent(in) :: pres, dz, rhodz_1D
    694         real, intent(out) :: cc_tot_mesh, cc_hc_mesh, cc_hist_mesh
    695         real, intent(out) :: cc_Cb_mesh, cc_ThCi_mesh, cc_Anv_mesh
    696         real, intent(out) :: em_hc_mesh, pcld_hc_mesh, tcld_hc_mesh, &
     703        REAL, DIMENSION(klev), intent(in) :: pres, dz, rhodz_1D
     704        REAL, intent(out) :: cc_tot_mesh, cc_hc_mesh, cc_hist_mesh
     705        REAL, intent(out) :: cc_Cb_mesh, cc_ThCi_mesh, cc_Anv_mesh
     706        REAL, intent(out) :: em_hc_mesh, pcld_hc_mesh, tcld_hc_mesh, &
    697707     & iwp_hc_mesh
    698708
    699         real, intent(out) :: pcld_Cb_mesh, tcld_Cb_mesh, em_Cb_mesh
    700         real, intent(out) :: pcld_ThCi_mesh, tcld_ThCi_mesh, &
     709        REAL, intent(out) :: pcld_Cb_mesh, tcld_Cb_mesh, em_Cb_mesh
     710        REAL, intent(out) :: pcld_ThCi_mesh, tcld_ThCi_mesh, &
    701711     & em_ThCi_mesh
    702         real, intent(out) :: pcld_Anv_mesh, tcld_Anv_mesh, em_Anv_mesh
    703 
    704         real, intent(out) :: em_hist_mesh, iwp_hist_mesh, rad_hist_mesh
    705         real, intent(out) :: deltaz_hc_mesh, deltaz_hist_mesh
    706 
    707         real, dimension(:), allocatable :: rneb_cs, temp_cs, emis_cs, &
     712        REAL, intent(out) :: pcld_Anv_mesh, tcld_Anv_mesh, em_Anv_mesh
     713
     714        REAL, intent(out) :: em_hist_mesh, iwp_hist_mesh, rad_hist_mesh
     715        REAL, intent(out) :: deltaz_hc_mesh, deltaz_hist_mesh
     716
     717        REAL, DIMENSION(:), allocatable :: rneb_cs, temp_cs, emis_cs, &
    708718     & iwco_cs
    709         real, dimension(:), allocatable :: pres_cs, dz_cs, rad_cs, &
     719        REAL, DIMENSION(:), allocatable :: pres_cs, dz_cs, rad_cs, &
    710720     & rhodz_cs
    711721
    712         integer :: i,j,l
    713         integer :: ltop, itop, ibot, num_cs, N_cs, len_cs, ics
    714 
    715         real :: som_emi_hc,som_pcl_hc,som_tcl_hc,som_iwp_hc,som_hc,&
     722        INTEGER :: i,j,l
     723        INTEGER :: ltop, itop, ibot, num_cs, N_cs, len_cs, ics
     724
     725        REAL :: som_emi_hc,som_pcl_hc,som_tcl_hc,som_iwp_hc,som_hc,&
    716726     & som_hist
    717         real :: som_emi_hist, som_iwp_hist, som_deltaz_hc, &
     727        REAL :: som_emi_hist, som_iwp_hist, som_deltaz_hc, &
    718728     & som_deltaz_hist
    719         real :: som_rad_hist
    720         real :: som_Cb, som_ThCi, som_Anv
    721         real :: som_emi_Cb, som_tcld_Cb, som_pcld_Cb
    722         real :: som_emi_Anv, som_tcld_Anv, som_pcld_Anv
    723         real :: som_emi_ThCi, som_tcld_ThCi, som_pcld_ThCi
    724         real :: tsom_tot, tsom_hc, tsom_hist
    725         real :: prod, prod_hh
    726 
    727         real :: cc_tot_cs, cc_hc_cs, cc_hist_cs
    728         real :: cc_Cb_cs, cc_ThCi_cs, cc_Anv_cs
    729         real :: pcld_hc_cs, tcld_hc_cs
    730         real :: em_hc_cs, iwp_hc_cs, deltaz_hc_cs
    731         real :: pcld_Cb_cs, tcld_Cb_cs, em_Cb_cs
    732         real :: pcld_ThCi_cs, tcld_ThCi_cs, em_ThCi_cs
    733         real :: pcld_Anv_cs, tcld_Anv_cs, em_Anv_cs
    734         real :: em_hist_cs, iwp_hist_cs, deltaz_hist_cs, rad_hist_cs
    735 
    736         real, dimension(klev) :: test_tot, test_hc, test_hist
    737         real, dimension(klev) :: test_pcld, test_tcld, test_em, test_iwp
    738 
     729        REAL :: som_rad_hist
     730        REAL :: som_Cb, som_ThCi, som_Anv
     731        REAL :: som_emi_Cb, som_tcld_Cb, som_pcld_Cb
     732        REAL :: som_emi_Anv, som_tcld_Anv, som_pcld_Anv
     733        REAL :: som_emi_ThCi, som_tcld_ThCi, som_pcld_ThCi
     734        REAL :: tsom_tot, tsom_hc, tsom_hist
     735        REAL :: prod, prod_hh
     736
     737        REAL :: cc_tot_cs, cc_hc_cs, cc_hist_cs
     738        REAL :: cc_Cb_cs, cc_ThCi_cs, cc_Anv_cs
     739        REAL :: pcld_hc_cs, tcld_hc_cs
     740        REAL :: em_hc_cs, iwp_hc_cs, deltaz_hc_cs
     741        REAL :: pcld_Cb_cs, tcld_Cb_cs, em_Cb_cs
     742        REAL :: pcld_ThCi_cs, tcld_ThCi_cs, em_ThCi_cs
     743        REAL :: pcld_Anv_cs, tcld_Anv_cs, em_Anv_cs
     744        REAL :: em_hist_cs, iwp_hist_cs, deltaz_hist_cs, rad_hist_cs
     745
     746        REAL, DIMENSION(klev) :: test_tot, test_hc, test_hist
     747        REAL, DIMENSION(klev) :: test_pcld, test_tcld, test_em, test_iwp
     748
     749        CHARACTER (len = 50)      :: modname = 'simu_airs.sim_mesh'
     750        CHARACTER (len = 160)     :: abort_message
     751       
    739752
    740753        do j = 1, klev
    741         write(*,*) 'simu_airs, j, rneb_1D =', rneb_1D(j)
     754          WRITE(lunout,*) 'simu_airs, j, rneb_1D =', rneb_1D(j)
    742755        enddo
    743756
     
    9911004       if (cc_tot_mesh .gt. tsom_tot .and. &
    9921005     & abs(cc_tot_mesh-tsom_tot) .gt. 1.e-4) then
    993         write(*,*) 'cc_tot_mesh > tsom_tot'
    994         write(*,*) cc_tot_mesh, tsom_tot
    995         STOP
     1006           WRITE(abort_message,*)'cc_tot_mesh > tsom_tot', cc_tot_mesh, tsom_tot
     1007           CALL abort_physic(modname,abort_message,1)
    9961008        endif
    9971009
    9981010        if (cc_tot_mesh .lt. maxval(test_tot(1:N_CS)) .and. &
    9991011     & abs(cc_tot_mesh-maxval(test_tot(1:N_CS))) .gt. 1.e-4) then
    1000         write(*,*) 'cc_tot_mesh < max'
    1001         write(*,*) cc_tot_mesh, maxval(test_tot(1:N_CS))
    1002         STOP
     1012           WRITE(abort_message,*) 'cc_tot_mesh < max', cc_tot_mesh, maxval(test_tot(1:N_CS))
     1013           CALL abort_physic(modname,abort_message,1)
    10031014        endif
    10041015
    10051016        if (cc_hc_mesh .gt. tsom_hc .and. &
    10061017     & abs(cc_hc_mesh-tsom_hc) .gt. 1.e-4) then
    1007         write(*,*) 'cc_hc_mesh > tsom_hc'
    1008         write(*,*) cc_hc_mesh, tsom_hc
    1009         STOP
     1018           WRITE(abort_message,*) 'cc_hc_mesh > tsom_hc', cc_hc_mesh, tsom_hc
     1019           CALL abort_physic(modname,abort_message,1)
    10101020        endif
    10111021
    10121022        if (cc_hc_mesh .lt. maxval(test_hc(1:N_CS)) .and. &
    10131023     & abs(cc_hc_mesh-maxval(test_hc(1:N_CS))) .gt. 1.e-4) then
    1014         write(*,*) 'cc_hc_mesh < max'
    1015         write(*,*) cc_hc_mesh, maxval(test_hc(1:N_CS))
    1016         STOP
     1024           WRITE(abort_message,*) 'cc_hc_mesh < max', cc_hc_mesh, maxval(test_hc(1:N_CS))
     1025           CALL abort_physic(modname,abort_message,1)
    10171026        endif
    10181027
    10191028        if (cc_hist_mesh .gt. tsom_hist .and. &
    10201029     & abs(cc_hist_mesh-tsom_hist) .gt. 1.e-4) then
    1021         write(*,*) 'cc_hist_mesh > tsom_hist'
    1022         write(*,*) cc_hist_mesh, tsom_hist
    1023         STOP
     1030           WRITE(abort_message,*) 'cc_hist_mesh > tsom_hist', cc_hist_mesh, tsom_hist
     1031           CALL abort_physic(modname,abort_message,1)
    10241032        endif
    10251033
    10261034        if (cc_hist_mesh .lt. 0.) then
    1027         write(*,*) 'cc_hist_mesh < 0'
    1028         write(*,*) cc_hist_mesh
    1029         STOP
     1035           WRITE(abort_message,*) 'cc_hist_mesh < 0', cc_hist_mesh
     1036           CALL abort_physic(modname,abort_message,1)
    10301037        endif
    10311038
     
    10351042     & maxval(test_pcld(1:N_CS)) .ne. 999. &
    10361043     & .and. minval(test_pcld(1:N_CS)) .ne. 999.) then
    1037         write(*,*) 'pcld_hc_mesh est faux'
    1038         write(*,*) pcld_hc_mesh, maxval(test_pcld(1:N_CS)), &
     1044           WRITE(abort_message,*) 'pcld_hc_mesh est faux', pcld_hc_mesh, maxval(test_pcld(1:N_CS)), &
    10391045     & minval(test_pcld(1:N_CS))
    1040         STOP
     1046           CALL abort_physic(modname,abort_message,1)
    10411047        endif
    10421048
     
    10461052     & maxval(test_tcld(1:N_CS)) .ne. 999. &
    10471053     & .and. minval(test_tcld(1:N_CS)) .ne. 999.) then
    1048         write(*,*) 'tcld_hc_mesh est faux'
    1049         write(*,*) tcld_hc_mesh, maxval(test_tcld(1:N_CS)), &
    1050      & minval(test_tcld(1:N_CS))
     1054           WRITE(abort_message,*) 'tcld_hc_mesh est faux', tcld_hc_mesh, maxval(test_tcld(1:N_CS)), &
     1055                & minval(test_tcld(1:N_CS))
     1056           CALL abort_physic(modname,abort_message,1)
    10511057        endif
    10521058
     
    10561062     & minval(test_em(1:N_CS)) .ne. 999. .and. &
    10571063     & maxval(test_em(1:N_CS)) .ne. 999. ) then
    1058         write(*,*) 'em_hc_mesh est faux'
    1059         write(*,*) em_hc_mesh, maxval(test_em(1:N_CS)), &
     1064           WRITE(abort_message,*) 'em_hc_mesh est faux', em_hc_mesh, maxval(test_em(1:N_CS)), &
    10601065     & minval(test_em(1:N_CS))
    1061         STOP
     1066           CALL abort_physic(modname,abort_message,1)
    10621067        endif
    10631068
     
    11011106        subroutine test_bornes(sx,x,bsup,binf)
    11021107
    1103         real, intent(in) :: x, bsup, binf
     1108        REAL, intent(in) :: x, bsup, binf
    11041109        character*14, intent(in) :: sx
     1110        CHARACTER (len = 50)      :: modname = 'simu_airs.test_bornes'
     1111        CHARACTER (len = 160)     :: abort_message
    11051112
    11061113        if (x .gt. bsup .or. x .lt. binf) then
    1107         write(*,*) sx, 'est faux'
    1108         write(*,*) sx, x
    1109         STOP
     1114          WRITE(abort_message,*) sx, 'est faux', sx, x
     1115          CALL abort_physic(modname,abort_message,1)
    11101116        endif
    11111117 
     
    11341140        include "YOMCST.h"
    11351141
    1136         integer,intent(in) :: itap
    1137 
    1138         real, dimension(klon,klev), intent(in) :: &
     1142        INTEGER,intent(in) :: itap
     1143
     1144        REAL, DIMENSION(klon,klev), intent(in) :: &
    11391145     & rneb_airs, temp_airs, cldemi_airs, iwcon0_airs, &
    11401146     & rad_airs, geop_airs, pplay_airs, paprs_airs
    11411147
    1142        real, dimension(klon,klev) :: &
     1148       REAL, DIMENSION(klon,klev) :: &
    11431149     & rhodz_airs, rho_airs, iwcon_airs
    11441150
    1145         real, dimension(klon),intent(out) :: alt_tropo
    1146 
    1147         real, dimension(klev) :: rneb_1D, temp_1D, &
     1151        REAL, DIMENSION(klon),intent(out) :: alt_tropo
     1152
     1153        REAL, DIMENSION(klev) :: rneb_1D, temp_1D, &
    11481154     & emis_1D, rad_1D, pres_1D, alt_1D, &
    11491155     & rhodz_1D, dz_1D, iwcon_1D
    11501156
    1151         integer :: i, j
    1152 
    1153         real :: cc_tot_mesh, cc_hc_mesh, cc_hist_mesh
    1154         real :: cc_Cb_mesh, cc_ThCi_mesh, cc_Anv_mesh
    1155         real :: pcld_hc_mesh, tcld_hc_mesh, em_hc_mesh, iwp_hc_mesh
    1156         real :: em_hist_mesh, iwp_hist_mesh
    1157         real :: deltaz_hc_mesh, deltaz_hist_mesh, rad_hist_mesh
    1158         real :: pcld_Cb_mesh, tcld_Cb_mesh, em_Cb_mesh
    1159         real :: pcld_ThCi_mesh, tcld_ThCi_mesh, em_ThCi_mesh
    1160         real :: pcld_Anv_mesh, tcld_Anv_mesh, em_Anv_mesh
    1161 
    1162         real, dimension(klon),intent(out) :: map_prop_hc, map_prop_hist
    1163         real, dimension(klon),intent(out) :: map_emis_hc, map_iwp_hc
    1164         real, dimension(klon),intent(out) :: map_deltaz_hc, map_pcld_hc
    1165         real, dimension(klon),intent(out) :: map_tcld_hc
    1166         real, dimension(klon),intent(out) :: map_emis_Cb,map_pcld_Cb,map_tcld_Cb
    1167         real, dimension(klon),intent(out) :: &
     1157        INTEGER :: i, j
     1158
     1159        REAL :: cc_tot_mesh, cc_hc_mesh, cc_hist_mesh
     1160        REAL :: cc_Cb_mesh, cc_ThCi_mesh, cc_Anv_mesh
     1161        REAL :: pcld_hc_mesh, tcld_hc_mesh, em_hc_mesh, iwp_hc_mesh
     1162        REAL :: em_hist_mesh, iwp_hist_mesh
     1163        REAL :: deltaz_hc_mesh, deltaz_hist_mesh, rad_hist_mesh
     1164        REAL :: pcld_Cb_mesh, tcld_Cb_mesh, em_Cb_mesh
     1165        REAL :: pcld_ThCi_mesh, tcld_ThCi_mesh, em_ThCi_mesh
     1166        REAL :: pcld_Anv_mesh, tcld_Anv_mesh, em_Anv_mesh
     1167
     1168        REAL, DIMENSION(klon),intent(out) :: map_prop_hc, map_prop_hist
     1169        REAL, DIMENSION(klon),intent(out) :: map_emis_hc, map_iwp_hc
     1170        REAL, DIMENSION(klon),intent(out) :: map_deltaz_hc, map_pcld_hc
     1171        REAL, DIMENSION(klon),intent(out) :: map_tcld_hc
     1172        REAL, DIMENSION(klon),intent(out) :: map_emis_Cb,map_pcld_Cb,map_tcld_Cb
     1173        REAL, DIMENSION(klon),intent(out) :: &
    11681174     & map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi
    1169         real, dimension(klon),intent(out) :: &
     1175        REAL, DIMENSION(klon),intent(out) :: &
    11701176     & map_emis_Anv,map_pcld_Anv,map_tcld_Anv
    1171         real, dimension(klon),intent(out) :: &
     1177        REAL, DIMENSION(klon),intent(out) :: &
    11721178     & map_emis_hist,map_iwp_hist,map_deltaz_hist,&
    11731179     & map_rad_hist
    1174        real, dimension(klon),intent(out) :: map_ntot,map_hc,map_hist
    1175        real, dimension(klon),intent(out) :: map_Cb,map_ThCi,map_Anv
     1180        REAL, DIMENSION(klon),intent(out) :: map_ntot,map_hc,map_hist
     1181        REAL, DIMENSION(klon),intent(out) :: map_Cb,map_ThCi,map_Anv
    11761182 
    11771183 
Note: See TracChangeset for help on using the changeset viewer.