Changeset 2471 for LMDZ5/branches


Ignore:
Timestamp:
Mar 18, 2016, 12:09:23 PM (9 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2434:2457 into testing branch

Location:
LMDZ5/branches/testing
Files:
1 deleted
44 edited
7 copied

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

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

    r2435 r2471  
    656656      <field id="c14_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    657657      <field id="c15_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    658       <field id="c16_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    659       <field id="c17_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    660       <field id="c18_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    661       <field id="c19_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    662       <field id="c20_cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" axis_ref="height" />
    663658      <field id="c01_atb532" long_name="Lidar Attenuated Total Backscatter (532 nm)" unit="1" axis_ref="height_mlev" />
    664659      <field id="c02_atb532" long_name="Lidar Attenuated Total Backscatter (532 nm)" unit="1" axis_ref="height_mlev" />
     
    703698    </field_group> 
    704699
     700    <field_group id="fields_COSP_CLOUDSAT" domain_ref="dom_glo" freq_op="3h">
     701      <field id="cltlidarradar" long_name="Lidar and Radar Total Cloud Fraction" unit="%" />
     702      <field id="clcalipso2"  long_name="CALIPSO Cloud Fraction Undetected by CloudSat" unit="%" axis_ref="height" />
     703      <field id="c01_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     704      <field id="c02_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     705      <field id="c03_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     706      <field id="c04_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     707      <field id="c05_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     708      <field id="c06_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     709      <field id="c07_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     710      <field id="c08_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     711      <field id="c09_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     712      <field id="c10_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     713      <field id="c11_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     714      <field id="c12_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     715      <field id="c13_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     716      <field id="c14_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     717      <field id="c15_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     718      <field id="c16_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     719      <field id="c17_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     720      <field id="c18_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     721      <field id="c19_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     722      <field id="c20_dbze94" long_name="CloudSat Radar Reflectivity" unit="1" axis_ref="height_mlev" />
     723      <field id="c01_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     724      <field id="c02_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     725      <field id="c03_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     726      <field id="c04_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     727      <field id="c05_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     728      <field id="c06_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     729      <field id="c07_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     730      <field id="c08_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     731      <field id="c09_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     732      <field id="c10_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     733      <field id="c11_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     734      <field id="c12_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     735      <field id="c13_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     736      <field id="c14_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     737      <field id="c15_cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" axis_ref="height" />
     738    </field_group>
     739
    705740    <field_group id="fields_COSP_ISCCP" domain_ref="dom_glo" freq_op="3h">
    706741      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1" />
     
    722757    </field_group>
    723758
     759    <field_group id="fields_COSP_MISR" domain_ref="dom_glo" freq_op="3h">
     760      <field id="c01_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     761      <field id="c02_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     762      <field id="c03_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     763      <field id="c04_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     764      <field id="c05_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     765      <field id="c06_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     766      <field id="c07_clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" axis_ref="cth16" />
     767    </field_group>
     768
    724769</field_definition>
    725770
  • LMDZ5/branches/testing/DefLists/file_def_histdayCOSP_lmdz.xml

    r2435 r2471  
    33        <file id="histdayCOSP" name="histdayCOSP" output_freq="1d" output_level="1"  enabled=".TRUE.">
    44
    5             <!-- VARS 2D -->
     5            <!-- VARS Calipso and PARASOL -->
    66            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    77                <field field_ref="cllcalipso"         level="1" />
     
    3232                <field field_ref="parasol_crefl"  level="1" axis_ref="sza" />
    3333                <field field_ref="Ncrefl"  level="1" axis_ref="sza" />
    34                 <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
    35                 <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
    36                 <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
    37                 <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
    38                 <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
    39                 <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
    40                 <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
    41                 <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
    42                 <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
    43                 <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
    44                 <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
    45                 <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
    46                 <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
    47                 <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
    48                 <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    49                 <field field_ref="c16_cfad_lidarsr532"  level="10" axis_ref="height" />
    50                 <field field_ref="c17_cfad_lidarsr532"  level="10" axis_ref="height" />
    51                 <field field_ref="c18_cfad_lidarsr532"  level="10" axis_ref="height" />
    52                 <field field_ref="c19_cfad_lidarsr532"  level="10" axis_ref="height" />
    53                 <field field_ref="c20_cfad_lidarsr532"  level="10" axis_ref="height" />
     34                    <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
     35                        <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
     36                        <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
     37                        <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
     38                        <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
     39                        <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
     40                        <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
     41                        <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
     42                        <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
     43                        <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
     44                        <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
     45                        <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
     46                        <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
     47                        <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
     48                        <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    5449                <field field_ref="c01_atb532" level="10" axis_ref="height_mlev" />
    5550                <field field_ref="c02_atb532" level="10" axis_ref="height_mlev" />
     
    7368                <field field_ref="c20_atb532" level="10" axis_ref="height_mlev" />
    7469                <field field_ref="beta_mol532" level="10" axis_ref="height_mlev" />
     70              </field_group>
     71             <!-- VARS CLOUDSAT et/ou Calipso -->
     72            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     73               <field field_ref="cltlidarradar"  level="1"/>
     74               <field field_ref="clcalipso2"  level="1" axis_ref="height" />
     75               <field field_ref="c01_cfadDbze94"  level="10" axis_ref="height" />
     76               <field field_ref="c02_cfadDbze94"  level="10" axis_ref="height" />
     77               <field field_ref="c03_cfadDbze94"  level="10" axis_ref="height" />
     78               <field field_ref="c04_cfadDbze94"  level="10" axis_ref="height" />
     79               <field field_ref="c05_cfadDbze94"  level="10" axis_ref="height" />
     80               <field field_ref="c06_cfadDbze94"  level="10" axis_ref="height" />
     81               <field field_ref="c07_cfadDbze94"  level="10" axis_ref="height" />
     82               <field field_ref="c08_cfadDbze94"  level="10" axis_ref="height" />
     83               <field field_ref="c09_cfadDbze94"  level="10" axis_ref="height" />
     84               <field field_ref="c10_cfadDbze94"  level="10" axis_ref="height" />
     85               <field field_ref="c11_cfadDbze94"  level="10" axis_ref="height" />
     86               <field field_ref="c12_cfadDbze94"  level="10" axis_ref="height" />
     87               <field field_ref="c13_cfadDbze94"  level="10" axis_ref="height" />
     88               <field field_ref="c14_cfadDbze94"  level="10" axis_ref="height" />
     89               <field field_ref="c15_cfadDbze94"  level="10" axis_ref="height" />
     90               <field field_ref="c01_dbze94" level="10" axis_ref="height_mlev" />
     91               <field field_ref="c02_dbze94" level="10" axis_ref="height_mlev" />
     92               <field field_ref="c03_dbze94" level="10" axis_ref="height_mlev" />
     93               <field field_ref="c04_dbze94" level="10" axis_ref="height_mlev" />
     94               <field field_ref="c05_dbze94" level="10" axis_ref="height_mlev" />
     95               <field field_ref="c06_dbze94" level="10" axis_ref="height_mlev" />
     96               <field field_ref="c07_dbze94" level="10" axis_ref="height_mlev" />
     97               <field field_ref="c08_dbze94" level="10" axis_ref="height_mlev" />
     98               <field field_ref="c09_dbze94" level="10" axis_ref="height_mlev" />
     99               <field field_ref="c10_dbze94" level="10" axis_ref="height_mlev" />
     100               <field field_ref="c11_dbze94" level="10" axis_ref="height_mlev" />
     101               <field field_ref="c12_dbze94" level="10" axis_ref="height_mlev" />
     102               <field field_ref="c13_dbze94" level="10" axis_ref="height_mlev" />
     103               <field field_ref="c14_dbze94" level="10" axis_ref="height_mlev" />
     104               <field field_ref="c15_dbze94" level="10" axis_ref="height_mlev" />
     105               <field field_ref="c16_dbze94" level="10" axis_ref="height_mlev" />
     106               <field field_ref="c17_dbze94" level="10" axis_ref="height_mlev" />
     107               <field field_ref="c18_dbze94" level="10" axis_ref="height_mlev" />
     108               <field field_ref="c19_dbze94" level="10" axis_ref="height_mlev" />
     109               <field field_ref="c20_dbze94" level="10" axis_ref="height_mlev" />
     110              </field_group>
     111             <!-- VARS ISCCP -->
     112            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    75113                <field field_ref="sunlit" level="1" />
    76114                <field field_ref="c01_clisccp2" level="1" axis_ref="pressure2" />
     
    89127                <field field_ref="meantbisccp" level="10" />
    90128                <field field_ref="meantbclrisccp" level="10" />
     129             </field_group>
     130             <!-- VARS MISR -->
     131            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     132                <field field_ref="c01_clMISR" level="1" axis_ref="cth16" />
     133                <field field_ref="c02_clMISR" level="1" axis_ref="cth16" />
     134                <field field_ref="c03_clMISR" level="1" axis_ref="cth16" />
     135                <field field_ref="c04_clMISR" level="1" axis_ref="cth16" />
     136                <field field_ref="c05_clMISR" level="1" axis_ref="cth16" />
     137                <field field_ref="c06_clMISR" level="1" axis_ref="cth16" />
     138                <field field_ref="c07_clMISR" level="1" axis_ref="cth16" />
    91139            </field_group>
    92140
  • LMDZ5/branches/testing/DefLists/file_def_histhfCOSP_lmdz.xml

    r2435 r2471  
    33        <file id="histhfCOSP" name="XhisthfCOSP" output_freq="3h" output_level="1"  enabled=".TRUE.">
    44
    5             <!-- VARS 2D -->
    6             <field_group operation="instant" freq_op="1ts">
     5            <!-- VARS Calipso and PARASOL -->
     6            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    77                <field field_ref="cllcalipso"         level="1" />
    88                <field field_ref="clmcalipso"         level="1" />
     
    3232                <field field_ref="parasol_crefl"  level="1" axis_ref="sza" />
    3333                <field field_ref="Ncrefl"  level="1" axis_ref="sza" />
    34                 <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
    35                 <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
    36                 <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
    37                 <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
    38                 <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
    39                 <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
    40                 <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
    41                 <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
    42                 <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
    43                 <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
    44                 <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
    45                 <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
    46                 <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
    47                 <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
    48                 <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    49                 <field field_ref="c16_cfad_lidarsr532"  level="10" axis_ref="height" />
    50                 <field field_ref="c17_cfad_lidarsr532"  level="10" axis_ref="height" />
    51                 <field field_ref="c18_cfad_lidarsr532"  level="10" axis_ref="height" />
    52                 <field field_ref="c19_cfad_lidarsr532"  level="10" axis_ref="height" />
    53                 <field field_ref="c20_cfad_lidarsr532"  level="10" axis_ref="height" />
     34                    <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
     35                        <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
     36                        <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
     37                        <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
     38                        <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
     39                        <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
     40                        <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
     41                        <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
     42                        <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
     43                        <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
     44                        <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
     45                        <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
     46                        <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
     47                        <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
     48                        <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    5449                <field field_ref="c01_atb532" level="10" axis_ref="height_mlev" />
    5550                <field field_ref="c02_atb532" level="10" axis_ref="height_mlev" />
     
    7368                <field field_ref="c20_atb532" level="10" axis_ref="height_mlev" />
    7469                <field field_ref="beta_mol532" level="10" axis_ref="height_mlev" />
     70              </field_group>
     71             <!-- VARS CLOUDSAT et/ou Calipso -->
     72            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     73               <field field_ref="cltlidarradar"  level="1"/>
     74               <field field_ref="clcalipso2"  level="1" axis_ref="height" />
     75               <field field_ref="c01_cfadDbze94"  level="10" axis_ref="height" />
     76               <field field_ref="c02_cfadDbze94"  level="10" axis_ref="height" />
     77               <field field_ref="c03_cfadDbze94"  level="10" axis_ref="height" />
     78               <field field_ref="c04_cfadDbze94"  level="10" axis_ref="height" />
     79               <field field_ref="c05_cfadDbze94"  level="10" axis_ref="height" />
     80               <field field_ref="c06_cfadDbze94"  level="10" axis_ref="height" />
     81               <field field_ref="c07_cfadDbze94"  level="10" axis_ref="height" />
     82               <field field_ref="c08_cfadDbze94"  level="10" axis_ref="height" />
     83               <field field_ref="c09_cfadDbze94"  level="10" axis_ref="height" />
     84               <field field_ref="c10_cfadDbze94"  level="10" axis_ref="height" />
     85               <field field_ref="c11_cfadDbze94"  level="10" axis_ref="height" />
     86               <field field_ref="c12_cfadDbze94"  level="10" axis_ref="height" />
     87               <field field_ref="c13_cfadDbze94"  level="10" axis_ref="height" />
     88               <field field_ref="c14_cfadDbze94"  level="10" axis_ref="height" />
     89               <field field_ref="c15_cfadDbze94"  level="10" axis_ref="height" />
     90               <field field_ref="c01_dbze94" level="10" axis_ref="height_mlev" />
     91               <field field_ref="c02_dbze94" level="10" axis_ref="height_mlev" />
     92               <field field_ref="c03_dbze94" level="10" axis_ref="height_mlev" />
     93               <field field_ref="c04_dbze94" level="10" axis_ref="height_mlev" />
     94               <field field_ref="c05_dbze94" level="10" axis_ref="height_mlev" />
     95               <field field_ref="c06_dbze94" level="10" axis_ref="height_mlev" />
     96               <field field_ref="c07_dbze94" level="10" axis_ref="height_mlev" />
     97               <field field_ref="c08_dbze94" level="10" axis_ref="height_mlev" />
     98               <field field_ref="c09_dbze94" level="10" axis_ref="height_mlev" />
     99               <field field_ref="c10_dbze94" level="10" axis_ref="height_mlev" />
     100               <field field_ref="c11_dbze94" level="10" axis_ref="height_mlev" />
     101               <field field_ref="c12_dbze94" level="10" axis_ref="height_mlev" />
     102               <field field_ref="c13_dbze94" level="10" axis_ref="height_mlev" />
     103               <field field_ref="c14_dbze94" level="10" axis_ref="height_mlev" />
     104               <field field_ref="c15_dbze94" level="10" axis_ref="height_mlev" />
     105               <field field_ref="c16_dbze94" level="10" axis_ref="height_mlev" />
     106               <field field_ref="c17_dbze94" level="10" axis_ref="height_mlev" />
     107               <field field_ref="c18_dbze94" level="10" axis_ref="height_mlev" />
     108               <field field_ref="c19_dbze94" level="10" axis_ref="height_mlev" />
     109               <field field_ref="c20_dbze94" level="10" axis_ref="height_mlev" />
     110              </field_group>
     111             <!-- VARS ISCCP -->
     112            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    75113                <field field_ref="sunlit" level="1" />
    76114                <field field_ref="c01_clisccp2" level="1" axis_ref="pressure2" />
     
    84122                <field field_ref="boxptopisccp" level="10" axis_ref="column" />
    85123                <field field_ref="tclisccp" level="1" />
    86                 <field field_ref="ctpisccp" level="10" />
    87                 <field field_ref="tauisccp" level="10" />
    88                 <field field_ref="albisccp" level="10" />
     124                <field field_ref="ctpisccp" level="1" />
     125                <field field_ref="tauisccp" level="1" />
     126                <field field_ref="albisccp" level="1" />
    89127                <field field_ref="meantbisccp" level="10" />
    90128                <field field_ref="meantbclrisccp" level="10" />
     129             </field_group>
     130             <!-- VARS MISR -->
     131            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     132                <field field_ref="c01_clMISR" level="1" axis_ref="cth16" />
     133                <field field_ref="c02_clMISR" level="1" axis_ref="cth16" />
     134                <field field_ref="c03_clMISR" level="1" axis_ref="cth16" />
     135                <field field_ref="c04_clMISR" level="1" axis_ref="cth16" />
     136                <field field_ref="c05_clMISR" level="1" axis_ref="cth16" />
     137                <field field_ref="c06_clMISR" level="1" axis_ref="cth16" />
     138                <field field_ref="c07_clMISR" level="1" axis_ref="cth16" />
    91139            </field_group>
    92140
  • LMDZ5/branches/testing/DefLists/file_def_histmthCOSP_lmdz.xml

    r2435 r2471  
    33        <file id="histmthCOSP" name="histmthCOSP" output_freq="30d" output_level="1"  enabled=".TRUE.">
    44
    5             <!-- VARS 2D -->
     5            <!-- VARS Calipso and PARASOL -->
    66            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    77                <field field_ref="cllcalipso"         level="1" />
     
    3232                <field field_ref="parasol_crefl"  level="1" axis_ref="sza" />
    3333                <field field_ref="Ncrefl"  level="1" axis_ref="sza" />
    34                 <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
    35                 <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
    36                 <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
    37                 <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
    38                 <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
    39                 <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
    40                 <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
    41                 <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
    42                 <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
    43                 <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
    44                 <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
    45                 <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
    46                 <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
    47                 <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
    48                 <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    49                 <field field_ref="c16_cfad_lidarsr532"  level="10" axis_ref="height" />
    50                 <field field_ref="c17_cfad_lidarsr532"  level="10" axis_ref="height" />
    51                 <field field_ref="c18_cfad_lidarsr532"  level="10" axis_ref="height" />
    52                 <field field_ref="c19_cfad_lidarsr532"  level="10" axis_ref="height" />
    53                 <field field_ref="c20_cfad_lidarsr532"  level="10" axis_ref="height" />
     34                    <field field_ref="c01_cfad_lidarsr532"  level="10" axis_ref="height" />
     35                        <field field_ref="c02_cfad_lidarsr532"  level="10" axis_ref="height" />
     36                        <field field_ref="c03_cfad_lidarsr532"  level="10" axis_ref="height" />
     37                        <field field_ref="c04_cfad_lidarsr532"  level="10" axis_ref="height" />
     38                        <field field_ref="c05_cfad_lidarsr532"  level="10" axis_ref="height" />
     39                        <field field_ref="c06_cfad_lidarsr532"  level="10" axis_ref="height" />
     40                        <field field_ref="c07_cfad_lidarsr532"  level="10" axis_ref="height" />
     41                        <field field_ref="c08_cfad_lidarsr532"  level="10" axis_ref="height" />
     42                        <field field_ref="c09_cfad_lidarsr532"  level="10" axis_ref="height" />
     43                        <field field_ref="c10_cfad_lidarsr532"  level="10" axis_ref="height" />
     44                        <field field_ref="c11_cfad_lidarsr532"  level="10" axis_ref="height" />
     45                        <field field_ref="c12_cfad_lidarsr532"  level="10" axis_ref="height" />
     46                        <field field_ref="c13_cfad_lidarsr532"  level="10" axis_ref="height" />
     47                        <field field_ref="c14_cfad_lidarsr532"  level="10" axis_ref="height" />
     48                        <field field_ref="c15_cfad_lidarsr532"  level="10" axis_ref="height" />
    5449                <field field_ref="c01_atb532" level="10" axis_ref="height_mlev" />
    5550                <field field_ref="c02_atb532" level="10" axis_ref="height_mlev" />
     
    7368                <field field_ref="c20_atb532" level="10" axis_ref="height_mlev" />
    7469                <field field_ref="beta_mol532" level="10" axis_ref="height_mlev" />
     70              </field_group>
     71             <!-- VARS CLOUDSAT et/ou Calipso -->
     72            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     73               <field field_ref="cltlidarradar"  level="1"/>
     74               <field field_ref="clcalipso2"  level="1" axis_ref="height" />
     75               <field field_ref="c01_cfadDbze94"  level="10" axis_ref="height" />
     76               <field field_ref="c02_cfadDbze94"  level="10" axis_ref="height" />
     77               <field field_ref="c03_cfadDbze94"  level="10" axis_ref="height" />
     78               <field field_ref="c04_cfadDbze94"  level="10" axis_ref="height" />
     79               <field field_ref="c05_cfadDbze94"  level="10" axis_ref="height" />
     80               <field field_ref="c06_cfadDbze94"  level="10" axis_ref="height" />
     81               <field field_ref="c07_cfadDbze94"  level="10" axis_ref="height" />
     82               <field field_ref="c08_cfadDbze94"  level="10" axis_ref="height" />
     83               <field field_ref="c09_cfadDbze94"  level="10" axis_ref="height" />
     84               <field field_ref="c10_cfadDbze94"  level="10" axis_ref="height" />
     85               <field field_ref="c11_cfadDbze94"  level="10" axis_ref="height" />
     86               <field field_ref="c12_cfadDbze94"  level="10" axis_ref="height" />
     87               <field field_ref="c13_cfadDbze94"  level="10" axis_ref="height" />
     88               <field field_ref="c14_cfadDbze94"  level="10" axis_ref="height" />
     89               <field field_ref="c15_cfadDbze94"  level="10" axis_ref="height" />
     90               <field field_ref="c01_dbze94" level="10" axis_ref="height_mlev" />
     91               <field field_ref="c02_dbze94" level="10" axis_ref="height_mlev" />
     92               <field field_ref="c03_dbze94" level="10" axis_ref="height_mlev" />
     93               <field field_ref="c04_dbze94" level="10" axis_ref="height_mlev" />
     94               <field field_ref="c05_dbze94" level="10" axis_ref="height_mlev" />
     95               <field field_ref="c06_dbze94" level="10" axis_ref="height_mlev" />
     96               <field field_ref="c07_dbze94" level="10" axis_ref="height_mlev" />
     97               <field field_ref="c08_dbze94" level="10" axis_ref="height_mlev" />
     98               <field field_ref="c09_dbze94" level="10" axis_ref="height_mlev" />
     99               <field field_ref="c10_dbze94" level="10" axis_ref="height_mlev" />
     100               <field field_ref="c11_dbze94" level="10" axis_ref="height_mlev" />
     101               <field field_ref="c12_dbze94" level="10" axis_ref="height_mlev" />
     102               <field field_ref="c13_dbze94" level="10" axis_ref="height_mlev" />
     103               <field field_ref="c14_dbze94" level="10" axis_ref="height_mlev" />
     104               <field field_ref="c15_dbze94" level="10" axis_ref="height_mlev" />
     105               <field field_ref="c16_dbze94" level="10" axis_ref="height_mlev" />
     106               <field field_ref="c17_dbze94" level="10" axis_ref="height_mlev" />
     107               <field field_ref="c18_dbze94" level="10" axis_ref="height_mlev" />
     108               <field field_ref="c19_dbze94" level="10" axis_ref="height_mlev" />
     109               <field field_ref="c20_dbze94" level="10" axis_ref="height_mlev" />
     110              </field_group>
     111             <!-- VARS ISCCP -->
     112            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
    75113                <field field_ref="sunlit" level="1" />
    76114                <field field_ref="c01_clisccp2" level="1" axis_ref="pressure2" />
     
    89127                <field field_ref="meantbisccp" level="10" />
    90128                <field field_ref="meantbclrisccp" level="10" />
     129             </field_group>
     130             <!-- VARS MISR -->
     131            <field_group operation="average" freq_op="3h" detect_missing_value=".true.">
     132                <field field_ref="c01_clMISR" level="1" axis_ref="cth16" />
     133                <field field_ref="c02_clMISR" level="1" axis_ref="cth16" />
     134                <field field_ref="c03_clMISR" level="1" axis_ref="cth16" />
     135                <field field_ref="c04_clMISR" level="1" axis_ref="cth16" />
     136                <field field_ref="c05_clMISR" level="1" axis_ref="cth16" />
     137                <field field_ref="c06_clMISR" level="1" axis_ref="cth16" />
     138                <field field_ref="c07_clMISR" level="1" axis_ref="cth16" />
    91139            </field_group>
    92140
  • LMDZ5/branches/testing/arch/arch-X64_ADA.fcm

    r2298 r2471  
    88%PROD_FFLAGS         -O2 -ip -fp-model strict -axAVX,SSE4.2
    99%DEV_FFLAGS          -p -g -O0 -fpe0 -traceback
    10 %DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check all -debug
     10%DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check bounds,format,output_conversion,pointers,uninit -debug
    1111#%DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -debug
    1212%MPI_FFLAGS
  • LMDZ5/branches/testing/arch/arch-X64_OCCIGEN.fcm

    r2408 r2471  
    88%PROD_FFLAGS         -O2 -ip
    99%DEV_FFLAGS          -p -g -O1 -fpe0 -traceback
    10 %DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -ftz -ftrapuv -fp-stack-check -check all -debug -traceback
     10%DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -ftz -ftrapuv -fp-stack-check -check bounds,format,output_conversion,pointers,uninit -debug -traceback
    1111%MPI_FFLAGS
    1212%OMP_FFLAGS          -openmp -openmp-threadprivate compat
  • LMDZ5/branches/testing/arch/arch-gfortran_CICLAD.path

    r2160 r2471  
    77OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
    88OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
    9 INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
    10 INCA_INCDIR=$LMDGCM/../INCA3/config/lib
     9INCA_LIBDIR=$LMDGCM/../INCA/config/lib
     10INCA_INCDIR=$LMDGCM/../INCA/config/lib
     11XIOS_INCDIR=$LMDGCM/../XIOS/inc
     12XIOS_LIBDIR=$LMDGCM/../XIOS/lib
  • LMDZ5/branches/testing/arch/arch-ifort_CICLAD.fcm

    r2160 r2471  
    88%PROD_FFLAGS         -O2 -ip
    99%DEV_FFLAGS          -p -g -O1 -fpe0 -traceback
    10 %DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check all -debug
     10%DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check bounds,format,output_conversion,pointers,uninit -debug
    1111%MPI_FFLAGS          -I/usr/lib64/openmpi/1.4.5-ifort/include
    1212%OMP_FFLAGS          -openmp
  • LMDZ5/branches/testing/arch/arch-ifort_CICLAD.path

    r2160 r2471  
    77OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
    88OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
    9 INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
    10 INCA_INCDIR=$LMDGCM/../INCA3/config/lib
     9INCA_LIBDIR=$LMDGCM/../INCA/config/lib
     10INCA_INCDIR=$LMDGCM/../INCA/config/lib
     11XIOS_INCDIR=$LMDGCM/../XIOS/inc
     12XIOS_LIBDIR=$LMDGCM/../XIOS/lib
  • LMDZ5/branches/testing/libf/dyn3d/conf_gcm.F90

    r2298 r2471  
    297297  CALL getin('dissip_deltaz',dissip_deltaz )
    298298  CALL getin('dissip_zref',dissip_zref )
     299
     300  ! ngroup
     301  ngroup=3
     302  CALL getin('ngroup',ngroup)
     303
    299304
    300305  ! top_bound sponge: only active if ok_strato=.true. and iflag_top_bound!=0
  • LMDZ5/branches/testing/libf/dyn3d/gcm.F90

    r2408 r2471  
    157157  use_filtre_fft=.FALSE.
    158158  CALL getin('use_filtre_fft',use_filtre_fft)
    159   IF (use_filtre_fft) call abort_gcm('FFT filter is not available in the ' &
    160           // 'sequential version of the dynamics.', 1)
     159  IF (use_filtre_fft) call abort_gcm("gcm", 'FFT filter is not available in ' &
     160          // 'the sequential version of the dynamics.', 1)
    161161
    162162!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • LMDZ5/branches/testing/libf/dyn3d/groupe.F

    r1910 r2471  
    2222#include "comvert.h"
    2323
    24       integer ngroup
    25       parameter (ngroup=3)
     24!     integer ngroup
     25!     parameter (ngroup=3)
    2626
    2727
  • LMDZ5/branches/testing/libf/dyn3d/groupeun.F

    r1910 r2471  
    1313      REAL q(iip1,jjmax,llmax)
    1414
    15       INTEGER ngroup
    16       PARAMETER (ngroup=3)
     15!     INTEGER ngroup
     16!     PARAMETER (ngroup=3)
    1717
    1818      REAL airecn,qn
     
    3737
    3838      LOGICAL, SAVE :: first = .TRUE.
    39       INTEGER,SAVE :: i_index(iim,ngroup)
     39!     INTEGER,SAVE :: i_index(iim,ngroup)
    4040      INTEGER      :: offset
    41       REAL         :: qsum(iim/ngroup)
     41!     REAL         :: qsum(iim/ngroup)
    4242
    4343      IF (first) THEN
     
    142142#include "comgeom2.h"
    143143
    144       INTEGER ngroup
    145       PARAMETER (ngroup=3)
     144!     INTEGER ngroup
     145!     PARAMETER (ngroup=3)
    146146
    147147      REAL airen,airecn
  • LMDZ5/branches/testing/libf/dyn3d_common/comconst.h

    r1999 r2471  
    66
    77      COMMON/comconsti/im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,lcl,          &
    8      &                 iflag_top_bound,mode_top_bound
     8     &                 iflag_top_bound,mode_top_bound,ngroup
    99      COMMON/comconstr/dtvr,daysec,                                     &
    1010     & pi,dtphys,dtdiss,rad,r,cpp,kappa,cotot,unsim,g,omeg              &
     
    3232! top_bound sponge:
    3333      INTEGER iflag_top_bound ! sponge type
     34      INTEGER ngroup
    3435      INTEGER mode_top_bound  ! sponge mode
    3536      REAL tau_top_bound ! inverse of sponge characteristic time scale (Hz)
  • LMDZ5/branches/testing/libf/dyn3dmem/conf_gcm.F90

    r2258 r2471  
    326326  CALL getin('dissip_zref',dissip_zref )
    327327
     328  ! ngroup
     329  ngroup=3
     330  CALL getin('ngroup',ngroup)
     331
     332  ! mode_top_bound : fields towards which sponge relaxation will be done:
    328333  ! top_bound sponge: only active if ok_strato=.true. and iflag_top_bound!=0
    329334  !                   iflag_top_bound=0 for no sponge
     
    857862
    858863     !Config  Key  = use_filtre_fft
    859      !Config  Desc = flag d'activation des FFT pour le filtre
     864     !Config  Desc = flag to activate FFTs for the filter
    860865     !Config  Def  = false
    861      !Config  Help = permet d'activer l'utilisation des FFT pour effectuer
    862      !Config         le filtrage aux poles.
     866     !Config  Help = enables to use FFts to do the longitudinal polar
     867     !Config         filtering around the poles.
    863868     use_filtre_fft=.FALSE.
    864869     CALL getin('use_filtre_fft',use_filtre_fft)
    865      use_filtre_fft_loc=use_filtre_fft
    866 
    867870     IF (use_filtre_fft .AND. grossismx /= 1.0) THEN
    868871        write(lunout,*)'WARNING !!! '
    869         write(lunout,*)"Le zoom en longitude est incompatible", &
    870              " avec l'utilisation du filtre FFT ", &
    871              "---> FFT filter not active"
     872        write(lunout,*)"A zoom in longitude is not compatible", &
     873             " with the FFT filter ", &
     874             "---> FFT filter deactivated"
    872875        use_filtre_fft=.FALSE.
    873876     ENDIF
     877     use_filtre_fft_loc=use_filtre_fft
    874878
    875879     !Config  Key  = use_mpi_alloc
  • LMDZ5/branches/testing/libf/dyn3dmem/groupe_loc.F

    r1910 r2471  
    2222#include "comvert.h"
    2323
    24       integer ngroup
    25       parameter (ngroup=3)
     24!     integer ngroup
     25!     parameter (ngroup=3)
    2626
    2727
  • LMDZ5/branches/testing/libf/dyn3dmem/groupeun_loc.F

    r1910 r2471  
    1212      REAL q(iip1,sb:se,llmax)
    1313
    14       INTEGER ngroup
    15       PARAMETER (ngroup=3)
     14!     INTEGER ngroup
     15!     PARAMETER (ngroup=3)
    1616
    1717      REAL airecn,qn
     
    3838      LOGICAL, SAVE :: first = .TRUE.
    3939!$OMP THREADPRIVATE(first)
    40       INTEGER,SAVE :: i_index(iim,ngroup)
     40!     INTEGER,SAVE :: i_index(iim,ngroup)
    4141      INTEGER      :: offset
    42       REAL         :: qsum(iim/ngroup)
     42!     REAL         :: qsum(iim/ngroup)
    4343
    4444      IF (first) THEN
     
    143143#include "comgeom2.h"
    144144
    145       INTEGER ngroup
    146       PARAMETER (ngroup=3)
     145!     INTEGER ngroup
     146!     PARAMETER (ngroup=3)
    147147
    148148      REAL airen,airecn
  • LMDZ5/branches/testing/libf/dyn3dmem/mod_hallo.F90

    r1910 r2471  
    4646
    4747  INTERFACE Register_SwapField_u
    48     MODULE PROCEDURE Register_SwapField1d_u,Register_SwapField2d_u1d,Register_SwapField3d_u
     48    MODULE PROCEDURE Register_SwapField1d_u,Register_SwapField2d_u1d,Register_SwapField3d_u, &
     49                     Register_SwapField1d_u_bis,Register_SwapField2d_u1d_bis,Register_SwapField3d_u_bis
    4950  END INTERFACE Register_SwapField_u
    5051
    5152  INTERFACE Register_SwapField_v
    52     MODULE PROCEDURE Register_SwapField1d_v,Register_SwapField2d_v1d,Register_SwapField3d_v
     53    MODULE PROCEDURE Register_SwapField1d_v,Register_SwapField2d_v1d,Register_SwapField3d_v,&
     54                     Register_SwapField1d_v_bis,Register_SwapField2d_v1d_bis,Register_SwapField3d_v_bis
    5355  END INTERFACE Register_SwapField_v
    5456
    5557  INTERFACE Register_SwapField2d_u
    56     MODULE PROCEDURE Register_SwapField1d_u2d,Register_SwapField2d_u2d,Register_SwapField3d_u2d
     58    MODULE PROCEDURE Register_SwapField1d_u2d,Register_SwapField2d_u2d,Register_SwapField3d_u2d, &
     59                     Register_SwapField1d_u2d_bis,Register_SwapField2d_u2d_bis,Register_SwapField3d_u2d_bis
    5760  END INTERFACE Register_SwapField2d_u
    5861
    5962  INTERFACE Register_SwapField2d_v
    60     MODULE PROCEDURE Register_SwapField1d_v2d,Register_SwapField2d_v2d,Register_SwapField3d_v2d
     63    MODULE PROCEDURE Register_SwapField1d_v2d,Register_SwapField2d_v2d,Register_SwapField3d_v2d, &
     64                     Register_SwapField1d_v2d_bis,Register_SwapField2d_v2d_bis,Register_SwapField3d_v2d_bis
    6165  END INTERFACE Register_SwapField2d_v
    6266
     
    352356
    353357
    354   SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    355   USE parallel_lmdz
    356   USE dimensions_mod
    357       IMPLICIT NONE
    358    
    359     REAL, DIMENSION(:),INTENT(IN)     :: FieldS
    360     REAL, DIMENSION(:),INTENT(OUT)    :: FieldR
    361     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     358  SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,up,down)
     359  USE parallel_lmdz
     360  USE dimensions_mod
     361      IMPLICIT NONE
     362   
    362363    TYPE(distrib),INTENT(IN)          :: new_dist
    363     INTEGER,OPTIONAL,INTENT(IN)       :: up
    364     INTEGER,OPTIONAL,INTENT(IN)       :: down     
    365     TYPE(request),INTENT(INOUT)         :: a_request
    366 
    367     INTEGER                           :: halo_up
    368     INTEGER                           :: halo_down
    369    
    370    
    371     halo_up=0
    372     halo_down=0
    373     IF (PRESENT(up))   halo_up=up
    374     IF (PRESENT(down)) halo_down=down
    375 
    376     IF (PRESENT(old_dist)) THEN
    377       CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
    378     ELSE
    379       CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    380     ENDIF
     364    REAL, DIMENSION(current_dist%ijb_u:),INTENT(IN)     :: FieldS
     365    REAL, DIMENSION(new_dist%ijb_u:),INTENT(OUT)    :: FieldR
     366    INTEGER,OPTIONAL,INTENT(IN)       :: up
     367    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     368    TYPE(request),INTENT(INOUT)         :: a_request
     369
     370    INTEGER                           :: halo_up
     371    INTEGER                           :: halo_down
     372   
     373   
     374    halo_up=0
     375    halo_down=0
     376    IF (PRESENT(up))   halo_up=up
     377    IF (PRESENT(down)) halo_down=down
     378
     379    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    381380       
    382381  END SUBROUTINE  Register_SwapField1d_u
    383382
    384 
    385   SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     383  SUBROUTINE Register_SwapField1d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     384  USE parallel_lmdz
     385  USE dimensions_mod
     386      IMPLICIT NONE
     387   
     388    TYPE(distrib),INTENT(IN)          :: new_dist
     389    TYPE(distrib),INTENT(IN)          :: old_dist
     390    REAL, DIMENSION(old_dist%ijb_u:),INTENT(IN)     :: FieldS
     391    REAL, DIMENSION(new_dist%ijb_u:),INTENT(OUT)    :: FieldR
     392    INTEGER,OPTIONAL,INTENT(IN)       :: up
     393    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     394    TYPE(request),INTENT(INOUT)         :: a_request
     395
     396    INTEGER                           :: halo_up
     397    INTEGER                           :: halo_down
     398   
     399   
     400    halo_up=0
     401    halo_down=0
     402    IF (PRESENT(up))   halo_up=up
     403    IF (PRESENT(down)) halo_down=down
     404
     405    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
     406       
     407  END SUBROUTINE  Register_SwapField1d_u_bis
     408
     409
     410  SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,up,down)
    386411  USE parallel_lmdz
    387412  USE dimensions_mod
    388413    IMPLICIT NONE
    389414   
    390     REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
    391     REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
    392     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
    393415    TYPE(distrib),INTENT(IN)          :: new_dist
     416    REAL, DIMENSION(current_dist%ijb_u:,:),INTENT(IN)     :: FieldS
     417    REAL, DIMENSION(new_dist%ijb_u:,:),INTENT(OUT)    :: FieldR
    394418    INTEGER,OPTIONAL,INTENT(IN)       :: up
    395419    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    408432    ll=size(FieldS,2)
    409433   
    410     IF (PRESENT(old_dist)) THEN
    411       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    412     ELSE
    413       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    414     ENDIF
     434    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    415435   
    416436  END SUBROUTINE  Register_SwapField2d_u1d
    417    
    418 
    419   SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    420   USE parallel_lmdz
    421   USE dimensions_mod
    422       IMPLICIT NONE
    423    
    424     REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
    425     REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
    426     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     437
     438  SUBROUTINE Register_SwapField2d_u1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     439  USE parallel_lmdz
     440  USE dimensions_mod
     441    IMPLICIT NONE
     442   
    427443    TYPE(distrib),INTENT(IN)          :: new_dist
     444    TYPE(distrib),INTENT(IN) :: old_dist
     445    REAL, DIMENSION(old_dist%ijb_u:,:),INTENT(IN)     :: FieldS
     446    REAL, DIMENSION(new_dist%ijb_u:,:),INTENT(OUT)    :: FieldR
    428447    INTEGER,OPTIONAL,INTENT(IN)       :: up
    429448    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    440459    IF (PRESENT(down)) halo_down=down
    441460   
     461    ll=size(FieldS,2)
     462   
     463    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     464   
     465  END SUBROUTINE  Register_SwapField2d_u1d_bis
     466   
     467
     468  SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,up,down)
     469  USE parallel_lmdz
     470  USE dimensions_mod
     471      IMPLICIT NONE
     472   
     473    TYPE(distrib),INTENT(IN)          :: new_dist
     474    REAL, DIMENSION(current_dist%ijb_u:,:,:),INTENT(IN)     :: FieldS
     475    REAL, DIMENSION(new_dist%ijb_u:,:,:),INTENT(OUT)    :: FieldR
     476    INTEGER,OPTIONAL,INTENT(IN)       :: up
     477    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     478    TYPE(request),INTENT(INOUT)         :: a_request
     479
     480    INTEGER                           :: halo_up
     481    INTEGER                           :: halo_down
     482    INTEGER                           :: ll
     483       
     484   
     485    halo_up=0
     486    halo_down=0
     487    IF (PRESENT(up))   halo_up=up
     488    IF (PRESENT(down)) halo_down=down
     489   
    442490    ll=size(FieldS,2)*size(FieldS,3)
    443491   
    444     IF (PRESENT(old_dist)) THEN
    445       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    446     ELSE
    447       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    448     ENDIF
     492    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    449493   
    450494  END SUBROUTINE  Register_SwapField3d_u
    451  
    452 
    453 
    454  SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    455   USE parallel_lmdz
    456   USE dimensions_mod
    457 
    458       IMPLICIT NONE
    459    
    460     REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
    461     REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
    462     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
    463     TYPE(distrib),OPTIONAL,INTENT(IN)          :: new_dist !LF
    464     INTEGER,OPTIONAL,INTENT(IN)       :: up
    465     INTEGER,OPTIONAL,INTENT(IN)       :: down     
    466     TYPE(request),INTENT(INOUT)         :: a_request
    467 
    468     INTEGER                           :: halo_up
    469     INTEGER                           :: halo_down
    470    
    471    
    472     halo_up=0
    473     halo_down=0
    474     IF (PRESENT(up))   halo_up=up
    475     IF (PRESENT(down)) halo_down=down
    476 
    477     IF (PRESENT(old_dist)) THEN
    478       CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
    479     ELSE
    480       CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    481     ENDIF
     495
     496  SUBROUTINE Register_SwapField3d_u_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     497  USE parallel_lmdz
     498  USE dimensions_mod
     499      IMPLICIT NONE
     500   
     501    TYPE(distrib),INTENT(IN)          :: new_dist
     502    TYPE(distrib),INTENT(IN) :: old_dist
     503    REAL, DIMENSION(old_dist%ijb_u:,:,:),INTENT(IN)     :: FieldS
     504    REAL, DIMENSION(new_dist%ijb_u:,:,:),INTENT(OUT)    :: FieldR
     505    INTEGER,OPTIONAL,INTENT(IN)       :: up
     506    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     507    TYPE(request),INTENT(INOUT)         :: a_request
     508
     509    INTEGER                           :: halo_up
     510    INTEGER                           :: halo_down
     511    INTEGER                           :: ll
     512       
     513   
     514    halo_up=0
     515    halo_down=0
     516    IF (PRESENT(up))   halo_up=up
     517    IF (PRESENT(down)) halo_down=down
     518   
     519    ll=size(FieldS,2)*size(FieldS,3)
     520   
     521    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     522   
     523  END SUBROUTINE  Register_SwapField3d_u_bis
     524 
     525
     526
     527 SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
     528  USE parallel_lmdz
     529  USE dimensions_mod
     530
     531      IMPLICIT NONE
     532
     533    TYPE(distrib),INTENT(IN)          :: new_dist !LF
     534    REAL, DIMENSION(current_dist%jjb_u:,:),INTENT(IN)     :: FieldS
     535    REAL, DIMENSION(new_dist%jjb_u:,:),INTENT(OUT)    :: FieldR
     536    INTEGER,OPTIONAL,INTENT(IN)       :: up
     537    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     538    TYPE(request),INTENT(INOUT)         :: a_request
     539
     540    INTEGER                           :: halo_up
     541    INTEGER                           :: halo_down
     542   
     543   
     544    halo_up=0
     545    halo_down=0
     546    IF (PRESENT(up))   halo_up=up
     547    IF (PRESENT(down)) halo_down=down
     548
     549    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    482550       
    483551  END SUBROUTINE  Register_SwapField1d_u2d
    484552
    485 
    486   SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    487   USE parallel_lmdz
    488   USE dimensions_mod
    489 
    490       IMPLICIT NONE
    491    
    492     REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
    493     REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
    494     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     553 SUBROUTINE Register_SwapField1d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     554  USE parallel_lmdz
     555  USE dimensions_mod
     556
     557      IMPLICIT NONE
     558
     559    TYPE(distrib),INTENT(IN)          :: new_dist !LF
     560    TYPE(distrib),INTENT(IN)          :: old_dist
     561    REAL, DIMENSION(old_dist%jjb_u:,:),INTENT(IN)     :: FieldS
     562    REAL, DIMENSION(new_dist%jjb_u:,:),INTENT(OUT)    :: FieldR
     563    INTEGER,OPTIONAL,INTENT(IN)       :: up
     564    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     565    TYPE(request),INTENT(INOUT)         :: a_request
     566
     567    INTEGER                           :: halo_up
     568    INTEGER                           :: halo_down
     569   
     570   
     571    halo_up=0
     572    halo_down=0
     573    IF (PRESENT(up))   halo_up=up
     574    IF (PRESENT(down)) halo_down=down
     575
     576    CALL  Register_SwapField_gen_u(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
     577       
     578  END SUBROUTINE  Register_SwapField1d_u2d_bis
     579
     580
     581  SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
     582  USE parallel_lmdz
     583  USE dimensions_mod
     584
     585      IMPLICIT NONE
     586   
    495587    TYPE(distrib),INTENT(IN)          :: new_dist
     588    REAL, DIMENSION(current_dist%jjb_u:,:,:),INTENT(IN)     :: FieldS
     589    REAL, DIMENSION(new_dist%jjb_u:,:,:),INTENT(OUT)    :: FieldR
    496590    INTEGER,OPTIONAL,INTENT(IN)       :: up
    497591    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    510604    ll=size(FieldS,3)
    511605   
    512     IF (PRESENT(old_dist)) THEN
    513       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    514     ELSE
    515       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    516     ENDIF
     606    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    517607   
    518608  END SUBROUTINE  Register_SwapField2d_u2d
    519    
    520 
    521   SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    522   USE parallel_lmdz
    523   USE dimensions_mod
    524       IMPLICIT NONE
    525    
    526     REAL, DIMENSION(:,:,:,:),INTENT(IN)     :: FieldS
    527     REAL, DIMENSION(:,:,:,:),INTENT(OUT)    :: FieldR
    528     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     609
     610  SUBROUTINE Register_SwapField2d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     611  USE parallel_lmdz
     612  USE dimensions_mod
     613
     614      IMPLICIT NONE
     615   
    529616    TYPE(distrib),INTENT(IN)          :: new_dist
     617    TYPE(distrib),INTENT(IN) :: old_dist
     618    REAL, DIMENSION(old_dist%jjb_u:,:,:),INTENT(IN)     :: FieldS
     619    REAL, DIMENSION(new_dist%jjb_u:,:,:),INTENT(OUT)    :: FieldR
    530620    INTEGER,OPTIONAL,INTENT(IN)       :: up
    531621    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    542632    IF (PRESENT(down)) halo_down=down
    543633   
     634    ll=size(FieldS,3)
     635   
     636    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     637   
     638  END SUBROUTINE  Register_SwapField2d_u2d_bis
     639   
     640
     641  SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,up,down)
     642  USE parallel_lmdz
     643  USE dimensions_mod
     644      IMPLICIT NONE
     645   
     646    TYPE(distrib),INTENT(IN)          :: new_dist
     647    REAL, DIMENSION(current_dist%jjb_u:,:,:,:),INTENT(IN)     :: FieldS
     648    REAL, DIMENSION(new_dist%jjb_u:,:,:,:),INTENT(OUT)    :: FieldR
     649    INTEGER,OPTIONAL,INTENT(IN)       :: up
     650    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     651    TYPE(request),INTENT(INOUT)         :: a_request
     652
     653    INTEGER                           :: halo_up
     654    INTEGER                           :: halo_down
     655    INTEGER                           :: ll
     656       
     657   
     658    halo_up=0
     659    halo_down=0
     660    IF (PRESENT(up))   halo_up=up
     661    IF (PRESENT(down)) halo_down=down
     662   
    544663    ll=size(FieldS,3)*size(FieldS,4)
    545664   
    546     IF (PRESENT(old_dist)) THEN
    547       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    548     ELSE
    549       CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    550     ENDIF
     665    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    551666   
    552667  END SUBROUTINE  Register_SwapField3d_u2d
    553668
    554 
    555 
    556 
    557 
    558 
    559 
    560   SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    561   USE parallel_lmdz
    562   USE dimensions_mod
    563       IMPLICIT NONE
    564    
    565     REAL, DIMENSION(:),INTENT(IN)     :: FieldS
    566     REAL, DIMENSION(:),INTENT(OUT)    :: FieldR
    567     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     669  SUBROUTINE Register_SwapField3d_u2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     670  USE parallel_lmdz
     671  USE dimensions_mod
     672      IMPLICIT NONE
     673   
    568674    TYPE(distrib),INTENT(IN)          :: new_dist
    569     INTEGER,OPTIONAL,INTENT(IN)       :: up
    570     INTEGER,OPTIONAL,INTENT(IN)       :: down     
    571     TYPE(request),INTENT(INOUT)         :: a_request
    572 
    573     INTEGER                           :: halo_up
    574     INTEGER                           :: halo_down
    575    
    576    
    577     halo_up=0
    578     halo_down=0
    579     IF (PRESENT(up))   halo_up=up
    580     IF (PRESENT(down)) halo_down=down
    581 
    582     IF (PRESENT(old_dist)) THEN
    583       CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
    584     ELSE
    585       CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    586     ENDIF
     675    TYPE(distrib),INTENT(IN) :: old_dist
     676    REAL, DIMENSION(old_dist%jjb_u:,:,:,:),INTENT(IN)     :: FieldS
     677    REAL, DIMENSION(new_dist%jjb_u:,:,:,:),INTENT(OUT)    :: FieldR
     678    INTEGER,OPTIONAL,INTENT(IN)       :: up
     679    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     680    TYPE(request),INTENT(INOUT)         :: a_request
     681
     682    INTEGER                           :: halo_up
     683    INTEGER                           :: halo_down
     684    INTEGER                           :: ll
     685       
     686   
     687    halo_up=0
     688    halo_down=0
     689    IF (PRESENT(up))   halo_up=up
     690    IF (PRESENT(down)) halo_down=down
     691   
     692    ll=size(FieldS,3)*size(FieldS,4)
     693   
     694    CALL  Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     695   
     696  END SUBROUTINE  Register_SwapField3d_u2d_bis
     697
     698
     699
     700
     701
     702
     703
     704  SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,up,down)
     705  USE parallel_lmdz
     706  USE dimensions_mod
     707      IMPLICIT NONE
     708   
     709    TYPE(distrib),INTENT(IN)          :: new_dist
     710    REAL, DIMENSION(current_dist%ijb_v:),INTENT(IN)     :: FieldS
     711    REAL, DIMENSION(new_dist%ijb_v:),INTENT(OUT)    :: FieldR
     712    INTEGER,OPTIONAL,INTENT(IN)       :: up
     713    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     714    TYPE(request),INTENT(INOUT)         :: a_request
     715
     716    INTEGER                           :: halo_up
     717    INTEGER                           :: halo_down
     718   
     719   
     720    halo_up=0
     721    halo_down=0
     722    IF (PRESENT(up))   halo_up=up
     723    IF (PRESENT(down)) halo_down=down
     724
     725    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    587726       
    588727  END SUBROUTINE  Register_SwapField1d_v
    589728
    590 
    591   SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    592   USE parallel_lmdz
    593   USE dimensions_mod
    594       IMPLICIT NONE
    595    
    596     REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
    597     REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
    598     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     729  SUBROUTINE Register_SwapField1d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     730  USE parallel_lmdz
     731  USE dimensions_mod
     732      IMPLICIT NONE
     733   
    599734    TYPE(distrib),INTENT(IN)          :: new_dist
     735    TYPE(distrib),INTENT(IN) :: old_dist
     736    REAL, DIMENSION(old_dist%ijb_v:),INTENT(IN)     :: FieldS
     737    REAL, DIMENSION(new_dist%ijb_v:),INTENT(OUT)    :: FieldR
     738    INTEGER,OPTIONAL,INTENT(IN)       :: up
     739    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     740    TYPE(request),INTENT(INOUT)         :: a_request
     741
     742    INTEGER                           :: halo_up
     743    INTEGER                           :: halo_down
     744   
     745   
     746    halo_up=0
     747    halo_down=0
     748    IF (PRESENT(up))   halo_up=up
     749    IF (PRESENT(down)) halo_down=down
     750
     751    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
     752       
     753  END SUBROUTINE  Register_SwapField1d_v_bis
     754
     755
     756  SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,up,down)
     757  USE parallel_lmdz
     758  USE dimensions_mod
     759      IMPLICIT NONE
     760   
     761    TYPE(distrib),INTENT(IN)          :: new_dist
     762    REAL, DIMENSION(current_dist%ijb_v:,:),INTENT(IN)     :: FieldS
     763    REAL, DIMENSION(new_dist%ijb_v:,:),INTENT(OUT)    :: FieldR
    600764    INTEGER,OPTIONAL,INTENT(IN)       :: up
    601765    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    614778    ll=size(FieldS,2)
    615779   
    616     IF (PRESENT(old_dist)) THEN
    617       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    618     ELSE
    619       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    620     ENDIF
     780    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    621781   
    622782  END SUBROUTINE  Register_SwapField2d_v1d
    623    
    624 
    625   SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    626   USE parallel_lmdz
    627   USE dimensions_mod
    628       IMPLICIT NONE
    629    
    630     REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
    631     REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
    632     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     783 
     784  SUBROUTINE Register_SwapField2d_v1d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     785  USE parallel_lmdz
     786  USE dimensions_mod
     787      IMPLICIT NONE
     788   
    633789    TYPE(distrib),INTENT(IN)          :: new_dist
     790    TYPE(distrib),INTENT(IN)          :: old_dist
     791    REAL, DIMENSION(old_dist%ijb_v:,:),INTENT(IN)     :: FieldS
     792    REAL, DIMENSION(new_dist%ijb_v:,:),INTENT(OUT)    :: FieldR
    634793    INTEGER,OPTIONAL,INTENT(IN)       :: up
    635794    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    646805    IF (PRESENT(down)) halo_down=down
    647806   
     807    ll=size(FieldS,2)
     808   
     809    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     810   
     811  END SUBROUTINE  Register_SwapField2d_v1d_bis
     812 
     813   
     814
     815  SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,up,down)
     816  USE parallel_lmdz
     817  USE dimensions_mod
     818      IMPLICIT NONE
     819   
     820    TYPE(distrib),INTENT(IN)          :: new_dist
     821    REAL, DIMENSION(current_dist%ijb_v:,:,:),INTENT(IN)     :: FieldS
     822    REAL, DIMENSION(new_dist%ijb_v:,:,:),INTENT(OUT)    :: FieldR
     823    INTEGER,OPTIONAL,INTENT(IN)       :: up
     824    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     825    TYPE(request),INTENT(INOUT)         :: a_request
     826
     827    INTEGER                           :: halo_up
     828    INTEGER                           :: halo_down
     829    INTEGER                           :: ll
     830       
     831   
     832    halo_up=0
     833    halo_down=0
     834    IF (PRESENT(up))   halo_up=up
     835    IF (PRESENT(down)) halo_down=down
     836   
    648837    ll=size(FieldS,2)*size(FieldS,3)
    649838   
    650     IF (PRESENT(old_dist)) THEN
    651       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    652     ELSE
    653       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    654     ENDIF
     839    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    655840   
    656841  END SUBROUTINE  Register_SwapField3d_v
    657842
    658 
    659 
    660 
    661   SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    662   USE parallel_lmdz
    663   USE dimensions_mod
    664       IMPLICIT NONE
    665    
    666     REAL, DIMENSION(:,:),INTENT(IN)     :: FieldS
    667     REAL, DIMENSION(:,:),INTENT(OUT)    :: FieldR
    668     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
    669     TYPE(distrib),OPTIONAL,INTENT(IN)          :: new_dist !LF
    670     INTEGER,OPTIONAL,INTENT(IN)       :: up
    671     INTEGER,OPTIONAL,INTENT(IN)       :: down     
    672     TYPE(request),INTENT(INOUT)         :: a_request
    673 
    674     INTEGER                           :: halo_up
    675     INTEGER                           :: halo_down
    676    
    677    
    678     halo_up=0
    679     halo_down=0
    680     IF (PRESENT(up))   halo_up=up
    681     IF (PRESENT(down)) halo_down=down
    682 
    683     IF (PRESENT(old_dist)) THEN
    684       CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
    685     ELSE
    686       CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    687     ENDIF
     843  SUBROUTINE Register_SwapField3d_v_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     844  USE parallel_lmdz
     845  USE dimensions_mod
     846      IMPLICIT NONE
     847   
     848    TYPE(distrib),INTENT(IN)          :: new_dist
     849    TYPE(distrib),INTENT(IN) :: old_dist
     850    REAL, DIMENSION(old_dist%ijb_v:,:,:),INTENT(IN)     :: FieldS
     851    REAL, DIMENSION(new_dist%ijb_v:,:,:),INTENT(OUT)    :: FieldR
     852    INTEGER,OPTIONAL,INTENT(IN)       :: up
     853    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     854    TYPE(request),INTENT(INOUT)         :: a_request
     855
     856    INTEGER                           :: halo_up
     857    INTEGER                           :: halo_down
     858    INTEGER                           :: ll
     859       
     860   
     861    halo_up=0
     862    halo_down=0
     863    IF (PRESENT(up))   halo_up=up
     864    IF (PRESENT(down)) halo_down=down
     865   
     866    ll=size(FieldS,2)*size(FieldS,3)
     867   
     868    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     869   
     870  END SUBROUTINE  Register_SwapField3d_v_bis
     871
     872
     873
     874
     875  SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
     876  USE parallel_lmdz
     877  USE dimensions_mod
     878      IMPLICIT NONE
     879   
     880    TYPE(distrib),INTENT(IN)          :: new_dist !LF
     881    REAL, DIMENSION(current_dist%jjb_v:,:),INTENT(IN)     :: FieldS
     882    REAL, DIMENSION(new_dist%jjb_v:,:),INTENT(OUT)    :: FieldR
     883    INTEGER,OPTIONAL,INTENT(IN)       :: up
     884    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     885    TYPE(request),INTENT(INOUT)         :: a_request
     886
     887    INTEGER                           :: halo_up
     888    INTEGER                           :: halo_down
     889   
     890   
     891    halo_up=0
     892    halo_down=0
     893    IF (PRESENT(up))   halo_up=up
     894    IF (PRESENT(down)) halo_down=down
     895
     896    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,current_dist,new_dist,halo_up,halo_down,a_request)
    688897       
    689898  END SUBROUTINE  Register_SwapField1d_v2d
    690899
    691 
    692   SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    693   USE parallel_lmdz
    694   USE dimensions_mod
    695       IMPLICIT NONE
    696    
    697     REAL, DIMENSION(:,:,:),INTENT(IN)     :: FieldS
    698     REAL, DIMENSION(:,:,:),INTENT(OUT)    :: FieldR
    699     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     900  SUBROUTINE Register_SwapField1d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     901  USE parallel_lmdz
     902  USE dimensions_mod
     903      IMPLICIT NONE
     904   
     905    TYPE(distrib),INTENT(IN)          :: new_dist !LF
     906    TYPE(distrib),INTENT(IN) :: old_dist
     907    REAL, DIMENSION(old_dist%jjb_v:,:),INTENT(IN)     :: FieldS
     908    REAL, DIMENSION(new_dist%jjb_v:,:),INTENT(OUT)    :: FieldR
     909    INTEGER,OPTIONAL,INTENT(IN)       :: up
     910    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     911    TYPE(request),INTENT(INOUT)         :: a_request
     912
     913    INTEGER                           :: halo_up
     914    INTEGER                           :: halo_down
     915   
     916   
     917    halo_up=0
     918    halo_down=0
     919    IF (PRESENT(up))   halo_up=up
     920    IF (PRESENT(down)) halo_down=down
     921
     922    CALL  Register_SwapField_gen_v(FieldS,FieldR,1,old_dist,new_dist,halo_up,halo_down,a_request)
     923       
     924  END SUBROUTINE  Register_SwapField1d_v2d_bis
     925
     926
     927  SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
     928  USE parallel_lmdz
     929  USE dimensions_mod
     930      IMPLICIT NONE
     931   
    700932    TYPE(distrib),INTENT(IN)          :: new_dist
     933    REAL, DIMENSION(current_dist%jjb_v:,:,:),INTENT(IN)     :: FieldS
     934    REAL, DIMENSION(new_dist%jjb_v:,:,:),INTENT(OUT)    :: FieldR
    701935    INTEGER,OPTIONAL,INTENT(IN)       :: up
    702936    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    715949    ll=size(FieldS,3)
    716950   
    717     IF (PRESENT(old_dist)) THEN
    718       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    719     ELSE
    720       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    721     ENDIF
     951    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    722952   
    723953  END SUBROUTINE  Register_SwapField2d_v2d
    724954   
    725 
    726   SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    727   USE parallel_lmdz
    728   USE dimensions_mod
    729       IMPLICIT NONE
    730    
    731     REAL, DIMENSION(:,:,:,:),INTENT(IN)     :: FieldS
    732     REAL, DIMENSION(:,:,:,:),INTENT(OUT)    :: FieldR
    733     TYPE(distrib),OPTIONAL,INTENT(IN) :: old_dist
     955  SUBROUTINE Register_SwapField2d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     956  USE parallel_lmdz
     957  USE dimensions_mod
     958      IMPLICIT NONE
     959   
    734960    TYPE(distrib),INTENT(IN)          :: new_dist
     961    TYPE(distrib),INTENT(IN) :: old_dist
     962    REAL, DIMENSION(old_dist%jjb_v:,:,:),INTENT(IN)     :: FieldS
     963    REAL, DIMENSION(new_dist%jjb_v:,:,:),INTENT(OUT)    :: FieldR
    735964    INTEGER,OPTIONAL,INTENT(IN)       :: up
    736965    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     
    747976    IF (PRESENT(down)) halo_down=down
    748977   
     978    ll=size(FieldS,3)
     979   
     980    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     981   
     982  END SUBROUTINE  Register_SwapField2d_v2d_bis
     983   
     984
     985  SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,up,down)
     986  USE parallel_lmdz
     987  USE dimensions_mod
     988      IMPLICIT NONE
     989   
     990    TYPE(distrib),INTENT(IN)          :: new_dist
     991    REAL, DIMENSION(current_dist%jjb_v:,:,:,:),INTENT(IN)     :: FieldS
     992    REAL, DIMENSION(new_dist%jjb_v:,:,:,:),INTENT(OUT)    :: FieldR
     993    INTEGER,OPTIONAL,INTENT(IN)       :: up
     994    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     995    TYPE(request),INTENT(INOUT)         :: a_request
     996
     997    INTEGER                           :: halo_up
     998    INTEGER                           :: halo_down
     999    INTEGER                           :: ll
     1000       
     1001   
     1002    halo_up=0
     1003    halo_down=0
     1004    IF (PRESENT(up))   halo_up=up
     1005    IF (PRESENT(down)) halo_down=down
     1006   
    7491007    ll=size(FieldS,3)*size(FieldS,4)
    7501008   
    751     IF (PRESENT(old_dist)) THEN
    752       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
    753     ELSE
    754       CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    755     ENDIF
     1009    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,current_dist,new_dist,halo_up,halo_down,a_request)
    7561010   
    7571011  END SUBROUTINE  Register_SwapField3d_v2d
     1012 
     1013  SUBROUTINE Register_SwapField3d_v2d_bis(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
     1014  USE parallel_lmdz
     1015  USE dimensions_mod
     1016      IMPLICIT NONE
     1017   
     1018    TYPE(distrib),INTENT(IN)          :: new_dist
     1019    TYPE(distrib),INTENT(IN) :: old_dist
     1020    REAL, DIMENSION(old_dist%jjb_v:,:,:,:),INTENT(IN)     :: FieldS
     1021    REAL, DIMENSION(new_dist%jjb_v:,:,:,:),INTENT(OUT)    :: FieldR
     1022    INTEGER,OPTIONAL,INTENT(IN)       :: up
     1023    INTEGER,OPTIONAL,INTENT(IN)       :: down     
     1024    TYPE(request),INTENT(INOUT)         :: a_request
     1025
     1026    INTEGER                           :: halo_up
     1027    INTEGER                           :: halo_down
     1028    INTEGER                           :: ll
     1029       
     1030   
     1031    halo_up=0
     1032    halo_down=0
     1033    IF (PRESENT(up))   halo_up=up
     1034    IF (PRESENT(down)) halo_down=down
     1035   
     1036    ll=size(FieldS,3)*size(FieldS,4)
     1037   
     1038    CALL  Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,halo_up,halo_down,a_request)
     1039   
     1040  END SUBROUTINE  Register_SwapField3d_v2d_bis
    7581041 
    7591042 
  • LMDZ5/branches/testing/libf/dyn3dpar/conf_gcm.F90

    r2258 r2471  
    324324  CALL getin('dissip_deltaz',dissip_deltaz )
    325325  CALL getin('dissip_zref',dissip_zref )
     326
     327  ! ngroup
     328  ngroup=3
     329  CALL getin('ngroup',ngroup)
    326330
    327331  ! top_bound sponge: only active if ok_strato=.true. and iflag_top_bound!=0
  • LMDZ5/branches/testing/libf/dyn3dpar/groupe_p.F

    r1910 r2471  
    2020#include "comvert.h"
    2121
    22       integer ngroup
    23       parameter (ngroup=3)
     22!     integer ngroup
     23!     parameter (ngroup=3)
    2424
    2525
  • LMDZ5/branches/testing/libf/dyn3dpar/groupeun_p.F

    r1910 r2471  
    1212      REAL q(iip1,jjmax,llmax)
    1313
    14       INTEGER ngroup
    15       PARAMETER (ngroup=3)
     14!     INTEGER ngroup
     15!     PARAMETER (ngroup=3)
    1616
    1717      REAL airecn,qn
     
    3838      LOGICAL, SAVE :: first = .TRUE.
    3939!$OMP THREADPRIVATE(first)
    40       INTEGER,SAVE :: i_index(iim,ngroup)
     40!     INTEGER,SAVE :: i_index(iim,ngroup)
    4141      INTEGER      :: offset
    42       REAL         :: qsum(iim/ngroup)
     42!     REAL         :: qsum(iim/ngroup)
    4343
    4444      IF (first) THEN
     
    143143#include "comgeom2.h"
    144144
    145       INTEGER ngroup
    146       PARAMETER (ngroup=3)
     145!     INTEGER ngroup
     146!     PARAMETER (ngroup=3)
    147147
    148148      REAL airen,airecn
  • LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/ce0l.F90

    r2435 r2471  
    2727  USE iniphysiq_mod,  ONLY: iniphysiq
    2828  USE mod_const_mpi,  ONLY: comm_lmdz
    29 #ifdef inca
    30   USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic
    31 #endif
    3229#ifdef CPP_PARA
    3330  USE mod_const_mpi,  ONLY: init_const_mpi
    34   USE parallel_lmdz,  ONLY: init_parallel, mpi_rank, omp_rank, mpi_size
     31  USE parallel_lmdz,  ONLY: init_parallel, mpi_rank, omp_rank
    3532  USE bands,          ONLY: read_distrib, distrib_phys
    3633  USE mod_hallo,      ONLY: init_mod_hallo
     
    116113
    117114!--- Tracers initializations
    118   IF (type_trac == 'inca') THEN
    119 #ifdef INCA
    120     CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday,&
    121                          nbsrf,is_oce,is_sic,is_ter,is_lic,calend)
    122     CALL init_inca_para(iim,jjp1,llm,klon_glo,mpi_size,distrib_phys,&
    123                         COMM_LMDZ)
    124     WRITE(lunout,*)'nbtr =' , nbtr
    125 #endif
    126   END IF
    127115  CALL infotrac_init()
    128116
  • LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90

    r2435 r2471  
    8686  USE conf_phys_m, ONLY: conf_phys
    8787  USE init_ssrf_m, ONLY: start_init_subsurf
     88  !use ioipsl_getincom
    8889  IMPLICIT NONE
    8990!-------------------------------------------------------------------------------
     
    9798  LOGICAL            :: read_mask
    9899  REAL               :: phystep, dummy
    99   REAL, DIMENSION(SIZE(masque,1),SIZE(masque,2)) :: masque_tmp
     100  REAL, DIMENSION(SIZE(masque,1),SIZE(masque,2)) :: masque_tmp,phiso
    100101  REAL, DIMENSION(klon)               :: sn, rugmer, run_off_lic_0, fder
    101102  REAL, DIMENSION(klon,nbsrf)         :: qsolsrf, snsrf
     
    115116  INTEGER :: read_climoz                        !--- Read ozone climatology
    116117  REAL    :: alp_offset
     118  LOGICAL :: filtre_oro=.false.
    117119
    118120  deg2rad= pi/180.0
     
    142144  read_mask=ANY(masque/=-99999.); masque_tmp=masque
    143145  CALL start_init_orog(rlonv, rlatu, phis, masque_tmp)
     146
     147  CALL getin('filtre_oro',filtre_oro)
     148  IF (filtre_oro) CALL filtreoro(size(phis,1),size(phis,2),phis,masque_tmp,rlatu)
     149
    144150  WRITE(fmt,"(i4,'i1)')")iml ; fmt='('//ADJUSTL(fmt)
    145151  IF(.NOT.read_mask) THEN                       !--- Keep mask form orography
     
    447453!
    448454!-------------------------------------------------------------------------------
     455!
     456!*******************************************************************************
     457
     458SUBROUTINE filtreoro(imp1,jmp1,phis,masque,rlatu)
     459
     460IMPLICIT NONE
     461
     462  INTEGER imp1,jmp1
     463  REAL, DIMENSION(imp1,jmp1) :: phis,masque
     464  REAL, DIMENSION(jmp1) :: rlatu
     465  REAL, DIMENSION(imp1) :: wwf
     466  REAL, DIMENSION(imp1,jmp1) :: phiso
     467  INTEGER :: ifiltre,ifi,ii,i,j
     468  REAL :: coslat0,ssz
     469
     470  coslat0=0.5
     471  phiso=phis
     472  do j=2,jmp1-1
     473     print*,'avant if ',cos(rlatu(j)),coslat0
     474     if (cos(rlatu(j))<coslat0) then
     475         ! nb de pts affectes par le filtrage de part et d'autre du pt
     476         ifiltre=(coslat0/cos(rlatu(j))-1.)/2.
     477         wwf=0.
     478         do i=1,ifiltre
     479            wwf(i)=1.
     480         enddo
     481         wwf(ifiltre+1)=(coslat0/cos(rlatu(j))-1.)/2.-ifiltre
     482         do i=1,imp1-1
     483            if (masque(i,j)>0.9) then
     484               ssz=phis(i,j)
     485               do ifi=1,ifiltre+1
     486                  ii=i+ifi
     487                  if (ii>imp1-1) ii=ii-imp1+1
     488                  ssz=ssz+wwf(ifi)*phis(ii,j)
     489                  ii=i-ifi
     490                  if (ii<1) ii=ii+imp1-1
     491                  ssz=ssz+wwf(ifi)*phis(ii,j)
     492               enddo
     493               phis(i,j)=ssz*cos(rlatu(j))/coslat0
     494            endif
     495         enddo
     496         print*,'j=',j,coslat0/cos(rlatu(j)), (1.+2.*sum(wwf))*cos(rlatu(j))/coslat0
     497     endif
     498  enddo
     499  call dump2d(imp1,jmp1,phis,'phis ')
     500  call dump2d(imp1,jmp1,masque,'masque ')
     501  call dump2d(imp1,jmp1,phis-phiso,'dphis ')
     502
     503END SUBROUTINE filtreoro
    449504
    450505
    451506END MODULE etat0phys
    452 !
    453 !*******************************************************************************
    454 
  • LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90

    r2435 r2471  
    4747#ifdef INCA
    4848  USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic
    49   USE parallel_lmdz, ONLY : mpi_size
    50   USE mod_const_mpi, ONLY : COMM_LMDZ
     49#ifdef CPP_PARA
     50  USE parallel_lmdz, ONLY : mpi_size, mpi_rank
    5151  USE bands, ONLY : distrib_phys
     52#endif
    5253  USE mod_phys_lmdz_omp_data, ONLY: klon_omp
    5354#endif
     
    115116  REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:)
    116117!$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi)
     118
     119#ifndef CPP_PARA
     120  INTEGER,PARAMETER :: mpi_rank=0
     121  INTEGER, PARAMETER :: mpi_size = 1
     122  INTEGER :: distrib_phys(mpi_rank:mpi_rank)=(jjm-1)*iim+2
     123#endif
    117124
    118125  ! Initialize Physics distibution and parameters and interface with dynamics
     
    295302#ifdef INCA
    296303     call init_const_lmdz( &
    297           anneeref,dayref, &
    298           iphysiq,day_step,nday,  &
    299           nbsrf, is_oce,is_sic, &
    300           is_ter,is_lic, calend)
     304          anneeref,dayref, iphysiq,day_step,nday,  &
     305          nbsrf, is_oce,is_sic, is_ter,is_lic, calend)
    301306     call init_inca_para( &
    302307          nbp_lon,nbp_lat,nbp_lev,klon_glo,mpi_size, &
    303           distrib_phys,COMM_LMDZ)
     308          distrib_phys,communicator)
    304309#endif
    305310  END IF
  • LMDZ5/branches/testing/libf/obsolete/LIST.txt

    r2408 r2471  
    66phylmd/mkstat.F90             2320
    77phylmd/inistats.F90           2320
     8misc/regr1_step_av_m.F90      2439
  • LMDZ5/branches/testing/libf/phylmd/cdrag.F90

    r2408 r2471  
    114114  LOGICAL, PARAMETER    :: zxli=.FALSE. ! calcul des cdrags selon Laurent Li
    115115  REAL, DIMENSION(klon) :: zcdn_m, zcdn_h         ! Drag coefficient in neutral conditions
     116  REAL zzzcd
    116117!
    117118! Fonctions thermodynamiques et fonctions d'instabilite
     
    176177
    177178
    178 ! Coefficients CD neutres pour m et h
    179      zcdn_m(i) = (CKAP/LOG(1.+zgeop1(i)/(RG*z0m(i))))**2
    180      zcdn_h(i) = (CKAP/LOG(1.+zgeop1(i)/(RG*z0h(i))))**2
     179! Coefficients CD neutres pour m et h : k^2/ln(z/z0) et k^2/(ln(z/z0)*ln(z/z0h))
     180     zzzcd=CKAP/LOG(1.+zgeop1(i)/(RG*z0m(i)))
     181     zcdn_m(i) = zzzcd*zzzcd
     182     zcdn_h(i) = zzzcd*(CKAP/LOG(1.+zgeop1(i)/(RG*z0m(i))))
    181183
    182184     IF (zri(i) .GT. 0.) THEN      ! situation stable
  • LMDZ5/branches/testing/libf/phylmd/compbl.h

    r2187 r2471  
    22      ! $Header$
    33      !
    4 !jyg+nrlmd<
    5 !!!      integer iflag_pbl
    6 !!!      common/compbl/iflag_pbl
    7       integer iflag_pbl,iflag_pbl_split
    8       common/compbl/iflag_pbl,iflag_pbl_split
    9 !>jyg+nrlmd
     4!jyg+al1<
     5!!      integer iflag_pbl,iflag_pbl_split
     6!!      common/compbl/iflag_pbl,iflag_pbl_split
     7      integer iflag_pbl, iflag_pbl_split, iflag_order2_sollw
     8      common/compbl/iflag_pbl, iflag_pbl_split, iflag_order2_sollw
     9!>jyg+al1
    1010!$OMP THREADPRIVATE(/compbl/)
  • LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90

    r2435 r2471  
    179179    INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
    180180    INTEGER,SAVE :: iflag_pbl_split_omp
     181    INTEGER,SAVE :: iflag_order2_sollw_omp
    181182    Integer, save :: lev_histins_omp, lev_histLES_omp
    182183    INTEGER, SAVE :: lev_histdayNMC_omp
     
    12871288    call getin('iflag_pbl_split',iflag_pbl_split_omp)
    12881289    !
     1290    !Config Key  = iflag_order2_sollw
     1291    !Config Desc =
     1292    !Config Def  = 0
     1293    !Config Help =
     1294    !
     1295    iflag_order2_sollw_omp = 0
     1296    call getin('iflag_order2_sollw',iflag_order2_sollw_omp)
     1297    !
    12891298    !Config Key  = iflag_thermals
    12901299    !Config Desc =
     
    17031712    f_gust_wk_omp = 0.
    17041713    call getin('f_gust_wk',f_gust_wk_omp)
     1714    !
     1715    !Config Key  = iflag_z0_oce
     1716    !Config Desc = 0 (z0h=z0m), 1 (diff. equ. for z0h and z0m), -1 (z0m=z0h=z0min)
     1717    !Config Def  = 0   ! z0h = z0m
     1718    !Config Help =
    17051719    !
    17061720    iflag_z0_oce_omp=0
     
    20252039    iflag_pbl = iflag_pbl_omp
    20262040    iflag_pbl_split = iflag_pbl_split_omp
     2041    iflag_order2_sollw = iflag_order2_sollw_omp
    20272042    lev_histhf = lev_histhf_omp
    20282043    lev_histday = lev_histday_omp
     
    22242239       END IF
    22252240    END IF
     2241
     2242    ! Flag_aerosol cannot be to zero if we are in coupled mode for aerosol
     2243    IF (aerosol_couple .AND. flag_aerosol .eq. 0 ) THEN
     2244       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if aerosol_couple=y ', 1)
     2245    ENDIF
     2246
     2247    ! flag_aerosol need to be different to zero if ok_cdnc is activated
     2248    IF (ok_cdnc .AND. flag_aerosol .eq. 0) THEN
     2249       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if ok_cdnc is activated ', 1)
     2250    ENDIF
    22262251
    22272252    ! ok_cdnc must be set to y if ok_aie is activated
     
    23472372    write(lunout,*)' iflag_pbl = ', iflag_pbl
    23482373    write(lunout,*)' iflag_pbl_split = ', iflag_pbl_split
     2374    write(lunout,*)' iflag_order2_sollw = ', iflag_order2_sollw
    23492375    write(lunout,*)' iflag_thermals = ', iflag_thermals
    23502376    write(lunout,*)' iflag_thermals_ed = ', iflag_thermals_ed
  • LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_mod.F90

    r2435 r2471  
    1616      INTEGER, DIMENSION(3), SAVE  :: cosp_nidfiles
    1717!$OMP THREADPRIVATE(cosp_outfilekeys, cosp_nidfiles)
    18       INTEGER, DIMENSION(3), SAVE  :: nhoricosp,nvert,nvertmcosp,nvertcol,nvertisccp,nvertp,nverttemp,nvertmisr
     18      INTEGER, DIMENSION(3), SAVE  :: nhoricosp,nvert,nvertmcosp,nvertcol,nvertbze, &
     19                                      nvertsratio,nvertisccp,nvertp,nverttemp,nvertmisr
    1920      REAL, DIMENSION(3), SAVE                :: zoutm_cosp
    20 !$OMP THREADPRIVATE(nhoricosp, nvert, nvertmcosp, nvertcol, nvertisccp, nvertp, zoutm_cosp, nverttemp, nvertmisr)
     21!$OMP THREADPRIVATE(nhoricosp, nvert,nvertmcosp,nvertcol,nvertsratio,nvertbze,nvertisccp,nvertp,zoutm_cosp,nverttemp,nvertmisr)
    2122      REAL, SAVE                   :: zdtimemoy_cosp
    2223!$OMP THREADPRIVATE(zdtimemoy_cosp)
     
    107108  TYPE(ctrl_outcosp), SAVE :: o_clcalipso2 = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), &
    108109         "clcalipso2", "CALIPSO Cloud Fraction Undetected by CloudSat", "1", (/ ('', i=1, 3) /))
    109 
     110  TYPE(ctrl_outcosp), SAVE :: o_cltlidarradar = ctrl_outcosp((/ .TRUE., .TRUE.,.TRUE. /), &         
     111         "cltlidarradar", "Lidar and Radar Total Cloud Fraction", "%", (/ ('', i=1, 3) /))
     112     
    110113! ISCCP vars
    111114  TYPE(ctrl_outcosp), SAVE :: o_sunlit = ctrl_outcosp((/ .TRUE., .TRUE., .TRUE. /), &
     
    220223
    221224!!! Variables locales
    222   integer                  :: idayref, iff, ii
    223   real                     :: zjulian,zjulian_start
    224   real,dimension(Ncolumns) :: column_ax
     225  integer                   :: idayref, iff, ii
     226  real                      :: zjulian,zjulian_start
     227  real,dimension(Ncolumns)  :: column_ax
     228  real,dimension(2,SR_BINS) :: sratio_bounds
     229  real,dimension(SR_BINS)   ::  sratio_ax
    225230  CHARACTER(LEN=20), DIMENSION(3)  :: chfreq = (/ '1day', '1d', '3h' /)           
    226231
     
    239244    ! Initialisations (Valeurs par defaut)
    240245
     246!! Definition valeurs axes
    241247    do ii=1,Ncolumns
    242248      column_ax(ii) = real(ii)
    243249    enddo
    244250
     251!    do ii=1,DBZE_BINS
     252!     dbze_ax(i) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5)
     253!    enddo
     254
     255!   sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper
     256!                                         limits from lmd_ipsl_stats.f90
     257!   sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)
     258!   sratio_bounds(1,1)         = 0.0
     259!   sratio_bounds(2,SR_BINS)   = 1.e5 ! This matches with Chepfer et al., JGR,
     260!                                    ! 2009. However, it is not consistent
     261                                     ! with the upper limit in
     262                                     ! lmd_ipsl_stats.f90, which is
     263                                     ! LIDAR_UNDEF-1=998.999
     264!    sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0
    245265
    246266    cosp_outfilenames(1) = 'histmthCOSP'
     
    303323   CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP)
    304324   CALL wxios_add_vaxis("cth16", MISR_N_CTH, MISR_CTH)
     325!   CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax)
     326!   CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax)
    305327#endif
    306328   
     
    343365      CALL histvert(cosp_nidfiles(iff),"temp","temperature","C",LIDAR_NTEMP,LIDAR_PHASE_TEMP,nverttemp(iff))                                       
    344366      CALL histvert(cosp_nidfiles(iff),"cth16","altitude","m",MISR_N_CTH,MISR_CTH,nvertmisr(iff))                                                                                                 
     367!      CALL histvert(cosp_nidfiles(iff),"dbze","equivalent_reflectivity_factor","dBZ",DBZE_BINS,dbze_ax,nvertbze(iff))
     368     
     369!      CALL histvert(cosp_nidfiles(iff),"scatratio","backscattering_ratio","1",SR_BINS,sratio_ax,nvertsratio(iff))
     370     
    345371!!! Valeur indefinie en cas IOIPSL
    346372     Cosp_fill_value=0.
  • LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90

    r2435 r2471  
    209209                           stradar%lidar_only_freq_cloud = 0.0
    210210   CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)
     211   where(stradar%radar_lidar_tcc == R_UNDEF) &
     212                           stradar%radar_lidar_tcc = 0.0
     213   CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)
    211214 endif
    212215
  • LMDZ5/branches/testing/libf/phylmd/dyn1d/1DUTILS.h

    r2408 r2471  
    43444344!
    43454345   INTEGER k,i
    4346    REAL zx_qs, rh, tnew, d_rh
     4346   REAL zx_qs, rh, tnew, d_rh, rhnew
    43474347
    43484348! Declaration des constantes et des fonctions thermodynamiques
     
    43614361        print *,'temp ',t
    43624362        print *,'hum ',q
     4363!
    43634364        DO k = 1,klev
    43644365         DO i = 1,klon
    4365 !!           IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN
     4366           IF (paprs(i,1)-pplay(i,k) .GT. 10000.) THEN
    43664367            IF (t(i,k).LT.RTT) THEN
    43674368               zx_qs = qsats(t(i,k))/(pplay(i,k))
     
    43744375            d_rh = 1./tau*(rh_targ(i,k)-rh)
    43754376!
    4376             tnew = t(i,k)+d_t(i,k)
     4377            tnew = t(i,k)+d_t(i,k)*dtime
     4378!jyg<
     4379!   Formule pour q :
     4380!                         d_q = (1/tau) [rh_targ*qsat(T_new) - q]
     4381!
     4382!  Cette formule remplace d_q = (1/tau) [rh_targ - rh] qsat(T_new)
     4383!   qui n'était pas correcte.
     4384!
    43774385            IF (tnew.LT.RTT) THEN
    43784386               zx_qs = qsats(tnew)/(pplay(i,k))
     
    43804388               zx_qs = qsatl(tnew)/(pplay(i,k))
    43814389            ENDIF
    4382             d_q(i,k) = d_q(i,k) + d_rh*zx_qs
    4383 !
    4384             print *,' k,d_t,rh,d_rh,d_q ',    &
    4385                       k,d_t(i,k),rh,d_rh,d_q(i,k)
    4386 !!           ENDIF
     4390!!            d_q(i,k) = d_q(i,k) + d_rh*zx_qs
     4391            d_q(i,k) = d_q(i,k) + (1./tau)*(rh_targ(i,k)*zx_qs - q(i,k))
     4392            rhnew = (q(i,k)+d_q(i,k)*dtime)/zx_qs
     4393!
     4394            print *,' k,d_t,rh,d_rh,rhnew,d_q ',    &
     4395                      k,d_t(i,k),rh,d_rh,rhnew,d_q(i,k)
     4396           ENDIF
    43874397!
    43884398         ENDDO
  • LMDZ5/branches/testing/libf/phylmd/dyn1d/lmdz1d.F90

    r2435 r2471  
    932932!   Call physiq :
    933933!---------------------------------------------------------------------
    934 
    935934       call physiq(ngrid,llm, &
    936             firstcall,lastcall,timestep, &
    937             plev,play,phi,phis,presnivs, &
    938             u,v, rot, temp,q,omega2, &
    939             du_phys,dv_phys,dt_phys,dq,dpsrf)
    940         firstcall=.false.
     935                    firstcall,lastcall,timestep, &
     936                    plev,play,phi,phis,presnivs, &
     937                    u,v, rot, temp,q,omega2, &
     938                    du_phys,dv_phys,dt_phys,dq,dpsrf)
     939                firstcall=.false.
    941940
    942941!---------------------------------------------------------------------
  • LMDZ5/branches/testing/libf/phylmd/ini_paramLMDZ_phy.h

    r2435 r2471  
    1010!
    1111       zstophy = pdtphys
    12        zout = mth_len*un_jour
     12       zout = -1
    1313!
    1414       idayref = day_ref
     
    3333                      "Excentricite","-", &
    3434                      1,1,nhori, 1,1,1, -99, 32, &
    35                       "ave", zstophy,zout)
     35                      "ave(X)", zstophy,zout)
    3636!
    3737       CALL histdef(nid_ctesGCM, "R_peri",  &
    3838                      "Equinoxe","-", &
    3939                      1,1,nhori, 1,1,1, -99, 32, &
    40                       "ave", zstophy,zout)
     40                      "ave(X)", zstophy,zout)
    4141!
    4242       CALL histdef(nid_ctesGCM, "R_incl",  &
    4343                      "Inclinaison","deg", &
    4444                      1,1,nhori, 1,1,1, -99, 32, &
    45                       "ave", zstophy,zout)
     45                      "ave(X)", zstophy,zout)
    4646!
    4747       CALL histdef(nid_ctesGCM, "solaire",  &
    4848                      "Constante solaire","W/m2", &
    4949                      1,1,nhori, 1,1,1, -99, 32, &
    50                       "ave", zstophy,zout)
     50                      "ave(X)", zstophy,zout)
    5151!
    5252       CALL histdef(nid_ctesGCM, "co2_ppm",  &
     
    7575                      "ave(X)", zstophy,zout)
    7676!
    77        CALL histdef(nid_ctesGCM, "bils", &
    78                       "Surface total heat flux", "W m-2", &
    79                       1,1,nhori, 1,1,1, -99, 32, &
    80                       "ave", zstophy,zout)
    81 !
    82        CALL histdef(nid_ctesGCM, "evap", &
    83                       "Evaporation", "kg m-2 s-1", &
    84                       1,1,nhori, 1,1,1, -99, 32, &
    85                       "ave", zstophy,zout)
    86 !
    87        CALL histdef(nid_ctesGCM, "evap_land", &
    88                       "Land evaporation", "kg m-2 s-1", &
    89                       1,1,nhori, 1,1,1, -99, 32, &
    90                       "ave", zstophy,zout)
    91 !
    92        CALL histdef(nid_ctesGCM, "flat", &
    93                       "Latent heat flux", "W m-2", &
    94                       1,1,nhori, 1,1,1, -99, 32, &
    95                       "ave", zstophy,zout)
    96 !
    97        CALL histdef(nid_ctesGCM, "nettop0", &
    98                       "Clear sky net downward radiatif flux at TOA",  &
    99                       "W m-2", &
    100                       1,1,nhori, 1,1,1, -99, 32, &
    101                       "ave", zstophy,zout)
    102 !
    103        CALL histdef(nid_ctesGCM, "nettop", &
    104                       "Net downward radiatif flux at TOA", "W m-2", &
    105                       1,1,nhori, 1,1,1, -99, 32, &
    106                       "ave", zstophy,zout)
    107 !
    108        CALL histdef(nid_ctesGCM, "precip", &
    109                       "Total precipitation (liq+sol)", "kg m-2 s-1", &
    110                       1,1,nhori, 1,1,1, -99, 32, &
    111                       "ave", zstophy,zout)
    112 !
    113        CALL histdef(nid_ctesGCM, "tsol", &
    114                       "Surface temperature", "K", &
    115                       1,1,nhori, 1,1,1, -99, 32, &
    116                       "ave", zstophy,zout)
    117 !
    118        CALL histdef(nid_ctesGCM, "t2m", &
    119                       "Temperature at 2m", "K", &
    120                       1,1,nhori, 1,1,1, -99, 32, &
    121                       "ave", zstophy,zout)
    122 !
    123        CALL histdef(nid_ctesGCM, "prw", &
    124                       "Precipitable water", "kg m-2", &
    125                       1,1,nhori, 1,1,1, -99, 32, &
    126                       "ave", zstophy,zout)
    12777!=================================================================
    12878!
  • LMDZ5/branches/testing/libf/phylmd/pbl_surface_mod.F90

    r2435 r2471  
    305305
    306306!!! nrlmd+jyg le 02/05/2011 et le 20/02/2012
    307 !!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: t_x       ! Température hors poche froide
    308 !!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: t_w       ! Température dans la poches froide
     307!!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: t_x       ! Temp\'erature hors poche froide
     308!!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: t_w       ! Temp\'erature dans la poches froide
    309309!!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: q_x       !
    310 !!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: q_w       ! Pareil pour l'humidité
     310!!    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: q_w       ! Pareil pour l'humidit\'e
    311311    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: wake_dlt  !temperature difference between (w) and (x) (K)
    312312    REAL, DIMENSION(klon,klev),   INTENT(IN)        :: wake_dlq  !humidity difference between (w) and (x) (K)
     
    522522!albedo SB <<<
    523523    REAL, DIMENSION(klon)              :: ztsol
     524    REAL, DIMENSION(klon)              :: meansqT ! mean square deviation of subsurface temperatures
    524525    REAL, DIMENSION(klon)              :: alb_m  ! mean albedo for whole SW interval
    525526    REAL, DIMENSION(klon,klev)         :: y_d_t, y_d_q, y_d_t_diss
     
    679680
    680681!!! jyg le 25/03/2013
    681 !!    Variables intermediaires pour le raccord des deux colonnes à la surface
     682!!    Variables intermediaires pour le raccord des deux colonnes \`a la surface
    682683    REAL   ::   dd_Ch
    683684    REAL   ::   dd_Cm
     
    11061107       ENDDO
    11071108    ENDDO
     1109!
     1110!<al1: second order corrections
     1111!- net = dwn -up; up=sig( T4 + 4sum%T3T' + 6sum%T2T'2 +...)
     1112   IF (iflag_order2_sollw == 1) THEN
     1113    meansqT(:) = 0. ! as working buffer
     1114    DO nsrf = 1, nbsrf
     1115     DO i = 1, klon
     1116      meansqT(i) = meansqT(i)+(ts(i,nsrf)-ztsol(i))**2 *pctsrf(i,nsrf)
     1117     END DO
     1118    END DO
     1119    DO nsrf = 1, nbsrf
     1120     DO i = 1, klon
     1121      sollw(i,nsrf) = sollw(i,nsrf) &
     1122                + 6.0*RSIGMA*ztsol(i)**2 *(meansqT(i)-(ztsol(i)-ts(i,nsrf))**2)
     1123     ENDDO
     1124    ENDDO
     1125   ENDIF   ! iflag_order2_sollw == 1
     1126!>al1
    11081127
    11091128!****************************************************************************************
     
    15721591
    15731592!!! nrlmd le 13/06/2011
    1574 !----- On finit le calcul des coefficients d'échange:on multiplie le cdrag par le module du vent et la densité dans la première couche
     1593!----- On finit le calcul des coefficients d'\'echange:on multiplie le cdrag par le module du vent et la densit\'e dans la premi\`ere couche
    15751594!          Kech_h_x(j) = ycdragh_x(j) * &
    15761595!             (1.0+SQRT(yu_x(j,1)**2+yv_x(j,1)**2)) * &
     
    16641683       ENDIF
    16651684!
    1666 ! Calcul des coef A, B équivalents dans la couche 1
     1685! Calcul des coef A, B \'equivalents dans la couche 1
    16671686!
    16681687       AcoefH(j) = AcoefH_x(j) + ywake_s(j)*(Kech_H_wp(j)/Kech_Hp(j))*dd_AH
     
    16841703
    16851704!
    1686 ! Calcul des cdrag équivalents dans la couche
     1705! Calcul des cdrag \'equivalents dans la couche
    16871706!
    16881707       ycdragm(j) = ycdragm_x(j) + ywake_s(j)*dd_CM
    16891708       ycdragh(j) = ycdragh_x(j) + ywake_s(j)*dd_CH
    16901709!
    1691 ! Calcul de T, q, u et v équivalents dans la couche 1
     1710! Calcul de T, q, u et v \'equivalents dans la couche 1
    16921711       yt(j,1) = yt_x(j,1) + ywake_s(j)*(Kech_h_w(j)/Kech_h(j))*dd_t
    16931712       yq(j,1) = yq_x(j,1) + ywake_s(j)*(Kech_h_w(j)/Kech_h(j))*dd_q
     
    19151934
    19161935          DO j = 1, knon
    1917             yt1_new=(1./RCPD)*(AcoefH(j)+BcoefH(j)*yfluxsens(j)*dtime)
    1918             ytsurf_new(j)=yt1_new-yfluxsens(j)/(Kech_h(j)*RCPD)
     1936            yt1_new=(1./RCPD)*(AcoefH(j)+BcoefH(j)*y_flux_t1(j)*dtime)
     1937            ytsurf_new(j)=yt1_new-y_flux_t1(j)/(Kech_h(j)*RCPD)
    19191938          ENDDO
    19201939
     
    19932012!!jyg!!         ENDIF
    19942013!!jyg!!
    1995 !!jyg!!!-----Calcul de ybeta (evap_réelle/evap_potentielle)
     2014!!jyg!!!-----Calcul de ybeta (evap_r\'eelle/evap_potentielle)
    19962015!!jyg!!!!!!! jyg le 23/02/2012
    19972016!!jyg!!!!!!!
     
    28112830       END DO
    28122831    END DO
     2832!
     2833!<al1 order 2 correction to zxtsol, for radiation computations (main atm effect of Ts)
     2834   IF (iflag_order2_sollw == 1) THEN
     2835    meansqT(:) = 0. ! as working buffer
     2836    DO nsrf = 1, nbsrf
     2837     DO i = 1, klon
     2838      meansqT(i) = meansqT(i)+(ts(i,nsrf)-zxtsol(i))**2 *pctsrf(i,nsrf)
     2839     END DO
     2840    END DO
     2841    zxtsol(:) = zxtsol(:)+1.5*meansqT(:)/zxtsol(:)
     2842   ENDIF   ! iflag_order2_sollw == 1
     2843!>al1
    28132844         
    28142845!!! jyg le 07/02/2012
  • LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90

    r2435 r2471  
    451451  real w0(klon)                                          ! Vitesse des thermiques au LCL
    452452  real w_conv(klon)                                      ! Vitesse verticale de grande \'echelle au LCL
    453   real tke0(klon,klev+1)                                 ! TKE au début du pas de temps
     453  real tke0(klon,klev+1)                                 ! TKE au d\'ebut du pas de temps
    454454  real therm_tke_max0(klon)                              ! TKE dans les thermiques au LCL
    455455  real env_tke_max0(klon)                                ! TKE dans l'environnement au LCL
     
    10631063        CALL getin_p('config_inca',config_inca)
    10641064
     1065     ELSE
     1066        config_inca='none' ! default
    10651067     END IF
     1068     
     1069     IF (aerosol_couple .AND. (config_inca /= "aero" .AND. config_inca /= "aeNP ")) THEN
     1070        abort_message = 'if aerosol_couple is activated, config_inca need to be aero or aeNP'
     1071        CALL abort_physic (modname,abort_message,1)
     1072     ENDIF
     1073
     1074
    10661075
    10671076     rnebcon0(:,:) = 0.0
     
    13661375             cell_area, &
    13671376             latitude_deg, &
    1368              longitude_de, &
     1377             longitude_deg, &
    13691378             presnivs, &
    13701379             calday, &
     
    17591768        else
    17601769
    1761 !CR: on ré-évapore eau liquide et glace
     1770!CR: on r\'e-\'evapore eau liquide et glace
    17621771
    17631772!        zdelta = MAX(0.,SIGN(1.,RTT-t_seri(i,k)))
     
    17711780        q_seri(i,k) = q_seri(i,k) + zb
    17721781        ql_seri(i,k) = 0.0
    1773 !on évapore la glace
     1782!on \'evapore la glace
    17741783        qs_seri(i,k) = 0.0
    17751784        d_t_eva(i,k) = za
     
    20942103           zx_qs  = zx_qs*zcor
    20952104        ELSE
    2096            IF (zx_t.LT.t_coup) THEN
     2105!!           IF (zx_t.LT.t_coup) THEN             !jyg
     2106           IF (zx_t.LT.rtt) THEN                  !jyg
    20972107              zx_qs = qsats(zx_t)/pplay(i,k)
    20982108           ELSE
     
    25812591  !
    25822592  !!! nrlmd le 22/03/2011---Si on met les poches hors des thermiques il faut rajouter cette
    2583   !------------------------- tendance calculée hors des poches froides
     2593  !------------------------- tendance calcul\'ee hors des poches froides
    25842594  !
    25852595  if (iflag_wake>=1) then
     
    26452655           DO i=1,klon
    26462656              IF (rneb(i,k)==0.) THEN
    2647 ! On ne tient compte des tendances qu'en dehors des nuages (c'est ï¿½|  dire
     2657! On ne tient compte des tendances qu'en dehors des nuages (c'est-\`a-dire
    26482658! a priri dans une region ou l'eau se reevapore).
    26492659                dt_dwn(i,k)= dt_dwn(i,k)+ &
     
    27962806         IF (mod(iflag_pbl_split/2,2) .EQ. 1) THEN
    27972807!  Si les thermiques ne sont presents que hors des poches, la tendance moyenne
    2798 !  associée doit etre multipliee par la fraction surfacique qu'ils couvrent.
     2808!  associ\'ee doit etre multipliee par la fraction surfacique qu'ils couvrent.
    27992809          DO k=1,klev
    28002810           DO i=1,klon
     
    33623372        zx_t = t_seri(i,k)
    33633373        IF (thermcep) THEN
    3364            if (iflag_ice_thermo.eq.0) then
     3374!!           if (iflag_ice_thermo.eq.0) then                 !jyg
    33653375           zdelta = MAX(0.,SIGN(1.,rtt-zx_t))
    3366            else
    3367            zdelta = MAX(0.,SIGN(1.,t_glace_min-zx_t))
    3368            endif
     3376!!           else                                            !jyg
     3377!!           zdelta = MAX(0.,SIGN(1.,t_glace_min-zx_t))      !jyg
     3378!!           endif                                           !jyg
    33693379           zx_qs  = r2es * FOEEW(zx_t,zdelta)/pplay(i,k)
    33703380           zx_qs  = MIN(0.5,zx_qs)
     
    33723382           zx_qs  = zx_qs*zcor
    33733383        ELSE
    3374            IF (zx_t.LT.t_coup) THEN
     3384!!           IF (zx_t.LT.t_coup) THEN             !jyg
     3385           IF (zx_t.LT.rtt) THEN                  !jyg
    33753386              zx_qs = qsats(zx_t)/pplay(i,k)
    33763387           ELSE
  • LMDZ5/branches/testing/libf/phylmd/regr_lat_time_climoz_m.F90

    r2408 r2471  
    6767
    6868    use mod_grid_phy_lmdz, ONLY : nbp_lat
    69     use regr1_step_av_m, only: regr1_step_av
     69    use regr1_conserv_m, only: regr1_conserv
    7070    use regr3_lint_m, only: regr3_lint
    7171    use netcdf95, only: handle_err, nf95_close, nf95_get_att, nf95_gw_var, &
     
    7676    use regular_lonlat_mod, only : boundslat_reg, south
    7777    use nrtype, only: pi
     78    use slopes_m, only: slopes
    7879
    7980    integer, intent(in):: read_climoz ! read ozone climatology
     
    9293    ! (of input data, converted to rad, sorted in strictly ascending order)
    9394
    94     real, allocatable:: lat_in_edg(:)
    95     ! (edges of latitude intervals for input data, in rad, in strictly
     95    real, allocatable:: sin_lat_in_edg(:)
     96    ! (sine of edges of latitude intervals for input data, in rad, in strictly
    9697    ! ascending order)
    9798
     
    115116
    116117    real, allocatable:: o3_regr_lat(:, :, :, :)
    117     ! (jjm + 1, n_plev, 0:13, read_climoz)
     118    ! (nbp_lat, n_plev, 0:13, read_climoz)
    118119    ! mean of "o3_in" over a latitude interval of LMDZ
    119120    ! First dimension is latitude interval.
    120121    ! The latitude interval for "o3_regr_lat(j,:, :, :)" contains "rlatu(j)".
    121     ! If "j" is between 2 and "jjm" then the interval is:
     122    ! If "j" is between 2 and "nbp_lat - 1" then the interval is:
    122123    ! [rlatv(j), rlatv(j-1)]
    123     ! If "j" is 1 or "jjm + 1" then the interval is:
     124    ! If "j" is 1 or "nbp_lat" then the interval is:
    124125    ! [rlatv(1), pi / 2]
    125126    ! or:
    126     ! [- pi / 2, rlatv(jjm)]
     127    ! [- pi / 2, rlatv(nbp_lat - 1)]
    127128    ! respectively.
    128129    ! "o3_regr_lat(:, k, :, :)" is for pressure level "plev(k)".
     
    132133
    133134    real, allocatable:: o3_out(:, :, :, :)
    134     ! (jjm + 1, n_plev, 360, read_climoz)
     135    ! (nbp_lat, n_plev, 360, read_climoz)
    135136    ! regridded ozone climatology
    136137    ! "o3_out(j, k, l, :)" is at latitude "rlatu(j)", pressure
     
    175176    latitude = latitude / 180. * pi
    176177    n_lat = size(latitude)
    177     ! We need to supply the latitudes to "regr1_step_av" in
     178    ! We need to supply the latitudes to "regr1_conserv" in
    178179    ! ascending order, so invert order if necessary:
    179180    desc_lat = latitude(1) > latitude(n_lat)
     
    181182
    182183    ! Compute edges of latitude intervals:
    183     allocate(lat_in_edg(n_lat + 1))
    184     lat_in_edg(1) = - pi / 2
    185     forall (j = 2:n_lat) lat_in_edg(j) = (latitude(j - 1) + latitude(j)) / 2
    186     lat_in_edg(n_lat + 1) = pi / 2
     184    allocate(sin_lat_in_edg(n_lat + 1))
     185    sin_lat_in_edg(1) = - 1.
     186    forall (j = 2:n_lat) sin_lat_in_edg(j) = sin((latitude(j - 1) &
     187         + latitude(j)) / 2.)
     188    sin_lat_in_edg(n_lat + 1) = 1.
    187189    deallocate(latitude) ! pointer
    188190
     
    292294       print *, &
    293295            "Found 12 months in ozone climatologies, assuming periodicity..."
    294        o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, &
    295             xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/)))
     296       call regr1_conserv(o3_in, xs = sin_lat_in_edg, &
     297            xt = (/- 1., sin(boundslat_reg(nbp_lat - 1:1:- 1, south)), 1./), &
     298            vt = o3_regr_lat(nbp_lat:1:- 1, :, 1:12, :), &
     299            slope = slopes(o3_in, sin_lat_in_edg))
    296300       ! (invert order of indices in "o3_regr_lat" because "rlatu" is
    297301       ! in descending order)
     
    303307    else
    304308       print *, "Using 14 months in ozone climatologies..."
    305        o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, &
    306             xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/)))
     309       call regr1_conserv(o3_in, xs = sin_lat_in_edg, &
     310            xt = (/- 1., sin(boundslat_reg(nbp_lat - 1:1:- 1, south)), 1./), &
     311            vt = o3_regr_lat(nbp_lat:1:- 1, :, :, :), &
     312            slope = slopes(o3_in, sin_lat_in_edg))
    307313       ! (invert order of indices in "o3_regr_lat" because "rlatu" is
    308314       ! in descending order)
  • LMDZ5/branches/testing/libf/phylmd/regr_lat_time_coefoz_m.F90

    r2408 r2471  
    4141
    4242    use mod_grid_phy_lmdz, ONLY : nbp_lat
    43     use regr1_step_av_m, only: regr1_step_av
     43    use regr1_conserv_m, only: regr1_conserv
    4444    use regr3_lint_m, only: regr3_lint
    4545    use netcdf95, only: nf95_open, nf95_close, nf95_inq_varid, handle_err, &
     
    162162    latitude = latitude / 180. * pi
    163163    n_lat = size(latitude)
    164     ! We need to supply the latitudes to "regr1_step_av" in
     164    ! We need to supply the latitudes to "regr1_conserv" in
    165165    ! ascending order, so invert order if necessary:
    166166    desc_lat = latitude(1) > latitude(n_lat)
     
    209209       ! We average with respect to sine of latitude, which is
    210210       ! equivalent to weighting by cosine of latitude:
    211        v_regr_lat(nbp_lat:1:-1, :, 1:12) = regr1_step_av(o3_par_in, &
    212             xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/)))
     211       call regr1_conserv(o3_par_in, xs = sin(lat_in_edg), &
     212            xt = (/-1., sin((/boundslat_reg(nbp_lat-1:1:-1,south)/)), 1./), &
     213            vt = v_regr_lat(nbp_lat:1:-1, :, 1:12))
    213214       ! (invert order of indices in "v_regr_lat" because "rlatu" is
    214215       ! in descending order)
  • LMDZ5/branches/testing/libf/phylmd/regr_pr_av_m.F90

    r2408 r2471  
    2626
    2727    ! The target vertical LMDZ grid is the grid of layer boundaries.
    28     ! Regridding in pressure is done by averaging a step function of pressure.
     28    ! Regridding in pressure is conservative, second order.
    2929
    3030    ! All the fields are regridded as a single multi-dimensional array
     
    3838    use assert_m, only: assert
    3939    use assert_eq_m, only: assert_eq
    40     use regr1_step_av_m, only: regr1_step_av
     40    use regr1_conserv_m, only: regr1_conserv
     41    use slopes_m, only: slopes
    4142    use mod_phys_lmdz_mpi_data, only: is_mpi_root
    4243    use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev
     
    8384    !--------------------------------------------
    8485
    85     call assert(size(v3, 1) == klon, size(v3, 2) == nbp_lev, "regr_pr_av v3 klon")
     86    call assert(size(v3, 1) == klon, size(v3, 2) == nbp_lev, &
     87         "regr_pr_av v3 klon")
    8688    n_var = assert_eq(size(name), size(v3, 3), "regr_pr_av v3 n_var")
    8789    call assert(shape(paprs) == (/klon, nbp_lev+1/), "regr_pr_av paprs")
     
    112114    ! Regrid in pressure at each horizontal position:
    113115    do i = 1, klon
    114        v3(i, nbp_lev:1:-1, :) = regr1_step_av(v2(i, :, :), press_in_edg, &
    115             paprs(i, nbp_lev+1:1:-1))
     116       call regr1_conserv(v2(i, :, :), press_in_edg, &
     117            paprs(i, nbp_lev + 1:1:-1), v3(i, nbp_lev:1:-1, :), &
     118            slopes(v2(i, :, :), press_in_edg))
    116119       ! (invert order of indices because "paprs" is in descending order)
    117120    end do
  • LMDZ5/branches/testing/libf/phylmd/regr_pr_o3_m.F90

    r2408 r2471  
    2828    use netcdf, only:  nf90_nowrite, nf90_get_var
    2929    use assert_m, only: assert
    30     use regr1_step_av_m, only: regr1_step_av
     30    use regr1_conserv_m, only: regr1_conserv
    3131    use press_coefoz_m, only: press_in_edg
    3232    use time_phylmdz_mod, only: day_ref
     
    7575    ! Poles:
    7676    do j = 1, nbp_lat, nbp_lat-1
    77        o3_mob_regr(1, j, nbp_lev:1:-1) &
    78             = regr1_step_av(r_mob(j, :), press_in_edg, p3d(1, j, nbp_lev+1:1:-1))
     77       call regr1_conserv(r_mob(j, :), press_in_edg, &
     78            p3d(1, j, nbp_lev + 1:1:-1), o3_mob_regr(1, j, nbp_lev:1:-1))
    7979       ! (invert order of indices because "p3d" is in descending order)
    8080    end do
     
    8383    do j = 2, nbp_lat-1
    8484       do i = 1, nbp_lon
    85           o3_mob_regr(i, j, nbp_lev:1:-1) &
    86                = regr1_step_av(r_mob(j, :), press_in_edg, &
    87                p3d(i, j, nbp_lev+1:1:-1))
    88              ! (invert order of indices because "p3d" is in descending order)
     85          call regr1_conserv(r_mob(j, :), press_in_edg, &
     86               p3d(i, j, nbp_lev + 1:1:-1), o3_mob_regr(i, j, nbp_lev:1:-1))
     87          ! (invert order of indices because "p3d" is in descending order)
    8988       end do
    9089    end do
  • LMDZ5/branches/testing/libf/phylmd/screenc.F90

    r2298 r2471  
    5454!-----------------------------------------------------------------------
    5555      include "YOMCST.h"
     56      include "flux_arp.h"
    5657!
    5758! Variables locales 
    5859      INTEGER :: i
    59       REAL, dimension(klon) :: cdram, cdrah, cdran, zri1, gref
     60      REAL, dimension(klon) :: cdram, cdrah, cdran, zri1, gref,ycdragm
    6061!
    6162!-------------------------------------------------------------------------
     
    7879                    cdram, cdrah, zri1, pref)
    7980      DO i = 1, knon
     81        IF(ok_prescr_ust) THEN
     82! La aussi il faut forcer avec ust (FC + MPL 20160210)
     83        ycdragm(i) = ust*ust/(1.+speed(i))/speed(i)
     84        cdram=ycdragm
     85        delu(i) = ust/sqrt(cdram(i))
     86        ELSE
    8087        delu(i) = ustar(i)/sqrt(cdram(i))
     88        ENDIF
    8189        delte(i)= (testar(i)* sqrt(cdram(i)))/ &
    8290                   cdrah(i)
  • LMDZ5/branches/testing/libf/phylmd/surf_ocean_mod.F90

    r2435 r2471  
    3636
    3737    include "clesphys.h"
    38     ! for cycle_diurne
     38    ! for cycle_diurne and for iflag_z0_oce==-1 (prescribed z0)
    3939
    4040! Input variables
     
    244244       z0h(i)=0.4*14e-6 / SQRT(cdragm(i) * tmp)
    245245    ENDDO
     246ELSE IF (iflag_z0_oce==-1) THEN
     247    DO i = 1, knon
     248       z0m(i) = z0min
     249       z0h(i) = z0min
     250    ENDDO
    246251ELSE
    247252       CALL abort_physic(modname,'version non prevue',1)
  • LMDZ5/branches/testing/libf/phylmd/write_paramLMDZ_phy.h

    r2408 r2471  
    1 !
    2 ! calcul moyennes globales
    3 !
    4        zx_tmp_fi2d=bils*cell_area
    5        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gbils)
    6        zx_tmp_fi2d=evap*cell_area
    7        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gevap)
    8        zx_tmp_fi2d(:)=fevap(:, is_ter)*cell_area(:)
    9        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gevapt)
    10        zx_tmp_fi2d=zxfluxlat*cell_area
    11        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,glat)
    12        zx_tmp_fi2d=(topsw0-toplw0)*cell_area
    13        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gnet0)
    14        zx_tmp_fi2d=(topsw-toplw)*cell_area
    15        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gnet)
    16        zx_tmp_fi2d=(rain_fall+snow_fall)*cell_area
    17        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,grain)
    18        zx_tmp_fi2d=zxtsol*cell_area
    19        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gtsol)
    20        zx_tmp_fi2d=zt2m*cell_area
    21        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gt2m)
    22        zx_tmp_fi2d=prw*cell_area
    23        CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gprw)
    241!
    252!$OMP MASTER
     
    6845!
    6946!=================================================================
    70 ! moyennes globales
    71 !
    72       CALL histwrite(nid_ctesGCM,"bils",itau_w, &
    73                      gbils,np,ndex2d)
    74       CALL histwrite(nid_ctesGCM,"evap",itau_w, &
    75                      gevap,np,ndex2d)
    76       CALL histwrite(nid_ctesGCM,"evap_land",itau_w, &
    77                      gevapt,np,ndex2d)
    78       CALL histwrite(nid_ctesGCM,"flat",itau_w, &
    79                      glat,np,ndex2d)
    80       CALL histwrite(nid_ctesGCM,"nettop0",itau_w, &
    81                      gnet0,np,ndex2d)
    82       CALL histwrite(nid_ctesGCM,"nettop",itau_w, &
    83                      gnet,np,ndex2d)
    84       CALL histwrite(nid_ctesGCM,"precip",itau_w, &
    85                      grain,np,ndex2d)
    86       CALL histwrite(nid_ctesGCM,"tsol",itau_w, &
    87                      gtsol,np,ndex2d)
    88       CALL histwrite(nid_ctesGCM,"t2m",itau_w, &
    89                      gt2m,np,ndex2d)
    90       CALL histwrite(nid_ctesGCM,"prw",itau_w, &
    91                      gprw,np,ndex2d)
    92 !=================================================================
    9347!
    9448      if (ok_sync) then
  • LMDZ5/branches/testing/libf/phylmd/yamada4.F90

    r2408 r2471  
    66  USE dimphy
    77  USE print_control_mod, ONLY: prt_level
     8  USE ioipsl_getin_p_mod, ONLY : getin_p
     9
    810  IMPLICIT NONE
    911
     
    7577  DATA first, ipas/.FALSE., 0/
    7678  !$OMP THREADPRIVATE( first,ipas)
     79  REAL,SAVE :: lmixmin=1.
     80  !$OMP THREADPRIVATE(lmixmin)
     81
    7782
    7883  INTEGER ig, k
     
    107112  fl(zzz, zl0, zq2, zn2) = max(min(l0(ig)*kap*zlev(ig, &
    108113    k)/(kap*zlev(ig,k)+l0(ig)),0.5*sqrt(q2(ig,k))/sqrt( &
    109     max(n2(ig,k),1.E-10))), 1.)
     114    max(n2(ig,k),1.E-10))), lmixmin)
    110115
    111116
     
    116121    ALLOCATE (l0(klon))
    117122    firstcall = .FALSE.
     123    CALL getin_p('lmixmin',lmixmin)
    118124  END IF
    119125
     
    341347    DO k = 2, klev - 1
    342348      DO ig = 1, ngrid
    343         l(ig, k) = max(l(ig,k), 1.)
     349        l(ig, k) = max(l(ig,k), lmixmin)
    344350        km(ig, k) = l(ig, k)*sqrt(q2(ig,k))*sm(ig, k)
    345351        q2(ig, k) = q2(ig, k) + dt*km(ig, k)*m2(ig, k)*(1.-rif(ig,k))
Note: See TracChangeset for help on using the changeset viewer.