Changeset 2870 for LMDZ5/branches


Ignore:
Timestamp:
May 4, 2017, 9:31:05 AM (8 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2842:2865 into testing branch

Location:
LMDZ5/branches/testing
Files:
30 edited
6 copied

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/DefLists/field_def_lmdz.xml

    r2845 r2870  
    319319        <field id="sollwad0"    long_name="LW-ADE clear-sky at SRF"    unit="W/m2" />
    320320        <field id="sollwai"    long_name="LW-AIE at SRF" unit="W/m2" />
    321         <field id="OD550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    322         <field id="OD550_ASPOMM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    323         <field id="OD550_ASSO4M"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    324         <field id="OD550_CSSO4M"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    325         <field id="OD550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    326         <field id="OD550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    327         <field id="OD550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    328         <field id="OD550_CIDUSTM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    329         <field id="OD550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    330         <field id="OD550_AIPOMM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    331         <field id="OD550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1" enabled="TRUE" />
    332         <field id="OD550_SO4"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    333         <field id="OD550_ASNO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    334         <field id="OD550_CSNO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    335         <field id="OD550_CINO3M"     long_name="Aerosol Optical depth at 550 nm "    unit="1" />
    336         <field id="OD_10um_STRAT" long_name="Stratospheric Aerosol Optical depth at 10 um" unit="-" />
    337         <field id="od443aer" long_name="Total aerosol optical depth at 440nm" unit="-" />
    338         <field id="od550aer"    long_name="Total aerosol optical depth at 550nm"    unit="-" />
     321        <field id="od550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     322        <field id="od550_ASPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     323        <field id="od550_ASSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     324        <field id="od550_CSSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     325        <field id="od550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     326        <field id="od550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     327        <field id="od550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     328        <field id="od550_CIDUSTM"  long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     329        <field id="od550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     330        <field id="od550_AIPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     331        <field id="od550_ASNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     332        <field id="od550_CSNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     333        <field id="od550_CINO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     334        <field id="od550_STRAT"    long_name="Aerosol Optical depth at 550 nm "    unit="1" enabled="TRUE" />
     335        <field id="dryod550_ASBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     336        <field id="dryod550_ASPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     337        <field id="dryod550_ASSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     338        <field id="dryod550_CSSO4M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     339        <field id="dryod550_SSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     340        <field id="dryod550_ASSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     341        <field id="dryod550_CSSSM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     342        <field id="dryod550_CIDUSTM"  long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     343        <field id="dryod550_AIBCM"    long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     344        <field id="dryod550_AIPOMM"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     345        <field id="dryod550_ASNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     346        <field id="dryod550_CSNO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     347        <field id="dryod550_CINO3M"   long_name="Aerosol Optical depth at 550 nm "    unit="1" />
     348        <field id="od_10um_STRAT"  long_name="Stratospheric Aerosol Optical depth at 10 um" unit="-" />
     349        <field id="od443aer"    long_name="Total aerosol optical depth at 440nm" unit="-" />
     350        <field id="od550aer"    long_name="Total aerosol optical depth at 550nm" unit="-" />
     351        <field id="dryod550aer" long_name="Total dry aerosol optical depth at 550nm"    unit="-" />
    339352        <field id="od865aer"    long_name="Total aerosol optical depth at 870nm"    unit="-" />
    340         <field id="abs550aer"    long_name="Absorption aerosol optical depth at 550nm"    unit="-" />
    341         <field id="od550lt1aer"    long_name="Fine mode optical depth"    unit="-" />
     353        <field id="abs550aer"   long_name="Absorption aerosol optical depth at 550nm"    unit="-" />
     354        <field id="od550lt1aer" long_name="Fine mode optical depth"    unit="-" />
    342355        <field id="sconcso4"    long_name="Surface Concentration of Sulfate "    unit="kg/m3" />
    343356        <field id="sconcno3"    long_name="Surface Concentration of Nitrate "    unit="kg/m3" />
    344         <field id="sconcoa"    long_name="Surface Concentration of Organic Aerosol "    unit="kg/m3" />
    345         <field id="sconcbc"    long_name="Surface Concentration of Black Carbon "    unit="kg/m3" />
    346         <field id="sconcss"    long_name="Surface Concentration of Sea Salt "    unit="kg/m3" />
    347         <field id="sconcdust"    long_name="Surface Concentration of Dust "    unit="kg/m3" />
    348         <field id="loadso4"    long_name="Column Load of Sulfate "    unit="kg/m2" />
     357        <field id="sconcoa"     long_name="Surface Concentration of Organic Aerosol "    unit="kg/m3" />
     358        <field id="sconcbc"     long_name="Surface Concentration of Black Carbon "    unit="kg/m3" />
     359        <field id="sconcss"     long_name="Surface Concentration of Sea Salt "    unit="kg/m3" />
     360        <field id="sconcdust"   long_name="Surface Concentration of Dust "    unit="kg/m3" />
     361        <field id="loadso4"   long_name="Column Load of Sulfate "    unit="kg/m2" />
    349362        <field id="loadoa"    long_name="Column Load of Organic Aerosol "    unit="kg/m2" />
    350363        <field id="loadbc"    long_name="Column Load of Black Carbon "    unit="kg/m2" />
    351364        <field id="loadss"    long_name="Column Load of Sea Salt "    unit="kg/m2" />
    352         <field id="loaddust"    long_name="Column Load of Dust "    unit="kg/m2" />
    353         <field id="loadno3"     long_name="Column Load of Nitrate " unit="kg/m2" />
     365        <field id="loaddust"  long_name="Column Load of Dust "    unit="kg/m2" />
     366        <field id="loadno3"   long_name="Column Load of Nitrate " unit="kg/m2" />
    354367        <field id="swtoaas_nat"    long_name="Natural aerosol radiative forcing all-sky at TOA"    unit="W/m2" />
    355368        <field id="swsrfas_nat"    long_name="Natural aerosol radiative forcing all-sky at SRF"    unit="W/m2" />
     
    638651
    639652    <field_group id="fields_strataer_2D" domain_ref="dom_glo">
    640         <field id="OD550_strat_only"   long_name="Stratospheric Aerosol Optical depth at 550 nm "        unit="1" />
    641         <field id="OD1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
     653        <field id="od550_strat_only"   long_name="Stratospheric Aerosol Optical depth at 550 nm "        unit="1" />
     654        <field id="od1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
    642655        <field id="surf_PM25_sulf"     long_name="Sulfate PM2.5 concentration at the surface"            unit="ug/m3" />
    643656        <field id="p_tropopause"       long_name="Tropopause pressure"                                   unit="Pa" />
     
    774787
    775788    <field_group id="fields_COSP_ISCCP" domain_ref="dom_glo" freq_op="3h">
    776       <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1"  detect_missing_value=".true."  detect_missing_value=".true." />
     789      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1" detect_missing_value=".true." />
    777790      <field id="boxtauisccp" long_name="Optical Depth in Each Column as Calculated by the ISCCP Simulator" unit="1" axis_ref="column"  detect_missing_value=".true." />
    778791      <field id="boxptopisccp" long_name="Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator" unit="Pa" axis_ref="column"  detect_missing_value=".true." />
  • LMDZ5/branches/testing/DefLists/file_def_histLES_lmdz.xml

    r2845 r2870  
    321321                <field field_ref="solswad0" level="10" />
    322322                <field field_ref="solswai" level="10" />
    323                 <field field_ref="OD550_ASBCM" level="10" />
    324                 <field field_ref="OD550_ASPOMM" level="10" />
    325                 <field field_ref="OD550_ASSO4M" level="10" />
    326                 <field field_ref="OD550_CSSO4M" level="10" />
    327                 <field field_ref="OD550_SSSSM" level="10" />
    328                 <field field_ref="OD550_ASSSM" level="10" />
    329                 <field field_ref="OD550_CSSSM" level="10" />
    330                 <field field_ref="OD550_CIDUSTM" level="10" />
    331                 <field field_ref="OD550_AIBCM" level="10" />
    332                 <field field_ref="OD550_AIPOMM" level="10" />
    333                 <field field_ref="OD550_ASNO3M" level="10" />
    334                 <field field_ref="OD550_CSNO3M" level="10" />
    335                 <field field_ref="OD550_CINO3M" level="10" />
    336                 <field field_ref="OD550_STRAT" level="10" />
     323                <field field_ref="od550_ASBCM" level="10" />
     324                <field field_ref="od550_ASPOMM" level="10" />
     325                <field field_ref="od550_ASSO4M" level="10" />
     326                <field field_ref="od550_CSSO4M" level="10" />
     327                <field field_ref="od550_SSSSM" level="10" />
     328                <field field_ref="od550_ASSSM" level="10" />
     329                <field field_ref="od550_CSSSM" level="10" />
     330                <field field_ref="od550_CIDUSTM" level="10" />
     331                <field field_ref="od550_AIBCM" level="10" />
     332                <field field_ref="od550_AIPOMM" level="10" />
     333                <field field_ref="od550_ASNO3M" level="10" />
     334                <field field_ref="od550_CSNO3M" level="10" />
     335                <field field_ref="od550_CINO3M" level="10" />
     336                <field field_ref="od550_STRAT" level="10" />
    337337                <field field_ref="od550aer" level="10" />
    338338                <field field_ref="od865aer" level="10" />
  • LMDZ5/branches/testing/DefLists/file_def_histday_lmdz.xml

    r2845 r2870  
    327327                <field field_ref="sollwad0" level="10" />
    328328                <field field_ref="sollwai" level="10" />
    329                 <field field_ref="OD550_ASBCM" level="6" />
    330                 <field field_ref="OD550_ASPOMM" level="6" />
    331                 <field field_ref="OD550_ASSO4M" level="6" />
    332                 <field field_ref="OD550_CSSO4M" level="6" />
    333                 <field field_ref="OD550_SSSSM" level="6" />
    334                 <field field_ref="OD550_ASSSM" level="6" />
    335                 <field field_ref="OD550_CSSSM" level="6" />
    336                 <field field_ref="OD550_CIDUSTM" level="6" />
    337                 <field field_ref="OD550_AIBCM" level="6" />
    338                 <field field_ref="OD550_AIPOMM" level="6" />
    339                 <field field_ref="OD550_ASNO3M" level="6" />
    340                 <field field_ref="OD550_CSNO3M" level="6" />
    341                 <field field_ref="OD550_CINO3M" level="6" />
    342                 <field field_ref="OD550_STRAT" level="2" />
     329                <field field_ref="od550_ASBCM" level="6" />
     330                <field field_ref="od550_ASPOMM" level="6" />
     331                <field field_ref="od550_ASSO4M" level="6" />
     332                <field field_ref="od550_CSSO4M" level="6" />
     333                <field field_ref="od550_SSSSM" level="6" />
     334                <field field_ref="od550_ASSSM" level="6" />
     335                <field field_ref="od550_CSSSM" level="6" />
     336                <field field_ref="od550_CIDUSTM" level="6" />
     337                <field field_ref="od550_AIBCM" level="6" />
     338                <field field_ref="od550_AIPOMM" level="6" />
     339                <field field_ref="od550_ASNO3M" level="6" />
     340                <field field_ref="od550_CSNO3M" level="6" />
     341                <field field_ref="od550_CINO3M" level="6" />
     342                <field field_ref="od550_STRAT" level="2" />
    343343                <field field_ref="od550aer" level="6" />
     344                <field field_ref="dryod550aer" level="6" />
    344345                <field field_ref="od865aer" level="6" />
    345346                <field field_ref="abs550aer" level="6" />
  • LMDZ5/branches/testing/DefLists/file_def_histhf_lmdz.xml

    r2845 r2870  
    321321                <field field_ref="solswad0" level="10" />
    322322                <field field_ref="solswai" level="10" />
    323                 <field field_ref="OD550_ASBCM" level="10" />
    324                 <field field_ref="OD550_ASPOMM" level="10" />
    325                 <field field_ref="OD550_ASSO4M" level="10" />
    326                 <field field_ref="OD550_CSSO4M" level="10" />
    327                 <field field_ref="OD550_SSSSM" level="10" />
    328                 <field field_ref="OD550_ASSSM" level="10" />
    329                 <field field_ref="OD550_CSSSM" level="10" />
    330                 <field field_ref="OD550_CIDUSTM" level="10" />
    331                 <field field_ref="OD550_AIBCM" level="10" />
    332                 <field field_ref="OD550_AIPOMM" level="10" />
    333                 <field field_ref="OD550_ASNO3M" level="10" />
    334                 <field field_ref="OD550_CSNO3M" level="10" />
    335                 <field field_ref="OD550_CINO3M" level="10" />
    336                 <field field_ref="OD550_STRAT" level="10" />
     323                <field field_ref="od550_ASBCM" level="10" />
     324                <field field_ref="od550_ASPOMM" level="10" />
     325                <field field_ref="od550_ASSO4M" level="10" />
     326                <field field_ref="od550_CSSO4M" level="10" />
     327                <field field_ref="od550_SSSSM" level="10" />
     328                <field field_ref="od550_ASSSM" level="10" />
     329                <field field_ref="od550_CSSSM" level="10" />
     330                <field field_ref="od550_CIDUSTM" level="10" />
     331                <field field_ref="od550_AIBCM" level="10" />
     332                <field field_ref="od550_AIPOMM" level="10" />
     333                <field field_ref="od550_ASNO3M" level="10" />
     334                <field field_ref="od550_CSNO3M" level="10" />
     335                <field field_ref="od550_CINO3M" level="10" />
     336                <field field_ref="od550_STRAT" level="10" />
    337337                <field field_ref="od550aer" level="10" />
    338338                <field field_ref="od865aer" level="10" />
  • LMDZ5/branches/testing/DefLists/file_def_histins_lmdz.xml

    r2845 r2870  
    321321                <field field_ref="solswad0" level="10" />
    322322                <field field_ref="solswai" level="10" />
    323                 <field field_ref="OD550_ASBCM" level="10" />
    324                 <field field_ref="OD550_ASPOMM" level="10" />
    325                 <field field_ref="OD550_ASSO4M" level="10" />
    326                 <field field_ref="OD550_CSSO4M" level="10" />
    327                 <field field_ref="OD550_SSSSM" level="10" />
    328                 <field field_ref="OD550_ASSSM" level="10" />
    329                 <field field_ref="OD550_CSSSM" level="10" />
    330                 <field field_ref="OD550_CIDUSTM" level="10" />
    331                 <field field_ref="OD550_AIBCM" level="10" />
    332                 <field field_ref="OD550_AIPOMM" level="10" />
    333                 <field field_ref="OD550_ASNO3M" level="10" />
    334                 <field field_ref="OD550_CSNO3M" level="10" />
    335                 <field field_ref="OD550_CINO3M" level="10" />
    336                 <field field_ref="OD550_STRAT" level="10" />
     323                <field field_ref="od550_ASBCM" level="10" />
     324                <field field_ref="od550_ASPOMM" level="10" />
     325                <field field_ref="od550_ASSO4M" level="10" />
     326                <field field_ref="od550_CSSO4M" level="10" />
     327                <field field_ref="od550_SSSSM" level="10" />
     328                <field field_ref="od550_ASSSM" level="10" />
     329                <field field_ref="od550_CSSSM" level="10" />
     330                <field field_ref="od550_CIDUSTM" level="10" />
     331                <field field_ref="od550_AIBCM" level="10" />
     332                <field field_ref="od550_AIPOMM" level="10" />
     333                <field field_ref="od550_ASNO3M" level="10" />
     334                <field field_ref="od550_CSNO3M" level="10" />
     335                <field field_ref="od550_CINO3M" level="10" />
     336                <field field_ref="od550_STRAT" level="10" />
    337337                <field field_ref="od550aer" level="10" />
    338338                <field field_ref="od865aer" level="10" />
  • LMDZ5/branches/testing/DefLists/file_def_histmth_lmdz.xml

    r2845 r2870  
    347347                <field field_ref="sollwad0" level="5" />
    348348                <field field_ref="sollwai" level="5" />
    349                 <field field_ref="OD550_ASBCM" level="2" />
    350                 <field field_ref="OD550_ASPOMM" level="2" />
    351                 <field field_ref="OD550_ASSO4M" level="2" />
    352                 <field field_ref="OD550_CSSO4M" level="2" />
    353                 <field field_ref="OD550_SSSSM" level="2" />
    354                 <field field_ref="OD550_ASSSM" level="2" />
    355                 <field field_ref="OD550_CSSSM" level="2" />
    356                 <field field_ref="OD550_CIDUSTM" level="2" />
    357                 <field field_ref="OD550_AIBCM" level="2" />
    358                 <field field_ref="OD550_AIPOMM" level="2" />
    359                 <field field_ref="OD550_ASNO3M" level="2" />
    360                 <field field_ref="OD550_CSNO3M" level="2" />
    361                 <field field_ref="OD550_CINO3M" level="2" />
    362                 <field field_ref="OD550_STRAT" level="2" />
     349                <field field_ref="od550_ASBCM" level="2" />
     350                <field field_ref="od550_ASPOMM" level="2" />
     351                <field field_ref="od550_ASSO4M" level="2" />
     352                <field field_ref="od550_CSSO4M" level="2" />
     353                <field field_ref="od550_SSSSM" level="2" />
     354                <field field_ref="od550_ASSSM" level="2" />
     355                <field field_ref="od550_CSSSM" level="2" />
     356                <field field_ref="od550_CIDUSTM" level="2" />
     357                <field field_ref="od550_AIBCM" level="2" />
     358                <field field_ref="od550_AIPOMM" level="2" />
     359                <field field_ref="od550_ASNO3M" level="2" />
     360                <field field_ref="od550_CSNO3M" level="2" />
     361                <field field_ref="od550_CINO3M" level="2" />
     362                <field field_ref="od550_STRAT" level="2" />
     363                <field field_ref="dryod550_ASBCM" level="2" />
     364                <field field_ref="dryod550_ASPOMM" level="2" />
     365                <field field_ref="dryod550_ASSO4M" level="2" />
     366                <field field_ref="dryod550_CSSO4M" level="2" />
     367                <field field_ref="dryod550_SSSSM" level="2" />
     368                <field field_ref="dryod550_ASSSM" level="2" />
     369                <field field_ref="dryod550_CSSSM" level="2" />
     370                <field field_ref="dryod550_CIDUSTM" level="2" />
     371                <field field_ref="dryod550_AIBCM" level="2" />
     372                <field field_ref="dryod550_AIPOMM" level="2" />
     373                <field field_ref="dryod550_ASNO3M" level="2" />
     374                <field field_ref="dryod550_CSNO3M" level="2" />
     375                <field field_ref="dryod550_CINO3M" level="2" />
    363376                <field field_ref="od550aer" level="2" />
     377                <field field_ref="dryod550aer" level="2" />
    364378                <field field_ref="od865aer" level="2" />
    365379                <field field_ref="abs550aer" level="2" />
  • LMDZ5/branches/testing/DefLists/file_def_histstn_lmdz.xml

    r2845 r2870  
    321321                <field field_ref="solswad0" level="10" />
    322322                <field field_ref="solswai" level="10" />
    323                 <field field_ref="OD550_ASBCM" level="10" />
    324                 <field field_ref="OD550_ASPOMM" level="10" />
    325                 <field field_ref="OD550_ASSO4M" level="10" />
    326                 <field field_ref="OD550_CSSO4M" level="10" />
    327                 <field field_ref="OD550_SSSSM" level="10" />
    328                 <field field_ref="OD550_ASSSM" level="10" />
    329                 <field field_ref="OD550_CSSSM" level="10" />
    330                 <field field_ref="OD550_CIDUSTM" level="10" />
    331                 <field field_ref="OD550_AIBCM" level="10" />
    332                 <field field_ref="OD550_AIPOMM" level="10" />
    333                 <field field_ref="OD550_ASNO3M" level="10" />
    334                 <field field_ref="OD550_CSNO3M" level="10" />
    335                 <field field_ref="OD550_CINO3M" level="10" />
    336                 <field field_ref="OD550_STRAT" level="10" />
     323                <field field_ref="od550_ASBCM" level="10" />
     324                <field field_ref="od550_ASPOMM" level="10" />
     325                <field field_ref="od550_ASSO4M" level="10" />
     326                <field field_ref="od550_CSSO4M" level="10" />
     327                <field field_ref="od550_SSSSM" level="10" />
     328                <field field_ref="od550_ASSSM" level="10" />
     329                <field field_ref="od550_CSSSM" level="10" />
     330                <field field_ref="od550_CIDUSTM" level="10" />
     331                <field field_ref="od550_AIBCM" level="10" />
     332                <field field_ref="od550_AIPOMM" level="10" />
     333                <field field_ref="od550_ASNO3M" level="10" />
     334                <field field_ref="od550_CSNO3M" level="10" />
     335                <field field_ref="od550_CINO3M" level="10" />
     336                <field field_ref="od550_STRAT" level="10" />
    337337                <field field_ref="od550aer" level="10" />
    338338                <field field_ref="od865aer" level="10" />
  • LMDZ5/branches/testing/libf/dyn3d/dynetat0.f90

    r2641 r2870  
    153153  INTEGER,          INTENT(IN) :: n1, n2
    154154  CHARACTER(LEN=*), INTENT(IN) :: str1, str2
    155   CHARACTER(LEN=256) :: s1, s2
     155  CHARACTER(LEN=100) :: s1, s2
    156156  IF(n1/=n2) THEN
    157157    s1='value of '//TRIM(str1)//' ='
    158158    s2=' read in starting file differs from parametrized '//TRIM(str2)//' ='
    159     WRITE(msg,'(10x,a,i4,2x,a,i4)'),s1,n1,s2,n2
     159    WRITE(msg,'(10x,a,i4,2x,a,i4)'),TRIM(ADJUSTL(s1)),n1,TRIM(ADJUSTL(s2)),n2
    160160    CALL ABORT_gcm(TRIM(modname),TRIM(msg),1)
    161161  END IF
  • LMDZ5/branches/testing/libf/phylmd/add_phys_tend_mod.F90

    r2839 r2870  
    223223
    224224  if (fl_ebil .GT. 0) then
    225   ! Reset variables
    226     zqw_col(:,:) = 0.
    227     zql_col(:,:) = 0.
    228     zqs_col(:,:) = 0.
    229     zek_col(:,:) = 0.
    230     zh_dair_col(:,:) = 0.
    231     zh_qw_col(:,:) = 0.
    232     zh_ql_col(:,:) = 0.
    233     zh_qs_col(:,:) = 0.
     225    ! ------------------------------------------------
     226    ! Compute vertical sum for each atmospheric column
     227    ! ------------------------------------------------
     228    n=1   ! begining of time step
    234229
    235230    zcpvap = rcpv
    236231    zcwat = rcw
    237232    zcice = rcs
    238 !JLD    write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice
    239  
    240     ! ------------------------------------------------
    241     ! Compute vertical sum for each atmospheric column
    242     ! ------------------------------------------------
    243     n=1   ! begining of time step
    244     DO k = 1, klev
    245       DO i = 1, klon
    246         ! Watter mass
    247         zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k)
    248         zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k)
    249         zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k)
    250         ! Kinetic Energy
    251         zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k)
    252         ! Air enthalpy : dry air, water vapour, liquid, solid
    253         zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* &
    254           zairm(i, k)*t_seri(i, k)
    255         zh_qw_col(i,n) = zh_qw_col(i,n) +  zcpvap*t_seri(i, k)         *q_seri(i, k)*zairm(i, k)    !jyg
    256         zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k)   !jyg
    257         zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k)   !jyg
    258       END DO
    259     END DO
    260     ! compute total air enthalpy
    261     zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n)
     233
     234    CALL integr_v(klon, klev, zcpvap, &
     235                  t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, &
     236                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
     237                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
    262238
    263239  end if ! end if (fl_ebil .GT. 0)
     
    465441    ! ------------------------------------------------
    466442    n=2   ! end of time step
    467     DO k = 1, klev
    468       DO i = 1, klon
    469         ! Watter mass
    470         zqw_col(i,n) = zqw_col(i,n) + q_seri(i, k)*zairm(i, k)
    471         zql_col(i,n) = zql_col(i,n) + ql_seri(i, k)*zairm(i, k)
    472         zqs_col(i,n) = zqs_col(i,n) + qs_seri(i, k)*zairm(i, k)
    473         ! Kinetic Energy
    474         zek_col(i,n) = zek_col(i,n) + 0.5*(u_seri(i,k)**2+v_seri(i,k)**2)*zairm(i, k)
    475         ! Air enthalpy : dry air, water vapour, liquid, solid
    476         zh_dair_col(i,n) = zh_dair_col(i,n) + rcpd*(1.-q_seri(i,k)-ql_seri(i,k)-qs_seri(i,k))* &
    477           zairm(i, k)*t_seri(i, k)
    478         zh_qw_col(i,n) = zh_qw_col(i,n) +  zcpvap*t_seri(i, k)         *q_seri(i, k)*zairm(i, k)     !jyg
    479         zh_ql_col(i,n) = zh_ql_col(i,n) + (zcpvap*t_seri(i, k) - rlvtt)*ql_seri(i, k)*zairm(i, k)    !jyg
    480         zh_qs_col(i,n) = zh_qs_col(i,n) + (zcpvap*t_seri(i, k) - rlstt)*qs_seri(i, k)*zairm(i, k)    !jyg
    481       END DO
    482     END DO
    483     ! compute total air enthalpy
    484     zh_col(:,n) = zh_dair_col(:,n) + zh_qw_col(:,n) + zh_ql_col(:,n) + zh_qs_col(:,n)
     443
     444    CALL integr_v(klon, klev, zcpvap, &
     445                  t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zairm, &
     446                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
     447                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
    485448
    486449    ! ------------------------------------------------
     
    517480  RETURN
    518481END SUBROUTINE add_phys_tend
     482
     483SUBROUTINE diag_phys_tend (nlon, nlev, uu, vv, temp, qv, ql, qs, &
     484                          zdu,zdv,zdt,zdq,zdql,zdqs,paprs,text)
     485!======================================================================
     486! Ajoute les tendances des variables physiques aux variables
     487! d'etat de la dynamique t_seri, q_seri ...
     488! On en profite pour faire des tests sur les tendances en question.
     489!======================================================================
     490
     491
     492!======================================================================
     493! Declarations
     494!======================================================================
     495
     496USE phys_state_var_mod, ONLY : dtime, ftsol
     497USE geometry_mod, ONLY: longitude_deg, latitude_deg
     498USE print_control_mod, ONLY: prt_level
     499USE cmp_seri_mod
     500USE phys_output_var_mod, ONLY : d_qw_col, d_ql_col, d_qs_col, d_qt_col, d_ek_col, d_h_dair_col &
     501  &           , d_h_qw_col, d_h_ql_col, d_h_qs_col, d_h_col
     502IMPLICIT none
     503  include "YOMCST.h"
     504  include "clesphys.h"
     505
     506! Arguments :
     507!------------
     508INTEGER, INTENT(IN)                           :: nlon, nlev
     509REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: uu, vv
     510REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: temp, qv, ql, qs
     511REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: zdu, zdv
     512REAL, DIMENSION(nlon,nlev),     INTENT(IN)    :: zdt, zdq, zdql, zdqs
     513REAL, DIMENSION(nlon,nlev+1),   INTENT(IN)    :: paprs
     514CHARACTER*(*),                  INTENT(IN)    :: text
     515
     516! Local :
     517!--------
     518REAL, DIMENSION(nlon,nlev)      :: uu_n, vv_n
     519REAL, DIMENSION(nlon,nlev)      :: temp_n, qv_n, ql_n, qs_n
     520
     521
     522!
     523INTEGER k, n
     524
     525integer debug_level
     526logical, save :: first=.true.
     527!$OMP THREADPRIVATE(first)
     528!
     529!======================================================================
     530! Variables for energy conservation tests
     531!======================================================================
     532!
     533
     534! zh_col-------  total enthalpy of vertical air column
     535! (air with watter vapour, liquid and solid) (J/m2)
     536! zh_dair_col--- total enthalpy of dry air (J/m2)
     537! zh_qw_col----  total enthalpy of watter vapour (J/m2)
     538! zh_ql_col----  total enthalpy of liquid watter (J/m2)
     539! zh_qs_col----  total enthalpy of solid watter  (J/m2)
     540! zqw_col------  total mass of watter vapour (kg/m2)
     541! zql_col------  total mass of liquid watter (kg/m2)
     542! zqs_col------  total mass of solid watter (kg/m2)
     543! zek_col------  total kinetic energy (kg/m2)
     544!
     545REAL zairm(nlon, nlev) ! layer air mass (kg/m2)
     546REAL zqw_col(nlon,2)
     547REAL zql_col(nlon,2)
     548REAL zqs_col(nlon,2)
     549REAL zek_col(nlon,2)
     550REAL zh_dair_col(nlon,2)
     551REAL zh_qw_col(nlon,2), zh_ql_col(nlon,2), zh_qs_col(nlon,2)
     552REAL zh_col(nlon,2)
     553
     554!======================================================================
     555! Initialisations
     556
     557     IF (prt_level >= 5) then
     558        write (*,*) "In diag_phys_tend, after ",text
     559        call flush
     560     end if
     561
     562     debug_level=10
     563     if (first) then
     564        print *,"TestJLD rcpv, rcw, rcs",rcpv, rcw, rcs
     565        first=.false.
     566     endif
     567!
     568!  print *,'add_phys_tend: paprs ',paprs
     569!======================================================================
     570! Diagnostics for energy conservation tests
     571!======================================================================
     572  DO k = 1, nlev
     573    ! layer air mass
     574    zairm(:, k) = (paprs(:,k)-paprs(:,k+1))/rg
     575  END DO
     576
     577  if (fl_ebil .GT. 0) then
     578    ! ------------------------------------------------
     579    ! Compute vertical sum for each atmospheric column
     580    ! ------------------------------------------------
     581    n=1   ! begining of time step
     582
     583    CALL integr_v(nlon, nlev, rcpv, &
     584                  temp, qv, ql, qs, uu, vv, zairm, &
     585                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
     586                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
     587
     588  end if ! end if (fl_ebil .GT. 0)
     589
     590!======================================================================
     591! Ajout des tendances sur le vent, la temperature et les diverses phases de l'eau
     592!======================================================================
     593
     594     uu_n(:,:)=uu(:,:)+zdu(:,:)
     595     vv_n(:,:)=vv(:,:)+zdv(:,:)
     596     qv_n(:,:)=qv(:,:)+zdq(:,:)
     597     ql_n(:,:)=ql(:,:)+zdql(:,:)
     598     qs_n(:,:)=qs(:,:)+zdqs(:,:)
     599     temp_n(:,:)=temp(:,:)+zdt(:,:)
     600
     601
     602
     603!======================================================================
     604! Diagnostics for energy conservation tests
     605!======================================================================
     606
     607  if (fl_ebil .GT. 0) then
     608 
     609    ! ------------------------------------------------
     610    ! Compute vertical sum for each atmospheric column
     611    ! ------------------------------------------------
     612    n=2   ! end of time step
     613
     614    CALL integr_v(nlon, nlev, rcpv, &
     615                  temp_n, qv_n, ql_n, qs_n, uu_n, vv_n, zairm, &
     616                    zqw_col(:,n), zql_col(:,n), zqs_col(:,n), zek_col(:,n), zh_dair_col(:,n), &
     617                    zh_qw_col(:,n), zh_ql_col(:,n), zh_qs_col(:,n), zh_col(:,n))
     618
     619    ! ------------------------------------------------
     620    ! Compute the changes by unit of time
     621    ! ------------------------------------------------
     622
     623    d_qw_col(:) = (zqw_col(:,2)-zqw_col(:,1))/dtime
     624    d_ql_col(:) = (zql_col(:,2)-zql_col(:,1))/dtime
     625    d_qs_col(:) = (zqs_col(:,2)-zqs_col(:,1))/dtime
     626    d_qt_col(:) = d_qw_col(:) + d_ql_col(:) + d_qs_col(:)
     627
     628    d_ek_col(:) = (zek_col(:,2)-zek_col(:,1))/dtime
     629
     630   print *,'zdu ', zdu
     631   print *,'zdv ', zdv
     632   print *,'d_ek_col, zek_col(2), zek_col(1) ',d_ek_col(1), zek_col(1,2), zek_col(1,1)
     633
     634    d_h_dair_col(:) = (zh_dair_col(:,2)-zh_dair_col(:,1))/dtime
     635    d_h_qw_col(:) = (zh_qw_col(:,2)-zh_qw_col(:,1))/dtime
     636    d_h_ql_col(:) = (zh_ql_col(:,2)-zh_ql_col(:,1))/dtime
     637    d_h_qs_col(:) = (zh_qs_col(:,2)-zh_qs_col(:,1))/dtime
     638
     639    d_h_col = (zh_col(:,2)-zh_col(:,1))/dtime
     640
     641  end if ! end if (fl_ebil .GT. 0)
     642!
     643
     644  RETURN
     645END SUBROUTINE diag_phys_tend
     646
     647SUBROUTINE integr_v(nlon, nlev, zcpvap, &
     648                    temp, qv, ql, qs, uu, vv, zairm,  &
     649                    zqw_col, zql_col, zqs_col, zek_col, zh_dair_col, &
     650                    zh_qw_col, zh_ql_col, zh_qs_col, zh_col)
     651
     652IMPLICIT none
     653  include "YOMCST.h"
     654
     655INTEGER,                    INTENT(IN)    :: nlon,nlev
     656REAL,                       INTENT(IN)    :: zcpvap
     657REAL, DIMENSION(nlon,nlev), INTENT(IN)    :: temp, qv, ql, qs, uu, vv
     658REAL, DIMENSION(nlon,nlev), INTENT(IN)    :: zairm
     659REAL, DIMENSION(nlon),      INTENT(OUT)   :: zqw_col
     660REAL, DIMENSION(nlon),      INTENT(OUT)   :: zql_col
     661REAL, DIMENSION(nlon),      INTENT(OUT)   :: zqs_col
     662REAL, DIMENSION(nlon),      INTENT(OUT)   :: zek_col
     663REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_dair_col
     664REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_qw_col
     665REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_ql_col
     666REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_qs_col
     667REAL, DIMENSION(nlon),      INTENT(OUT)   :: zh_col
     668
     669INTEGER          :: i, k
     670
     671
     672  ! Reset variables
     673    zqw_col(:) = 0.
     674    zql_col(:) = 0.
     675    zqs_col(:) = 0.
     676    zek_col(:) = 0.
     677    zh_dair_col(:) = 0.
     678    zh_qw_col(:) = 0.
     679    zh_ql_col(:) = 0.
     680    zh_qs_col(:) = 0.
     681
     682!JLD    write (*,*) "rcpd, zcpvap, zcwat, zcice ",rcpd, zcpvap, zcwat, zcice
     683 
     684    ! ------------------------------------------------
     685    ! Compute vertical sum for each atmospheric column
     686    ! ------------------------------------------------
     687    DO k = 1, nlev
     688      DO i = 1, nlon
     689        ! Watter mass
     690        zqw_col(i) = zqw_col(i) + qv(i, k)*zairm(i, k)
     691        zql_col(i) = zql_col(i) + ql(i, k)*zairm(i, k)
     692        zqs_col(i) = zqs_col(i) + qs(i, k)*zairm(i, k)
     693        ! Kinetic Energy
     694        zek_col(i) = zek_col(i) + 0.5*(uu(i,k)**2+vv(i,k)**2)*zairm(i, k)
     695        ! Air enthalpy : dry air, water vapour, liquid, solid
     696        zh_dair_col(i) = zh_dair_col(i) + rcpd*(1.-qv(i,k)-ql(i,k)-qs(i,k))* &
     697                                               zairm(i, k)*temp(i, k)
     698        zh_qw_col(i) = zh_qw_col(i) +  zcpvap*temp(i, k)         *qv(i, k)*zairm(i, k)    !jyg
     699        zh_ql_col(i) = zh_ql_col(i) + (zcpvap*temp(i, k) - rlvtt)*ql(i, k)*zairm(i, k)   !jyg
     700        zh_qs_col(i) = zh_qs_col(i) + (zcpvap*temp(i, k) - rlstt)*qs(i, k)*zairm(i, k)   !jyg
     701      END DO
     702    END DO
     703    ! compute total air enthalpy
     704    zh_col(:) = zh_dair_col(:) + zh_qw_col(:) + zh_ql_col(:) + zh_qs_col(:)
     705
     706END SUBROUTINE integr_v
    519707
    520708SUBROUTINE prt_enerbil (text, itap)
     
    624812      write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_lsc(1), rlstt * snow_lsc(1), -(rcs-rcpd)*t_seri(1,1) * snow_lsc(1)
    625813    end if
     814  CASE("convection") specific_diag
     815    if ( prt_level .GE. 5) then
     816      write(*,9000) text,"enerbil: rain, bil_lat, bil_sens", rain_con(1), rlvtt * rain_con(1), -(rcw-rcpd)*t_seri(1,1) * rain_con(1)
     817      write(*,9000) text,"enerbil: snow, bil_lat, bil_sens", snow_con(1), rlstt * snow_con(1), -(rcs-rcpd)*t_seri(1,1) * snow_con(1)
     818    end if
    626819  END SELECT specific_diag
    627820
    628 9000 format (1x,A8,2x,A30,10E15.6)
     8219000 format (1x,A8,2x,A35,10E15.6)
    629822
    630823end if ! end if (fl_ebil .GT. 0)
  • LMDZ5/branches/testing/libf/phylmd/calwake.F90

    r2787 r2870  
    5454  ! ------
    5555  REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: dt_wake, dq_wake
    56   REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_k
     56!!jyg  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_k
     57  INTEGER, DIMENSION(klon),      INTENT (OUT)        :: wake_k
    5758  REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: wake_d_deltat_gw
    5859  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_h
  • LMDZ5/branches/testing/libf/phylmd/climb_hq_mod.F90

    r2839 r2870  
    221221!****************************************************************************************
    222222!!! jyg le 07/02/2012
    223        IF (mod(iflag_pbl_split,2) .eq.1) THEN
     223!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
     224       IF (mod(iflag_pbl_split,10) .ge.1) THEN
    224225!!! nrlmd le 02/05/2011
    225226    DO k= 1, klev
     
    240241    ENDDO
    241242!!!     
    242        ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
     243       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
    243244!!!
    244245
     
    377378
    378379!!! jyg le 07/02/2012
    379        IF (mod(iflag_pbl_split,2) .eq.1) THEN
     380!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
     381       IF (mod(iflag_pbl_split,10) .ge.1) THEN
    380382!!! nrlmd le 02/05/2011
    381383    DO i = 1, knon
     
    399401    ENDDO
    400402!!!     
    401        ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
     403       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
    402404!!!
    403405
  • LMDZ5/branches/testing/libf/phylmd/climb_wind_mod.F90

    r2408 r2870  
    172172!****************************************************************************************
    173173!!! jyg le 07/02/2012
    174        IF (mod(iflag_pbl_split,2) .eq.1) THEN
     174!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
     175       IF (mod(iflag_pbl_split,10) .ge.1) THEN
    175176!!! nrlmd le 02/05/2011
    176177    DO k= 1, klev
     
    188189    ENDDO
    189190!!!     
    190        ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
     191       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
    191192!!!
    192193
     
    308309
    309310!!! jyg le 07/02/2012
    310        IF (mod(iflag_pbl_split,2) .eq.1) THEN
     311!!jyg       IF (mod(iflag_pbl_split,2) .eq.1) THEN
     312       IF (mod(iflag_pbl_split,10) .ge.1) THEN
    311313!!! nrlmd le 02/05/2011
    312314    DO i = 1, knon
     
    326328    ENDDO
    327329!!!
    328        ENDIF  ! (mod(iflag_pbl_split,2) .eq.1)
     330       ENDIF  ! (mod(iflag_pbl_split,2) .ge.1)
    329331!!!
    330332
  • LMDZ5/branches/testing/libf/phylmd/concvl.F90

    r2839 r2870  
    1313!RomP >>>
    1414!!     .             da,phi,mp,dd_t,dd_q,lalim_conv,wght_th)
    15                   da, phi, mp, phi2, d1a, dam, sij, clw, elij, &     ! RomP
     15                  da, phi, mp, phii, d1a, dam, sij, clw, elij, &     ! RomP
    1616                  dd_t, dd_q, lalim_conv, wght_th, &                 ! RomP
    1717                  evap, ep, epmlmMm, eplaMm, &                       ! RomP
     
    8787  include "clesphys.h"
    8888
    89   INTEGER iflag_clos
    90 
    91   REAL dtime, paprs(klon, klev+1), pplay(klon, klev)
    92   INTEGER k_upper_cv
    93   REAL t(klon, klev), q(klon, klev), u(klon, klev), v(klon, klev)
    94   REAL t_wake(klon, klev), q_wake(klon, klev)
    95   REAL s_wake(klon)
    96   REAL tra(klon, klev, nbtr)
    97   INTEGER ntra
    98   REAL sig1(klon, klev), w01(klon, klev), ptop2(klon)
    99   REAL pmflxr(klon, klev+1), pmflxs(klon, klev+1)
    100   REAL Ale(klon), Alp(klon)
    101 
    102   REAL d_t(klon, klev), d_q(klon, klev), d_u(klon, klev), d_v(klon, klev)
    103   REAL dd_t(klon, klev), dd_q(klon, klev)
    104   REAL d_tra(klon, klev, nbtr)
    105   REAL rain(klon), snow(klon)
    106 
    107   INTEGER kbas(klon), ktop(klon)
    108   REAL em_ph(klon, klev+1), em_p(klon, klev)
    109   REAL upwd(klon, klev), dnwd(klon, klev), dnwdbis(klon, klev)
    110 
    111 !!       REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev)     !jyg
    112   REAL Ma(klon, klev), mip(klon, klev), Vprecip(klon, klev+1)      !jyg
    113   REAL Vprecipi(klon, klev+1)                                      !jyg
    114   REAL wght(klon, klev)                                            !RL
    115 
    116   REAL da(klon, klev), phi(klon, klev, klev), mp(klon, klev)
     89  INTEGER, INTENT(IN)                           :: iflag_clos
     90  REAL, INTENT(IN)                              :: dtime
     91  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: pplay
     92  REAL, DIMENSION(klon,klev+1), INTENT(IN)      :: paprs
     93  INTEGER,                      INTENT(IN)      :: k_upper_cv
     94  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: t, q, u, v
     95  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: t_wake, q_wake
     96  REAL, DIMENSION(klon),        INTENT(IN)      :: s_wake
     97  REAL, DIMENSION(klon,klev, nbtr),INTENT(IN)   :: tra
     98  INTEGER,                      INTENT(IN)      :: ntra
     99  REAL, DIMENSION(klon),        INTENT(IN)      :: Ale, Alp
     100!CR:test: on passe lentr et alim_star des thermiques
     101  INTEGER, DIMENSION(klon),     INTENT(IN)      :: lalim_conv
     102  REAL, DIMENSION(klon,klev),   INTENT(IN)      :: wght_th
     103
     104  REAL, DIMENSION(klon,klev),   INTENT(INOUT)   :: sig1, w01
     105
     106  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: d_t, d_q, d_u, d_v
     107  REAL, DIMENSION(klon,klev, nbtr),INTENT(OUT)  :: d_tra
     108  REAL, DIMENSION(klon),        INTENT(OUT)     :: rain, snow
     109
     110  INTEGER, DIMENSION(klon),     INTENT(OUT)     :: kbas, ktop
     111  REAL, DIMENSION(klon),        INTENT(OUT)     :: sigd
     112  REAL, DIMENSION(klon),        INTENT(OUT)     :: cbmf, plcl, plfc, wbeff
     113  REAL, DIMENSION(klon),        INTENT(OUT)     :: convoccur
     114  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: upwd, dnwd, dnwdbis
     115
     116!!       REAL Ma(klon,klev), mip(klon,klev),Vprecip(klon,klev)                    !jyg
     117  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: Ma, mip
     118  REAL, DIMENSION(klon,klev+1), INTENT(OUT)     :: Vprecip                        !jyg
     119  REAL, DIMENSION(klon),        INTENT(OUT)     :: cape, cin
     120  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: tvp
     121  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: Tconv
     122  INTEGER, DIMENSION(klon),     INTENT(OUT)     :: iflag
     123  REAL, DIMENSION(klon),        INTENT(OUT)     :: pbase, bbase
     124  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: dtvpdt1, dtvpdq1
     125  REAL, DIMENSION(klon),        INTENT(OUT)     :: dplcldt, dplcldr
     126  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: qcondc
     127  REAL, DIMENSION(klon),        INTENT(OUT)     :: wd
     128  REAL, DIMENSION(klon,klev+1), INTENT(OUT)     :: pmflxr, pmflxs
     129
     130  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: da, mp
     131  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: phi
    117132! RomP >>>
    118   REAL phi2(klon, klev, klev)
    119   REAL d1a(klon, klev), dam(klon, klev)
    120   REAL sij(klon, klev, klev), clw(klon, klev), elij(klon, klev, klev)
    121   REAL wdtrainA(klon, klev), wdtrainM(klon, klev)
    122   REAL evap(klon, klev), ep(klon, klev)
    123   REAL epmlmMm(klon, klev, klev), eplaMm(klon, klev)
     133  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: phii
     134  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: d1a, dam
     135  REAL, DIMENSION(klon,klev,klev),INTENT(OUT)   :: sij, elij
     136  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: clw
     137  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: dd_t, dd_q
     138  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: evap, ep
     139  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: eplaMm
     140  REAL, DIMENSION(klon,klev,klev), INTENT(OUT)  :: epmlmMm
     141  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: wdtrainA, wdtrainM
    124142! RomP <<<
    125   REAL cape(klon), cin(klon), tvp(klon, klev)
    126   REAL Tconv(klon, klev)
    127 
    128 !CR:test: on passe lentr et alim_star des thermiques
    129   INTEGER lalim_conv(klon)
    130   REAL wght_th(klon, klev)
    131   REAL em_sig1feed ! sigma at lower bound of feeding layer
    132   REAL em_sig2feed ! sigma at upper bound of feeding layer
    133   REAL em_wght(klev) ! weight density determining the feeding mixture
     143  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: wght                       !RL
     144  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: qtc
     145  REAL, DIMENSION(klon,klev),   INTENT(OUT)     :: sigt
     146  REAL,                         INTENT(OUT)     :: tau_cld_cv, coefw_cld_cv
     147  REAL, DIMENSION(klon),        INTENT(OUT)     :: epmax_diag                ! epmax_cape
     148
     149!
     150!  Local
     151!  ----
     152  REAL, DIMENSION(klon,klev)                    :: em_p
     153  REAL, DIMENSION(klon,klev+1)                  :: em_ph
     154  REAL                                          :: em_sig1feed ! sigma at lower bound of feeding layer
     155  REAL                                          :: em_sig2feed ! sigma at upper bound of feeding layer
     156  REAL, DIMENSION(klev)                         :: em_wght ! weight density determining the feeding mixture
     157  REAL, DIMENSION(klon,klev+1)                  :: Vprecipi                       !jyg
    134158!on enleve le save
    135159! SAVE em_sig1feed,em_sig2feed,em_wght
    136160
    137   INTEGER iflag(klon)
    138   REAL rflag(klon)
    139   REAL pbase(klon), bbase(klon)
    140   REAL dtvpdt1(klon, klev), dtvpdq1(klon, klev)
    141   REAL dplcldt(klon), dplcldr(klon)
    142   REAL qcondc(klon, klev)
    143   REAL qtc(klon, klev)
    144   REAL sigt(klon, klev)
    145   REAL wd(klon)
    146   REAL plim1(klon), plim2(klon), asupmax(klon, klev)
    147   REAL supmax0(klon), asupmaxmin(klon)
    148 
    149   REAL sigd(klon)
    150   REAL zx_t, zdelta, zx_qs, zcor
    151   REAL tau_cld_cv, coefw_cld_cv
    152   REAL epmax_diag(klon) ! epmax_cape
    153 
     161  REAL, DIMENSION(klon)                         :: rflag
     162  REAL, DIMENSION(klon)                         :: plim1, plim2
     163  REAL, DIMENSION(klon)                         :: ptop2
     164  REAL, DIMENSION(klon,klev)                    :: asupmax
     165  REAL, DIMENSION(klon)                         :: supmax0, asupmaxmin
     166  REAL                                          :: zx_t, zdelta, zx_qs, zcor
     167!
    154168!   INTEGER iflag_mix
    155169!   SAVE iflag_mix
    156   INTEGER noff, minorig
    157   INTEGER i, k, itra
    158   REAL qs(klon, klev), qs_wake(klon, klev)
    159   REAL cbmf(klon), plcl(klon), plfc(klon), wbeff(klon)
    160   REAL convoccur(klon)
     170  INTEGER                                       :: noff, minorig
     171  INTEGER                                       :: i,j, k, itra
     172  REAL, DIMENSION(klon,klev)                    :: qs, qs_wake
    161173!LF          SAVE cbmf
    162174!IM/JYG      REAL, SAVE, ALLOCATABLE :: cbmf(:)
    163175!!!$OMP THREADPRIVATE(cbmf)!
    164   REAL cbmflast(klon)
    165   INTEGER ifrst
    166   SAVE ifrst
    167   DATA ifrst/0/
    168 !$OMP THREADPRIVATE(ifrst)
     176  REAL, DIMENSION(klon)                         :: cbmflast
    169177
    170178
     
    259267  snow(:) = 0
    260268
    261 ! IF (ifrst .EQ. 0) THEN
    262 ! ifrst = 1
    263269  IF (first) THEN
    264270    first = .FALSE.
     
    293299      sigd(i) = 0.
    294300    END DO
    295   END IF !(ifrst .EQ. 0)
     301  END IF !(first)
    296302
    297303! Initialisation a chaque pas de temps
     
    393399                   kbas, ktop, &
    394400                   dtime, Ma, upwd, dnwd, dnwdbis, qcondc, wd, cape, &
    395                    da, phi, mp, phi2, d1a, dam, sij, clw, elij, &       !RomP
     401                   da, phi, mp, phii, d1a, dam, sij, clw, elij, &       !RomP
    396402                   evap, ep, epmlmMm, eplaMm, &                         !RomP
    397403                   wdtrainA, wdtrainM, &                                !RomP
     
    428434                    asupmaxmin, lalim_conv, &
    429435!AC!+!RomP+jyg
    430 !!                   da,phi,mp,phi2,d1a,dam,sij,clw,elij, &               ! RomP
     436!!                   da,phi,mp,phii,d1a,dam,sij,clw,elij, &               ! RomP
    431437!!                   evap,ep,epmlmMm,eplaMm,                              ! RomP
    432                     da, phi, mp, phi2, d1a, dam, sij, wght, &           ! RomP+RL
     438                    da, phi, mp, phii, d1a, dam, sij, wght, &           ! RomP+RL
    433439                    clw, elij, evap, ep, epmlmMm, eplaMm, &             ! RomP+RL
    434440                    wdtrainA, wdtrainM, qtc, sigt, &
  • LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90

    r2839 r2870  
    13691369    !
    13701370    !Config Key  = iflag_pbl_split
    1371     !Config Desc = binary flag: least signif bit = split vdf; next bit = split thermals
     1371    !Config Desc = decimal flag: least signif digit = split vdf; next digit = split thermals
    13721372    !Config Def  = 0
    1373     !Config Help = 0-> no splitting; 1-> vdf splitting; 2-> thermals splitting; 3-> full splitting
     1373    !Config Help = 0-> no splitting; 1-> vdf splitting; 10-> thermals splitting; 11-> full splitting
    13741374    !
    13751375    iflag_pbl_split_omp = 0
    1376     CALL getin('iflag_pbl_split',iflag_pbl_split_omp)
     1376    call getin('iflag_pbl_split',iflag_pbl_split_omp)
    13771377    !
    13781378    !Config Key  = iflag_order2_sollw
  • LMDZ5/branches/testing/libf/phylmd/cva_driver.F90

    r2787 r2870  
    3939! **************************************************************
    4040
    41   USE dimphy
    4241  USE print_control_mod, ONLY: prt_level, lunout
    4342  IMPLICIT NONE
     
    168167  INTEGER, INTENT (IN)                               :: ndp1
    169168  INTEGER, INTENT (IN)                               :: ntra
    170   INTEGER, INTENT(IN)                                :: nloc ! (nloc=klon)  pour l'instant
     169  INTEGER, INTENT(IN)                                :: nloc ! (nloc=len)  pour l'instant
    171170  INTEGER, INTENT (IN)                               :: k_upper
    172171  INTEGER, INTENT (IN)                               :: iflag_con
     
    219218  REAL, DIMENSION (len), INTENT (OUT)                :: ptop21
    220219  REAL, DIMENSION (len), INTENT (OUT)                :: sigd1
    221   REAL, DIMENSION (len, nd), INTENT (OUT)            :: ma1
    222   REAL, DIMENSION (len, nd), INTENT (OUT)            :: mip1
     220  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ma1        ! adiab. asc. mass flux (staggered grid)
     221  REAL, DIMENSION (len, nd), INTENT (OUT)            :: mip1       ! mass flux shed from adiab. ascent (extensive)
    223222! real Vprecip1(len,nd)
    224   REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecip1
    225   REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecipi1
    226   REAL, DIMENSION (len, nd), INTENT (OUT)            :: upwd1
    227   REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd1
    228   REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd01
    229   REAL, DIMENSION (len, nd), INTENT (OUT)            :: qcondc1         ! cld
     223  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecip1   ! tot precipitation flux (staggered grid)
     224  REAL, DIMENSION (len, ndp1), INTENT (OUT)          :: vprecipi1  ! ice precipitation flux (staggered grid)
     225  REAL, DIMENSION (len, nd), INTENT (OUT)            :: upwd1      ! upwd sat. mass flux (staggered grid)
     226  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd1      ! dnwd sat. mass flux (staggered grid)
     227  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dnwd01     ! unsat. mass flux (staggered grid)
     228  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qcondc1    ! max cloud condensate (intensive)  ! cld
    230229  REAL, DIMENSION (len), INTENT (OUT)                :: wd1             ! gust
    231230  REAL, DIMENSION (len), INTENT (OUT)                :: cape1
    232231  REAL, DIMENSION (len), INTENT (OUT)                :: cin1
    233   REAL, DIMENSION (len, nd), INTENT (OUT)            :: tvp1
     232  REAL, DIMENSION (len, nd), INTENT (OUT)            :: tvp1       ! Virt. temp. in the adiab. ascent
    234233
    235234!AC!
     
    237236!!      real da(len,nd),phi(len,nd,nd)
    238237!AC!
    239   REAL, DIMENSION (len, nd), INTENT (OUT)            :: ftd1
    240   REAL, DIMENSION (len, nd), INTENT (OUT)            :: fqd1
     238  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ftd1       ! Temp. tendency due to the sole unsat. drafts
     239  REAL, DIMENSION (len, nd), INTENT (OUT)            :: fqd1       ! Moist. tendency due to the sole unsat. drafts
    241240  REAL, DIMENSION (len), INTENT (OUT)                :: Plim11
    242241  REAL, DIMENSION (len), INTENT (OUT)                :: Plim21
    243   REAL, DIMENSION (len, nd), INTENT (OUT)            :: asupmax1
     242  REAL, DIMENSION (len, nd), INTENT (OUT)            :: asupmax1   ! Highest mixing fraction of mixed updraughts
    244243  REAL, DIMENSION (len), INTENT (OUT)                :: supmax01
    245244  REAL, DIMENSION (len), INTENT (OUT)                :: asupmaxmin1
    246   REAL, DIMENSION (len, nd), INTENT (OUT)            :: qtc1            ! cld
    247   REAL, DIMENSION (len, nd), INTENT (OUT)            :: sigt1           ! cld
     245  REAL, DIMENSION (len, nd), INTENT (OUT)            :: qtc1    ! in cloud water content (intensive)   ! cld
     246  REAL, DIMENSION (len, nd), INTENT (OUT)            :: sigt1   ! fract. cloud area (intensive)        ! cld
    248247
    249248! RomP >>>
    250   REAL, DIMENSION (len, nd), INTENT (OUT)            :: wdtrainA1, wdtrainM1
    251   REAL, DIMENSION (len, nd), INTENT (OUT)            :: da1, mp1
    252   REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi1
    253   REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: epmlmMm1
    254   REAL, DIMENSION (len, nd), INTENT (OUT)            :: eplaMm1
    255   REAL, DIMENSION (len, nd), INTENT (OUT)            :: evap1, ep1
    256   REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: sigij1, elij1
    257   REAL, DIMENSION (len, nd), INTENT (OUT)            :: clw1
     249  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wdtrainA1, wdtrainM1 ! precipitation sources (extensive)
     250  REAL, DIMENSION (len, nd), INTENT (OUT)            :: mp1  ! unsat. mass flux (staggered grid)
     251  REAL, DIMENSION (len, nd), INTENT (OUT)            :: da1  ! detrained mass flux of adiab. asc. air (extensive)
     252  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi1 ! mass flux of envt. air in mixed draughts (extensive)
     253  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: epmlmMm1  ! (extensive)
     254  REAL, DIMENSION (len, nd), INTENT (OUT)            :: eplaMm1   ! (extensive)
     255  REAL, DIMENSION (len, nd), INTENT (OUT)            :: evap1 ! evaporation rate in precip. downdraft. (intensive)
     256  REAL, DIMENSION (len, nd), INTENT (OUT)            :: ep1
     257  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: sigij1 ! mass fraction of env. air in mixed draughts (intensive)
     258  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: elij1! cond. water per unit mass of mixed draughts (intensive)
     259  REAL, DIMENSION (len, nd), INTENT (OUT)            :: clw1 ! cond. water per unit mass of the adiab. asc. (intensive)
    258260!JYG,RL
    259   REAL, DIMENSION (len, nd), INTENT (OUT)            :: wghti1      ! final weight of the feeding layers
     261  REAL, DIMENSION (len, nd), INTENT (OUT)            :: wghti1   ! final weight of the feeding layers (extensive)
    260262!JYG,RL
    261   REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi21
    262   REAL, DIMENSION (len, nd), INTENT (OUT)            :: d1a1, dam1
     263  REAL, DIMENSION (len, nd, nd), INTENT (OUT)        :: phi21    ! (extensive)
     264  REAL, DIMENSION (len, nd), INTENT (OUT)            :: d1a1     ! (extensive)
     265  REAL, DIMENSION (len, nd), INTENT (OUT)            :: dam1     ! (extensive)
    263266! RomP <<<
    264267  REAL, DIMENSION (len ), INTENT (OUT)               :: epmax_diag1     
     
    395398
    396399
    397   INTEGER i, k, n, il, j
     400  INTEGER i, k, il
    398401  INTEGER nword1, nword2, nword3, nword4
    399402  INTEGER icbmax
    400   INTEGER nk1(klon)
    401   INTEGER icb1(klon)
    402   INTEGER icbs1(klon)
     403  INTEGER nk1(len)
     404  INTEGER icb1(len)
     405  INTEGER icbs1(len)
    403406
    404407  LOGICAL ok_inhib ! True => possible inhibition of convection by dryness
     
    407410
    408411  REAL coef_convective(len)   ! = 1 for convective points, = 0 otherwise
    409   REAL tnk1(klon)
    410   REAL thnk1(klon)
    411   REAL qnk1(klon)
    412   REAL gznk1(klon)
    413   REAL pnk1(klon)
    414   REAL qsnk1(klon)
    415   REAL unk1(klon)
    416   REAL vnk1(klon)
    417   REAL cpnk1(klon)
    418   REAL hnk1(klon)
    419   REAL pbase1(klon)
    420   REAL buoybase1(klon)
    421 
    422   REAL lf1(klon, klev), lf1_wake(klon, klev)
    423   REAL lv1(klon, klev), lv1_wake(klon, klev)
    424   REAL cpn1(klon, klev), cpn1_wake(klon, klev)
    425   REAL tv1(klon, klev), tv1_wake(klon, klev)
    426   REAL gz1(klon, klev), gz1_wake(klon, klev)
    427   REAL hm1(klon, klev), hm1_wake(klon, klev)
    428   REAL h1(klon, klev), h1_wake(klon, klev)
    429   REAL tp1(klon, klev)
    430   REAL th1(klon, klev), th1_wake(klon, klev)
    431 
    432   REAL bid(klon, klev) ! dummy array
     412  REAL tnk1(len)
     413  REAL thnk1(len)
     414  REAL qnk1(len)
     415  REAL gznk1(len)
     416  REAL qsnk1(len)
     417  REAL unk1(len)
     418  REAL vnk1(len)
     419  REAL cpnk1(len)
     420  REAL hnk1(len)
     421  REAL pbase1(len)
     422  REAL buoybase1(len)
     423
     424  REAL lf1(len, nd), lf1_wake(len, nd)
     425  REAL lv1(len, nd), lv1_wake(len, nd)
     426  REAL cpn1(len, nd), cpn1_wake(len, nd)
     427  REAL tv1(len, nd), tv1_wake(len, nd)
     428  REAL gz1(len, nd), gz1_wake(len, nd)
     429  REAL hm1(len, nd)
     430  REAL h1(len, nd), h1_wake(len, nd)
     431  REAL tp1(len, nd)
     432  REAL th1(len, nd), th1_wake(len, nd)
     433
     434  REAL bid(len, nd) ! dummy array
    433435
    434436  INTEGER ncum
    435437
    436   INTEGER j1feed(klon)
    437   INTEGER j2feed(klon)
    438438  REAL p1feed1(len) ! pressure at lower bound of feeding layer
    439439  REAL p2feed1(len) ! pressure at upper bound of feeding layer
     
    450450!>jyg
    451451  INTEGER iflag(nloc), nk(nloc), icb(nloc)
    452   INTEGER nent(nloc, klev)
     452  INTEGER nent(nloc, nd)
    453453  INTEGER icbs(nloc)
    454454  INTEGER inb(nloc), inbis(nloc)
    455455
    456456  REAL cbmf(nloc), plcl(nloc), plfc(nloc), wbeff(nloc)
    457   REAL t(nloc, klev), q(nloc, klev), qs(nloc, klev)
    458   REAL t_wake(nloc, klev), q_wake(nloc, klev), qs_wake(nloc, klev)
     457  REAL t(nloc, nd), q(nloc, nd), qs(nloc, nd)
     458  REAL t_wake(nloc, nd), q_wake(nloc, nd), qs_wake(nloc, nd)
    459459  REAL s_wake(nloc)
    460   REAL u(nloc, klev), v(nloc, klev)
    461   REAL gz(nloc, klev), h(nloc, klev), hm(nloc, klev)
    462   REAL h_wake(nloc, klev), hm_wake(nloc, klev)
    463   REAL lv(nloc, klev), lf(nloc, klev), cpn(nloc, klev)
    464   REAL lv_wake(nloc, klev), lf_wake(nloc, klev), cpn_wake(nloc, klev)
    465   REAL p(nloc, klev), ph(nloc, klev+1), tv(nloc, klev), tp(nloc, klev)
    466   REAL tv_wake(nloc, klev)
    467   REAL clw(nloc, klev)
    468   REAL dph(nloc, klev)
    469   REAL pbase(nloc), buoybase(nloc), th(nloc, klev)
    470   REAL th_wake(nloc, klev)
    471   REAL tvp(nloc, klev)
    472   REAL sig(nloc, klev), w0(nloc, klev), ptop2(nloc)
    473   REAL hp(nloc, klev), ep(nloc, klev), sigp(nloc, klev)
    474   REAL buoy(nloc, klev)
     460  REAL u(nloc, nd), v(nloc, nd)
     461  REAL gz(nloc, nd), h(nloc, nd)
     462  REAL h_wake(nloc, nd)
     463  REAL lv(nloc, nd), lf(nloc, nd), cpn(nloc, nd)
     464  REAL lv_wake(nloc, nd), lf_wake(nloc, nd), cpn_wake(nloc, nd)
     465  REAL p(nloc, nd), ph(nloc, nd+1), tv(nloc, nd), tp(nloc, nd)
     466  REAL tv_wake(nloc, nd)
     467  REAL clw(nloc, nd)
     468  REAL dph(nloc, nd)
     469  REAL pbase(nloc), buoybase(nloc), th(nloc, nd)
     470  REAL th_wake(nloc, nd)
     471  REAL tvp(nloc, nd)
     472  REAL sig(nloc, nd), w0(nloc, nd), ptop2(nloc)
     473  REAL hp(nloc, nd), ep(nloc, nd), sigp(nloc, nd)
     474  REAL buoy(nloc, nd)
    475475  REAL cape(nloc)
    476476  REAL cin(nloc)
    477   REAL m(nloc, klev)
    478   REAL ment(nloc, klev, klev), sigij(nloc, klev, klev)
    479   REAL qent(nloc, klev, klev)
    480   REAL hent(nloc, klev, klev)
    481   REAL uent(nloc, klev, klev), vent(nloc, klev, klev)
    482   REAL ments(nloc, klev, klev), qents(nloc, klev, klev)
    483   REAL elij(nloc, klev, klev)
    484   REAL supmax(nloc, klev)
     477  REAL m(nloc, nd)
     478  REAL ment(nloc, nd, nd), sigij(nloc, nd, nd)
     479  REAL qent(nloc, nd, nd)
     480  REAL hent(nloc, nd, nd)
     481  REAL uent(nloc, nd, nd), vent(nloc, nd, nd)
     482  REAL ments(nloc, nd, nd), qents(nloc, nd, nd)
     483  REAL elij(nloc, nd, nd)
     484  REAL supmax(nloc, nd)
    485485  REAL Ale(nloc), Alp(nloc), coef_clos(nloc)
    486   REAL omega(nloc,klev)
     486  REAL omega(nloc,nd)
    487487  REAL sigd(nloc)
    488 ! real mp(nloc,klev), qp(nloc,klev), up(nloc,klev), vp(nloc,klev)
    489 ! real wt(nloc,klev), water(nloc,klev), evap(nloc,klev), ice(nloc,klev)
    490 ! real b(nloc,klev), sigd(nloc)
     488! real mp(nloc,nd), qp(nloc,nd), up(nloc,nd), vp(nloc,nd)
     489! real wt(nloc,nd), water(nloc,nd), evap(nloc,nd), ice(nloc,nd)
     490! real b(nloc,nd), sigd(nloc)
    491491! save mp,qp,up,vp,wt,water,evap,b
    492   REAL, SAVE, ALLOCATABLE :: mp(:, :), qp(:, :), up(:, :), vp(:, :)
    493   REAL, SAVE, ALLOCATABLE :: wt(:, :), water(:, :), evap(:, :)
    494   REAL, SAVE, ALLOCATABLE :: ice(:, :), fondue(:, :), b(:, :)
    495   REAL, SAVE, ALLOCATABLE :: frac(:, :), faci(:, :)
    496 !$OMP THREADPRIVATE(mp,qp,up,vp,wt,water,evap,ice,fondue,b,frac,faci)
    497   REAL ft(nloc, klev), fq(nloc, klev)
    498   REAL ftd(nloc, klev), fqd(nloc, klev)
    499   REAL fu(nloc, klev), fv(nloc, klev)
    500   REAL upwd(nloc, klev), dnwd(nloc, klev), dnwd0(nloc, klev)
    501   REAL ma(nloc, klev), mip(nloc, klev)
    502 !!  REAL tls(nloc, klev), tps(nloc, klev)                 ! unused . jyg
     492  REAL, DIMENSION(len,nd)     :: mp, qp, up, vp
     493  REAL, DIMENSION(len,nd)     :: wt, water, evap
     494  REAL, DIMENSION(len,nd)     :: ice, fondue, b
     495  REAL, DIMENSION(len,nd)     :: frac, faci
     496  REAL ft(nloc, nd), fq(nloc, nd)
     497  REAL ftd(nloc, nd), fqd(nloc, nd)
     498  REAL fu(nloc, nd), fv(nloc, nd)
     499  REAL upwd(nloc, nd), dnwd(nloc, nd), dnwd0(nloc, nd)
     500  REAL ma(nloc, nd), mip(nloc, nd)
     501!!  REAL tls(nloc, nd), tps(nloc, nd)                 ! unused . jyg
    503502  REAL qprime(nloc), tprime(nloc)
    504503  REAL precip(nloc)
    505 ! real Vprecip(nloc,klev)
    506   REAL vprecip(nloc, klev+1)
    507   REAL vprecipi(nloc, klev+1)
    508   REAL tra(nloc, klev, ntra), trap(nloc, klev, ntra)
    509   REAL ftra(nloc, klev, ntra), traent(nloc, klev, klev, ntra)
    510   REAL qcondc(nloc, klev)      ! cld
     504! real Vprecip(nloc,nd)
     505  REAL vprecip(nloc, nd+1)
     506  REAL vprecipi(nloc, nd+1)
     507  REAL tra(nloc, nd, ntra), trap(nloc, nd, ntra)
     508  REAL ftra(nloc, nd, ntra), traent(nloc, nd, nd, ntra)
     509  REAL qcondc(nloc, nd)      ! cld
    511510  REAL wd(nloc)                ! gust
    512511  REAL Plim1(nloc), plim2(nloc)
    513   REAL asupmax(nloc, klev)
     512  REAL asupmax(nloc, nd)
    514513  REAL supmax0(nloc)
    515514  REAL asupmaxmin(nloc)
     
    519518  REAL hnk(nloc), unk(nloc), vnk(nloc)
    520519
    521   REAL qtc(nloc, klev)         ! cld
    522   REAL sigt(nloc, klev)        ! cld
     520  REAL qtc(nloc, nd)         ! cld
     521  REAL sigt(nloc, nd)        ! cld
    523522 
    524523! RomP >>>
    525   REAL wdtrainA(nloc, klev), wdtrainM(nloc, klev)
     524  REAL wdtrainA(nloc, nd), wdtrainM(nloc, nd)
    526525  REAL da(len, nd), phi(len, nd, nd)
    527   REAL epmlmMm(nloc, klev, klev), eplaMm(nloc, klev)
     526  REAL epmlmMm(nloc, nd, nd), eplaMm(nloc, nd)
    528527  REAL phi2(len, nd, nd)
    529528  REAL d1a(len, nd), dam(len, nd)
     
    531530  REAL epmax_diag(nloc) ! epmax_cape
    532531
    533   LOGICAL, SAVE :: first = .TRUE.
    534 !$OMP THREADPRIVATE(first)
    535532  CHARACTER (LEN=20) :: modname = 'cva_driver'
    536533  CHARACTER (LEN=80) :: abort_message
     
    540537
    541538
    542 ! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,klev)
    543 ! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,klev)
     539! print *, 't1, t1_wake ',(k,t1(1,k),t1_wake(1,k),k=1,nd)
     540! print *, 'q1, q1_wake ',(k,q1(1,k),q1_wake(1,k),k=1,nd)
    544541
    545542! -------------------------------------------------------------------
     
    547544! -------------------------------------------------------------------
    548545
    549   IF (first) THEN
    550     ALLOCATE (mp(nloc,klev), qp(nloc,klev), up(nloc,klev))
    551     ALLOCATE (vp(nloc,klev), wt(nloc,klev), water(nloc,klev))
    552     ALLOCATE (ice(nloc,klev), fondue(nloc,klev))
    553     ALLOCATE (evap(nloc,klev), b(nloc,klev))
    554     ALLOCATE (frac(nloc,klev), faci(nloc,klev))
    555     first = .FALSE.
    556   END IF
    557546! -- set simulation flags:
    558547! (common cvflag)
     
    736725! print*, 'IFLAG1 avant cv3_feed'
    737726! print*,'len,nd',len,nd
    738 ! write(*,'(64i1)') iflag1(2:klon-1)
     727! write(*,'(64i1)') iflag1(2:len-1)
    739728
    740729        if (prt_level >= 9) &
     
    749738! print*, 'IFLAG1 apres cv3_feed'
    750739! print*,'len,nd',len,nd
    751 ! write(*,'(64i1)') iflag1(2:klon-1)
     740! write(*,'(64i1)') iflag1(2:len-1)
    752741
    753742  IF (iflag_con==4) THEN
     
    799788! print*, 'IFLAG1 apres cv3_triger'
    800789! print*,'len,nd',len,nd
    801 ! write(*,'(64i1)') iflag1(2:klon-1)
     790! write(*,'(64i1)') iflag1(2:len-1)
    802791
    803792! call dump2d(iim,jjm-1,sig1(2)
     
    828817  END DO
    829818
    830 ! print*,'klon, ncum = ',len,ncum
     819! print*,'len, ncum = ',len,ncum
    831820
    832821  IF (ncum>0) THEN
     
    944933!      END IF
    945934      IF (iflag_mix>=1) THEN
    946         CALL zilch(supmax, nloc*klev)
     935        CALL zilch(supmax, nloc*nd)
    947936        if (prt_level >= 9) &
    948937             PRINT *, 'cva_driver -> cv3p_mixing'
     
    955944
    956945      ELSE
    957         CALL zilch(supmax, nloc*klev)
     946        CALL zilch(supmax, nloc*nd)
    958947      END IF
    959948    END IF
     
    10311020                        unk, vnk, hp, tv, tvp, ep, clw, m, sig, &
    10321021                        ment, qent, uent, vent, nent, sigij, elij, ments, qents, traent)
    1033         CALL zilch(hent, nloc*klev*klev)
     1022        CALL zilch(hent, nloc*nd*nd)
    10341023      ELSE
    10351024        CALL cv3_mixscale(nloc, ncum, nd, ment, m)
  • LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h

    r2839 r2870  
    653653
    654654      modname = 'dyn1deta0 : '
    655       nmq(1)="vap"
    656       nmq(2)="cond"
    657       do iq=3,nqtot
    658         write(nmq(iq),'("tra",i1)') iq-2
    659       enddo
     655!!      nmq(1)="vap"
     656!!      nmq(2)="cond"
     657!!      do iq=3,nqtot
     658!!        write(nmq(iq),'("tra",i1)') iq-2
     659!!      enddo
     660      DO iq = 1,nqtot
     661        nmq(iq) = trim(tname(iq))
     662      ENDDO
    660663      print*,'in dyn1deta0 ',fichnom,klon,klev,nqtot
    661664      CALL open_startphy(fichnom)
     
    804807      CALL open_restartphy(fichnom)
    805808      print*,'redm1 ',fichnom,klon,klev,nqtot
    806       nmq(1)="vap"
    807       nmq(2)="cond"
    808       nmq(3)="tra1"
    809       nmq(4)="tra2"
     809!!      nmq(1)="vap"
     810!!      nmq(2)="cond"
     811!!      nmq(3)="tra1"
     812!!      nmq(4)="tra2"
     813      DO iq = 1,nqtot
     814        nmq(iq) = trim(tname(iq))
     815      ENDDO
    810816
    811817      modname = 'dyn1dredem'
  • LMDZ5/branches/testing/libf/phylmd/ener_conserv.F90

    r2839 r2870  
    11subroutine ener_conserv(klon,klev,pdtphys, &
    2  &    puo,pvo,pto,pqo,pun,pvn,ptn,pqn,dtke,masse,exner,d_t_ec)
     2 &                      puo,pvo,pto,pqo,pql0,pqs0, &
     3 &                      pun,pvn,ptn,pqn,pqln,pqsn,dtke,masse,exner,d_t_ec)
    34
    45!=============================================================
     
    1920
    2021! From module
    21 USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con,d_t_diss
     22USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs, &
     23 &                             d_u_con,d_v_con,d_t_con,d_t_diss
    2224USE phys_local_var_mod, ONLY : d_t_eva,d_t_lsc,d_q_eva,d_q_lsc
    2325USE phys_output_var_mod, ONLY : bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss
     
    3234INTEGER, INTENT(IN) :: klon,klev
    3335REAL, INTENT(IN) :: pdtphys
    34 REAL, DIMENSION(klon,klev),INTENT(IN) :: puo,pvo,pto,pqo
    35 REAL, DIMENSION(klon,klev),INTENT(IN) :: pun,pvn,ptn,pqn
    36 REAL, DIMENSION(klon,klev),INTENT(IN) :: masse,exner
    37 REAL, DIMENSION(klon,klev+1),INTENT(IN) :: dtke
    38 REAL, DIMENSION(klon,klev),INTENT(OUT) :: d_t_ec
    39       integer k,i
     36REAL, DIMENSION(klon,klev), INTENT(IN)      :: puo,pvo,pto,pqo,pql0,pqs0
     37REAL, DIMENSION(klon,klev), INTENT(IN)      :: pun,pvn,ptn,pqn,pqln,pqsn
     38REAL, DIMENSION(klon,klev), INTENT(IN)      :: masse,exner
     39REAL, DIMENSION(klon,klev+1), INTENT(IN)    :: dtke
     40!
     41REAL, DIMENSION(klon,klev), INTENT(OUT)     :: d_t_ec
    4042
    4143! Local
     44      integer k,i
    4245REAL, DIMENSION(klon,klev+1) :: fluxu,fluxv,fluxt
    4346REAL, DIMENSION(klon,klev+1) :: dddu,dddv,dddt
     
    5659   DO k = 1, klev
    5760   DO i = 1, klon
    58       ZRCPD = RCPD*(1.0+RVTMP2*pqn(i,k))
     61      ZRCPD = RCPD*(1.0+RVTMP2*(pqn(i,k)+pqln(i,k)+pqsn(i,k)))
    5962      d_t_ec(i,k)=0.5/ZRCPD &
    6063 &      *(puo(i,k)**2+pvo(i,k)**2-pun(i,k)**2-pvn(i,k)**2)
  • LMDZ5/branches/testing/libf/phylmd/iophy.F90

    r2669 r2870  
    4545
    4646  SUBROUTINE init_iophy_new(rlat,rlon)
    47   USE dimphy, only: klon
    48   USE mod_phys_lmdz_para, only: gather, bcast, &
     47  USE dimphy, ONLY: klon
     48  USE mod_phys_lmdz_para, ONLY: gather, bcast, &
    4949                                jj_nb, jj_begin, jj_end, ii_begin, ii_end, &
    5050                                mpi_size, mpi_rank, klon_mpi, &
    5151                                is_sequential, is_south_pole_dyn
    52   USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo
     52  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo
    5353  USE print_control_mod, ONLY: prt_level,lunout
    5454#ifdef CPP_IOIPSL
    55   USE ioipsl, only: flio_dom_set
    56 #endif
    57 #ifdef CPP_XIOS
    58   use wxios, only: wxios_domain_param
     55  USE ioipsl, ONLY: flio_dom_set
     56#endif
     57#ifdef CPP_XIOS
     58  USE wxios, ONLY: wxios_domain_param
    5959#endif
    6060  IMPLICIT NONE
     
    136136    ELSE
    137137        data_ibegin = ii_begin - 1
    138     END IF
     138    ENDIF
    139139
    140140    IF (mpi_rank == mpi_size-1) THEN
     
    142142    ELSE
    143143        data_iend = ii_end + 1
    144     END IF
    145 
    146     if (prt_level>=10) then
     144    ENDIF
     145
     146    IF (prt_level>=10) THEN
    147147      write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," iibegin=",ii_begin , " ii_end=",ii_end," jjbegin=",jj_begin," jj_nb=",jj_nb," jj_end=",jj_end
    148148      write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," nbp_lon=",nbp_lon," nbp_lat=",nbp_lat
     
    150150      write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," data_ibegin=",data_ibegin," data_iend=",data_iend
    151151      write(lunout,*) "init_iophy_new: mpirank=",mpi_rank," is_south_pole=",is_south_pole_dyn
    152     endif
     152    ENDIF
    153153
    154154    ! Initialize the XIOS domain coreesponding to this process:
     
    163163
    164164  SUBROUTINE init_iophy(lat,lon)
    165   USE mod_phys_lmdz_para, only: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
     165  USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
    166166                                mpi_size, mpi_rank
    167   USE ioipsl, only: flio_dom_set
     167  USE ioipsl, ONLY: flio_dom_set
    168168  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    169169  IMPLICIT NONE
     
    180180
    181181!$OMP MASTER 
    182     allocate(io_lat(nbp_lat))
     182    ALLOCATE(io_lat(nbp_lat))
    183183    io_lat(:)=lat(:)
    184     allocate(io_lon(nbp_lon))
     184    ALLOCATE(io_lon(nbp_lon))
    185185    io_lon(:)=lon(:)
    186186   
     
    191191    dpl=(/ nbp_lon, jj_end /)
    192192    dhs=(/ ii_begin-1,0 /)
    193     if (mpi_rank==mpi_size-1) then
     193    IF (mpi_rank==mpi_size-1) THEN
    194194      dhe=(/0,0/)
    195     else
     195    ELSE
    196196      dhe=(/ nbp_lon-ii_end,0 /) 
    197     endif
     197    ENDIF
    198198   
    199199#ifndef CPP_IOIPSL_NO_OUTPUT
     
    203203!$OMP END MASTER
    204204     
    205   end SUBROUTINE init_iophy
     205  END SUBROUTINE init_iophy
    206206
    207207 SUBROUTINE histbeg_phyxios(name,itau0,zjulian,dtime,ffreq,lev,nhori,nid_day)
    208208!  USE dimphy
    209   USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, &
     209  USE mod_phys_lmdz_para, ONLY: is_sequential, is_using_mpi, is_mpi_root, &
    210210                                jj_begin, jj_end, jj_nb
    211211  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    212   use ioipsl, only: histbeg
    213 #ifdef CPP_XIOS
    214   use wxios, only: wxios_add_file
     212  USE ioipsl, ONLY: histbeg
     213#ifdef CPP_XIOS
     214  USE wxios, ONLY: wxios_add_file
    215215#endif
    216216  IMPLICIT NONE
    217217  include 'clesphys.h'
    218218   
    219     character*(*), INTENT(IN) :: name
    220     integer, INTENT(IN) :: itau0
     219    CHARACTER*(*), INTENT(IN) :: name
     220    INTEGER, INTENT(IN) :: itau0
    221221    REAL,INTENT(IN) :: zjulian
    222222    REAL,INTENT(IN) :: dtime
    223     character(LEN=*), INTENT(IN) :: ffreq
     223    CHARACTER(LEN=*), INTENT(IN) :: ffreq
    224224    INTEGER,INTENT(IN) :: lev
    225     integer,intent(out) :: nhori
    226     integer,intent(out) :: nid_day
     225    INTEGER,INTENT(OUT) :: nhori
     226    INTEGER,INTENT(OUT) :: nid_day
    227227
    228228!$OMP MASTER   
    229     if (is_sequential) then
     229    IF (is_sequential) THEN
    230230      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    231231                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    232     else
     232    ELSE
    233233      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    234234                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    235     endif
     235    ENDIF
    236236
    237237#ifdef CPP_XIOS
     
    242242        CALL wxios_add_file(name, ffreq, lev)
    243243      ENDIF
    244     END IF
     244    ENDIF
    245245#endif
    246246!$OMP END MASTER
     
    250250  SUBROUTINE histbeg_phy(name,itau0,zjulian,dtime,nhori,nid_day)
    251251
    252   USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential
     252  USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, jj_nb, is_sequential
    253253  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    254   use ioipsl, only: histbeg
     254  USE ioipsl, ONLY: histbeg
    255255
    256256  IMPLICIT NONE
    257257   
    258     character*(*), INTENT(IN) :: name
    259     integer, INTENT(IN) :: itau0
     258    CHARACTER*(*), INTENT(IN) :: name
     259    INTEGER, INTENT(IN) :: itau0
    260260    REAL,INTENT(IN) :: zjulian
    261261    REAL,INTENT(IN) :: dtime
    262     integer,intent(out) :: nhori
    263     integer,intent(out) :: nid_day
     262    INTEGER,INTENT(OUT) :: nhori
     263    INTEGER,INTENT(OUT) :: nid_day
    264264
    265265!$OMP MASTER   
    266266#ifndef CPP_IOIPSL_NO_OUTPUT
    267     if (is_sequential) then
     267    IF (is_sequential) THEN
    268268      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    269269                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    270     else
     270    ELSE
    271271      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    272272                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    273     endif
     273    ENDIF
    274274#endif
    275275!$OMP END MASTER
     
    281281             plon,plat,plon_bounds,plat_bounds, &
    282282             nname,itau0,zjulian,dtime,nnhori,nnid_day)
    283   USE dimphy, only: klon
    284   USE mod_phys_lmdz_para, only: gather, bcast, &
     283  USE dimphy, ONLY: klon
     284  USE mod_phys_lmdz_para, ONLY: gather, bcast, &
    285285                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    286286                                mpi_rank
    287   USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat
    288   use ioipsl, only: histbeg
     287  USE mod_grid_phy_lmdz, ONLY: klon_glo, nbp_lon, nbp_lat
     288  USE ioipsl, ONLY: histbeg
    289289
    290290  IMPLICIT NONE
     
    292292    REAL,DIMENSION(klon),INTENT(IN) :: rlon
    293293    REAL,DIMENSION(klon),INTENT(IN) :: rlat
    294     integer, INTENT(IN) :: itau0
     294    INTEGER, INTENT(IN) :: itau0
    295295    REAL,INTENT(IN) :: zjulian
    296296    REAL,INTENT(IN) :: dtime
    297     integer, INTENT(IN) :: pim
    298     integer, intent(out) :: nnhori
    299     character(len=20), INTENT(IN) :: nname
    300     INTEGER, intent(out) :: nnid_day
    301     integer :: i
     297    INTEGER, INTENT(IN) :: pim
     298    INTEGER, intent(out) :: nnhori
     299    CHARACTER(len=20), INTENT(IN) :: nname
     300    INTEGER, INTENT(OUT) :: nnid_day
     301    INTEGER :: i
    302302    REAL,DIMENSION(klon_glo)        :: rlat_glo
    303303    REAL,DIMENSION(klon_glo)        :: rlon_glo
     
    328328     plon_bounds(i,1)=rlon_glo(tabij(i)-1)
    329329     plon_bounds(i,2)=rlon_glo(tabij(i)+1)
    330      if(plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN
    331       if(rlon_glo(tabij(i)).GE.0.) THEN
     330     IF (plon_bounds(i,2).LE.0..AND.plon_bounds(i,1).GE.0.) THEN
     331      IF (rlon_glo(tabij(i)).GE.0.) THEN
    332332       plon_bounds(i,2)=-1*plon_bounds(i,2)
    333       endif
    334      endif
    335      if(plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN
    336       if(rlon_glo(tabij(i)).LE.0.) THEN
     333      ENDIF
     334     ENDIF
     335     IF (plon_bounds(i,2).GE.0..AND.plon_bounds(i,1).LE.0.) THEN
     336      IF (rlon_glo(tabij(i)).LE.0.) THEN
    337337       plon_bounds(i,2)=-1*plon_bounds(i,2)
    338       endif
    339      endif
     338      ENDIF
     339     ENDIF
    340340!
    341341     IF ( tabij(i).LE.nbp_lon) THEN
     
    361361
    362362       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon)
    363        if ((nbp_lon*nbp_lat).gt.1) then
     363       IF ((nbp_lon*nbp_lat).GT.1) THEN
    364364       DO i = 1, nbp_lon
    365365         zx_lon(i,1) = rlon_glo(i+1)
    366366         zx_lon(i,nbp_lat) = rlon_glo(i+1)
    367367       ENDDO
    368        endif
     368       ENDIF
    369369       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat)
    370370
     
    375375     plon_bounds(i,2)=zx_lon(ipt(i)+1,jpt(i))
    376376
    377      if (ipt(i).EQ.1) then
     377     IF (ipt(i).EQ.1) THEN
    378378      plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i))
    379379      plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i))
    380      endif
     380     ENDIF
    381381 
    382      if (ipt(i).EQ.nbp_lon) then
     382     IF (ipt(i).EQ.nbp_lon) THEN
    383383      plon_bounds(i,2)=360.+zx_lon(1,jpt(i))
    384      endif
     384     ENDIF
    385385
    386386     plat_bounds(i,1)=zx_lat(ipt(i),jpt(i)-1)
    387387     plat_bounds(i,2)=zx_lat(ipt(i),jpt(i)+1)
    388388
    389      if (jpt(i).EQ.1) then
     389     IF (jpt(i).EQ.1) THEN
    390390      plat_bounds(i,1)=zx_lat(ipt(i),1)+0.001
    391391      plat_bounds(i,2)=zx_lat(ipt(i),1)-0.001
    392      endif
     392     ENDIF
    393393 
    394      if (jpt(i).EQ.nbp_lat) then
     394     IF (jpt(i).EQ.nbp_lat) THEN
    395395      plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001
    396396      plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001
    397      endif
     397     ENDIF
    398398!
    399399!    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon(tabij(i)),plon_bounds(i,2)
     
    407407                           itau0, zjulian, dtime, nnhori, nnid_day)
    408408#endif
    409     else
     409    ELSE
    410410     npproc=0
    411411     DO ip=1, pim
     
    448448                            itau0,zjulian,dtime,nnhori,nnid_day,phys_domain_id)
    449449#endif
    450     endif
     450    ENDIF
    451451!$OMP END MASTER
    452452
    453   end SUBROUTINE histbeg_phy_points
     453  END SUBROUTINE histbeg_phy_points
    454454
    455455
    456456  SUBROUTINE histdef2d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar)
    457457
    458     USE ioipsl, only: histdef
    459     USE mod_phys_lmdz_para, only: jj_nb
    460     use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, &
    461                                    nid_files, nhorim, swaero_diag, nfiles
     458    USE ioipsl, ONLY: histdef
     459    USE mod_phys_lmdz_para, ONLY: jj_nb
     460    USE phys_output_var_mod, ONLY: type_ecri, zoutm, zdtime_moy, lev_files, &
     461                                   nid_files, nhorim, swaero_diag, dryaod_diag, nfiles
    462462    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     463    USE aero_mod, ONLY : naero_tot, name_aero_tau
     464
    463465    IMPLICIT NONE
    464466
     
    466468
    467469    INTEGER                          :: iff
     470    INTEGER                          :: naero
    468471    LOGICAL                          :: lpoint
    469472    INTEGER, DIMENSION(nfiles)       :: flag_var
    470     CHARACTER(LEN=20)                 :: nomvar
     473    CHARACTER(LEN=20)                :: nomvar
    471474    CHARACTER(LEN=*)                 :: titrevar
    472475    CHARACTER(LEN=*)                 :: unitvar
     
    498501
    499502    ! Set swaero_diag=true if at least one of the concerned variables are defined
    500     IF (nomvar=='topswad' .OR. nomvar=='topswai' .OR. nomvar=='solswad' .OR. nomvar=='solswai' ) THEN
    501        IF  ( flag_var(iff)<=lev_files(iff) ) THEN
    502           swaero_diag=.TRUE.
    503        END IF
    504     END IF
     503    IF (nomvar=='topswad' .OR. nomvar=='topswad0' .OR. nomvar=='solswad' .OR. nomvar=='solswad0' .OR. &
     504        nomvar=='toplwad' .OR. nomvar=='toplwad0' .OR. nomvar=='sollwad' .OR. nomvar=='sollwad0' .OR. &
     505        nomvar=='topswai' .OR. nomvar=='solswai' ) THEN
     506       IF  ( flag_var(iff)<=lev_files(iff) ) swaero_diag=.TRUE.
     507    ENDIF
     508
     509    ! Set dryaod_diag=true if at least one of the concerned variables are defined
     510    IF (nomvar=='dryod550aer') THEN
     511      IF  ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
     512    ENDIF
     513    DO naero = 1, naero_tot-1
     514      IF (nomvar=='dryod550_'//name_aero_tau(naero)) THEN
     515        IF  ( flag_var(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
     516      ENDIF
     517    ENDDO
     518
    505519  END SUBROUTINE histdef2d_old
    506520
    507 
    508 
    509521  SUBROUTINE histdef3d_old (iff,lpoint,flag_var,nomvar,titrevar,unitvar)
    510522
    511     USE ioipsl, only: histdef
    512     USE dimphy, only: klev
    513     USE mod_phys_lmdz_para, only: jj_nb
    514     use phys_output_var_mod, only: type_ecri, zoutm, lev_files, nid_files, &
     523    USE ioipsl, ONLY: histdef
     524    USE dimphy, ONLY: klev
     525    USE mod_phys_lmdz_para, ONLY: jj_nb
     526    USE phys_output_var_mod, ONLY: type_ecri, zoutm, lev_files, nid_files, &
    515527                                   nhorim, zdtime_moy, levmin, levmax, &
    516528                                   nvertm, nfiles
     
    555567  END SUBROUTINE histdef3d_old
    556568
    557 
    558 
    559 
    560 
    561 
    562 
    563 
    564569  SUBROUTINE histdef2d (iff,var)
    565570
    566     USE ioipsl, only: histdef
    567     USE mod_phys_lmdz_para, only: jj_nb
    568     use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
     571    USE ioipsl, ONLY: histdef
     572    USE mod_phys_lmdz_para, ONLY: jj_nb
     573    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
    569574                                   clef_stations, phys_out_filenames, lev_files, &
    570                                    nid_files, nhorim, swaero_diag
     575                                   nid_files, nhorim, swaero_diag, dryaod_diag
    571576    USE print_control_mod, ONLY: prt_level,lunout
    572577    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    573 #ifdef CPP_XIOS
    574     use wxios, only: wxios_add_field_to_file
     578    USE aero_mod, ONLY : naero_tot, name_aero_tau
     579#ifdef CPP_XIOS
     580    USE wxios, ONLY: wxios_add_field_to_file
    575581#endif
    576582    IMPLICIT NONE
     
    579585
    580586    INTEGER                          :: iff
     587    INTEGER                          :: naero
    581588    TYPE(ctrl_out)                   :: var
    582589
    583590    REAL zstophym
    584591    CHARACTER(LEN=20) :: typeecrit
    585 
    586592
    587593    ! ug On récupère le type écrit de la structure:
     
    638644    ENDIF
    639645
    640     ! Set swaero_diag=true if at least one of the concerned variables are
    641     ! defined
     646    ! Set swaero_diag=true if at least one of the concerned variables are defined
    642647    !--OB 30/05/2016 use wider set of variables
    643648    IF ( var%name=='topswad' .OR. var%name=='topswad0' .OR. var%name=='solswad' .OR. var%name=='solswad0' .OR. &
     
    645650         var%name=='toplwad' .OR. var%name=='toplwad0' .OR. var%name=='sollwad' .OR. var%name=='sollwad0' .OR. &
    646651         var%name=='toplwai' .OR. var%name=='sollwai'  ) ) ) THEN
    647        IF  ( var%flag(iff)<=lev_files(iff) ) THEN
    648           swaero_diag=.TRUE.
    649        END IF
    650     END IF
     652       IF  ( var%flag(iff)<=lev_files(iff) ) swaero_diag=.TRUE.
     653    ENDIF
     654
     655    ! set dryaod_dry=true if at least one of the concerned variables are defined
     656    IF (var%name=='dryod550aer') THEN
     657      IF  ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
     658    ENDIF
     659    !
     660    DO naero = 1, naero_tot-1
     661      IF (var%name=='dryod550_'//name_aero_tau(naero)) THEN
     662        IF  ( var%flag(iff)<=lev_files(iff) ) dryaod_diag=.TRUE.
     663      ENDIF
     664    ENDDO
    651665  END SUBROUTINE histdef2d
    652666
    653667  SUBROUTINE histdef3d (iff,var)
    654668
    655     USE ioipsl, only: histdef
    656     USE dimphy, only: klev
    657     USE mod_phys_lmdz_para, only: jj_nb
    658     use phys_output_var_mod, only: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
     669    USE ioipsl, ONLY: histdef
     670    USE dimphy, ONLY: klev
     671    USE mod_phys_lmdz_para, ONLY: jj_nb
     672    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
    659673                                   clef_stations, phys_out_filenames, lev_files, &
    660                                    nid_files, nhorim, swaero_diag, levmin, &
     674                                   nid_files, nhorim, swaero_diag, dryaod_diag, levmin, &
    661675                                   levmax, nvertm
    662676    USE print_control_mod, ONLY: prt_level,lunout
    663677    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    664678#ifdef CPP_XIOS
    665     use wxios, only: wxios_add_field_to_file
     679    USE wxios, ONLY: wxios_add_field_to_file
    666680#endif
    667681    IMPLICIT NONE
     
    735749!!! Lecture des noms et niveau de sortie des variables dans output.def
    736750    !   en utilisant les routines getin de IOIPSL 
    737     use ioipsl, only: getin
    738     use phys_output_var_mod, only: nfiles
     751    USE ioipsl, ONLY: getin
     752    USE phys_output_var_mod, ONLY: nfiles
    739753    USE print_control_mod, ONLY: prt_level,lunout
    740754    IMPLICIT NONE
     
    750764  END SUBROUTINE conf_physoutputs
    751765
    752 
    753766 
    754767  SUBROUTINE histwrite2d_phy_old(nid,lpoint,name,itau,field)
    755   USE dimphy, only: klon
    756   USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &
     768  USE dimphy, ONLY: klon
     769  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
    757770                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    758771                                jj_nb, klon_mpi
    759   USE ioipsl, only: histwrite
     772  USE ioipsl, ONLY: histwrite
    760773  USE print_control_mod, ONLY: prt_level,lunout
    761774  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    762775  IMPLICIT NONE
    763776   
    764     integer,INTENT(IN) :: nid
    765     logical,INTENT(IN) :: lpoint
    766     character*(*), INTENT(IN) :: name
    767     integer, INTENT(IN) :: itau
     777    INTEGER,INTENT(IN) :: nid
     778    LOGICAL,INTENT(IN) :: lpoint
     779    CHARACTER*(*), INTENT(IN) :: name
     780    INTEGER, INTENT(IN) :: itau
    768781    REAL,DIMENSION(:),INTENT(IN) :: field
    769782    REAL,DIMENSION(klon_mpi) :: buffer_omp
     
    771784    REAL :: Field2d(nbp_lon,jj_nb)
    772785
    773     integer :: ip
    774     REAL,allocatable,DIMENSION(:) :: fieldok
    775 
     786    INTEGER :: ip
     787    REAL,ALLOCATABLE,DIMENSION(:) :: fieldok
    776788
    777789    IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
     
    786798     CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d)
    787799     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    788     else
     800    ELSE
    789801     ALLOCATE(fieldok(npstn))
    790802     ALLOCATE(index2d(npstn))
    791803
    792      if(is_sequential) then
     804     IF (is_sequential) THEN
    793805!     klon_mpi_begin=1
    794806!     klon_mpi_end=klon
     
    796808       fieldok(ip)=buffer_omp(nptabij(ip))
    797809      ENDDO
    798      else
     810     ELSE
    799811      DO ip=1, npstn
    800812!     print*,'histwrite2d is_sequential npstn ip name nptabij',npstn,ip,name,nptabij(ip)
     
    804816       ENDIF
    805817      ENDDO
    806      endif
     818     ENDIF
    807819     IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
    808820     CALL histwrite(nid,name,itau,fieldok,npstn,index2d)
    809821     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    810822!
    811     endif
    812     deallocate(index2d)
    813     deallocate(fieldok)
     823    ENDIF
     824    DEALLOCATE(index2d)
     825    DEALLOCATE(fieldok)
    814826!$OMP END MASTER   
    815827
    816828 
    817   end SUBROUTINE histwrite2d_phy_old
     829  END SUBROUTINE histwrite2d_phy_old
    818830
    819831  SUBROUTINE histwrite3d_phy_old(nid,lpoint,name,itau,field)
    820   USE dimphy, only: klon
    821   USE mod_phys_lmdz_para, only: Gather_omp, grid1Dto2D_mpi, &
     832  USE dimphy, ONLY: klon
     833  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
    822834                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    823835                                jj_nb, klon_mpi
    824836  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    825   use ioipsl, only: histwrite
     837  USE ioipsl, ONLY: histwrite
    826838  USE print_control_mod, ONLY: prt_level,lunout
    827839  IMPLICIT NONE
    828840   
    829     integer,INTENT(IN) :: nid
    830     logical,INTENT(IN) :: lpoint
    831     character*(*), INTENT(IN) :: name
    832     integer, INTENT(IN) :: itau
     841    INTEGER,INTENT(IN) :: nid
     842    LOGICAL,INTENT(IN) :: lpoint
     843    CHARACTER*(*), INTENT(IN) :: name
     844    INTEGER, INTENT(IN) :: itau
    833845    REAL,DIMENSION(:,:),INTENT(IN) :: field  ! --> field(klon,:)
    834846    REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp
     
    845857!$OMP MASTER
    846858    CALL grid1Dto2D_mpi(buffer_omp,field3d)
    847     if(.NOT.lpoint) THEN
     859    IF (.NOT.lpoint) THEN
    848860     ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
    849861     ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
     
    851863     CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
    852864     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    853    else
     865   ELSE
    854866      nlev=size(field,2)
    855867      ALLOCATE(index3d(npstn*nlev))
    856868      ALLOCATE(fieldok(npstn,nlev))
    857869
    858       if(is_sequential) then
     870      IF (is_sequential) THEN
    859871!      klon_mpi_begin=1
    860872!      klon_mpi_end=klon
     
    864876       ENDDO
    865877       ENDDO
    866       else
     878      ELSE
    867879       DO n=1, nlev
    868880       DO ip=1, npstn
     
    873885       ENDDO
    874886       ENDDO
    875       endif
     887      ENDIF
    876888      IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
    877889      CALL histwrite(nid,name,itau,fieldok,npstn*nlev,index3d)
    878890      IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    879     endif
    880   deallocate(index3d)
    881   deallocate(fieldok)
     891    ENDIF
     892  DEALLOCATE(index3d)
     893  DEALLOCATE(fieldok)
    882894!$OMP END MASTER   
    883895
    884   end SUBROUTINE histwrite3d_phy_old
     896  END SUBROUTINE histwrite3d_phy_old
    885897
    886898
     
    889901! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    890902  SUBROUTINE histwrite2d_phy(var,field, STD_iff)
    891   USE dimphy, only: klon
    892   USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &
     903  USE dimphy, ONLY: klon
     904  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
    893905                                jj_nb, klon_mpi, klon_mpi_begin, &
    894906                                klon_mpi_end, is_sequential
    895   USE ioipsl, only: histwrite
    896   use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &
     907  USE ioipsl, ONLY: histwrite
     908  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
    897909                                 nfiles, vars_defined, clef_stations, &
    898910                                 nid_files
     
    900912  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    901913#ifdef CPP_XIOS
    902   USE xios, only: xios_send_field
     914  USE xios, ONLY: xios_send_field
    903915#endif
    904916
     
    932944            iff_beg = 1
    933945            iff_end = nfiles
    934       END IF
     946      ENDIF
    935947
    936948  ! On regarde si on est dans la phase de définition ou d'écriture:
    937   IF(.NOT.vars_defined) THEN
     949  IF (.NOT.vars_defined) THEN
    938950!$OMP MASTER
    939951      !Si phase de définition.... on définit
    940952      IF (.not. ok_all_xml) THEN
    941       if (prt_level >= 10) then
    942       write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", &
    943                      trim(var%name)
    944       endif
     953      IF (prt_level >= 10) THEN
     954      WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", trim(var%name)
     955      ENDIF
    945956      DO iff=iff_beg, iff_end
    946957         IF (clef_files(iff)) THEN
     
    955966    IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
    956967   
    957     if (prt_level >= 10) then
    958       write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", &
    959                      trim(var%name)
    960     endif
     968    IF (prt_level >= 10) THEn
     969      WRITE (lunout,*)"histwrite2d_phy: .not.vars_defined ; time to gather and write ", trim(var%name)
     970    ENDIF
    961971   
    962972    CALL Gather_omp(field,buffer_omp)
     
    969979      IF (ok_all_xml) THEN
    970980#ifdef CPP_XIOS
    971           if (prt_level >= 10) then
    972              write(lunout,*)'Dans iophy histwrite2D,var%name ',&
    973                              trim(var%name)                       
    974           endif
     981          IF (prt_level >= 10) THEN
     982             write(lunout,*)'Dans iophy histwrite2D,var%name ', trim(var%name)                       
     983          ENDIF
    975984          CALL xios_send_field(var%name, Field2d)
    976           if (prt_level >= 10) then
    977              write(lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ',&
    978                              trim(var%name)                       
    979           endif
     985          IF (prt_level >= 10) THEN
     986             WRITE (lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ', trim(var%name)                       
     987          ENDIF
    980988#else
    981989        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     
    987995#ifdef CPP_XIOS
    988996               IF (firstx) THEN
    989                   if (prt_level >= 10) then
    990                      write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',&
    991                                     iff,trim(var%name)                       
    992                      write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field"
    993                   endif
     997                  IF (prt_level >= 10) THEN
     998                     WRITE (lunout,*)'Dans iophy histwrite2D,iff,var%name ', iff,trim(var%name)                       
     999                     WRITE (lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field"
     1000                  ENDIF
    9941001                  CALL xios_send_field(var%name, Field2d)
    9951002                  firstx=.false.
     
    9971004#endif
    9981005
    999                   IF(.NOT.clef_stations(iff)) THEN
     1006                  IF (.NOT.clef_stations(iff)) THEN
    10001007                        ALLOCATE(index2d(nbp_lon*jj_nb))
    10011008                        ALLOCATE(fieldok(nbp_lon*jj_nb))
     
    10291036                       ENDIF ! of IF (is_sequential)
    10301037#ifndef CPP_IOIPSL_NO_OUTPUT
    1031                        if (prt_level >= 10) then
     1038                       IF (prt_level >= 10) THEn
    10321039                         write(lunout,*)"histwrite2d_phy: clef_stations(iff) and iff==iff_beg, call wxios_write_2D"
    1033                        endif
     1040                       ENDIF
    10341041                       CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn,index2d)
    10351042#endif
    10361043                  ENDIF ! of IF(.NOT.clef_stations(iff))
    10371044                 
    1038                 deallocate(index2d)
    1039                 deallocate(fieldok)
     1045                DEALLOCATE(index2d)
     1046                DEALLOCATE(fieldok)
    10401047            ENDIF !levfiles
    10411048        ENDDO ! of DO iff=iff_beg, iff_end
     
    10491056! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    10501057  SUBROUTINE histwrite3d_phy(var, field, STD_iff)
    1051   USE dimphy, only: klon, klev
    1052   USE mod_phys_lmdz_para, only: gather_omp, grid1dto2d_mpi, &
     1058  USE dimphy, ONLY: klon, klev
     1059  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
    10531060                                jj_nb, klon_mpi, klon_mpi_begin, &
    10541061                                klon_mpi_end, is_sequential
    1055   USE ioipsl, only: histwrite
    1056   use phys_output_var_mod, only: ctrl_out, clef_files, lev_files, &
     1062  USE ioipsl, ONLY: histwrite
     1063  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
    10571064                                 nfiles, vars_defined, clef_stations, &
    10581065                                 nid_files
    10591066  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    10601067#ifdef CPP_XIOS
    1061   USE xios, only: xios_send_field
     1068  USE xios, ONLY: xios_send_field
    10621069#endif
    10631070  USE print_control_mod, ONLY: prt_level,lunout
     
    10881095            iff_beg = 1
    10891096            iff_end = nfiles
    1090       END IF
     1097      ENDIF
    10911098
    10921099  ! On regarde si on est dans la phase de définition ou d'écriture:
     
    11041111    IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    11051112    nlev=SIZE(field,2)
    1106     if (nlev.eq.klev+1) then
     1113    IF (nlev.EQ.klev+1) THEN
    11071114        nlevx=klev
    1108     else
     1115    ELSE
    11091116        nlevx=nlev
    1110     endif
     1117    ENDIF
    11111118
    11121119    CALL Gather_omp(field,buffer_omp)
     
    11201127      IF (ok_all_xml) THEN
    11211128#ifdef CPP_XIOS
    1122           if (prt_level >= 10) then
     1129          IF (prt_level >= 10) THEN
    11231130             write(lunout,*)'Dans iophy histwrite3D,var%name ',&
    11241131                             trim(var%name)                       
    1125           endif
     1132          ENDIF
    11261133          CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
    11271134#else
     
    11351142#ifdef CPP_XIOS
    11361143              IF (firstx) THEN
    1137                 if (prt_level >= 10) then
    1138                   write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &
     1144                IF (prt_level >= 10) THEn
     1145                  WRITE (lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', &
    11391146                                  iff,nlev,klev, firstx                       
    1140                   write(lunout,*)'histwrite3d_phy: call xios_send_field for ', &
     1147                  WRITE (lunout,*)'histwrite3d_phy: call xios_send_field for ', &
    11411148                                  trim(var%name), ' with iim jjm nlevx = ', &
    11421149                                  nbp_lon,jj_nb,nlevx
    1143                 endif
     1150                ENDIF
    11441151                CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
    11451152                            firstx=.false.
     
    11851192#endif
    11861193                  ENDIF
    1187                   deallocate(index3d)
    1188                   deallocate(fieldok)
     1194                  DEALLOCATE(index3d)
     1195                  DEALLOCATE(fieldok)
    11891196            ENDIF
    11901197      ENDDO
     
    11991206#ifdef CPP_XIOS
    12001207  SUBROUTINE histwrite2d_xios(field_name,field)
    1201   USE dimphy, only: klon
    1202   USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &
     1208  USE dimphy, ONLY: klon
     1209  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
    12031210                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    12041211                                jj_nb, klon_mpi
    12051212  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    1206   USE xios, only: xios_send_field
     1213  USE xios, ONLY: xios_send_field
    12071214  USE print_control_mod, ONLY: prt_level,lunout
    12081215
     
    12591266    ENDIF
    12601267                 
    1261     deallocate(index2d)
    1262     deallocate(fieldok)
     1268    DEALLOCATE(index2d)
     1269    DEALLOCATE(fieldok)
    12631270!$OMP END MASTER   
    12641271
     
    12691276! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    12701277  SUBROUTINE histwrite3d_xios(field_name, field)
    1271   USE dimphy, only: klon, klev
    1272   USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, &
     1278  USE dimphy, ONLY: klon, klev
     1279  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
    12731280                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    12741281                                jj_nb, klon_mpi
    1275   USE xios, only: xios_send_field
     1282  USE xios, ONLY: xios_send_field
    12761283  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    12771284  USE print_control_mod, ONLY: prt_level,lunout
     
    13301337        ENDIF
    13311338    ENDIF
    1332     deallocate(index3d)
    1333     deallocate(fieldok)
     1339    DEALLOCATE(index3d)
     1340    DEALLOCATE(fieldok)
    13341341!$OMP END MASTER   
    13351342
     
    13391346#ifdef CPP_XIOS
    13401347  SUBROUTINE histwrite0d_xios(field_name, field)
    1341   USE xios, only: xios_send_field
     1348  USE xios, ONLY: xios_send_field
    13421349  IMPLICIT NONE
    13431350
  • LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90

    r2720 r2870  
    66! Planetary Boundary Layer and Surface module
    77!
    8 ! This module manage the calculation of turbulent diffusion in the boundary layer
     8! This module manages the calculation of turbulent diffusion in the boundary layer
    99! and all interactions towards the differents sub-surfaces.
    1010!
     
    778778      IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap
    779779!
    780       iflag_split = mod(iflag_pbl_split,2)
     780!!jyg      iflag_split = mod(iflag_pbl_split,2)
     781      iflag_split = mod(iflag_pbl_split,10)
    781782
    782783!****************************************************************************************
     
    12391240        ENDDO
    12401241!
    1241        IF (iflag_split .eq.1) THEN
     1242       IF (iflag_split .ge.1) THEN
    12421243!!! nrlmd le 02/05/2011
    12431244        DO k = 1, klev
     
    12871288        ENDDO
    12881289!!!
    1289        ENDIF  ! (iflag_split .eq.1)
     1290       ENDIF  ! (iflag_split .ge.1)
    12901291!!!
    12911292       DO k = 1, nsoilmx
     
    20472048         print*,'effusivity,facteur,cstar', effusivity, facteur,wake_cstar(j)
    20482049        ENDDO
    2049        ENDIF
     2050       ENDIF  ! (prt_level >=10)
    20502051
    20512052!!! jyg le 07/02/2012
     
    22822283
    22832284!!! jyg le 07/02/2012
    2284        IF (iflag_split .eq.1) THEN
     2285       IF (iflag_split .ge.1) THEN
    22852286!!!
    22862287!!! nrlmd le 02/05/2011
     
    23022303        END DO
    23032304!!!     
    2304        ENDIF  ! (iflag_split .eq.1)
     2305       ENDIF  ! (iflag_split .ge.1)
    23052306!!!
    23062307!!! nrlmd le 02/05/2011
     
    23372338        END DO
    23382339
    2339        ELSE
     2340       ELSE  ! (iflag_split .eq.0)
    23402341        DO k = 1, klev
    23412342          DO j = 1, knon
     
    23842385       
    23852386!!! jyg le 07/02/2012
    2386        IF (iflag_split .eq.1) THEN
     2387       IF (iflag_split .ge.1) THEN
    23872388!!!
    23882389!!! nrlmd+jyg le 02/05/2011 et le 20/02/2012
     
    24072408        END DO
    24082409!!!
    2409        ENDIF  ! (iflag_split .eq.1)
     2410       ENDIF  ! (iflag_split .ge.1)
    24102411!!!
    24112412       
     
    27522753
    27532754!!! jyg le 07/02/2012
    2754        IF (iflag_split .eq.1) THEN
     2755       IF (iflag_split .ge.1) THEN
    27552756!!!
    27562757!!! nrlmd & jyg les 02/05/2011, 05/02/2012
     
    27772778    END DO
    27782779!!!
    2779        ENDIF  ! (iflag_split .eq.1)
     2780       ENDIF  ! (iflag_split .ge.1)
    27802781!!!
    27812782
  • LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90

    r2845 r2870  
    141141      REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)
    142142      !$OMP THREADPRIVATE(tausum_aero)
     143      REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:)
     144      !$OMP THREADPRIVATE(drytausum_aero)
    143145      REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)
    144146      !$OMP THREADPRIVATE(tau3d_aero)
     
    167169      REAL, SAVE, ALLOCATABLE :: od550aer(:)
    168170      !$OMP THREADPRIVATE(od550aer)
     171      REAL, SAVE, ALLOCATABLE :: dryod550aer(:)
     172      !$OMP THREADPRIVATE(dryod550aer)
    169173      REAL, SAVE, ALLOCATABLE :: abs550aer(:)
    170174      !$OMP THREADPRIVATE(abs550aer)
     
    251255      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: ale_wake, alp_wake
    252256!$OMP THREADPRIVATE(ale_wake, alp_wake)           
    253       REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
     257!!jyg!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
     258      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
     259      INTEGER,ALLOCATABLE,SAVE,DIMENSION(:)         :: wake_k
    254260!$OMP THREADPRIVATE(wake_h,wake_k)                       
    255261    REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)            :: wake_omg
     
    498504
    499505IMPLICIT NONE
    500       allocate(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
    501       allocate(u_seri(klon,klev),v_seri(klon,klev))
    502       allocate(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf))
     506      ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev))
     507      ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))
     508      ALLOCATE(l_mixmin(klon,klev,nbsrf), l_mix(klon,klev,nbsrf))
    503509      l_mix(:,:,:)=0. ; l_mixmin(:,:,:)=0. ! doit etre initialse car pas toujours remplis
    504510
    505       allocate(tr_seri(klon,klev,nbtr))
    506       allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
    507       allocate(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))
    508       allocate(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon))
    509       allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
    510       allocate(d_tr_dyn(klon,klev,nbtr))                   !RomP
    511       allocate(d_t_con(klon,klev),d_q_con(klon,klev))
    512       allocate(d_u_con(klon,klev),d_v_con(klon,klev))
    513       allocate(d_t_wake(klon,klev),d_q_wake(klon,klev))
    514       allocate(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
    515       allocate(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
    516       allocate(d_t_swr(klon,klev),d_t_sw0(klon,klev))
    517       allocate(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
    518       allocate(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
    519       allocate(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
     511      ALLOCATE(tr_seri(klon,klev,nbtr))
     512      ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))
     513      ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev))
     514      ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon))
     515      ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))
     516      ALLOCATE(d_tr_dyn(klon,klev,nbtr))                   !RomP
     517      ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev))
     518      ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))
     519      ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))
     520      ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev))
     521      ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev))
     522      ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev))
     523      ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))
     524      ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))
     525      ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev))
    520526!nrlmd<
    521       allocate(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
    522       allocate(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
     527      ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))
     528      ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))
    523529!>nrlmd
    524       allocate(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
    525       allocate(d_t_eva(klon,klev),d_q_eva(klon,klev))
    526       allocate(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
    527       allocate(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
    528       allocate(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
    529       allocate(plul_st(klon),plul_th(klon))
    530       allocate(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
     530      ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))
     531      ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))
     532      ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))
     533      ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))
     534      ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev))
     535      ALLOCATE(plul_st(klon),plul_th(klon))
     536      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
    531537!nrlmd+jyg<
    532       allocate(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
    533       allocate(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
     538      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
     539      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
    534540!>nrlmd+jyg
    535       allocate(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
    536       allocate(d_t_oli(klon,klev),d_t_oro(klon,klev))
    537       allocate(d_u_oli(klon,klev),d_v_oli(klon,klev))
    538       allocate(d_u_oro(klon,klev),d_v_oro(klon,klev))
    539       allocate(d_t_lif(klon,klev),d_t_ec(klon,klev))
    540       allocate(d_u_lif(klon,klev),d_v_lif(klon,klev))
    541       allocate(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
     541      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
     542      ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))
     543      ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))
     544      ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))
     545      ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))
     546      ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))
     547      ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))
    542548! Special RRTM
    543       allocate(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
    544       allocate(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
    545 !
    546       allocate(topswad_aero(klon), solswad_aero(klon))
    547       allocate(topswai_aero(klon), solswai_aero(klon))
    548       allocate(topswad0_aero(klon), solswad0_aero(klon))
    549      ! LW diagnostics CK
    550       allocate(toplwad_aero(klon), sollwad_aero(klon))
    551       allocate(toplwai_aero(klon), sollwai_aero(klon))
    552       allocate(toplwad0_aero(klon), sollwad0_aero(klon))
    553       ! end
    554       allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
    555       allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
    556       allocate(topswcf_aero(klon,3), solswcf_aero(klon,3))
    557       allocate(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
    558       allocate(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
    559       allocate(east_gwstress(klon,klev),west_gwstress(klon,klev))
    560       allocate(d_t_hin(klon,klev))
    561       allocate(d_q_ch4(klon,klev))
    562 !      allocate(tausum_aero(klon,nwave,naero_spc))
    563 !      allocate(tau3d_aero(klon,klev,nwave,naero_spc))
    564       allocate(stratomask(klon,klev))
    565 !--correction mini bug OB
    566       allocate(tausum_aero(klon,nwave,naero_tot))
    567       allocate(tau3d_aero(klon,klev,nwave,naero_tot))
    568       allocate(scdnc(klon, klev))
    569       allocate(cldncl(klon))
    570       allocate(reffclwtop(klon))
    571       allocate(lcc(klon))
    572       allocate(reffclws(klon, klev))
    573       allocate(reffclwc(klon, klev))
    574       allocate(cldnvi(klon))
    575       allocate(lcc3d(klon, klev))
    576       allocate(lcc3dcon(klon, klev))
    577       allocate(lcc3dstra(klon, klev))
    578       allocate(od443aer(klon))
    579       allocate(od550aer(klon))
    580       allocate(od865aer(klon))
    581       allocate(abs550aer(klon))
    582       allocate(ec550aer(klon,klev))
    583       allocate(od550lt1aer(klon))
    584       allocate(sconcso4(klon))
    585       allocate(sconcno3(klon))
    586       allocate(sconcoa(klon))
    587       allocate(sconcbc(klon))
    588       allocate(sconcss(klon))
    589       allocate(sconcdust(klon))
    590       allocate(concso4(klon,klev))
    591       allocate(concno3(klon,klev))
    592       allocate(concoa(klon,klev))
    593       allocate(concbc(klon,klev))
    594       allocate(concss(klon,klev))
    595       allocate(concdust(klon,klev))
    596       allocate(loadso4(klon))
    597       allocate(loadoa(klon))
    598       allocate(loadbc(klon))
    599       allocate(loadss(klon))
    600       allocate(loaddust(klon))
    601       allocate(loadno3(klon))
    602       allocate(load_tmp1(klon))
    603       allocate(load_tmp2(klon))
    604       allocate(load_tmp3(klon))
     549      ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))
     550      ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))
     551!
     552      ALLOCATE(topswad_aero(klon), solswad_aero(klon))
     553      ALLOCATE(topswai_aero(klon), solswai_aero(klon))
     554      ALLOCATE(topswad0_aero(klon), solswad0_aero(klon))
     555      ALLOCATE(toplwad_aero(klon), sollwad_aero(klon))
     556      ALLOCATE(toplwai_aero(klon), sollwai_aero(klon))
     557      ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon))
     558      ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))
     559      ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))
     560      ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))
     561      ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))
     562      ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
     563      ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))
     564      ALLOCATE(d_t_hin(klon,klev))
     565      ALLOCATE(d_q_ch4(klon,klev))
     566      ALLOCATE(stratomask(klon,klev))
     567      ALLOCATE(tausum_aero(klon,nwave,naero_tot))
     568      ALLOCATE(drytausum_aero(klon,naero_tot))
     569      ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))
     570      ALLOCATE(scdnc(klon, klev))
     571      ALLOCATE(cldncl(klon))
     572      ALLOCATE(reffclwtop(klon))
     573      ALLOCATE(lcc(klon))
     574      ALLOCATE(reffclws(klon, klev))
     575      ALLOCATE(reffclwc(klon, klev))
     576      ALLOCATE(cldnvi(klon))
     577      ALLOCATE(lcc3d(klon, klev))
     578      ALLOCATE(lcc3dcon(klon, klev))
     579      ALLOCATE(lcc3dstra(klon, klev))
     580      ALLOCATE(od443aer(klon))
     581      ALLOCATE(od550aer(klon))
     582      ALLOCATE(od865aer(klon))
     583      ALLOCATE(dryod550aer(klon))
     584      ALLOCATE(abs550aer(klon))
     585      ALLOCATE(ec550aer(klon,klev))
     586      ALLOCATE(od550lt1aer(klon))
     587      ALLOCATE(sconcso4(klon))
     588      ALLOCATE(sconcno3(klon))
     589      ALLOCATE(sconcoa(klon))
     590      ALLOCATE(sconcbc(klon))
     591      ALLOCATE(sconcss(klon))
     592      ALLOCATE(sconcdust(klon))
     593      ALLOCATE(concso4(klon,klev))
     594      ALLOCATE(concno3(klon,klev))
     595      ALLOCATE(concoa(klon,klev))
     596      ALLOCATE(concbc(klon,klev))
     597      ALLOCATE(concss(klon,klev))
     598      ALLOCATE(concdust(klon,klev))
     599      ALLOCATE(loadso4(klon))
     600      ALLOCATE(loadoa(klon))
     601      ALLOCATE(loadbc(klon))
     602      ALLOCATE(loadss(klon))
     603      ALLOCATE(loaddust(klon))
     604      ALLOCATE(loadno3(klon))
     605      ALLOCATE(load_tmp1(klon))
     606      ALLOCATE(load_tmp2(klon))
     607      ALLOCATE(load_tmp3(klon))
    605608
    606609!IM ajout variables CFMIP2/CMIP5
     
    770773USE indice_sol_mod
    771774IMPLICIT NONE
    772       deallocate(t_seri,q_seri,ql_seri,qs_seri)
    773       deallocate(u_seri,v_seri)
    774       deallocate(l_mixmin,l_mix)
    775 
    776       deallocate(tr_seri)
    777       deallocate(d_t_dyn,d_q_dyn)
    778       deallocate(d_ql_dyn,d_qs_dyn)
    779       deallocate(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d)
    780       deallocate(d_u_dyn,d_v_dyn)
    781       deallocate(d_tr_dyn)                      !RomP
    782       deallocate(d_t_con,d_q_con)
    783       deallocate(d_u_con,d_v_con)
    784       deallocate(d_t_wake,d_q_wake)
    785       deallocate(d_t_lsc,d_q_lsc)
    786       deallocate(d_t_lwr,d_t_lw0)
    787       deallocate(d_t_swr,d_t_sw0)
    788       deallocate(d_ql_lsc,d_qi_lsc)
    789       deallocate(d_t_ajsb,d_q_ajsb)
    790       deallocate(d_t_ajs,d_q_ajs)
     775      DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri)
     776      DEALLOCATE(u_seri,v_seri)
     777      DEALLOCATE(l_mixmin,l_mix)
     778
     779      DEALLOCATE(tr_seri)
     780      DEALLOCATE(d_t_dyn,d_q_dyn)
     781      DEALLOCATE(d_ql_dyn,d_qs_dyn)
     782      DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d)
     783      DEALLOCATE(d_u_dyn,d_v_dyn)
     784      DEALLOCATE(d_tr_dyn)                      !RomP
     785      DEALLOCATE(d_t_con,d_q_con)
     786      DEALLOCATE(d_u_con,d_v_con)
     787      DEALLOCATE(d_t_wake,d_q_wake)
     788      DEALLOCATE(d_t_lsc,d_q_lsc)
     789      DEALLOCATE(d_t_lwr,d_t_lw0)
     790      DEALLOCATE(d_t_swr,d_t_sw0)
     791      DEALLOCATE(d_ql_lsc,d_qi_lsc)
     792      DEALLOCATE(d_t_ajsb,d_q_ajsb)
     793      DEALLOCATE(d_t_ajs,d_q_ajs)
    791794!nrlmd<
    792       deallocate(d_t_ajs_w,d_q_ajs_w)
    793       deallocate(d_t_ajs_x,d_q_ajs_x)
     795      DEALLOCATE(d_t_ajs_w,d_q_ajs_w)
     796      DEALLOCATE(d_t_ajs_x,d_q_ajs_x)
    794797!>nrlmd
    795       deallocate(d_u_ajs,d_v_ajs)
    796       deallocate(d_t_eva,d_q_eva)
    797       deallocate(d_ql_eva,d_qi_eva)
    798       deallocate(d_t_lscst,d_q_lscst)
    799       deallocate(d_t_lscth,d_q_lscth)
    800       deallocate(plul_st,plul_th)
    801       deallocate(d_t_vdf,d_q_vdf,d_t_diss)
     798      DEALLOCATE(d_u_ajs,d_v_ajs)
     799      DEALLOCATE(d_t_eva,d_q_eva)
     800      DEALLOCATE(d_ql_eva,d_qi_eva)
     801      DEALLOCATE(d_t_lscst,d_q_lscst)
     802      DEALLOCATE(d_t_lscth,d_q_lscth)
     803      DEALLOCATE(plul_st,plul_th)
     804      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
    802805!nrlmd+jyg<
    803       deallocate(d_t_vdf_w,d_q_vdf_w)
    804       deallocate(d_t_vdf_x,d_q_vdf_x)
     806      DEALLOCATE(d_t_vdf_w,d_q_vdf_w)
     807      DEALLOCATE(d_t_vdf_x,d_q_vdf_x)
    805808!>nrlmd+jyg
    806       deallocate(d_u_vdf,d_v_vdf)
    807       deallocate(d_t_oli,d_t_oro)
    808       deallocate(d_u_oli,d_v_oli)
    809       deallocate(d_u_oro,d_v_oro)
    810       deallocate(d_t_lif,d_t_ec)
    811       deallocate(d_u_lif,d_v_lif)
    812       deallocate(d_ts, d_tr)
    813       deallocate(topswad_aero,solswad_aero)
    814       deallocate(topswai_aero,solswai_aero)
    815       deallocate(topswad0_aero,solswad0_aero)
    816       ! LW additional CK
    817       deallocate(toplwad_aero,sollwad_aero)
    818       deallocate(toplwai_aero,sollwai_aero)
    819       deallocate(toplwad0_aero,sollwad0_aero)
    820       ! end
    821       deallocate(topsw_aero,solsw_aero)
    822       deallocate(topsw0_aero,solsw0_aero)
    823       deallocate(topswcf_aero,solswcf_aero)
    824       deallocate(stratomask)
    825       deallocate(tausum_aero)
    826       deallocate(tau3d_aero)
    827       deallocate(scdnc)
    828       deallocate(cldncl)
    829       deallocate(reffclwtop)
    830       deallocate(lcc)
    831       deallocate(reffclws)
    832       deallocate(reffclwc)
    833       deallocate(cldnvi)
    834       deallocate(lcc3d)
    835       deallocate(lcc3dcon)
    836       deallocate(lcc3dstra)
    837       deallocate(od443aer)
    838       deallocate(od550aer)
    839       deallocate(od865aer)
    840       deallocate(abs550aer)
    841       deallocate(ec550aer)
    842       deallocate(od550lt1aer)
    843       deallocate(sconcso4)
    844       deallocate(sconcno3)
    845       deallocate(sconcoa)
    846       deallocate(sconcbc)
    847       deallocate(sconcss)
    848       deallocate(sconcdust)
    849       deallocate(concso4)
    850       deallocate(concno3)
    851       deallocate(concoa)
    852       deallocate(concbc)
    853       deallocate(concss)
    854       deallocate(concdust)
    855       deallocate(loadso4)
    856       deallocate(loadoa)
    857       deallocate(loadbc)
    858       deallocate(loadss)
    859       deallocate(loaddust)
    860       deallocate(loadno3)
    861       deallocate(load_tmp1)
    862       deallocate(load_tmp2)
    863       deallocate(load_tmp3)
    864       deallocate(du_gwd_hines,dv_gwd_hines,d_t_hin)
    865       deallocate(d_q_ch4)
    866       deallocate(dv_gwd_rando,dv_gwd_front)
    867       deallocate(east_gwstress,west_gwstress)
     809      DEALLOCATE(d_u_vdf,d_v_vdf)
     810      DEALLOCATE(d_t_oli,d_t_oro)
     811      DEALLOCATE(d_u_oli,d_v_oli)
     812      DEALLOCATE(d_u_oro,d_v_oro)
     813      DEALLOCATE(d_t_lif,d_t_ec)
     814      DEALLOCATE(d_u_lif,d_v_lif)
     815      DEALLOCATE(d_ts, d_tr)
     816      DEALLOCATE(topswad_aero,solswad_aero)
     817      DEALLOCATE(topswai_aero,solswai_aero)
     818      DEALLOCATE(topswad0_aero,solswad0_aero)
     819      DEALLOCATE(toplwad_aero,sollwad_aero)
     820      DEALLOCATE(toplwai_aero,sollwai_aero)
     821      DEALLOCATE(toplwad0_aero,sollwad0_aero)
     822      DEALLOCATE(topsw_aero,solsw_aero)
     823      DEALLOCATE(topsw0_aero,solsw0_aero)
     824      DEALLOCATE(topswcf_aero,solswcf_aero)
     825      DEALLOCATE(stratomask)
     826      DEALLOCATE(tausum_aero)
     827      DEALLOCATE(drytausum_aero)
     828      DEALLOCATE(tau3d_aero)
     829      DEALLOCATE(scdnc)
     830      DEALLOCATE(cldncl)
     831      DEALLOCATE(reffclwtop)
     832      DEALLOCATE(lcc)
     833      DEALLOCATE(reffclws)
     834      DEALLOCATE(reffclwc)
     835      DEALLOCATE(cldnvi)
     836      DEALLOCATE(lcc3d)
     837      DEALLOCATE(lcc3dcon)
     838      DEALLOCATE(lcc3dstra)
     839      DEALLOCATE(od443aer)
     840      DEALLOCATE(od550aer)
     841      DEALLOCATE(od865aer)
     842      DEALLOCATE(dryod550aer)
     843      DEALLOCATE(abs550aer)
     844      DEALLOCATE(ec550aer)
     845      DEALLOCATE(od550lt1aer)
     846      DEALLOCATE(sconcso4)
     847      DEALLOCATE(sconcno3)
     848      DEALLOCATE(sconcoa)
     849      DEALLOCATE(sconcbc)
     850      DEALLOCATE(sconcss)
     851      DEALLOCATE(sconcdust)
     852      DEALLOCATE(concso4)
     853      DEALLOCATE(concno3)
     854      DEALLOCATE(concoa)
     855      DEALLOCATE(concbc)
     856      DEALLOCATE(concss)
     857      DEALLOCATE(concdust)
     858      DEALLOCATE(loadso4)
     859      DEALLOCATE(loadoa)
     860      DEALLOCATE(loadbc)
     861      DEALLOCATE(loadss)
     862      DEALLOCATE(loaddust)
     863      DEALLOCATE(loadno3)
     864      DEALLOCATE(load_tmp1)
     865      DEALLOCATE(load_tmp2)
     866      DEALLOCATE(load_tmp3)
     867      DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)
     868      DEALLOCATE(d_q_ch4)
     869      DEALLOCATE(dv_gwd_rando,dv_gwd_front)
     870      DEALLOCATE(east_gwstress,west_gwstress)
    868871
    869872!IM ajout variables CFMIP2/CMIP5
    870       deallocate(topswad_aerop, solswad_aerop)
    871       deallocate(topswai_aerop, solswai_aerop)
    872       deallocate(topswad0_aerop, solswad0_aerop)
    873       deallocate(topsw_aerop, topsw0_aerop)
    874       deallocate(solsw_aerop, solsw0_aerop)
    875       deallocate(topswcf_aerop, solswcf_aerop)
     873      DEALLOCATE(topswad_aerop, solswad_aerop)
     874      DEALLOCATE(topswai_aerop, solswai_aerop)
     875      DEALLOCATE(topswad0_aerop, solswad0_aerop)
     876      DEALLOCATE(topsw_aerop, topsw0_aerop)
     877      DEALLOCATE(solsw_aerop, solsw0_aerop)
     878      DEALLOCATE(topswcf_aerop, solswcf_aerop)
    876879
    877880!CK LW diagnostics
    878       deallocate(toplwad_aerop, sollwad_aerop)
    879       deallocate(toplwai_aerop, sollwai_aerop)
    880       deallocate(toplwad0_aerop, sollwad0_aerop)
     881      DEALLOCATE(toplwad_aerop, sollwad_aerop)
     882      DEALLOCATE(toplwai_aerop, sollwai_aerop)
     883      DEALLOCATE(toplwad0_aerop, sollwad0_aerop)
    881884
    882885! FH Ajout de celles nécessaires au phys_output_write_mod
  • LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90

    r2845 r2870  
    10601060    'sollwai', 'LW-AIE at SFR', 'W/m2', (/ ('', i=1, 10) /))
    10611061
    1062 
    10631062  TYPE(ctrl_out),SAVE,DIMENSION(naero_tot) :: o_tausumaero =                              &
    1064        (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(1),     &
     1063       (/ ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(1),     &
    10651064       "Aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)),     &
    1066        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(2),        &
     1065       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(2),        &
    10671066       "Aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)),     &
    1068        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(3),        &
     1067       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(3),        &
    10691068       "Aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)),     &
    1070        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(4),        &
     1069       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(4),        &
    10711070       "Aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)),     &
    1072        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(5),        &
     1071       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(5),        &
    10731072       "Aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)),     &
    1074        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(6),        &
     1073       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(6),        &
    10751074       "Aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)),     &
    1076        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(7),        &
     1075       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(7),        &
    10771076       "Aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)),     &
    1078        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(8),        &
     1077       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(8),        &
    10791078       "Aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)),     &
    1080        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(9),        &
     1079       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(9),        &
    10811080       "Aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)),     &
    1082        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(10),       &
     1081       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(10),       &
    10831082       "Aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)),   &
    1084        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(11),       &
     1083       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(11),       &
    10851084       "Aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)),   &
    1086        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(12),       &
     1085       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(12),       &
    10871086       "Aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)),   &
    1088        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(13),       &
     1087       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(13),       &
    10891088       "Aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)),   &
    1090        ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'OD550_'//name_aero_tau(14),       &
     1089       ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/),'od550_'//name_aero_tau(14),       &
    10911090       "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 10) /)) /)
     1091
     1092  TYPE(ctrl_out),SAVE,DIMENSION(naero_tot-1) :: o_drytausumaero =                              &
     1093       (/ ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(1),     &
     1094       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(1),"1", (/ ('', i=1, 10) /)),     &
     1095       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(2),        &
     1096       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(2),"2", (/ ('', i=1, 10) /)),     &
     1097       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(3),        &
     1098       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(3),"3", (/ ('', i=1, 10) /)),     &
     1099       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(4),        &
     1100       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(4),"4", (/ ('', i=1, 10) /)),     &
     1101       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(5),        &
     1102       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(5),"5", (/ ('', i=1, 10) /)),     &
     1103       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(6),        &
     1104       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(6),"6", (/ ('', i=1, 10) /)),     &
     1105       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(7),        &
     1106       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(7),"7", (/ ('', i=1, 10) /)),     &
     1107       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(8),        &
     1108       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(8),"8", (/ ('', i=1, 10) /)),     &
     1109       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(9),        &
     1110       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(9),"9", (/ ('', i=1, 10) /)),     &
     1111       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(10),       &
     1112       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(10),"10", (/ ('', i=1, 10) /)),   &
     1113       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(11),       &
     1114       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(11),"11", (/ ('', i=1, 10) /)),   &
     1115       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(12),       &
     1116       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(12),"12", (/ ('', i=1, 10) /)),   &
     1117       ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'dryod550_'//name_aero_tau(13),       &
     1118       "Dry aerosol Optical depth at 550 nm "//name_aero_tau(13),"13", (/ ('', i=1, 10) /)) /)
    10921119!
    10931120  TYPE(ctrl_out), SAVE :: o_tausumaero_lw = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1094     'OD_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /))
     1121    'od_10um_STRAT', 'Stratospheric Aerosol Optical depth at 10 um ', '1', (/ ('', i=1, 10) /))
    10951122!
    10961123  TYPE(ctrl_out), SAVE :: o_od443aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     
    10981125  TYPE(ctrl_out), SAVE :: o_od550aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    10991126    'od550aer', 'Total aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /))
     1127  TYPE(ctrl_out), SAVE :: o_dryod550aer = ctrl_out((/ 11, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1128    'dryod550aer', 'Total dry aerosol optical depth at 550nm', '-', (/ ('', i=1, 10) /))
    11001129  TYPE(ctrl_out), SAVE :: o_od865aer = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    11011130    'od865aer', 'Total aerosol optical depth at 870nm', '-', (/ ('', i=1, 10) /))
     
    11401169  TYPE(ctrl_out), SAVE :: o_loadno3 = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    11411170    'loadno3', 'Column Load of Nitrate ', 'kg/m2', (/ ('', i=1, 10) /))
    1142   TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1171  TYPE(ctrl_out), SAVE :: o_swtoaas_nat = ctrl_out((/ 11, 11, 1, 11, 11, 11, 11, 11, 11, 11/), &
    11431172    'swtoaas_nat', 'Natural aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1144   TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1173  TYPE(ctrl_out), SAVE :: o_swsrfas_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11451174    'swsrfas_nat', 'Natural aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1146   TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1175  TYPE(ctrl_out), SAVE :: o_swtoacs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11471176    'swtoacs_nat', 'Natural aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1148   TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1177  TYPE(ctrl_out), SAVE :: o_swsrfcs_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11491178    'swsrfcs_nat', 'Natural aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1150   TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1179  TYPE(ctrl_out), SAVE :: o_swtoaas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11511180    'swtoaas_ant', 'Anthropogenic aerosol radiative forcing all-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1152   TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1181  TYPE(ctrl_out), SAVE :: o_swsrfas_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11531182    'swsrfas_ant', 'Anthropogenic aerosol radiative forcing all-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1154   TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1183  TYPE(ctrl_out), SAVE :: o_swtoacs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11551184    'swtoacs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1156   TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1185  TYPE(ctrl_out), SAVE :: o_swsrfcs_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11571186    'swsrfcs_ant', 'Anthropogenic aerosol radiative forcing clear-sky at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1158   TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1187  TYPE(ctrl_out), SAVE :: o_swtoacf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11591188    'swtoacf_nat', 'Natural aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1160   TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1189  TYPE(ctrl_out), SAVE :: o_swsrfcf_nat = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11611190    'swsrfcf_nat', 'Natural aerosol impact on cloud radiative forcing  at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1162   TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1191  TYPE(ctrl_out), SAVE :: o_swtoacf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11631192    'swtoacf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1164   TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1193  TYPE(ctrl_out), SAVE :: o_swsrfcf_ant = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11651194    'swsrfcf_ant', 'Anthropogenic aerosol impact on cloud radiative forcing at SRF', 'W/m2', (/ ('', i=1, 10) /))
    1166   TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1195  TYPE(ctrl_out), SAVE :: o_swtoacf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11671196    'swtoacf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at TOA', 'W/m2', (/ ('', i=1, 10) /))
    1168   TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 4, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1197  TYPE(ctrl_out), SAVE :: o_swsrfcf_zero = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    11691198    'swsrfcf_zero', 'Cloud radiative forcing (allsky-clearsky fluxes) at SRF', 'W/m2', (/ ('', i=1, 10) /))
    11701199  TYPE(ctrl_out), SAVE :: o_cldncl = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     
    11851214!--strat aerosol optical depth
    11861215  TYPE(ctrl_out), SAVE :: o_tau_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    1187     'OD550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /))
     1216    'od550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 10) /))
    11881217  TYPE(ctrl_out), SAVE :: o_tau_strat_1020 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    11891218    'OD1020_strat_only', 'Stratospheric Aerosol Optical depth at 1020 nm ', '1', (/ ('', i=1, 10) /))
  • LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90

    r2839 r2870  
    519519    IF (prt_level >= 10) THEN
    520520      WRITE(lunout,*)'swaero_diag=',swaero_diag
     521      WRITE(lunout,*)'dryaod_diag=',dryaod_diag
    521522      WRITE(lunout,*)'phys_output_open: ends here'
    522523    ENDIF
  • LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90

    r2839 r2870  
    44MODULE phys_output_var_mod
    55
    6   use dimphy
     6  USE dimphy
    77  ! Variables outputs pour les ecritures des sorties
    88  !======================================================================
     
    7979
    8080  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
     81  ! dryaod_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
    8182  !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call
    8283  !--    and corrected back to TRUE based on output requests
    8384  LOGICAL, SAVE                                :: swaero_diag=.TRUE.
    84   !$OMP THREADPRIVATE(swaero_diag)
     85  LOGICAL, SAVE                                :: dryaod_diag=.TRUE.
     86  !$OMP THREADPRIVATE(swaero_diag, dryaod_diag)
    8587
    8688  INTEGER, SAVE:: levmin(nfiles) = 1
     
    165167  !======================================================================
    166168  SUBROUTINE phys_output_var_end
    167     use dimphy
     169    USE dimphy
    168170    IMPLICIT NONE
    169171
  • LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90

    r2845 r2870  
    100100         o_solldown, o_dtsvdfo, o_dtsvdft, &
    101101         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od443aer, o_od550aer, &
    102          o_od865aer, o_abs550aer, o_od550lt1aer, &
     102         o_dryod550aer, o_od865aer, o_abs550aer, o_od550lt1aer, &
    103103         o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, &
    104104         o_sconcss, o_sconcdust, o_concso4, o_concno3, &
    105105         o_concoa, o_concbc, o_concss, o_concdust, &
    106106         o_loadso4, o_loadoa, o_loadbc, o_loadss, &
    107          o_loaddust, o_loadno3, o_tausumaero, o_tausumaero_lw, &
     107         o_loaddust, o_loadno3, o_tausumaero, &
     108         o_drytausumaero, o_tausumaero_lw, &
    108109         o_topswad, o_topswad0, o_solswad, o_solswad0, &
    109110         o_toplwad, o_toplwad0, o_sollwad, o_sollwad0, &
     
    252253         weak_inversion, dthmin, cldtau, cldemi, &
    253254         pmflxr, pmflxs, prfl, psfl, re, fl, rh2m, &
    254          qsat2m, tpote, tpot, d_ts, od443aer, od550aer, &
     255         qsat2m, tpote, tpot, d_ts, od443aer, od550aer, dryod550aer, &
    255256         od865aer, abs550aer, od550lt1aer, sconcso4, sconcno3, &
    256257         sconcoa, sconcbc, sconcss, sconcdust, concso4, concno3, &
    257258         concoa, concbc, concss, concdust, loadso4, &
    258          loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, &
     259         loadoa, loadbc, loadss, loaddust, loadno3, tausum_aero, drytausum_aero, &
    259260         topswad_aero, topswad0_aero, solswad_aero, &
    260261         solswad0_aero, topsw_aero, solsw_aero, &
     
    301302    USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, &
    302303         bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, &
    303          itau_con, nfiles, clef_files, nid_files, &
     304         itau_con, nfiles, clef_files, nid_files, dryaod_diag, &
    304305         zustr_gwd_hines, zvstr_gwd_hines,zustr_gwd_rando, zvstr_gwd_rando, &
    305306         zustr_gwd_front, zvstr_gwd_front,     &
     
    11641165       CALL histwrite_phy(o_z0m, z0m(:,nbsrf+1))
    11651166       CALL histwrite_phy(o_z0h, z0h(:,nbsrf+1))
    1166        ! OD550 per species
     1167       ! od550 per species
    11671168!--OLIVIER
    11681169!This is warranted by treating INCA aerosols as offline aerosols
     
    11931194             CALL histwrite_phy(o_loaddust, loaddust)
    11941195             CALL histwrite_phy(o_loadno3, loadno3)
    1195              !--STRAT AER
    1196           ENDIF
     1196             CALL histwrite_phy(o_dryod550aer, dryod550aer)
     1197             DO naero = 1, naero_tot-1
     1198                CALL histwrite_phy(o_drytausumaero(naero),drytausum_aero(:,naero))
     1199             END DO
     1200          ENDIF
     1201          !--STRAT AER
    11971202          IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN
    11981203             DO naero = 1, naero_tot
  • LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90

    r2839 r2870  
    9292       topswcf_aero,solswcf_aero,   &
    9393       tausum_aero,tau3d_aero,      &
     94       drytausum_aero,              &
    9495       !
    9596       !variables CFMIP2/CMIP5
     
    971972    ! pre-industrial (pi) aerosols
    972973
    973 
     974    INTEGER :: naero
    974975    ! Aerosol optical properties
    975976    CHARACTER*4, DIMENSION(naero_grp) :: rfname
     
    15801581           !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
    15811582           swaero_diag=.TRUE.
     1583
     1584       !--setting up dryaod_diag to TRUE in XIOS case
     1585       DO naero = 1, naero_tot-1
     1586         IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
     1587       ENDDO
    15821588#endif
    15831589
     
    21372143
    21382144       !jyg+nrlmd<
    2139        IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN
     2145!!jyg       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN
     2146       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,10) .ge. 1) THEN
    21402147          print *,'debut du splitting de la PBL'
    21412148       ENDIF
     
    22172224       !
    22182225       !  Add turbulent diffusion tendency to the wake difference variables
    2219        IF (mod(iflag_pbl_split,2) .NE. 0) THEN
     2226!!jyg       IF (mod(iflag_pbl_split,2) .NE. 0) THEN
     2227       IF (mod(iflag_pbl_split,10) .NE. 0) THEN
    22202228!jyg<
    22212229          d_deltat_vdf(:,:) = d_t_vdf_w(:,:)-d_t_vdf_x(:,:)
     
    28292837       IF (iflag_thermals>=1) THEN
    28302838          !jyg<
    2831           IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
     2839!!       IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
     2840       IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN
    28322841             !  Appel des thermiques avec les profils exterieurs aux poches
    28332842             DO k=1,klev
     
    28742883          !
    28752884          !jyg<
    2876           IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
     2885!!jyg          IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
     2886          IF (mod(iflag_pbl_split/10,10) .GE. 1) THEN
    28772887             !  Si les thermiques ne sont presents que hors des
    28782888             !  poches, la tendance moyenne associ\'ee doit etre
     
    28962906             call prt_enerbil('the',itap)
    28972907          !
    2898           ENDIF  ! (mod(iflag_pbl_split/2,2) .EQ. 1)
     2908          ENDIF  ! (mod(iflag_pbl_split/10,10) .GE. 1)
    28992909          !
    29002910          CALL add_phys_tend(d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs,  &
     
    33673377                        tr_seri, mass_solu_aero, mass_solu_aero_pi,  &
    33683378                        tau_aero_sw_rrtm, piz_aero_sw_rrtm, cg_aero_sw_rrtm,  &
    3369                         tausum_aero, tau3d_aero)
     3379                        tausum_aero, drytausum_aero, tau3d_aero)
    33703380#endif
    33713381                   !
     
    34073417       ELSE   !--flag_aerosol = 0
    34083418          tausum_aero(:,:,:) = 0.
     3419          drytausum_aero(:,:) = 0.
    34093420          mass_solu_aero(:,:) = 0.
    34103421          mass_solu_aero_pi(:,:) = 0.
     
    36743685#ifndef CPP_XIOS
    36753686          !--OB 30/05/2016 modified 21/10/2016
    3676           !--here we return swaero_diag to FALSE
     3687          !--here we return swaero_diag and dryaod_diag to FALSE
    36773688          !--and histdef will switch it back to TRUE if necessary
    36783689          !--this is necessary to get the right swaero at first step
    36793690          !--but only in the case of no XIOS as XIOS is covered elsewhere
    36803691          IF (debut) swaero_diag = .FALSE.
     3692          IF (debut) dryaod_diag = .FALSE.
    36813693#endif
    36823694          !
     
    41854197    d_t_ec(:,:)=0.
    41864198    forall (k=1: nbp_lev) exner(:, k) = (pplay(:, k)/paprs(:,1))**RKAPPA
    4187     CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap), &
    4188          u_seri,v_seri,t_seri,q_seri,pbl_tke(:,:,is_ave)-tke0(:,:), &
     4199    CALL ener_conserv(klon,klev,pdtphys,u,v,t,qx(:,:,ivap),qx(:,:,iliq),qx(:,:,isol), &
     4200         u_seri,v_seri,t_seri,q_seri,ql_seri,qs_seri,pbl_tke(:,:,is_ave)-tke0(:,:), &
    41894201         zmasse,exner,d_t_ec)
    41904202    t_seri(:,:)=t_seri(:,:)+d_t_ec(:,:)
  • LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90

    r2845 r2870  
    88   flag_bc_internal_mixture, &
    99   pplay, t_seri,            &
    10    tausum, tau )
     10   tausum, drytausum, tau )
    1111
    1212  USE DIMPHY
    1313  USE aero_mod
    14   USE phys_local_var_mod, ONLY: od443aer,od550aer,od865aer,ec550aer,od550lt1aer,abs550aer
     14  USE phys_local_var_mod, ONLY: od443aer,od550aer,dryod550aer,od865aer,ec550aer,od550lt1aer,abs550aer
     15  USE phys_output_var_mod, ONLY: dryaod_diag
    1516  USE YOMCST, ONLY: RD,RG
    1617
     
    6768  REAL, DIMENSION(klon), INTENT(OUT)                      :: ai      ! POLDER aerosol index
    6869  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)      :: tausum
     70  REAL, DIMENSION(klon,naero_tot), INTENT(OUT)            :: drytausum
    6971  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau
    7072  !
     
    342344  ! Initialisations
    343345  ai(:) = 0.
     346  abs550aer(:)=0.0
     347  drytausum(:,:) = 0.
    344348  tausum(:,:,:) = 0.
    345349  tau(:,:,:,:)=0.
    346 
    347   abs550aer(:)=0.0
    348350
    349351  DO k=1, klev
     
    476478    DO la=1,las
    477479
    478     !--only 443, 550, 670 and 865 nm are used
     480    !--only 443, 550, and 865 nm are used
    479481    !--to save time 670 and AI are not computed for CMIP6
    480482    !IF (la.NE.la443.AND.la.NE.la550.AND.la.NE.la670.AND.la.NE.la865) CYCLE
     
    511513             tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    512514
     515             IF (la.EQ.la550.AND.dryaod_diag) THEN
     516                tau_ae5wv_int = alpha_MG_5wv(1,la,classbc)
     517                drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
     518             ENDIF
     519
    513520             IF (la.EQ.la550) THEN
    514521                abs_ae5wv_int = abs_MG_5wv(RH_num(i,k),la,classbc)+DELTA(i,k)* &
     
    532539              tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    533540
     541              IF (la.EQ.la550.AND.dryaod_diag) THEN
     542                 tau_ae5wv_int = alpha_aers_5wv(1,la,spsol)
     543                 drytausum(i,aerindex)=drytausum(i,aerindex)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
     544              ENDIF
     545
    534546              IF (la.EQ.la550) THEN
    535547                 abs_ae5wv_int = abs_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* &
     
    554566            tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex)
    555567
     568            IF (la.EQ.la550.AND.dryaod_diag) THEN
     569              drytausum(i,aerindex)= drytausum(i,aerindex)+tau(i,k,la,aerindex)
     570            ENDIF
     571
    556572            IF (la.EQ.la550) THEN
    557                abs_ae5wv_int = abs_aeri_5wv(la,spsol)
     573               abs_ae5wv_int = abs_aeri_5wv(la,spinsol)
    558574               abs550aer(i)=abs550aer(i)+m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*abs_ae5wv_int*fac
    559575            ENDIF
     
    573589  od865aer(:)=SUM(tausum(:,la865,:),dim=2)
    574590
     591!--dry AOD calculation for diagnostics la=la550
     592  dryod550aer(:)=SUM(drytausum(:,:),dim=2)
     593
    575594!--extinction coefficient for diagnostic
    576595  ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/zdh(:,:)
  • LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90

    r2839 r2870  
    66     tr_seri, mass_solu_aero, mass_solu_aero_pi, &
    77     tau_aero, piz_aero, cg_aero, &
    8      tausum_aero, tau3d_aero )
     8     tausum_aero, drytausum_aero, tau3d_aero )
    99
    1010  ! This routine will :
     
    5252  REAL, DIMENSION(klon,klev,2,NSW), INTENT(OUT) :: cg_aero     ! asymmetry parameter aerosol
    5353  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)       :: tausum_aero
     54  REAL, DIMENSION(klon,naero_tot), INTENT(OUT)             :: drytausum_aero
    5455  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT)  :: tau3d_aero
    5556
     
    231232     ENDIF
    232233     !
    233      ! Read and interpolate cidustm
     234     ! Read and interpolate asno3m, csno3m, cino3m
    234235     IF (flag_aerosol .EQ. 6) THEN
    235236
     
    240241        CALL readaerosol_interp(id_CINO3M_phy, itap, pdtphys, rjourvrai, &
    241242        debut, pplay, paprs, t_seri, nitrinscoarse, nitrinscoarse_pi, load_tmp3)
    242         loadss(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:)
     243        loadno3(:)=load_tmp1(:)+load_tmp2(:)+load_tmp3(:)
    243244
    244245     ELSE
     
    320321       flag_bc_internal_mixture,     &
    321322       pplay, t_seri,                &
    322        tausum_aero, tau3d_aero )
     323       tausum_aero, drytausum_aero, tau3d_aero )
    323324
    324325  !--call LW optical properties for tropospheric aerosols
  • LMDZ5/branches/testing/libf/phylmd/rrtm/rrtm_init_140gp.F90

    r1999 r2870  
    8282
    8383CORR1(0) = 1.0_JPRB
    84 CORR1(200) = 1.0_JPRB
     84CORR1(400) = 1.0_JPRB
    8585CORR2(0) = 1.0_JPRB
    86 CORR2(200) = 1.0_JPRB
    87 DO I = 1,199
    88   Z_FP = 0.005_JPRB*REAL(I)
     86CORR2(400) = 1.0_JPRB
     87DO I = 1,399
     88  Z_FP = 0.0025_JPRB*REAL(I)
    8989  Z_RTFP = SQRT(Z_FP)
    9090  CORR1(I) = Z_RTFP/Z_FP
  • LMDZ5/branches/testing/libf/phylmd/rrtm/yoerrtbg2.F90

    r2056 r2870  
    1313!    -------------------------------------------------------------------
    1414
    15 REAL(KIND=JPRB) :: CORR1(0:200)
    16 REAL(KIND=JPRB) :: CORR2(0:200)
     15REAL(KIND=JPRB) :: CORR1(0:400)
     16REAL(KIND=JPRB) :: CORR2(0:400)
    1717
    1818!     -----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.