Changeset 3411


Ignore:
Timestamp:
Nov 5, 2018, 3:24:59 PM (6 years ago)
Author:
Laurent Fairhead
Message:

Undoing merge with trunk (r3356) to properly register Yann's latest modifications

Location:
LMDZ6/branches/DYNAMICO-conv
Files:
44 deleted
164 edited
30 copied

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/DYNAMICO-conv

  • LMDZ6/branches/DYNAMICO-conv/DefLists/CMIP6_ping_atmos.xml

    r3356 r3411  
    11<!-- $Id$ -->
    2 <!-- Ping files generated by dr2xml 0.27 using Data Request 01.00.21 -->
     2<!-- Ping files generated by dr2xml 0.18 using Data Request 01.00.15 -->
    33<!-- lrealms= ['atmos'] -->
    44<!-- exact= False -->
    55<!--  listof_home_vars : None
    66 tierMax : 3
     7 max_priority : 3
     8 mips : set(['CORDEX', 'GMMIP', 'RFMIP', 'AerChemMIP', 'CMIP6', 'OMIP', 'GeoMIP', 'C4MIP', 'PDRMIP', 'DCPP', 'DECK', 'LUMIP', 'CMIP5', 'CFMIP', 'ScenarioMIP', 'DAMIP', 'CCMI', 'SolarMIP', 'VIACSAB', 'SIMIP', 'CMIP', 'ISMIP6', 'VolMIP', 'PMIP', 'FAFMIP', 'HighResMIP', 'LS3MIP', 'SPECS', 'DynVar'])
     9 excluded_vars : []
    710 realms_per_context : {'lmdz': ['atmos', 'atmos land'], 'nemo': ['seaIce', 'ocean', 'ocean seaIce', 'ocnBgchem', 'seaIce ocean'], 'orchidee': ['land', 'landIce land', 'land landIce', 'landIce']}
    8  max_priority : 3
    9  max_file_size_in_floats : 20000000000.0
    10  grid_choice : {'IPSL-CM6A-LR': 'LR'}
     11 path_extra_tables : None
    1112 excluded_vars_file : None
    12  sizes : {'LR': [20592, 79, 32768, 91, 30, 14, 128]}
    1313 ping_variables_prefix : CMIP6_
    14  source_types : {'IPSL-CM6A-LR': 'AOGCM AER BGC'}
    15  path_extra_tables : None
    16  grid_policy : native
    1714 path_special_defs : None
    18  mips : {'LR': set(['CORDEX', 'GMMIP', 'RFMIP', 'VolMIP', 'CMIP6', 'ScenarioMIP', 'GeoMIP', 'C4MIP', 'PDRMIP', 'CMIP', 'DECK', 'LUMIP', 'CMIP5', 'CFMIP', 'OMIP', 'DAMIP', 'CCMI', 'SolarMIP', 'VIACSAB', 'SIMIP', 'DCPP', 'ISMIP6', 'AerChemMIP', 'PMIP', 'FAFMIP', 'DynVar', 'LS3MIP', 'SPECS', 'HighResMIP'])}
    19  excluded_vars : []
    2015 orphan_variables : {}
    2116-->
     
    2419<field_definition>
    2520<!-- for variables which realm equals one of _atmos-->
    26    <field id="CMIP6_H2p"           field_ref="dummy_not_provided"           /> <!-- P1 ()  : 2H in total precipitation -->
    27    <field id="CMIP6_H2s"           field_ref="dummy_not_provided"           /> <!-- P1 ()  : 2H in solid precipitation -->
    28    <field id="CMIP6_H2wv"          field_ref="dummy_not_provided"           /> <!-- P1 ()  : H2 in water vapor -->
    29    <field id="CMIP6_O17p"          field_ref="dummy_not_provided"           /> <!-- P1 ()  : 17O in total precipitation -->
    30    <field id="CMIP6_O17s"          field_ref="dummy_not_provided"           /> <!-- P1 ()  : 17O in solid precipitation -->
    31    <field id="CMIP6_O17wv"         field_ref="dummy_not_provided"           /> <!-- P1 ()  : O17 in water vapor -->
    32    <field id="CMIP6_O18p"          field_ref="dummy_not_provided"           /> <!-- P1 ()  : 18O in total precipitation -->
    33    <field id="CMIP6_O18s"          field_ref="dummy_not_provided"           /> <!-- P1 ()  : 18O in solid precipitation -->
    34    <field id="CMIP6_O18wv"         field_ref="dummy_not_provided"           /> <!-- P1 ()  : O18 in water vapor -->
    35    <field id="CMIP6_aerasymbnd"    field_ref="dummy_not_provided"           /> <!-- P1 (1) band_aerosol_asymmetry_parameter : Aerosol level asymmetry parameter for each band -->
    36    <field id="CMIP6_aeroptbnd"     field_ref="dummy_not_provided"           /> <!-- P1 (1) atmosphere_absorption_optical_thickness_due_to_ambient_aerosol_particles : Aerosol level extinction optical depth for each band -->
    37    <field id="CMIP6_aerssabnd"     field_ref="dummy_not_provided"           /> <!-- P1 (1) single_scattering_albedo_in_air_due_to_ambient_aerosol_particles : Aerosol level single-scattering albedo for each band -->
    38    <field id="CMIP6_albdiffbnd"    field_ref="dummy_not_provided"           /> <!-- P1 (1) band_diffuse_albedo : Diffuse surface albedo for each band -->
    39    <field id="CMIP6_albdirbnd"     field_ref="dummy_not_provided"           /> <!-- P1 (1) band_direct_albedo : Direct surface albedo for each band -->
    40    <field id="CMIP6_albisccp"      field_ref="albisccp"                     /> <!-- P1 (1) cloud_albedo : time-means are weighted by the ISCCP Total Cloud Fraction - see  http://cfmip.metoffice.com/COSP.html -->
    41    <field id="CMIP6_aod550volso4"  field_ref="od550_STRAT"                  /> <!-- P1 (1e-09) aerosol_optical_depth_due_to_stratospheric_volcanic_aerosols : aerosol optical thickness at 550 nm due to stratospheric volcanic aerosols  -->
    42    <field id="CMIP6_areacella"     field_ref="aire"                         /> <!-- P1 (m2) cell_area : Cell areas for any grid used to report atmospheric variables and any other variable using that grid (e.g., soil moisture content). These cell areas should be defined to enable exact calculation of global integrals (e.g., of vertical fluxes of energy at the surface and top of the atmosphere). -->
    43    <field id="CMIP6_ccb"           field_ref="pbase"                        /> <!-- P1 (Pa) air_pressure_at_convective_cloud_base : Air Pressure at Convective Cloud Base -->
    44    <field id="CMIP6_ccldncl"       field_ref="dummy_XY"                     /> <!-- P1 (m-3) number_concentration_of_convective_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Cloud Droplet Number Concentration of Convective Cloud Tops -->
    45    <field id="CMIP6_cct"           field_ref="ptop"                         /> <!-- P1 (Pa) air_pressure_at_convective_cloud_top : Air Pressure at Convective Cloud Top -->
    46    <field id="CMIP6_cfadDbze94"    field_ref="cfadDbze94"                   /> <!-- P1 (1) histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid : CloudSat Radar Reflectivity CFAD -->
    47    <field id="CMIP6_cfadLidarsr532" field_ref="cfad_lidarsr532"             /> <!-- P1 (1) histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid : CALIPSO Scattering Ratio -->
    48    <field id="CMIP6_cfc113global"  field_ref="dummy_not_provided"           /> <!-- P1 (1e-12) mole_fraction_of_cfc113_in_air : Global Mean Mole Fraction of CFC113 -->
    49    <field id="CMIP6_cfc11global"   field_ref="CFC11_ppt"                    /> <!-- P1 (1e-12) mole_fraction_of_cfc11_in_air : Global Mean Mole Fraction of CFC11 -->
    50    <field id="CMIP6_cfc12global"   field_ref="CFC12_ppt"                    /> <!-- P1 (1e-12) mole_fraction_of_cfc12_in_air : Global Mean Mole Fraction of CFC12 -->
    51    <field id="CMIP6_ch4"           field_ref="dummy_not_provided"           /> <!-- P1 (mol mol-1) mole_fraction_of_methane_in_air : Mole Fraction of CH4 -->
    52    <field id="CMIP6_ch4global"     field_ref="CH4_ppb"                      /> <!-- P1 (1e-09) mole_fraction_of_methane_in_air : Global Mean Mole Fraction of CH4 -->
    53    <field id="CMIP6_ci"            field_ref="ftime_con"                    /> <!-- P1 (1) convection_time_fraction : Fraction of time that convection occurs in the grid cell. -->
    54    <field id="CMIP6_cl"            field_ref="rneb"> rneb*100.      </field>   <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Cloud Area Fraction in Atmosphere Layer -->
    55    <field id="CMIP6_clc"           field_ref="rnebcon"> rnebcon*100. </field>  <!-- P1 (%) convective_cloud_area_fraction_in_atmosphere_layer : Convective Cloud Area Fraction -->
    56    <field id="CMIP6_clcalipso"     field_ref="pclcalipso"                   /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : CALIPSO Cloud Area Fraction -->
    57    <field id="CMIP6_clcalipso2"    field_ref="clcalipso2"                   /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : CALIPSO Cloud Fraction Undetected by CloudSat -->
    58    <field id="CMIP6_clcalipsoice"  field_ref="clcalipsoice"                 /> <!-- P1 (%) ice_cloud_area_fraction_in_atmosphere_layer : CALIPSO Ice Cloud Fraction -->
    59    <field id="CMIP6_clcalipsoliq"  field_ref="clcalipsoice"                 /> <!-- P1 (%) liquid_cloud_area_fraction_in_atmosphere_layer : CALIPSO Liquid Cloud Fraction -->
    60    <field id="CMIP6_cldicemxrat"   field_ref="cldicemxrat"                  /> <!-- P2 (1) cloud_ice_mixing_ratio : Cloud Ice Mixing Ratio -->
    61    <field id="CMIP6_cldnci"        field_ref="dummy_XY"                     /> <!-- P1 (m-3) number_concentration_of_ice_crystals_in_air_at_ice_cloud_top : Ice Crystal Number Concentration of Cloud Tops -->
    62    <field id="CMIP6_cldncl"        field_ref="cldncl" expr=" @cldncl / @lcc" > cldncl / lcc </field> <!-- P1 (m-3) number_concentration_of_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Cloud Droplet Number Concentration of Cloud Tops -->
    63    <field id="CMIP6_cldnvi"        field_ref="cldnvi" expr=" @cldnvi / @lcc" > cldnvi / lcc </field> <!-- P1 (m-2) atmosphere_number_content_of_cloud_droplets : Column Integrated Cloud Droplet Number -->
    64    <field id="CMIP6_cldwatmxrat"   field_ref="cldwatmxrat"                  /> <!-- P2 (1) cloud_liquid_water_mixing_ratio : Cloud Water Mixing Ratio -->
    65    <field id="CMIP6_clhcalipso"    field_ref="pclhcalipso"                  /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : CALIPSO Percentage High Level Cloud -->
    66    <field id="CMIP6_cli"           field_ref="iwcon"                        /> <!-- P1 (kg kg-1) mass_fraction_of_cloud_ice_in_air : Includes both large-scale and convective cloud. This is the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    67    <field id="CMIP6_clic"          field_ref="icc3dcon"                     /> <!-- P2 (1) mass_fraction_of_convective_cloud_ice_in_air : Calculated as the mass of convective cloud ice  in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    68    <field id="CMIP6_climodis"      field_ref="climodis"                     /> <!-- P1 (%) ice_cloud_area_fraction : MODIS Ice Cloud Fraction -->
    69    <field id="CMIP6_clis"          field_ref="icc3dstra"                    /> <!-- P2 (1) mass_fraction_of_stratiform_cloud_ice_in_air : Calculated as the mass of stratiform cloud ice  in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    70    <field id="CMIP6_clisccp"       field_ref="clisccp2"                     /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : ISCCP Percentage Cloud Area -->
    71    <field id="CMIP6_clivi"         field_ref="iwp"                          /> <!-- P1 (kg m-2) atmosphere_cloud_ice_content : mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model. -->
    72    <field id="CMIP6_clivic"        field_ref="dummy_XY"                     /> <!-- P1 (kg m-2) atmosphere_convective_cloud_ice_content : Convective Ice Water Path  -->
    73    <field id="CMIP6_cllcalipso"    field_ref="pcllcalipso"                  /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : CALIPSO Percentage Low Level Cloud -->
    74    <field id="CMIP6_clmcalipso"    field_ref="pclmcalipso"                  /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : CALIPSO Percentage Mid Level Cloud -->
    75    <field id="CMIP6_clmisr"        field_ref="clMISR"                       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : MISR cloud area fraction -->
    76    <field id="CMIP6_cls"           field_ref="dummy_XYA"                    /> <!-- P1 (%) stratiform_cloud_area_fraction_in_atmosphere_layer : Stratiform Cloud Area Fraction -->
    77    <field id="CMIP6_clt"           field_ref="cldt"> cldt*100.        </field> <!-- P1 (%) cloud_area_fraction : for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud. -->
    78    <field id="CMIP6_clt_land"      field_ref="dummy_XY"         /> <!-- P1 (%) cloud_area_fraction : Total cloud fraction -->
    79    <field id="CMIP6_cltc"          field_ref="dummy_XY"         /> <!-- P1 (%) convective_cloud_area_fraction : For the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes only convective cloud. -->
    80    <field id="CMIP6_cltcalipso"    field_ref="pcltcalipso"                  /> <!-- P1 (%) cloud_area_fraction :  CALIPSO Total Cloud Fraction -->
    81    <field id="CMIP6_cltisccp"      field_ref="tclisccp"                     /> <!-- P1 (%) cloud_area_fraction : ISCCP Total Cloud Fraction -->
    82    <field id="CMIP6_cltmodis"      field_ref="cltmodis"                     /> <!-- P1 (%) cloud_area_fraction : MODIS Total Cloud  Fraction -->
    83    <field id="CMIP6_clw"           field_ref="lwcon"                        /> <!-- P1 (kg kg-1) mass_fraction_of_cloud_liquid_water_in_air : Includes both large-scale and convective cloud. Calculate as the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cells. Precipitating hydrometeors are included ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    84    <field id="CMIP6_clwc"          field_ref="lcc3dcon"                     /> <!-- P2 (1) mass_fraction_of_convective_cloud_liquid_water_in_air : Calculated as the mass of convective cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    85    <field id="CMIP6_clwmodis"      field_ref="clwmodis"                     /> <!-- P1 (%) liquid_water_cloud_area_fraction : MODIS Liquid Cloud Fraction -->
    86    <field id="CMIP6_clws"          field_ref="lcc3dstra"                    /> <!-- P2 (1) mass_fraction_of_stratiform_cloud_liquid_water_in_air : Calculated as the mass of stratiform cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
    87    <field id="CMIP6_clwvi"         field_ref="lwp"                          /> <!-- P1 (kg m-2) atmosphere_cloud_condensed_water_content : mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model. -->
    88    <field id="CMIP6_clwvic"        field_ref="dummy_XY"                     /> <!-- P1 (kg m-2) atmosphere_convective_cloud_condensed_water_content : Convective Condensed Water Path -->
    89    <field id="CMIP6_co2"           field_ref="dummy_not_provided"           /> <!-- P1 (mol mol-1) mole_fraction_of_carbon_dioxide_in_air :  Mole Fraction of CO2 -->
    90    <field id="CMIP6_co23D"         field_ref="dummy_not_provided"           /> <!-- P2 (kg kg-1) CO2_3D_tracer : requested for all Emissions-driven runs -->
    91    <field id="CMIP6_co2mass"       field_ref="mass_sum"> co2_ppm*1e-6*44.011/28.97*mass_sum </field> <!-- P1 (kg) atmosphere_mass_of_carbon_dioxide : Total Atmospheric Mass of CO2 -->
    92    <field id="CMIP6_co2s"          field_ref="dummy_not_provided"           /> <!-- P2 (1e-06) mole_fraction_of_carbon_dioxide_in_air : Atmosphere CO2 -->
    93    <field id="CMIP6_columnmassflux" field_ref="dummy_XY"                    /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : Column integrated mass flux -->
    94    <field id="CMIP6_conccmcn"      field_ref="dummy_not_provided"           /> <!-- P1 (m-3) number_concentration_of_coarse_mode_ambient_aerosol_in_air : Number Concentration Coarse Mode Aerosol -->
    95    <field id="CMIP6_conccn"        field_ref="dummy_not_provided"           /> <!-- P1 (m-3) number_concentration_of_ambient_aerosol_in_air : Aerosol Number Concentration -->
    96    <field id="CMIP6_concdust"      field_ref="concdust"                     /> <!-- P1 (kg m-3) mass_concentration_of_dust_dry_aerosol_in_air : Concentration of Dust -->
    97    <field id="CMIP6_concnmcn"      field_ref="dummy_not_provided"           /> <!-- P1 (m-3) number_concentration_of_nucleation_mode_ambient_aerosol_in_air : Number Concentration of Nucleation Mode Aerosol -->
    98    <field id="CMIP6_demc"          field_ref="dummy_not_provided"                    /> <!-- P2 (1) convective_cloud_longwave_emissivity : This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell. -->
    99    <field id="CMIP6_dems"          field_ref="dummy_not_provided"                    /> <!-- P2 (1) stratiform_cloud_longwave_emissivity : This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell. -->
    100    <field id="CMIP6_diabdrag"      field_ref="dummy_XYA"                    /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_numerical_artefacts : Tendency of Eastward Wind from Numerical Artefacts -->
    101    <field id="CMIP6_dmc"           field_ref="upwd"                         /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_deep_convective_mass_flux : The net mass flux  represents the difference between the updraft and downdraft components.   This is calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
    102    <field id="CMIP6_dtauc"         field_ref="dummy_not_provided"           /> <!-- P2 (1) atmosphere_optical_thickness_due_to_convective_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell -->
    103    <field id="CMIP6_dtaus"         field_ref="dummy_not_provided"           /> <!-- P2 (1) atmosphere_optical_thickness_due_to_stratiform_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell. -->
    104    <field id="CMIP6_edt"           field_ref="kz"                           /> <!-- P1 (m2 s-1) atmosphere_heat_diffusivity : Eddy Diffusivity Coefficient for Temperature Variable -->
    105    <field id="CMIP6_epfy"          field_ref="dummy_XYA"                    /> <!-- P1 (m3 s-2) northward_eliassen_palm_flux_in_air : Northward Component of the Eliassen-Palm Flux -->
    106    <field id="CMIP6_epfz"          field_ref="dummy_XYA"                    /> <!-- P1 (m3 s-2) upward_eliassen_palm_flux_in_air : zonal mean; hence YZT -->
    107    <field id="CMIP6_evspsbl"       field_ref="evap"                         /> <!-- P1 (kg m-2 s-1) water_evaporation_flux : Evaporation at surface; flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation) -->
    108    <field id="CMIP6_evu"           field_ref="evu"                          /> <!-- P1 (m2 s-1) atmosphere_momentum_diffusivity : Eddy Viscosity Coefficients for Momentum -->
    109    <field id="CMIP6_fco2antt"      field_ref="dummy_not_provided"           /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_anthropogenic_emission : This is requested only for the emission-driven coupled carbon climate model runs.  Does not include natural fire sources but, includes all anthropogenic sources, including fossil fuel use, cement production, agricultural burning, and sources associated with anthropogenic land use change excluding forest regrowth. -->
    110    <field id="CMIP6_fco2fos"       field_ref="dummy_not_provided"           /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_fossil_fuel_combustion : This is the prescribed anthropogenic CO2 flux from fossil fuel use, including cement production, and flaring (but not from land-use changes, agricultural burning, forest regrowth, etc.) -->
    111    <field id="CMIP6_fco2nat"       field_ref="dummy_not_provided"           /> <!-- P1 (kg m-2 s-1) surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_natural_sources : This is what the atmosphere sees (on its own grid).  This field should be equivalent to the combined natural fluxes of carbon (requested in the L_mon and O_mon tables) that account for natural exchanges between the atmosphere and land or ocean reservoirs (i.e., "net ecosystem biospheric productivity", for land, and "air to sea CO2 flux", for ocean.) -->
    112    <field id="CMIP6_grpllsprof"    field_ref="dummy_not_provided"           /> <!-- P2 (kg m-2 s-1) large_scale_graupel_flux : Stratiform Graupel Flux  -->
    113    <field id="CMIP6_grplmxrat"     field_ref="dummy_not_provided"           /> <!-- P2 (1) mass_fraction_of_graupel_in_air : Graupel Mixing Ratio -->
    114    <field id="CMIP6_h2o"           field_ref="ovap"> ovap+ocond       </field> <!-- P2 (1) mass_fraction_of_water_in_air : includes all phases of water -->
    115    <field id="CMIP6_hcfc22global"  field_ref="dummy_not_provided"           /> <!-- P1 (1e-12) mole_fraction_of_hcfc22_in_air : Global Mean Mole Fraction of HCFC22 -->
    116    <field id="CMIP6_hfdsl"         field_ref="bils"> bils*fract_ter   </field> <!-- P1 (W m-2) surface_downward_heat_flux_in_air : Ground heat flux -->
    117    <field id="CMIP6_hfdsnb"        field_ref="dummy_not_provided"           /> <!-- P1 (W m-2)  : Downward heat flux at snow botton -->
    118    <field id="CMIP6_hfls_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upward_latent_heat_flux : Surface Upward Latent Heat Flux -->
    119    <field id="CMIP6_hfls_land"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upward_latent_heat_flux : Latent heat flux -->
    120    <field id="CMIP6_hfls"          field_ref="flat"> flat*(-1.)       </field>  <!-- P1 (W m-2) surface_upward_latent_heat_flux : Surface Upward Latent Heat Flux -->
    121    <field id="CMIP6_hfmlt"         field_ref="dummy_not_provided"           /> <!-- P1 (W m-2) surface_snow_and_ice_melt_heat_flux : Energy of fusion -->
    122    <field id="CMIP6_hfrs"          field_ref="dummy_not_provided"           /> <!-- P1 (W m-2) temperature_flux_due_to_rainfall_expressed_as_heat_flux_onto_snow_and_ice : Heat transferred to snowpack by rainfall -->
    123    <field id="CMIP6_hfsbl"         field_ref="dummy_not_provided"           /> <!-- P1 (W m-2) surface_snow_and_ice_sublimation_heat_flux : Energy of sublimation -->
    124    <field id="CMIP6_hfss"          field_ref="sens"> sens*(-1.) </field>       <!-- P1 (W m-2) surface_upward_sensible_heat_flux : Surface Upward Sensible Heat Flux -->
    125    <field id="CMIP6_hfss_land"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upward_sensible_heat_flux : Sensible heat flux -->
    126    <field id="CMIP6_hfss_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upward_sensible_heat_flux : Surface Upward Sensible Heat Flux -->
    127    <field id="CMIP6_hur"           field_ref="rhum"> rhum*100. </field> <!-- P1 (%) relative_humidity : This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
    128    <field id="CMIP6_hurs"          field_ref="rh2m"             /> <!-- P1 (%) relative_humidity : This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
    129    <field id="CMIP6_hursmax"       field_ref="rh2m_max" freq_op="1d" > @rh2m_max </field> <!-- P1 (%) relative_humidity : This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->   
    130    <field id="CMIP6_hursmin"       field_ref="rh2m_min" freq_op="1d" > @rh2m_min </field> <!-- P1 (%) relative_humidity : This is the relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. --> 
    131    <field id="CMIP6_hursminCrop"   field_ref="dummy_not_provided"         /> <!-- P1 (%) relative_humidity : Daily Minimum Near-Surface Relative Humidity over Crop Tile -->
     21   <field id="CMIP6_H2p"           field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     22   <field id="CMIP6_H2s"           field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     23   <field id="CMIP6_H2wv"          field_ref="dummy_XYA"        /> <!-- P1 () missing : Roche - LSCE -->
     24   <field id="CMIP6_O17p"          field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     25   <field id="CMIP6_O17s"          field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     26   <field id="CMIP6_O17wv"         field_ref="dummy_XYA"        /> <!-- P1 () missing : Roche - LSCE -->
     27   <field id="CMIP6_O18p"          field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     28   <field id="CMIP6_O18s"          field_ref="dummy_XY"         /> <!-- P1 () missing : Roche - LSCE -->
     29   <field id="CMIP6_O18wv"         field_ref="dummy_XYA"        /> <!-- P1 () missing : Roche - LSCE -->
     30   <field id="CMIP6_aerasymbnd"    field_ref="dummy_XYA"        /> <!-- P1 (1) band_aerosol_asymmetry_parameter : Aerosol level asymmetry parameter for each band -->
     31   <field id="CMIP6_aeroptbnd"     field_ref="dummy_XYA"        /> <!-- P1 (1) atmosphere_absorption_optical_thickness_due_to_ambient_aerosol_particles : Aerosol level extinction optical depth for each band -->
     32   <field id="CMIP6_aerssabnd"     field_ref="dummy_XYA"        /> <!-- P1 (1) single_scattering_albedo_in_air_due_to_ambient_aerosol_particles : Aerosol level single-scattering albedo for each band -->
     33   <field id="CMIP6_albdiffbnd"    field_ref="dummy_XY"         /> <!-- P1 (1.0) band_diffuse_albedo : Diffuse surface albedo for each band -->
     34   <field id="CMIP6_albdirbnd"     field_ref="dummy_XY"         /> <!-- P1 (1.0) band_direct_albedo : Direct surface albedo for each band -->
     35   <field id="CMIP6_albisccp"      field_ref="albisccp"         /> <!-- P1 (1.0) cloud_albedo : ISCCP Mean Cloud Albedo. Time-means are weighted by the ISCCP Total Cloud Fraction {:cltisccp} - see  http://cfmip.metoffice.com/COSP.html -->
     36   <field id="CMIP6_aod550volso4"  field_ref="od550_STRAT"      /> <!-- P1 (1e-09) aerosol_optical_depth_due_to_stratospheric_volcanic_aerosols : aerosol optical depth at 550 nm due to stratospheric volcanic aerosols  -->
     37   <field id="CMIP6_areacella"     field_ref="aire"             /> <!-- P1 (m2) cell_area : For atmospheres with more than 1 mesh (e.g., staggered grids), report areas that apply to surface vertical fluxes of energy. -->
     38   <field id="CMIP6_ccb"           field_ref="pbase"            /> <!-- P1 (Pa) air_pressure_at_convective_cloud_base : Where convective cloud is present in the grid cell, the instantaneous cloud base altitude should be that of the bottom of the lowest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period.  -->
     39   <field id="CMIP6_ccldncl"       field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_convective_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Droplets are liquid only.  Report concentration 'as seen from space' over convective liquid cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean. -->
     40   <field id="CMIP6_cct"           field_ref="ptop"             /> <!-- P1 (Pa) air_pressure_at_convective_cloud_top : Where convective cloud is present in the grid cell, the instantaneous cloud top altitude should be that of the top of the highest level containing convective cloud. Missing data should be reported in the absence of convective cloud. The time mean should be calculated from these quantities averaging over occasions when convective cloud is present only, and should contain missing data for occasions when no convective cloud is present during the meaning period. -->
     41   <field id="CMIP6_cfadDbze94"    field_ref="cfadDbze94"       /> <!-- P1 (1.0) histogram_of_equivalent_reflectivity_factor_over_height_above_reference_ellipsoid : CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar  reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadDbze94 is defined as the simulated relative frequency of occurrence of radar reflectivity in sampling volumes defined by altitude bins. The radar is observing at a frequency of 94GHz. -->
     42   <field id="CMIP6_cfadLidarsr532" field_ref="cfad_lidarsr532" /> <!-- P1 (1.0) histogram_of_backscattering_ratio_over_height_above_reference_ellipsoid : CFAD (Cloud Frequency Altitude Diagrams) are frequency distributions of radar  reflectivity (or lidar scattering ratio) as a function of altitude. The variable cfadLidarsr532 is defined as the simulated relative frequency of lidar scattering ratio in sampling volumes defined by altitude bins. The lidar is observing at a wavelength of 532nm. -->
     43   <field id="CMIP6_cfc113global"  field_ref="dummy_0d"         /> <!-- P1 (1e-12) mole_fraction_of_cfc113_in_air : unset -->
     44   <field id="CMIP6_cfc11global"   field_ref="CFC11_ppt"        /> <!-- P1 (1e-12) mole_fraction_of_cfc11_in_air : unset -->
     45   <field id="CMIP6_cfc12global"   field_ref="CFC12_ppt"        /> <!-- P1 (1e-12) mole_fraction_of_cfc12_in_air : unset -->
     46   <field id="CMIP6_ch4"           field_ref="dummy_XYA"        /> <!-- P1 (mol mol-1) mole_fraction_of_methane_in_air : CH4 volume mixing ratio -->
     47   <field id="CMIP6_ch4global"     field_ref="CH4_ppb"          /> <!-- P1 (1e-09) mole_fraction_of_methane_in_air : Global Mean Mole Fraction of CH4 -->
     48   <field id="CMIP6_ci"            field_ref="ftime_con"        /> <!-- P1 (1.0) convection_time_fraction : Fraction of time that convection occurs in the grid cell. -->
     49   <field id="CMIP6_cl"            field_ref="rneb"             /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover, including both large-scale and convective cloud. -->
     50   <field id="CMIP6_clc"           field_ref="rnebcon"          /> <!-- P1 (%) convective_cloud_area_fraction_in_atmosphere_layer : Include only convective cloud. -->
     51   <field id="CMIP6_clcalipso"     field_ref="pclcalipso"        /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover at CALIPSO standard heights. -->
     52   <field id="CMIP6_clcalipso2"    field_ref="clcalipso2"       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Clouds detected by CALIPSO but below the detectability threshold of CloudSat -->
     53   <field id="CMIP6_clcalipsoice"  field_ref="clcalipsoice"     /> <!-- P1 (%) ice_cloud_area_fraction_in_atmosphere_layer : CALIPSO ice cloud Fraction -->
     54   <field id="CMIP6_clcalipsoliq"  field_ref="clcalipsoice"     /> <!-- P1 (%) liquid_cloud_area_fraction_in_atmosphere_layer : CALIPSO liquid cloud Fraction -->
     55   <field id="CMIP6_cldicemxrat"   field_ref="dummy_XYA"        /> <!-- P3 (1.0) cloud_ice_mixing_ratio : Cloud ice mixing ratio -->
     56   <field id="CMIP6_cldnci"        field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_ice_crystals_in_air_at_ice_cloud_top : Concentration 'as seen from space' over ice-cloud portion of grid cell.  This is the value from uppermost model layer with ice cloud or, if available, it is the sum over all ice cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total ice cloud top fraction (as seen from TOA) of each time sample when computing monthly mean. -->
     57   <field id="CMIP6_cldncl"        field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Droplets are liquid only.  Report concentration 'as seen from space' over liquid cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean. -->
     58   <field id="CMIP6_cldnvi"        field_ref="cldnvi"           /> <!-- P1 (m-2) atmosphere_number_content_of_cloud_droplets : Droplets are liquid only.  Values are weighted by liquid cloud fraction in each layer when vertically integrating, and for monthly means the samples are weighted by total liquid cloud fraction (as seen from TOA). -->
     59   <field id="CMIP6_cldwatmxrat"   field_ref="dummy_XYA"        /> <!-- P2 (1.0) cloud_liquid_water_mixing_ratio : Cloud water mixing ratio -->
     60   <field id="CMIP6_clhcalipso"    field_ref="pclhcalipso"       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover in layer centred on 220hPa -->
     61   <field id="CMIP6_cli"           field_ref="iwcon"            /> <!-- P1 (kg kg-1) mass_fraction_of_cloud_ice_in_air : Includes both large-scale and convective cloud. This is calculated as the mass of cloud ice in the grid cell divided by the mass of air (including the water in all phases) in the grid cell. It includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     62   <field id="CMIP6_clic"          field_ref="dummy_XYA"        /> <!-- P2 (1.0) mass_fraction_of_convective_cloud_ice_in_air : Calculated as the mass of convective cloud ice  in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     63   <field id="CMIP6_climodis"      field_ref="climodis"         /> <!-- P1 (%) ice_cloud_area_fraction : MODIS Ice Cloud Area Percentage -->
     64   <field id="CMIP6_clis"          field_ref="dummy_XYA"        /> <!-- P2 (1.0) mass_fraction_of_stratiform_cloud_ice_in_air : Calculated as the mass of stratiform cloud ice  in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     65   <field id="CMIP6_clisccp"       field_ref="clisccp2"         /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover in optical depth categories. -->
     66   <field id="CMIP6_clivi"         field_ref="iwp"              /> <!-- P1 (kg m-2) atmosphere_cloud_ice_content : mass of ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeor affects the calculation of radiative transfer in model. -->
     67   <field id="CMIP6_clivic"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2) atmosphere_convective_cloud_ice_content : calculate mass of convective ice water in the column divided by the area of the column (not just the area of the cloudy portion of the column). This includes precipitating frozen hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.   -->
     68   <field id="CMIP6_cllcalipso"    field_ref="pcllcalipso"       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover in layer centred on 840hPa -->
     69   <field id="CMIP6_clmcalipso"    field_ref="pclmcalipso"       /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Percentage cloud cover in layer centred on 560hPa -->
     70   <field id="CMIP6_clmisr"        field_ref="clMISR"           /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : Cloud percentage in spectral bands and layers as observed by the Multi-angle Imaging SpectroRadiometer (MISR) instrument. -->
     71   <field id="CMIP6_cls"           field_ref="dummy_XYA"        /> <!-- P1 (%) stratiform_cloud_area_fraction_in_atmosphere_layer : unset -->
     72   <field id="CMIP6_clt"           field_ref="cldt"             /> <!-- P1 (%) cloud_area_fraction : Total cloud area fraction for the whole atmospheric column, as seen from the surface or the top of the atmosphere. Includes both large-scale and convective cloud. -->
     73   <field id="CMIP6_cltcalipso"    field_ref="pcltcalipso"       /> <!-- P1 (%) cloud_area_fraction : unset -->
     74   <field id="CMIP6_cltisccp"      field_ref="tclisccp"         /> <!-- P1 (%) cloud_area_fraction : Percentage total cloud cover, simulating ISCCP observations. -->
     75   <field id="CMIP6_cltmodis"      field_ref="cltmodis"         /> <!-- P1 (%) cloud_area_fraction : MODIS Total Cloud Cover Percentage -->
     76   <field id="CMIP6_clw"           field_ref="lwcon"            /> <!-- P1 (kg kg-1) mass_fraction_of_cloud_liquid_water_in_air : Includes both large-scale and convective cloud. Calculate as the mass of cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cells. Precipitating hydrometeors are included ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     77   <field id="CMIP6_clwc"          field_ref="lcc3dcon"         /> <!-- P2 (1.0) mass_fraction_of_convective_cloud_liquid_water_in_air : Calculated as the mass of convective cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     78   <field id="CMIP6_clwmodis"      field_ref="clwmodis"         /> <!-- P1 (%) liquid_water_cloud_area_fraction : MODIS Liquid Cloud Fraction -->
     79   <field id="CMIP6_clws"          field_ref="lcc3dstra"        /> <!-- P2 (1.0) mass_fraction_of_stratiform_cloud_liquid_water_in_air : Calculated as the mass of stratiform cloud liquid water in the grid cell divided by the mass of air (including the water in all phases) in the grid cell.  This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     80   <field id="CMIP6_clwvi"         field_ref="lwp"              /> <!-- P1 (kg m-2) atmosphere_cloud_condensed_water_content : Mass of condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). Includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model. -->
     81   <field id="CMIP6_clwvic"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2) atmosphere_convective_cloud_condensed_water_content : calculate mass of convective condensed (liquid + ice) water in the column divided by the area of the column (not just the area of the cloudy portion of the column). This includes precipitating hydrometeors ONLY if the precipitating hydrometeors affect the calculation of radiative transfer in model.   -->
     82   <field id="CMIP6_co2"           field_ref="dummy_XYA"        /> <!-- P1 (mol mol-1) mole_fraction_of_carbon_dioxide_in_air : CO2 volume mixing ratio -->
     83   <field id="CMIP6_co23D"         field_ref="dummy_XYA"        /> <!-- P2 (kg kg-1) CO2_3D_tracer : report 3D field of model simulated atmospheric CO2 mass mixing ration on model levels -->
     84   <field id="CMIP6_co2mass"       field_ref="dummy_0d"         /> <!-- P1 (kg) atmosphere_mass_of_carbon_dioxide : Total atmospheric mass of Carbon Dioxide -->
     85   <field id="CMIP6_co2s"          field_ref="dummy_XY"         /> <!-- P2 (1e-06) mole_fraction_of_carbon_dioxide_in_air : As co2, but only at the surface -->
     86   <field id="CMIP6_co2totalmass"  field_ref="dummy_0d"         /> <!-- P1 (kg) CO2_total_mass_in_atmos : globally integrated mass of carbon as CO2 in atmosphere. Report as a single number for all emissions-driven runs -->
     87   <field id="CMIP6_columnmassflux" field_ref="dummy_XY"         /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : Column integral of (mcu-mcd) -->
     88   <field id="CMIP6_conccmcn"      field_ref="dummy_XYA"        /> <!-- P1 (m-3) number_concentration_of_coarse_mode_ambient_aerosol_in_air : includes all particles with diameter larger than 1 micron -->
     89   <field id="CMIP6_conccn"        field_ref="dummy_XYA"        /> <!-- P1 (m-3) number_concentration_of_ambient_aerosol_in_air : unset -->
     90   <field id="CMIP6_concdust"      field_ref="concdust"         /> <!-- P1 (kg m-3) mass_concentration_of_dust_dry_aerosol_in_air : unset -->
     91   <field id="CMIP6_concnmcn"      field_ref="dummy_XYA"        /> <!-- P1 (m-3) number_concentration_of_nucleation_mode_ambient_aerosol_in_air : includes all particles with diameter smaller than 3 nm -->
     92   <field id="CMIP6_demc"          field_ref="dummy_XYA"        /> <!-- P2 (1.0) convective_cloud_longwave_emissivity : This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell. -->
     93   <field id="CMIP6_dems"          field_ref="dummy_XYA"        /> <!-- P2 (1.0) stratiform_cloud_longwave_emissivity : This is the in-cloud emissivity obtained by considering only the cloudy portion of the grid cell. -->
     94   <field id="CMIP6_depdust"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_total_deposition : Balkanski - LSCE -->
     95   <field id="CMIP6_diabdrag"      field_ref="dummy_XYA"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_numerical_artefacts : Other sub-grid scale/numerical zonal drag excluding that already provided for the parameterized orographic and non-orographic gravity waves. This would be used to calculate the total 'diabatic drag'. Contributions to this additional drag such Rayleigh friction and diffusion that can be calculated from the monthly mean wind fields should not be included, but details (e.g. coefficients) of the friction and/or diffusion used in the model should be provided separately. -->
     96   <field id="CMIP6_dmc"           field_ref="upwd"             /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_deep_convective_mass_flux : The net mass flux  represents the difference between the updraft and downdraft components.   This is calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
     97   <field id="CMIP6_dtauc"         field_ref="dummy_XYA"        /> <!-- P3 (1.0) atmosphere_optical_thickness_due_to_convective_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell -->
     98   <field id="CMIP6_dtaus"         field_ref="dummy_XYA"        /> <!-- P3 (1.0) atmosphere_optical_thickness_due_to_stratiform_cloud : This is the in-cloud optical depth obtained by considering only the cloudy portion of the grid cell. -->
     99   <field id="CMIP6_edt"           field_ref="kz"               /> <!-- P1 (m2 s-1) atmosphere_heat_diffusivity : Vertical diffusion coefficient for temperature due to parametrised eddies -->
     100   <field id="CMIP6_epfy"          field_ref="dummy_XYA"        /> <!-- P1 (m3 s-2) northward_eliassen_palm_flux_in_air : Transformed Eulerian Mean Diagnostics Meridional component Fy of Eliassen-Palm (EP) flux (Fy, Fz) derived from 6hr or higher frequency fields (use daily fields or 12 hr fields if the 6 hr are not available). Please use the definitions given by equation 3.5.3a of Andrews, Holton and Leovy text book, but scaled by density to have units m3 s-2. -->
     101   <field id="CMIP6_epfz"          field_ref="dummy_XYA"        /> <!-- P1 (m3 s-2) upward_eliassen_palm_flux_in_air : Transformed Eulerian Mean Diagnostics Meridional component Fz of the Eliassen-Palm (EP) flux (Fy, Fz) derived from 6hr or higher frequency fields (use daily fields or 12 hr fields if the 6 hr are not available). Please use the definitions given by equation 3.5.3b of Andrews, Holton and Leovy text book, but scaled by density to have units m3 s-2. -->
     102   <field id="CMIP6_evspsbl"       field_ref="evap"             /> <!-- P1 (kg m-2 s-1) water_evaporation_flux : Evaporation at surface: flux of water into the atmosphere due to conversion of both liquid and solid phases to vapor (from underlying surface and vegetation) -->
     103   <field id="CMIP6_evu"           field_ref="evu"              /> <!-- P1 (m2 s-1) atmosphere_momentum_diffusivity : Vertical diffusion coefficient for momentum due to parametrised eddies -->
     104   <field id="CMIP6_fco2antt"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_anthropogenic_emission : This is requested only for the emission-driven coupled carbon climate model runs.  Does not include natural fire sources but, includes all anthropogenic sources, including fossil fuel use, cement production, agricultural burning, and sources associated with anthropogenic land use change excluding forest regrowth. -->
     105   <field id="CMIP6_fco2fos"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_fossil_fuel_combustion : This is the prescribed anthropogenic CO2 flux from fossil fuel use, including cement production, and flaring (but not from land-use changes, agricultural burning, forest regrowth, etc.) -->
     106   <field id="CMIP6_fco2nat"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) surface_upward_mass_flux_of_carbon_dioxide_expressed_as_carbon_due_to_emission_from_natural_sources : This is what the atmosphere sees (on its own grid).  This field should be equivalent to the combined natural fluxes of carbon  that account for natural exchanges between the atmosphere and land (nep) or ocean (fgco2) reservoirs. -->
     107   <field id="CMIP6_grpllsprof"    field_ref="dummy_XYA"        /> <!-- P2 (kg m-2 s-1) large_scale_graupel_flux : unset -->
     108   <field id="CMIP6_grplmxrat"     field_ref="dummy_XYA"        /> <!-- P2 (1.0) mass_fraction_of_graupel_in_air : Graupel mixing ratio -->
     109   <field id="CMIP6_h2o"           field_ref="dummy_XYA"        /> <!-- P2 (1.0) mass_fraction_of_water_in_air : includes all phases of water -->
     110   <field id="CMIP6_hcfc22global"  field_ref="dummy_0d"         /> <!-- P1 (1e-12) mole_fraction_of_hcfc22_in_air : unset -->
     111   <field id="CMIP6_hfdsl"         field_ref="bils"> bils*fract_ter </field> <!-- P1 (W m-2) surface_downward_heat_flux_in_air : Downward Heat Flux at Land Surface -->
     112   <field id="CMIP6_hfdsnb"        field_ref="dummy_XY"         /> <!-- P1 (W m-2) missing : Heat flux from snow into the ice or land under the snow. -->
     113   <field id="CMIP6_hfls"          field_ref="flat"             /> <!-- P1 (W m-2) surface_upward_latent_heat_flux : Surface Upward Latent Heat Flux -->
     114   <field id="CMIP6_hfmlt"         field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_snow_and_ice_melt_heat_flux : Energy consumed or released during liquid/solid phase changes. -->
     115   <field id="CMIP6_hfrs"          field_ref="dummy_XY"         /> <!-- P1 (W m-2) temperature_flux_due_to_rainfall_expressed_as_heat_flux_onto_snow_and_ice : Heat transferred to a snow cover by rain.. -->
     116   <field id="CMIP6_hfsbl"         field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_snow_and_ice_sublimation_heat_flux : Energy consumed or released during vapor/solid phase changes. -->
     117   <field id="CMIP6_hfss"          field_ref="sens"             /> <!-- P1 (W m-2) surface_upward_sensible_heat_flux : Surface Upward Sensible Heat Flux -->
     118   <field id="CMIP6_hur"           field_ref="rhum"              /> <!-- P1 (%) relative_humidity : The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
     119   <field id="CMIP6_hurs"          field_ref="rh2m"             /> <!-- P1 (%) relative_humidity : The relative humidity with respect to liquid water for T> 0 C, and with respect to ice for T<0 C. -->
     120   <field id="CMIP6_hursmax"       field_ref="CMIP6_hurs" freq_op="1d"  operation="maximum"> @this </field>   <!-- P1 (%) relative_humidity : Daily Maximum Near-Surface Relative Humidity -->
     121   <field id="CMIP6_hursmin"       field_ref="CMIP6_hurs" freq_op="1d"  operation="minimum"> @this </field>    <!-- P1 (%) relative_humidity : Daily Minimum Near-Surface Relative Humidity -->
     122   <field id="CMIP6_hursminCrop"   field_ref="dummy_XY"         /> <!-- P1 (%) relative_humidity : minimum near-surface (usually, 2 meter) relative humidity (add cell_method attribute "time: min") -->
    132123   <field id="CMIP6_hus"           field_ref="ovap"             /> <!-- P1 (1.0) specific_humidity : Specific Humidity -->
    133    <field id="CMIP6_huss"          field_ref="q2m"              /> <!-- P1 (1.0) specific_humidity : This is sampled synoptically. -->
    134    <field id="CMIP6_iareafl"       field_ref="fract_sic"         >fract_sic*aire </field> <!-- P3 (m2) floating_ice_shelf_area : Antarctica -->
    135    <field id="CMIP6_iareagr"       field_ref="fract_lic"         >fract_lic*aire </field> <!-- P3 (m2) grounded_ice_sheet_area : Greenland -->
    136    <field id="CMIP6_intuadse"      field_ref="ue"               /> <!-- P1 (1.e6 J m-1 s-1) vertical_integral_eastward_wind_by_dry_static_energy : Vertically integrated Eastward dry transport (cp.T +zg).u (Mass_weighted_vertical integral of the product of northward wind by dry static_energy per mass unit) -->
    137    <field id="CMIP6_intuaw"        field_ref="uwat"             /> <!-- P1 (kg m-1 s-1) vertical_integral_eastward_wind_by_total_water : Vertically integrated Eastward moisture transport (Mass_weighted_vertical integral of the product of eastward wind by total water mass per unit mass) -->
    138    <field id="CMIP6_intvadse"      field_ref="ve"               /> <!-- P1 (1.e6 J m-1 s-1) vertical_integral_northward_wind_by_dry_static_energy : Vertically integrated Northward dry transport (cp.T +zg).v (Mass_weighted_vertical integral of the product of northward wind by dry static_energy per mass unit) -->
    139    <field id="CMIP6_intvaw"        field_ref="vwat"             /> <!-- P1 (kg m-1 s-1) vertical_integral_northward_wind_by_total_water : Vertically integrated Northward moisture transport (Mass_weighted_vertical integral of the product of northward wind by total water mass per unit mass) -->
    140    <field id="CMIP6_jo2"           field_ref="dummy_not_provided"        /> <!-- P1 (s-1) photolysis_rate_of_molecular_oxygen : zonal mean; hence YZT -->
    141    <field id="CMIP6_jo3"           field_ref="dummy_not_provided"        /> <!-- P1 (s-1) photolysis_rate_of_ozone : zonal mean; hence YZT -->
    142    <field id="CMIP6_jpdftaureicemodis" field_ref="crimodis"              /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : MODIS Optical Thickness-Particle Size joint  distribution, ice -->
    143    <field id="CMIP6_jpdftaureliqmodis" field_ref="crlmodis"              /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : MODIS Optical Thickness-Particle Size joint  distribution, liquid -->
    144    <field id="CMIP6_latitude"      field_ref="io_lat"                    /> <!-- P1 (degrees_north) latitude : Latitude -->
    145    <field id="CMIP6_lim"           field_ref="dummy_not_provided"        /> <!-- P2 (kg) land_ice_mass : Greenland -->
    146    <field id="CMIP6_limnsw"        field_ref="dummy_not_provided"        /> <!-- P2 (kg) land_ice_mass_not_displacing_sea_water : Greenland -->
    147    <field id="CMIP6_loadbc"        field_ref="loadbc"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_black_carbon_dry_aerosol : Load of Black Carbon Aerosol -->
    148    <field id="CMIP6_loaddust"      field_ref="loaddust"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_dust_dry_aerosol : Load of Dust -->
    149    <field id="CMIP6_loadnh4"       field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_ammonium_dry_aerosol : Load of NH4 -->
    150    <field id="CMIP6_loadno3"       field_ref="loadno3"          /> <!-- P1 (kg m-2) atmosphere_mass_content_of_nitrate_dry_aerosol : Load of NO3 -->
    151    <field id="CMIP6_loadoa"        field_ref="loadoa"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol : Load of Dry Aerosol Organic Matter -->
    152    <field id="CMIP6_loadpoa"       field_ref="loadoa"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_primary_particulate_organic_matter_dry_aerosol : Load of Dry Aerosol Primary Organic Matter -->
    153    <field id="CMIP6_loadso4"       field_ref="loadso4"          /> <!-- P1 (kg m-2) atmosphere_mass_content_of_sulfate_dry_aerosol : Load of SO4 -->
    154    <field id="CMIP6_loadsoa"       field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol : Load of Dry Aerosol Secondary Organic Matter -->
    155    <field id="CMIP6_loadss"        field_ref="loadss"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_seasalt_dry_aerosol : Load of Seasalt -->
    156    <field id="CMIP6_longitude"     field_ref="io_lon"              /> <!-- P1 (degrees_east) longitude : Longitude -->
    157    <field id="CMIP6_lwsffluxaero"  field_ref="dummy_not_provided"         /> <!-- P2 (W m-2) longwave__flux__due_to_volcanic_aerosols_at_the_surface : downwelling longwave  flux  due to volcanic aerosols at the surface to be diagnosed through double radiation call -->
    158    <field id="CMIP6_lwsrfasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_instantaneous_longwave_forcing_due_to_dust : All-sky Surface Longwave radiative flux due to Dust -->
    159    <field id="CMIP6_lwsrfcsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_instantaneous_longwave_forcing_due_to_dust_in_clearsky : Clear-sky Surface Longwave radiative flux due to Dust -->
    160    <field id="CMIP6_lwtoaasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : all sky lw-rf dust at toa -->
    161    <field id="CMIP6_lwtoacsaer"    field_ref="toplwad0"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : Clear-Sky LW-RF Aerosols at TOA -->
    162    <field id="CMIP6_lwtoacsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing_due_to_dust_in_clearsky : Clear-sky TOA Longwave radiative flux due to Dust -->
    163    <field id="CMIP6_lwtoafluxaerocs" field_ref="dummy_not_provided"       /> <!-- P1 (W m-2) longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling longwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
    164    <field id="CMIP6_mc"            field_ref="mc"               /> <!-- P1 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : The net mass flux should represent the difference between the updraft and downdraft components.  The flux is computed as the mass divided by the area of the grid cell. -->
    165    <field id="CMIP6_mcd"           field_ref="dnwd"              > (dnwd-dnwd0) &gt; 0 ? (dnwd-dnwd0) : 0 </field> <!-- P2 (kg m-2 s-1) atmosphere_downdraft_convective_mass_flux : Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
    166    <field id="CMIP6_mcu"           field_ref="upwd"             /> <!-- P1 (kg m-2 s-1) atmosphere_updraft_convective_mass_flux : Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
    167    <field id="CMIP6_md"            field_ref="dummy_not_provided"        /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_emission : Wet diameter mode coarse insoluble -->
    168    <field id="CMIP6_mrroLi"        field_ref="mrroli"                    /> <!-- P1 (kg m-2 s-1) land_ice_runoff_flux : Land Ice Runoff Flux -->
    169    <field id="CMIP6_n2o"           field_ref="dummy_not_provided"        /> <!-- P1 (mol mol-1) mole_fraction_of_nitrous_oxide_in_air : Mole Fraction of N2O -->
    170    <field id="CMIP6_n2oglobal"     field_ref="N2O_ppb"                   /> <!-- P1 (1e-09) mole_fraction_of_nitrous_oxide_in_air : Global Mean Mole Fraction of N2O -->
    171    <field id="CMIP6_o3"            field_ref="ozone"                     /> <!-- P1 (mol mol-1) mole_fraction_of_ozone_in_air : Mole Fraction of O3 -->
    172    <field id="CMIP6_od443dust"     field_ref="dummy_not_provided"        /> <!-- P1 (1) atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles : Optical thickness at 443 nm Dust -->
    173    <field id="CMIP6_od550aerso"    field_ref="od550_STRAT"               /> <!-- P1 (1) strat_aerosol_optical_depth : Stratospheric Optical depth at 550 nm (all aerosols) 2D-field (here we limit the computation of OD to the stratosphere only) -->
    174    <field id="CMIP6_od550so4so"    field_ref="dummy_not_provided"        /> <!-- P1 (1)  : Stratospheric Optical depth at 550 nm (sulphate only) 2D-field (here we limit the computation of OD to the stratosphere only) -->
    175    <field id="CMIP6_od865dust"     field_ref="dummy_not_provided"        /> <!-- P1 (1) atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles : Optical thickness at 865 nm Dust -->
    176    <field id="CMIP6_parasolRefl" field_ref="parasol_refl"                /> <!-- P1 (1) toa_bidirectional_reflectance : PARASOL Reflectance -->
    177    <field id="CMIP6_pctisccp"      field_ref="ctpisccp"                  /> <!-- P1 (Pa) air_pressure_at_cloud_top : time-means weighted by the ISCCP Total Cloud Fraction - see  http://cfmip.metoffice.com/COSP.html -->
    178    <field id="CMIP6_pfull"         field_ref="pres"                      /> <!-- P1 (Pa) air_pressure : Pressure on Model Levels -->
    179    <field id="CMIP6_phalf"         field_ref="paprs"                     /> <!-- P1 (Pa) air_pressure : Pressure on Model Half-Levels -->
    180    <field id="CMIP6_pr"            field_ref="precip"                    /> <!-- P1 (kg m-2 s-1) precipitation_flux : at surface; includes both liquid and solid phases from all types of clouds (both large-scale and convective) -->
    181    <field id="CMIP6_prCrop"        field_ref="dummy_not_provided"        /> <!-- P1 (kg m-2 s-1) precipitation_flux : Precipitation over Crop Tile -->
    182    <field id="CMIP6_prc"           field_ref="pluc"                      /> <!-- P1 (kg m-2 s-1) convective_precipitation_flux : at surface; includes both liquid and solid phases. -->
    183    <field id="CMIP6_prcprof"       field_ref="pr_con_l"                  /> <!-- P2 (kg m-2 s-1) convective_rainfall_flux : Convective Rainfall Flux -->
    184    <field id="CMIP6_prcsh"         field_ref="dummy_not_provided"        /> <!-- P1 (kg m-2 s-1) shallow_convective_precipitation_flux : Shallow convection precipitation flux -->
    185    <field id="CMIP6_prhmax"        field_ref="prhmax" freq_op="1h" >   @prhmax   </field> <!-- P1 (kg m-2 s-1) precipitation_flux : Maximum Hourly Precipitation Rate -->
    186    <field id="CMIP6_prlsns"        field_ref="pr_lsc_i"                  /> <!-- P2 (kg m-2 s-1) large_scale_snowfall_flux : large-scale precipitation of all forms of water in the solid phase. -->
    187    <field id="CMIP6_prlsprof"      field_ref="pr_lsc_l"                  /> <!-- P2 (kg m-2 s-1) large_scale_rainfall_flux : Stratiform Rainfall Flux -->
    188    <field id="CMIP6_prra_land"     field_ref="dummy_XY"         /> <!-- P2 (kg m-2 s-1) rainfall_flux : rainfall_flux -->
    189    <field id="CMIP6_prra_ifs"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) rainfall_flux : computed as the total mass of liquid water falling as liquid rain  into the ice-free portion of the ocean divided by the area of the ocean portion of the grid cell. -->
    190    <field id="CMIP6_prra_ist"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) rainfall_flux : over Land Ice//quantity averaged over ice sheet (grounded ice sheet and floating ice shelf) only. Needed to analyse the impact of downscaling methods -->
    191    <field id="CMIP6_prra"          field_ref="rain_fall"                 /> <!-- P1 (kg m-2 s-1) rainfall_flux : Rainfall rate -->
    192    <field id="CMIP6_prrc_land"     field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) convective_rainfall_flux : convective_rainfall_flux -->
    193    <field id="CMIP6_prrc"          field_ref="rain_con"                  /> <!-- P1 (kg m-2 s-1) convective_rainfall_flux : Convective Rainfall rate -->
    194    <field id="CMIP6_prrsn"         field_ref="dummy_not_provided"       /> <!-- P1 (1) mass_fraction_of_rainfall_onto_snow : mass_fraction_of_rainfall_onto_snow -->
    195    <field id="CMIP6_prsn"          field_ref="snow"                     /> <!-- P1 (kg m-2 s-1) snowfall_flux : at surface; includes precipitation of all forms of water in the solid phase -->
    196    <field id="CMIP6_prsn_ifs"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) snowfall_flux : computed as the total mass per unit time of solid-phase precipitation falling into the ice-free portion of the ocean divided by the area of the ocean portion of the grid cell.   (Snowfall flux includes all types of solid-phase precipitation.) -->
    197    <field id="CMIP6_prsn_ist"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) snowfall_flux : quantity averaged over ice sheet (grounded ice sheet and floating ice shelf) only. Needed to analyse the impact of downscaling methods -->
    198    <field id="CMIP6_prsnc_land"    field_ref="dummy_XYA"        /> <!-- P2 (kg m-2 s-1) convective_snowfall_flux : convective_snowfall_flux -->
    199    <field id="CMIP6_prsnc"         field_ref="pr_con_i"                 /> <!-- P2 (kg m-2 s-1) convective_snowfall_flux : Convective Snowfall rate -->
    200    <field id="CMIP6_prsnsn"        field_ref="dummy_not_provided"       /> <!-- P1 (1) mass_fraction_of_snowfall_onto_snow : mass_fraction_of_snowfall_onto_snow -->
    201    <field id="CMIP6_prw"           field_ref="prw"                      /> <!-- P1 (kg m-2) atmosphere_water_vapor_content : Water Vapor Path -->
    202    <field id="CMIP6_ps"            field_ref="psol"                     /> <!-- P1 (Pa) surface_air_pressure : not, in general, the same as mean sea-level pressure -->
    203    <field id="CMIP6_psitem"        field_ref="dummy_XYA"                /> <!-- P1 (kg s^-1) meridional_streamfunction_transformed_eulerian_mean : zonal mean; hence YZT -->
    204    <field id="CMIP6_psl"           field_ref="slp"                      /> <!-- P1 (Pa) air_pressure_at_sea_level : not, in general, the same as surface pressure -->
    205    <field id="CMIP6_rainmxrat"     field_ref="dummy_not_provided"       /> <!-- P2 (1) mass_fraction_of_rain_in_air : rain_mixing_ratio -->
    206    <field id="CMIP6_reffcclwtop"   field_ref="dummy_not_provided"       /> <!-- P1 (m) effective_radius_of_convective_cloud_liquid_water_particle_at_liquid_water_cloud_top : Cloud-Top Effective Droplet Radius In Convective Cloud -->
    207    <field id="CMIP6_reffclic"      field_ref="dummy_not_provided"       /> <!-- P2 (m) effective_radius_of_convective_cloud_ice_particle : Hydrometeor Effective Radius of Convective Cloud Ice -->
    208    <field id="CMIP6_reffclis"      field_ref="ref_ice"                  /> <!-- P2 (m) effective_radius_of_stratiform_cloud_ice_particle : Hydrometeor Effective Radius of Stratiform Cloud Ice -->
    209    <field id="CMIP6_reffclwc"      field_ref="dummy_not_provided"       /> <!-- P2 (m) effective_radius_of_convective_cloud_liquid_water_particle : Hydrometeor Effective Radius of Convective Cloud Liquid Water -->
    210    <field id="CMIP6_reffclws"      field_ref="reffclws" expr="@reffclws / @lcc3dstra" > reffclws / lcc3dstra </field> <!-- P2 (m) effective_radius_of_stratiform_cloud_liquid_water_particle : Hydrometeor Effective Radius of Stratiform Cloud Liquid Water -->
    211    <field id="CMIP6_reffgrpls"     field_ref="dummy_not_provided"       /> <!-- P2 (m) effective_radius_of_stratiform_cloud_graupel_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
     124   <field id="CMIP6_huss"          field_ref="q2m"              /> <!-- P1 (1.0) specific_humidity : Near-surface (usually, 2 meter) specific humidity. -->
     125   <field id="CMIP6_iareafl"       field_ref="fract_sic"         >fract_sic*aire </field> <!-- P3 (m2) floating_ice_shelf_area : Total area of the floating ice shelves (the component of ice sheet that flows over ocean) -->
     126   <field id="CMIP6_iareagr"       field_ref="fract_lic"         >fract_lic*aire </field> <!-- P3 (m2) grounded_ice_sheet_area : Total area of the grounded ice sheets (the component of ice sheet resting over bedrock) -->
     127   <field id="CMIP6_intuadse"      field_ref="dummy_XY"         /> <!-- P1 (1.e6 J m-1 s-1) vertical_integral_eastward_wind_by_dry_static_energy : Mass weighted vertical integral of the product of northward wind by dry static energy per unit mass: (cp.T +zg).u -->
     128   <field id="CMIP6_intuaw"        field_ref="dummy_XY"         /> <!-- P1 (kg m-1 s-1) vertical_integral_eastward_wind_by_total_water : Used in PMIP2 -->
     129   <field id="CMIP6_intvadse"      field_ref="dummy_XY"         /> <!-- P1 (1.e6 J m-1 s-1) vertical_integral_northward_wind_by_dry_static_energy : Used in PMIP2 -->
     130   <field id="CMIP6_intvaw"        field_ref="dummy_XY"         /> <!-- P1 (kg m-1 s-1) vertical_integral_northward_wind_by_total_water : Used in PMIP2 -->
     131   <field id="CMIP6_jo2"           field_ref="dummy_XYA"        /> <!-- P1 (s-1) photolysis_rate_of_molecular_oxygen : Rate of photolysis of molecular oxygen to atomic oxygen (o2 -> o1d+o) -->
     132   <field id="CMIP6_jo3"           field_ref="dummy_XYA"        /> <!-- P1 (s-1) photolysis_rate_of_ozone : sum of rates o3 -> o1d+o2 and o3 -> o+o2 -->
     133   <field id="CMIP6_jpdftaureicemodis" field_ref="crimodis"     /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : MODIS Optical Thickness-Particle Size joint  distribution, ice -->
     134   <field id="CMIP6_jpdftaureliqmodis" field_ref="crlmodis"     /> <!-- P1 (%) cloud_area_fraction_in_atmosphere_layer : MODIS Optical Thickness-Particle Size joint  distribution, liquid -->
     135   <field id="CMIP6_latitude"      field_ref="lat"              /> <!-- P1 (degrees_north) latitude : latitude -->
     136   <field id="CMIP6_lim"           field_ref="dummy_0d"         /> <!-- P2 (kg) land_ice_mass : The ice sheet mass is computed as the volume times density -->
     137   <field id="CMIP6_limnsw"        field_ref="dummy_0d"         /> <!-- P2 (kg) land_ice_mass_not_displacing_sea_water : The ice sheet mass is computed as the volume above flotation times density. Changes in land_ice_mass_not_displacing_sea_water will always result in a change in sea level, unlike changes in land_ice_mass which may not result in sea level change (such as melting of the floating ice shelves, or portion of ice that sits on bedrock below sea level) -->
     138   <field id="CMIP6_loadbc"        field_ref="loadbc"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_black_carbon_dry_aerosol : unset -->
     139   <field id="CMIP6_loaddust"      field_ref="loaddust"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_dust_dry_aerosol : unset -->
     140   <field id="CMIP6_loadnh4"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_ammonium_dry_aerosol : unset -->
     141   <field id="CMIP6_loadno3"       field_ref="loadno3"          /> <!-- P1 (kg m-2) atmosphere_mass_content_of_nitrate_dry_aerosol : unset -->
     142   <field id="CMIP6_loadoa"        field_ref="loadoa"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_particulate_organic_matter_dry_aerosol : atmosphere dry organic content: This is the vertically integrated sum of atmosphere_primary_organic_content and atmosphere_secondary_organic_content (see next two table entries). -->
     143   <field id="CMIP6_loadpoa"       field_ref="loadoa"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_primary_particulate_organic_matter_dry_aerosol : unset -->
     144   <field id="CMIP6_loadso4"       field_ref="loadso4"          /> <!-- P1 (kg m-2) atmosphere_mass_content_of_sulfate_dry_aerosol : unset -->
     145   <field id="CMIP6_loadsoa"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2) atmosphere_mass_content_of_secondary_particulate_organic_matter_dry_aerosol : unset -->
     146   <field id="CMIP6_loadss"        field_ref="loadss"           /> <!-- P1 (kg m-2) atmosphere_mass_content_of_seasalt_dry_aerosol : unset -->
     147   <field id="CMIP6_longitude"     field_ref="lon"              /> <!-- P1 (degrees_east) longitude : Longitude -->
     148   <field id="CMIP6_lwsffluxaero"  field_ref="dummy_XY"         /> <!-- P2 (W m-2) longwave__flux__due_to_volcanic_aerosols_at_the_surface : downwelling longwave  flux  due to volcanic aerosols at the surface to be diagnosed through double radiation call -->
     149   <field id="CMIP6_lwsrfasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_all_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     150   <field id="CMIP6_lwsrfcsdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_clear_sky_surface_longwave_flux_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     151   <field id="CMIP6_lwtoaasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : proposed name: toa_instantaneous_longwave_forcing_due_to_dust_ambient_aerosol -->
     152   <field id="CMIP6_lwtoacs"       field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_clear_sky_top_of_atmosphere_longwave_flux_to_dust_ambient_aerosol_particles___2D_field_radiative_properties : Balkanski - LSCE -->
     153   <field id="CMIP6_lwtoacsaer"    field_ref="toplwad0"         /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : proposed name: toa_instantaneous_longwave_forcing_due_to_ambient_aerosol_assuming_clear_sky -->
     154   <field id="CMIP6_lwtoafluxaerocs" field_ref="dummy_XY"       /> <!-- P1 (W m-2) longwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling longwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
     155   <field id="CMIP6_mc"            field_ref="mc"               /> <!-- P3 (kg m-2 s-1) atmosphere_net_upward_convective_mass_flux : The net mass flux should represent the difference between the updraft and downdraft components.  The flux is computed as the mass divided by the area of the grid cell. -->
     156   <field id="CMIP6_mcd"           field_ref="dummy_XYA"        /> <!-- P2 (kg m-2 s-1) atmosphere_downdraft_convective_mass_flux : Calculated as the convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
     157   <field id="CMIP6_mcu"           field_ref="dummy_XYA"        /> <!-- P1 (kg m-2 s-1) atmosphere_updraft_convective_mass_flux : In accordance with common usage in geophysical disciplines, "flux" implies per unit area, called "flux density" in physics. The atmosphere convective mass flux is the vertical transport of mass for a field of cumulus clouds or thermals, given by the product of air density and vertical velocity. For an area-average, cell_methods should specify whether the average is over all the area or the area of updrafts only. -->
     158   <field id="CMIP6_md"            field_ref="dummy_XYA"        /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_emission : Balkanski - LSCE -->
     159   <field id="CMIP6_mmraerso4"     field_ref="concso4"> concso4/(pres/287.04/ta) </field><!-- P1 (kg kg-1) mass_fraction_of_sulfate_dry_aerosol_in_air : Aerosol Sulfate Mass Mixing Ratio -->
     160   <field id="CMIP6_mrroLi"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) land_ice_runoff_flux : Runoff flux over land ice is the difference between any available liquid water in the snowpack less any refreezing. Computed as the sum of rainfall and melt of snow or ice less any refreezing or water retained in the snowpack -->
     161   <field id="CMIP6_n2o"           field_ref="dummy_XYA"        /> <!-- P1 (mol mol-1) mole_fraction_of_nitrous_oxide_in_air : N2O volume mixing ratio -->
     162   <field id="CMIP6_n2oglobal"     field_ref="N2O_ppb"          /> <!-- P1 (1e-09) mole_fraction_of_nitrous_oxide_in_air : Global mean Nitrous Oxide (N2O) -->
     163   <field id="CMIP6_o3"            field_ref="tro3"             /> <!-- P1 (mol mol-1) mole_fraction_of_ozone_in_air : Ozone volume mixing ratio -->
     164   <field id="CMIP6_od443dust"     field_ref="dummy_XY"         /> <!-- P1 (1.0) atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     165   <field id="CMIP6_od550aerso"    field_ref="od550_STRAT"      /> <!-- P1 (1.0) strat_aerosol_optical_depth : From tropopause to stratopause as defined by the model -->
     166   <field id="CMIP6_od550so4so"    field_ref="dummy_XY"         /> <!-- P1 (1.0) missing : Balkanski - LSCE -->
     167   <field id="CMIP6_od865dust"     field_ref="dummy_XY"         /> <!-- P1 (1.0) atmosphere_optical_thickness_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     168   <field id="CMIP6_orog"          field_ref="dummy_XY"         /> <!-- P1 (m) surface_altitude : The surface called "surface" means the lower boundary of the atmosphere. Altitude is the (geometric) height above the geoid, which is the reference geopotential surface. The geoid is similar to mean sea level. -->
     169   <field id="CMIP6_parasolRefl_sea" field_ref="dummy_XY"         /> <!-- P1 (1.0) toa_bidirectional_reflectance : Simulated reflectance from PARASOL as seen at the top of the atmosphere for 5 solar zenith angles. Valid only over ocean and for one viewing direction (viewing zenith angle of 30 degrees and relative azimuth angle 320 degrees). -->
     170   <field id="CMIP6_pctisccp"      field_ref="ctpisccp"         /> <!-- P1 (Pa) air_pressure_at_cloud_top : ISCCP Mean Cloud Top Pressure. Time-means are weighted by the ISCCP Total Cloud Fraction {:cltisccp} - see  http://cfmip.metoffice.com/COSP.html -->
     171   <field id="CMIP6_pfull"         field_ref="pres"             /> <!-- P1 (Pa) air_pressure : Air pressure on model levels -->
     172   <field id="CMIP6_phalf"         field_ref="paprs"            /> <!-- P1 (Pa) air_pressure : Air pressure on model half-levels -->
     173   <field id="CMIP6_pr"            field_ref="precip"           /> <!-- P1 (kg m-2 s-1) precipitation_flux : includes both liquid and solid phases -->
     174   <field id="CMIP6_prCrop"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) precipitation_flux : includes both liquid and solid phases -->
     175   <field id="CMIP6_prc"           field_ref="pluc"             /> <!-- P1 (kg m-2 s-1) convective_precipitation_flux : Convective precipitation at surface; includes both liquid and solid phases. -->
     176   <field id="CMIP6_prcprof"       field_ref="pr_con_l"         /> <!-- P2 (kg m-2 s-1) convective_rainfall_flux : unset -->
     177   <field id="CMIP6_prcsh"         field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) shallow_convective_precipitation_flux : Convection precipitation from shallow convection -->
     178   <field id="CMIP6_prhmax"        field_ref="precip" freq_op="1h"  operation="maximum"           >   @this   </field> <!-- P1 (kg m-2 s-1) precipitation_flux : Maximum Hourly Precipitation Rate -->
     179   <field id="CMIP6_prlsns"        field_ref="snowl"            /> <!-- P2 (kg m-2 s-1) large_scale_snowfall_flux : large-scale precipitation of all forms of water in the solid phase. -->
     180   <field id="CMIP6_prlsprof"      field_ref="plul"             /> <!-- P2 (kg m-2 s-1) large_scale_rainfall_flux : unset -->
     181   <field id="CMIP6_prra"          field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) rainfall_flux : Rainfall rate -->
     182   <field id="CMIP6_prrc"          field_ref="pluc"             /> <!-- P1 (kg m-2 s-1) convective_rainfall_flux : Convective Rainfall rate -->
     183   <field id="CMIP6_prrsn"         field_ref="dummy_XY"         /> <!-- P1 (1) mass_fraction_of_rainfall_onto_snow : The fraction of the grid averaged rainfall which falls on the snow pack -->
     184   <field id="CMIP6_prsn"          field_ref="snow"             /> <!-- P1 (kg m-2 s-1) snowfall_flux : at surface; includes precipitation of all forms of water in the solid phase -->
     185   <field id="CMIP6_prsnc"         field_ref="pr_con_i"         /> <!-- P2 (kg m-2 s-1) convective_snowfall_flux : convective precipitation of all forms of water in the solid phase. -->
     186   <field id="CMIP6_prsnsn"        field_ref="dummy_XY"         /> <!-- P1 (1) mass_fraction_of_snowfall_onto_snow : The fraction of the snowfall which falls on the snow pack -->
     187   <field id="CMIP6_prw"           field_ref="prw"              /> <!-- P1 (kg m-2) atmosphere_water_vapor_content : vertically integrated through the atmospheric column -->
     188   <field id="CMIP6_ps"            field_ref="psol"             /> <!-- P1 (Pa) surface_air_pressure : surface pressure (not mean sea-level pressure), 2-D field to calculate the 3-D pressure field from hybrid coordinates -->
     189   <field id="CMIP6_psitem"        field_ref="dummy_lat-P"      /> <!-- P1 (kg s^-1)  meridional_streamfunction_transformed_eulerian_mean : Residual mass streamfunction, computed from vstar and integrated from the top of the atmosphere (on the native model grid). Reference: Andrews et al (1987): Middle Atmospheric Dynamics. Accademic Press. -->
     190   <field id="CMIP6_psl"           field_ref="slp"              /> <!-- P1 (Pa) air_pressure_at_sea_level : Sea Level Pressure -->
     191   <field id="CMIP6_rainmxrat"     field_ref="dummy_XYA"        /> <!-- P2 (1.0) mass_fraction_of_rain_in_air : Rain mixing ratio -->
     192   <field id="CMIP6_reffcclwtop"   field_ref="dummy_XY"         /> <!-- P1 (m) effective_radius_of_convective_cloud_liquid_water_particle_at_liquid_water_cloud_top : Droplets are liquid only.  This is the effective radius "as seen from space" over convective liquid cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, or for some models it is the sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Reported values are weighted by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately. -->
     193   <field id="CMIP6_reffclic"      field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_convective_cloud_ice_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
     194   <field id="CMIP6_reffclis"      field_ref="ref_ice"          /> <!-- P2 (m) effective_radius_of_stratiform_cloud_ice_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
     195   <field id="CMIP6_reffclwc"      field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_convective_cloud_liquid_water_particle : Droplets are liquid.  The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell. -->
     196   <field id="CMIP6_reffclws"      field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_stratiform_cloud_liquid_water_particle : Droplets are liquid.  The effective radius is defined as the ratio of the third moment over the second moment of the particle size distribution and the time-mean should be calculated, weighting the individual samples by the cloudy fraction of the grid cell. -->
     197   <field id="CMIP6_reffgrpls"     field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_stratiform_cloud_graupel_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
    212198   <field id="CMIP6_reffrainc"     field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_convective_cloud_rain_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
    213199   <field id="CMIP6_reffrains"     field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_stratiform_cloud_rain_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
    214    <field id="CMIP6_reffsclwtop"   field_ref="reffclwtop" expr="@reffclwtop / @lcc" > reffclwtop / lcc </field> <!-- P1 (m) effective_radius_of_stratiform_cloud_liquid_water_particle_at_liquid_water_cloud_top : Cloud-Top Effective Droplet Radius In Stratiform Cloud -->
     200   <field id="CMIP6_reffsclwtop"   field_ref="dummy_XY"         /> <!-- P1 (m) effective_radius_of_stratiform_cloud_liquid_water_particle_at_liquid_water_cloud_top : Droplets are liquid only.  This is the effective radius "as seen from space" over liquid stratiform cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, or for some models it is the sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Reported values are weighted by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean.daily data, separated to large-scale clouds, convective clouds. If any of the cloud is from more than one process (i.e. shallow convection), please provide them separately. -->
    215201   <field id="CMIP6_reffsnowc"     field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_convective_cloud_snow_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
    216202   <field id="CMIP6_reffsnows"     field_ref="dummy_XYA"        /> <!-- P2 (m) effective_radius_of_stratiform_cloud_snow_particle : This is defined as the in-cloud ratio of the third moment over the second moment of the particle size distribution (obtained by considering only the cloudy portion of the grid cell). -->
    217    <field id="CMIP6_rld"           field_ref="rld"              /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air : Downwelling Longwave Radiation -->
    218    <field id="CMIP6_rld4co2"       field_ref="rld4co2"          /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air : Downwelling Longwave Radiation 4XCO2 Atmosphere -->
    219    <field id="CMIP6_rldcs"         field_ref="rldcs"            /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air_assuming_clear_sky : Downwelling Clear-Sky Longwave Radiation -->
    220    <field id="CMIP6_rldcs4co2"     field_ref="rldcs4co2"        /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air_assuming_clear_sky : Downwelling Clear-Sky Longwave Radiation 4XCO2 Atmosphere -->
    221    <field id="CMIP6_rlds_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_longwave_flux_in_air : Surface Downwelling Longwave Radiation -->
     203   <field id="CMIP6_rld"           field_ref="rld"              /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air : Downwelling Longwave Radiation (includes the fluxes at the surface and TOA) -->
     204   <field id="CMIP6_rld4co2"       field_ref="rld4co2"          /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air : Downwelling longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA) -->
     205   <field id="CMIP6_rldcs"         field_ref="rldcs"            /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air_assuming_clear_sky : Downwelling clear-sky longwave radiation (includes the fluxes at the surface and TOA) -->
     206   <field id="CMIP6_rldcs4co2"     field_ref="rldcs4co2"        /> <!-- P1 (W m-2) downwelling_longwave_flux_in_air_assuming_clear_sky : Downwelling clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA) -->
    222207   <field id="CMIP6_rlds"          field_ref="LWdnSFC"          /> <!-- P1 (W m-2) surface_downwelling_longwave_flux_in_air : Surface Downwelling Longwave Radiation -->
    223    <field id="CMIP6_rldscs"        field_ref="LWdnSFCclr"       /> <!-- P1 (W m-2) surface_downwelling_longwave_flux_in_air : Surface Downwelling Longwave Radiation -->
    224    <field id="CMIP6_rls"           field_ref="soll"             /> <!-- P1 (W m-2) surface_net_downward_longwave_flux : Net Longwave Surface Radiation -->
    225    <field id="CMIP6_rls_land"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_net_downward_longwave_flux : Net longwave radiation -->
    226    <field id="CMIP6_rlu"           field_ref="rlu"              />  <!-- P1 (W m-2) upwelling_longwave_flux_in_air : Fluxes are requested at all levels -->
    227    <field id="CMIP6_rlu4co2"       field_ref="rlu4co2"          /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air : Upwelling Longwave Radiation 4XCO2 Atmosphere -->
    228    <field id="CMIP6_rlucs"         field_ref="rlucs"            /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air_assuming_clear_sky : Includes also the fluxes at the surface and TOA. -->
    229    <field id="CMIP6_rlucs4co2"     field_ref="rlucs4co2"        /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air_assuming_clear_sky : Upwelling Clear-Sky Longwave Radiation 4XCO2 Atmosphere -->
    230    <field id="CMIP6_rlus_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_longwave_flux_in_air : Surface Upwelling Longwave Radiation -->
     208   <field id="CMIP6_rldscs"        field_ref="LWdnSFCclr"       /> <!-- P1 (W m-2) surface_downwelling_longwave_flux_in_air_assuming_clear_sky : Surface downwelling clear-sky longwave radiation -->
     209   <field id="CMIP6_rls"           field_ref="soll"             /> <!-- P1 (W m-2) surface_net_downward_longwave_flux : Net longwave surface radiation -->
     210   <field id="CMIP6_rlu"           field_ref="rlu"              /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air : Upwelling longwave radiation (includes the fluxes at the surface and TOA) -->
     211   <field id="CMIP6_rlu4co2"       field_ref="rlu4co2"          /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air : Upwelling longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA) -->
     212   <field id="CMIP6_rlucs"         field_ref="rlucs"            /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air_assuming_clear_sky : Upwelling clear-sky longwave radiation  (includes the fluxes at the surface and TOA) -->
     213   <field id="CMIP6_rlucs4co2"     field_ref="rlucs4co2"        /> <!-- P1 (W m-2) upwelling_longwave_flux_in_air_assuming_clear_sky : Upwelling clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold (includes the fluxes at the surface and TOA) -->
    231214   <field id="CMIP6_rlus"          field_ref="LWupSFC"          /> <!-- P1 (W m-2) surface_upwelling_longwave_flux_in_air : Surface Upwelling Longwave Radiation -->
    232    <field id="CMIP6_rlut"          field_ref="topl"             /> <!-- P1 (W m-2) toa_outgoing_longwave_flux : TOA Outgoing Longwave Radiation -->
    233    <field id="CMIP6_rlut4co2"      field_ref="rlut4co2"         /> <!-- P1 (W m-2) toa_outgoing_longwave_flux : TOA Outgoing Longwave Radiation 4XCO2 Atmosphere -->
    234    <field id="CMIP6_rlutcs"        field_ref="topl0"            /> <!-- P1 (W m-2) toa_outgoing_longwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Longwave Radiation -->
    235    <field id="CMIP6_rlutcs4co2"    field_ref="rlutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_longwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Longwave Radiation 4XCO2 Atmosphere -->
    236    <field id="CMIP6_rsd"           field_ref="rsd"              /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air : Fluxes are requested at all levels -->
    237    <field id="CMIP6_rsd4co2"       field_ref="rsd4co2"          /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air : Downwelling Shortwave Radiation 4XCO2 Atmosphere -->
    238    <field id="CMIP6_rsdcs"         field_ref="rsdcs"            /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling Clear-Sky Shortwave Raiation -->
    239    <field id="CMIP6_rsdcs4co2"     field_ref="rsdcs4co2"        /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling Clear-Sky Shortwave Radiation 4XCO2 Atmosphere -->
    240    <field id="CMIP6_rsdcsbnd"      field_ref="dummy_not_provided"        />   <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling Clear-Sky Shortwave Radiation at each level for each band -->
    241    <field id="CMIP6_rsds"          field_ref="SWdnSFC"          /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air : This is the 3-hour mean flux. -->
    242    <field id="CMIP6_rsds_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air : Surface Downwelling Shortwave Radiation -->
    243    <field id="CMIP6_rsdscs"        field_ref="SWdnSFCclr"       /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Downwelling Clear-Sky Shortwave Radiation -->
    244    <field id="CMIP6_rsdscsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Downwelling Clear-Sky Shortwave Radiation for each band -->
    245    <field id="CMIP6_rsdscsdiff"    field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Diffuse Downwelling Clear Sky Shortwave Radiation -->
    246    <field id="CMIP6_rsdsdiff"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air : Surface Diffuse Downwelling Shortwave Radiation -->
    247    <field id="CMIP6_rsdt"          field_ref="SWdnTOA"          /> <!-- P1 (W m-2) toa_incoming_shortwave_flux : TOA Incident Shortwave Radiation -->
    248    <field id="CMIP6_rss_land"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_net_downward_shortwave_flux : Net shortwave radiation -->
    249    <field id="CMIP6_rss"           field_ref="sols"             /> <!-- P1 (W m-2) surface_net_downward_shortwave_flux : Net Shortwave Surface Radiation -->
    250    <field id="CMIP6_rsu"           field_ref="rsu"              /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air : Fluxes are requested at all levels -->
    251    <field id="CMIP6_rsu4co2"       field_ref="rsu4co2"          /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air : Upwelling Shortwave Radiation 4XCO2 Atmosphere -->
    252    <field id="CMIP6_rsucs"         field_ref="rsucs"            />  <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Includes also the fluxes at the surface and TOA. -->
    253    <field id="CMIP6_rsucs4co2"     field_ref="rsucs4co2"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Upwelling Clear-Sky Shortwave Radiation 4XCO2 Atmosphere -->
    254    <field id="CMIP6_rsucsbnd"      field_ref="dummy_not_provided"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Upwelling Clear-Sky Shortwave Radiation at each level for each band -->
    255    <field id="CMIP6_rsus_ist"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air : Surface Upwelling Shortwave Radiation -->
    256    <field id="CMIP6_rsus"          field_ref="SWupSFC"          /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air : Surface Upwelling Shortwave Radiation -->
    257    <field id="CMIP6_rsuscs"        field_ref="SWupSFCclr"       /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Upwelling Clear-Sky Shortwave Radiation -->
    258    <field id="CMIP6_rsuscsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Upwelling Clear-Sky Shortwave Radiation for each band -->
    259    <field id="CMIP6_rsut"          field_ref="SWupTOA"          /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : TOA Outgoing Shortwave Radiation -->
    260    <field id="CMIP6_rsut4co2"      field_ref="rsut4co2"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : TOA Outgoing Shortwave Radiation in 4XCO2 Atmosphere -->
    261    <field id="CMIP6_rsutcs"        field_ref="SWupTOAclr"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation -->
    262    <field id="CMIP6_rsutcs4co2"    field_ref="rsutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation 4XCO2 Atmosphere -->
    263    <field id="CMIP6_rsutcsafbnd"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky : TOA Outgoing Clear-Sky, Aerosol-Free Shortwave Radiation in Bands -->
    264    <field id="CMIP6_rsutcsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation for each band -->
    265    <field id="CMIP6_rtmt"          field_ref="nettop"           /> <!-- P1 (W m-2) net_downward_radiative_flux_at_top_of_atmosphere_model : i.e., at the top of that portion of the atmosphere where dynamics are explicitly treated by the model. This is reported only if it differs from the net downward radiative flux at the top of the atmosphere. -->
     215   <field id="CMIP6_rlut"          field_ref="topl"             /> <!-- P1 (W m-2) toa_outgoing_longwave_flux : at the top of the atmosphere (to be compared with satellite measurements) -->
     216   <field id="CMIP6_rlut4co2"      field_ref="rlut4co2"         /> <!-- P1 (W m-2) toa_outgoing_longwave_flux : Top-of-atmosphere outgoing longwave radiation calculated using carbon dioxide concentrations increased fourfold -->
     217   <field id="CMIP6_rlutcs"        field_ref="topl0"            /> <!-- P1 (W m-2) toa_outgoing_longwave_flux_assuming_clear_sky : TOA Outgoing Clear-sky Longwave Radiation -->
     218   <field id="CMIP6_rlutcs4co2"    field_ref="rlutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_longwave_flux_assuming_clear_sky : Top-of-atmosphere outgoing clear-sky longwave radiation calculated using carbon dioxide concentrations increased fourfold -->
     219   <field id="CMIP6_rsd"           field_ref="rsd"              /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air : Downwelling shortwave radiation (includes the fluxes at the surface and top-of-atmosphere) -->
     220   <field id="CMIP6_rsd4co2"       field_ref="rsd4co2"          /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air : Downwelling shortwave radiation calculated using carbon dioxide concentrations increased fourfold -->
     221   <field id="CMIP6_rsdcs"         field_ref="rsdcs"            /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling clear-sky shortwave radiation (includes the fluxes at the surface and top-of-atmosphere) -->
     222   <field id="CMIP6_rsdcs4co2"     field_ref="rsdcs4co2"        /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold -->
     223   <field id="CMIP6_rsdcsaf"       field_ref="dummy_XYA"        /> <!-- P1 (W m-2) downwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
     224   <field id="CMIP6_rsdcsafbnd"    field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
     225   <field id="CMIP6_rsdcsbnd"      field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
     226   <field id="CMIP6_rsds"          field_ref="SWdnSFC"          /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air : surface solar irradiance for UV calculations -->
     227   <field id="CMIP6_rsdscs"        field_ref="SWdnSFCclr"       /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : surface solar irradiance clear sky for UV calculations -->
     228   <field id="CMIP6_rsdscsaf"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds. -->
     229   <field id="CMIP6_rsdscsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
     230   <field id="CMIP6_rsdscsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
     231   <field id="CMIP6_rsdscsdiff"    field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air_assuming_clear_sky : unset -->
     232   <field id="CMIP6_rsdsdiff"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air : unset -->
     233   <field id="CMIP6_rsdt"          field_ref="SWdnTOA"          /> <!-- P1 (W m-2) toa_incoming_shortwave_flux : Shortwave radiation incident at the top of the atmosphere -->
     234   <field id="CMIP6_rss"           field_ref="sols"             /> <!-- P1 (W m-2) surface_net_downward_shortwave_flux : Net downward shortwave radiation at the surface -->
     235   <field id="CMIP6_rsu"           field_ref="rsu"              /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air : Upwelling shortwave radiation  (includes also the fluxes at the surface and top of atmosphere) -->
     236   <field id="CMIP6_rsu4co2"       field_ref="rsu4co2"          /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air : Upwelling Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
     237   <field id="CMIP6_rsucs"         field_ref="rsucs"            /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Upwelling clear-sky shortwave radiation  (includes the fluxes at the surface and TOA) -->
     238   <field id="CMIP6_rsucs4co2"     field_ref="rsucs4co2"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Upwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold -->
     239   <field id="CMIP6_rsucsaf"       field_ref="dummy_XYA"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
     240   <field id="CMIP6_rsucsafbnd"    field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
     241   <field id="CMIP6_rsucsbnd"      field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
     242   <field id="CMIP6_rsus"          field_ref="SWupSFC"          /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air : Surface Upwelling Shortwave Radiation -->
     243   <field id="CMIP6_rsuscs"        field_ref="SWupSFCclr"       /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Upwelling Clear-sky Shortwave Radiation -->
     244   <field id="CMIP6_rsuscsaf"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Surface Upwelling Clear-sky, Aerosol Free Shortwave Radiation -->
     245   <field id="CMIP6_rsuscsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (ACP, 2013). This requires a double-call in the radiation code with precisely the same meteorology. -->
     246   <field id="CMIP6_rsuscsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
     247   <field id="CMIP6_rsut"          field_ref="SWupTOA"          /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : at the top of the atmosphere -->
     248   <field id="CMIP6_rsut4co2"      field_ref="rsut4co2"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : TOA Outgoing Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
     249   <field id="CMIP6_rsutcs"        field_ref="SWupTOAclr"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated in the absence of clouds. -->
     250   <field id="CMIP6_rsutcs4co2"    field_ref="rsutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
     251   <field id="CMIP6_rsutcsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
     252   <field id="CMIP6_rsutcsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
     253   <field id="CMIP6_rtmt"          field_ref="nettop"           /> <!-- P1 (W m-2) net_downward_radiative_flux_at_top_of_atmosphere_model : Net Downward Radiative Flux at Top of Model : I.e., at the top of that portion of the atmosphere where dynamics are explicitly treated by the model. This is reported only if it differs from the net downward radiative flux at the top of the atmosphere. -->
    266254   <field id="CMIP6_rv"            field_ref="dummy_XY"         /> <!-- P1 (s-1) atmosphere_relative_vorticity : Relative Vorticity at 850 hPa -->
    267    <field id="CMIP6_sblnosn"       field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2 s-1) sublimation_amount_assuming_no_snow : sublimation_amount_assuming_no_snow -->
    268255   <field id="CMIP6_sci"           field_ref="ftime_th"         /> <!-- P1 (1.0) shallow_convection_time_fraction : Fraction of time that shallow convection occurs in the grid cell. -->
    269    <field id="CMIP6_scldncl"       field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_stratiform_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Cloud Droplet Number Concentration of Stratiform Cloud Tops -->
    270    <field id="CMIP6_sconcdust"     field_ref="sconcdust"        /> <!-- P1 (kg m-3) mass_concentration_of_dust_dry_aerosol_in_air : Surface Concentration of Dust -->
    271    <field id="CMIP6_sconcso4"      field_ref="sconcso4"         /> <!-- P1 (kg m-3) mass_concentration_of_sulfate_dry_aerosol_in_air : Surface Concentration of SO4 -->
    272    <field id="CMIP6_sconcss"       field_ref="sconcss"          /> <!-- P1 (kg m-3) mass_concentration_of_seasalt_dry_aerosol_in_air : Surface Concentration of Seasalt -->
    273    <field id="CMIP6_sfcWind"       field_ref="wind10m"          />  <!-- P1 (m s-1) wind_speed : Near surface wind speed -->
    274    <field id="CMIP6_sfcWindmax"    field_ref="sfcWindmax" freq_op="1d"   > @sfcWindmax </field> <!-- P1 (m s-1) wind_speed : Mean Daily Maximum Near-Surface Wind Speed -->
    275    <field id="CMIP6_sftlf"         field_ref="pourc_ter"> pourc_ter+pourc_lic </field> <!-- P1 (%) land_area_fraction : Land Area Fraction -->
    276    <field id="CMIP6_siltfrac"      field_ref="dummy_not_provided"       /> <!-- P1 (1.0)  : Silt Fraction -->
     256   <field id="CMIP6_scldncl"       field_ref="dummy_XY"         /> <!-- P1 (m-3) number_concentration_of_stratiform_cloud_liquid_water_particles_in_air_at_liquid_water_cloud_top : Droplets are liquid only.  Report concentration "as seen from space" over stratiform liquid cloudy portion of grid cell.  This is the value from uppermost model layer with liquid cloud or, if available, it is better to sum over all liquid cloud tops, no matter where they occur, as long as they are seen from the top of the atmosphere. Weight by total liquid cloud top fraction of  (as seen from TOA) each time sample when computing monthly mean. -->
     257   <field id="CMIP6_sconcdust"     field_ref="sconcdust"        /> <!-- P1 (kg m-3) mass_concentration_of_dust_dry_aerosol_in_air : mass concentration of dust dry aerosol in air in model lowest layer -->
     258   <field id="CMIP6_sconcso4"      field_ref="sconcso4"         /> <!-- P1 (kg m-3) mass_concentration_of_sulfate_dry_aerosol_in_air : mass concentration of sulfate dry aerosol in air in model lowest layer. -->
     259   <field id="CMIP6_sconcss"       field_ref="sconcss"          /> <!-- P1 (kg m-3) mass_concentration_of_seasalt_dry_aerosol_in_air : mass concentration of seasalt dry aerosol in air in model lowest layer -->
     260   <field id="CMIP6_sedustCI"      field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) tendency_of_atmosphere_mass_content_of_dust_dry_aerosol_particles_due_to_sedimentation : Balkanski - LSCE -->
     261   <field id="CMIP6_sfcWind"       field_ref="wind10m"          /> <!-- P1 (m s-1) wind_speed : near-surface (usually, 10 meters) wind speed. -->
     262   <field id="CMIP6_sfcWindmax"    field_ref="CMIP6_sfcWind" freq_op="1d"  operation="maximum"> @this </field>   <!-- P1 (m s-1) wind_speed : Daily maximum near-surface (usually, 10 meters) wind speed. -->
     263   <field id="CMIP6_sftgif"        field_ref="pourc_lic"        /> <!-- P1 (%) land_ice_area_fraction : Fraction of grid cell covered by land ice (ice sheet, ice shelf, ice cap, glacier) -->
     264   <field id="CMIP6_sftlf"         field_ref="pourc_ter"        /> <!-- P1 (%) land_area_fraction : Please express "X_area_fraction" as the percentage of horizontal area occupied by X. -->
     265   <field id="CMIP6_siltfrac"      field_ref="dummy_XYSo"       /> <!-- P1 (1.0) missing : Silt Fraction -->
     266   <field id="CMIP6_slbnosn"       field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) sublimation_amount_assuming_no_snow : Sublimation of the snow free area -->
    277267   <field id="CMIP6_smc"           field_ref="f_th"        /> <!-- P2 (kg m-2 s-1) atmosphere_net_upward_shallow_convective_mass_flux : The net mass flux represents the difference between the updraft and downdraft components.  For models with a distinct shallow convection scheme, this is calculated as convective mass flux divided by the area of the whole grid cell (not just the area of the cloud). -->
    278    <field id="CMIP6_snmsl"         field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2 s-1) surface_snow_melt_flux_into_soil_layer : surface_snow_melt_flux_into_soil_layer -->
    279    <field id="CMIP6_snowmxrat"     field_ref="dummy_not_provided"         /> <!-- P2 (1.0) mass_fraction_of_snow_in_air : snow_mixing_ratio -->
    280    <field id="CMIP6_snrefr"        field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2 s-1) surface_snow_and_ice_refreezing_flux : surface_snow_and_ice_refreezing_flux -->
    281    <field id="CMIP6_snwc"          field_ref="dummy_not_provided"         /> <!-- P1 (kg m-2) canopy_snow_amount : canopy_snow_amount -->
    282    <field id="CMIP6_solbnd"        field_ref="solbnd"         />  <!-- P1 (W m-2) solar_irradiance : Top-of-Atmosphere Solar Insolation for each band -->
    283    <field id="CMIP6_swsffluxaero"  field_ref="dummy_not_provided"         /> <!-- P2 (W m-2) shortwave__flux_due_to_volcanic_aerosols_at__the_surface : downwelling shortwave  flux due to volcanic aerosols at  the surface to be diagnosed through double radiation call -->
    284    <field id="CMIP6_swsrfasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : All-sky Surface Shortwave radiative flux due to Dust -->
    285    <field id="CMIP6_swsrfcsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) tendency_of_clear_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : Clear-sky Surface Shortwave radiative flux due to Dust -->
    286    <field id="CMIP6_swtoaasdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : all sky sw-rf dust at toa -->
    287    <field id="CMIP6_swtoacsdust"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : clear sky sw-rf dust at toa -->
    288    <field id="CMIP6_swtoafluxaerocs" field_ref="dummy_not_provided"       /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
    289    <field id="CMIP6_sza"           field_ref="sza"              /> <!-- P1 (degree) solar_zenith_angle : solar zenith angle -->
    290    <field id="CMIP6_t2"            field_ref="temp"> temp*temp   </field> <!-- P2 (K2) square_of_air_temperature : square_of_air_temperature -->
    291    <field id="CMIP6_ta"            field_ref="temp"             /> <!-- P1 (K) air_temperature : Air Temperature -->
    292    <field id="CMIP6_tas_ist"       field_ref="dummy_XY"         /> <!-- P1 (K) air_temperature : quantity averaged over ice sheet (grounded ice sheet and floating ice shelf) only. Needed to analyse the impact of downscaling methods -->
    293    <field id="CMIP6_tas"           field_ref="t2m"              /> <!-- P1 (K) air_temperature : This is sampled synoptically. -->
    294    <field id="CMIP6_tasmax"        field_ref="tasmax" freq_op="1d"> @tasmax </field> <!-- P1 (K) air_temperature : monthly mean of the daily-maximum near-surface air temperature. --> 
    295    <field id="CMIP6_tasmaxCrop"    field_ref="dummy_not_provided"         /> <!-- P1 (K) air_temperature : Daily Maximum Near-Surface Air Temperature over Crop Tile -->
    296    <field id="CMIP6_tasmin"        field_ref="tasmin" freq_op="1d"> @tasmin  </field> <!-- P1 (K) air_temperature : Daily Minimum Near-Surface Air Temperature --> 
    297    <field id="CMIP6_tasminCrop"    field_ref="dummy_not_provided"         /> <!-- P1 (K) air_temperature : Daily Minimum Near-Surface Air Temperature over Crop Tile -->
    298    <field id="CMIP6_tau"           field_ref="taux"              >  sqrt( taux^2 + tauy^2)        </field> <!-- P1 (N m-2) surface_downward_stress : Momentum flux -->
    299    <field id="CMIP6_tauu"          field_ref="taux"             /> <!-- P1 (Pa) surface_downward_eastward_stress : Surface Downward Eastward Wind Stress -->
    300    <field id="CMIP6_tauupbl"       field_ref="dummy_XY"         /> <!-- P1 (Pa) surface_downward_eastward_stress_due_to_planetary_boundary_layer : surface -->
    301    <field id="CMIP6_tauv"          field_ref="tauy"             /> <!-- P1 (Pa) surface_downward_northward_stress : Surface Downward Northward Wind Stress -->
    302    <field id="CMIP6_tauvpbl"       field_ref="dummy_XY"         /> <!-- P1 (Pa) surface_downward_northward_stress_due_to_planetary_boundary_layer : surface -->
    303    <field id="CMIP6_tdps"          field_ref="pvap"> 273.16 + (273.16 - 35.86)/(17.269/log(pvap/611.14)-1.)      </field> <!-- P1 (K) dew_point_temperature : 2m dewpoint temperature -->
    304    <field id="CMIP6_tendacabf"     field_ref="dummy_not_provided"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_surface_mass_balance : Greenland -->
    305    <field id="CMIP6_tendlibmassbf" field_ref="dummy_not_provided"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_basal_mass_balance : Antarctica -->
    306    <field id="CMIP6_tendlicalvf"   field_ref="dummy_not_provided"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_calving : Antarctica -->
     268   <field id="CMIP6_snmsl"         field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) surface_snow_melt_flux_into_soil_layer : Water flowing out of snowpack -->
     269   <field id="CMIP6_snowmxrat"     field_ref="dummy_XYA"        /> <!-- P3 (1.0) mass_fraction_of_snow_in_air : Snow mixing ratio -->
     270   <field id="CMIP6_snrefr"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) surface_snow_and_ice_refreezing_flux : Re-freezing of water in the snow -->
     271   <field id="CMIP6_snwc"          field_ref="dummy_XY"         /> <!-- P1 (kg m-2) canopy_snow_amount : Total water mass of the snowpack (liquid or frozen), averaged over a grid cell and interecepted by the canopy. -->
     272   <field id="CMIP6_solbnd"        field_ref="dummy_XY"         /> <!-- P1 (W m-2) band_solar_insolation : Top-of-Atmosphere Solar Insolation for each band -->
     273   <field id="CMIP6_swsffluxaero"  field_ref="dummy_XY"         /> <!-- P2 (W m-2) shortwave__flux_due_to_volcanic_aerosols_at__the_surface : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
     274   <field id="CMIP6_swsrfasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     275   <field id="CMIP6_swsrfcsdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_clear_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
     276   <field id="CMIP6_swtoaasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol -->
     277   <field id="CMIP6_swtoacsdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : proposed name: toa_instantaneous_shortwave_forcing_due_to_dust_ambient_aerosol_assuming_clear_sky -->
     278   <field id="CMIP6_swtoafluxaerocs" field_ref="dummy_XY"       /> <!-- P1 (W m-2) shortwave_flux_due_to_volcanic_aerosols_at_TOA_under_clear_sky : downwelling shortwave flux due to volcanic aerosols at TOA under clear sky to be diagnosed through double radiation call -->
     279   <field id="CMIP6_sza"           field_ref="dummy_XY"         /> <!-- P1 (degree) solar_zenith_angle : The angle between the line of sight to the sun and the local vertical -->
     280   <field id="CMIP6_t2"            field_ref="dummy_XYA"        /> <!-- P2 (K2) square_of_air_temperature : Air temperature squared -->
     281   <field id="CMIP6_ta"            field_ref="temp"             /> <!-- P3 (K) air_temperature : Air Temperature -->
     282   <field id="CMIP6_tas"           field_ref="t2m"              /> <!-- P1 (K) air_temperature : near-surface (usually, 2 meter) air temperature -->
     283   <field id="CMIP6_tasmax"        field_ref="CMIP6_tas" freq_op="1d"  operation="maximum"> @this </field>   <!-- P1 (K) air_temperature : maximum near-surface (usually, 2 meter) air temperature (add cell_method attribute "time: max") -->
     284   <field id="CMIP6_tasmin"        field_ref="CMIP6_tas" freq_op="1d" operation="minimum"> @this  </field>   <!-- P1 (K) air_temperature : minimum near-surface (usually, 2 meter) air temperature (add cell_method attribute "time: min") -->
     285   <field id="CMIP6_tau"           field_ref="taux"              >  sqrt( taux^2 + tauy^2)        </field>   <!-- P1 (N m-2) surface_downward_stress : module of the momentum lost by the atmosphere to the surface. -->
     286   <field id="CMIP6_tauu"          field_ref="taux"             /> <!-- P1 (Pa) surface_downward_eastward_stress : Downward eastward wind stress at the surface -->
     287   <field id="CMIP6_tauupbl"       field_ref="dummy_XY"         /> <!-- P1 (Pa) surface_downward_eastward_stress_due_to_planetary_boundary_layer : The  downward eastward stress associated with the models parameterization of the plantary boundary layer. (This request is related to a WGNE effort to understand how models parameterize the surface stresses.) -->
     288   <field id="CMIP6_tauv"          field_ref="tauy"             /> <!-- P1 (Pa) surface_downward_northward_stress : Downward northward wind stress at the surface -->
     289   <field id="CMIP6_tauvpbl"       field_ref="dummy_XY"         /> <!-- P1 (Pa) surface_downward_northward_stress_due_to_planetary_boundary_layer : The  downward northward stress associated with the models parameterization of the plantary boundary layer. (This request is related to a WGNE effort to understand how models parameterize the surface stresses.) -->
     290   <field id="CMIP6_tdps"          field_ref="dummy_XY"         /> <!-- P2 (K) dew_point_temperature : unset -->
     291   <field id="CMIP6_tendacabf"     field_ref="dummy_0d"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_surface_mass_balance : The total surface mass balance flux over land ice is a spatial integration of the surface mass balance flux -->
     292   <field id="CMIP6_tendlibmassbf" field_ref="dummy_0d"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_basal_mass_balance : The total basal mass balance flux over land ice is a spatial integration of the basal mass balance flux -->
     293   <field id="CMIP6_tendlicalvf"   field_ref="dummy_0d"         /> <!-- P3 (kg s-1) tendency_of_land_ice_mass_due_to_calving : The total calving flux over land ice is a spatial integration of the calving flux -->
    307294   <field id="CMIP6_tnhus"         field_ref="tnhus"            /> <!-- P1 (s-1) tendency_of_specific_humidity : Tendency of Specific Humidity -->
    308295   <field id="CMIP6_tnhusa"        field_ref="dqdyn"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_advection : Tendency of Specific Humidity due to Advection -->
    309296   <field id="CMIP6_tnhusc"        field_ref="tnhusc"           /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_convection : Tendencies from cumulus convection scheme. -->
    310    <field id="CMIP6_tnhusd"        field_ref="dqvdf"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_diffusion : This includes any horizontal or vertical numerical moisture diffusion not associated with the parametrized moist physics or the resolved dynamics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics.   This term is required to check the closure of the moisture budget. -->
    311    <field id="CMIP6_tnhusmp"       field_ref="dqphy"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_model_physics : This includes sources and sinks from parametrized moist physics (e.g. convection, boundary layer, stratiform condensation/evaporation, etc.) and excludes sources and sinks from resolved dynamics or from horizontal or vertical numerical diffusion not associated with model physicsl.  For example any diffusive mixing by the boundary layer scheme would be included. -->
    312    <field id="CMIP6_tnhuspbl"      field_ref="dqvdf"             > dqvdf+dqthe </field> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_boundary_layer_mixing : alevel site time1 -->
     297   <field id="CMIP6_tnhusd"        field_ref="dqvdf"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_diffusion : Tendency of specific humidity due to numerical diffusion.This includes any horizontal or vertical numerical moisture diffusion not associated with the parametrized moist physics or the resolved dynamics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics.   This term is required to check the closure of the moisture budget. -->
     298   <field id="CMIP6_tnhusmp"       field_ref="dqphy"            /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_model_physics : Tendency of specific humidity due to model physics. This includes sources and sinks from parametrized moist physics (e.g. convection, boundary layer, stratiform condensation/evaporation, etc.) and excludes sources and sinks from resolved dynamics or from horizontal or vertical numerical diffusion not associated with model physicsl.  For example any diffusive mixing by the boundary layer scheme would be included. -->
     299   <field id="CMIP6_tnhuspbl"      field_ref="dqvdf"             > dqvdf+dqthe <!-- P1 (s-1) tendency_of_specific_humidity_due_to_boundary_layer_mixing : Includes all boundary layer terms including diffusive terms. -->
    313300   <field id="CMIP6_tnhusscp"      field_ref="dqlscst"          /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_stratiform_clouds_and_precipitation : Tendency of Specific Humidity Due to Stratiform Clouds and Precipitation -->
    314    <field id="CMIP6_tnhusscpbl"    field_ref="tnhusscpbl"       /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing : To be specified only in  models which do not separate budget terms for stratiform cloud, precipitation and boundary layer schemes.  Includes all bounday layer terms including and diffusive terms. -->
     301   <field id="CMIP6_tnhusscpbl"    field_ref="tnhusscpbl"       /> <!-- P1 (s-1) tendency_of_specific_humidity_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing : Tendency of Specific Humidity Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing  (to be specified only in  models which do not separate budget terms for stratiform cloud, precipitation and boundary layer schemes.  Includes all bounday layer terms including and diffusive terms.) -->
    315302   <field id="CMIP6_tnt"           field_ref="tnt"              /> <!-- P1 (K s-1) tendency_of_air_temperature : Tendency of Air Temperature -->
    316303   <field id="CMIP6_tnta"          field_ref="dtdyn"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_advection : Tendency of Air Temperature due to Advection -->
    317    <field id="CMIP6_tntc"          field_ref="tntc"             /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_convection : zonal mean; hence YZT -->
    318    <field id="CMIP6_tntd"          field_ref="dtajs"             > dtajs+dtoro+dtlif+dthin </field> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_numerical_diffusion : Tendency of Air Temperature due to Numerical Diffusion -->
    319    <field id="CMIP6_tntmp"         field_ref="dtphy"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_model_physics : This includes sources and sinks from parametrized physics (e.g. radiation, convection, boundary layer, stratiform condensation/evaporation, etc.). It excludes sources and sinks from resolved dynamics and numerical diffusion not associated with parametrized physics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be included, while numerical diffusion applied in addition to physics or resolved dynamics should be excluded.  This term is required to check the closure of the heat budget. -->
    320    <field id="CMIP6_tntnogw"       field_ref="dummy_XYA"        /> <!-- P2 (K s-1) temperature_tendency_due_to_dissipation_nonorographic_gravity_wave_drag : zonal mean; hence YZT -->
    321    <field id="CMIP6_tntogw"        field_ref="dtoro"            /> <!-- P2 (K s-1) temperature_tendency_due_to_dissipation_orographic_gravity_wave_drag : zonal mean; hence YZT -->
    322    <field id="CMIP6_tntpbl"        field_ref="dtvdf"             > dtvdf + dtthe </field> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_boundary_layer_mixing : alevel site time1 -->
     304   <field id="CMIP6_tntc"          field_ref="tntc"             /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_convection : Tendencies from cumulus convection scheme. -->
     305   <field id="CMIP6_tntd"          field_ref="dtajs"             > dtajs+dtoro+dtlif+dthin </field> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_numerical_diffusion : This includes any horizontal or vertical numerical temperature diffusion not associated with the parametrized moist physics or the resolved dynamics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be excluded, as should any diffusion which is included in the terms from the resolved dynamics.   This term is required to check the closure of the temperature budget. -->
     306   <field id="CMIP6_tntmp"         field_ref="dtphy"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_model_physics : Tendency of air temperature due to model physics. This includes sources and sinks from parametrized physics (e.g. radiation, convection, boundary layer, stratiform condensation/evaporation, etc.). It excludes sources and sinks from resolved dynamics and numerical diffusion not associated with parametrized physics.  For example, any vertical diffusion which is part of the boundary layer mixing scheme should be included, while numerical diffusion applied in addition to physics or resolved dynamics should be excluded.  This term is required to check the closure of the heat budget. -->
     307   <field id="CMIP6_tntnogw"       field_ref="dummy_XYA"        /> <!-- P2 (K s-1) temperature_tendency_due_to_dissipation_nonorographic_gravity_wave_drag : Temperature tendency due to dissipation of parameterized nonorographic gravity waves. -->
     308   <field id="CMIP6_tntogw"        field_ref="dtoro"            /> <!-- P2 (K s-1) temperature_tendency_due_to_dissipation_orographic_gravity_wave_drag : Temperature tendency due to dissipation of parameterized orographic gravity waves. -->
     309   <field id="CMIP6_tntpbl"        field_ref="dtvdf"             > dtvdf + dtthe </field> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_boundary_layer_mixing : Includes all boundary layer terms including diffusive terms. -->
    323310   <field id="CMIP6_tntr"          field_ref="tntr"             /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_radiative_heating : Tendency of Air Temperature due to Radiative Heating -->
    324    <field id="CMIP6_tntrlcs"       field_ref="dtlw0"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky : zonal mean; hence YZT -->
    325    <field id="CMIP6_tntrscs"       field_ref="dtsw0"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky : zonal mean; hence YZT -->
    326    <field id="CMIP6_tntscp"        field_ref="dtlschr"          /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_stratiform_clouds_and_precipitation : alevel site time1 -->
    327    <field id="CMIP6_tntscpbl"      field_ref="tntscpbl"         /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing : To be specified only in  models which do not separate cloud, precipitation and boundary layer terms.  Includes all boundary layer terms including diffusive ones. -->
    328    <field id="CMIP6_tr"            field_ref="tsol"             /> <!-- P1 (K) surface_temperature : Surface Radiative Temperature -->
    329    <field id="CMIP6_ts"            field_ref="tsol"             /> <!-- P1 (K) surface_temperature : Surface temperature (skin for open ocean) -->
    330    <field id="CMIP6_ts_ist"        field_ref="dummy_XY"         /> <!-- P1 (K) surface_temperature : quantity averaged over ice sheet (grounded ice sheet and floating ice shelf) only. Needed to analyse the impact of downscaling methods -->
    331    <field id="CMIP6_tsns"          field_ref="dummy_not_provided"         /> <!-- P1 (K) surface_temperature : Snow Surface Temperature -->
    332    <field id="CMIP6_twap"          field_ref="vitw">vitw*temp </field> <!-- P2 (K Pa s-1) product_of_omega_and_air_temperature : air_temperature_times_omega -->
    333    <field id="CMIP6_u2"            field_ref="vitu"              > vitu*vitu</field> <!-- P2 (m2 s-2) square_of_eastward_wind : square_of_eastward_wind -->
     311   <field id="CMIP6_tntrlcs"       field_ref="dtlw0"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_longwave_heating_assuming_clear_sky : Tendency of Air Temperature due to Clear Sky Longwave Radiative Heating -->
     312   <field id="CMIP6_tntrscs"       field_ref="dtsw0"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_shortwave_heating_assuming_clear_sky : Tendency of Air Temperature due to Clear Sky Shortwave Radiative Heating -->
     313   <field id="CMIP6_tntscp"        field_ref="dummy_XYA"        /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_stratiform_clouds_and_precipitation : Tendency of Air Temperature Due to Stratiform Clouds and Precipitation -->
     314   <field id="CMIP6_tntscpbl"      field_ref="tntscpbl"        /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_stratiform_cloud_and_precipitation_and_boundary_layer_mixing : Tendency of Air Temperature Due to Stratiform Cloud and Precipitation and Boundary Layer Mixing (to be specified only in  models which do not separate cloud, precipitation and boundary layer terms.  Includes all boundary layer terms including diffusive ones.) -->
     315   <field id="CMIP6_tr"            field_ref="dummy_XY"         /> <!-- P1 (K) surface_temperature : Effective radiative surface temperature, averaged over the grid cell -->
     316   <field id="CMIP6_ts"            field_ref="tsol"             /> <!-- P1 (K) surface_temperature : Temperature of the lower boundary of the atmosphere -->
     317   <field id="CMIP6_tsns"          field_ref="dummy_XY"         /> <!-- P1 (K) surface_temperature : Temperature of the snow surface as it interacts with the atmosphere, averaged over a grid cell. -->
     318   <field id="CMIP6_twap"          field_ref="omega">vitw*temp </field> <!-- P2 (K Pa s-1) product_of_omega_and_air_temperature : Product of air temperature and pressure tendency -->
     319   <field id="CMIP6_u2"            field_ref="vitu"              > vitu*vitu</field> <!-- P2 (m2 s-2) square_of_eastward_wind : u*u -->
    334320   <field id="CMIP6_ua"            field_ref="vitu"             /> <!-- P1 (m s-1) eastward_wind : Eastward Wind -->
    335    <field id="CMIP6_uas"           field_ref="u10m"             /> <!-- P1 (m s-1) eastward_wind : Eastward Near-Surface Wind -->
    336    <field id="CMIP6_uqint"         field_ref="uq"               /> <!-- P1 (m2 s-1) integral_of_product_of_eastward_wind_and_specific_humidity_wrt_height : Eastward integrated moisture transport -->
    337    <field id="CMIP6_ut"            field_ref="vitu"              > vitu*temp </field> <!-- P2 (K m s-1) product_of_eastward_wind_and_air_temperature : air_temperature_times_eastward_wind -->
    338    <field id="CMIP6_utendepfd"     field_ref="dummy_XYA"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_eliassen_palm_flux_divergence : Called "acceldivf" in CCMI table; we suggest new name. zonal mean; hence YZT -->
    339    <field id="CMIP6_utendnogw"     field_ref="du_gwd_rando"> du_gwd_rando + du_gwd_front </field> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag : zonal mean; hence YZT -->
    340    <field id="CMIP6_utendogw"      field_ref="duoro"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_orographic_gravity_wave_drag : u-tendency orographic gravity wave drag -->
    341    <field id="CMIP6_utendvtem"     field_ref="dummy_XYA"        /> <!-- P1 (m s-1 d-1) u-tendency_by_wstar_advection : zonal mean; hence YZT -->
    342    <field id="CMIP6_utendwtem"     field_ref="dummy_XYA"        /> <!-- P1 (m s-1 d-1) u-tendency_by_vstar_advection : zonal mean; hence YZT -->
    343    <field id="CMIP6_uv"            field_ref="vitu"> vitu*vitv  </field> <!-- P2 (m2 s-2) product_of_eastward_wind_and_northward_wind : eastward_wind_times_northward_wind -->
    344    <field id="CMIP6_uwap"          field_ref="vitu"> vitu*vitw  </field> <!-- P2 (Pa m s-2) product_of_eastward_wind_and_omega : eastward_wind_times_omega -->
    345    <field id="CMIP6_v2"            field_ref="vitv"> vitv*vitv  </field> <!-- P2 (m2 s-2) square_of_northward_wind : square_of_northwardwind -->
    346    <field id="CMIP6_va"            field_ref="vitv"             /> <!-- P1 (m s-1) northward_wind : Northward Wind -->
    347    <field id="CMIP6_vas"           field_ref="v10m"             /> <!-- P1 (m s-1) northward_wind : Northward Near-Surface Wind -->
    348    <field id="CMIP6_vortmean"      field_ref="dummy_XY"         /> <!-- P1 (s-1) atmosphere_relative_vorticity : Mean vorticity over 850-600 hPa layer -->
    349    <field id="CMIP6_vqint"         field_ref="vq"               /> <!-- P1 (m2 s-1) integral_of_product_of_northward_wind_and_specific_humidity_wrt_height : Northward integrated moisture transport -->
    350    <field id="CMIP6_vt"            field_ref="vitv"> vitv*temp  </field> <!-- P2 (K m s-1) product_of_northward_wind_and_air_temperature : air_temperature_times_northward_wind -->
    351    <field id="CMIP6_vtem"          field_ref="dummy_XYA"        /> <!-- P1 (m s-1) northward_transformed_eulerian_mean_air_velocity : Transformed Eulerian Mean northward wind -->
    352    <field id="CMIP6_vtendnogw"     field_ref="dv_gwd_rando">dv_gwd_rando + dv_gwd_front </field> <!-- P2 (m s-2) tendency_of_northward_wind_due_to_nonorographic_gravity_wave_drag : v-tendency nonorographic gravity wave drag -->
    353    <field id="CMIP6_vtendogw"      field_ref="dvoro"        /> <!-- P2 (m s-2) tendency_of_northward_wind_due_to_orographic_gravity_wave_drag : v-tendency orographic gravity wave drag -->
    354    <field id="CMIP6_vwap"          field_ref="vitv"> vitv*vitw  </field> <!-- P2 (Pa m s-2) product_of_northward_wind_and_omega : northward_wind_times_omega -->
    355    <field id="CMIP6_wap"           field_ref="vitw"             /> <!-- P1 (Pa s-1) lagrangian_tendency_of_air_pressure : commonly referred to as "omega", this represents the vertical component of velocity in pressure coordinates (positive down) -->
    356    <field id="CMIP6_wap2"          field_ref="vitw"> vitw*vitw  </field> <!-- P2 (Pa2 s-2) square_of_lagrangian_tendency_of_air_pressure : square_of_omega -->
    357    <field id="CMIP6_wbptemp"       field_ref="dummy_XYA"        /> <!-- P1 (K) wet_bulb_potential_temperature : plev_7 -->
    358    <field id="CMIP6_wtem"          field_ref="dummy_XYA"        /> <!-- P1 (m s-1)  : Transformed Eulerian Mean upward wind -->
    359    <field id="CMIP6_xgwdparam"     field_ref="east_gwstress"    /> <!-- P2 (Pa) atmosphere_eastward_stress_due_to_gravity_wave_drag : x_gravity_wave_drag_param -->
    360    <field id="CMIP6_ygwdparam"     field_ref="west_gwstress"    /> <!-- P2 (Pa) atmosphere_northward_stress_due_to_gravity_wave_drag : y_gravity_wave_drag_param -->
    361    <field id="CMIP6_zfull"         field_ref="zfull"            /> <!-- P2 (m) height_above_reference_ellipsoid : This is actual height above mean sea level, not geopotential height -->
    362    <field id="CMIP6_zg"            field_ref="geoph"             /> <!-- P1 (m) geopotential_height : Geopotential height on the 1000 hPa surface -->
    363    <field id="CMIP6_zhalf"         field_ref="zhalf"            /> <!-- P2 (m) height_above_reference_ellipsoid : This is actual height above mean sea level, not geopotential height.  This is actual height above mean sea level, not geopotential height.  Includes both the top of the model atmosphere and surface levels. -->
    364    <field id="CMIP6_zmla"          field_ref="s_pblh"           /> <!-- P1 (m) atmosphere_boundary_layer_thickness : Height of Boundary Layer -->
    365    <field id="CMIP6_zmlwaero"      field_ref="dummy_not_provided"        /> <!-- P1 (K s-1) longwave_heating_rate_due_to_volcanic_aerosols : longwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
    366    <field id="CMIP6_zmswaero"      field_ref="dummy_not_provided"        /> <!-- P1 (K s-1) shortwave_heating_rate_due_to_volcanic_aerosols : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
    367    <field id="CMIP6_zmtnt"         field_ref="dtphy"            /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_diabatic_processes : Zonal Mean Diabatic Heating Rates -->
     321   <field id="CMIP6_uas"           field_ref="u10m"             /> <!-- P1 (m s-1) eastward_wind : Eastward component of the near-surface (usually, 10 meters)  wind -->
     322   <field id="CMIP6_uqint"         field_ref="dummy_XY"         /> <!-- P1 (m2 s-1) integral_of_product_of_eastward_wind_and_specific_humidity_wrt_height : Column integrated eastward wind times specific humidity -->
     323   <field id="CMIP6_ut"            field_ref="vitu"              > vitu*temp </field> <!-- P2 (K m s-1) product_of_eastward_wind_and_air_temperature : Product of air temperature and eastward wind -->
     324   <field id="CMIP6_utendepfd"     field_ref="dummy_XYA"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_eliassen_palm_flux_divergence : Tendency of the zonal mean zonal wind due to the divergence of the Eliassen-Palm flux. -->
     325   <field id="CMIP6_utendnogw"     field_ref="dummy_XYA"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_nonorographic_gravity_wave_drag : Tendency of the eastward wind by parameterized nonorographic gravity waves. -->
     326   <field id="CMIP6_utendogw"      field_ref="dummy_XYA"        /> <!-- P1 (m s-2) tendency_of_eastward_wind_due_to_orographic_gravity_wave_drag : Tendency of the eastward wind by parameterized orographic gravity waves. -->
     327   <field id="CMIP6_utendvtem"     field_ref="dummy_XYA"        /> <!-- P1 (m s-1 d-1) u-tendency_by_wstar_advection : Tendency of zonally averaged eastward wind, by the residual upward wind advection (on the native model grid). Reference: Andrews et al (1987): Middle Atmospheric Dynamics. Academic Press. -->
     328   <field id="CMIP6_utendwtem"     field_ref="dummy_XYA"        /> <!-- P1 (m s-1 d-1) u-tendency_by_vstar_advection : Tendency of zonally averaged eastward wind, by the residual northward wind advection (on the native model grid). Reference: Andrews et al (1987): Middle Atmospheric Dynamics. Academic Press. -->
     329   <field id="CMIP6_uv"            field_ref="vitu"> vitu*vitv  </field> <!-- P2 (m2 s-2) product_of_eastward_wind_and_northward_wind : u*v -->
     330   <field id="CMIP6_uwap"          field_ref="vitu"> vitu*vitw  </field> <!-- P2 (Pa m s-2) product_of_eastward_wind_and_omega : u*omega -->
     331   <field id="CMIP6_v2"            field_ref="vitv"> vitv*vitv  </field> <!-- P2 (m2 s-2) square_of_northward_wind : v*v -->
     332   <field id="CMIP6_va"            field_ref="vitv"             /> <!-- P1 (m s-1) northward_wind : Northward component of the wind at 850hPa -->
     333   <field id="CMIP6_vas"           field_ref="v10m"             /> <!-- P1 (m s-1) northward_wind : Northward component of the near surface wind -->
     334   <field id="CMIP6_vortmean"      field_ref="dummy_XY"         /> <!-- P1 (s-1) atmosphere_relative_vorticity : Mean vorticity over 850,700,600 hPa -->
     335   <field id="CMIP6_vqint"         field_ref="dummy_XY"         /> <!-- P1 (m2 s-1) integral_of_product_of_northward_wind_and_specific_humidity_wrt_height : Column integrated northward wind times specific humidity -->
     336   <field id="CMIP6_vt"            field_ref="vitv"> vitv*temp  </field> <!-- P2 (K m s-1) product_of_northward_wind_and_air_temperature : Product of air temperature and northward wind -->
     337   <field id="CMIP6_vtem"          field_ref="dummy_XYA"        /> <!-- P1 (m s-1) northward_transformed_eulerian_mean_air_velocity : Transformed Eulerian Mean Diagnostics v*, meridional component of the residual meridional circulation (v*, w*) derived from 6 hr or higher frequency data fields (use instantaneous daily fields or 12 hr fields if the 6 hr data are not available). -->
     338   <field id="CMIP6_vtendnogw"     field_ref="dummy_XYA"        /> <!-- P2 (m s-2) tendency_of_northward_wind_due_to_nonorographic_gravity_wave_drag : Tendency of the northward wind by parameterized nonorographic gravity waves.  (Note that CF name tables only have a general northward tendency for all gravity waves, and we need it separated by type.) -->
     339   <field id="CMIP6_vtendogw"      field_ref="dummy_XYA"        /> <!-- P2 (m s-2) tendency_of_northward_wind_due_to_orographic_gravity_wave_drag : Tendency of the northward wind by parameterized orographic gravity waves.  (Note that CF name tables only have a general northward tendency for all gravity waves, and we need it separated by type.) -->
     340   <field id="CMIP6_vwap"          field_ref="vitv"> vitv*vitw  </field> <!-- P2 (Pa m s-2) product_of_northward_wind_and_omega : v*omega -->
     341   <field id="CMIP6_wap"           field_ref="vitw"             /> <!-- P1 (Pa s-1) lagrangian_tendency_of_air_pressure : Omega (vertical velocity in pressure coordinates, positive downwards) -->
     342   <field id="CMIP6_wap2"          field_ref="dummy_XYA"        /> <!-- P2 (Pa2 s-2) square_of_lagrangian_tendency_of_air_pressure : omega*omega -->
     343   <field id="CMIP6_wbptemp"       field_ref="dummy_XYA"        /> <!-- P1 (K) wet_bulb_potential_temperature : Wet bulb potential temperature -->
     344   <field id="CMIP6_wtem"          field_ref="dummy_XYA"        /> <!-- P1 (m s-1) unset : Transformed Eulerian Mean Diagnostics w*, meridional component of the residual meridional circulation (v*, w*) derived from 6 hr or higher frequency data fields (use instantaneous daily fields or 12 hr fields if the 6 hr data are not available). Scale height: 6950 m -->
     345   <field id="CMIP6_xgwdparam"     field_ref="east_gwstress"    /> <!-- P2 (Pa) atmosphere_eastward_stress_due_to_gravity_wave_drag : Parameterised x-component of gravity wave drag -->
     346   <field id="CMIP6_ygwdparam"     field_ref="west_gwstress"        /> <!-- P2 (Pa) atmosphere_northward_stress_due_to_gravity_wave_drag : Parameterised y- component of gravity wave drag -->
     347   <field id="CMIP6_zfull"         field_ref="zfull"            /> <!-- P2 (m) height_above_reference_ellipsoid : Altitude of Model Full-Levels -->
     348   <field id="CMIP6_zg"            field_ref="phis"             /> <!-- P1 (m) geopotential_height : Geopotential height on the 1000 hPa surface -->
     349   <field id="CMIP6_zhalf"         field_ref="zhalf"            /> <!-- P2 (m) height_above_reference_ellipsoid : Altitude of Model Half-Levels -->
     350   <field id="CMIP6_zmla"          field_ref="dummy_XY"         /> <!-- P1 (m) atmosphere_boundary_layer_thickness : Height of Boundary Layer -->
     351   <field id="CMIP6_zmlwaero"      field_ref="dummy_XYA"        /> <!-- P1 (K s-1) longwave_heating_rate_due_to_volcanic_aerosols : longwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
     352   <field id="CMIP6_zmswaero"      field_ref="dummy_XYA"        /> <!-- P1 (K s-1) shortwave_heating_rate_due_to_volcanic_aerosols : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
     353   <field id="CMIP6_zmtnt"         field_ref="dummy_XYA"        /> <!-- P1 (K s-1) tendency_of_air_temperature_due_to_diabatic_processes : The diabatic heating rates due to all the processes that may change potential temperature -->
    368354   <field id="CMIP6_ap" field_ref="Ahyb" /><!-- One of the hybrid coordinate arrays -->
    369355   <field id="CMIP6_ap_bnds" field_ref="Ahyb_inter" /><!-- One of the hybrid coordinate arrays -->
  • LMDZ6/branches/DYNAMICO-conv/DefLists/config.def_LMDZ5_AGCM

    r3356 r3411  
    9494# 1: read a single ozone climatology that will be used day and night
    9595# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
    96 read_climoz=1
     96read_climoz=2
    9797#
    9898# Parametres simulateur COSP (CFMIP Observational Simulator Package)
  • LMDZ6/branches/DYNAMICO-conv/DefLists/context_lmdz.xml

    r3356 r3411  
    6161    <axis id="bnds" standard_name="bounds" unit="1" >
    6262    </axis>
    63     <axis id="spectband" standard_name="Sensor Band Central Radiation Wavenumber" unit="m-1">
    64     </axis>
    65     <axis id="axis_lat" standard_name="Latitude axis">
    66            <reduce_domain operation="average" direction="iDir" />
    67     </axis>
    6863
    6964<!-- Cosp axis definitions-->
     
    8075    <axis id="temp" standard_name="temperature" unit="K">
    8176    </axis>
    82     <axis id="cth" standard_name="altitude" unit="m">
     77    <axis id="cth16" name="cth" standard_name="altitude" unit="m">
    8378    </axis>
    8479    <axis id="ReffIce" standard_name="ReffIce" unit="microne" >
     
    9590
    9691  <grid_definition>
     92<!-- Define Scalar grid for GHG, orbital parameters and solar constants -->
     93    <grid id="grid_scalar">
     94    </grid>
    9795
    9896    <grid id="klev_bnds"> <axis axis_ref="klev" /> <axis axis_ref="bnds" /> </grid>
     
    111109        <domain id="dom_glo" />
    112110        <axis id="plev" />
    113      </grid>
    114 
    115      <grid id="grid_glo_spectband">
    116         <domain id="dom_glo" />
    117         <axis id="spectband" />
    118111     </grid>
    119112
     
    147140     <grid id="grid4Dcol">
    148141        <domain id="dom_glo" />
     142        <axis id="height_mlev" />
    149143        <axis id="column" />
    150         <axis id="height_mlev" />
    151144     </grid>
    152145
     
    171164     <grid id="grid4Dmisr">
    172165        <domain id="dom_glo" />
    173         <axis id="cth" />
    174166        <axis id="tau" />
     167        <axis id="cth16" />
    175168     </grid>
    176169
     
    192185     </grid>
    193186
    194  <!-- Grid definitions to allow summing of a 3D varaible -->   
    195       <grid id="grid_3D" >
    196          <domain id="dom_glo" />
    197          <axis id="lev" />
    198        </grid>
    199 
    200187  </grid_definition>
    201188
  • LMDZ6/branches/DYNAMICO-conv/DefLists/cosp_output_nl.txt

    r3356 r3411  
    2828&COSP_OUTPUT
    2929  ! Simulator flags
    30   Lradar_sim=.true.,
     30  Lradar_sim=.false.,
    3131  Llidar_sim=.true.,
    3232  Lisccp_sim=.true.,
    33   Lmisr_sim=.true.,
    34   Lmodis_sim=.true.,
     33  Lmisr_sim=.false.,
     34  Lmodis_sim=.false.,
    3535  Lrttov_sim=.false.,
    3636  ! Output variables
     
    3939  !- CloudSat
    4040  Lcfaddbze94=.false.,
    41   Ldbze94=.false.,
     41  Ldbze94=.true.,
    4242  !- CALIPSO
    4343  Latb532=.false.,
     
    5353  Lclcalipsoice=.true.,
    5454  Lclcalipsoun=.true.,
    55   Lclcalipsotmp=.false.,
    56   Lclcalipsotmpliq=.false.,
    57   Lclcalipsotmpice=.false.,
    58   Lclcalipsotmpun=.false.,
     55  Lclcalipsotmp=.true.,
     56  Lclcalipsotmpliq=.true.,
     57  Lclcalipsotmpice=.true.,
     58  Lclcalipsotmpun=.true.,
    5959  Lclhcalipsoliq=.true.,
    6060  Lcllcalipsoliq=.true.,
     
    7070  Lcltcalipsoun=.true.,
    7171  ! OPAQ variables
    72   Lclopaquecalipso=.false.,
    73   Lclthincalipso=.false.,
    74   Lclzopaquecalipso=.false.,
    75   Lclcalipsoopaque=.false.,
    76   Lclcalipsothin=.false.,
    77   Lclcalipsozopaque=.false.,
    78   Lclcalipsoopacity=.false.,
     72  Lclopaquecalipso=.true.,
     73  Lclthincalipso=.true.,
     74  Lclzopaquecalipso=.true.,
     75  Lclcalipsoopaque=.true.,
     76  Lclcalipsothin=.true.,
     77  Lclcalipsozopaque=.true.,
     78  Lclcalipsoopacity=.true.,
    7979  ! TIBO variables
    80   Lproftemp=.false.,
    81   LprofSR=.false.,
     80  Lproftemp=.true.,
     81  LprofSR=.true.,
    8282  !- ISCCP
    8383  Lalbisccp=.true.,
     
    9191  Lmeantbclrisccp=.true.,
    9292  !- MISR
    93   LclMISR=.true.,
     93  LclMISR=.false.,
    9494  !- Use lidar and radar
    95   Lclcalipso2=.true.,
    96   Lcltlidarradar=.true.,
     95  Lclcalipso2=.false.,
     96  Lcltlidarradar=.false.,
    9797  !- These are provided for debugging or special purposes
    9898  Lfracout=.false.,
    99   LlidarBetaMol532=.false., 
     99  LlidarBetaMol532=.true., 
    100100  !- MODIS
    101   Lcltmodis=.true.,
    102   Lclwmodis=.true.,
    103   Lclimodis=.true.,
    104   Lclhmodis=.true.,
    105   Lclmmodis=.true.,
    106   Lcllmodis=.true.,
    107   Ltautmodis=.true.,
    108   Ltauwmodis=.true.,
    109   Ltauimodis=.true.,
     101  Lcltmodis=.false.,
     102  Lclwmodis=.false.,
     103  Lclimodis=.false.,
     104  Lclhmodis=.false.,
     105  Lclmmodis=.false.,
     106  Lcllmodis=.false.,
     107  Ltautmodis=.false.,
     108  Ltauwmodis=.false.,
     109  Ltauimodis=.false.,
    110110  Ltautlogmodis=.false.,
    111111  Ltauwlogmodis=.false.,
     
    113113  Lreffclwmodis=.false.,
    114114  Lreffclimodis=.false.,
    115   Lpctmodis=.true.,
    116   Llwpmodis=.true.,
    117   Liwpmodis=.true.,
    118   Lclmodis=.true.,
    119   Lcrimodis=.true.,
    120   Lcrlmodis=.true.,
     115  Lpctmodis=.false.,
     116  Llwpmodis=.false.,
     117  Liwpmodis=.false.,
     118  Lclmodis=.false.,
     119  Lcrimodis=.false.,
     120  Lcrlmodis=.false.,
    121121  !- RTTOV
    122122  Ltbrttov=.false.,
  • LMDZ6/branches/DYNAMICO-conv/DefLists/field_def_lmdz.xml

    r3356 r3411  
    77<!--    </field_group>  -->
    88
    9     <field_group id="coordinates" grid_ref="grid_glo">
    10         <field id="io_lon"  />
    11         <field id="io_lat"  />
    12     </field_group>
    13 
    149    <field_group id="coord_hyb">
    1510        <field id="Ahyb"      axis_ref="klev" />
     
    2419        <field id="contfracATM"     long_name="% sfce ter+lic"  unit="-"    />
    2520        <field id="contfracOR"      long_name="% sfce terre OR" unit="-" />
    26         <field id="sza"     long_name="Solar zenithal angle "   unit="deg" />
    2721        <field id="flat"    long_name="Latent heat flux"        unit="W/m2" />
    2822        <field id="slp"     long_name="Sea Level Pressure"      unit="Pa" />
     
    3125        <field id="tsol"    long_name="Surface Temperature"     unit="K" />
    3226        <field id="t2m"        long_name="Temperature 2m" unit="K" />
    33         <field id="tasmax"  field_ref="t2m"  operation="maximum" />
    34         <field id="tasmin"  field_ref="t2m"  operation="minimum" />
    3527        <field id="t2m_min"    long_name="Temp 2m min"    unit="K" operation="minimum" />
    3628        <field id="t2m_max"    long_name="Temp 2m max"    unit="K" operation="maximum" />
     
    4436        <field id="wind10m"    long_name="10-m wind speed"      unit="m/s" />
    4537        <field id="wind10max"  long_name="10m wind speed max"   unit="m/s" />
    46         <field id="sfcWindmax" field_ref="wind10m" operation="maximum" />
    4738        <field id="sicf"    long_name="Sea-ice fraction"        unit="-" />
    4839        <field id="q2m"     long_name="Specific humidity 2m"    unit="kg/kg" />
     
    7869        <field id="ndayrain"    long_name="Number of dayrain(liq+sol)"  unit="-" />
    7970        <field id="precip"      long_name="Precip Totale liq+sol"       unit="kg/(s*m2)" />
    80         <field id="prhmax"      field_ref="precip" operation="maximum"           />
    81         <field id="rain_fall"   long_name="Precip Totale liq"   unit="kg/(s*m2)" />
    82         <field id="rain_con"   long_name="Precip convective liq"   unit="kg/(s*m2)" />
    8371        <field id="plul"    long_name="Large-scale Precip."     unit="kg/(s*m2)" />
    8472        <field id="plun"    long_name="Numerical Precip."       unit="kg/(s*m2)" />
     
    9886        <field id="SWupTOA"    long_name="SWup at TOA"    unit="W/m2" />
    9987        <field id="SWupTOAclr"    long_name="SWup clear sky at TOA"    unit="W/m2" />
    100         <field id="SWupTOAcleanclr"    long_name="SWup clean (no aerosol) clear sky at TOA"    unit="W/m2" />
    10188        <field id="SWdnTOA"    long_name="SWdn at TOA"    unit="W/m2" />
    10289        <field id="SWdnTOAclr"    long_name="SWdn clear sky at TOA"    unit="W/m2" />
     
    117104        <field id="SWupSFC"    long_name="SWup at surface"    unit="W/m2" />
    118105        <field id="SWupSFCclr"    long_name="SWup clear sky at surface"    unit="W/m2" />
    119         <field id="SWupSFCcleanclr"    long_name="SWup clean (no aerosol) clear sky at surface"    unit="W/m2" />
    120106        <field id="SWdnSFC"    long_name="SWdn at surface"    unit="W/m2" />
    121107        <field id="SWdnSFCclr"    long_name="SWdn clear sky at surface"    unit="W/m2" />
    122         <field id="SWdnSFCcleanclr"    long_name="SWdn clean (no aerosol) clear sky at surface"    unit="W/m2" />
    123108        <field id="LWupSFC"    long_name="Upwd. IR rad. at surface"    unit="W/m2" />
    124109        <field id="LWupSFCclr"    long_name="CS Upwd. IR rad. at surface"    unit="W/m2" />
    125         <field id="LWupTOAcleanclr"    long_name="CS clean (no aerosol) Upwd. IR rad. at TOA"    unit="W/m2" />
    126110        <field id="LWdnSFC"    long_name="Down. IR rad. at surface"    unit="W/m2" />
    127111        <field id="LWdnSFCclr"    long_name="Down. CS IR rad. at surface"    unit="W/m2" />
    128         <field id="LWdnSFCcleanclr"    long_name="Down. CS clean (no aerosol) IR rad. at surface"    unit="W/m2" />
    129112        <field id="bils"    long_name="Surf. total heat flux"    unit="W/m2" />
    130113        <field id="bils_tke"    long_name="Surf. total heat flux"    unit="W/m2" />
     
    135118        <field id="bils_latent"    long_name="Surf. total heat flux"    unit="W/m2" />
    136119        <field id="bils_ech"    long_name="peu importe"    unit="W/m2" />
     120        <field id="du_gwd_rando"    long_name="peu importe"    unit="W/m2" />
     121        <field id="dv_gwd_rando"    long_name="peu importe"    unit="W/m2" />
    137122        <field id="ustr_gwd_hines"    long_name="zonal wind stress Hines gravity waves"    unit="Pa" />
    138123        <field id="vstr_gwd_hines"    long_name="meridional wind stress Hines gravity waves"    unit="Pa" />
     
    159144        <field id="fqfonte"    long_name="Land ice melt"    unit="kg/m2/s" />
    160145        <field id="runofflic"  long_name="Land ice melt to ocean" unit="kg/m2/s" />
    161         <field id="mrroli"  long_name="Runoff flux over land ice" unit="kg/m2/s" />
    162146        <field id="taux"    long_name="Zonal wind stress"    unit="Pa" />
    163147        <field id="tauy"    long_name="Meridional wind stress"    unit="Pa" />
     
    235219        <field id="uq"    long_name="Zonal humidity transport"    unit="-" />
    236220        <field id="vq"    long_name="Merid humidity transport"    unit="-" />
    237         <field id="uwat"    long_name="Zonal total water transport"    unit="-" />
    238         <field id="vwat"    long_name="Merid total water transport"    unit="-" />
    239221        <field id="cape"    long_name="Conv avlbl pot ener"    unit="J/kg" />
    240222        <field id="pbase"    long_name="Cld base pressure"    unit="Pa" />
     
    265247        <field id="proba_notrig"    long_name="Probabilite de non-declenchement"    unit="-" />
    266248        <field id="random_notrig"    long_name="Tirage aleatoire de non-declenchement"    unit="-" />
    267         <field id="cv_gen"    long_name="Cumulonimbus genesis"    unit="1/(m2 s)" />
    268249        <field id="ale_bl_stat"    long_name="ALE_BL_STAT"    unit="m2/s2" />
    269250        <field id="ale_bl_trig"    long_name="ALE_BL_STAT + Condition P>Pseuil"    unit="m2/s2" />
     
    327308        <field id="v10_sic"    long_name="-"    unit="-" />
    328309        <field id="rh2m"    long_name="Relative humidity at 2m"    unit="%" />
    329         <field id="rh2m_max"    field_ref="rh2m" operation="maximum" />
    330         <field id="rh2m_min"    field_ref="rh2m" operation="minimum" />
    331 <!--        <field id="rh2m_min"    long_name="Min Relative humidity at 2m"    unit="%" /> -->
    332 <!--        <field id="rh2m_max"    long_name="Max Relative humidity at 2m"    unit="%" /> -->
     310        <field id="rh2m_min"    long_name="Min Relative humidity at 2m"    unit="%" />
     311        <field id="rh2m_max"    long_name="Max Relative humidity at 2m"    unit="%" />
    333312        <field id="qsat2m"    long_name="Saturant humidity at 2m"    unit="%" />
    334313        <field id="tpot"    long_name="Surface air potential temperature"    unit="K" />
    335314        <field id="tpote"    long_name="Surface air equivalent potential temperature"    unit="K" />
    336315        <field id="SWnetOR"    long_name="Sfce net SW radiation OR"    unit="W/m2" />
     316        <field id="SWdownOR"    long_name="Sfce incident SW radiation OR"    unit="W/m2" />
    337317        <field id="LWdownOR"    long_name="Sfce incident LW radiation OR"    unit="W/m2" />
    338318        <field id="snowl"    long_name="Solid Large-scale Precip."    unit="kg/(m2*s)" />
     
    458438        <field id="alb2"    long_name="Surface Near IR albedo"    unit="-" />
    459439        <field id="ftime_con"    long_name="Fraction of time convection Occurs"    unit="-" />
    460         <field id="ftime_deepcv"    long_name="Fraction of time deep convection Occurs"    unit="-" />
    461         <field id="wake_h"    long_name="wake height"    unit="m" />
    462         <field id="wake_dens"    long_name="number of wakes per m2"    unit="1/m2" />
     440        <field id="wake_h"    long_name="wake_h"    unit="-" />
    463441        <field id="wake_s"    long_name="wake_s"    unit="-" />
    464442        <field id="epmax"    long_name="epmax en fn cape"    unit="su" />
     
    543521        <field id="ocond"    long_name="Condensed water"    unit="kg/kg" />
    544522        <field id="geop"    long_name="Geopotential height"    unit="m2/s2" />
    545         <field id="geoph"    field_ref="geop" long_name="Geopotential height" unit="m" > geop/9.80665 </field>
    546523        <field id="vitu"    long_name="Zonal wind"    unit="m/s" />
    547524        <field id="vitv"    long_name="Meridional wind"    unit="m/s" />
     
    578555        <field id="lcc3dcon"    long_name="Convective cloud liquid fraction"    unit="1" />
    579556        <field id="lcc3dstra"    long_name="Stratiform cloud liquid fraction"    unit="1" />
    580         <field id="cldwatmxrat"    long_name="Cloud Water Mixing Ratio"    unit="1" />
    581         <field id="icc3dcon"    long_name="Mass Fraction of Convective Cloud Ice"    unit="kg/kg" />
    582         <field id="icc3dstra"    long_name="Mass Fraction of Stratiform Cloud Ice "    unit="kg/kg" />
    583         <field id="cldicemxrat"    long_name="Cloud Ice Mixing Ratio"    unit="1" />
    584557        <field id="clwcon"    long_name="Convective Cloud Liquid water content"    unit="kg/kg" />
    585558        <field id="Ma"    long_name="undilute adiab updraft"    unit="kg/m2/s" />
     
    655628        <field id="dulif"    long_name="Orography dU"    unit="m/s2" />
    656629        <field id="dvlif"    long_name="Orography dV"    unit="m/s2" />
    657         <field id="du_gwd_rando"    long_name="peu importe"    unit="W/m2" />
    658         <field id="dv_gwd_rando"    long_name="peu importe"    unit="W/m2" />
    659630        <field id="du_gwd_hines" long_name="Hines GWD dU" unit="m/s2" />
    660631        <field id="dv_gwd_hines" long_name="Hines GWD dV" unit="m/s2" />
     
    666637        <field id="dtlif"    long_name="Orography dT"    unit="K/s" />
    667638        <field id="dthin"    long_name="Hines GWD dT"    unit="K/s" />
    668         <field id="rsu"    long_name="SW upward radiation"    unit="W m-2" />
    669         <field id="rsd"    long_name="SW downward radiation"    unit="W m-2" />
    670         <field id="rlu"    long_name="LW upward radiation"    unit="W m-2" />
    671         <field id="rld"    long_name="LW downward radiation"    unit="W m-2" />
    672         <field id="rsucsaf"  long_name="SW clean (no aerosol) CS upward radiation"    unit="W m-2" />
    673         <field id="rsdcsaf"  long_name="SW clean (no aerosol) CS downward radiation"    unit="W m-2" />
    674         <field id="rsucs"    long_name="SW CS upward radiation"    unit="W m-2" />
    675         <field id="rsdcs"    long_name="SW CS downward radiation"    unit="W m-2" />
    676         <field id="rlucs"    long_name="LW CS upward radiation"    unit="W m-2" />
    677         <field id="rldcs"    long_name="LW CS downward radiation"    unit="W m-2" />
     639        <field id="rsu"    long_name="SW upward radiation"    unit="W m-2" enabled="FALSE" />
     640        <field id="rsd"    long_name="SW downward radiation"    unit="W m-2" enabled="FALSE" />
     641        <field id="rlu"    long_name="LW upward radiation"    unit="W m-2" enabled="FALSE" />
     642        <field id="rld"    long_name="LW downward radiation"    unit="W m-2" enabled="FALSE" />
     643        <field id="rsucs"    long_name="SW CS upward radiation"    unit="W m-2" enabled="FALSE" />
     644        <field id="rsdcs"    long_name="SW CS downward radiation"    unit="W m-2" enabled="FALSE" />
     645        <field id="rlucs"    long_name="LW CS upward radiation"    unit="W m-2" enabled="FALSE" />
     646        <field id="rldcs"    long_name="LW CS downward radiation"    unit="W m-2" enabled="FALSE" />
    678647        <field id="tnt"    long_name="Tendency of air temperature"    unit="K s-1" />
    679648        <field id="tntc"    long_name="Tendency of air temperature due to Moist Convection"    unit="K s-1" />
     
    698667        <field id="rldcs4co2"    long_name="Downwelling CS LW 4xCO2 atmosphere"    unit="W/m2" />
    699668        <field id="stratomask"    long_name="Stratospheric fraction"    unit="-" />
    700         <field id="pvap"    long_name="pvap intermediary variable" unit="-">pres*ovap*461.5 / (287.04*(1.+ (10.9491/18.0153)*ovap)) </field>
    701669    </field_group>
    702670
     
    724692        <field id="OD1020_strat_only"  long_name="Stratospheric Aerosol Optical depth at 1020 nm "       unit="1" />
    725693        <field id="surf_PM25_sulf"     long_name="Sulfate PM2.5 concentration at the surface"            unit="ug/m3" />
    726         <field id="budg_dep_dry_ocs"   long_name="OCS dry deposition flux"                               unit="kg(S)/m2/s" />
    727         <field id="budg_dep_wet_ocs"   long_name="OCS wet deposition flux"                               unit="kg(S)/m2/s" />
    728         <field id="budg_dep_dry_so2"   long_name="SO2 dry deposition flux"                               unit="kg(S)/m2/s" />
    729         <field id="budg_dep_wet_so2"   long_name="SO2 wet deposition flux"                               unit="kg(S)/m2/s" />
    730694        <field id="budg_dep_dry_h2so4" long_name="H2SO4 dry deposition flux"                             unit="kg(S)/m2/s" />
    731695        <field id="budg_dep_wet_h2so4" long_name="H2SO4 wet deposition flux"                             unit="kg(S)/m2/s" />
     
    819783    </field_group>
    820784
    821     <field_group id="fields_solbnd_3D" grid_ref="grid_glo_spectband" >
    822       <field id="solbnd"    long_name="Top-of-Atmosphere Solar Insolation for each band"    unit="W m-2" />
    823     </field_group>
    824 
    825     <field_group id="fields_COSP_CALIPSO_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h">
     785    <field_group id="fields_COSP_CALIPSO_2D" grid_ref="grid_glo" freq_op="3h">
    826786      <field id="cllcalipso"    long_name="Lidar Low-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    827787      <field id="clhcalipso"    long_name="Lidar Hight-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    828788      <field id="clmcalipso"    long_name="Lidar Mid-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    829789      <field id="cltcalipso"    long_name="Lidar Total Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    830       <field id="pcllcalipso"  long_name="Lidar Low-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > cllcalipso*100 </field>
    831       <field id="pclhcalipso"  long_name="Lidar Hight-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > clhcalipso*100 </field>
    832       <field id="pclmcalipso"  long_name="Lidar Mid-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > clmcalipso*100 </field>
    833       <field id="pcltcalipso"   long_name="Lidar Total Cloud Fraction"   unit="%" detect_missing_value=".true." > cltcalipso*100 </field>
     790      <field id="pcllcalipso"  field_ref="cllcalipso" long_name="Lidar Low-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > cllcalipso*100 </field>
     791      <field id="pclhcalipso"  field_ref="clhcalipso" long_name="Lidar Hight-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > clhcalipso*100 </field>
     792      <field id="pclmcalipso"  field_ref="clmcalipso" long_name="Lidar Mid-level Cloud Fraction"   unit="%"  detect_missing_value=".true." > clmcalipso*100 </field>
     793      <field id="pcltcalipso" field_ref="cltcalipso"   long_name="Lidar Total Cloud Fraction"   unit="%" detect_missing_value=".true." > cltcalipso*100 </field>
    834794      <field id="cllcalipsoice"   long_name="Lidar Ice-Phase Low-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    835795      <field id="clhcalipsoice"   long_name="Lidar Ice-Phase Hight-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
     
    848808      <field id="clzopaquecalipso" long_name="Lidar mean altitude of opacity"   unit="m"  detect_missing_value=".true." />
    849809    </field_group> 
    850     <field_group id="fields_COSP_CALIPSO_3D_height" grid_ref="grid_glo_height" freq_offset="0ts" freq_op="3h">
     810    <field_group id="fields_COSP_CALIPSO_3D_height" grid_ref="grid_glo_height" freq_op="3h">
    851811      <field id="clcalipso"  long_name="Lidar Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." />
    852       <field id="pclcalipso" long_name="Lidar Cloud Fraction (532 nm)" unit="%" detect_missing_value=".true." > clcalipso*100 </field>
     812      <field id="pclcalipso" field_ref="clcalipso" long_name="Lidar Cloud Fraction (532 nm)" unit="%" detect_missing_value=".true." > clcalipso*100 </field>
    853813      <field id="clcalipsoice"    long_name="Lidar Ice-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." />
    854814      <field id="clcalipsoliq"    long_name="Lidar Liq-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." />
     
    860820      <field id="proftemp"         long_name="Temperature profile (40 lev)" unit="K" detect_missing_value=".true." />
    861821    </field_group>
    862     <field_group id="fields_COSP_CALIPSO_3D_heightmlev" grid_ref="grid_glo_heightmlev" freq_offset="0ts" freq_op="3h">
     822    <field_group id="fields_COSP_CALIPSO_3D_heightmlev" grid_ref="grid_glo_heightmlev" freq_op="3h">
    863823      <field id="beta_mol532" long_name="Lidar Molecular Backscatter (532 nm)" unit="m-1 sr-1" detect_missing_value=".true." />
    864824    </field_group>
    865     <field_group id="fields_COSP_CALIPSO_3D_temp" grid_ref="grid_glo_temp" freq_offset="0ts" freq_op="3h">
     825    <field_group id="fields_COSP_CALIPSO_3D_temp" grid_ref="grid_glo_temp" freq_op="3h">
    866826      <field id="clcalipsotmp"    long_name="Lidar Cloud Fraction (532 nm)" unit="%"  detect_missing_value=".true." />
    867827      <field id="clcalipsotmpliq" long_name="Lidar Liq-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." />
     
    869829      <field id="clcalipsotmpun"  long_name="Undefined-Phase Total Cloud Fraction"   unit="1"  detect_missing_value=".true." />
    870830    </field_group>
    871    <field_group id="fields_COSP_CALIPSO_3D_sza" grid_ref="grid_glo_sza" freq_offset="0ts" freq_op="3h">
     831   <field_group id="fields_COSP_CALIPSO_3D_sza" grid_ref="grid_glo_sza" freq_op="3h">
    872832     <field id="parasol_refl"  long_name="PARASOL-like mono-directional reflectance" unit="1" detect_missing_value=".true." />
    873833      <field id="parasol_crefl"  long_name="PARASOL-like mono-directional reflectance (integral)" unit="1" detect_missing_value=".true." />
    874834      <field id="Ncrefl"  long_name="Nb for PARASOL-like mono-directional reflectance" unit="1" detect_missing_value=".true." />
    875835    </field_group>
    876       <field id="cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dsrbin"  detect_missing_value=".true." />
    877       <field id="atb532" long_name="Lidar Attenuated Total Backscatter (532 nm)" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dcol"  detect_missing_value=".true." />
    878       <field id="profSR" long_name="Scattering Ratio profiles" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dcol2"  detect_missing_value=".true." />
    879 
    880     <field_group id="fields_COSP_CLOUDSAT_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h">
     836      <field id="cfad_lidarsr532" long_name="Lidar Scattering Ratio CFAD (532 nm)" unit="1" freq_op="3h" grid_ref="grid4Dsrbin"  detect_missing_value=".true." />
     837      <field id="atb532" long_name="Lidar Attenuated Total Backscatter (532 nm)" unit="1" freq_op="3h" grid_ref="grid4Dcol"  detect_missing_value=".true." />
     838      <field id="profSR" long_name="Scattering Ratio profiles" unit="1" freq_op="3h" grid_ref="grid4Dcol2"  detect_missing_value=".true." />
     839
     840    <field_group id="fields_COSP_CLOUDSAT_2D" grid_ref="grid_glo" freq_op="3h">
    881841      <field id="cltlidarradar" long_name="Lidar and Radar Total Cloud Fraction" unit="1"  detect_missing_value=".true." />
    882842    </field_group>
    883     <field_group id="fields_COSP_CLOUDSAT_3D" grid_ref="grid_glo_height" freq_offset="0ts" freq_op="3h">
     843    <field_group id="fields_COSP_CLOUDSAT_3D" grid_ref="grid_glo_height" freq_op="3h">
    884844      <field id="clcalipso2"  long_name="CALIPSO Cloud Fraction Undetected by CloudSat" unit="1" detect_missing_value=".true." />
    885845    </field_group>
    886       <field id="dbze94" long_name="CloudSat Radar Reflectivity" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dcol"  detect_missing_value=".true." />
    887       <field id="cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Ddbze"  detect_missing_value=".true." />
    888 
    889     <field_group id="fields_COSP_ISCCP_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h">
     846      <field id="dbze94" long_name="CloudSat Radar Reflectivity" unit="1" freq_op="3h" grid_ref="grid4Dcol"  detect_missing_value=".true." />
     847      <field id="cfadDbze94" long_name="CloudSat Radar Reflectivity CFAD" unit="1" freq_op="3h" grid_ref="grid4Ddbze"  detect_missing_value=".true." />
     848
     849    <field_group id="fields_COSP_ISCCP_2D" grid_ref="grid_glo" freq_op="3h">
    890850      <field id="sunlit" long_name="1 for day points, 0 for nightime" unit="1"  detect_missing_value=".true." />
    891851      <field id="tclisccp" long_name="Total Cloud Fraction as Calculated by the ISCCP Simulator" unit="1"  detect_missing_value=".true." />
     
    896856      <field id="meantbclrisccp" long_name="Mean clear-sky 10.5 micron brightness temperature as calculated by the ISCCP Simulator" unit="K"  detect_missing_value=".true." />
    897857    </field_group>
    898     <field_group id="fields_COSP_ISCCP_3D" grid_ref="grid_glo_column" freq_offset="0ts" freq_op="3h">
     858    <field_group id="fields_COSP_ISCCP_3D" grid_ref="grid_glo_column" freq_op="3h">
    899859      <field id="boxtauisccp" long_name="Optical Depth in Each Column as Calculated by the ISCCP Simulator" unit="1" detect_missing_value=".true." />
    900860      <field id="boxptopisccp" long_name="Cloud Top Pressure in Each Column as Calculated by the ISCCP Simulator" unit="Pa" detect_missing_value=".true." />
    901861    </field_group>
    902       <field id="clisccp2" long_name="Cloud Fraction as Calculated by the ISCCP Simulator" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dtau"  detect_missing_value=".true." />
    903 
    904     <field_group id="fields_COSP_MISR" freq_offset="0ts" freq_op="3h">
     862      <field id="clisccp2" long_name="Cloud Fraction as Calculated by the ISCCP Simulator" unit="1" freq_op="3h" grid_ref="grid4Dtau"  detect_missing_value=".true." />
     863
     864    <field_group id="fields_COSP_MISR" freq_op="3h">
    905865      <field id="clMISR" long_name="Cloud Fraction as Calculated by the MISR Simulator" unit="1" grid_ref="grid4Dmisr"  detect_missing_value=".true." />
    906866    </field_group>
    907867
    908     <field_group id="fields_COSP_MODIS" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h">
     868    <field_group id="fields_COSP_MODIS" grid_ref="grid_glo" freq_op="3h">
    909869      <field id="cllmodis" long_name="MODIS Low-level Cloud Fraction" unit="1"  detect_missing_value=".true." />
    910870      <field id="clmmodis" long_name="MODIS Mid-level Cloud Fraction" unit="1"  detect_missing_value=".true." />
     
    925885      <field id="iwpmodis" long_name="Modis Ice_Water_Path_Mean" unit="kg m-2" detect_missing_value=".true." />
    926886    </field_group>
    927       <field id="clmodis" long_name="MODIS Cloud Area Fraction" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dtau"  detect_missing_value=".true." />
    928       <field id="crimodis" long_name="MODIS Optical_Thickness_vs_ReffIce" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dreffi"  detect_missing_value=".true." />
    929       <field id="crlmodis" long_name="MODIS Optical_Thickness_vs_ReffLiq" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dreffl"  detect_missing_value=".true." />
     887      <field id="clmodis" long_name="MODIS Cloud Area Fraction" unit="1" freq_op="3h" grid_ref="grid4Dtau"  detect_missing_value=".true." />
     888      <field id="crimodis" long_name="MODIS Optical_Thickness_vs_ReffIce" unit="1" freq_op="3h" grid_ref="grid4Dreffi"  detect_missing_value=".true." />
     889      <field id="crlmodis" long_name="MODIS Optical_Thickness_vs_ReffLiq" unit="1" freq_op="3h" grid_ref="grid4Dreffl"  detect_missing_value=".true." />
    930890
    931891    <field_group id="fields_AIRS" grid_ref="grid_glo" operation="instant" freq_op="3h">
     
    975935      <field id="CFC11_ppt" long_name="CFC11_ppt" unit="ppt" />
    976936      <field id="CFC12_ppt" long_name="CFC12_ppt" unit="ppt" />
    977 <!-- reducing mass 3D variable to atmosphere total mass scalar -->
    978       <field id="mass_sum" field_ref="mass" grid_ref="grid_sum" grid_path="grid_sum_axis" freq_op="1mo" > @mass  </field>
    979937   </field_group>
    980938
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histLES_lmdz.xml

    r3356 r3411  
    1818                <field field_ref="flat" level="5" />
    1919                <field field_ref="slp" level="10" />
    20                 <field field_ref="sza" level="10" />
    2120                <field field_ref="ptstar" level="10" />
    2221                <field field_ref="pt0" level="10" />
     
    5958                <field field_ref="ndayrain" level="10" operation="instant" />
    6059                <field field_ref="precip" level="5" />
    61                 <field field_ref="rain_fall" level="5" />
    62                 <field field_ref="rain_con" level="5" />
    6360                <field field_ref="plul" level="10" />
    6461                <field field_ref="plun" level="10" />
     
    126123                <field field_ref="fqcalving" level="10" />
    127124                <field field_ref="fqfonte" level="10" />
    128                 <field field_ref="mrroli" level="10" />
    129125                <field field_ref="runofflic" level="10" />
    130126                <field field_ref="taux" level="10" />
     
    319315                <field field_ref="l_mixmin_sic" level="10" />
    320316                <field field_ref="SWnetOR" level="10" />
     317                <field field_ref="SWdownOR" level="10" />
    321318                <field field_ref="LWdownOR" level="10" />
    322319                <field field_ref="snowl" level="10" />
     
    414411                <field field_ref="ftime_con" level="10" operation="instant" />
    415412                <field field_ref="wake_h" level="10" />
    416                 <field field_ref="wake_dens" level="10" />
    417413                <field field_ref="wake_s" level="10" />
    418414                <field field_ref="epmax" level="10" />
     
    421417                <field field_ref="lmaxth" level="10" />
    422418                <field field_ref="ftime_th" level="10" />
    423                 <field field_ref="ftime_deepcv" level="10" />
    424419                <field field_ref="f0_th" level="10" />
    425420                <field field_ref="zmax_th" level="10" />
     
    468463                <field field_ref="ocond" level="10" />
    469464                <field field_ref="geop" level="10" />
    470                 <field field_ref="geoph" level="10" />
    471465                <field field_ref="vitu" level="10" />
    472466                <field field_ref="vitv" level="10" />
     
    502496                <field field_ref="lcc3dcon" level="10" />
    503497                <field field_ref="lcc3dstra" level="10" />
    504                 <field field_ref="cldwatmxrat" level="10" />
    505                 <field field_ref="icc3dcon" level="10" />
    506                 <field field_ref="icc3dstra" level="10" />
    507                 <field field_ref="cldicemxrat" level="10" />
    508498                <field field_ref="clwcon" level="10" />
    509499                <field field_ref="Ma" level="10" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histdayCOSP_lmdz.xml

    r3356 r3411  
    88                <field field_ref="clhcalipso"         level="1" />
    99                <field field_ref="cltcalipso"         level="1" />
    10                 <field field_ref="pcllcalipso"         level="1" />
    11                 <field field_ref="pclmcalipso"         level="1" />
    12                 <field field_ref="pclhcalipso"         level="1" />
    13                 <field field_ref="pcltcalipso"         level="1" />
    1410                <field field_ref="cllcalipsoice"         level="1" />
    1511                <field field_ref="clmcalipsoice"         level="1" />
     
    8783                <field field_ref="reffclwmodis" level="1" />
    8884                <field field_ref="reffclimodis" level="1" />
    89                 <field field_ref="pctmodis"  level="1" />
     85                <field field_ref="pctmodis"  unit="1" />
    9086                <field field_ref="lwpmodis" level="1" />
    9187                <field field_ref="iwpmodis" level="1" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histday_lmdz.xml

    r3356 r3411  
    1818                <field field_ref="flat" level="1" />
    1919                <field field_ref="slp" level="1" />
    20                 <field field_ref="sza" level="1" />
    2120                <field field_ref="ptstar" level="1" />
    2221                <field field_ref="pt0" level="1" />
     
    6362                <field field_ref="ndayrain" level="10" operation="instant" />
    6463                <field field_ref="precip" level="1" />
    65                 <field field_ref="rain_fall" level="1" />
    66                 <field field_ref="rain_con" level="1" />
    6764                <field field_ref="plul" level="1" />
    6865                <field field_ref="plun" level="1" />
     
    130127                <field field_ref="fqcalving" level="10" />
    131128                <field field_ref="fqfonte" level="10" />
    132                 <field field_ref="mrroli" level="10" />
    133129                <field field_ref="runofflic" level="10" />
    134130                <field field_ref="taux" level="10" />
     
    235231                <field field_ref="proba_notrig" level="1" />
    236232                <field field_ref="random_notrig" level="1" />
    237                 <field field_ref="cv_gen" level="1" />
    238233                <field field_ref="ale_bl_stat" level="1" />
    239234                <field field_ref="ale_bl_trig" level="1" />
     
    326321                <field field_ref="l_mixmin_sic" level="10" />
    327322                <field field_ref="SWnetOR" level="10" />
     323                <field field_ref="SWdownOR" level="10" />
    328324                <field field_ref="LWdownOR" level="10" />
    329325                <field field_ref="snowl" level="1" />
     
    428424                <field field_ref="ftime_con" level="10" operation="instant" />
    429425                <field field_ref="wake_h" level="5" />
    430                 <field field_ref="wake_dens" level="5" />
    431426                <field field_ref="wake_s" level="5" />
    432427                <field field_ref="epmax" level="10" />
     
    435430                <field field_ref="lmaxth" level="10" />
    436431                <field field_ref="ftime_th" level="10" />
    437                 <field field_ref="ftime_deepcv" level="10" />
    438432                <field field_ref="f0_th" level="10" />
    439433                <field field_ref="zmax_th" level="4" />
     
    482476                <field field_ref="ocond" level="3" />
    483477                <field field_ref="geop" level="3" />
    484                 <field field_ref="geoph" level="3" />
    485478                <field field_ref="vitu" level="3" />
    486479                <field field_ref="vitv" level="3" />
     
    516509                <field field_ref="lcc3dcon" level="6" />
    517510                <field field_ref="lcc3dstra" level="6" />
    518                 <field field_ref="cldwatmxrat" level="6" />
    519                 <field field_ref="icc3dcon" level="6" />
    520                 <field field_ref="icc3dstra" level="6" />
    521                 <field field_ref="cldicemxrat" level="6" />
    522511                <field field_ref="clwcon" level="10" />
    523512                <field field_ref="Ma" level="10" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histhfCOSP_lmdz.xml

    r3356 r3411  
    88                <field field_ref="clhcalipso"         level="1" />
    99                <field field_ref="cltcalipso"         level="1" />
    10                 <field field_ref="pcllcalipso"         level="1" />
    11                 <field field_ref="pclmcalipso"         level="1" />
    12                 <field field_ref="pclhcalipso"         level="1" />
    13                 <field field_ref="pcltcalipso"         level="1" />
    1410                <field field_ref="cllcalipsoice"         level="1" />
    1511                <field field_ref="clmcalipsoice"         level="1" />
     
    8783                <field field_ref="reffclwmodis" level="1" />
    8884                <field field_ref="reffclimodis" level="1" />
    89                 <field field_ref="pctmodis"  level="1" />
     85                <field field_ref="pctmodis"  unit="1" />
    9086                <field field_ref="lwpmodis" level="1" />
    9187                <field field_ref="iwpmodis" level="1" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histhf_lmdz.xml

    r3356 r3411  
    1818                <field field_ref="flat" level="5" />
    1919                <field field_ref="slp" level="10" />
    20                 <field field_ref="sza" level="10" />
    2120                <field field_ref="ptstar" level="10" />
    2221                <field field_ref="pt0" level="10" />
     
    6362                <field field_ref="ndayrain" level="10" operation="instant" />
    6463                <field field_ref="precip" level="10" />
    65                 <field field_ref="rain_fall" level="10" />
    66                 <field field_ref="rain_con" level="10" />
    6764                <field field_ref="plul" level="10" />
    6865                <field field_ref="plun" level="10" />
     
    130127                <field field_ref="fqcalving" level="10" />
    131128                <field field_ref="fqfonte" level="10" />
    132                 <field field_ref="mrroli" level="10" />
    133129                <field field_ref="runofflic" level="10" />
    134130                <field field_ref="taux" level="10" />
     
    235231                <field field_ref="proba_notrig" level="6" />
    236232                <field field_ref="random_notrig" level="6" />
    237                 <field field_ref="cv_gen" level="6" />
    238233                <field field_ref="ale_bl_stat" level="6" />
    239234                <field field_ref="ale_bl_trig" level="6" />
     
    324319                <field field_ref="l_mixmin_sic" level="10" />
    325320                <field field_ref="SWnetOR" level="10" />
     321                <field field_ref="SWdownOR" level="10" />
    326322                <field field_ref="LWdownOR" level="10" />
    327323                <field field_ref="snowl" level="10" />
     
    419415                <field field_ref="ftime_con" level="10" operation="instant" />
    420416                <field field_ref="wake_h" level="10" />
    421                 <field field_ref="wake_dens" level="10" />
    422417                <field field_ref="wake_s" level="10" />
    423418                <field field_ref="epmax" level="10" />
     
    426421                <field field_ref="lmaxth" level="10" />
    427422                <field field_ref="ftime_th" level="10" />
    428                 <field field_ref="ftime_deepcv" level="10" />
    429423                <field field_ref="f0_th" level="10" />
    430424                <field field_ref="zmax_th" level="5" />
     
    503497                <field field_ref="ocond" level="10" />
    504498                <field field_ref="geop" level="10" />
    505                 <field field_ref="geoph" level="10" />
    506499                <field field_ref="vitu" level="5" />
    507500                <field field_ref="vitv" level="5" />
     
    535528                <field field_ref="reffclwc" level="10" />
    536529                <field field_ref="lcc3d" level="10" />
    537                 <field field_ref="lcc3dcon" level="5" />
    538                 <field field_ref="lcc3dstra" level="5" />
    539                 <field field_ref="cldwatmxrat" level="5" />
    540                 <field field_ref="icc3dcon" level="5" />
    541                 <field field_ref="icc3dstra" level="5" />
    542                 <field field_ref="cldicemxrat" level="5" />
     530                <field field_ref="lcc3dcon" level="10" />
     531                <field field_ref="lcc3dstra" level="10" />
    543532                <field field_ref="clwcon" level="10" />
    544533                <field field_ref="Ma" level="10" />
     
    651640                <field field_ref="rldcs4co2" level="10" />
    652641            </field_group>
    653 
    654             <!-- VARS 3D -->
    655             <field_group operation="average" freq_op="1ts" grid_ref="grid_glo_spectband">
    656                 <field field_ref="solbnd" level="4" />
    657             </field_group>
    658 
    659642        </file>
    660643    </file_group>
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histins_lmdz.xml

    r3356 r3411  
    1818                <field field_ref="flat" level="10" />
    1919                <field field_ref="slp" level="1" />
    20                 <field field_ref="sza" level="1" />
    2120                <field field_ref="ptstar" level="1" />
    2221                <field field_ref="pt0" level="1" />
     
    5958                <field field_ref="ndayrain" level="10" operation="instant"  />
    6059                <field field_ref="precip" level="1" />
    61                 <field field_ref="rain_fall" level="1" />
    62                 <field field_ref="rain_con" level="1" />
    6360                <field field_ref="plul" level="1" />
    6461                <field field_ref="plun" level="1" />
     
    9693                <field field_ref="SWupSFC" level="10" />
    9794                <field field_ref="SWupSFCclr" level="10" />
    98                 <field field_ref="SWdnSFC" level="2" />
     95                <field field_ref="SWdnSFC" level="10" />
    9996                <field field_ref="SWdnSFCclr" level="10" />
    10097                <field field_ref="LWupSFC" level="10" />
     
    126123                <field field_ref="fqcalving" level="10" />
    127124                <field field_ref="fqfonte" level="10" />
    128                 <field field_ref="mrroli" level="10" />
    129125                <field field_ref="runofflic" level="10" />
    130126                <field field_ref="taux" level="10" />
     
    231227                <field field_ref="proba_notrig" level="1" />
    232228                <field field_ref="random_notrig" level="1" />
    233                 <field field_ref="cv_gen" level="1" />
    234229                <field field_ref="ale_bl_stat" level="1" />
    235230                <field field_ref="ale_bl_trig" level="1" />
     
    320315                <field field_ref="l_mixmin_sic" level="10" />
    321316                <field field_ref="SWnetOR" level="2" />
     317                <field field_ref="SWdownOR" level="2" />
    322318                <field field_ref="LWdownOR" level="2" />
    323319                <field field_ref="snowl" level="10" />
     
    415411                <field field_ref="ftime_con" level="10" operation="instant" />
    416412                <field field_ref="wake_h" level="10" />
    417                 <field field_ref="wake_dens" level="10" />
    418413                <field field_ref="wake_s" level="10" />
    419414                <field field_ref="epmax" level="10" />
     
    422417                <field field_ref="lmaxth" level="10" />
    423418                <field field_ref="ftime_th" level="10" />
    424                 <field field_ref="ftime_deepcv" level="10" />
    425419                <field field_ref="f0_th" level="10" />
    426420                <field field_ref="zmax_th" level="4" />
     
    469463                <field field_ref="ocond" level="4" />
    470464                <field field_ref="geop" level="10" />
    471                 <field field_ref="geoph" level="10" />
    472465                <field field_ref="vitu" level="4" />
    473466                <field field_ref="vitv" level="4" />
     
    503496                <field field_ref="lcc3dcon" level="10" />
    504497                <field field_ref="lcc3dstra" level="10" />
    505                 <field field_ref="cldwatmxrat" level="10" />
    506                 <field field_ref="icc3dcon" level="10" />
    507                 <field field_ref="icc3dstra" level="10" />
    508                 <field field_ref="cldicemxrat" level="10" />
    509498                <field field_ref="clwcon" level="10" />
    510499                <field field_ref="Ma" level="10" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histmthCOSP_lmdz.xml

    r3356 r3411  
    99                <field field_ref="clhcalipso"         level="1" />
    1010                <field field_ref="cltcalipso"         level="1" />
    11                 <field field_ref="pcllcalipso"         level="1" />
    12                 <field field_ref="pclmcalipso"         level="1" />
    13                 <field field_ref="pclhcalipso"         level="1" />
    14                 <field field_ref="pcltcalipso"         level="1" />
    1511                <field field_ref="cllcalipsoice"         level="1" />
    1612                <field field_ref="clmcalipsoice"         level="1" />
     
    8884                <field field_ref="reffclwmodis" level="1" />
    8985                <field field_ref="reffclimodis" level="1" />
    90                 <field field_ref="pctmodis"  level="1" />
     86                <field field_ref="pctmodis"  unit="1" />
    9187                <field field_ref="lwpmodis" level="1" />
    9288                <field field_ref="iwpmodis" level="1" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histmth_lmdz.xml

    r3356 r3411  
    1111
    1212            <field_group operation="once">
    13               <field field_ref="io_lon" level="1" />
    14               <field field_ref="io_lat" level="1" />
    1513              <field field_ref="Ahyb" level="1" />
    1614              <field field_ref="Ahyb_inter" level="1" />
     
    4745                <field field_ref="flat"         level="5" />
    4846                <field field_ref="slp"          level="1" />
    49                 <field field_ref="sza"          level="1" />
    5047                <field field_ref="ptstar"       level="1" />
    5148                <field field_ref="pt0"          level="1" />
     
    9289                <field field_ref="ndayrain" level="1" operation="instant" />
    9390                <field field_ref="precip"   level="1" />
    94                 <field field_ref="rain_fall"   level="1" />
    95                 <field field_ref="rain_con"   level="1" />
    9691                <field field_ref="plul"     level="1" />
    9792                <field field_ref="plun"     level="1" />
     
    159154                <field field_ref="fqcalving" level="1" />
    160155                <field field_ref="fqfonte" level="1" />
    161                 <field field_ref="mrroli" level="1" />
    162                 <field field_ref="runofflic" level="5" />
     156                <field field_ref="runofflic" level="1" />
    163157                <field field_ref="taux" level="1" />
    164158                <field field_ref="tauy" level="1" />
     
    236230                <field field_ref="uq" level="1" />
    237231                <field field_ref="vq" level="1" />
    238                 <field field_ref="uwat" level="1" />
    239                 <field field_ref="vwat" level="1" />
    240232                <field field_ref="cape" level="1" />
    241233                <field field_ref="pbase" level="1" />
     
    266258                <field field_ref="proba_notrig" level="1" />
    267259                <field field_ref="random_notrig" level="1" />
    268                 <field field_ref="cv_gen" level="1" />
    269260                <field field_ref="ale_bl_stat" level="1" />
    270261                <field field_ref="ale_bl_trig" level="1" />
     
    339330                <field field_ref="tpot" level="10" />
    340331                <field field_ref="tpote" level="10" />
    341                 <field field_ref="tke" level="7" />
     332                <field field_ref="tke" level="4" />
    342333                <field field_ref="tke_ter" level="10" />
    343334                <field field_ref="tke_lic" level="10" />
     
    357348                <field field_ref="l_mixmin_sic" level="10" />
    358349                <field field_ref="SWnetOR" level="10" />
     350                <field field_ref="SWdownOR" level="10" />
    359351                <field field_ref="LWdownOR" level="10" />
    360352                <field field_ref="snowl" level="10" />
     
    368360                <field field_ref="z0m" level="10" />
    369361                <field field_ref="z0h" level="10" />
    370                 <field field_ref="topswad" level="10" />
    371                 <field field_ref="topswad0" level="10" />
    372                 <field field_ref="topswai" level="10" />
    373                 <field field_ref="solswad" level="10" />
    374                 <field field_ref="solswad0" level="10" />
    375                 <field field_ref="solswai" level="10" />
    376                 <field field_ref="toplwad" level="10" />
    377                 <field field_ref="toplwad0" level="10" />
    378                 <field field_ref="toplwai" level="10" />
    379                 <field field_ref="sollwad" level="10" />
    380                 <field field_ref="sollwad0" level="10" />
    381                 <field field_ref="sollwai" level="10" />
    382                 <field field_ref="od550_ASBCM" level="7" />
    383                 <field field_ref="od550_ASPOMM" level="7" />
    384                 <field field_ref="od550_ASSO4M" level="7" />
    385                 <field field_ref="od550_CSSO4M" level="7" />
    386                 <field field_ref="od550_SSSSM" level="7" />
    387                 <field field_ref="od550_ASSSM" level="7" />
    388                 <field field_ref="od550_CSSSM" level="7" />
    389                 <field field_ref="od550_CIDUSTM" level="7" />
    390                 <field field_ref="od550_AIBCM" level="7" />
    391                 <field field_ref="od550_AIPOMM" level="7" />
    392                 <field field_ref="od550_ASNO3M" level="7" />
    393                 <field field_ref="od550_CSNO3M" level="7" />
    394                 <field field_ref="od550_CINO3M" level="7" />
     362                <field field_ref="topswad" level="5" />
     363                <field field_ref="topswad0" level="5" />
     364                <field field_ref="topswai" level="5" />
     365                <field field_ref="solswad" level="5" />
     366                <field field_ref="solswad0" level="5" />
     367                <field field_ref="solswai" level="5" />
     368                <field field_ref="toplwad" level="5" />
     369                <field field_ref="toplwad0" level="5" />
     370                <field field_ref="toplwai" level="5" />
     371                <field field_ref="sollwad" level="5" />
     372                <field field_ref="sollwad0" level="5" />
     373                <field field_ref="sollwai" level="5" />
     374                <field field_ref="od550_ASBCM" level="2" />
     375                <field field_ref="od550_ASPOMM" level="2" />
     376                <field field_ref="od550_ASSO4M" level="2" />
     377                <field field_ref="od550_CSSO4M" level="2" />
     378                <field field_ref="od550_SSSSM" level="2" />
     379                <field field_ref="od550_ASSSM" level="2" />
     380                <field field_ref="od550_CSSSM" level="2" />
     381                <field field_ref="od550_CIDUSTM" level="2" />
     382                <field field_ref="od550_AIBCM" level="2" />
     383                <field field_ref="od550_AIPOMM" level="2" />
     384                <field field_ref="od550_ASNO3M" level="2" />
     385                <field field_ref="od550_CSNO3M" level="2" />
     386                <field field_ref="od550_CINO3M" level="2" />
    395387                <field field_ref="od550_STRAT" level="2" />
    396                 <field field_ref="dryod550_ASBCM" level="7" />
    397                 <field field_ref="dryod550_ASPOMM" level="7" />
    398                 <field field_ref="dryod550_ASSO4M" level="7" />
    399                 <field field_ref="dryod550_CSSO4M" level="7" />
    400                 <field field_ref="dryod550_SSSSM" level="7" />
    401                 <field field_ref="dryod550_ASSSM" level="7" />
    402                 <field field_ref="dryod550_CSSSM" level="7" />
    403                 <field field_ref="dryod550_CIDUSTM" level="7" />
    404                 <field field_ref="dryod550_AIBCM" level="7" />
    405                 <field field_ref="dryod550_AIPOMM" level="7" />
    406                 <field field_ref="dryod550_ASNO3M" level="7" />
    407                 <field field_ref="dryod550_CSNO3M" level="7" />
    408                 <field field_ref="dryod550_CINO3M" level="7" />
     388                <field field_ref="dryod550_ASBCM" level="2" />
     389                <field field_ref="dryod550_ASPOMM" level="2" />
     390                <field field_ref="dryod550_ASSO4M" level="2" />
     391                <field field_ref="dryod550_CSSO4M" level="2" />
     392                <field field_ref="dryod550_SSSSM" level="2" />
     393                <field field_ref="dryod550_ASSSM" level="2" />
     394                <field field_ref="dryod550_CSSSM" level="2" />
     395                <field field_ref="dryod550_CIDUSTM" level="2" />
     396                <field field_ref="dryod550_AIBCM" level="2" />
     397                <field field_ref="dryod550_AIPOMM" level="2" />
     398                <field field_ref="dryod550_ASNO3M" level="2" />
     399                <field field_ref="dryod550_CSNO3M" level="2" />
     400                <field field_ref="dryod550_CINO3M" level="2" />
    409401                <field field_ref="od550aer" level="2" />
    410402                <field field_ref="dryod550aer" level="2" />
     
    415407                <field field_ref="sconcoa" level="2" />
    416408                <field field_ref="sconcbc" level="2" />
    417                 <field field_ref="sconcss" level="11" />
    418                 <field field_ref="sconcdust" level="11" />
    419                 <field field_ref="sconcno3" level="11" />
    420                 <field field_ref="loadso4" level="11" />
    421                 <field field_ref="loadoa" level="11" />
    422                 <field field_ref="loadbc" level="11" />
    423                 <field field_ref="loadss" level="11" />
    424                 <field field_ref="loaddust" level="11" />
    425                 <field field_ref="loadno3" level="11" />
    426                 <field field_ref="swtoaas_nat" level="11" />
    427                 <field field_ref="swsrfas_nat" level="11" />
    428                 <field field_ref="swtoacs_nat" level="11" />
    429                 <field field_ref="swsrfcs_nat" level="11" />
    430                 <field field_ref="swtoaas_ant" level="11" />
    431                 <field field_ref="swsrfas_ant" level="11" />
    432                 <field field_ref="swtoacs_ant" level="11" />
    433                 <field field_ref="swsrfcs_ant" level="11" />
    434                 <field field_ref="swtoacf_nat" level="11" />
    435                 <field field_ref="swsrfcf_nat" level="11" />
    436                 <field field_ref="swtoacf_ant" level="11" />
    437                 <field field_ref="swsrfcf_ant" level="11" />
    438                 <field field_ref="swtoacf_zero" level="11" />
    439                 <field field_ref="swsrfcf_zero" level="11" />
    440                 <field field_ref="cldncl" level="11" />
    441                 <field field_ref="reffclwtop" level="11" />
    442                 <field field_ref="cldnvi" level="11" />
    443                 <field field_ref="lcc" level="11" />
     409                <field field_ref="sconcss" level="2" />
     410                <field field_ref="sconcdust" level="2" />
     411                <field field_ref="sconcno3" level="2" />
     412                <field field_ref="loadso4" level="2" />
     413                <field field_ref="loadoa" level="2" />
     414                <field field_ref="loadbc" level="2" />
     415                <field field_ref="loadss" level="2" />
     416                <field field_ref="loaddust" level="2" />
     417                <field field_ref="loadno3" level="2" />
     418                <field field_ref="swtoaas_nat" level="4" />
     419                <field field_ref="swsrfas_nat" level="4" />
     420                <field field_ref="swtoacs_nat" level="4" />
     421                <field field_ref="swsrfcs_nat" level="4" />
     422                <field field_ref="swtoaas_ant" level="4" />
     423                <field field_ref="swsrfas_ant" level="4" />
     424                <field field_ref="swtoacs_ant" level="4" />
     425                <field field_ref="swsrfcs_ant" level="4" />
     426                <field field_ref="swtoacf_nat" level="4" />
     427                <field field_ref="swsrfcf_nat" level="4" />
     428                <field field_ref="swtoacf_ant" level="4" />
     429                <field field_ref="swsrfcf_ant" level="4" />
     430                <field field_ref="swtoacf_zero" level="4" />
     431                <field field_ref="swsrfcf_zero" level="4" />
     432                <field field_ref="cldncl" level="2" />
     433                <field field_ref="reffclwtop" level="2" />
     434                <field field_ref="cldnvi" level="2" />
     435                <field field_ref="lcc" level="2" />
    444436                <field field_ref="wvapp" level="2" />
    445437                <field field_ref="ozone_daylight" level="2" />
     
    472464                <field field_ref="ftime_con" level="4" operation="instant" />
    473465                <field field_ref="wake_h" level="4" />
    474                 <field field_ref="wake_dens" level="4" />
    475466                <field field_ref="wake_s" level="4" />
    476467                <field field_ref="epmax" level="2" />
     
    479470                <field field_ref="lmaxth" level="10" />
    480471                <field field_ref="ftime_th" level="4" />
    481                 <field field_ref="ftime_deepcv" level="4" />
    482472                <field field_ref="f0_th" level="4" />
    483473                <field field_ref="zmax_th" level="4" />
    484                 <field field_ref="rsut4co2" level="10" />
    485                 <field field_ref="rlut4co2" level="10" />
    486                 <field field_ref="rsutcs4co2" level="10" />
    487                 <field field_ref="rlutcs4co2" level="10" />
     474                <field field_ref="rsut4co2" level="5" />
     475                <field field_ref="rlut4co2" level="5" />
     476                <field field_ref="rsutcs4co2" level="5" />
     477                <field field_ref="rlutcs4co2" level="5" />
    488478                <field field_ref="dqphy2d" level="2" />
    489479                <field field_ref="dqlphy2d" level="2" />
     
    517507                <field field_ref="concno3" level="2" />
    518508                <field field_ref="ec550aer" level="2" />
    519                 <field field_ref="lwcon" level="7" />
    520                 <field field_ref="iwcon" level="7" />
    521                 <field field_ref="temp" level="1" />
    522                 <field field_ref="theta" level="3" />
    523                 <field field_ref="ovap" level="1" />
    524                 <field field_ref="ovapinit" level="10" />
    525                 <field field_ref="oliq" level="1" />
    526                 <field field_ref="ocond" level="1" />
    527                 <field field_ref="geop" level="3" />
    528                 <field field_ref="geoph" level="3" />
    529                 <field field_ref="vitu" level="1" />
    530                 <field field_ref="vitv" level="1" />
    531                 <field field_ref="vitw" level="1" />
    532                 <field field_ref="pres" level="1" />
    533                 <field field_ref="paprs" level="3" />
    534                 <field field_ref="mass" level="3" />
    535                 <field field_ref="zfull" level="1" />
    536                 <field field_ref="zhalf" level="7" />
    537                 <field field_ref="rneb" level="1" />
    538                 <field field_ref="rnebcon" level="7" />
    539                 <field field_ref="rnebls" level="7" />
    540                 <field field_ref="rneblsvol" level="7" />
    541                 <field field_ref="rhum" level="1" />
    542                 <field field_ref="ozone" level="3" />
    543                 <field field_ref="upwd" level="7" />
    544                 <field field_ref="ep" level="7" />
    545                 <field field_ref="duphy" level="7" />
    546                 <field field_ref="dtphy" level="7" />
    547                 <field field_ref="dqphy" level="7" />
    548                 <field field_ref="dqlphy" level="7" />
    549                 <field field_ref="dqsphy" level="7" />
    550                 <field field_ref="pr_con_l" level="3" />
    551                 <field field_ref="pr_con_i" level="3" />
    552                 <field field_ref="pr_lsc_l" level="3" />
    553                 <field field_ref="pr_lsc_i" level="3" />
     509                <field field_ref="lwcon" level="2" />
     510                <field field_ref="iwcon" level="2" />
     511                <field field_ref="temp" level="2" />
     512                <field field_ref="theta" level="2" />
     513                <field field_ref="ovap" level="2" />
     514                <field field_ref="ovapinit" level="2" />
     515                <field field_ref="oliq" level="2" />
     516                <field field_ref="ocond" level="2" />
     517                <field field_ref="geop" level="2" />
     518                <field field_ref="vitu" level="2" />
     519                <field field_ref="vitv" level="2" />
     520                <field field_ref="vitw" level="2" />
     521                <field field_ref="pres" level="2" />
     522                <field field_ref="paprs" level="2" />
     523                <field field_ref="mass" level="2" />
     524                <field field_ref="zfull" level="2" />
     525                <field field_ref="zhalf" level="2" />
     526                <field field_ref="rneb" level="2" />
     527                <field field_ref="rnebcon" level="2" />
     528                <field field_ref="rnebls" level="2" />
     529                <field field_ref="rneblsvol" level="2" />
     530                <field field_ref="rhum" level="2" />
     531                <field field_ref="ozone" level="2" />
     532                <field field_ref="upwd" level="2" />
     533                <field field_ref="ep" level="2" />
     534                <field field_ref="duphy" level="2" />
     535                <field field_ref="dtphy" level="2" />
     536                <field field_ref="dqphy" level="2" />
     537                <field field_ref="dqlphy" level="2" />
     538                <field field_ref="dqsphy" level="2" />
     539                <field field_ref="pr_con_l" level="2" />
     540                <field field_ref="pr_con_i" level="2" />
     541                <field field_ref="pr_lsc_l" level="2" />
     542                <field field_ref="pr_lsc_i" level="2" />
    554543                <field field_ref="re" level="5" />
    555544                <field field_ref="fl" level="5" />
    556                 <field field_ref="scdnc" level="11" />
    557                 <field field_ref="reffclws" level="11" />
    558                 <field field_ref="reffclwc" level="11" />
    559                 <field field_ref="lcc3d" level="11" />
    560                 <field field_ref="lcc3dcon" level="11" />
    561                 <field field_ref="lcc3dstra" level="11" />
    562                 <field field_ref="cldwatmxrat" level="5" />
    563                 <field field_ref="icc3dcon" level="11" />
    564                 <field field_ref="icc3dstra" level="11" />
    565                 <field field_ref="cldicemxrat" level="5" />
    566                 <field field_ref="clwcon" level="7" />
    567                 <field field_ref="Ma" level="7" />
    568                 <field field_ref="dnwd" level="7" />
    569                 <field field_ref="dnwd0" level="7" />
    570                 <field field_ref="mc" level="7" />
    571                 <field field_ref="dtdyn" level="7" />
    572                 <field field_ref="dqdyn" level="7" />
    573                 <field field_ref="dqldyn" level="7" />
    574                 <field field_ref="dqsdyn" level="7" />
    575                 <field field_ref="dudyn" level="7" />
    576                 <field field_ref="dvdyn" level="7" />
    577                 <field field_ref="dtcon" level="7" />
    578                 <field field_ref="ducon" level="7" />
    579                 <field field_ref="dvcon" level="7" />
    580                 <field field_ref="dqcon" level="7" />
    581                 <field field_ref="dtwak" level="7" />
    582                 <field field_ref="dqwak" level="7" />
    583                 <field field_ref="wake_deltat" level="7" />
    584                 <field field_ref="wake_deltaq" level="7" />
    585                 <field field_ref="wake_omg" level="7" />
    586                 <field field_ref="wdtrainA" level="9" />
    587                 <field field_ref="wdtrainM" level="9" />
    588                 <field field_ref="Vprecip" level="11" />
    589                 <field field_ref="ftd" level="7" />
    590                 <field field_ref="fqd" level="7" />
    591                 <field field_ref="dtlsc" level="7" />
    592                 <field field_ref="dtlschr" level="7" />
    593                 <field field_ref="dqlsc" level="7" />
    594                 <field field_ref="beta_prec" level="9" />
    595                 <field field_ref="dtvdf" level="7" />
     545                <field field_ref="scdnc" level="2" />
     546                <field field_ref="reffclws" level="2" />
     547                <field field_ref="reffclwc" level="2" />
     548                <field field_ref="lcc3d" level="2" />
     549                <field field_ref="lcc3dcon" level="2" />
     550                <field field_ref="lcc3dstra" level="2" />
     551                <field field_ref="clwcon" level="4" />
     552                <field field_ref="Ma" level="4" />
     553                <field field_ref="dnwd" level="4" />
     554                <field field_ref="dnwd0" level="4" />
     555                <field field_ref="mc" level="4" />
     556                <field field_ref="dtdyn" level="4" />
     557                <field field_ref="dqdyn" level="4" />
     558                <field field_ref="dqldyn" level="4" />
     559                <field field_ref="dqsdyn" level="4" />
     560                <field field_ref="dudyn" level="4" />
     561                <field field_ref="dvdyn" level="4" />
     562                <field field_ref="dtcon" level="4" />
     563                <field field_ref="ducon" level="4" />
     564                <field field_ref="dvcon" level="4" />
     565                <field field_ref="dqcon" level="4" />
     566                <field field_ref="dtwak" level="4" />
     567                <field field_ref="dqwak" level="4" />
     568                <field field_ref="wake_deltat" level="4" />
     569                <field field_ref="wake_deltaq" level="4" />
     570                <field field_ref="wake_omg" level="4" />
     571                <field field_ref="wdtrainA" level="4" />
     572                <field field_ref="wdtrainM" level="4" />
     573                <field field_ref="Vprecip" level="10" />
     574                <field field_ref="ftd" level="4" />
     575                <field field_ref="fqd" level="4" />
     576                <field field_ref="dtlsc" level="4" />
     577                <field field_ref="dtlschr" level="4" />
     578                <field field_ref="dqlsc" level="4" />
     579                <field field_ref="beta_prec" level="4" />
     580                <field field_ref="dtvdf" level="4" />
    596581                <field field_ref="dtvdf_x" level="11" />
    597582                <field field_ref="dtvdf_w" level="11" />
    598                 <field field_ref="dtdis" level="7" />
    599                 <field field_ref="dqvdf" level="7" />
     583                <field field_ref="dtdis" level="4" />
     584                <field field_ref="dqvdf" level="4" />
    600585                <field field_ref="dqvdf_x" level="11" />
    601586                <field field_ref="dqvdf_w" level="11" />
    602                 <field field_ref="dteva" level="7" />
    603                 <field field_ref="dqeva" level="7" />
     587                <field field_ref="dteva" level="4" />
     588                <field field_ref="dqeva" level="4" />
    604589                <field field_ref="dqlscth" level="10" />
    605590                <field field_ref="dqlscst" level="10" />
    606591                <field field_ref="dtlscth" level="10" />
    607592                <field field_ref="dtlscst" level="10" />
    608                 <field field_ref="ptconvth" level="7" />
    609                 <field field_ref="ptconv" level="7" />
    610                 <field field_ref="ratqs" level="7" />
    611                 <field field_ref="dtthe" level="7" />
    612                 <field field_ref="f_th" level="7" />
    613                 <field field_ref="e_th" level="9" />
    614                 <field field_ref="w_th" level="7" />
     593                <field field_ref="ptconvth" level="10" />
     594                <field field_ref="ptconv" level="4" />
     595                <field field_ref="ratqs" level="4" />
     596                <field field_ref="dtthe" level="4" />
     597                <field field_ref="f_th" level="4" />
     598                <field field_ref="e_th" level="4" />
     599                <field field_ref="w_th" level="4" />
    615600                <field field_ref="lambda_th" level="10" />
    616                 <field field_ref="q_th" level="9" />
    617                 <field field_ref="a_th" level="9" />
    618                 <field field_ref="s_th" level="9" />
    619                 <field field_ref="s_env" level="9" />
    620                 <field field_ref="sigma_th" level="9" />
    621                 <field field_ref="sigma_env" level="9" />
    622                 <field field_ref="d_th" level="9" />
    623                 <field field_ref="dqthe" level="7" />
    624                 <field field_ref="dtajs" level="7" />
    625                 <field field_ref="dqajs" level="7" />
    626                 <field field_ref="dtswr" level="7" />
    627                 <field field_ref="dtsw0" level="7" />
    628                 <field field_ref="dtlwr" level="7" />
    629                 <field field_ref="dtlw0" level="7" />
    630                 <field field_ref="dtec"  level="7" />
    631                 <field field_ref="duvdf" level="7" />
    632                 <field field_ref="dvvdf" level="7" />
    633                 <field field_ref="duoro" level="7" />
    634                 <field field_ref="dvoro" level="7" />
    635                 <field field_ref="dulif" level="7" />
    636                 <field field_ref="dvlif" level="7" />
    637                 <field field_ref="du_gwd_hines" level="7" />
    638                 <field field_ref="dv_gwd_hines" level="7" />
    639                 <field field_ref="du_gwd_front" level="7" />
    640                 <field field_ref="dv_gwd_front" level="7" />
    641                 <field field_ref="east_gwstress" level="10" />
    642                 <field field_ref="west_gwstress" level="10" />
    643                 <field field_ref="dtoro" level="10" />
    644                 <field field_ref="dtlif" level="7" />
    645                 <field field_ref="dthin" level="7" />
    646                 <field field_ref="rsu" level="5" />
    647                 <field field_ref="rsd" level="10" />
    648                 <field field_ref="rlu" level="10" />
    649                 <field field_ref="rld" level="10" />
    650                 <field field_ref="rsucs" level="10" />
    651                 <field field_ref="rsdcs" level="10" />
    652                 <field field_ref="rlucs" level="10" />
    653                 <field field_ref="rldcs" level="10" />
    654                 <field field_ref="tnt"  level="10" />
    655                 <field field_ref="tntc" level="10" />
    656                 <field field_ref="tntr" level="10" />
    657                 <field field_ref="tntscpbl" level="10" />
    658                 <field field_ref="tnhus"    level="10" />
    659                 <field field_ref="tnhusc"   level="10" />
    660                 <field field_ref="tnhusscpbl" level="10" />
    661                 <field field_ref="evu" level="10" />
    662                 <field field_ref="h2o" level="10" />
    663                 <field field_ref="mcd" level="10" />
    664                 <field field_ref="dmc" level="10" />
    665                 <field field_ref="ref_liq" level="5" />
    666                 <field field_ref="ref_ice" level="10" />
    667                 <field field_ref="rsu4co2" level="10" />
    668                 <field field_ref="rlu4co2" level="10" />
    669                 <field field_ref="rsucs4co2" level="10" />
    670                 <field field_ref="rlucs4co2" level="10" />
    671                 <field field_ref="rsd4co2" level="10" />
    672                 <field field_ref="rld4co2" level="10" />
    673                 <field field_ref="rsdcs4co2" level="10" />
    674                 <field field_ref="rldcs4co2" level="10" />
    675             </field_group>
    676 
    677             <!-- VARS 3D -->
    678             <field_group operation="average" freq_op="1ts" grid_ref="grid_glo_spectband">
    679                 <field field_ref="solbnd" level="10" />
     601                <field field_ref="q_th" level="4" />
     602                <field field_ref="a_th" level="4" />
     603                <field field_ref="s_th" level="4" />
     604                <field field_ref="s_env" level="4" />
     605                <field field_ref="sigma_th" level="4" />
     606                <field field_ref="sigma_env" level="4" />
     607                <field field_ref="d_th" level="4" />
     608                <field field_ref="dqthe" level="4" />
     609                <field field_ref="dtajs" level="4" />
     610                <field field_ref="dqajs" level="4" />
     611                <field field_ref="dtswr" level="4" />
     612                <field field_ref="dtsw0" level="4" />
     613                <field field_ref="dtlwr" level="4" />
     614                <field field_ref="dtlw0" level="4" />
     615                <field field_ref="dtec"  level="4" />
     616                <field field_ref="duvdf" level="4" />
     617                <field field_ref="dvvdf" level="4" />
     618                <field field_ref="duoro" level="4" />
     619                <field field_ref="dvoro" level="4" />
     620                <field field_ref="dulif" level="4" />
     621                <field field_ref="dvlif" level="4" />
     622                <field field_ref="du_gwd_hines" level="4" />
     623                <field field_ref="dv_gwd_hines" level="4" />
     624                <field field_ref="du_gwd_front" level="4" />
     625                <field field_ref="dv_gwd_front" level="4" />
     626                <field field_ref="east_gwstress" level="4" />
     627                <field field_ref="west_gwstress" level="4" />
     628                <field field_ref="dtoro" level="4" />
     629                <field field_ref="dtlif" level="4" />
     630                <field field_ref="dthin" level="4" />
     631                <field field_ref="rsu" level="4" />
     632                <field field_ref="rsd" level="4" />
     633                <field field_ref="rlu" level="4" />
     634                <field field_ref="rld" level="4" />
     635                <field field_ref="rsucs" level="4" />
     636                <field field_ref="rsdcs" level="4" />
     637                <field field_ref="rlucs" level="4" />
     638                <field field_ref="rldcs" level="4" />
     639                <field field_ref="tnt"  level="4" />
     640                <field field_ref="tntc" level="4" />
     641                <field field_ref="tntr" level="4" />
     642                <field field_ref="tntscpbl" level="4" />
     643                <field field_ref="tnhus"    level="4" />
     644                <field field_ref="tnhusc"   level="4" />
     645                <field field_ref="tnhusscpbl" level="4" />
     646                <field field_ref="evu" level="4" />
     647                <field field_ref="h2o" level="4" />
     648                <field field_ref="mcd" level="4" />
     649                <field field_ref="dmc" level="4" />
     650                <field field_ref="ref_liq" level="4" />
     651                <field field_ref="ref_ice" level="4" />
     652                <field field_ref="rsu4co2" level="5" />
     653                <field field_ref="rlu4co2" level="5" />
     654                <field field_ref="rsucs4co2" level="5" />
     655                <field field_ref="rlucs4co2" level="5" />
     656                <field field_ref="rsd4co2" level="5" />
     657                <field field_ref="rld4co2" level="5" />
     658                <field field_ref="rsdcs4co2" level="5" />
     659                <field field_ref="rldcs4co2" level="5" />
    680660            </field_group>
    681661
  • LMDZ6/branches/DYNAMICO-conv/DefLists/file_def_histstn_lmdz.xml

    r3356 r3411  
    1818                <field field_ref="flat" level="10" />
    1919                <field field_ref="slp" level="10" />
    20                 <field field_ref="sza" level="10" />
    2120                <field field_ref="ptstar" level="10" />
    2221                <field field_ref="pt0" level="10" />
     
    5958                <field field_ref="ndayrain" level="10" operation="instant" />
    6059                <field field_ref="precip" level="10" />
    61                 <field field_ref="rain_fall" level="10" />
    62                 <field field_ref="rain_con" level="10" />
    6360                <field field_ref="plul" level="10" />
    6461                <field field_ref="plun" level="10" />
     
    126123                <field field_ref="fqcalving" level="10" />
    127124                <field field_ref="fqfonte" level="10" />
    128                 <field field_ref="mrroli" level="10" />
    129125                <field field_ref="runofflic" level="10" />
    130126                <field field_ref="taux" level="10" />
     
    231227                <field field_ref="proba_notrig" level="10" />
    232228                <field field_ref="random_notrig" level="10" />
    233                 <field field_ref="cv_gen" level="10" />
    234229                <field field_ref="ale_bl_stat" level="10" />
    235230                <field field_ref="ale_bl_trig" level="10" />
     
    320315                <field field_ref="l_mixmin_sic" level="10" />
    321316                <field field_ref="SWnetOR" level="10" />
     317                <field field_ref="SWdownOR" level="10" />
    322318                <field field_ref="LWdownOR" level="10" />
    323319                <field field_ref="snowl" level="10" />
     
    415411                <field field_ref="ftime_con" level="10" operation="instant" />
    416412                <field field_ref="wake_h" level="10" />
    417                 <field field_ref="wake_dens" level="10" />
    418413                <field field_ref="wake_s" level="10" />
    419414                <field field_ref="epmax" level="10" />
     
    422417                <field field_ref="lmaxth" level="10" />
    423418                <field field_ref="ftime_th" level="10" />
    424                 <field field_ref="ftime_deepcv" level="10" />
    425419                <field field_ref="f0_th" level="10" />
    426420                <field field_ref="zmax_th" level="10" />
     
    469463                <field field_ref="ocond" level="10" />
    470464                <field field_ref="geop" level="10" />
    471                 <field field_ref="geoph" level="10" />
    472465                <field field_ref="vitu" level="10" />
    473466                <field field_ref="vitv" level="10" />
     
    503496                <field field_ref="lcc3dcon" level="10" />
    504497                <field field_ref="lcc3dstra" level="10" />
    505                 <field field_ref="cldwatmxrat" level="10" />
    506                 <field field_ref="icc3dcon" level="10" />
    507                 <field field_ref="icc3dstra" level="10" />
    508                 <field field_ref="cldicemxrat" level="10" />
    509498                <field field_ref="clwcon" level="10" />
    510499                <field field_ref="Ma" level="10" />
  • LMDZ6/branches/DYNAMICO-conv/DefLists/output.def

    r3356 r3411  
    546546flag_SWnetOR      =  10, 10, 2, 10, 10   
    547547name_SWnetOR      =  SWnetOR
     548# Sfce incident SW radiation OR
     549flag_SWdownOR     =  10, 10, 2, 10, 10   
     550name_SWdownOR     =  SWdownOR
    548551# Sfce incident LW radiation OR
    549552flag_LWdownOR     =  10, 10, 2, 10, 10   
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-ES_MOON.fcm

    r3356 r3411  
    22%LINK                esmpif90
    33%AR                  esar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-IA64_PLATINE.fcm

    r3356 r3411  
    22%LINK                mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-PW6_VARGAS.fcm

    r3356 r3411  
    22%LINK                mpxlf_r
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -I/usr/local/pub/FFTW/3.2/include
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-SX8_BRODIE.fcm

    r3356 r3411  
    22%LINK                sxmpif90
    33%AR                  sxar
    4 %ARFLAGS             rs
    54%MAKE                sxgmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-SX8_MERCURE.fcm

    r3356 r3411  
    22%LINK                sxmpif90
    33%AR                  sxar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-SX9_MERCURE.fcm

    r3356 r3411  
    22%LINK                sxmpif90
    33%AR                  sxar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-X64_ADA.fcm

    r3356 r3411  
    22%LINK                mpiifort
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional -I/smplocal/pub/FFTW/3.3.3_dyn/include/
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-X64_CURIE.fcm

    r3356 r3411  
    22%LINK                mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
    76%FPP_DEF             NC_DOUBLE FFT_MKL
    87#%BASE_FFLAGS        -recursive -xHost -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64
    9 %BASE_FFLAGS         -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64
    10 %PROD_FFLAGS         -O3 -axAVX,SSE4.2 -fp-model fast=2
    11 %DEV_FFLAGS          -fp-model strict -p -g -O2 -traceback -fp-stack-check
    12 %DEBUG_FFLAGS        -fp-model strict -p -g -traceback -fp-stack-check -ftrapuv
     8%BASE_FFLAGS         -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64 -fp-model strict
     9%PROD_FFLAGS         -O2
     10%DEV_FFLAGS          -p -g -O2 -traceback -fp-stack-check
     11%DEBUG_FFLAGS        -p -g -traceback -fp-stack-check -ftrapuv
    1312%MPI_FFLAGS
    1413%OMP_FFLAGS          -openmp
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-X64_OCCIGEN.fcm

    r3356 r3411  
    22%LINK                mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-X64_TITANE.fcm

    r3356 r3411  
    22%LINK                mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-g95.fcm

    r3356 r3411  
    22%LINK                g95
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-gfortran.fcm

    r3356 r3411  
    22%LINK                gfortran
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-gfortran_CICLAD.fcm

    r3356 r3411  
    1 %COMPILER            $MPI_BIN/mpif90
    2 %LINK                $MPI_BIN/mpif90
     1%COMPILER            /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90
     2%LINK                /usr/lib64/openmpi/1.4.5-gfortran/bin/mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
    76%FPP_DEF             NC_DOUBLE
    8 %BASE_FFLAGS         -c -fdefault-real-8 -fcray-pointer -frecursive -ffree-line-length-0 -fno-align-commons
     7%BASE_FFLAGS         -c -fdefault-real-8 -fcray-pointer -frecursive
    98%PROD_FFLAGS         -O3
    109%DEV_FFLAGS          -O -Wall -fbounds-check
    11 %DEBUG_FFLAGS        -ffpe-trap=invalid,zero,overflow -Wall -fbounds-check -g3 -O0 -fstack-protector-all -fbacktrace
     10%DEBUG_FFLAGS        -ffpe-trap=invalid,zero,overflow -Wall -fbounds-check -g3 -O0 -fstack-protector-all
    1211%MPI_FFLAGS
    1312%OMP_FFLAGS          -fopenmp
    14 %BASE_LD             -Wl,-rpath=$NETCDF_HOME/lib
     13%BASE_LD             -Wl,-rpath=/opt/netcdf42/gfortran/lib
    1514%MPI_LD
    1615%OMP_LD              -fopenmp
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-gfortran_CICLAD.path

    r3356 r3411  
    1 NETCDF_LIBDIR="-L${NETCDF_HOME}/lib -lnetcdf -lnetcdff"
    2 NETCDF_INCDIR=-I${NETCDF_HOME}/include
     1NETCDF_LIBDIR="-L/opt/netcdf42/gfortran/lib -lnetcdf -lnetcdff"
     2NETCDF_INCDIR=-I/opt/netcdf42/gfortran/include
    33IOIPSL_INCDIR=$LMDGCM/../../lib
    44IOIPSL_LIBDIR=$LMDGCM/../../lib
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-ifort_CICLAD.fcm

    r3356 r3411  
    1 %COMPILER            $MPI_BIN/mpif90
    2 %LINK                $MPI_BIN/mpif90
     1%COMPILER            /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90
     2%LINK                /usr/lib64/openmpi/1.4.5-ifort/bin/mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
     
    109%DEV_FFLAGS          -p -g -O1 -fpe0 -traceback
    1110%DEBUG_FFLAGS        -p -g -O0 -fpe-all=0 -traceback -ftrapuv -fp-stack-check -check bounds,format,output_conversion,pointers,uninit -debug
    12 %MPI_FFLAGS         
     11%MPI_FFLAGS          -I/usr/lib64/openmpi/1.4.5-ifort/include
    1312%OMP_FFLAGS          -openmp
    14 %BASE_LD             -Wl,-rpath=$NETCDF_HOME/lib -L/opt/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
    15 %MPI_LD             
     13%BASE_LD             -Wl,-rpath=/opt/netcdf42/ifort/lib
     14%MPI_LD              -L/usr/lib64/openmpi/1.4.5-ifort/lib -lmpi -L/opt/intel/composer_xe_2011_sp1.9.293/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
    1615%OMP_LD              -openmp
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-ifort_CICLAD.path

    r3356 r3411  
    1 NETCDF_LIBDIR="-L${NETCDF_HOME}/lib -lnetcdf -lnetcdff"
    2 NETCDF_INCDIR=-I${NETCDF_HOME}/include
     1NETCDF_LIBDIR="-L/opt/netcdf42/ifort/lib -lnetcdf -lnetcdff"
     2NETCDF_INCDIR=-I/opt/netcdf42/ifort/include
    33IOIPSL_INCDIR=$LMDGCM/../../lib
    44IOIPSL_LIBDIR=$LMDGCM/../../lib
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-ifort_LSCE.fcm

    r3356 r3411  
    22%LINK                mpif90
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                gmake
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/arch/arch-linux-32bit.fcm

    r3356 r3411  
    22%LINK                pgf95
    33%AR                  ar
    4 %ARFLAGS             rs
    54%MAKE                make
    65%FPP_FLAGS           -P -traditional
  • LMDZ6/branches/DYNAMICO-conv/bld.cfg

    r3356 r3411  
    5555bld::tool::ld        %LINK
    5656bld::tool::ar        %AR
    57 bld::tool::arflags   %ARFLAGS
    5857bld::tool::make      %MAKE
    5958bld::tool::fflags    %FFLAGS %INCDIR
  • LMDZ6/branches/DYNAMICO-conv/create_make_gcm

    r3356 r3411  
    6868echo 'L_MISC    = -lmisc'
    6969echo 'L_ADJNT    ='
     70echo 'L_COSP     = -lcosp'
    7071
    7172echo
     
    7778   echo 'COMPILE90 = $(F90) $(OPTIM90) $(INCLUDE) -c'
    7879   echo 'COMPTRU90 = $(F90) $(OPTIMTRU90) $(INCLUDE) -c'
    79    echo 'LINK    = $(LINK)'
    80    echo 'AR      = $(AR)'
    81    echo 'ARFLAGS   = $(ARFLAGS)'
     80   echo "LINK    = $LINK"
     81   echo "AR      = $AR"
    8282echo
    8383echo
     
    9797echo '  cd $(LOCAL_DIR); \'
    9898echo '  $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \'
    99 echo '  $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_DYN_PHY) $(L_ADJNT) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_MISC) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '
     99echo '  $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_DYN_PHY) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_MISC) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o '
    100100echo
    101101echo 'phys : $(LIBPHY)'
     
    112112echo
    113113echo 'adjnt : $(LIBO)/libadjnt.a'
     114echo
     115echo 'cosp : $(LIBO)/libcosp.a'
    114116echo
    115117echo '$(FILTRE)3d : $(LIBO)/lib$(FILTRE).a'
     
    227229         # object from library
    228230         echo ' cd $(LIBO); \'
    229          echo ' $(AR) -d $(LIBO)/lib'$topdiri'.a '$fili'.o ; \'
     231         echo ' $(AR) d $(LIBO)/lib'$topdiri'.a '$fili'.o ; \'
    230232         if [ "$F90" -eq '0' ] ; then
    231233         ## Fixed Form Fortran 77
     
    241243         fi
    242244         # Put generated object in library
    243          echo ' $(AR) $(ARFLAGS) $(LIBO)/lib'$topdiri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
     245         echo ' $(AR) r $(LIBO)/lib'$topdiri'.a '$fili'.o ; $(RM) '$fili'.o ; \'
    244246         echo
    245247      done
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3d/guide_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3d/ini_paramLMDZ_dyn.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3d/write_paramLMDZ_dyn.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3d_common/invert_lat.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3dpar/guide_p_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90

    r3356 r3411  
    4646  USE ioipsl_getin_p_mod, ONLY: getin_p
    4747  USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom
    48 #ifdef REPROBUS
    49   USE CHEM_REP, ONLY : Init_chem_rep_phys
    50 #endif
    5148  IMPLICIT NONE
    5249
     
    181178          rlonudyn,rlatudyn,rlonvdyn,rlatvdyn)
    182179#endif
    183     IF (type_trac == 'repr') THEN
    184 #ifdef REPROBUS
    185        CALL Init_chem_rep_phys(klon_omp,nbp_lev)
    186 #endif
    187     END IF
    188180  END IF
    189181
  • LMDZ6/branches/DYNAMICO-conv/libf/dynphy_lonlat/phylmd/limit_netcdf.F90

    r3356 r3411  
    2727  USE init_ssrf_m,        ONLY: start_init_subsurf
    2828
    29   INTEGER,           PARAMETER :: ns=256
    30   CHARACTER(LEN=ns), PARAMETER :: &
     29  CHARACTER(LEN=20), PARAMETER :: &
    3130  fsst(5)=['amipbc_sst_1x1.nc   ','amip_sst_1x1.nc     ','cpl_atm_sst.nc      '&
    32           ,'histmth_sst.nc      ','sstk.nc             '],                     &
     31          ,'histmth_sst.nc      ','sstk.nc             ']
     32  CHARACTER(LEN=20), PARAMETER :: &
    3333  fsic(5)=['amipbc_sic_1x1.nc   ','amip_sic_1x1.nc     ','cpl_atm_sic.nc      '&
    34           ,'histmth_sic.nc      ','ci.nc               '],                     &
     34          ,'histmth_sic.nc      ','ci.nc               ']
     35  CHARACTER(LEN=10), PARAMETER :: &
    3536  vsst(5)=['tosbcs    ','tos       ','SISUTESW  ','tsol_oce  ','sstk      '],  &
    36   vsic(5)=['sicbcs    ','sic       ','SIICECOV  ','pourc_sic ','ci        '],  &
    37   frugo='Rugos.nc  ', falbe='Albedo.nc ', frelf='Relief.nc ',                  &
    38    vrug='RUGOS     ',  valb='ALBEDO    ',  vrel='RELIEF    ',                  &
    39   DegK(11)=['degK          ','degree_K      ','degreeK       ','deg_K         '&
    40            ,'degsK         ','degrees_K     ','degreesK      ','degs_K        '&
    41            ,'degree_kelvin ','degrees_kelvin','K             '],               &
    42   DegC(10)=['degC          ','degree_C      ','degreeC       ','deg_C         '&
    43            ,'degsC         ','degrees_C     ','degreesC      ','degs_C        '&
    44            ,'degree_Celsius','celsius       '], &
    45   Perc(2) =['%             ','percent       '], &
    46   Frac(2) =['1.0           ','1             ']
     37  vsic(5)=['sicbcs    ','sic       ','SIICECOV  ','pourc_sic ','ci        ']
     38  CHARACTER(LEN=10), PARAMETER :: &
     39  frugo='Rugos.nc  ', falbe='Albedo.nc ', frelf='Relief.nc ',    &
     40   vrug='RUGOS     ',  valb='ALBEDO    ',  vrel='RELIEF    '
    4741
    4842CONTAINS
     
    9286  include "comgeom2.h"
    9387
    94 !--- INPUT NETCDF FILES AND VARIABLES NAMES ------------------------------------
    95   CHARACTER(LEN=ns) :: icefile, sstfile, fnam, varname
     88!--- INPUT NETCDF FILES NAMES --------------------------------------------------
     89  CHARACTER(LEN=20) :: icefile, sstfile, dumstr, fnam
     90  CHARACTER(LEN=10) :: varname
    9691
    9792!--- OUTPUT VARIABLES FOR NETCDF FILE ------------------------------------------
    98   REAL               :: fi_ice(klon)
     93  REAL               :: fi_ice(klon), verif(klon)
    9994  REAL, POINTER      :: phy_rug(:,:)=>NULL(), phy_ice(:,:)=>NULL()
    10095  REAL, POINTER      :: phy_sst(:,:)=>NULL(), phy_alb(:,:)=>NULL()
     
    10398
    10499!--- VARIABLES FOR OUTPUT FILE WRITING -----------------------------------------
    105   INTEGER :: nid, ndim, ntim, k, dims(2), ix_sic, ix_sst
     100  INTEGER :: ierr, nid, ndim, ntim, k, dims(2), ix_sic, ix_sst
    106101  INTEGER :: id_tim,  id_SST,  id_BILS, id_RUG, id_ALB
    107102  INTEGER :: id_FOCE, id_FSIC, id_FTER, id_FLIC, varid_longitude, varid_latitude
    108103  INTEGER :: NF90_FORMAT
    109104  INTEGER :: ndays                   !--- Depending on the output calendar
    110   CHARACTER(LEN=ns) :: str
     105  CHARACTER(LEN=256) :: str
    111106
    112107!--- INITIALIZATIONS -----------------------------------------------------------
     
    341336! Arguments:
    342337  CHARACTER(LEN=*),  INTENT(IN)     :: fnam     ! NetCDF file name
    343   CHARACTER(LEN=*), INTENT(IN)     :: varname  ! NetCDF variable name
    344   CHARACTER(LEN=*),  INTENT(IN)     :: mode     ! RUG, SIC, SST or ALB
     338  CHARACTER(LEN=10), INTENT(IN)     :: varname  ! NetCDF variable name
     339  CHARACTER(LEN=3),  INTENT(IN)     :: mode     ! RUG, SIC, SST or ALB
    345340  INTEGER,           INTENT(IN)     :: ndays    ! current year number of days
    346341  REAL,    POINTER,  DIMENSION(:, :) :: champo  ! output field = f(t)
     
    351346!--- NetCDF
    352347  INTEGER           :: ncid, varid        ! NetCDF identifiers
    353   CHARACTER(LEN=ns) :: dnam               ! dimension name
     348  CHARACTER(LEN=30) :: dnam               ! dimension name
    354349!--- dimensions
    355350  INTEGER           :: dids(4)            ! NetCDF dimensions identifiers
     
    365360  REAL, ALLOCATABLE :: champan(:,:,:)
    366361!--- input files
    367   CHARACTER(LEN=ns) :: fnam_m, fnam_p     ! previous/next files names
    368   CHARACTER(LEN=ns) :: cal_in             ! calendar
    369   CHARACTER(LEN=ns) :: units              ! attribute "units" in sic/sst file
     362  CHARACTER(LEN=20) :: fnam_m, fnam_p     ! previous/next files names
     363  CHARACTER(LEN=20) :: cal_in             ! calendar
     364  CHARACTER(LEN=20) :: unit_sic           ! attribute "units" in sea-ice file
     365  CHARACTER(LEN=20) :: unit_sst           ! attribute "units" in sst     file
    370366  INTEGER           :: ndays_in           ! number of days
    371   REAL              :: value              ! mean/max value near equator
    372367!--- misc
    373   INTEGER           :: i, j, k, l         ! loop counters
     368  INTEGER           :: i, j, k, l, ll     ! loop counters
    374369  REAL, ALLOCATABLE :: work(:,:)          ! used for extrapolation
    375   CHARACTER(LEN=ns) :: title, mess        ! for messages
     370  CHARACTER(LEN=128):: title, mess        ! for messages
    376371  LOGICAL           :: is_bcs             ! flag for BCS data
    377372  LOGICAL           :: extrp              ! flag for extrapolation
    378   LOGICAL           :: ll
    379373  REAL              :: chmin, chmax, timeday, al
    380374  INTEGER ierr, idx
     
    401395  CALL ncerr(NF90_INQ_VARID(ncid, trim(varname), varid),fnam)
    402396  CALL ncerr(NF90_INQUIRE_VARIABLE(ncid, varid, dimids=dids),fnam)
     397
     398!--- Read unit for sea-ice and sst only
     399  IF (mode=='SIC') THEN
     400    ierr=NF90_GET_ATT(ncid, varid, 'units', unit_sic); CALL strclean(unit_sic)
     401    IF(ierr/=NF90_NOERR) THEN; unit_sic='%'
     402      CALL msg(0,'No unit in sea-ice file. Take percentage as default value')
     403    ELSE IF(TRIM(unit_sic)=="%") THEN
     404      CALL msg(0,'Sea-ice cover is a PERCENTAGE.')
     405    ELSE IF(ANY(unit_sic==["1.0","1  "])) THEN; unit_sic="1"
     406      CALL msg(0,'Sea-ice cover is a FRACTION.')
     407    ELSE
     408      CALL abort_physic('SIC','Unrecognized sea-ice unit: '//TRIM(unit_sic),1)
     409    END IF
     410  END IF
     411  IF (mode=='SST') THEN
     412    ierr=NF90_GET_ATT(ncid, varid, 'units', unit_sst); CALL strclean(unit_sst)
     413    IF(ierr/=NF90_NOERR) THEN
     414      CALL msg(0,'No unit in sst file. Take default: kelvins.')
     415      unit_sst='X'
     416    ELSE IF(ANY(unit_sst==["degC  ","DegC  "])) THEN; unit_sst='C'
     417      CALL msg(0,'Sea-surface temperature is in CELCIUS DEGREES.')
     418    ELSE IF(ANY(unit_sst==["K     ","Kelvin"])) THEN; unit_sst='K'
     419      CALL msg(0,'Sea-surface temperature is in KELVINS.')
     420    ELSE
     421      CALL abort_physic('SST','Unrecognized sst unit: '//TRIM(unit_sst),1)
     422    END IF
     423  END IF
    403424
    404425!--- Longitude
     
    456477  DO l=1, lmdep
    457478    CALL ncerr(NF90_GET_VAR(ncid,varid,champ,[1,1,l],[imdep,jmdep,1]),fnam)
     479    !--- Check whether values are acceptable for SIC, depending on unit.
     480    !--- Dropped for mid-month boundary conditions datasets (BCS, ix_sic==1)
     481    IF(mode=='SIC'.AND.ix_sic/=1) THEN
     482      IF(TRIM(unit_sic)=="1".OR.TRIM(unit_sic)=="1.0") THEN
     483        IF(ANY(champ>1.0+EPSFRA)) &
     484          CALL abort_physic('SIC','Found sea-ice fractions greater than 1.')
     485      ELSE IF(TRIM(unit_sic)=="%") THEN
     486        IF(ANY(champ>100.0+EPSFRA)) &
     487          CALL abort_physic('SIC','Found sea-ice percentages greater than 100.')
     488!        IF(MAXVAL(champ)< 1.01) &
     489!          CALL abort_physic('SIC','All sea-ice percentages lower than 1.')
     490      END IF
     491    END IF
    458492    CALL conf_dat2d(title, dlon_ini, dlat_ini, dlon, dlat, champ, .TRUE.)
    459 
    460     !--- FOR SIC/SST FIELDS ONLY
    461     IF(l==1.AND.is_in(mode,['SIC','SST'])) THEN
    462 
    463       !--- DETERMINE THE UNIT: READ FROM FILE OR ASSUMED USING FIELD VALUES
    464       ierr=NF90_GET_ATT(ncid, varid, 'units', units)
    465       IF(ierr==NF90_NOERR) THEN !--- ATTRIBUTE "units" FOUND IN THE FILE
    466         CALL strclean(units)
    467         IF(mode=='SIC'.AND.is_in(units,Perc)) units="%"
    468         IF(mode=='SIC'.AND.is_in(units,Frac)) units="1"
    469         IF(mode=='SST'.AND.is_in(units,DegC)) units="C"
    470         IF(mode=='SST'.AND.is_in(units,DegK)) units="K"
    471       ELSE                      !--- CHECK THE FIELD VALUES
    472         IF(mode=='SIC') value=MAXVAL(champ(:,:))
    473         IF(mode=='SST') value=   SUM(champ(:,jmdep/2),DIM=1)/REAL(imdep)
    474         IF(mode=='SIC') THEN; units="1"; IF(value>= 10.) units="%"; END IF
    475         IF(mode=='SST') THEN; units="C"; IF(value>=100.) units="K"; END IF
    476       END IF
    477       CALL msg(0,'INPUT FILE '//TRIM(title)//' UNIT IS: "'//TRIM(units)//'".')
    478       IF(ierr/=NF90_NOERR) CALL msg(0,'WARNING ! UNIT TO BE CHECKED ! '      &
    479         //'No "units" attribute, so only based on the fields values.')
    480 
    481       !--- CHECK VALUES ARE IN THE EXPECTED RANGE
    482       SELECT CASE(units)
    483         CASE('%'); ll=ANY(champ>100.0+EPSFRA); str='percentages > 100.'
    484         CASE('1'); ll=ANY(champ>  1.0+EPSFRA); str='fractions > 1.'
    485         CASE('C'); ll=ANY(champ<-100.).OR.ANY(champ> 60.); str='<-100 or >60 DegC'
    486         CASE('K'); ll=ANY(champ< 180.).OR.ANY(champ>330.); str='<180 or >330 DegK'
    487         CASE DEFAULT; CALL abort_physic(mode, 'Unrecognized '//TRIM(title)   &
    488                                                   //' unit: '//TRIM(units),1)
    489       END SELECT
    490 
    491       !--- DROPPED FOR BCS DATA (FRACTIONS CAN BE HIGHER THAN 1)
    492       IF(ll.AND.ix_sic/=1.AND.mode=='SIC') &
    493         CALL abort_physic(mode,'unrealistic '//TRIM(mode)//' found: '//TRIM(str))
    494 
    495     END IF
    496 
    497493    IF(extrp) CALL extrapol(champ,imdep,jmdep,999999.,.TRUE.,.TRUE.,2,work)
    498494    IF(l==1) THEN
    499       CALL msg(5,"--------------------------------------------------------")
    500       CALL msg(5,"$$$ Barycentric interpolation for "//TRIM(title)//" $$$")
    501       CALL msg(5,"--------------------------------------------------------")
     495      CALL msg(5,"----------------------------------------------------------")
     496      CALL msg(5,"$$$ Barycentrique interpolation for "//TRIM(title)//" $$$")
     497      CALL msg(5,"----------------------------------------------------------")
    502498    END IF
    503499    IF(mode=='RUG') champ=LOG(champ)
     
    571567        IF(.NOT.is_bcs) WRITE(lunout, *)'SPLINES TIME INTERPOLATION.'
    572568        WRITE(lunout, *)' Input time vector: ', timeyear
    573         WRITE(lunout, *)' Output time vector: from 0.5 to ', ndays-0.5
     569        WRITE(lunout, *)' Output time vector from 0 to ', ndays-1
    574570     END IF
    575571  END IF
     
    618614!--- SPECIAL FILTER FOR SST: SST>271.38 --------------------------------------
    619615  IF(mode=='SST') THEN
    620     SELECT CASE(units)
    621       CASE("K"); CALL msg(0,'SST field is already in kelvins.')
    622       CASE("C"); CALL msg(0,'SST field converted from celcius degrees to kelvins.')
    623       champan(:, :, :)=champan(:, :, :)+273.15
    624     END SELECT
    625     CALL msg(0,'Filtering SST: Sea Surface Temperature >= 271.38')
     616    IF(TRIM(unit_sst)=="K") THEN
     617       ! Nothing to be done if the sst field is already in kelvins
     618      CALL msg(0,'SST field is already in kelvins.')
     619    ELSE
     620       ! Convert sst field from celcius degrees to kelvins
     621      CALL msg(0,'SST field converted from celcius degrees to kelvins.')
     622      champan=champan+273.15
     623    END IF
     624    CALL msg(0,'Filtering SST: SST >= 271.38')
    626625    WHERE(champan<271.38) champan=271.38
    627626  END IF
     
    629628!--- SPECIAL FILTER FOR SIC: 0.0<SIC<1.0 -------------------------------------
    630629  IF(mode=='SIC') THEN
    631     SELECT CASE(units)
    632       CASE("1"); CALL msg(0,'SIC field already in fraction of 1')
    633       CASE("%"); CALL msg(0,'SIC field converted from percentage to fraction of 1.')
     630    CALL msg(0,'Filtering SIC: 0.0 < Sea-ice < 1.0')
     631    IF(TRIM(unit_sic)=="1") THEN
     632       ! Nothing to be done if the sea-ice field is already in fraction of 1
     633       ! This is the case for sea-ice in file cpl_atm_sic.nc
     634       CALL msg(0,'Sea-ice field already in fraction of 1')
     635    ELSE
     636       ! Convert sea ice from percentage to fraction of 1
     637       CALL msg(0,'Sea-ice field converted from percentage to fraction of 1.')
    634638       champan(:, :, :)=champan(:, :, :)/100.
    635     END SELECT
    636     CALL msg(0,'Filtering SIC: 0.0 <= Sea-ice <=1.0')
     639    END IF
     640    champan(iip1, :, :)=champan(1, :, :)
    637641    WHERE(champan>1.0) champan=1.0
    638642    WHERE(champan<0.0) champan=0.0
     
    666670!-------------------------------------------------------------------------------
    667671! Local variables:
    668   CHARACTER(LEN=ns) :: modname="start_init_orog0"
     672  CHARACTER(LEN=256) :: modname="start_init_orog0"
    669673  INTEGER            :: fid, llm_tmp,ttm_tmp, iml,jml, iml_rel,jml_rel, itau(1)
    670674  REAL               :: lev(1), date, dt, deg2rad
     
    785789!-------------------------------------------------------------------------------
    786790
    787 
    788 !-------------------------------------------------------------------------------
    789 !
    790 FUNCTION is_in(s1,s2) RESULT(res)
    791 !
    792 !-------------------------------------------------------------------------------
    793   IMPLICIT NONE
    794 !-------------------------------------------------------------------------------
    795 ! Purpose: Check wether s1 is present in the s2(:) list (case insensitive).
    796 !-------------------------------------------------------------------------------
    797 ! Arguments:
    798   CHARACTER(LEN=*), INTENT(IN) :: s1, s2(:)
    799   LOGICAL                      :: res
    800 !-------------------------------------------------------------------------------
    801   res=.FALSE.; DO k=1,SIZE(s2); res=res.OR.strLow(s1)==strLow(s2(k)); END DO
    802 
    803 END FUNCTION is_in
    804 !
    805 !-------------------------------------------------------------------------------
    806 
    807 
    808 !-------------------------------------------------------------------------------
    809 !
    810 ELEMENTAL FUNCTION strLow(s) RESULT(res)
    811 !
    812 !-------------------------------------------------------------------------------
    813   IMPLICIT NONE
    814 !-------------------------------------------------------------------------------
    815 ! Purpose: Lower case conversion.
    816 !-------------------------------------------------------------------------------
    817 ! Arguments:
    818   CHARACTER(LEN=*), INTENT(IN) :: s
    819   CHARACTER(LEN=ns)            :: res
    820 !-------------------------------------------------------------------------------
    821 ! Local variable:
    822   INTEGER :: k, ix
    823 !-------------------------------------------------------------------------------
    824   res=s
    825   DO k=1,LEN(s); ix=IACHAR(s(k:k))
    826     IF(64<ix.AND.ix<91) res(k:k)=ACHAR(ix+32)
    827   END DO
    828 
    829 END FUNCTION strLow
    830 !
    831 !-------------------------------------------------------------------------------
    832 
    833791#endif
    834792! of #ifndef CPP_1D
  • LMDZ6/branches/DYNAMICO-conv/libf/misc/regr_conserv_m.F90

    r3356 r3411  
    8484    IF(a==xt(it  )) co=co+xt(it  )-xs(is  )
    8585    IF(b==xt(it+1)) co=co+xt(it+1)-xs(is+1)
    86     vt(it) = vt(it)+idt*(b-a)*(vs(is)+co*slope(is)/2.)
     86    vt(it) = vt(it)+idt*(b-a)*(vs(is)+co*slope(is))
    8787  ELSE
    8888    vt(it) = vt(it)+idt*(b-a)* vs(is)
     
    142142    IF(a==xt(it  )) co=co+xt(it  )-xs(is  )
    143143    IF(b==xt(it+1)) co=co+xt(it+1)-xs(is+1)
    144     IF(ix==1) vt(it,:) = vt(it,:)+idt*(b-a)*(vs(is,:)+co*slope(is,:)/2.)
    145     IF(ix==2) vt(:,it) = vt(:,it)+idt*(b-a)*(vs(:,is)+co*slope(:,is)/2.)
     144    IF(ix==1) vt(it,:) = vt(it,:)+idt*(b-a)*(vs(is,:)+co*slope(is,:))
     145    IF(ix==2) vt(:,it) = vt(:,it)+idt*(b-a)*(vs(:,is)+co*slope(:,is))
    146146  ELSE
    147147    IF(ix==1) vt(it,:) = vt(it,:)+idt*(b-a)* vs(is,:)
     
    202202    IF(a==xt(it  )) co=co+xt(it  )-xs(is  )
    203203    IF(b==xt(it+1)) co=co+xt(it+1)-xs(is+1)
    204     IF(ix==1) vt(it,:,:) = vt(it,:,:)+idt*(b-a)*(vs(is,:,:)+co*slope(is,:,:)/2.)
    205     IF(ix==2) vt(:,it,:) = vt(:,it,:)+idt*(b-a)*(vs(:,is,:)+co*slope(:,is,:)/2.)
    206     IF(ix==3) vt(:,:,it) = vt(:,:,it)+idt*(b-a)*(vs(:,:,is)+co*slope(:,:,is)/2.)
     204    IF(ix==1) vt(it,:,:) = vt(it,:,:)+idt*(b-a)*(vs(is,:,:)+co*slope(is,:,:))
     205    IF(ix==2) vt(:,it,:) = vt(:,it,:)+idt*(b-a)*(vs(:,is,:)+co*slope(:,is,:))
     206    IF(ix==3) vt(:,:,it) = vt(:,:,it)+idt*(b-a)*(vs(:,:,is)+co*slope(:,:,is))
    207207  ELSE
    208208    IF(ix==1) vt(it,:,:) = vt(it,:,:)+idt*(b-a)* vs(is,:,:)
     
    264264    IF(a==xt(it  )) co=co+xt(it  )-xs(is  )
    265265    IF(b==xt(it+1)) co=co+xt(it+1)-xs(is+1)
    266     IF(ix==1) vt(it,:,:,:) = vt(it,:,:,:)+idt*(b-a)*(vs(is,:,:,:)+co*slope(is,:,:,:)/2.)
    267     IF(ix==2) vt(:,it,:,:) = vt(:,it,:,:)+idt*(b-a)*(vs(:,is,:,:)+co*slope(:,is,:,:)/2.)
    268     IF(ix==3) vt(:,:,it,:) = vt(:,:,it,:)+idt*(b-a)*(vs(:,:,is,:)+co*slope(:,:,is,:)/2.)
    269     IF(ix==4) vt(:,:,:,it) = vt(:,:,:,it)+idt*(b-a)*(vs(:,:,:,is)+co*slope(:,:,:,is)/2.)
     266    IF(ix==1) vt(it,:,:,:) = vt(it,:,:,:)+idt*(b-a)*(vs(is,:,:,:)+co*slope(is,:,:,:))
     267    IF(ix==2) vt(:,it,:,:) = vt(:,it,:,:)+idt*(b-a)*(vs(:,is,:,:)+co*slope(:,is,:,:))
     268    IF(ix==3) vt(:,:,it,:) = vt(:,:,it,:)+idt*(b-a)*(vs(:,:,is,:)+co*slope(:,:,is,:))
     269    IF(ix==4) vt(:,:,:,it) = vt(:,:,:,it)+idt*(b-a)*(vs(:,:,:,is)+co*slope(:,:,:,is))
    270270  ELSE
    271271    IF(ix==1) vt(it,:,:,:) = vt(it,:,:,:)+idt*(b-a)* vs(is,:,:,:)
     
    328328    IF(a==xt(it  )) co=co+xt(it  )-xs(is  )
    329329    IF(b==xt(it+1)) co=co+xt(it+1)-xs(is+1)
    330     IF(ix==1) vt(it,:,:,:,:) = vt(it,:,:,:,:)+idt*(b-a)*(vs(is,:,:,:,:)+co*slope(is,:,:,:,:)/2.)
    331     IF(ix==2) vt(:,it,:,:,:) = vt(:,it,:,:,:)+idt*(b-a)*(vs(:,is,:,:,:)+co*slope(:,is,:,:,:)/2.)
    332     IF(ix==3) vt(:,:,it,:,:) = vt(:,:,it,:,:)+idt*(b-a)*(vs(:,:,is,:,:)+co*slope(:,:,is,:,:)/2.)
    333     IF(ix==4) vt(:,:,:,it,:) = vt(:,:,:,it,:)+idt*(b-a)*(vs(:,:,:,is,:)+co*slope(:,:,:,is,:)/2.)
    334     IF(ix==5) vt(:,:,:,:,it) = vt(:,:,:,:,it)+idt*(b-a)*(vs(:,:,:,:,is)+co*slope(:,:,:,:,is)/2.)
     330    IF(ix==1) vt(it,:,:,:,:) = vt(it,:,:,:,:)+idt*(b-a)*(vs(is,:,:,:,:)+co*slope(is,:,:,:,:))
     331    IF(ix==2) vt(:,it,:,:,:) = vt(:,it,:,:,:)+idt*(b-a)*(vs(:,is,:,:,:)+co*slope(:,is,:,:,:))
     332    IF(ix==3) vt(:,:,it,:,:) = vt(:,:,it,:,:)+idt*(b-a)*(vs(:,:,is,:,:)+co*slope(:,:,is,:,:))
     333    IF(ix==4) vt(:,:,:,it,:) = vt(:,:,:,it,:)+idt*(b-a)*(vs(:,:,:,is,:)+co*slope(:,:,:,is,:))
     334    IF(ix==5) vt(:,:,:,:,it) = vt(:,:,:,:,it)+idt*(b-a)*(vs(:,:,:,:,is)+co*slope(:,:,:,:,is))
    335335  ELSE
    336336    IF(ix==1) vt(it,:,:,:,:) = vt(it,:,:,:,:)+idt*(b-a)* vs(is,:,:,:,:)
  • LMDZ6/branches/DYNAMICO-conv/libf/misc/wxios.F90

    r3356 r3411  
    301301        CALL xios_set_domain_attr_hdl(dom, nj_glo=nbp_lat, jbegin=jj_begin-1, nj=jj_nb, data_dim=2)
    302302        CALL xios_set_domain_attr_hdl(dom, lonvalue_1d=io_lon(1:nbp_lon), latvalue_1d=io_lat(jj_begin:jj_end))
    303 
    304         !On definit un axe de latitudes pour les moyennes zonales
    305         IF (xios_is_valid_axis("axis_lat")) THEN
    306            CALL xios_set_axis_attr( "axis_lat", n_glo=nbp_lat, n=jj_nb, begin=jj_begin-1, value=io_lat(jj_begin:jj_end))
    307         ENDIF
    308303
    309304        IF (.NOT.is_sequential) THEN
  • LMDZ6/branches/DYNAMICO-conv/libf/phy_common/regular_lonlat_mod.F90

    r3356 r3411  
    2020  REAL,SAVE,ALLOCATABLE :: lat_reg(:)      ! value of longitude cell (rad)
    2121
    22   REAL,SAVE,ALLOCATABLE :: boundslon_reg(:,:)      ! value of boundaries cell (1=>west, 2=>east)(rad)
     22  REAL,SAVE,ALLOCATABLE :: boundslon_reg(:,:)      ! value of boundaries cell (1=>east, 2=>west)(rad)
    2323
    2424  REAL,SAVE,ALLOCATABLE :: boundslat_reg(:,:)      ! value of longitude cell (1=>north, 2=>south)(rad)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/Dust/phys_output_write_spl_mod.F90

    r3356 r3411  
    155155         o_rh2m, o_rh2m_min, o_rh2m_max, &
    156156         o_qsat2m, o_tpot, o_tpote, o_SWnetOR, &
    157          o_LWdownOR, o_snowl, &
     157         o_SWdownOR, o_LWdownOR, o_snowl, &
    158158         o_solldown, o_dtsvdfo, o_dtsvdft, &
    159159         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od550aer, &
     
    982982       IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)
    983983       CALL histwrite_phy(o_SWnetOR,  zx_tmp_fi2d)
     984       IF (vars_defined) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon))
     985       CALL histwrite_phy(o_SWdownOR,  zx_tmp_fi2d)
    984986       CALL histwrite_phy(o_LWdownOR, sollwdown)
    985987       CALL histwrite_phy(o_snowl, snow_lsc)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/aerophys.F90

    r3356 r3411  
    22!
    33MODULE aerophys
    4 !
    5   IMPLICIT NONE
    64!
    75  REAL,PARAMETER                         :: ropx=1500.0              ! default aerosol particle mass density [kg/m3]
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/interp_sulf_input.F90

    r3356 r3411  
    3232  INTEGER, SAVE :: n_lev   ! number of levels in the input data
    3333  INTEGER n_mth   ! number of months in the input data
     34  REAL OCS_tmp, SO2_tmp
    3435  INTEGER, SAVE :: mth_pre
    3536!$OMP THREADPRIVATE(mth_pre)
     
    237238    DO k=1, klev
    238239      !
    239       !--OCS and SO2 prescribed back to their clim values below p_bound
     240      OCS_tmp=tr_seri(i,k,id_OCS_strat)
     241      SO2_tmp=tr_seri(i,k,id_SO2_strat)
     242      !--OCS and SO2 prescribed below p_bound
    240243      IF (paprs(i,k).GT.p_bound) THEN
    241         budg_3D_backgr_ocs(i,k)=OCS_clim(i,k)-tr_seri(i,k,id_OCS_strat)
    242         budg_3D_backgr_so2(i,k)=SO2_clim(i,k)-tr_seri(i,k,id_SO2_strat)
    243244        tr_seri(i,k,id_OCS_strat)=OCS_clim(i,k)
    244245        tr_seri(i,k,id_SO2_strat)=SO2_clim(i,k)
    245246      ENDIF
     247      budg_3D_backgr_ocs(i,k)=tr_seri(i,k,id_OCS_strat)-OCS_tmp
     248      budg_3D_backgr_so2(i,k)=tr_seri(i,k,id_SO2_strat)-SO2_tmp
    246249    ENDDO
    247250  ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/micphy_tstep.F90

    r3356 r3411  
    44  USE aerophys
    55  USE infotrac
    6   USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, budg_h2so4_to_part, R2SO4, DENSO4, f_r_wet
     6  USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, R2SO4, DENSO4, f_r_wet
    77  USE nucleation_tstep_mod
    88  USE cond_evap_tstep_mod
     
    2525  ! local variables in coagulation routine
    2626  INTEGER, PARAMETER        :: nbtstep=4  ! Max number of time steps in microphysics per time step in physics
    27   INTEGER                   :: it,ilon,ilev,count_tstep
     27  INTEGER                   :: it,ilon,ilev,IK,count_tstep
    2828  REAL                      :: rhoa !H2SO4 number density [molecules/cm3]
    2929  REAL                      :: ntot !total number of molecules in the critical cluster (ntot>4)
     
    4343  REAL H2SO4_sat(nbtr_bin)
    4444
    45   DO it=1,nbtr_bin
    46     Vbin(it)=4.0*RPI*((mdw(it)/2.)**3)/3.0
     45  DO IK=1,nbtr_bin
     46    Vbin(IK)=4.0*RPI*((mdw(IK)/2.)**3)/3.0
    4747  ENDDO
    4848
     
    6464
    6565  DO ilon=1, klon
    66 !
    67 !--initialisation of diagnostic
    68   budg_h2so4_to_part(ilon)=0.0
    69 !
    7066  DO ilev=1, klev
    71 !
    72 !--initialisation of diagnostic
    73   budg_3D_nucl(ilon,ilev)=0.0
    74   budg_3D_cond_evap(ilon,ilev)=0.0
    75 !
    7667  ! only in the stratosphere
    7768  IF (is_strato(ilon,ilev)) THEN
    7869    ! initialize sulfur fluxes
     70    budg_3D_nucl(ilon,ilev)=0.0
     71    budg_3D_cond_evap(ilon,ilev)=0.0
    7972    H2SO4_init=tr_seri(ilon,ilev,id_H2SO4_strat)
    8073    ! adaptive timestep for nucleation and condensation
     
    9588             & RRSI,Vbin,FL,ASO4,DNDR)
    9689      ! consider only condensation (positive FL)
    97       DO it=1,nbtr_bin
    98         FL(it)=MAX(FL(it),0.)
     90      DO IK=1,nbtr_bin
     91        FL(IK)=MAX(FL(IK),0.)
    9992      ENDDO
    10093      ! compute total H2SO4 cond flux for all particles
    10194      cond_evap_rate=0.0
    102       DO it=1, nbtr_bin
    103         cond_evap_rate=cond_evap_rate+tr_seri(ilon,ilev,it+nbtr_sulgas)*FL(it)*mH2SO4mol
     95      DO IK=1, nbtr_bin
     96        cond_evap_rate=cond_evap_rate+tr_seri(ilon,ilev,IK+nbtr_sulgas)*FL(IK)*mH2SO4mol
    10497      ENDDO
    10598      ! determine appropriate time step
     
    131124           & RRSI,Vbin,FL,ASO4,DNDR)
    132125    ! limit evaporation (negative FL) over one physics time step to H2SO4 content of the droplet
    133     DO it=1,nbtr_bin
    134       FL(it)=MAX(FL(it)*pdtphys,0.-ASO4(it))/pdtphys
     126    DO IK=1,nbtr_bin
     127      FL(IK)=MAX(FL(IK)*pdtphys,0.-ASO4(IK))/pdtphys
    135128      ! consider only evap (negative FL)
    136       FL(it)=MIN(FL(it),0.)
     129      FL(IK)=MIN(FL(IK),0.)
    137130    ENDDO
    138131    ! compute total H2SO4 evap flux for all particles
    139132    evap_rate=0.0
    140     DO it=1, nbtr_bin
    141       evap_rate=evap_rate+tr_seri(ilon,ilev,it+nbtr_sulgas)*FL(it)*mH2SO4mol
     133    DO IK=1, nbtr_bin
     134      evap_rate=evap_rate+tr_seri(ilon,ilev,IK+nbtr_sulgas)*FL(IK)*mH2SO4mol
    142135    ENDDO
    143136    ! update H2SO4 concentration after evap
     
    148141    budg_3D_cond_evap(ilon,ilev)=budg_3D_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
    149142             & *evap_rate*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG
    150     ! compute vertically integrated flux due to the net effect of nucleation and condensation/evaporation
    151     budg_h2so4_to_part(ilon)=budg_h2so4_to_part(ilon)+(H2SO4_init-tr_seri(ilon,ilev,id_H2SO4_strat)) &
    152              & *mSatom/mH2SO4mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
    153143  ENDIF
    154144  ENDDO
     
    158148    DO ilon=1, klon
    159149    DO ilev=1, klev   
    160     DO it=1, nbtr
    161       IF (tr_seri(ilon,ilev,it).LT.0.0) THEN
    162         PRINT *, 'micphy_tstep: negative concentration', tr_seri(ilon,ilev,it), ilon, ilev, it
     150    DO IK=1, nbtr
     151      IF (tr_seri(ilon,ilev,IK).LT.0.0) THEN
     152        PRINT *, 'micphy_tstep: negative concentration', tr_seri(ilon,ilev,IK), ilon, ilev, IK
    163153      ENDIF
    164154    ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/traccoag_mod.F90

    r3356 r3411  
    203203            !vertically distributed emission
    204204            DO k=1, klev
    205               ! stretch emission over one day (minus one timestep) of Pinatubo eruption
    206               emission=m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/1./(86400.-pdtphys)
     205              ! stretch emission over one day of Pinatubo eruption
     206              emission=m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/1./86400.
    207207              tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+emission*pdtphys
    208208              budg_emi_so2(i)=budg_emi_so2(i)+emission*zdm(k)*mSatom/mSO2mol
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/acama_gwd_rando_m.F90

    r3356 r3411  
    2020    use dimphy, only: klon, klev
    2121    use assert_m, only: assert
    22     USE ioipsl_getin_p_mod, ONLY : getin_p
    23     USE vertical_layers_mod, ONLY : presnivs
    24 
    2522    include "YOMCST.h"
    2623    include "clesphys.h"
     
    114111    REAL BV(KLON, KLEV + 1) ! Brunt Vaisala freq. (BVF) at 1/2 levels
    115112    REAL BVSEC ! Security to avoid negative BVF
    116 
    117     REAL, DIMENSION(klev+1) ::HREF
    118     LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
    119     LOGICAL, SAVE :: firstcall = .TRUE.
    120   !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
    121 
    122     CHARACTER (LEN=20) :: modname='flott_gwd_rando'
    123     CHARACTER (LEN=80) :: abort_message
    124 
    125 
    126 
    127   IF (firstcall) THEN
    128     ! Cle introduite pour resoudre un probleme de non reproductibilite
    129     ! Le but est de pouvoir tester de revenir a la version precedenete
    130     ! A eliminer rapidement
    131     CALL getin_p('gwd_reproductibilite_mpiomp',gwd_reproductibilite_mpiomp)
    132     IF (NW+4*(NA-1)+NA>=KLEV) THEN
    133        abort_message = 'NW+3*NA>=KLEV Probleme pour generation des ondes'
    134        CALL abort_physic (modname,abort_message,1)
    135     ENDIF
    136     firstcall=.false.
    137 !    CALL iophys_ini
    138   ENDIF
    139113
    140114    !-----------------------------------------------------------------
     
    231205    ! Launching altitude
    232206
    233     IF (gwd_reproductibilite_mpiomp) THEN
    234        ! Reprend la formule qui calcule PH en fonction de PP=play
    235        DO LL = 2, KLEV
    236           HREF(LL) = EXP((LOG(presnivs(LL)) + LOG(presnivs(LL - 1))) / 2.)
    237        end DO
    238        HREF(KLEV + 1) = 0.
    239        HREF(1) = 2. * presnivs(1) - HREF(2)
    240     ELSE
    241        HREF(1:KLEV)=PH(KLON/2,1:KLEV)
    242     ENDIF
    243 
    244207    LAUNCH=0
    245208    LTROP =0
    246209    DO LL = 1, KLEV
    247        IF (HREF(LL) / HREF(1) > XLAUNCH) LAUNCH = LL
     210       IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XLAUNCH) LAUNCH = LL
    248211    ENDDO
    249212    DO LL = 1, KLEV
    250        IF (HREF(LL) / HREF(1) > XTROP) LTROP = LL
     213       IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XTROP) LTROP = LL
    251214    ENDDO
    252     !LAUNCH=22 ; LTROP=33
    253 !   print*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
    254 
    255215
    256216!   PRINT *,'LAUNCH IN ACAMARA:',LAUNCH
     
    333293
    334294    JW = 0
    335     DO JW = 1, NW
     295    DO JP = 1, NP
     296       DO JK = 1, NK
     297          DO JO = 1, NO
     298             JW = JW + 1
    336299             ! Angle
    337300             DO II = 1, KLON
     
    377340                ! RUW0(JW, II) = RUWFRT
    378341             ENDDO
     342          end DO
     343       end DO
    379344    end DO
    380345
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/add_wake_tend.F90

    r3356 r3411  
    1 SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zddensaw, zddensw, zoccur, text, abortphy)
     1SUBROUTINE add_wake_tend(zddeltat, zddeltaq, zds, zddens, zoccur, text, abortphy)
    22!===================================================================
    33! Ajoute les tendances liées aux diverses parametrisations physiques aux
     
    99
    1010USE dimphy, ONLY: klon, klev
    11 USE phys_state_var_mod, ONLY: wake_deltat, wake_deltaq, wake_s,  &
    12                               awake_dens, wake_dens
     11USE phys_state_var_mod, ONLY: wake_deltat, wake_deltaq, wake_s, wake_dens
    1312
    1413USE print_control_mod, ONLY: prt_level
     
    1817!------------
    1918  REAL, DIMENSION(klon, klev),   INTENT (IN)         :: zddeltat, zddeltaq
    20   REAL, DIMENSION(klon),         INTENT (IN)         :: zds, zddensaw, zddensw
     19  REAL, DIMENSION(klon),         INTENT (IN)         :: zds, zddens
    2120  INTEGER, DIMENSION(klon),      INTENT (IN)         :: zoccur
    2221  CHARACTER*(*),                 INTENT (IN)         :: text
     
    5453         DO i = 1, klon
    5554           IF (zoccur(i) .GE. 1) THEN
    56              wake_s(i)     = wake_s(i)    + zds(i)
    57              awake_dens(i) = awake_dens(i) + zddensaw(i)
    58              wake_dens(i)  = wake_dens(i) + zddensw(i)
     55             wake_s(i)    = wake_s(i)    + zds(i)
     56             wake_dens(i) = wake_dens(i) + zddens(i)
    5957           ELSE
    60              wake_s(i)     = 0.
    61              awake_dens(i) = 0.
    62              wake_dens(i)  = 0.
     58             wake_s(i)    = 0.
     59             wake_dens(i) = 0.
    6360           ENDIF   ! (zoccur(i) .GE. 1)
    6461         END DO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/aero_mod.F90

    r3356 r3411  
    22!
    33MODULE aero_mod
    4 
    5   IMPLICIT NONE
    6 
    74! Declaration des indices pour les aerosols
    85
     
    6865
    6966! 3/ Number of aerosol groups
    70   INTEGER, PARAMETER :: naero_grp = 13
     67  INTEGER, PARAMETER :: naero_grp = 12
    7168  ! if info_trac = inca
    7269  ! 1 = ZERO   
     
    8178  ! 10 = DNO3
    8279  ! 11 = SNO3
    83   ! 12 = SOAA
    84   ! 13 = SOAB
     80  ! 12 = empty actually
    8581  ! else
    8682  ! 1 = ZERO   
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/albsno.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/alpale_th.F90

    r3356 r3411  
    33                       ale_bl_trig, ale_bl_stat, ale_bl,  &
    44                       alp_bl, alp_bl_stat, &
    5                        proba_notrig, random_notrig, birth_rate)
     5                       proba_notrig, random_notrig)
    66
    77! **************************************************************
     
    4242  REAL, DIMENSION(klon), INTENT(OUT)                         :: random_notrig
    4343
    44   REAL, DIMENSION(klon), INTENT(OUT)                         :: birth_rate
    45 
    4644  include "thermcell.h"
    4745
     
    5553  REAL, DIMENSION(klon)                                      :: ale_bl_ref
    5654  REAL, DIMENSION(klon)                                      :: tau_trig
     55  REAL, DIMENSION(klon)                                      :: birth_rate
    5756!
    5857    !$OMP THREADPRIVATE(random_notrig_max)
     
    6362 REAL x
    6463 umexp(x) = max(sign(1.,x-1.e-3),0.)*(1.-exp(-x))/max(x,1.e-3) + &
    65             (1.-max(sign(1.,x-1.e-3),0.))*(1.-0.5*x*(1.-x/3.*(1.-0.25*x)))  !!! correct formula            (jyg)
    66 !!!            (1.-max(sign(1.,x-1.e-3),0.))*(-0.5*x*(1.-x/3.*(1.-0.25*x))) !!! bug introduced by mistake  (jyg)
    67 !!!            (1.-max(sign(1.,x-1.e-3),0.))*(1.-0.5*x*(1.-x/3.*(1.-0.25*x)))  !!! initial correct formula (jyg)
     64            (1.-max(sign(1.,x-1.e-3),0.))*(1.-0.5*x*(1.-x/3.*(1.-0.25*x)))
    6865!
    6966!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    104101             !
    105102             IF (prt_level .GE. 10) THEN
    106                 print *,'cin, ale_bl_stat, alp_bl, alp_bl_stat ', &
    107                      cin, ale_bl_stat, alp_bl, alp_bl_stat
     103                print *,'cin, ale_bl_stat, alp_bl_stat ', &
     104                     cin, ale_bl_stat, alp_bl_stat
    108105             ENDIF
    109106
     
    142139                         ale_bl_trig(i)=0.
    143140                      endif
    144                       birth_rate(i) = n2(i)*exp(-s_trig/s2(i))/(tau_trig(i)*cell_area(i))
    145 !!!                      birth_rate(i) = max(birth_rate(i),1.e-18)
    146141                   else
    147142!!jyg                      proba_notrig(i)=1.
    148                       birth_rate(i) = 0.
    149143                      random_notrig(i)=0.
    150144                      ale_bl_trig(i)=0.
     
    164158                         ale_bl_trig(i)=0.
    165159                      endif
    166                       birth_rate(i) = n2(i)*exp(-s_trig/s2(i))/(tau_trig(i)*cell_area(i))
    167 !!!                      birth_rate(i) = max(birth_rate(i),1.e-18)
    168160                   else
    169161!!jyg                      proba_notrig(i)=1.
    170                       birth_rate(i) = 0.
    171162                      random_notrig(i)=0.
    172163                      ale_bl_trig(i)=0.
     
    264255              birth_number = n2(i)*exp(-s_trig/s2(i))
    265256              birth_rate(i) = birth_number/(tau_trig(i)*cell_area(i))
    266 !!!              birth_rate(i) = max(birth_rate(i),1.e-18)
    267257              proba_notrig(i)=proba_notrig(i)*exp(-birth_number*dtime/tau_trig(i))
    268258              Alp_bl(i) = Alp_bl(i)* &
     
    272262          else
    273263!!jyg              proba_notrig(i)=1.
    274               birth_rate(i)=0.
    275264              random_notrig(i)=0.
    276265              alp_bl(i)=0.
     
    300289
    301290          IF (prt_level .GE. 10) THEN
    302              print *,'alpale_th: ale_bl_trig, alp_bl_stat, birth_rate ', &
    303                       ale_bl_trig(1), alp_bl_stat(1), birth_rate(1)
     291             print *,'ale_bl_trig, alp_bl_stat ',ale_bl_trig, alp_bl_stat
    304292          ENDIF
    305293
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/alpale_wk.F90

    r3356 r3411  
    6767!  Compute probability that the grid-cell is intersected by a gust front
    6868!!  print *,'alpale_wk: wkrad(1), cellrad(1) ', wkrad(1), cellrad(1)
    69 !!  proba_gf(:) = exp(-wdens(:)*rpi*max(wkrad(:)-cellrad(:),0.)**2) - &   ! Formules
    70 !!                exp(-wdens(:)*rpi*(wkrad(:)+cellrad(:))**2)             ! fausses !
    71   proba_gf(:) = 1. - exp(-wdens(:)*rpi*((wkrad(:)+cellrad(:))**2 - &
    72                                         max(wkrad(:)-cellrad(:),0.)**2) )
     69  proba_gf(:) = exp(-wdens(:)*rpi*max(wkrad(:)-cellrad(:),0.)**2) - &
     70                exp(-wdens(:)*rpi*(wkrad(:)+cellrad(:))**2)
    7371!
    7472  proba_gf(:) = max(proba_gf(:),1.e-3)
     
    7775!!  print *,'alpale_wk: proba_gf(1), fip(1), ', proba_gf(1), fip(1)
    7876  fip_cond(:) = fip(:)/proba_gf(:)
    79 !!    print *,'alpale_wk: wkrad(1), cellrad(1), proba_gf(1), fip(1), fip_cond(1) ', &
    80 !!                        wkrad(1), cellrad(1), proba_gf(1), fip(1), fip_cond(1)
     77!!  print *,'alpale_wk: fip_cond(1) ', fip_cond(1)
    8178
    8279   RETURN
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/calbeta.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/calcul_fluxs_mod.F90

    • Property svn:executable set to *
    r3356 r3411  
    44MODULE calcul_fluxs_mod
    55
    6   IMPLICIT NONE
    76
    87CONTAINS
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/calwake.F90

    r3356 r3411  
    44SUBROUTINE calwake(iflag_wake_tend, paprs, pplay, dtime, &
    55    t, q, omgb, &
    6     dt_dwn, dq_dwn, m_dwn, m_up, dt_a, dq_a, wgen, &
    7     sigd, Cin, &
    8     wake_deltat, wake_deltaq, wake_s, awake_dens, wake_dens, &
     6    dt_dwn, dq_dwn, m_dwn, m_up, dt_a, dq_a, &
     7    sigd, &
     8    wake_deltat, wake_deltaq, wake_s, wake_dens, &
    99    wake_dth, wake_h, &
    1010    wake_pe, wake_fip, wake_gfl, &
     
    1414    wake_omg, wake_dp_deltomg, &
    1515    wake_spread, wake_cstar, wake_d_deltat_gw, &
    16     wake_ddeltat, wake_ddeltaq, wake_ds, awake_ddens, wake_ddens)
     16    wake_ddeltat, wake_ddeltaq, wake_ds, wake_ddens)
    1717  ! **************************************************************
    1818  ! *
     
    4545  REAL, DIMENSION(klon, klev),   INTENT (IN)         :: m_up, m_dwn
    4646  REAL, DIMENSION(klon, klev),   INTENT (IN)         :: dt_a, dq_a
    47   REAL, DIMENSION(klon),         INTENT (IN)         :: wgen
    4847  REAL, DIMENSION(klon),         INTENT (IN)         :: sigd
    49   REAL, DIMENSION(klon),         INTENT (IN)         :: Cin
    5048  ! Input/Output
    5149  ! ------------
    5250  REAL, DIMENSION(klon, klev),   INTENT (INOUT)      :: wake_deltat, wake_deltaq
    5351  REAL, DIMENSION(klon),         INTENT (INOUT)      :: wake_s
    54   REAL, DIMENSION(klon),         INTENT (INOUT)      :: awake_dens, wake_dens
     52  REAL, DIMENSION(klon),         INTENT (INOUT)      :: wake_dens
    5553  ! Output
    5654  ! ------
     
    6967  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_cstar
    7068  REAL, DIMENSION(klon, klev),   INTENT (OUT)        :: wake_ddeltat, wake_ddeltaq
    71   REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_ds, awake_ddens, wake_ddens
     69  REAL, DIMENSION(klon),         INTENT (OUT)        :: wake_ds, wake_ddens
    7270
    7371
     
    9088  REAL, DIMENSION(klon, klev)                        :: tx, qx
    9189  REAL, DIMENSION(klon)                              :: hw, wape, fip, gfl
    92   REAL, DIMENSION(klon)                              :: sigmaw, awdens, wdens
     90  REAL, DIMENSION(klon)                              :: sigmaw, wdens
    9391  REAL, DIMENSION(klon, klev)                        :: omgbdth
    9492  REAL, DIMENSION(klon, klev)                        :: dp_omgb
     
    10199  REAL, DIMENSION(klon, klev)                        :: d_deltat_gw
    102100  REAL, DIMENSION(klon, klev)                        :: d_deltatw, d_deltaqw
    103   REAL, DIMENSION(klon)                              :: d_sigmaw, d_awdens, d_wdens
     101  REAL, DIMENSION(klon)                              :: d_sigmaw, d_wdens
    104102
    105103  REAL                                               :: rdcp
     
    107105
    108106  IF (prt_level >= 10) THEN
    109     print *, '-> calwake, wake_s, wgen input ', wake_s(1), wgen(1)
     107    print *, '-> calwake, wake_s input ', wake_s(1)
    110108  ENDIF
    111109
     
    149147d_deltaqw(:,:) = 0.
    150148d_sigmaw(:) = 0.
    151 d_awdens(:) = 0.
    152149d_wdens(:) = 0.
    153150!
     
    182179
    183180  DO i = 1, klon
    184     awdens(i) = max(0., awake_dens(i))
    185181    wdens(i) = max(0., wake_dens(i))
    186182  END DO
     
    210206  CALL wake(znatsurf, p, ph, pi, dtime, &
    211207    te, qe, omgbe, &
    212     dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, &
    213     sigd0, Cin, &
    214     dtw, dqw, sigmaw, awdens, wdens, &                                   ! state variables
     208    dtdwn, dqdwn, amdwn, amup, dta, dqa, &
     209    sigd0, &
     210    dtw, dqw, sigmaw, wdens, &                                   ! state variables
    215211    dth, hw, wape, fip, gfl, &
    216212    dtls, dqls, ktopw, omgbdth, dp_omgb, tx, qx, &
    217213    dtke, dqke, omg, dp_deltomg, spread, cstar, &
    218214    d_deltat_gw, &
    219     d_deltatw, d_deltaqw, d_sigmaw, d_awdens, d_wdens)                     ! tendencies
     215    d_deltatw, d_deltaqw, d_sigmaw, d_wdens)                     ! tendencies
    220216
    221217!
     
    278274    IF (ktopw(i)>0) THEN
    279275      wake_ds(i) = d_sigmaw(i)*dtime
    280       awake_ddens(i) = d_awdens(i)*dtime
    281276      wake_ddens(i) = d_wdens(i)*dtime
    282277    ELSE
     
    303298    DO i = 1, klon
    304299      wake_s(i) = sigmaw(i)
    305       awake_dens(i) = awdens(i)
    306300      wake_dens(i) = wdens(i)
    307301    END DO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cfmip_point_locations.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/clesphys.h

    r3356 r3411  
    88!..include cles_phys.h
    99!
    10        INTEGER iflag_cycle_diurne
    11        LOGICAL soil_model,new_oliq,ok_orodr,ok_orolf
     10       LOGICAL cycle_diurne,soil_model,new_oliq,ok_orodr,ok_orolf
    1211       LOGICAL ok_limitvrai
    1312       LOGICAL ok_all_xml
    14        LOGICAL ok_lwoff
    1513       INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv
    1614       REAL co2_ppm, co2_ppm0, solaire
     
    5553! Rugoro
    5654       Real f_rugoro,z0min
    57 
    58 ! tau_gl : constante de rappel de la temperature a la surface de la glace
    59        REAL tau_gl
    6055
    6156!IM lev_histhf  : niveau sorties 6h
     
    106101     &     , cdmmax,cdhmax,ksta,ksta_ter,f_ri_cd_min,pbl_lmixmin_alpha  &
    107102     &     , fmagic, pmagic                                             &
    108      &     , f_cdrag_ter,f_cdrag_oce,f_rugoro,z0min,tau_gl              &
     103     &     , f_cdrag_ter,f_cdrag_oce,f_rugoro,z0min                     &
    109104     &     , min_wind_speed,f_gust_wk,f_gust_bl,f_qsat_oce,f_z0qh_oce   &
    110105     &     , z0m_seaice,z0h_seaice                                      &
     
    122117! THEN INTEGER AND LOGICALS
    123118     &     , top_height                                                 &
    124      &     , iflag_cycle_diurne, soil_model, new_oliq                         &
     119     &     , cycle_diurne, soil_model, new_oliq                         &
    125120     &     , ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad                &
    126121     &     , iflag_con, nbapp_cv, nbapp_wk                              &
     
    140135     &     , iflag_ice_thermo, ok_gwd_rando, NSW, iflag_albedo          &
    141136     &     , ok_chlorophyll,ok_conserv_q, adjust_tropopause             &
    142      &     , ok_daily_climoz, ok_all_xml, ok_lwoff                      &
     137     &     , ok_daily_climoz, ok_all_xml                                &
    143138     &     , iflag_phytrac
    144139     
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/climb_hq_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/climb_wind_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/coef_diff_turb_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/compbl.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/concvl.F90

    r3356 r3411  
    444444  END IF
    445445! ------------------------------------------------------------------
    446   IF (prt_level>=10) WRITE (lunout, *) ' cva_driver -> cbmf,plcl,plfc,wbeff, d_t, d_q ', &
    447                                          cbmf(1), plcl(1), plfc(1), wbeff(1), d_t(1,1), d_q(1,1)
     446  IF (prt_level>=10) WRITE (lunout, *) ' cva_driver -> cbmf,plcl,plfc,wbeff ', &
     447                                         cbmf(1), plcl(1), plfc(1), wbeff(1)
    448448
    449449  DO i = 1, klon
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/condsurf.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/conf_phys_m.F90

    r3356 r3411  
    9292    LOGICAL, SAVE       :: ok_newmicro_omp
    9393    LOGICAL, SAVE       :: ok_all_xml_omp
    94     LOGICAL, SAVE       :: ok_lwoff_omp
    9594    LOGICAL, SAVE       :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
    9695    LOGICAL, SAVE       :: ok_LES_omp   
     
    214213    LOGICAL,SAVE :: ok_lic_cond_omp
    215214    !
    216     INTEGER,SAVE  :: iflag_cycle_diurne_omp
    217     LOGICAL,SAVE  :: soil_model_omp,new_oliq_omp
     215    LOGICAL,SAVE  :: cycle_diurne_omp,soil_model_omp,new_oliq_omp
    218216    LOGICAL,SAVE  :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp
    219217    INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp
     
    297295    ok_all_xml_omp = .FALSE.
    298296    CALL getin('ok_all_xml', ok_all_xml_omp)
    299 
    300     !
    301     !Config Key  = ok_lwoff
    302     !Config Desc = inhiber l effet radiatif LW des nuages
    303     !Config Def  = .FALSE.
    304     !Config Help =
    305     !
    306     ok_lwoff_omp = .FALSE.
    307     CALL getin('ok_lwoff', ok_lwoff_omp)
    308297    !
    309298
     
    416405    ! - flag_aerosol=5 => dust only
    417406    ! - flag_aerosol=6 => all aerosol
    418     ! - flag_aerosol=7 => natural aerosol + MACv2SP
    419     ! - (in this case aerosols.1980.nc should point to aerosols.nat.nc)
    420407
    421408    flag_aerosol_omp = 0
     
    722709    ! Constantes precedemment dans dyn3d/conf_gcm
    723710
    724     !Config  Key  = iflag_cycle_diurne
    725     !Config  Desc = Cycle diurne
    726     !Config  Def  = 1
     711    !Config  Key  = cycle_diurne
     712    !Config  Desc = Cycle ddiurne
     713    !Config  Def  = y
    727714    !Config  Help = Cette option permet d'eteidre le cycle diurne.
    728715    !Config         Peut etre util pour accelerer le code !
    729     iflag_cycle_diurne_omp = 1
    730     CALL getin('iflag_cycle_diurne',iflag_cycle_diurne_omp)
     716    cycle_diurne_omp = .TRUE.
     717    CALL getin('cycle_diurne',cycle_diurne_omp)
    731718
    732719    !Config  Key  = soil_model
     
    21682155    RCFC12_per = RCFC12_per_omp
    21692156
    2170     iflag_cycle_diurne = iflag_cycle_diurne_omp
     2157    cycle_diurne = cycle_diurne_omp
    21712158    soil_model = soil_model_omp
    21722159    new_oliq = new_oliq_omp
     
    22592246
    22602247    ok_all_xml = ok_all_xml_omp
    2261     ok_lwoff = ok_lwoff_omp
    22622248    ok_newmicro = ok_newmicro_omp
    22632249    ok_journe = ok_journe_omp
     
    24522438
    24532439    ! Flag_aerosol cannot be to zero if we are in coupled mode for aerosol
    2454     IF (aerosol_couple .AND. flag_aerosol .EQ. 0 ) THEN
     2440    IF (aerosol_couple .AND. flag_aerosol .eq. 0 ) THEN
    24552441       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if aerosol_couple=y ', 1)
    24562442    ENDIF
    24572443
    24582444    ! flag_aerosol need to be different to zero if ok_cdnc is activated
    2459     IF (ok_cdnc .AND. flag_aerosol .EQ. 0) THEN
     2445    IF (ok_cdnc .AND. flag_aerosol .eq. 0) THEN
    24602446       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if ok_cdnc is activated ', 1)
    24612447    ENDIF
     
    24642450    IF (ok_aie .AND. .NOT. ok_cdnc) THEN
    24652451       CALL abort_physic('conf_phys', 'ok_cdnc must be set to y if ok_aie is activated',1)
    2466     ENDIF
    2467 
    2468     ! flag_aerosol=7 => MACv2SP climatology
    2469     IF (flag_aerosol.EQ.7.AND. iflag_rrtm.NE.1) THEN
    2470        CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with RRTM',1)
    2471     ENDIF
    2472     IF (flag_aerosol.EQ.7.AND. NSW.NE.6) THEN
    2473        CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with NSW=6',1)
    24742452    ENDIF
    24752453
     
    24872465    ! ORCHIDEE must be activated for ifl_pbltree=1
    24882466    IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN
    2489        WRITE(lunout,*)'Warning: ORCHIDEE must be activated for ifl_pbltree=1'
    2490        WRITE(lunout,*)'ifl_pbltree is now changed to zero'
    2491        ifl_pbltree=0
     2467       WRITE(lunout,*)' ORCHIDEE must be activated for ifl_pbltree=1'
     2468       CALL abort_physic('conf_phys','ok_veget and ifl_pbltree not coherent',1)
    24922469    END IF
    24932470
     
    25292506    write(lunout,*)'ok_lic_melt=', ok_lic_melt
    25302507    write(lunout,*)'ok_lic_cond=', ok_lic_cond
    2531     write(lunout,*)'iflag_cycle_diurne=',iflag_cycle_diurne
     2508    write(lunout,*)'cycle_diurne=',cycle_diurne
    25322509    write(lunout,*)'soil_model=',soil_model
    25332510    write(lunout,*)'new_oliq=',new_oliq
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/cosp_output_mod.F90

    r3356 r3411  
    1212                            numMODISReffLiqBins, reffLIQ_binCenters
    1313
    14      IMPLICIT NONE
    1514! cosp_output_mod
    1615      INTEGER, PRIVATE             :: i
     
    255254  real                      :: zjulian,zjulian_start
    256255  real,dimension(Ncolumns)  :: column_ax
     256  real,dimension(2,SR_BINS) :: sratio_bounds
     257  real,dimension(SR_BINS)   ::  sratio_ax
    257258  real,dimension(DBZE_BINS) ::  dbze_ax
    258259  CHARACTER(LEN=20), DIMENSION(3)  :: chfreq = (/ '1day', '1d  ', '3h  ' /)           
    259   real,parameter,dimension(SR_BINS) :: sratio_ax = (/0.005, &
    260                                                   0.605,2.09,4.,6., &
    261                                           8.5,12.5,17.5,22.5,27.5,35.,45.,55.,70.,50040./)
    262260
    263261!!! Variables d'entree
     
    284282    enddo
    285283 
     284
     285    sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper
     286!                                         limits from lmd_ipsl_stats.f90
     287    sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)
     288    sratio_bounds(1,1)         = 0.0
     289    sratio_bounds(2,SR_BINS)   = 1.e5 ! This matches with Chepfer et al., JGR,
     290!                                    ! 2009. However, it is not consistent
     291                                     ! with the upper limit in
     292                                     ! lmd_ipsl_stats.f90, which is
     293                                     ! LIDAR_UNDEF-1=998.999
     294     sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0
     295
    286296    cosp_outfilenames(1) = 'histmthCOSP'
    287297    cosp_outfilenames(2) = 'histdayCOSP'
     
    342352! AI nov 2015
    343353   CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP)
    344    CALL wxios_add_vaxis("cth", MISR_N_CTH, MISR_CTH)
     354   CALL wxios_add_vaxis("cth16", MISR_N_CTH, MISR_CTH)
    345355   CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax)
    346356   CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax)
     
    390400      CALL histvert(cosp_nidfiles(iff),"temp","temperature","C",LIDAR_NTEMP,LIDAR_PHASE_TEMP,nverttemp(iff))
    391401
    392       CALL histvert(cosp_nidfiles(iff),"cth","altitude","m",MISR_N_CTH,MISR_CTH,nvertmisr(iff))
     402      CALL histvert(cosp_nidfiles(iff),"cth16","altitude","m",MISR_N_CTH,MISR_CTH,nvertmisr(iff))
    393403 
    394404      CALL histvert(cosp_nidfiles(iff),"ReffIce","Effective_particle_size_Ice","microns",numMODISReffIceBins, reffICE_binCenters, &
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/cosp_output_write_mod.F90

    r3356 r3411  
    66   USE cosp_output_mod
    77 
    8    IMPLICIT NONE
    9 
    108   INTEGER, SAVE  :: itau_iocosp
    119!$OMP THREADPRIVATE(itau_iocosp)
     
    2927#ifdef CPP_XIOS
    3028    USE wxios, only: wxios_closedef
    31     USE xios, only: xios_update_calendar, xios_field_is_active
    32 #endif
    33   IMPLICIT NONE 
     29    USE xios, only: xios_update_calendar
     30#endif
     31
    3432!!! Variables d'entree
    3533  integer               :: itap, Nlevlmdz, Ncolumns, Npoints
     
    4745
    4846!!! Variables locales
    49   integer               :: icl,k,ip
     47  integer               :: icl
    5048  logical               :: ok_sync
    51   integer               :: itau_wcosp, iff
     49  integer               :: itau_wcosp
    5250  real, dimension(Npoints,PARASOL_NREFL) :: parasolcrefl, Ncref
    5351
    54 ! Variables locals intermidiaires pour inverser les axes des champs 4D
    55 ! Compatibilite avec sorties CMIP
    56   real, dimension(Npoints,Nlevout,SR_BINS) :: tmp_fi4da_cfadL
    57   real, dimension(Npoints,Nlevout,DBZE_BINS) :: tmp_fi4da_cfadR
    58   real, dimension(Npoints,MISR_N_CTH,7) :: tmp_fi4da_misr
    5952
    6053#ifdef CPP_XIOS
     
    8679! On n'ecrit pas quand itap=1 (cosp)
    8780
    88 !   if (prt_level >= 10) then
    89 !         WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend
    90 !   endif
    91 
    92 !!#ifdef CPP_XIOS
     81   if (prt_level >= 10) then
     82         WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend
     83   endif
     84
     85!#ifdef CPP_XIOS
    9386! !$OMP MASTER
    9487!IF (cosp_varsdefined) THEN
     
    10194!  !$OMP END MASTER
    10295!  !$OMP BARRIER
    103 !!#endif
    104 
    105 !!!! Sorties Calipso
     96!#endif
     97
    10698 if (cfg%Llidar_sim) then
    107 !!! AI 02 2018
    108 ! Traitement missing_val
    109    where(stlidar%lidarcld == R_UNDEF) stlidar%lidarcld = missing_val
    110    where(stlidar%proftemp == R_UNDEF) stlidar%proftemp = missing_val   !TIBO 
    111    where(stlidar%profSR == R_UNDEF) stlidar%profSR = missing_val       !TIBO2
    112    where(sglidar%beta_mol == R_UNDEF) sglidar%beta_mol = missing_val 
    113    where(sglidar%beta_tot == R_UNDEF) sglidar%beta_tot = missing_val
    114    where(stlidar%cldlayer == R_UNDEF) stlidar%cldlayer = missing_val
    115    where(stlidar%cldtype == R_UNDEF) stlidar%cldtype = missing_val     !OPAQ
    116    where(stlidar%cfad_sr == R_UNDEF) stlidar%cfad_sr = missing_val
     99! Pb des valeurs indefinies, on les met a 0
     100! A refaire proprement
     101  do k = 1,Nlevout
     102     do ip = 1,Npoints
     103     if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then
     104      stlidar%lidarcld(ip,k)=missing_val
     105     endif
     106     if(stlidar%proftemp(ip,k).eq.R_UNDEF)then !TIBO
     107      stlidar%proftemp(ip,k)=missing_val       !TIBO
     108     endif                                     !TIBO
     109     enddo
     110
     111     do ii= 1,SR_BINS
     112      do ip = 1,Npoints
     113       if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then
     114        stlidar%cfad_sr(ip,ii,k)=missing_val
     115       endif
     116      enddo
     117     enddo
     118
     119     do ii= 1,Ncolumns                               !TIBO
     120      do ip = 1,Npoints                              !TIBO
     121!       if(stlidar%profSR(ip,ii,k).eq.R_UNDEF)then    !TIBO
     122!        stlidar%profSR(ip,ii,k)=missing_val          !TIBO
     123       if(stlidar%profSR(ip,k,ii).eq.R_UNDEF)then    !TIBO2
     124        stlidar%profSR(ip,k,ii)=missing_val          !TIBO2
     125       endif                                         !TIBO
     126      enddo                                          !TIBO
     127     enddo                                           !TIBO
     128  enddo
     129
     130  do ip = 1,Npoints
     131   do k = 1,Nlevlmdz
     132     if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then
     133      sglidar%beta_mol(ip,k)=missing_val
     134     endif
     135
     136     do ii= 1,Ncolumns
     137       if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then
     138        sglidar%beta_tot(ip,ii,k)=missing_val
     139       endif
     140     enddo
     141
     142    enddo    !k = 1,Nlevlmdz
     143   enddo     !ip = 1,Npoints
     144
     145   do k = 1,LIDAR_NCAT
     146    do ip = 1,Npoints
     147     if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then
     148       stlidar%cldlayer(ip,k)=missing_val
     149     endif
     150    enddo
     151   enddo
     152
     153   do k = 1,LIDAR_NTYPE                       !OPAQ
     154    do ip = 1,Npoints                         !OPAQ
     155     if(stlidar%cldtype(ip,k).eq.R_UNDEF)then !OPAQ
     156       stlidar%cldtype(ip,k)=missing_val      !OPAQ
     157     endif                                    !OPAQ
     158    enddo                                     !OPAQ
     159   enddo                                      !OPAQ
     160
    117161! AI 11 / 2015
     162
    118163   where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = missing_val
    119164   where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val
     
    122167   where(stlidar%lidarcldtype == R_UNDEF) stlidar%lidarcldtype = missing_val   !OPAQ
    123168   where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val
    124  
    125 !   print*,'Appel histwrite2d_cosp'
    126    if (cfg%Lcllcalipso) CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1))
    127    if (cfg%Lclhcalipso) CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3))
    128    if (cfg%Lclmcalipso) CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2))
    129    if (cfg%Lcltcalipso) CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4))
    130    if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert)
    131    if (cfg%Lclcalipsotmp) CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp)
    132 
    133    if (cfg%Lcllcalipsoice) CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1))
    134    if (cfg%Lclhcalipsoice) CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1))
    135    if (cfg%Lclmcalipsoice) CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1))
    136    if (cfg%Lcltcalipsoice) CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1))
    137    if (cfg%Lclcalipsoice) CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert)
    138    if (cfg%Lclcalipsotmpice) CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp)
    139 
    140    if (cfg%Lcllcalipsoliq) CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2))
    141    if (cfg%Lclhcalipsoliq) CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2))
    142    if (cfg%Lclmcalipsoliq) CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2))
    143    if (cfg%Lcltcalipsoliq) CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2))
    144    if (cfg%Lclcalipsoliq) CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert)
    145    if (cfg%Lclcalipsotmpliq) CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp)
    146 
    147    if (cfg%Lcllcalipsoun) CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3))
    148    if (cfg%Lclhcalipsoun) CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3))
    149    if (cfg%Lclmcalipsoun) CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3))
    150    if (cfg%Lcltcalipsoun) CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3))
    151    if (cfg%Lclcalipsoun) CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert)
    152    if (cfg%Lclcalipsotmpun) CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp)
    153 
    154    if (cfg%Lclopaquecalipso) CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1))               !OPAQ
    155    if (cfg%Lclthincalipso) CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2))                 !OPAQ
    156    if (cfg%Lclzopaquecalipso) CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3))              !OPAQ
    157 
    158    if (cfg%Lclcalipsoopaque) CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert)  !OPAQ
    159    if (cfg%Lclcalipsothin) CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert)    !OPAQ
    160    if (cfg%Lclcalipsozopaque) CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ
    161    if (cfg%Lclcalipsoopacity) CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ
    162 
    163    if (cfg%Lproftemp) CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert)                    !TIBO
    164 
    165 #ifdef CPP_XIOS
     169   
     170
     171   print*,'Appel histwrite2d_cosp'
     172   CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1))
     173   CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3))
     174   CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2))
     175   CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4))
     176   CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert)
     177   CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp)
     178
     179   CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1))
     180   CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1))
     181   CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1))
     182   CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1))
     183   CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert)
     184   CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp)
     185
     186   CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2))
     187   CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2))
     188   CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2))
     189   CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2))
     190   CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert)
     191   CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp)
     192
     193   CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3))
     194   CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3))
     195   CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3))
     196   CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3))
     197   CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert)
     198   CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp)
     199
     200   CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1))               !OPAQ
     201   CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2))                 !OPAQ
     202   CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3))              !OPAQ
     203
     204   CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert)  !OPAQ
     205   CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert)    !OPAQ
     206   CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ
     207   CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ
     208
     209   CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert)                    !TIBO
     210
     211#ifdef CPP_XIOS
     212   CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr)
     213   CALL histwrite4d_cosp(o_profSR,stlidar%profSR)                              !TIBO
     214#else
    166215   do icl=1,SR_BINS
    167       tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:)
    168    enddo
    169 !   if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr)
    170    if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL)
    171    if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR)                              !TIBO
     216      CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl)
     217   enddo
     218   do icl=1,Ncolumns                                                              !TIBO
     219      CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl)           !TIBO
     220   enddo                                                                          !TIBO
     221     CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp)
     222#endif
     223
     224   do k=1,PARASOL_NREFL
     225    do ip=1, Npoints
     226     if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then
     227       parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ &
     228                            stlidar%cldlayer(ip,4)
     229        Ncref(ip,k) = 1.
     230     else
     231        parasolcrefl(ip,k)=missing_val
     232        Ncref(ip,k) = 0.
     233     endif
     234    enddo
     235   
     236   enddo
     237   CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp)
     238   CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp)
     239
     240#ifdef CPP_XIOS
     241   CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot)
    172242#else
    173    if (cfg%LcfadLidarsr532) then
    174      do icl=1,SR_BINS
    175         CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl)
    176      enddo
    177    endif
    178    if (cfg%LprofSR) then
    179      do icl=1,Ncolumns                                                              !TIBO
    180         CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl)           !TIBO
    181      enddo                                                                          !TIBO
    182    endif
    183 #endif
    184    if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp)
    185 
    186   if (cfg%LparasolRefl) then
    187     do k=1,PARASOL_NREFL
    188      do ip=1, Npoints
    189       if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then
    190         parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ &
    191                              stlidar%cldlayer(ip,4)
    192          Ncref(ip,k) = 1.
    193       else
    194          parasolcrefl(ip,k)=missing_val
    195          Ncref(ip,k) = 0.
    196       endif
    197      enddo
    198     enddo
    199     CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp)
    200     CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp)
    201   endif
    202 
    203 #ifdef CPP_XIOS
    204    if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot)
     243   do icl=1,Ncolumns
     244      CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl)
     245   enddo
     246#endif
     247
     248   CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp)
     249 endif !Lidar
     250
     251 if (cfg%Lradar_sim) then
     252
     253#ifdef CPP_XIOS
     254   CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot)
     255   CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze)
    205256#else
    206    if (cfg%Latb532) then 
    207      do icl=1,Ncolumns
    208         CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl)
    209      enddo
    210    endif
    211 #endif
    212 
    213    if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp)
    214 
    215  endif !Lidar
    216 
    217 !!! Sorties Cloudsat
    218  if (cfg%Lradar_sim) then
    219 
    220    where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val
    221 #ifdef CPP_XIOS
     257   do icl=1,Ncolumns
     258      CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvertmcosp,icl)
     259   enddo
    222260   do icl=1,DBZE_BINS
    223      tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:)
    224    enddo
    225    if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot)
    226 !   if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze)
    227    if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR)
    228 #else
    229    if (cfg%Ldbze94) then
    230     do icl=1,Ncolumns
    231        CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl)
    232     enddo
    233    endif
    234    if (cfg%LcfadDbze94) then
    235     do icl=1,DBZE_BINS
    236261    CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl)
    237     enddo
    238    endif
     262   enddo
    239263#endif
    240264 endif
    241 ! endif pour radar
    242 
    243 !!! Sorties combinees Cloudsat et Calipso
     265
    244266 if (cfg%Llidar_sim .and. cfg%Lradar_sim) then
    245267   where(stradar%lidar_only_freq_cloud == R_UNDEF) &
    246268                           stradar%lidar_only_freq_cloud = missing_val
    247    if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)
     269   CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)
    248270   where(stradar%radar_lidar_tcc == R_UNDEF) &
    249271                           stradar%radar_lidar_tcc = missing_val
    250    if (cfg%Lcltlidarradar) CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)
     272   CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)
    251273 endif
    252274
    253 !!! Sorties Isccp
    254275 if (cfg%Lisccp_sim) then
    255   where(isccp%totalcldarea == R_UNDEF) isccp%totalcldarea = missing_val
    256   where(isccp%meanptop == R_UNDEF) isccp%meanptop = missing_val
    257   where(isccp%meantaucld == R_UNDEF) isccp%meantaucld = missing_val
    258   where(isccp%meanalbedocld == R_UNDEF) isccp%meanalbedocld = missing_val
    259   where(isccp%meantb == R_UNDEF) isccp%meantb = missing_val
    260   where(isccp%meantbclr == R_UNDEF) isccp%meantbclr = missing_val
    261   where(isccp%fq_isccp == R_UNDEF) isccp%fq_isccp = missing_val
    262   where(isccp%boxtau == R_UNDEF) isccp%boxtau = missing_val
    263   where(isccp%boxptop == R_UNDEF) isccp%boxptop = missing_val
     276
     277! Traitement des valeurs indefinies
     278   do ip = 1,Npoints
     279    if(isccp%totalcldarea(ip).eq.R_UNDEF)then
     280      isccp%totalcldarea(ip)=missing_val
     281    endif
     282    if(isccp%meanptop(ip).eq.R_UNDEF)then
     283      isccp%meanptop(ip)=missing_val
     284    endif
     285    if(isccp%meantaucld(ip).eq.R_UNDEF)then
     286      isccp%meantaucld(ip)=missing_val
     287    endif
     288    if(isccp%meanalbedocld(ip).eq.R_UNDEF)then
     289     isccp%meanalbedocld(ip)=missing_val
     290    endif
     291    if(isccp%meantb(ip).eq.R_UNDEF)then
     292     isccp%meantb(ip)=missing_val
     293    endif
     294    if(isccp%meantbclr(ip).eq.R_UNDEF)then
     295       isccp%meantbclr(ip)=missing_val
     296    endif
     297
     298    do k=1,7
     299     do ii=1,7
     300     if(isccp%fq_isccp(ip,ii,k).eq.R_UNDEF)then
     301      isccp%fq_isccp(ip,ii,k)=missing_val
     302     endif
     303     enddo
     304    enddo
     305
     306    do ii=1,Ncolumns
     307     if(isccp%boxtau(ip,ii).eq.R_UNDEF)then
     308       isccp%boxtau(ip,ii)=missing_val
     309     endif
     310    enddo
     311
     312    do ii=1,Ncolumns
     313     if(isccp%boxptop(ip,ii).eq.R_UNDEF)then
     314      isccp%boxptop(ip,ii)=missing_val
     315     endif
     316    enddo
     317   enddo
    264318
    265319   CALL histwrite2d_cosp(o_sunlit,gbx%sunlit)
    266320#ifdef CPP_XIOS
    267   if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)
     321  CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)
    268322#else
    269    if (cfg%Lclisccp) then
    270      do icl=1,7
    271        CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl)
     323   do icl=1,7
     324   CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl)
     325   enddo
     326#endif
     327   CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol)
     328   CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol)
     329   CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea)
     330   CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop)
     331   CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld)
     332   CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld)
     333   CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb)
     334   CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr)
     335 endif ! Isccp
     336
     337! MISR simulator
     338 if (cfg%Lmisr_sim) then
     339   do ip=1,Npoints
     340     do ii=1,7
     341       do k=1,MISR_N_CTH
     342        if(misr%fq_MISR(ip,ii,k).eq.R_UNDEF)then
     343            misr%fq_MISR(ip,ii,k)=missing_val
     344        endif
     345       enddo
    272346     enddo
    273    endif
    274 #endif
    275 
    276    if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol)
    277    if (cfg%Lboxptopisccp) CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol)
    278    if (cfg%Lcltisccp) CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea)
    279    if (cfg%Lpctisccp) CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop)
    280    if (cfg%Ltauisccp) CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld)
    281    if (cfg%Lalbisccp) CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld)
    282    if (cfg%Lmeantbisccp) CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb)
    283    if (cfg%Lmeantbclrisccp) CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr)
    284  endif ! Isccp
    285 
    286 !!! MISR simulator
    287  if (cfg%Lmisr_sim) then
    288    where(misr%fq_MISR == R_UNDEF) misr%fq_MISR = missing_val
    289 
    290 #ifdef CPP_XIOS
    291    do icl=1,MISR_N_CTH
    292       tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl)
    293    enddo
    294 !   if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR)
    295    if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr)
     347   enddo
     348
     349#ifdef CPP_XIOS
     350   CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR)
    296351#else
    297    if (cfg%LclMISR) then
    298     do icl=1,7
     352   do icl=1,7
    299353      CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl)
    300     enddo
    301    endif
     354   enddo
    302355#endif
    303356 endif
    304 ! endif pour Misr
    305 
    306 !!! Modis simulator
     357
     358! Modis simulator
    307359 if (cfg%Lmodis_sim) then
    308   where(modis%Cloud_Fraction_Low_Mean == R_UNDEF) &
    309         modis%Cloud_Fraction_Low_Mean = missing_val
    310   where(modis%Cloud_Fraction_High_Mean == R_UNDEF) &
    311         modis%Cloud_Fraction_High_Mean = missing_val
    312   where(modis%Cloud_Fraction_Mid_Mean == R_UNDEF) &
    313         modis%Cloud_Fraction_Mid_Mean = missing_val
    314   where(modis%Cloud_Fraction_Total_Mean == R_UNDEF) &
    315         modis%Cloud_Fraction_Total_Mean = missing_val
    316   where(modis%Cloud_Fraction_Water_Mean == R_UNDEF) &
    317         modis%Cloud_Fraction_Water_Mean = missing_val
    318   where(modis%Cloud_Fraction_Ice_Mean == R_UNDEF) &
    319         modis%Cloud_Fraction_Ice_Mean = missing_val
    320   where(modis%Optical_Thickness_Total_Mean == R_UNDEF) &
    321         modis%Optical_Thickness_Total_Mean = missing_val
    322   where(modis%Optical_Thickness_Water_Mean == R_UNDEF) &
    323         modis%Optical_Thickness_Water_Mean = missing_val
    324   where(modis%Optical_Thickness_Ice_Mean == R_UNDEF) &
    325         modis%Optical_Thickness_Ice_Mean = missing_val
    326   where(modis%Cloud_Particle_Size_Water_Mean == R_UNDEF) &
    327         modis%Cloud_Particle_Size_Water_Mean = missing_val
    328   where(modis%Cloud_Particle_Size_Ice_Mean == R_UNDEF) &
    329         modis%Cloud_Particle_Size_Ice_Mean = missing_val
    330   where(modis%Cloud_Top_Pressure_Total_Mean == R_UNDEF) &
    331         modis%Cloud_Top_Pressure_Total_Mean = missing_val
    332   where(modis%Liquid_Water_Path_Mean == R_UNDEF) &
    333         modis%Liquid_Water_Path_Mean = missing_val
    334   where(modis%Ice_Water_Path_Mean == R_UNDEF) &
    335         modis%Ice_Water_Path_Mean = missing_val
    336 
    337   where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) &
     360
     361  do ip=1,Npoints
     362    if(modis%Cloud_Fraction_Low_Mean(ip).eq.R_UNDEF)then
     363      modis%Cloud_Fraction_Low_Mean(ip)=missing_val
     364    endif
     365    if(modis%Cloud_Fraction_High_Mean(ip).eq.R_UNDEF)then
     366       modis%Cloud_Fraction_High_Mean(ip)=missing_val
     367    endif
     368    if(modis%Cloud_Fraction_Mid_Mean(ip).eq.R_UNDEF)then
     369       modis%Cloud_Fraction_Mid_Mean(ip)=missing_val
     370    endif
     371    if(modis%Cloud_Fraction_Total_Mean(ip).eq.R_UNDEF)then
     372       modis%Cloud_Fraction_Total_Mean(ip)=missing_val
     373    endif
     374    if(modis%Cloud_Fraction_Water_Mean(ip).eq.R_UNDEF)then
     375       modis%Cloud_Fraction_Water_Mean(ip)=missing_val
     376    endif
     377    if(modis%Cloud_Fraction_Ice_Mean(ip).eq.R_UNDEF)then
     378       modis%Cloud_Fraction_Ice_Mean(ip)=missing_val
     379    endif
     380    if(modis%Optical_Thickness_Total_Mean(ip).eq.R_UNDEF)then
     381       modis%Optical_Thickness_Total_Mean(ip)=missing_val
     382    endif
     383    if(modis%Optical_Thickness_Water_Mean(ip).eq.R_UNDEF)then
     384       modis%Optical_Thickness_Water_Mean(ip)=missing_val
     385    endif
     386    if(modis%Optical_Thickness_Ice_Mean(ip).eq.R_UNDEF)then
     387       modis%Optical_Thickness_Ice_Mean(ip)=missing_val
     388    endif
     389    if(modis%Cloud_Particle_Size_Water_Mean(ip).eq.R_UNDEF)then
     390       modis%Cloud_Particle_Size_Water_Mean(ip)=missing_val
     391    endif
     392    if(modis%Cloud_Particle_Size_Ice_Mean(ip).eq.R_UNDEF)then
     393       modis%Cloud_Particle_Size_Ice_Mean(ip)=missing_val
     394    endif
     395    if(modis%Cloud_Top_Pressure_Total_Mean(ip).eq.R_UNDEF)then
     396       modis%Cloud_Top_Pressure_Total_Mean(ip)=missing_val
     397    endif
     398    if(modis%Liquid_Water_Path_Mean(ip).eq.R_UNDEF)then
     399       modis%Liquid_Water_Path_Mean(ip)=missing_val
     400    endif
     401    if(modis%Ice_Water_Path_Mean(ip).eq.R_UNDEF)then
     402       modis%Ice_Water_Path_Mean(ip)=missing_val
     403    endif
     404
     405  enddo
     406
     407    where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) &
    338408          modis%Optical_Thickness_Total_LogMean = missing_val
    339409           
    340   where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) &
     410 
     411    where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) &
    341412          modis%Optical_Thickness_Water_LogMean = missing_val
    342413
    343   where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) &
     414    where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) &
    344415          modis%Optical_Thickness_Ice_LogMean = missing_val
    345416   
    346   if (cfg%Lcllmodis) CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean)
    347   if (cfg%Lclhmodis) CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean)
    348   if (cfg%Lclmmodis) CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean)
    349   if (cfg%Lcltmodis) CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean)
    350   if (cfg%Lclwmodis) CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean)
    351   if (cfg%Lclimodis) CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean)
    352   if (cfg%Ltautmodis)  CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean)
    353   if (cfg%Ltauwmodis) CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean)
    354   if (cfg%Ltauimodis) CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean)
    355   if (cfg%Ltautlogmodis) CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean) 
    356   if (cfg%Ltauwlogmodis) CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean)
    357   if (cfg%Ltauilogmodis) CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean)
    358   if (cfg%Lreffclwmodis) CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean)
    359   if (cfg%Lreffclimodis) CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean)
    360   if (cfg%Lpctmodis) CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean)
    361   if (cfg%Llwpmodis) CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean)
    362   if (cfg%Liwpmodis) CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean)
    363 
    364     where(modis%Optical_Thickness_vs_Cloud_Top_Pressure == R_UNDEF) &
    365           modis%Optical_Thickness_vs_Cloud_Top_Pressure = missing_val
    366 
    367 #ifdef CPP_XIOS
    368    if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure)
     417   CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean)
     418   CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean)
     419   CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean)
     420   CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean)
     421   CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean)
     422   CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean)
     423   CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean)
     424   CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean)
     425   CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean)
     426   CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean) 
     427   CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean)
     428   CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean)
     429   CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean)
     430   CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean)
     431   CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean)
     432   CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean)
     433   CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean)
     434
     435   do ip=1,Npoints
     436     do ii=1,7
     437       do k=1,7
     438       if(modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k).eq.R_UNDEF)then
     439          modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=missing_val
     440        endif
     441       enddo
     442     enddo
     443    enddo
     444
     445#ifdef CPP_XIOS
     446   CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure)
    369447#else
    370   if (cfg%Lclmodis) then
    371448   do icl=1,7
    372449   CALL histwrite3d_cosp(o_clmodis, &
    373450     modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl)           
    374451   enddo
    375   endif
    376452#endif
    377453
     
    383459
    384460#ifdef CPP_XIOS
    385   if (cfg%Lcrimodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce)
    386   if (cfg%Lcrlmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq)
     461!    print*,'dimension de crimodis=',size(modis%Optical_Thickness_vs_ReffIce,2),&
     462!                                    size(modis%Optical_Thickness_vs_ReffIce,3)
     463    CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce)
     464    CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq)
    387465#else
    388   if (cfg%Lcrimodis) then
    389466    do icl=1,7
    390      CALL histwrite3d_cosp(o_crimodis, &
    391           modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl)
     467   CALL histwrite3d_cosp(o_crimodis, &
     468     modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl)
     469   CALL histwrite3d_cosp(o_crlmodis, &
     470     modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl)
    392471    enddo
    393   endif
    394   if (cfg%Lcrlmodis) then
    395     do icl=1,7
    396      CALL histwrite3d_cosp(o_crlmodis, &
    397           modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl)
    398     enddo
    399   endif
    400 #endif
    401  endif !modis
     472#endif
     473 endif
    402474
    403475 IF(.NOT.cosp_varsdefined) THEN
     
    843915
    844916#ifdef CPP_XIOS
    845 !    IF (ok_all_xml) THEN
     917    IF (ok_all_xml) THEN
    846918     CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2))
    847919     IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name
    848 !    ENDIF
     920    ENDIF
    849921#endif
    850922
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/lidar_simulator.F90

    r3356 r3411  
    121121!---------------------------------------------------------------------------------
    122122
    123       USE MOD_COSP_CONSTANTS, only : ok_debug_cosp
    124123      IMPLICIT NONE
    125124      REAL :: SRsat
     
    202201      REAL pnorm_perp_liq(npoints,nlev) ! perpendicular lidar backscattered signal power for liq
    203202
    204       REAL :: seuil
    205 
    206203! Output variable
    207204      REAL pnorm_perp_tot (npoints,nlev) ! perpendicular lidar backscattered signal power
     
    238235         Gamma = 0.009
    239236
    240   if (ok_debug_cosp) then
    241      seuil=1.e-18
    242   else
    243      seuil=0.0
    244   endif
    245237!------------------------------------------------------------
    246238!---- 1. Preliminary definitions and calculations :
     
    502494
    503495      DO k= nlev, 1, -1
    504          pnorm_perp_ice(:,k) = Alpha * pnorm_ice(:,k) ! Ice particles
    505          pnorm_perp_liq(:,k) = 1000*Beta * pnorm_liq(:,k)**2 + Gamma * pnorm_liq(:,k) ! Liquid particles
     496              pnorm_perp_ice(:,k) = Alpha * pnorm_ice(:,k) ! Ice particles
     497              pnorm_perp_liq(:,k) = 1000*Beta * pnorm_liq(:,k)**2 + Gamma * pnorm_liq(:,k) ! Liquid particles
    506498      ENDDO
    507499
     
    531523          tautot_lay_liq(:) = tautot_liq(:,k)-tautot_liq(:,k+1)
    532524        WHERE (tautot_lay_liq(:).GT.0.)
    533          beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ max(seuil,EXP(-2.0*tautot_liq(:,k+1))) &
    534             & * (2.*tautot_lay_liq(:)) / (1.-exp(-2.0*tautot_lay_liq(:)))
     525         beta_perp_liq(:,k) = pnorm_perp_liq(:,k)/ EXP(-2.0*tautot_liq(:,k+1)) * (2.*tautot_lay_liq(:)) &
     526            & / (1.-exp(-2.0*tautot_lay_liq(:)))
    535527
    536528        ELSEWHERE
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/phys_cosp.F90

    r3356 r3411  
    8484  use cosp_output_write_mod
    8585!  use MOD_COSP_Modis_Simulator, only : cosp_modis
    86 #ifdef CPP_XIOS
    87     USE xios, ONLY: xios_field_is_active
    88 #endif
    89   use cosp_read_otputkeys
    9086
    9187  IMPLICIT NONE
     
    140136!$OMP THREADPRIVATE(debut_cosp)
    141137
    142   logical, save :: first_write=.true.
    143 !$OMP THREADPRIVATE(first_write)
    144 
    145138!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM
    146139  integer                         :: overlaplmdz   !  overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz)
     
    154147  real                            :: dtime,freq_cosp
    155148  real,dimension(2)               :: time_bnds
    156 
    157   double precision                            :: d_dtime
    158   double precision,dimension(2)               :: d_time_bnds
    159149 
    160   real,dimension(2,SR_BINS) :: sratio_bounds
    161   real,dimension(SR_BINS)   ::  sratio_ax
    162 
    163150   namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, &
    164151              npoints_it,ncolumns,use_vgrid,nlr,csat_vgrid, &
     
    170157
    171158!---------------- End of declaration of variables --------------
     159   
    172160
    173161!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    182170  CALL read_cosp_input
    183171
    184 ! Clefs Outputs initialisation
    185   call cosp_outputkeys_init(cfg)
    186 !!!   call cosp_outputkeys_test(cfg)
    187   print*,' Cles des differents simulateurs cosp a itap :',itap
    188   print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', &
    189           cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, &
    190           cfg%Lrttov_sim,cfg%Lstats
     172! Clefs Outputs
     173  call read_cosp_output_nl(cosp_output_nl,cfg)
    191174
    192175    if (overlaplmdz.ne.overlap) then
     
    195178   print*,'Fin lecture Namelists, debut_cosp =',debut_cosp
    196179
     180  print*,' Cles des differents simulateurs cosp :'
     181  print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim', &
     182          cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim,cfg%Lrttov_sim
     183
    197184  endif ! debut_cosp
    198 
    199 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml
    200   if ((itap.gt.1).and.(first_write))then
    201 #ifdef CPP_XIOS
    202     call read_xiosfieldactive(cfg)
    203 #else
    204     call read_cosp_output_nl(itap,cosp_output_nl,cfg)
    205 #endif
    206     first_write=.false.
    207 
    208     print*,' Cles des differents simulateurs cosp a itap :',itap
    209     print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', &
    210           cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, &
    211           cfg%Lrttov_sim,cfg%Lstats
    212   endif
    213185
    214186  time_bnds(1) = dtime-dtime/2.
    215187  time_bnds(2) = dtime+dtime/2.
    216188
    217   d_time_bnds=time_bnds
    218   d_dtime=dtime
    219 
     189!  print*,'Debut phys_cosp itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf ', &
     190!          itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf
    220191!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    221192! Allocate memory for gridbox type
     
    224195!        print *, 'Allocating memory for gridbox type...'
    225196
     197!! AI
     198!        call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, &
     199!                                    Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, &
     200!                                    lidar_ice_type,isccp_topheight,isccp_topheight_direction,overlap,emsfc_lw, &
     201!                                    use_precipitation_fluxes,use_reff, &
     202!                                    Platform,Satellite,Instrument,Nchannels,ZenAng, &
     203!                                    channels(1:Nchannels),surfem(1:Nchannels),co2,ch4,n2o,co,gbx)
    226204! Surafce emissivity
    227205        emsfc_lw = 1.
    228206
    229         call construct_cosp_gridbox(d_dtime,d_time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, &
     207        call construct_cosp_gridbox(dtime,time_bnds,radar_freq,surface_radar,use_mie_tables,use_gas_abs, &
    230208                                    do_ray,melt_lay,k2, &
    231209                                    Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, &
     
    343321
    344322!+++++++++++++ Open output files and define output files axis !+++++++++++++
    345 !    if (debut_cosp) then
     323     if (debut_cosp) then
    346324
    347325      !$OMP MASTER
    348 !        print *, ' Open outpts files and define axis'
     326        print *, ' Open outpts files and define axis'
    349327        call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, &
    350328                              ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, &
     
    353331      !$OMP BARRIER
    354332        debut_cosp=.false.
    355 !      endif ! debut_cosp
    356 !    else
     333      endif ! debut_cosp
    357334!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    358335        ! Call simulator
     
    367344!#endif
    368345!!
     346
    369347!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    370348
     
    375353                               cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, &
    376354                               isccp, misr, modis)
    377 !    endif !debut_cosp
     355
    378356!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    379357        ! Deallocate memory in derived types
    380358!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    381         print *, 'Deallocating memory...'
     359!        print *, 'Deallocating memory...'
    382360        call free_cosp_gridbox(gbx)
    383361        call free_cosp_subgrid(sgx)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cosp/radar_simulator_types.F90

    r3356 r3411  
    44! Part of QuickBeam v1.03 by John Haynes
    55! Updated by Roj Marchand June 2010
    6   implicit none
     6
    77  integer, parameter ::       &
    88  maxhclass = 20         ,& ! max number of hydrometeor classes
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cpl_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cv3_crit.F90

    r3356 r3411  
    1010  ! **************************************************************
    1111
    12   IMPLICIT NONE
    1312
    1413  include "cv3param.h"
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cv3_enthalpmix.F90

    r3356 r3411  
    5050  REAL                                      :: cpn
    5151  REAL                                      :: x, y, p0, p0m1, zdelta, zcor
    52   REAL, SAVE                                :: dpmin=1.
     52  REAL                                      :: dpmin=1.
    5353!$OMP THREADPRIVATE(dpmin)
    5454  REAL, DIMENSION(len)                      :: plim2p  ! = min(plim2(:),plim1(:)-dpmin)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cv3_estatmix.F90

    r3356 r3411  
    5353  REAL                                      :: cpn
    5454  REAL                                      :: x, y, p0, zdelta, zcor
    55   REAL, SAVE                                :: dpmin=1.
     55  REAL                                      :: dpmin=1.
    5656!$OMP THREADPRIVATE(dpmin)
    5757  REAL, DIMENSION(len)                      :: plim2p  ! = min(plim2(:),plim1(:)-dpmin)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cv3_routines.F90

    r3356 r3411  
    34053405DO i = 2, nlp
    34063406  DO il = 1, ncum
    3407     IF (i<=inb(il)+1) THEN
    3408       upwd(il,i) = max(0., upwd(il,i-1) - up_to(il,i-1) + up_from(il,i-1))
    3409     ENDIF
     3407    upwd(il,i) = max(0., upwd(il,i-1) - up_to(il,i-1) + up_from(il,i-1))
    34103408  ENDDO
    34113409ENDDO
     
    43744372
    43754373!inputs:
    4376   INTEGER, INTENT (IN)                               :: ncum, nd, na, nloc, len
    4377   INTEGER, DIMENSION (len), INTENT (IN)              :: icb, inb
    4378   REAL, DIMENSION (len, na, na), INTENT (IN)         :: ment, sigij, elij
    4379   REAL, DIMENSION (len, nd), INTENT (IN)             :: clw
    4380   REAL, DIMENSION (len, na), INTENT (IN)             :: ep
    4381   REAL, DIMENSION (len, nd+1), INTENT (IN)           :: Vprecip
     4374  INTEGER ncum, nd, na, nloc, len
     4375  REAL ment(nloc, na, na), sigij(nloc, na, na)
     4376  REAL clw(nloc, nd), elij(nloc, na, na)
     4377  REAL ep(nloc, na)
     4378  INTEGER icb(nloc), inb(nloc)
     4379  REAL Vprecip(nloc, nd+1)
    43824380!ouputs:
    4383   REAL, DIMENSION (len, na, na), INTENT (OUT)        :: phi, phi2, epmlmMm
    4384   REAL, DIMENSION (len, na), INTENT (OUT)            :: da, d1a, dam, eplaMm
    4385 !
     4381  REAL da(nloc, na), phi(nloc, na, na)
     4382  REAL phi2(nloc, na, na)
     4383  REAL d1a(nloc, na), dam(nloc, na)
     4384  REAL epmlmMm(nloc, na, na), eplaMm(nloc, na)
    43864385! variables pour tracer dans precip de l'AA et des mel
    43874386!local variables:
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cva_driver.F90

    r3356 r3411  
    12031203                           wdtrainA1, wdtrainM1,                       & ! RomP
    12041204                           qtc1, sigt1, epmax_diag1) ! epmax_cape
    1205 !   
    1206       IF (prt_level >= 10) THEN
    1207         Print *, 'cva_driver after cv3_uncompress:ft1(1) , ftd1(1) ', &
    1208                     ft1(igout,1), ftd1(igout,1)
    1209         Print *, 'cva_driver after cv3_uncompress:fq1(1) , fqd1(1) ', &
    1210                     fq1(igout,1), fqd1(igout,1)
    1211       ENDIF
    1212 !   
    12131205    END IF
    12141206
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cvltr_noscav.F90

    r3356 r3411  
    3939  INTEGER                         :: i,k,j
    4040  REAL                            :: pdtimeRG
    41   REAL                            :: smallest_mp
    4241  real conserv
    4342  real smfd
     
    4847! calcul des tendances liees au downdraft
    4948! =========================================
    50 !
    51   smallest_mp = tiny(mp(1,1))
    5249!cdir collapse
    5350  qfeed(:,it) = 0.
     
    8885     DO j=k-1,1,-1
    8986        DO i=1,klon
    90 !!           if(mp(i,j+1).ne.0) then
    91 !!              zmd(i,j,k)=zmd(i,j+1,k)*min(1.,mp(i,j)/mp(i,j+1))
    92 !!           ENDif
    93            zmd(i,j,k)=zmd(i,j+1,k)*mp(i,j)/max(mp(i,j),mp(i,j+1),smallest_mp)
     87           if(mp(i,j+1).ne.0) then
     88              zmd(i,j,k)=zmd(i,j+1,k)*min(1.,mp(i,j)/mp(i,j+1))
     89           ENDif
    9490        END DO
    9591     END DO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/dyn1d/1DUTILS.h

    r3356 r3411  
    35693569        read (ilesfile,*) kmax2,nt1,nt2
    35703570        if (nt2>ntrac) then
    3571           stop 'Augmenter le nombre de traceurs dans traceur.def'
     3571          stop'Augmenter le nombre de traceurs dans traceur.def'
    35723572        endif
    35733573        if (kmax .ne. kmax2) then
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/dyn1d/1D_decl_cases.h

    r3356 r3411  
    228228        logical  :: trouve_700=.true.
    229229        parameter (dt_sandu=6.*3600.)   ! forcages donnes ttes les 6 heures par ifa_sandu.txt
    230         parameter (tau_sandu=30000*3600.)  ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa
     230        parameter (tau_sandu=3600.)  ! temps de relaxation u,v,thetal,qt vers profil init et au dessus 700hPa
    231231!!
    232232        real ts_sandu(nt_sandu)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/dyn1d/1D_nudge_sandu_astex.h

    r3356 r3411  
    2020!     print *,'l dt  relax dtadv',l,dt_phys(l),relax_thl(l),d_t_adv(l)
    2121      enddo
    22 
    23         u(1:mxcalc)=u(1:mxcalc) + timestep*( du_age(1:mxcalc)+             &         
     22        u(1:mxcalc)=u(1:mxcalc) + timestep*(                                &         
    2423     &              du_phys(1:mxcalc) - relax_u(1:mxcalc))
    25         v(1:mxcalc)=v(1:mxcalc) + timestep*( dv_age(1:mxcalc)+              &
     24        v(1:mxcalc)=v(1:mxcalc) + timestep*(                                &
    2625     &               dv_phys(1:mxcalc) - relax_v(1:mxcalc))
     26!       q(1:mxcalc,:)=q(1:mxcalc,:)+timestep*(
     27!    .              dq(1:mxcalc,:) - relax_q(1:mxcalc,:)+
     28!    .              d_q_adv(1:mxcalc,:))
    2729        q(1:mxcalc,1)=q(1:mxcalc,1)+timestep*(                              &
    2830     &      dq(1:mxcalc,1) - relax_q(1:mxcalc,1)+d_q_adv(1:mxcalc,1))
     
    3234     &      dt_phys(1:mxcalc)-relax_thl(1:mxcalc)+d_t_adv(1:mxcalc))
    3335
    34 
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/dyn1d/lmdz1d.F90

    r3356 r3411  
    286286       hthturb_gcssold = 0.
    287287       hqturb_gcssold = 0.
    288 
    289 
    290 
    291288
    292289!---------------------------------------------------------------------
     
    512509      call ymds2ju(annee_ref,mois,day_ref,heure,day)
    513510      day_ini = int(day)
    514       day_end = day_ini + int(fnday)
     511      day_end = day_ini + fnday
    515512
    516513      IF (forcing_type .eq.2) THEN
     
    585582      call infotrac_init
    586583
    587       if (nqtot>nqmx) STOP 'Augmenter nqmx dans lmdz1d.F'
     584      if (nqtot>nqmx) STOP'Augmenter nqmx dans lmdz1d.F'
    588585      allocate(q(llm,nqtot)) ; q(:,:)=0.
    589586      allocate(dq(llm,nqtot))
     
    988985!
    989986!=====================================================================
    990        CALL iophys_ini
    991987! START OF THE TEMPORAL LOOP :
    992988!=====================================================================
     
    11131109      endif     
    11141110!RC
    1115       if (forcing_sandu) then
    1116          ug(1:llm)=u_mod(1:llm)
    1117          vg(1:llm)=v_mod(1:llm)
    1118       endif
    11191111
    11201112      IF (prt_level >= 5) print*, 'fcoriolis, xlat,mxcalc ', &
    11211113                                   fcoriolis, xlat,mxcalc
    11221114
     1115       du_age(1:mxcalc)=fcoriolis*(v(1:mxcalc)-vg(1:mxcalc))
     1116       dv_age(1:mxcalc)=-fcoriolis*(u(1:mxcalc)-ug(1:mxcalc))
    11231117!       print *,'u-ug=',u-ug
    11241118
    11251119!!!!!!!!!!!!!!!!!!!!!!!!
    11261120! Geostrophic wind
    1127 ! Le calcul ci dessous est insuffisamment precis
    1128 !      du_age(1:mxcalc)=fcoriolis*(v(1:mxcalc)-vg(1:mxcalc))
    1129 !      dv_age(1:mxcalc)=-fcoriolis*(u(1:mxcalc)-ug(1:mxcalc))
    11301121!!!!!!!!!!!!!!!!!!!!!!!!
    11311122       sfdt = sin(0.5*fcoriolis*timestep)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ener_conserv.F90

    r3356 r3411  
    222222      DO k=1,klev
    223223        bils_ec(:)=bils_ec(:)-d_t_ec(:,k)*masse(:,k)
     224        bils_tke(:)=bils_tke(:)+0.5*(dtke(:,k)+dtke(:,k+1))*masse(:,k)
    224225        bils_diss(:)=bils_diss(:)-d_t_diss(:,k)*masse(:,k)
    225226        bils_kinetic(:)=bils_kinetic(:)+masse(:,k)* &
     
    234235      ENDDO
    235236      bils_ec(:)=rcpd*bils_ec(:)/pdtphys
     237      bils_tke(:)=bils_tke(:)/pdtphys
    236238      bils_diss(:)=rcpd*bils_diss(:)/pdtphys
    237239      bils_kinetic(:)= 0.5*bils_kinetic(:)/pdtphys
    238240      bils_enthalp(:)=rcpd*bils_enthalp(:)/pdtphys
    239241      bils_latent(:)=rlvtt*bils_latent(:)/pdtphys
    240 !jyg<
    241       IF (iflag_pbl > 1) THEN
    242         DO k=1,klev
    243           bils_tke(:)=bils_tke(:)+0.5*(dtke(:,k)+dtke(:,k+1))*masse(:,k)
    244         ENDDO
    245         bils_tke(:)=bils_tke(:)/pdtphys
    246       ENDIF  ! (iflag_pbl > 1)
    247 !>jyg
    248242
    249243IF (iflag_ener_conserv>=1) THEN
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/flott_gwd_rando_m.F90

    r3356 r3411  
    1818      use dimphy, only: klon, klev
    1919      use assert_m, only: assert
    20       USE ioipsl_getin_p_mod, ONLY : getin_p
    21       USE vertical_layers_mod, ONLY : presnivs
    22 
    2320      include "YOMCST.h"
    2421      include "clesphys.h"
     
    106103    REAL PH(KLON, KLEV + 1) ! Pressure at 1/2 levels
    107104    REAL PSEC ! Security to avoid division by 0 pressure
     105    REAL PHM1(KLON, KLEV + 1) ! 1/Press at 1/2 levels
    108106    REAL BV(KLON, KLEV + 1) ! Brunt Vaisala freq. (BVF) at 1/2 levels
    109107    REAL BVSEC ! Security to avoid negative BVF
    110     REAL RAN_NUM_1,RAN_NUM_2,RAN_NUM_3
    111 
    112     REAL, DIMENSION(klev+1) ::HREF
    113 
    114     LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
    115     LOGICAL, SAVE :: firstcall = .TRUE.
    116   !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
    117 
    118     CHARACTER (LEN=20) :: modname='flott_gwd_rando'
    119     CHARACTER (LEN=80) :: abort_message
    120 
    121 
    122 
    123   IF (firstcall) THEN
    124     ! Cle introduite pour resoudre un probleme de non reproductibilite
    125     ! Le but est de pouvoir tester de revenir a la version precedenete
    126     ! A eliminer rapidement
    127     CALL getin_p('gwd_reproductibilite_mpiomp',gwd_reproductibilite_mpiomp)
    128     IF (NW+3*NA>=KLEV) THEN
    129        abort_message = 'NW+3*NA>=KLEV Probleme pour generation des ondes'
    130        CALL abort_physic (modname,abort_message,1)
    131     ENDIF
    132     firstcall=.false.
    133   ENDIF
    134 
    135108
    136109    !-----------------------------------------------------------------
     
    183156    ZOISEC = 1.E-6 ! Security FOR 0 INTRINSIC FREQ
    184157
    185 IF (1==0) THEN
    186158    !ONLINE
    187159        call assert(klon == (/size(pp, 1), size(tt, 1), size(uu, 1), &
     
    195167          "FLOTT_GWD_RANDO klev")
    196168    !END ONLINE
    197 ENDIF
    198169
    199170    IF(DELTAT < DTIME)THEN
     
    212183    DO LL = 2, KLEV
    213184       PH(:, LL) = EXP((LOG(PP(:, LL)) + LOG(PP(:, LL - 1))) / 2.)
    214     end DO
     185       PHM1(:, LL) = 1. / PH(:, LL)
     186    end DO
     187
    215188    PH(:, KLEV + 1) = 0.
     189    PHM1(:, KLEV + 1) = 1. / PSEC
    216190    PH(:, 1) = 2. * PP(:, 1) - PH(:, 2)
    217191
    218192    ! Launching altitude
    219 
    220     !Pour revenir a la version non reproductible en changeant le nombre de process
    221     IF (gwd_reproductibilite_mpiomp) THEN
    222        ! Reprend la formule qui calcule PH en fonction de PP=play
    223        DO LL = 2, KLEV
    224           HREF(LL) = EXP((LOG(presnivs(LL)) + LOG(presnivs(LL - 1))) / 2.)
    225        end DO
    226        HREF(KLEV + 1) = 0.
    227        HREF(1) = 2. * presnivs(1) - HREF(2)
    228     ELSE
    229        HREF(1:KLEV)=PH(KLON/2,1:KLEV)
    230     ENDIF
    231193
    232194    LAUNCH=0
    233195    LTROP =0
    234196    DO LL = 1, KLEV
    235        IF (HREF(LL) / HREF(1) > XLAUNCH) LAUNCH = LL
     197       IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XLAUNCH) LAUNCH = LL
    236198    ENDDO
    237199    DO LL = 1, KLEV
    238        IF (HREF(LL) / HREF(1) > XTROP) LTROP = LL
     200       IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XTROP) LTROP = LL
    239201    ENDDO
    240     !LAUNCH=22 ; LTROP=33
    241 !   print*,'LAUNCH=',LAUNCH,'LTROP=',LTROP
    242202
    243203    ! Log pressure vert. coordinate
     
    285245    ! waves characteristics in an almost stochastic way
    286246
    287     DO JW = 1, NW
     247    JW = 0
     248    DO JP = 1, NP
     249       DO JK = 1, NK
     250          DO JO = 1, NO
     251             JW = JW + 1
    288252             ! Angle
    289253             DO II = 1, KLON
    290254                ! Angle (0 or PI so far)
    291                 RAN_NUM_1=MOD(TT(II, JW) * 10., 1.)
    292                 RAN_NUM_2= MOD(TT(II, JW) * 100., 1.)
    293                 ZP(JW, II) = (SIGN(1., 0.5 - RAN_NUM_1) + 1.) &
     255                ZP(JW, II) = (SIGN(1., 0.5 - MOD(TT(II, JW) * 10., 1.)) + 1.) &
    294256                     * RPI / 2.
    295257                ! Horizontal wavenumber amplitude
    296                 ZK(JW, II) = KMIN + (KMAX - KMIN) *RAN_NUM_2
     258                ZK(JW, II) = KMIN + (KMAX - KMIN) * MOD(TT(II, JW) * 100., 1.)
    297259                ! Horizontal phase speed
    298260                CPHA = 0.
    299261                DO JJ = 1, NA
    300                     RAN_NUM_3=MOD(TT(II, JW+3*JJ)**2, 1.)
    301262                    CPHA = CPHA + &
    302                     CMAX*2.*(RAN_NUM_3 -0.5)*SQRT(3.)/SQRT(NA*1.)
     263         CMAX*2.*(MOD(TT(II, JW+3*JJ)**2, 1.)-0.5)*SQRT(3.)/SQRT(NA*1.)
    303264                END DO
    304265                IF (CPHA.LT.0.)  THEN
     
    315276                RUW0(JW, II) = RUWMAX
    316277             ENDDO
    317     ENDDO
     278          end DO
     279       end DO
     280    end DO
    318281
    319282    ! 4. COMPUTE THE FLUXES
     
    454417    ENDDO
    455418
    456 
    457419  END SUBROUTINE FLOTT_GWD_RANDO
    458420
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/fonte_neige_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/freinage.F90

    r3356 r3411  
    55       tt,veget,lai, height,ypaprs,ypplay,drag_pro,d_u,d_v)
    66
     7
    78    !ONLINE:
    89    use dimphy, only: klon, klev
    910!    USE control, ONLY: nvm
    1011!    USE indice_sol_mod, only : nvm_orch
    11 
    12     IMPLICIT NONE
    1312
    1413
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/global_mean.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/hbtm.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/hbtm2l.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/hines_gwd.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/icefrac_lsc_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/indice_sol_mod.F90

    r3356 r3411  
    11      MODULE indice_sol_mod
    2 
    3             IMPLICIT NONE
    4 
    52            INTEGER, PARAMETER :: nbsrf = 4 ! nombre de sous-fractions pour une maille
    63            INTEGER, PARAMETER :: is_ter=1, is_lic=2, is_oce = 3, is_sic=4
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/infotrac_phy.F90

    r3356 r3411  
    4343  INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE    :: iqfils
    4444  INTEGER, ALLOCATABLE, DIMENSION(:), SAVE    :: iqpere
    45 !$OMP THREADPRIVATE(nqfils,nqdesc,nqdesc_tot,iqfils,iqpere)
     45!$OMP THREADPRIVATE(nqfils,nqdesc,nqdesc_tot,iqfils,iqpers)
    4646
    4747! conv_flg(it)=0 : convection desactivated for tracer number it
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ini_bilKP_ave.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ini_bilKP_ins.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/interfoce_lim.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iophy.F90

    r3356 r3411  
    1212  INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: nptabij
    1313  INTEGER, SAVE :: itau_iophy
    14   LOGICAL :: check_dim = .false.
    1514
    1615!$OMP THREADPRIVATE(itau_iophy)
     
    3534! ug Routine pour définir itau_iophy depuis phys_output_write_mod:
    3635  SUBROUTINE set_itau_iophy(ito)
    37     IMPLICIT NONE
    38     INTEGER, INTENT(IN) :: ito
    39     itau_iophy = ito
     36      IMPLICIT NONE
     37      INTEGER, INTENT(IN) :: ito
     38      itau_iophy = ito
    4039  END SUBROUTINE
    4140
    4241  SUBROUTINE init_iophy_new(rlat,rlon)
    43 
    44     USE dimphy, ONLY: klon
    45     USE mod_phys_lmdz_para, ONLY: gather, bcast, &
    46                                   jj_nb, jj_begin, jj_end, ii_begin, ii_end, &
    47                                   mpi_size, mpi_rank, klon_mpi, &
     42  USE dimphy, ONLY: klon
     43  USE mod_phys_lmdz_para, ONLY: gather, bcast, &
     44                                jj_nb, jj_begin, jj_end, ii_begin, ii_end, &
     45                                mpi_size, mpi_rank, klon_mpi, &
    4846                                is_sequential, is_south_pole_dyn
    4947  USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid_type, unstructured
    5048  USE print_control_mod, ONLY: prt_level,lunout
    5149#ifdef CPP_IOIPSL
    52     USE ioipsl, ONLY: flio_dom_set
     50  USE ioipsl, ONLY: flio_dom_set
    5351#endif
    5452#ifdef CPP_XIOS
    5553  use wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_context_init
    56     USE wxios, ONLY: wxios_domain_param
    57 #endif
    58     IMPLICIT NONE
     54#endif
     55  IMPLICIT NONE
    5956    REAL,DIMENSION(klon),INTENT(IN) :: rlon
    6057    REAL,DIMENSION(klon),INTENT(IN) :: rlat
     
    175172  END SUBROUTINE init_iophy_new
    176173
    177 
    178174  SUBROUTINE init_iophy(lat,lon)
    179 
    180     USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
    181                                   mpi_size, mpi_rank
    182     USE ioipsl, ONLY: flio_dom_set
    183     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    184 
    185     IMPLICIT NONE
    186 
     175  USE mod_phys_lmdz_para, ONLY: jj_begin, jj_end, ii_begin, ii_end, jj_nb, &
     176                                mpi_size, mpi_rank
     177  USE ioipsl, ONLY: flio_dom_set
     178  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     179  IMPLICIT NONE
    187180    REAL,DIMENSION(nbp_lon),INTENT(IN) :: lon
    188181    REAL,DIMENSION(nbp_lat),INTENT(IN) :: lat
     
    232225#endif
    233226  IMPLICIT NONE
    234   INCLUDE 'clesphys.h'
    235    
    236   CHARACTER*(*), INTENT(IN) :: name
    237   INTEGER, INTENT(IN) :: itau0
    238   REAL,INTENT(IN) :: zjulian
    239   REAL,INTENT(IN) :: dtime
    240   CHARACTER(LEN=*), INTENT(IN) :: ffreq
    241   INTEGER,INTENT(IN) :: lev
    242   INTEGER,INTENT(OUT) :: nhori
    243   INTEGER,INTENT(OUT) :: nid_day
     227  include 'clesphys.h'
     228   
     229    CHARACTER*(*), INTENT(IN) :: name
     230    INTEGER, INTENT(IN) :: itau0
     231    REAL,INTENT(IN) :: zjulian
     232    REAL,INTENT(IN) :: dtime
     233    CHARACTER(LEN=*), INTENT(IN) :: ffreq
     234    INTEGER,INTENT(IN) :: lev
     235    INTEGER,INTENT(OUT) :: nhori
     236    INTEGER,INTENT(OUT) :: nid_day
    244237
    245238!$OMP MASTER   
    246   IF (is_sequential) THEN
    247     CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    248                  1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    249   ELSE
    250     CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    251                  1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    252   ENDIF
    253 
    254 #ifdef CPP_XIOS
    255   ! ug OMP en chantier...
    256   IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN
    257       ! ug Création du fichier
    258     IF (.not. ok_all_xml) THEN
    259       CALL wxios_add_file(name, ffreq, lev)
    260     ENDIF
    261   ENDIF
     239    IF (is_sequential) THEN
     240      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     241                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
     242    ELSE
     243      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     244                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
     245    ENDIF
     246
     247#ifdef CPP_XIOS
     248    ! ug OMP en chantier...
     249    IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN
     250        ! ug Création du fichier
     251      IF (.not. ok_all_xml) THEN
     252        CALL wxios_add_file(name, ffreq, lev)
     253      ENDIF
     254    ENDIF
    262255#endif
    263256!$OMP END MASTER
     
    283276#ifndef CPP_IOIPSL_NO_OUTPUT
    284277    IF (is_sequential) THEN
    285       CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     278      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    286279                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    287280    ELSE
    288       CALL histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     281      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    289282                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    290283    ENDIF
     
    420413
    421414#ifndef CPP_IOIPSL_NO_OUTPUT
    422      CALL histbeg(nname,pim,plon,plon_bounds, &
     415     call histbeg(nname,pim,plon,plon_bounds, &
    423416                           plat,plat_bounds, &
    424417                           itau0, zjulian, dtime, nnhori, nnid_day)
     
    461454     ENDDO
    462455#ifndef CPP_IOIPSL_NO_OUTPUT
    463      CALL histbeg(nname,npstn,npplon,npplon_bounds, &
     456     call histbeg(nname,npstn,npplon,npplon_bounds, &
    464457                            npplat,npplat_bounds, &
    465458                            itau0,zjulian,dtime,nnhori,nnid_day,phys_domain_id)
     
    474467
    475468    USE ioipsl, ONLY: histdef
    476     USE mod_phys_lmdz_para, ONLY: jj_nb, is_master
     469    USE mod_phys_lmdz_para, ONLY: jj_nb
    477470    USE phys_output_var_mod, ONLY: type_ecri, zoutm, zdtime_moy, lev_files, &
    478471                                   nid_files, nhorim, swaero_diag, dryaod_diag, nfiles, &
     
    480473    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    481474    USE aero_mod, ONLY : naero_tot, name_aero_tau
    482     USE print_control_mod, ONLY: prt_level,lunout
    483475
    484476    IMPLICIT NONE
     
    501493       zstophym=zdtime_moy
    502494    ENDIF
    503     IF (check_dim .AND. is_master) WRITE(lunout,*)'histdef2d_old for ', nomvar
     495
    504496    ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def
    505497    CALL conf_physoutputs(nomvar,flag_var)
     
    551543    USE ioipsl, ONLY: histdef
    552544    USE dimphy, ONLY: klev
    553     USE mod_phys_lmdz_para, ONLY: jj_nb, is_master
     545    USE mod_phys_lmdz_para, ONLY: jj_nb
    554546    USE phys_output_var_mod, ONLY: type_ecri, zoutm, lev_files, nid_files, &
    555547                                   nhorim, zdtime_moy, levmin, levmax, &
    556548                                   nvertm, nfiles
    557549    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    558     USE print_control_mod, ONLY: prt_level,lunout
    559550    IMPLICIT NONE
    560551
     
    572563    ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def
    573564    CALL conf_physoutputs(nomvar,flag_var)
    574 
    575     IF (check_dim .AND. is_master) WRITE(lunout,*)'histdef3d_old for ', nomvar
    576565
    577566    IF (type_ecri(iff)=='inst(X)'.OR.type_ecri(iff)=='once') THEN
     
    601590
    602591    USE ioipsl, ONLY: histdef
    603     USE mod_phys_lmdz_para, ONLY: jj_nb, is_master
     592    USE mod_phys_lmdz_para, ONLY: jj_nb
    604593    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
    605594                                   clef_stations, phys_out_filenames, lev_files, &
    606                                    nid_files, nhorim, swaerofree_diag, swaero_diag, dryaod_diag,&
     595                                   nid_files, nhorim, swaero_diag, dryaod_diag,&
    607596                                   ok_4xCO2atm
    608597    USE print_control_mod, ONLY: prt_level,lunout
     
    612601    USE wxios, ONLY: wxios_add_field_to_file
    613602#endif
    614     USE print_control_mod, ONLY: prt_level,lunout
    615603    IMPLICIT NONE
    616604
     
    623611    REAL zstophym
    624612    CHARACTER(LEN=20) :: typeecrit
    625 
    626     IF (check_dim .AND. is_master) WRITE(lunout,*)'histdef2d for ', var%name
    627613
    628614    ! ug On récupère le type écrit de la structure:
     
    686672         var%name=='toplwai' .OR. var%name=='sollwai'  ) ) ) THEN
    687673       IF  ( var%flag(iff)<=lev_files(iff) ) swaero_diag=.TRUE.
    688     ENDIF
    689 
    690     ! Set swaerofree_diag=true if at least one of the concerned variables are defined
    691     IF (var%name=='SWupTOAcleanclr' .OR. var%name=='SWupSFCcleanclr' .OR. var%name=='SWdnSFCcleanclr' .OR. &
    692         var%name=='LWupTOAcleanclr' .OR. var%name=='LWdnSFCcleanclr' ) THEN
    693        IF  ( var%flag(iff)<=lev_files(iff) ) swaerofree_diag=.TRUE.
    694674    ENDIF
    695675
     
    719699    USE ioipsl, ONLY: histdef
    720700    USE dimphy, ONLY: klev
    721     USE mod_phys_lmdz_para, ONLY: jj_nb, is_master
     701    USE mod_phys_lmdz_para, ONLY: jj_nb
    722702    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
    723703                                   clef_stations, phys_out_filenames, lev_files, &
    724                                    nid_files, nhorim, swaerofree_diag, levmin, &
     704                                   nid_files, nhorim, swaero_diag, dryaod_diag, levmin, &
    725705                                   levmax, nvertm
    726706    USE print_control_mod, ONLY: prt_level,lunout
     
    729709    USE wxios, ONLY: wxios_add_field_to_file
    730710#endif
    731     USE print_control_mod, ONLY: prt_level,lunout
    732711    IMPLICIT NONE
    733712
     
    739718    REAL zstophym
    740719    CHARACTER(LEN=20) :: typeecrit
    741 
    742     IF (check_dim .AND. is_master) WRITE(lunout,*)'histdef3d for ', var%name
    743720
    744721    ! ug On récupère le type écrit de la structure:
     
    756733    ENDIF
    757734
     735
    758736    ! Appel a la lecture des noms et niveau d'ecriture des variables dans output.def
    759737    CALL conf_physoutputs(var%name,var%flag)
     
    796774#endif
    797775    ENDIF
    798 
    799     ! Set swaerofree_diag=true if at least one of the concerned variables are defined
    800     IF (var%name=='rsucsaf' .OR. var%name=='rsdcsaf') THEN
    801        IF  ( var%flag(iff)<=lev_files(iff) ) swaerofree_diag=.TRUE.
    802     ENDIF
    803 
    804776  END SUBROUTINE histdef3d
    805777
     
    824796 
    825797  SUBROUTINE histwrite2d_phy_old(nid,lpoint,name,itau,field)
    826 
    827     USE dimphy, ONLY: klon
    828     USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
    829                                   is_sequential, klon_mpi_begin, klon_mpi_end, &
    830                                   jj_nb, klon_mpi, is_master
    831     USE ioipsl, ONLY: histwrite
    832     USE print_control_mod, ONLY: prt_level,lunout
    833     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    834 
    835     IMPLICIT NONE
     798  USE dimphy, ONLY: klon
     799  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
     800                                is_sequential, klon_mpi_begin, klon_mpi_end, &
     801                                jj_nb, klon_mpi
     802  USE ioipsl, ONLY: histwrite
     803  USE print_control_mod, ONLY: prt_level,lunout
     804  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     805  IMPLICIT NONE
    836806   
    837807    INTEGER,INTENT(IN) :: nid
     
    848818
    849819    IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
    850     IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_phy_old for ', name
    851 
     820   
    852821    CALL Gather_omp(field,buffer_omp)   
    853822!$OMP MASTER
    854823    CALL grid1Dto2D_mpi(buffer_omp,Field2d)
    855     IF (.NOT.lpoint) THEN
     824    if(.NOT.lpoint) THEN
    856825     ALLOCATE(index2d(nbp_lon*jj_nb))
    857826     ALLOCATE(fieldok(nbp_lon*jj_nb))
     
    891860
    892861  SUBROUTINE histwrite3d_phy_old(nid,lpoint,name,itau,field)
    893 
    894     USE dimphy, ONLY: klon
    895     USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
    896                                   is_sequential, klon_mpi_begin, klon_mpi_end, &
    897                                   jj_nb, klon_mpi, is_master
    898     USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    899     USE ioipsl, ONLY: histwrite
    900     USE print_control_mod, ONLY: prt_level,lunout
    901 
    902     IMPLICIT NONE
     862  USE dimphy, ONLY: klon
     863  USE mod_phys_lmdz_para, ONLY: Gather_omp, grid1Dto2D_mpi, &
     864                                is_sequential, klon_mpi_begin, klon_mpi_end, &
     865                                jj_nb, klon_mpi
     866  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     867  USE ioipsl, ONLY: histwrite
     868  USE print_control_mod, ONLY: prt_level,lunout
     869  IMPLICIT NONE
    903870   
    904871    INTEGER,INTENT(IN) :: nid
     
    913880    REAL,allocatable, DIMENSION(:,:) :: fieldok
    914881
    915     IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_phy_old for ', name
    916882
    917883    IF (size(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     
    922888    CALL grid1Dto2D_mpi(buffer_omp,field3d)
    923889    IF (.NOT.lpoint) THEN
    924       ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
    925       ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
    926       IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
    927       CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
    928       IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    929     ELSE
     890     ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
     891     ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
     892     IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
     893     CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
     894     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
     895   ELSE
    930896      nlev=size(field,2)
    931897      ALLOCATE(index3d(npstn*nlev))
     
    933899
    934900      IF (is_sequential) THEN
    935 !       klon_mpi_begin=1
    936 !       klon_mpi_end=klon
    937         DO n=1, nlev
    938         DO ip=1, npstn
    939           fieldok(ip,n)=buffer_omp(nptabij(ip),n)
    940         ENDDO
    941         ENDDO
     901!      klon_mpi_begin=1
     902!      klon_mpi_end=klon
     903       DO n=1, nlev
     904       DO ip=1, npstn
     905        fieldok(ip,n)=buffer_omp(nptabij(ip),n)
     906       ENDDO
     907       ENDDO
    942908      ELSE
    943         DO n=1, nlev
    944         DO ip=1, npstn
    945           IF(nptabij(ip).GE.klon_mpi_begin.AND. &
    946            nptabij(ip).LE.klon_mpi_end) THEN
    947            fieldok(ip,n)=buffer_omp(nptabij(ip)-klon_mpi_begin+1,n)
    948           ENDIF
    949         ENDDO
    950         ENDDO
     909       DO n=1, nlev
     910       DO ip=1, npstn
     911        IF(nptabij(ip).GE.klon_mpi_begin.AND. &
     912         nptabij(ip).LE.klon_mpi_end) THEN
     913         fieldok(ip,n)=buffer_omp(nptabij(ip)-klon_mpi_begin+1,n)
     914        ENDIF
     915       ENDDO
     916       ENDDO
    951917      ENDIF
    952918      IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
     
    954920      IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    955921    ENDIF
    956     DEALLOCATE(index3d)
    957     DEALLOCATE(fieldok)
     922  DEALLOCATE(index3d)
     923  DEALLOCATE(fieldok)
    958924!$OMP END MASTER   
    959925
    960926  END SUBROUTINE histwrite3d_phy_old
     927
     928
    961929
    962930
    963931! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    964932  SUBROUTINE histwrite2d_phy(var,field, STD_iff)
    965 
    966   USE mod_phys_lmdz_omp_transfert, ONLY: bcast_omp
    967933  USE dimphy, ONLY: klon, klev
    968934  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
    969935                                jj_nb, klon_mpi, klon_mpi_begin, &
    970                                 klon_mpi_end, is_sequential, is_master
     936                                klon_mpi_end, is_sequential
    971937  USE ioipsl, ONLY: histwrite
    972938  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
    973939                                 nfiles, vars_defined, clef_stations, &
    974                                  nid_files, swaerofree_diag, swaero_diag, dryaod_diag, ok_4xCO2atm
     940                                 nid_files
    975941  USE print_control_mod, ONLY: prt_level,lunout
    976942  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat
     
    981947
    982948  IMPLICIT NONE
    983   INCLUDE 'clesphys.h'
    984 
    985   TYPE(ctrl_out), INTENT(IN) :: var
    986   REAL, DIMENSION(:), INTENT(IN) :: field
    987   INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS.....
     949  include 'clesphys.h'
     950
     951    TYPE(ctrl_out), INTENT(IN) :: var
     952    REAL, DIMENSION(:), INTENT(IN) :: field
     953    INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS.....
    988954     
    989   INTEGER :: iff, iff_beg, iff_end
    990   LOGICAL, SAVE  :: firstx
     955    INTEGER :: iff, iff_beg, iff_end
     956    LOGICAL, SAVE  :: firstx
    991957!$OMP THREADPRIVATE(firstx)
    992958
    993   REAL,DIMENSION(klon_mpi) :: buffer_omp
    994   INTEGER, allocatable, DIMENSION(:) :: index2d
    995   REAL :: Field2d(nbp_lon,jj_nb)
    996 
    997   INTEGER :: ip
    998   REAL, ALLOCATABLE, DIMENSION(:) :: fieldok
    999 
    1000   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_phy for ',trim(var%name)
    1001 
    1002   IF (prt_level >= 10) THEN
    1003     WRITE(lunout,*)'Begin histwrite2d_phy for ',trim(var%name)
    1004   ENDIF
    1005 
     959    REAL,DIMENSION(klon_mpi) :: buffer_omp
     960    INTEGER, allocatable, DIMENSION(:) :: index2d
     961    REAL :: Field2d(nbp_lon,jj_nb)
     962
     963    INTEGER :: ip
     964    REAL, ALLOCATABLE, DIMENSION(:) :: fieldok
     965
     966    IF (prt_level >= 10) THEN
     967      WRITE(lunout,*)'Begin histwrite2d_phy for ',trim(var%name)
     968    ENDIF
    1006969! ug RUSTINE POUR LES STD LEVS.....
    1007   IF (PRESENT(STD_iff)) THEN
    1008         iff_beg = STD_iff
    1009         iff_end = STD_iff
    1010   ELSE
    1011         iff_beg = 1
    1012         iff_end = nfiles
    1013   ENDIF
     970      IF (PRESENT(STD_iff)) THEN
     971            iff_beg = STD_iff
     972            iff_end = STD_iff
     973      ELSE
     974            iff_beg = 1
     975            iff_end = nfiles
     976      ENDIF
    1014977
    1015978  ! On regarde si on est dans la phase de définition ou d'écriture:
     
    1029992      ENDIF
    1030993!$OMP END MASTER
    1031 !--broadcasting the flags that have been changed in histdef2d on OMP masters
    1032       CALL bcast_omp(swaero_diag)
    1033       CALL bcast_omp(swaerofree_diag)
    1034       CALL bcast_omp(dryaod_diag)
    1035       CALL bcast_omp(ok_4xCO2atm)
    1036 
    1037994  ELSE
    1038995
     
    11481105!$OMP END MASTER   
    11491106  ENDIF ! vars_defined
    1150 
    11511107  IF (prt_level >= 10) WRITE(lunout,*)'End histwrite2d_phy ',trim(var%name)
    1152 
    11531108  END SUBROUTINE histwrite2d_phy
    11541109
     
    11561111! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    11571112  SUBROUTINE histwrite3d_phy(var, field, STD_iff)
    1158 
    1159   USE mod_phys_lmdz_omp_transfert, ONLY: bcast_omp
    11601113  USE dimphy, ONLY: klon, klev
    11611114  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1dto2d_mpi, &
    11621115                                jj_nb, klon_mpi, klon_mpi_begin, &
    1163                                 klon_mpi_end, is_sequential, is_master
     1116                                klon_mpi_end, is_sequential
    11641117  USE ioipsl, ONLY: histwrite
    11651118  USE phys_output_var_mod, ONLY: ctrl_out, clef_files, lev_files, &
    11661119                                 nfiles, vars_defined, clef_stations, &
    1167                                  nid_files, swaerofree_diag
     1120                                 nid_files
    11681121  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, regular_lonlat, unstructured
    11691122#ifdef CPP_XIOS
     
    11731126
    11741127  IMPLICIT NONE
    1175   INCLUDE 'clesphys.h'
    1176 
    1177   TYPE(ctrl_out), INTENT(IN) :: var
    1178   REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:)
    1179   INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS.....
     1128  include 'clesphys.h'
     1129
     1130    TYPE(ctrl_out), INTENT(IN) :: var
     1131    REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:)
     1132    INTEGER, INTENT(IN), OPTIONAL :: STD_iff ! ug RUSTINE POUR LES STD LEVS.....
    11801133     
    1181   INTEGER :: iff, iff_beg, iff_end
    1182   LOGICAL, SAVE  :: firstx
     1134    INTEGER :: iff, iff_beg, iff_end
     1135    LOGICAL, SAVE  :: firstx
    11831136!$OMP THREADPRIVATE(firstx)
    1184   REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    1185   REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    1186   INTEGER :: ip, n, nlev, nlevx
    1187   INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
    1188   REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok
    1189 
    1190   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_phy for ', trim(var%name)
     1137    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
     1138    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
     1139    INTEGER :: ip, n, nlev, nlevx
     1140    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     1141    REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok
    11911142
    11921143  IF (prt_level >= 10) write(lunout,*)'Begin histrwrite3d ',var%name
     
    12021153
    12031154  ! On regarde si on est dans la phase de définition ou d'écriture:
    1204   IF (.NOT.vars_defined) THEN
     1155  IF(.NOT.vars_defined) THEN
    12051156      !Si phase de définition.... on définit
    12061157!$OMP MASTER
     
    12111162      ENDDO
    12121163!$OMP END MASTER
    1213 !--broadcasting the flag that have been changed in histdef3d on OMP masters
    1214       CALL bcast_omp(swaerofree_diag)
    12151164  ELSE
    12161165    !Et sinon on.... écrit
     
    12331182    IF (grid_type==regular_lonlat) CALL grid1Dto2D_mpi(buffer_omp,field3d)
    12341183
     1184
    12351185! BOUCLE SUR LES FICHIERS
    1236     firstx=.true.
    1237 
    1238     IF (ok_all_xml) THEN
     1186     firstx=.true.
     1187
     1188      IF (ok_all_xml) THEN
    12391189#ifdef CPP_XIOS
    12401190          IF (prt_level >= 10) THEN
     
    12501200          ELSE IF (grid_type==unstructured) THEN
    12511201            CALL xios_send_field(var%name, buffer_omp(:,1:nlevx))
    1252         ENDIF
     1202          ENDIF
    12531203
    12541204#else
    12551205        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
    12561206#endif
    1257     ELSE 
    1258 
    1259       DO iff=iff_beg, iff_end
    1260           IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN
     1207      ELSE 
     1208
     1209
     1210     DO iff=iff_beg, iff_end
     1211            IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN
    12611212#ifdef CPP_XIOS
    12621213              IF (firstx) THEN
     
    12811232              ENDIF
    12821233#endif
    1283               IF (.NOT.clef_stations(iff)) THEN
     1234                IF (.NOT.clef_stations(iff)) THEN
    12841235                        ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
    12851236                        ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
     
    12951246!#endif
    12961247!                       
    1297               ELSE
     1248                ELSE
    12981249                        nlev=size(field,2)
    12991250                        ALLOCATE(index3d(npstn*nlev))
     
    13191270                        CALL histwrite(nid_files(iff),var%name,itau_iophy,fieldok,npstn*nlev,index3d)
    13201271#endif
    1321               ENDIF
    1322               DEALLOCATE(index3d)
    1323               DEALLOCATE(fieldok)
    1324           ENDIF
     1272                  ENDIF
     1273                  DEALLOCATE(index3d)
     1274                  DEALLOCATE(fieldok)
     1275            ENDIF
    13251276      ENDDO
    1326     ENDIF
     1277      ENDIF
    13271278!$OMP END MASTER   
    13281279  ENDIF ! vars_defined
    1329 
    13301280  IF (prt_level >= 10) write(lunout,*)'End histrwrite3d ',var%name
    1331 
    13321281  END SUBROUTINE histwrite3d_phy
    13331282 
     
    13361285#ifdef CPP_XIOS
    13371286  SUBROUTINE histwrite2d_xios(field_name,field)
    1338 
    13391287  USE dimphy, ONLY: klon, klev
    13401288  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
    13411289                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    1342                                 jj_nb, klon_mpi, is_master
     1290                                jj_nb, klon_mpi
    13431291  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured
    13441292  USE xios, ONLY: xios_send_field
     
    13471295  IMPLICIT NONE
    13481296
    1349   CHARACTER(LEN=*), INTENT(IN) :: field_name
    1350   REAL, DIMENSION(:), INTENT(IN) :: field
     1297    CHARACTER(LEN=*), INTENT(IN) :: field_name
     1298    REAL, DIMENSION(:), INTENT(IN) :: field
    13511299     
    1352   REAL,DIMENSION(klon_mpi) :: buffer_omp
    1353   INTEGER, allocatable, DIMENSION(:) :: index2d
    1354   REAL :: Field2d(nbp_lon,jj_nb)
    1355 
    1356   INTEGER :: ip
    1357   REAL, ALLOCATABLE, DIMENSION(:) :: fieldok
    1358 
    1359   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite2d_xios for ', field_name
    1360 
    1361   IF (prt_level >= 10) WRITE(lunout,*)'Begin histrwrite2d_xios ',field_name
    1362 
    1363   !Et sinon on.... écrit
    1364   IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
    1365    
    1366   IF (SIZE(field) == klev) then
     1300    REAL,DIMENSION(klon_mpi) :: buffer_omp
     1301    INTEGER, allocatable, DIMENSION(:) :: index2d
     1302    REAL :: Field2d(nbp_lon,jj_nb)
     1303
     1304    INTEGER :: ip
     1305    REAL, ALLOCATABLE, DIMENSION(:) :: fieldok
     1306
     1307    IF (prt_level >= 10) WRITE(lunout,*)'Begin histrwrite2d_xios ',field_name
     1308
     1309    !Et sinon on.... écrit
     1310    IF (SIZE(field)/=klon .AND. SIZE(field)/=klev) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon/klev',1)
     1311   
     1312    IF (SIZE(field) == klev) then
    13671313!$OMP MASTER
    13681314        CALL xios_send_field(field_name,field)
    13691315!$OMP END MASTER   
    1370   ELSE
     1316    ELSE
    13711317        CALL Gather_omp(field,buffer_omp)   
    13721318!$OMP MASTER
     
    14111357      ENDIF
    14121358!$OMP END MASTER   
    1413   ENDIF
     1359    ENDIF
    14141360
    14151361  IF (prt_level >= 10) WRITE(lunout,*)'End histrwrite2d_xios ',field_name
     
    14191365! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE
    14201366  SUBROUTINE histwrite3d_xios(field_name, field)
    1421 
    14221367  USE dimphy, ONLY: klon, klev
    14231368  USE mod_phys_lmdz_para, ONLY: gather_omp, grid1Dto2D_mpi, &
    14241369                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    1425                                 jj_nb, klon_mpi, is_master
     1370                                jj_nb, klon_mpi
    14261371  USE xios, ONLY: xios_send_field
    14271372  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured
     
    14301375  IMPLICIT NONE
    14311376
    1432   CHARACTER(LEN=*), INTENT(IN) :: field_name
    1433   REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:)
    1434 
    1435   REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    1436   REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    1437   INTEGER :: ip, n, nlev
    1438   INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
    1439   REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok
    1440 
    1441   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite3d_xios for ', field_name
     1377    CHARACTER(LEN=*), INTENT(IN) :: field_name
     1378    REAL, DIMENSION(:,:), INTENT(IN) :: field ! --> field(klon,:)
     1379
     1380    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
     1381    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
     1382    INTEGER :: ip, n, nlev
     1383    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     1384    REAL,ALLOCATABLE, DIMENSION(:,:) :: fieldok
    14421385
    14431386  IF (prt_level >= 10) write(lunout,*)'Begin histrwrite3d_xios ',field_name
    14441387
    1445   !Et on.... écrit
    1446   IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
    1447    
    1448   IF (SIZE(field,1) == klev) then
     1388    !Et on.... écrit
     1389    IF (SIZE(field,1)/=klon .AND. SIZE(field,1)/=klev) CALL abort_physic('iophy::histwrite3d_xios','Field first DIMENSION not equal to klon/klev',1)
     1390   
     1391    IF (SIZE(field,1) == klev) then
    14491392!$OMP MASTER
    14501393        CALL xios_send_field(field_name,field)
    14511394!$OMP END MASTER   
    1452   ELSE
     1395    ELSE
    14531396        nlev=SIZE(field,2)
    14541397
     
    14981441      ENDIF
    14991442!$OMP END MASTER   
    1500   ENDIF
     1443    ENDIF
    15011444
    15021445  IF (prt_level >= 10) write(lunout,*)'End histrwrite3d_xios ',field_name
    1503 
    15041446  END SUBROUTINE histwrite3d_xios
    15051447
     
    15071449  SUBROUTINE histwrite0d_xios(field_name, field)
    15081450  USE xios, ONLY: xios_send_field
    1509   USE mod_phys_lmdz_para, ONLY: is_master
    1510   USE print_control_mod, ONLY: prt_level,lunout
    15111451  IMPLICIT NONE
    15121452
    1513   CHARACTER(LEN=*), INTENT(IN) :: field_name
    1514   REAL, INTENT(IN) :: field ! --> scalar
    1515 
    1516   IF (check_dim .AND. is_master) WRITE(lunout,*)'histwrite0d_xios for ', field_name
     1453    CHARACTER(LEN=*), INTENT(IN) :: field_name
     1454    REAL, INTENT(IN) :: field ! --> scalar
    15171455
    15181456!$OMP MASTER
    1519   CALL xios_send_field(field_name, field)
     1457   CALL xios_send_field(field_name, field)
    15201458!$OMP END MASTER
    15211459
     
    15241462
    15251463#endif
    1526 END MODULE iophy
     1464end module iophy
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iophys.F90

    r3356 r3411  
    9595    IF (klon/=klon_omp) THEN
    9696      print*,'klon, klon_omp',klon,klon_omp
    97       CALL abort_physic('iophys_ecrit','probleme de dimension parallele',1)
     97      STOP'probleme de dimension parallele'
    9898    ENDIF
    9999
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iostart.F90

    r3356 r3411  
    8989    LOGICAL,INTENT(OUT),OPTIONAL   :: found
    9090
    91     CALL Get_field_rgen(field_name,field,1,found)
     91    IF (PRESENT(found)) THEN
     92      CALL Get_field_rgen(field_name,field,1,found)
     93    ELSE
     94      CALL Get_field_rgen(field_name,field,1)
     95    ENDIF
    9296     
    9397  END SUBROUTINE Get_Field_r1
     
    99103    LOGICAL,INTENT(OUT),OPTIONAL   :: found
    100104
    101     CALL Get_field_rgen(field_name,field,size(field,2),found)
     105    IF (PRESENT(found)) THEN
     106      CALL Get_field_rgen(field_name,field,size(field,2),found)
     107    ELSE
     108      CALL Get_field_rgen(field_name,field,size(field,2))
     109    ENDIF
    102110
    103111     
     
    110118    LOGICAL,INTENT(OUT),OPTIONAL   :: found
    111119
    112     CALL Get_field_rgen(field_name,field,size(field,2)*size(field,3),found)
     120    IF (PRESENT(found)) THEN
     121      CALL Get_field_rgen(field_name,field,size(field,2)*size(field,3),found)
     122    ELSE
     123      CALL Get_field_rgen(field_name,field,size(field,2)*size(field,3))
     124    ENDIF
    113125     
    114126  END SUBROUTINE Get_Field_r3
     
    207219    REAL                         :: varout(1)
    208220   
    209     CALL Get_var_rgen(var_name,varout,size(varout),found)
     221    IF (PRESENT(found)) THEN
     222      CALL Get_var_rgen(var_name,varout,size(varout),found)
     223    ELSE
     224      CALL Get_var_rgen(var_name,varout,size(varout))
     225    ENDIF
    210226    var=varout(1)
    211227 
     
    218234    LOGICAL,OPTIONAL,INTENT(OUT) :: found
    219235   
    220     CALL Get_var_rgen(var_name,var,size(var),found)
     236    IF (PRESENT(found)) THEN
     237      CALL Get_var_rgen(var_name,var,size(var),found)
     238    ELSE
     239      CALL Get_var_rgen(var_name,var,size(var))
     240    ENDIF
    221241 
    222242  END SUBROUTINE get_var_r1
     
    228248    LOGICAL,OPTIONAL,INTENT(OUT) :: found
    229249   
    230     CALL Get_var_rgen(var_name,var,size(var),found)
     250    IF (PRESENT(found)) THEN
     251      CALL Get_var_rgen(var_name,var,size(var),found)
     252    ELSE
     253      CALL Get_var_rgen(var_name,var,size(var))
     254    ENDIF
    231255 
    232256  END SUBROUTINE get_var_r2
     
    238262    LOGICAL,OPTIONAL,INTENT(OUT) :: found
    239263   
    240     CALL Get_var_rgen(var_name,var,size(var),found)
     264    IF (PRESENT(found)) THEN
     265      CALL Get_var_rgen(var_name,var,size(var),found)
     266    ELSE
     267      CALL Get_var_rgen(var_name,var,size(var))
     268    ENDIF
    241269 
    242270  END SUBROUTINE get_var_r3
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iotd.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iotd_ecrit.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iotd_fin.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/iotd_ini.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/limit_slab.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/newmicro.F90

    r3356 r3411  
    11! $Id$
    22
    3 SUBROUTINE newmicro(flag_aerosol, ok_cdnc, bl95_b0, bl95_b1, paprs, pplay, t, pqlwp, pclc, &
     3
     4
     5SUBROUTINE newmicro(ok_cdnc, bl95_b0, bl95_b1, paprs, pplay, t, pqlwp, pclc, &
    46    pcltau, pclemi, pch, pcl, pcm, pct, pctlwp, xflwp, xfiwp, xflwc, xfiwc, &
    57    mass_solu_aero, mass_solu_aero_pi, pcldtaupi, re, fl, reliq, reice, &
     
    810  USE dimphy
    911  USE phys_local_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, &
    10       reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra,  &
    11       zfice, dNovrN
     12    reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra
    1213  USE phys_state_var_mod, ONLY: rnebcon, clwcon
    1314  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
    14   USE ioipsl_getin_p_mod, ONLY : getin_p
    15   USE print_control_mod, ONLY: lunout
    16 
    17 
    1815  IMPLICIT NONE
    1916  ! ======================================================================
     
    142139  ! within the grid cell)
    143140
    144   INTEGER flag_aerosol
    145141  LOGICAL ok_cdnc
    146142  REAL bl95_b0, bl95_b1 ! Parameter in B&L 95-Formula
     
    156152  REAL zrho(klon, klev) !--rho pour la couche
    157153  REAL dh(klon, klev) !--dz pour la couche
     154  REAL zfice(klon, klev)
    158155  REAL rad_chaud(klon, klev) !--rayon pour les nuages chauds
    159156  REAL rad_chaud_pi(klon, klev) !--rayon pour les nuages chauds pre-industriels
     
    165162  REAL reliq_pi(klon, klev), reice_pi(klon, klev)
    166163
    167   REAL,SAVE :: cdnc_min=-1.
    168   REAL,SAVE :: cdnc_min_m3
    169   !$OMP THREADPRIVATE(cdnc_min,cdnc_min_m3)
    170   REAL,SAVE :: cdnc_max=-1.
    171   REAL,SAVE :: cdnc_max_m3
    172   !$OMP THREADPRIVATE(cdnc_max,cdnc_max_m3)
    173 
    174164  ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    175165  ! FH : 2011/05/24
     
    183173  ! Pour retrouver les résultats numériques de la version d'origine,
    184174  ! on impose 0.71 quand on est proche de 0.71
    185 
    186   if (first) THEN
    187       call getin_p('cdnc_min',cdnc_min)
    188       cdnc_min_m3=cdnc_min*1.E6
    189       IF (cdnc_min_m3<0.) cdnc_min_m3=20.E6 ! astuce pour retrocompatibilite
    190       write(lunout,*)'cdnc_min=', cdnc_min_m3/1.E6
    191       call getin_p('cdnc_max',cdnc_max)
    192       cdnc_max_m3=cdnc_max*1.E6
    193       IF (cdnc_max_m3<0.) cdnc_max_m3=1000.E6 ! astuce pour retrocompatibilite
    194       write(lunout,*)'cdnc_max=', cdnc_max_m3/1.E6
    195   ENDIF
    196175
    197176  d_rei_dt = (rei_max-rei_min)/81.4
     
    225204        xflwc(i, k) = (1.-zfice(i,k))*pqlwp(i, k)
    226205        xfiwc(i, k) = zfice(i, k)*pqlwp(i, k)
    227       ENDDO
    228     ENDDO
     206      END DO
     207    END DO
    229208  ELSE ! of IF (iflag_t_glace.EQ.0)
    230209    DO k = 1, klev
     
    243222        xflwc(i, k) = (1.-zfice(i,k))*pqlwp(i, k)
    244223        xfiwc(i, k) = zfice(i, k)*pqlwp(i, k)
    245       ENDDO
    246     ENDDO
     224      END DO
     225    END DO
    247226  ENDIF
    248227
     
    253232    DO k = 1, klev
    254233      DO i = 1, klon
     234
    255235        ! Formula "D" of Boucher and Lohmann, Tellus, 1995
    256236        ! Cloud droplet number concentration (CDNC) is restricted
    257237        ! to be within [20, 1000 cm^3]
    258238
     239        ! --present-day case
     240        cdnc(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero(i,k), &
     241          1.E-4))/log(10.))*1.E6 !-m-3
     242        cdnc(i, k) = min(1000.E6, max(20.E6,cdnc(i,k)))
     243
    259244        ! --pre-industrial case
    260245        cdnc_pi(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero_pi(i,k), &
    261246          1.E-4))/log(10.))*1.E6 !-m-3
    262         cdnc_pi(i, k) = min(cdnc_max_m3, max(cdnc_min_m3,cdnc_pi(i,k)))
    263 
    264       ENDDO
    265     ENDDO
    266 
    267     !--flag_aerosol=7 => MACv2SP climatology
    268     !--in this case there is an enhancement factor
    269     IF (flag_aerosol .EQ. 7) THEN
    270 
    271       !--present-day
    272       DO k = 1, klev
    273         DO i = 1, klon
    274           cdnc(i, k) = cdnc_pi(i,k)*dNovrN(i)
    275         ENDDO
    276       ENDDO
    277 
    278     !--standard case
    279     ELSE
    280 
    281       DO k = 1, klev
    282         DO i = 1, klon
    283 
    284           ! Formula "D" of Boucher and Lohmann, Tellus, 1995
    285           ! Cloud droplet number concentration (CDNC) is restricted
    286           ! to be within [20, 1000 cm^3]
    287 
    288           ! --present-day case
    289           cdnc(i, k) = 10.**(bl95_b0+bl95_b1*log(max(mass_solu_aero(i,k), &
    290             1.E-4))/log(10.))*1.E6 !-m-3
    291           cdnc(i, k) = min(cdnc_max_m3, max(cdnc_min_m3,cdnc(i,k)))
    292 
    293         ENDDO
    294       ENDDO
    295 
    296     ENDIF !--flag_aerosol
    297 
    298     !--computing cloud droplet size
    299     DO k = 1, klev
    300       DO i = 1, klon
     247        cdnc_pi(i, k) = min(1000.E6, max(20.E6,cdnc_pi(i,k)))
    301248
    302249        ! --present-day case
     
    333280            zfiwp_var*(3.448E-03+2.431/rei)
    334281
    335         ENDIF
    336 
    337       ENDDO
    338     ENDDO
     282        END IF
     283
     284      END DO
     285    END DO
    339286
    340287  ELSE !--not ok_cdnc
     
    346293        rad_chaud(i, k) = rad_chau2
    347294        rad_chaud_pi(i, k) = rad_chau2
    348       ENDDO
    349     ENDDO
     295      END DO
     296    END DO
    350297    DO k = min(3, klev) + 1, klev
    351298      DO i = 1, klon
    352299        rad_chaud(i, k) = rad_chau1
    353300        rad_chaud_pi(i, k) = rad_chau1
    354       ENDDO
    355     ENDDO
    356 
    357   ENDIF !--ok_cdnc
     301      END DO
     302    END DO
     303
     304  END IF !--ok_cdnc
    358305
    359306  ! --computation of cloud optical depth and emissivity
     
    430377        pclemi(i, k) = 1.0 - exp(-coef_chau*zflwp_var-df*k_ice*zfiwp_var)
    431378
    432       ENDIF
     379      END IF
    433380
    434381      reice(i, k) = rei
     
    437384      xfiwp(i) = xfiwp(i) + xfiwc(i, k)*rhodz(i, k)
    438385
    439     ENDDO
    440   ENDDO
     386    END DO
     387  END DO
    441388
    442389  ! --if cloud droplet radius is fixed, then pcldtaupi=pcltau
     
    447394        pcldtaupi(i, k) = pcltau(i, k)
    448395        reice_pi(i, k) = reice(i, k)
    449       ENDDO
    450     ENDDO
    451   ENDIF
     396      END DO
     397    END DO
     398  END IF
    452399
    453400  DO k = 1, klev
     
    456403      reliq_pi(i, k) = rad_chaud_pi(i, k)
    457404      reice_pi(i, k) = reice(i, k)
    458     ENDDO
    459   ENDDO
     405    END DO
     406  END DO
    460407
    461408  ! COMPUTE CLOUD LIQUID PATH AND TOTAL CLOUDINESS
     
    473420    pcl(i) = 1.0
    474421    pctlwp(i) = 0.0
    475   ENDDO
     422  END DO
    476423
    477424  ! --calculation of liquid water path
     
    480427    DO i = 1, klon
    481428      pctlwp(i) = pctlwp(i) + pqlwp(i, k)*rhodz(i, k)
    482     ENDDO
    483   ENDDO
     429    END DO
     430  END DO
    484431
    485432  ! --calculation of cloud properties with cloud overlap
     
    503450            (i),kind=8),1.-zepsec))
    504451          zcloudl(i) = pclc(i, k)
    505         ENDIF
     452        END IF
    506453        zcloud(i) = pclc(i, k)
    507       ENDDO
    508     ENDDO
     454      END DO
     455    END DO
    509456  ELSE IF (novlp==2) THEN
    510457    DO k = klev, 1, -1
     
    518465        ELSE IF (paprs(i,k)>=prlmc) THEN
    519466          pcl(i) = min(pclc(i,k), pcl(i))
    520         ENDIF
    521       ENDDO
    522     ENDDO
     467        END IF
     468      END DO
     469    END DO
    523470  ELSE IF (novlp==3) THEN
    524471    DO k = klev, 1, -1
     
    532479        ELSE IF (paprs(i,k)>=prlmc) THEN
    533480          pcl(i) = pcl(i)*(1.0-pclc(i,k))
    534         ENDIF
    535       ENDDO
    536     ENDDO
    537   ENDIF
     481        END IF
     482      END DO
     483    END DO
     484  END IF
    538485
    539486  DO i = 1, klon
     
    541488    pcm(i) = 1. - pcm(i)
    542489    pcl(i) = 1. - pcl(i)
    543   ENDDO
     490  END DO
    544491
    545492  ! ========================================================
     
    562509        ELSE
    563510          lcc3d(i, k) = pclc(i, k)*phase3d(i, k)
    564         ENDIF
     511        END IF
    565512        scdnc(i, k) = lcc3d(i, k)*cdnc(i, k) ! m-3
    566       ENDDO
    567     ENDDO
     513      END DO
     514    END DO
    568515
    569516    DO i = 1, klon
     
    573520      IF (novlp.EQ.3 .OR. novlp.EQ.1) tcc(i) = 1.
    574521      IF (novlp.EQ.2) tcc(i) = 0.
    575     ENDDO
     522    END DO
    576523
    577524    DO i = 1, klon
     
    587534              WRITE (*, *) 'Hypothese de recouvrement: MAXIMUM'
    588535              first = .FALSE.
    589             ENDIF
     536            END IF
    590537            flag_max = -1.
    591538            ftmp(i) = max(tcc(i), pclc(i,k))
    592           ENDIF
     539          END IF
    593540
    594541          IF (novlp.EQ.3) THEN
     
    596543              WRITE (*, *) 'Hypothese de recouvrement: RANDOM'
    597544              first = .FALSE.
    598             ENDIF
     545            END IF
    599546            flag_max = 1.
    600547            ftmp(i) = tcc(i)*(1-pclc(i,k))
    601           ENDIF
     548          END IF
    602549
    603550          IF (novlp.EQ.1) THEN
     
    607554                &                                          RANDOM'
    608555              first = .FALSE.
    609             ENDIF
     556            END IF
    610557            flag_max = 1.
    611558            ftmp(i) = tcc(i)*(1.-max(pclc(i,k),pclc(i,k+1)))/(1.-min(pclc(i, &
    612559              k+1),1.-thres_neb))
    613           ENDIF
     560          END IF
    614561          ! Effective radius of cloud droplet at top of cloud (m)
    615562          reffclwtop(i) = reffclwtop(i) + rad_chaud(i, k)*1.0E-06*phase3d(i, &
     
    623570          tcc(i) = ftmp(i)
    624571
    625         ENDIF ! is there a visible, not-too-small cloud?
    626       ENDDO ! loop over k
     572        END IF ! is there a visible, not-too-small cloud?
     573      END DO ! loop over k
    627574
    628575      IF (novlp.EQ.3 .OR. novlp.EQ.1) tcc(i) = 1. - tcc(i)
    629576
    630     ENDDO ! loop over i
     577    END DO ! loop over i
    631578
    632579    ! ! Convective and Stratiform Cloud Droplet Effective Radius (REFFCLWC
     
    639586        lcc3dstra(i, k) = lcc3dstra(i, k) - lcc3dcon(i, k) ! eau liquide stratiforme
    640587        lcc3dstra(i, k) = max(lcc3dstra(i,k), 0.0)
    641         !FC pour la glace (CAUSES)
    642         icc3dcon(i, k) = rnebcon(i, k)*(1-phase3d(i, k))*clwcon(i, k) !  glace convective
    643         icc3dstra(i, k)= pclc(i, k)*pqlwp(i, k)*(1-phase3d(i, k))
    644         icc3dstra(i, k) = icc3dstra(i, k) - icc3dcon(i, k) ! glace stratiforme
    645         icc3dstra(i, k) = max( icc3dstra(i, k), 0.0)
    646         !FC (CAUSES)
    647 
    648588        ! Compute cloud droplet radius as above in meter
    649589        radius = 1.1*((pqlwp(i,k)*pplay(i,k)/(rd*t(i,k)))/(4./3*rpi*1000.* &
     
    656596        reffclws(i, k) = radius
    657597        reffclws(i, k) = reffclws(i, k)*lcc3dstra(i, k)
    658       ENDDO !klev
    659     ENDDO !klon
     598      END DO !klev
     599    END DO !klon
    660600
    661601    ! Column Integrated Cloud Droplet Number (CLDNVI) : variable 2D
     
    669609        lcc_integrat(i) = lcc_integrat(i) + lcc3d(i, k)*dh(i, k)
    670610        height(i) = height(i) + dh(i, k)
    671       ENDDO ! klev
     611      END DO ! klev
    672612      lcc_integrat(i) = lcc_integrat(i)/height(i)
    673613      IF (lcc_integrat(i)<=1.0E-03) THEN
     
    675615      ELSE
    676616        cldnvi(i) = cldnvi(i)*lcc(i)/lcc_integrat(i)
    677       ENDIF
    678     ENDDO ! klon
     617      END IF
     618    END DO ! klon
    679619
    680620    DO i = 1, klon
     
    686626        IF (lcc3dcon(i,k)<=0.0) lcc3dcon(i, k) = 0.0
    687627        IF (lcc3dstra(i,k)<=0.0) lcc3dstra(i, k) = 0.0
    688 !FC (CAUSES)
    689         IF (icc3dcon(i,k)<=0.0) icc3dcon(i, k) = 0.0
    690         IF (icc3dstra(i,k)<=0.0) icc3dstra(i, k) = 0.0
    691 !FC (CAUSES)
    692       ENDDO
     628      END DO
    693629      IF (reffclwtop(i)<=0.0) reffclwtop(i) = 0.0
    694630      IF (cldncl(i)<=0.0) cldncl(i) = 0.0
    695631      IF (cldnvi(i)<=0.0) cldnvi(i) = 0.0
    696632      IF (lcc(i)<=0.0) lcc(i) = 0.0
    697     ENDDO
    698 
    699   ENDIF !ok_cdnc
    700 
    701   first=.false. !to be sure
     633    END DO
     634
     635  END IF !ok_cdnc
    702636
    703637  RETURN
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/nonlocal.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/oasis.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ocean_cpl_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ocean_forced_mod.F90

    • Property svn:executable set to *
    r3356 r3411  
    162162    USE dimphy
    163163    USE calcul_fluxs_mod
    164     USE surface_data,     ONLY : calice, calsno
     164    USE surface_data,     ONLY : calice, calsno, tau_gl
    165165    USE limit_read_mod
    166166    USE fonte_neige_mod,  ONLY : fonte_neige
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/ocean_slab_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/pbl_surface_mod.F90

    • Property svn:executable set to *
    r3356 r3411  
    2323  USE climb_wind_mod,      ONLY : climb_wind_down, climb_wind_up
    2424  USE coef_diff_turb_mod,  ONLY : coef_diff_turb
    25   USE wx_pbl_mod,          ONLY : wx_pbl_init, wx_pbl_final, &
    26 !!                                  wx_pbl_fuse_no_dts, wx_pbl_split_no_dts, &
    27 !!                                  wx_pbl_fuse, wx_pbl_split
    28                                   wx_pbl0_fuse, wx_pbl0_split
     25
    2926
    3027  IMPLICIT NONE
     
    149146!    CALL getin_p('iflag_frein',iflag_frein)
    150147!
    151 !jyg<
    152 !****************************************************************************************
    153 ! Allocate variables for pbl splitting
    154 !
    155 !****************************************************************************************
    156 
    157     CALL wx_pbl_init
    158 !>jyg
    159 
    160148  END SUBROUTINE pbl_surface_init
    161149
     
    214202!!! nrlmd+jyg le 02/05/2011 et le 20/02/2012
    215203!!        tke_x,     tke_w                              &
    216        wake_dltke,                                     &
    217         treedrg                                   &
     204       wake_dltke                                     &
     205        , treedrg                                   &
    218206!FC
    219207!!!
     
    286274! pblh-----output-R- HCL
    287275! pblT-----output-R- T au nveau HCL
    288 ! treedrg--output-R- tree drag (m)               
    289 !
    290     USE carbon_cycle_mod,   ONLY : carbon_cycle_cpl, co2_send
     276!
     277    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send
    291278    USE indice_sol_mod
    292279    USE time_phylmdz_mod, ONLY: day_ini,annee_ref,itau_phy
    293280    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid1dto2d_glo
    294     USE print_control_mod,  ONLY : prt_level,lunout
    295     USE ioipsl_getin_p_mod, ONLY : getin_p
     281    USE print_control_mod, ONLY: prt_level,lunout
    296282
    297283    IMPLICIT NONE
     
    505491    CHARACTER(len=8), DIMENSION(nbsrf), SAVE :: cl_surf
    506492!$OMP THREADPRIVATE(cl_surf)
    507     REAL, SAVE                               :: beta_land         ! beta for wx_dts
    508 !$OMP THREADPRIVATE(beta_land)
    509493
    510494! Other local variables
     
    524508    REAL, DIMENSION(klon)              :: yalb,yalb_vis
    525509!albedo SB <<<
    526     REAL, DIMENSION(klon)              :: yt1, yq1, yu1, yv1
     510    REAL, DIMENSION(klon)              :: yu1, yv1
    527511    REAL, DIMENSION(klon)              :: ysnow, yqsurf, yagesno, yqsol
    528512    REAL, DIMENSION(klon)              :: yrain_f, ysnow_f
     
    733717!!! jyg le 25/03/2013
    734718!!    Variables intermediaires pour le raccord des deux colonnes \`a la surface
    735 !jyg<
    736 !!    REAL   ::   dd_Ch
    737 !!    REAL   ::   dd_Cm
    738 !!    REAL   ::   dd_Kh
    739 !!    REAL   ::   dd_Km
    740 !!    REAL   ::   dd_u
    741 !!    REAL   ::   dd_v
    742 !!    REAL   ::   dd_t
    743 !!    REAL   ::   dd_q
    744 !!    REAL   ::   dd_AH
    745 !!    REAL   ::   dd_AQ
    746 !!    REAL   ::   dd_AU
    747 !!    REAL   ::   dd_AV
    748 !!    REAL   ::   dd_BH
    749 !!    REAL   ::   dd_BQ
    750 !!    REAL   ::   dd_BU
    751 !!    REAL   ::   dd_BV
    752 !!
    753 !!    REAL   ::   dd_KHp
    754 !!    REAL   ::   dd_KQp
    755 !!    REAL   ::   dd_KUp
    756 !!    REAL   ::   dd_KVp
    757 !>jyg
     719    REAL   ::   dd_Ch
     720    REAL   ::   dd_Cm
     721    REAL   ::   dd_Kh
     722    REAL   ::   dd_Km
     723    REAL   ::   dd_u
     724    REAL   ::   dd_v
     725    REAL   ::   dd_t
     726    REAL   ::   dd_q
     727    REAL   ::   dd_AH
     728    REAL   ::   dd_AQ
     729    REAL   ::   dd_AU
     730    REAL   ::   dd_AV
     731    REAL   ::   dd_BH
     732    REAL   ::   dd_BQ
     733    REAL   ::   dd_BU
     734    REAL   ::   dd_BV
     735
     736    REAL   ::   dd_KHp
     737    REAL   ::   dd_KQp
     738    REAL   ::   dd_KUp
     739    REAL   ::   dd_KVp
    758740
    759741!!!
     
    762744    REAL, DIMENSION(klon)              :: y_delta_tsurf,delta_coef,tau_eq
    763745    REAL, PARAMETER                    :: facteur=2./sqrt(3.14)
    764     REAL, PARAMETER                    :: inertia=2000.
     746    REAL, PARAMETER                    :: effusivity=2000.
    765747    REAL, DIMENSION(klon)              :: ytsurf_th_x,ytsurf_th_w,yqsatsurf_x,yqsatsurf_w
    766748    REAL, DIMENSION(klon)              :: ydtsurf_th
     
    774756    REAL, DIMENSION(klon)              :: Kech_m_x, Kech_m_w
    775757    REAL, DIMENSION(klon)              :: yts_x,yts_w
    776 !jyg<
    777 !!    REAL, DIMENSION(klon)              :: Kech_Hp, Kech_H_xp, Kech_H_wp
    778 !!    REAL, DIMENSION(klon)              :: Kech_Qp, Kech_Q_xp, Kech_Q_wp
    779 !!    REAL, DIMENSION(klon)              :: Kech_Up, Kech_U_xp, Kech_U_wp
    780 !!    REAL, DIMENSION(klon)              :: Kech_Vp, Kech_V_xp, Kech_V_wp
    781 !>jyg
    782 !jyg<
    783     REAL, DIMENSION(klon)              :: ah, bh     ! coefficients of the delta_Tsurf equation
    784 !>jyg
     758    REAL, DIMENSION(klon)              :: Kech_Hp, Kech_H_xp, Kech_H_wp
     759    REAL, DIMENSION(klon)              :: Kech_Qp, Kech_Q_xp, Kech_Q_wp
     760    REAL, DIMENSION(klon)              :: Kech_Up, Kech_U_xp, Kech_U_wp
     761    REAL, DIMENSION(klon)              :: Kech_Vp, Kech_V_xp, Kech_V_wp
    785762
    786763    REAL                               :: vent
     
    848825       ! Initialize ok_flux_surf (for 1D model)
    849826       if (klon_glo>1) ok_flux_surf=.FALSE.
    850 
    851        ! intialize beta_land
    852        beta_land = 0.5
    853        call getin_p('beta_land', beta_land)
    854827       
    855828       ! Initilize debug IO
     
    12951268       ENDDO
    12961269!!! jyg le 07/02/2012 et le 10/04/2013
    1297         DO k = 1, klev+1
     1270        DO k = 1, klev
    12981271          DO j = 1, knon
    12991272             i = ni(j)
     
    13011274!!             ytke(j,k)   = tke(i,k,nsrf)
    13021275             ytke(j,k)   = tke_x(i,k,nsrf)
    1303           ENDDO
    1304         ENDDO
    13051276!>jyg
    1306         DO k = 1, klev
    1307           DO j = 1, knon
    1308              i = ni(j)
    13091277!FC
    13101278             y_treedrg(j,k) =  treedrg(i,k,nsrf)
     
    13351303          ENDDO
    13361304        ENDDO
    1337         IF (prt_level .ge. 10) THEN
    1338           print *,'pbl_surface, wake_s(1), wake_dlt(1,:) ', wake_s(1), wake_dlt(1,:)
    1339           print *,'pbl_surface, wake_s(1), wake_dlq(1,:) ', wake_s(1), wake_dlq(1,:)
    1340         ENDIF
    13411305!!! nrlmd le 02/05/2011
    13421306        DO k = 1, klev+1
     
    14721436            yts_w, yqsurf, yz0m, yz0h, &
    14731437            ycdragm_w, ycdragh_w, zri1_w, pref_w )
    1474 !
    1475         zgeo1(:) = wake_s(:)*zgeo1_w(:) + (1.-wake_s(:))*zgeo1_x(:)
    14761438
    14771439! --- special Dice. JYG+MPL 25112013 puis BOMEX
     
    15151477            ycoefm, ycoefh, ytke, y_treedrg)
    15161478!            ycoefm, ycoefh, ytke)
    1517 !FC y_treedrg ajoute
     1479!FC y_treedrg ajouté
    15181480       IF (iflag_pbl>=20.AND.iflag_pbl<30) THEN
    15191481! In this case, coef_diff_turb is called for the Cd only
     
    16271589!!!
    16281590            AcoefH_x, AcoefQ_x, BcoefH_x, BcoefQ_x)
    1629 !!!
    1630        IF (prt_level >=10) THEN
    1631          PRINT *,'pbl_surface (climb_hq_down.x->) AcoefH_x ',AcoefH_x
    1632          PRINT *,'pbl_surface (climb_hq_down.x->) AcoefQ_x ',AcoefQ_x
    1633          PRINT *,'pbl_surface (climb_hq_down.x->) BcoefH_x ',BcoefH_x
    1634          PRINT *,'pbl_surface (climb_hq_down.x->) BcoefQ_x ',BcoefQ_x
    1635        ENDIF
    16361591!
    16371592        CALL climb_hq_down(knon, ycoefh_w, ypaprs, ypplay, &
     
    16421597!!!
    16431598            AcoefH_w, AcoefQ_w, BcoefH_w, BcoefQ_w)
    1644 !!!
    1645        IF (prt_level >=10) THEN
    1646          PRINT *,'pbl_surface (climb_hq_down.w->) AcoefH_w ',AcoefH_w
    1647          PRINT *,'pbl_surface (climb_hq_down.w->) AcoefQ_w ',AcoefQ_w
    1648          PRINT *,'pbl_surface (climb_hq_down.w->) BcoefH_w ',BcoefH_w
    1649          PRINT *,'pbl_surface (climb_hq_down.w->) BcoefQ_w ',BcoefQ_w
    1650        ENDIF
    16511599!!!
    16521600       ENDIF  ! (iflag_split .eq.0)
     
    16991647       END IF
    17001648
     1649!!! nrlmd le 13/06/2011
     1650!----- 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
     1651!          Kech_h_x(j) = ycdragh_x(j) * &
     1652!             (1.0+SQRT(yu_x(j,1)**2+yv_x(j,1)**2)) * &
     1653!             ypplay(j,1)/(RD*yt_x(j,1))
     1654!          Kech_h_w(j) = ycdragh_w(j) * &
     1655!             (1.0+SQRT(yu_w(j,1)**2+yv_w(j,1)**2)) * &
     1656!             ypplay(j,1)/(RD*yt_w(j,1))
     1657!          Kech_h(j) = (1.-ywake_s(j))*Kech_h_x(j)+ywake_s(j)*Kech_h_w(j)
     1658!
     1659!          Kech_m_x(j) = ycdragm_x(j) * &
     1660!             (1.0+SQRT(yu_x(j,1)**2+yv_x(j,1)**2)) * &
     1661!             ypplay(j,1)/(RD*yt_x(j,1))
     1662!          Kech_m_w(j) = ycdragm_w(j) * &
     1663!             (1.0+SQRT(yu_w(j,1)**2+yv_w(j,1)**2)) * &
     1664!             ypplay(j,1)/(RD*yt_w(j,1))
     1665!          Kech_m(j) = (1.-ywake_s(j))*Kech_m_x(j)+ywake_s(j)*Kech_m_w(j)
     1666!!!
    17011667
    17021668!!! nrlmd le 02/05/2011  -----------------------On raccorde les 2 colonnes dans la couche 1
    17031669!----------------------------------------------------------------------------------------
    17041670!!! jyg le 07/02/2012
    1705 !!! jyg le 01/02/2017
    1706        IF (iflag_split .eq. 0) THEN
    1707          yt1(:) = yt(:,1)
    1708          yq1(:) = yq(:,1)
    1709 !!       ELSE IF (iflag_split .eq. 1) THEN
    1710 !!!
    1711 !jyg<
    1712 !!         CALL wx_pbl_fuse_no_dts(knon, dtime, ypplay, ywake_s, &
    1713 !!                                 yt_x, yt_w, yq_x, yq_w, &
    1714 !!                                 yu_x, yu_w, yv_x, yv_w, &
    1715 !!                                 ycdragh_x, ycdragh_w, ycdragm_x, ycdragm_w, &
    1716 !!                                 AcoefH_x, AcoefH_w, AcoefQ_x, AcoefQ_w, &
    1717 !!                                 AcoefU_x, AcoefU_w, AcoefV_x, AcoefV_w, &
    1718 !!                                 BcoefH_x, BcoefH_w, BcoefQ_x, BcoefQ_w, &
    1719 !!                                 BcoefU_x, BcoefU_w, BcoefV_x, BcoefV_w, &
    1720 !!                                 AcoefH, AcoefQ, AcoefU, AcoefV, &
    1721 !!                                 BcoefH, BcoefQ, BcoefU, BcoefV, &
    1722 !!                                 ycdragh, ycdragm, &
    1723 !!                                 yt1, yq1, yu1, yv1 &
    1724 !!                                 )
    1725        ELSE IF (iflag_split .ge. 1) THEN
    1726          CALL wx_pbl0_fuse(knon, dtime, ypplay, ywake_s, &
    1727                          yt_x, yt_w, yq_x, yq_w, &
    1728                          yu_x, yu_w, yv_x, yv_w, &
    1729                          ycdragh_x, ycdragh_w, ycdragm_x, ycdragm_w, &
    1730                          AcoefH_x, AcoefH_w, AcoefQ_x, AcoefQ_w, &
    1731                          AcoefU_x, AcoefU_w, AcoefV_x, AcoefV_w, &
    1732                          BcoefH_x, BcoefH_w, BcoefQ_x, BcoefQ_w, &
    1733                          BcoefU_x, BcoefU_w, BcoefV_x, BcoefV_w, &
    1734                          AcoefH, AcoefQ, AcoefU, AcoefV, &
    1735                          BcoefH, BcoefQ, BcoefU, BcoefV, &
    1736                          ycdragh, ycdragm, &
    1737                          yt1, yq1, yu1, yv1 &
    1738                          )
    1739 !!       ELSE IF (iflag_split .ge.2) THEN
    1740 !!!    Provisoire
    1741 !!         ah(:) = 0.
    1742 !!         bh(:) = 0.
    1743 !!         IF (nsrf == is_oce) THEN
    1744 !!           ybeta(:) = 1.
    1745 !!         ELSE
    1746 !!           ybeta(:) = beta_land
    1747 !!         ENDIF
    1748 !!         ycdragh(:) = ywake_s(:)*ycdragh_w(:) + (1.-ywake_s(:))*ycdragh_x(:)
    1749 !!         CALL wx_dts(knon, nsrf, ywake_cstar, ywake_s, ywake_dens, &
    1750 !!                     yts, ypplay(:,1), ybeta, ycdragh , ypaprs(:,1), &
    1751 !!                     yq(:,1), yt(:,1), yu(:,1), yv(:,1), ygustiness, &
    1752 !!                     ah, bh &
    1753 !!                     )
    1754 !!!
    1755 !!         CALL wx_pbl_fuse(knon, dtime, ypplay, ywake_s, &
    1756 !!                         yt_x, yt_w, yq_x, yq_w, &
    1757 !!                         yu_x, yu_w, yv_x, yv_w, &
    1758 !!                         ycdragh_x, ycdragh_w, ycdragm_x, ycdragm_w, &
    1759 !!                         AcoefH_x, AcoefH_w, AcoefQ_x, AcoefQ_w, &
    1760 !!                         AcoefU_x, AcoefU_w, AcoefV_x, AcoefV_w, &
    1761 !!                         BcoefH_x, BcoefH_w, BcoefQ_x, BcoefQ_w, &
    1762 !!                         BcoefU_x, BcoefU_w, BcoefV_x, BcoefV_w, &
    1763 !!                         ah, bh, &
    1764 !!                         AcoefH, AcoefQ, AcoefU, AcoefV, &
    1765 !!                         BcoefH, BcoefQ, BcoefU, BcoefV, &
    1766 !!                         ycdragh, ycdragm, &
    1767 !!                         yt1, yq1, yu1, yv1 &
    1768 !!                         )
    1769 !>jyg
    1770 !!!
    1771          ENDIF  ! (iflag_split .eq.0)
    1772 !!!
     1671       IF (iflag_split .eq.1) THEN
     1672!!!
     1673!!! jyg le 09/04/2013 ; passage aux nouvelles expressions en differences
     1674
     1675        DO j=1,knon
     1676!
     1677! Calcul des coefficients d echange
     1678         mod_wind_x = 1.0+SQRT(yu_x(j,1)**2+yv_x(j,1)**2)
     1679         mod_wind_w = 1.0+SQRT(yu_w(j,1)**2+yv_w(j,1)**2)
     1680         rho1 = ypplay(j,1)/(RD*yt(j,1))
     1681         Kech_h_x(j) = ycdragh_x(j) * mod_wind_x * rho1
     1682         Kech_h_w(j) = ycdragh_w(j) * mod_wind_w * rho1
     1683         Kech_m_x(j) = ycdragm_x(j) * mod_wind_x * rho1
     1684         Kech_m_w(j) = ycdragm_w(j) * mod_wind_w * rho1
     1685!
     1686         dd_Kh = Kech_h_w(j) - Kech_h_x(j)
     1687         dd_Km = Kech_m_w(j) - Kech_m_x(j)
     1688         IF (prt_level >=10) THEN
     1689          print *,' mod_wind_x, mod_wind_w ', mod_wind_x, mod_wind_w
     1690          print *,' rho1 ',rho1
     1691          print *,' ycdragh_x(j),ycdragm_x(j) ',ycdragh_x(j),ycdragm_x(j)
     1692          print *,' ycdragh_w(j),ycdragm_w(j) ',ycdragh_w(j),ycdragm_w(j)
     1693          print *,' dd_Kh: ',dd_KH
     1694         ENDIF
     1695!
     1696         Kech_h(j) = Kech_h_x(j) + ywake_s(j)*dd_Kh
     1697         Kech_m(j) = Kech_m_x(j) + ywake_s(j)*dd_Km
     1698!
     1699! Calcul des coefficients d echange corriges des retroactions
     1700        Kech_H_xp(j) = Kech_h_x(j)/(1.-BcoefH_x(j)*Kech_h_x(j)*dtime)
     1701        Kech_H_wp(j) = Kech_h_w(j)/(1.-BcoefH_w(j)*Kech_h_w(j)*dtime)
     1702        Kech_Q_xp(j) = Kech_h_x(j)/(1.-BcoefQ_x(j)*Kech_h_x(j)*dtime)
     1703        Kech_Q_wp(j) = Kech_h_w(j)/(1.-BcoefQ_w(j)*Kech_h_w(j)*dtime)
     1704        Kech_U_xp(j) = Kech_m_x(j)/(1.-BcoefU_x(j)*Kech_m_x(j)*dtime)
     1705        Kech_U_wp(j) = Kech_m_w(j)/(1.-BcoefU_w(j)*Kech_m_w(j)*dtime)
     1706        Kech_V_xp(j) = Kech_m_x(j)/(1.-BcoefV_x(j)*Kech_m_x(j)*dtime)
     1707        Kech_V_wp(j) = Kech_m_w(j)/(1.-BcoefV_w(j)*Kech_m_w(j)*dtime)
     1708!
     1709         dd_KHp = Kech_H_wp(j) - Kech_H_xp(j)
     1710         dd_KQp = Kech_Q_wp(j) - Kech_Q_xp(j)
     1711         dd_KUp = Kech_U_wp(j) - Kech_U_xp(j)
     1712         dd_KVp = Kech_V_wp(j) - Kech_V_xp(j)
     1713!
     1714        Kech_Hp(j) = Kech_H_xp(j) + ywake_s(j)*dd_KHp
     1715        Kech_Qp(j) = Kech_Q_xp(j) + ywake_s(j)*dd_KQp
     1716        Kech_Up(j) = Kech_U_xp(j) + ywake_s(j)*dd_KUp
     1717        Kech_Vp(j) = Kech_V_xp(j) + ywake_s(j)*dd_KVp
     1718!
     1719! Calcul des differences w-x
     1720       dd_CM = ycdragm_w(j) - ycdragm_x(j)
     1721       dd_CH = ycdragh_w(j) - ycdragh_x(j)
     1722       dd_u = yu_w(j,1) - yu_x(j,1)
     1723       dd_v = yv_w(j,1) - yv_x(j,1)
     1724       dd_t = yt_w(j,1) - yt_x(j,1)
     1725       dd_q = yq_w(j,1) - yq_x(j,1)
     1726       dd_AH = AcoefH_w(j) - AcoefH_x(j)
     1727       dd_AQ = AcoefQ_w(j) - AcoefQ_x(j)
     1728       dd_AU = AcoefU_w(j) - AcoefU_x(j)
     1729       dd_AV = AcoefV_w(j) - AcoefV_x(j)
     1730       dd_BH = BcoefH_w(j) - BcoefH_x(j)
     1731       dd_BQ = BcoefQ_w(j) - BcoefQ_x(j)
     1732       dd_BU = BcoefU_w(j) - BcoefU_x(j)
     1733       dd_BV = BcoefV_w(j) - BcoefV_x(j)
     1734!
    17731735       IF (prt_level >=10) THEN
    1774          PRINT *,'pbl_surface (fuse->): yt(1,:) ',yt(1,:)
    1775          PRINT *,'pbl_surface (fuse->): yq(1,:) ',yq(1,:)
    1776          PRINT *,'pbl_surface (fuse->): yu(1,:) ',yu(1,:)
    1777          PRINT *,'pbl_surface (fuse->): yv(1,:) ',yv(1,:)
    1778          PRINT *,'pbl_surface (fuse->): AcoefH(1) ',AcoefH(1)
    1779          PRINT *,'pbl_surface (fuse->): BcoefH(1) ',BcoefH(1)
     1736          print *,'Variables pour la fusion : Kech_H_xp(j)' ,Kech_H_xp(j)
     1737          print *,'Variables pour la fusion : Kech_H_wp(j)' ,Kech_H_wp(j)
     1738          print *,'Variables pour la fusion : Kech_Hp(j)' ,Kech_Hp(j)
     1739          print *,'Variables pour la fusion : Kech_h(j)' ,Kech_h(j)
    17801740       ENDIF
     1741!
     1742! Calcul des coef A, B \'equivalents dans la couche 1
     1743!
     1744       AcoefH(j) = AcoefH_x(j) + ywake_s(j)*(Kech_H_wp(j)/Kech_Hp(j))*dd_AH
     1745       AcoefQ(j) = AcoefQ_x(j) + ywake_s(j)*(Kech_Q_wp(j)/Kech_Qp(j))*dd_AQ
     1746       AcoefU(j) = AcoefU_x(j) + ywake_s(j)*(Kech_U_wp(j)/Kech_Up(j))*dd_AU
     1747       AcoefV(j) = AcoefV_x(j) + ywake_s(j)*(Kech_V_wp(j)/Kech_Vp(j))*dd_AV
     1748!
     1749       BcoefH(j) = BcoefH_x(j) + ywake_s(j)*BcoefH_x(j)*(dd_Kh/Kech_h(j))*(1.+Kech_H_wp(j)/Kech_Hp(j)) &
     1750                               + ywake_s(j)*(Kech_H_wp(j)/Kech_Hp(j))*(Kech_h_w(j)/Kech_h(j))*dd_BH
     1751
     1752       BcoefQ(j) = BcoefQ_x(j) + ywake_s(j)*BcoefQ_x(j)*(dd_Kh/Kech_h(j))*(1.+Kech_Q_wp(j)/Kech_Qp(j)) &
     1753                               + ywake_s(j)*(Kech_Q_wp(j)/Kech_Qp(j))*(Kech_h_w(j)/Kech_h(j))*dd_BQ
     1754
     1755       BcoefU(j) = BcoefU_x(j) + ywake_s(j)*BcoefU_x(j)*(dd_Km/Kech_h(j))*(1.+Kech_U_wp(j)/Kech_Up(j)) &
     1756                               + ywake_s(j)*(Kech_U_wp(j)/Kech_Up(j))*(Kech_m_w(j)/Kech_m(j))*dd_BU
     1757
     1758       BcoefV(j) = BcoefV_x(j) + ywake_s(j)*BcoefV_x(j)*(dd_Km/Kech_h(j))*(1.+Kech_V_wp(j)/Kech_Vp(j)) &
     1759                               + ywake_s(j)*(Kech_V_wp(j)/Kech_Vp(j))*(Kech_m_w(j)/Kech_m(j))*dd_BV
     1760
     1761!
     1762! Calcul des cdrag \'equivalents dans la couche
     1763!
     1764       ycdragm(j) = ycdragm_x(j) + ywake_s(j)*dd_CM
     1765       ycdragh(j) = ycdragh_x(j) + ywake_s(j)*dd_CH
     1766!
     1767! Calcul de T, q, u et v \'equivalents dans la couche 1
     1768       yt(j,1) = yt_x(j,1) + ywake_s(j)*(Kech_h_w(j)/Kech_h(j))*dd_t
     1769       yq(j,1) = yq_x(j,1) + ywake_s(j)*(Kech_h_w(j)/Kech_h(j))*dd_q
     1770       yu(j,1) = yu_x(j,1) + ywake_s(j)*(Kech_m_w(j)/Kech_m(j))*dd_u
     1771       yv(j,1) = yv_x(j,1) + ywake_s(j)*(Kech_m_w(j)/Kech_m(j))*dd_v
     1772
     1773
     1774        ENDDO
     1775!!!
     1776       ENDIF  ! (iflag_split .eq.1)
     1777!!!
    17811778
    17821779!****************************************************************************************
     
    18151812               rlon, rlat, yrmu0, &
    18161813               debut, lafin, ydelp(:,1), r_co2_ppm, ysolsw, ysollw, yalb, &
    1817 !!jyg               yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    1818                yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,&
     1814               yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    18191815               AcoefH, AcoefQ, BcoefH, BcoefQ, &
    18201816               AcoefU, AcoefV, BcoefU, BcoefV, &
     
    18621858               yrmu0, ylwdown, yalb, ypphi(:,1), &
    18631859               ysolsw, ysollw, yts, ypplay(:,1), &
    1864 !!jyg               ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    1865                ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,&
     1860               ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    18661861               AcoefH, AcoefQ, BcoefH, BcoefQ, &
    18671862               AcoefU, AcoefV, BcoefU, BcoefV, &
     
    19381933               itap, dtime, jour, knon, ni, &
    19391934               lafin, &
    1940 !!jyg               yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    1941                yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,&
     1935               yts, ypplay(:,1), ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    19421936               AcoefH, AcoefQ, BcoefH, BcoefQ, &
    19431937               AcoefU, AcoefV, BcoefU, BcoefV, &
     
    19981992          yfluxlat(:) =  flat
    19991993!
    2000 !!  Test sur iflag_split retire le 2/02/2018, sans vraiment comprendre la raison de ce test. (jyg)
    2001 !!          IF (iflag_split .eq.0) THEN
     1994          IF (iflag_split .eq.0) THEN
    20021995             do j=1,knon
    20031996             Kech_h(j) = ycdragh(j) * (1.0+SQRT(yu(j,1)**2+yv(j,1)**2)) * &
    20041997                  ypplay(j,1)/(RD*yt(j,1))
    20051998             enddo
    2006 !!          ENDIF ! (iflag_split .eq.0)
     1999          ENDIF ! (iflag_split .eq.0)
    20072000
    20082001          DO j = 1, knon
     
    20272020 &             ,  y_flux_t1(j), yfluxlat(j), ywake_s(j)
    20282021         print*,'beta,ytsurf_new', ybeta(j), ytsurf_new(j)
    2029          print*,'inertia,facteur,cstar', inertia, facteur,wake_cstar(j)
     2022         print*,'effusivity,facteur,cstar', effusivity, facteur,wake_cstar(j)
    20302023        ENDDO
    20312024       ENDIF
    20322025
    20332026!!! jyg le 07/02/2012 puis le 10/04/2013
    2034 !!       IF (iflag_split .eq.1) THEN
    2035 !!!!!
    2036 !!!jyg<
    2037 !!         CALL wx_pbl_split_no_dts(knon, ywake_s, &
    2038 !!                                AcoefH_x, AcoefH_w, &
    2039 !!                                AcoefQ_x, AcoefQ_w, &
    2040 !!                                AcoefU_x, AcoefU_w, &
    2041 !!                                AcoefV_x, AcoefV_w, &
    2042 !!                                y_flux_t1, y_flux_q1, y_flux_u1, y_flux_v1, &
    2043 !!                                y_flux_t1_x, y_flux_t1_w, &
    2044 !!                                y_flux_q1_x, y_flux_q1_w, &
    2045 !!                                y_flux_u1_x, y_flux_u1_w, &
    2046 !!                                y_flux_v1_x, y_flux_v1_w, &
    2047 !!                                yfluxlat_x, yfluxlat_w &
    2048 !!                                )
    2049 !!       ELSE IF (iflag_split .ge. 2) THEN
    2050        IF (iflag_split .GE. 1) THEN
    2051          CALL wx_pbl0_split(knon, dtime, ywake_s, &
    2052                        y_flux_t1, y_flux_q1, y_flux_u1, y_flux_v1, &
    2053                        y_flux_t1_x, y_flux_t1_w, &
    2054                        y_flux_q1_x, y_flux_q1_w, &
    2055                        y_flux_u1_x, y_flux_u1_w, &
    2056                        y_flux_v1_x, y_flux_v1_w, &
    2057                        yfluxlat_x, yfluxlat_w, &
    2058                        y_delta_tsurf &
    2059                        )
    2060        ENDIF  ! (iflag_split .ge. 1)
    2061 !>jyg
     2027       IF (iflag_split .eq.1) THEN
     2028!!!
     2029        DO j=1,knon
     2030         y_delta_flux_t1(j) = ( Kech_H_wp(j)*Kech_H_xp(j)*(AcoefH_w(j)-AcoefH_x(j)) + &
     2031                                y_flux_t1(j)*(Kech_H_wp(j)-Kech_H_xp(j)) ) / Kech_Hp(j)
     2032         y_delta_flux_q1(j) = ( Kech_Q_wp(j)*Kech_Q_xp(j)*(AcoefQ_w(j)-AcoefQ_x(j)) + &
     2033                                y_flux_q1(j)*(Kech_Q_wp(j)-Kech_Q_xp(j)) ) / Kech_Qp(j)
     2034         y_delta_flux_u1(j) = ( Kech_U_wp(j)*Kech_U_xp(j)*(AcoefU_w(j)-AcoefU_x(j)) + &
     2035                                y_flux_u1(j)*(Kech_U_wp(j)-Kech_U_xp(j)) ) / Kech_Up(j)
     2036         y_delta_flux_v1(j) = ( Kech_V_wp(j)*Kech_V_xp(j)*(AcoefV_w(j)-AcoefV_x(j)) + &
     2037                                y_flux_v1(j)*(Kech_V_wp(j)-Kech_V_xp(j)) ) / Kech_Vp(j)
     2038!
     2039         y_flux_t1_x(j)=y_flux_t1(j) - ywake_s(j)*y_delta_flux_t1(j)
     2040         y_flux_t1_w(j)=y_flux_t1(j) + (1.-ywake_s(j))*y_delta_flux_t1(j)
     2041         y_flux_q1_x(j)=y_flux_q1(j) - ywake_s(j)*y_delta_flux_q1(j)
     2042         y_flux_q1_w(j)=y_flux_q1(j) + (1.-ywake_s(j))*y_delta_flux_q1(j)
     2043         y_flux_u1_x(j)=y_flux_u1(j) - ywake_s(j)*y_delta_flux_u1(j)
     2044         y_flux_u1_w(j)=y_flux_u1(j) + (1.-ywake_s(j))*y_delta_flux_u1(j)
     2045         y_flux_v1_x(j)=y_flux_v1(j) - ywake_s(j)*y_delta_flux_v1(j)
     2046         y_flux_v1_w(j)=y_flux_v1(j) + (1.-ywake_s(j))*y_delta_flux_v1(j)
     2047!
     2048         yfluxlat_x(j)=y_flux_q1_x(j)*RLVTT
     2049         yfluxlat_w(j)=y_flux_q1_w(j)*RLVTT
     2050
     2051        ENDDO
    20622052!
    20632053 
     
    20722062!!jyg!!          tau_eq(j)=(ywake_s(j)/2.)*(1./max(wake_cstar(j),0.01))*sqrt(0.4/(3.14*max(wake_dens(j),8e-12)))
    20732063!!jyg!!
    2074 !!jyg!!!          delta_coef(j)=dtime/(inertia*sqrt(tau_eq(j)))
    2075 !!jyg!!          delta_coef(j)=facteur*sqrt(tau_eq(j))/inertia
     2064!!jyg!!!          delta_coef(j)=dtime/(effusivity*sqrt(tau_eq(j)))
     2065!!jyg!!          delta_coef(j)=facteur*sqrt(tau_eq(j))/effusivity
    20762066!!jyg!!!          delta_coef(j)=0.
    20772067!!jyg!!       ELSE
     
    21022092!!jyg!!!!! fin nrlmd le 13/06/2011
    21032093!!jyg!!
    2104        IF (iflag_split .ge. 1) THEN
    21052094       IF (prt_level >=10) THEN
    21062095        DO j = 1, knon
     
    21182107 &             , y_flux_t1_x(j), y_flux_t1_w(j), y_flux_t1(j), y_flux_q1_x(j)*RLVTT, y_flux_q1_w(j)*RLVTT, yfluxlat(j), ywake_s(j)
    21192108         print*,'beta,ytsurf_new,yqsatsurf', ybeta(j), ytsurf_new(j), yqsatsurf(j)
    2120          print*,'inertia,facteur,cstar', inertia, facteur,wake_cstar(j)
     2109         print*,'effusivity,facteur,cstar', effusivity, facteur,wake_cstar(j)
    21212110        ENDDO
    21222111       ENDIF  ! (prt_level >=10)
    21232112
    21242113!!! jyg le 07/02/2012
    2125        ENDIF  ! (iflag_split .ge.1)
     2114       ENDIF  ! (iflag_split .eq.1)
    21262115!!!
    21272116
     
    23762365!!!
    23772366!!! nrlmd le 13/06/2011
    2378 !!jyg20170131          delta_tsurf(i,nsrf)=y_delta_tsurf(j)*ypct(j)
    2379           delta_tsurf(i,nsrf)=y_delta_tsurf(j)
    2380 !
     2367          delta_tsurf(i,nsrf)=y_delta_tsurf(j)*ypct(j)
    23812368          cdragh_x(i) = cdragh_x(i) + ycdragh_x(j)*ypct(j)
    23822369          cdragh_w(i) = cdragh_w(i) + ycdragh_w(j)*ypct(j)
     
    24132400       IF (iflag_split .eq.0) THEN
    24142401        wake_dltke(:,:,nsrf) = 0.
    2415         DO k = 1, klev+1
     2402        DO k = 1, klev
    24162403           DO j = 1, knon
    24172404              i = ni(j)
     
    24262413
    24272414       ELSE  ! (iflag_split .eq.0)
    2428         DO k = 1, klev+1
     2415        DO k = 1, klev
    24292416          DO j = 1, knon
    24302417            i = ni(j)
     
    25882575!      print*, tair1,yt(:,1),y_d_t(:,1)
    25892576
    2590 ! Calculate the temperature and relative humidity at 2m and the wind at 10m
     2577! Calculate the temperatureflag_pbl_surface_t2m_bugiflag_pbl_surface_t2m_bug et relative humidity at 2m and the wind at 10m
    25912578!!! jyg le 07/02/2012
    25922579       IF (iflag_split .eq.0) THEN
     
    31043091    IF (ALLOCATED(qsurf)) DEALLOCATE(qsurf)
    31053092    IF (ALLOCATED(ftsoil)) DEALLOCATE(ftsoil)
    3106 
    3107 !jyg<
    3108 !****************************************************************************************
    3109 ! Deallocate variables for pbl splitting
    3110 !
    3111 !****************************************************************************************
    3112 
    3113     CALL wx_pbl_final
    3114 !>jyg
    31153093
    31163094  END SUBROUTINE pbl_surface_final
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phyetat0.F90

    r3356 r3411  
    1818       wake_deltat, wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, &
    1919       wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, &
    20        zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, &
    21        ale_wake, ale_bl_stat
     20       zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg
    2221!FC
    2322  USE geometry_mod, ONLY : longitude_deg, latitude_deg
     
    121120  tab_cntrl(6)=nbapp_rad
    122121
    123   if (iflag_cycle_diurne.GE.1) tab_cntrl( 7) = iflag_cycle_diurne
     122  if (cycle_diurne) tab_cntrl( 7) =1.
    124123  if (soil_model) tab_cntrl( 8) =1.
    125124  if (new_oliq) tab_cntrl( 9) =1.
     
    420419  found=phyetat0_get(1,ale_bl_trig,"ALE_BL_TRIG","ALE BL_TRIG",0.)
    421420  found=phyetat0_get(1,alp_bl,"ALP_BL","ALP BL",0.)
    422   found=phyetat0_get(1,ale_wake,"ALE_WAKE","ALE_WAKE",0.)
    423   found=phyetat0_get(1,ale_bl_stat,"ALE_BL_STAT","ALE_BL_STAT",0.)
    424421
    425422!===========================================
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phyredem.F90

    r3356 r3411  
    1 !
    2 ! $Id$
    3 !
    41SUBROUTINE phyredem (fichnom)
    52!
     
    2421                                wake_cstar,                                  &
    2522                                wake_pe, wake_fip, fm_therm, entr_therm,     &
    26                                 detr_therm, ale_bl, ale_bl_trig, alp_bl,     &
    27                                 ale_wake, ale_bl_stat,                       &
     23                                detr_therm, Ale_bl, Ale_bl_trig, Alp_bl,     &
    2824                                du_gwd_rando, du_gwd_front, u10m, v10m,      &
    2925                                treedrg
     
    9187  tab_cntrl(6) = nbapp_rad
    9288
    93   IF( iflag_cycle_diurne.GE.1 ) tab_cntrl( 7 ) = iflag_cycle_diurne
     89  IF( cycle_diurne ) tab_cntrl( 7 ) = 1.
    9490  IF(   soil_model ) tab_cntrl( 8 ) = 1.
    9591  IF(     new_oliq ) tab_cntrl( 9 ) = 1.
     
    286282  CALL put_field("DETR_THERM", "DETR_THERM", detr_therm)
    287283
    288   CALL put_field("ALE_BL", "ALE_BL", ale_bl)
    289 
    290   CALL put_field("ALE_BL_TRIG", "ALE_BL_TRIG", ale_bl_trig)
    291 
    292   CALL put_field("ALP_BL", "ALP_BL", alp_bl)
    293 
    294   CALL put_field("ALE_WAKE", "ALE_WAKE", ale_wake)
    295 
    296   CALL put_field("ALE_BL_STAT", "ALE_BL_STAT", ale_bl_stat)
    297 
     284  CALL put_field("ALE_BL", "ALE_BL", Ale_bl)
     285
     286  CALL put_field("ALE_BL_TRIG", "ALE_BL_TRIG", Ale_bl_trig)
     287
     288  CALL put_field("ALP_BL", "ALP_BL", Alp_bl)
    298289
    299290  ! trs from traclmdz_mod
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_local_var_mod.F90

    r3356 r3411  
    151151      REAL, SAVE, ALLOCATABLE :: scdnc(:,:)
    152152      !$OMP THREADPRIVATE(scdnc)
    153       REAL, SAVE, ALLOCATABLE :: dNovrN(:)
    154       !$OMP THREADPRIVATE(dNovrN)
    155153      REAL, SAVE, ALLOCATABLE :: cldncl(:)
    156154      !$OMP THREADPRIVATE(cldncl)
     
    171169      REAL, SAVE, ALLOCATABLE :: lcc3dstra(:,:)
    172170      !$OMP THREADPRIVATE(lcc3dstra)
    173       REAL, SAVE, ALLOCATABLE :: icc3dcon(:,:)
    174       !$OMP THREADPRIVATE(icc3dcon)
    175       REAL, SAVE, ALLOCATABLE :: icc3dstra(:,:)
    176       !$OMP THREADPRIVATE(icc3dstra)
    177       REAL, SAVE, ALLOCATABLE :: zfice(:,:)
    178       !$OMP THREADPRIVATE(zfice)
    179171      REAL, SAVE, ALLOCATABLE :: od443aer(:)
    180172      !$OMP THREADPRIVATE(od443aer)
     
    269261!!
    270262!!         Wake variables
    271       REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: alp_wake
    272 !$OMP THREADPRIVATE(alp_wake)           
     263      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: ale_wake, alp_wake
     264!$OMP THREADPRIVATE(ale_wake, alp_wake)           
    273265!!jyg!      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h,wake_k
    274266      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: wake_h
     
    279271    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk, d_deltaq_wk
    280272!$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk)
    281       REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: d_s_wk, d_dens_a_wk, d_dens_wk
    282 !$OMP THREADPRIVATE(d_s_wk, d_dens_a_wk, d_dens_wk)
     273      REAL,ALLOCATABLE,SAVE,DIMENSION(:)            :: d_s_wk, d_dens_wk
     274!$OMP THREADPRIVATE(d_s_wk, d_dens_wk)
    283275    REAL, SAVE, ALLOCATABLE,DIMENSION(:,:)          :: d_deltat_wk_gw, d_deltaq_wk_gw
    284276!$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw)
     
    321313      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils
    322314!$OMP THREADPRIVATE(slab_wfbils)
    323       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte
    324 !$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte)
     315      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, ve, vq, zxffonte
     316!$OMP THREADPRIVATE(tpot, tpote, ue, uq, ve, vq, zxffonte)
    325317      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving
    326318!$OMP THREADPRIVATE(zxfqcalving)
     
    349341!!!$OMP THREADPRIVATE(q_x, q_w)
    350342!>jyg
     343!!! Sorties ferret
     344      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w
     345!$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)
     346      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w
     347!$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)
    351348! Variables supplementaires dans physiq.F relative au splitting de la surface
    352349      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input
     
    365362      LOGICAL, SAVE, ALLOCATABLE :: ptconv(:,:)
    366363      !$OMP THREADPRIVATE(ptconv)
    367       REAL, SAVE, ALLOCATABLE :: ratqsc(:,:)
    368       !$OMP THREADPRIVATE(ratqsc)
    369364!>jyg+nrlmd
    370365  !
     
    377372      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion
    378373!$OMP THREADPRIVATE(weak_inversion)
    379       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_conv,alp_bl_det
    380 !$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det)
     374      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: ale_bl_stat,alp_bl_conv,alp_bl_det
     375!$OMP THREADPRIVATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
    381376      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke
    382377!$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)
     
    385380      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig
    386381!$OMP THREADPRIVATE(proba_notrig, random_notrig)
    387       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cv_gen
    388 !$OMP THREADPRIVATE(cv_gen)
    389382      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils, wfbilo
    390383!$OMP THREADPRIVATE(fsolsw, wfbils, wfbilo)
     
    393386      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: t2m, fluxlat, fsollw,evap_pot
    394387!$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)
    395       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd0, omega
    396 !$OMP THREADPRIVATE(dnwd0, omega)
     388      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd, dnwd0, upwd, omega
     389!$OMP THREADPRIVATE(dnwd, dnwd0, upwd, omega)
    397390      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: epmax_diag ! epmax_cape
    398391!$OMP THREADPRIVATE(epmax_diag)
    399 !
    400 !  Deep convective variables used in phytrac
    401       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ep ! epmax_cape
     392      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ep ! epmax_cape
    402393!$OMP THREADPRIVATE(ep)
    403       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: dnwd, upwd
    404 !$OMP THREADPRIVATE(dnwd, upwd)
    405       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: pmflxr, pmflxs
    406 !$OMP THREADPRIVATE(pmflxr, pmflxs)
    407       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wdtrainA, wdtrainM
    408 !$OMP THREADPRIVATE(wdtrainA, wdtrainM)
    409       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: da, mp
    410 !$OMP THREADPRIVATE(da, mp)
    411       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: wght_cvfd
    412 !$OMP THREADPRIVATE(wght_cvfd)
    413       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: phi, phi2, elij, epmlmMm
    414 !$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm)
    415       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: d1a, dam
    416 !$OMP THREADPRIVATE(d1a, dam)
    417       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: ev
    418 !$OMP THREADPRIVATE(ev)
    419       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: clw
    420 !$OMP THREADPRIVATE(clw)
    421       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:)  :: eplaMm
    422 !$OMP THREADPRIVATE(eplaMm)
    423       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij
    424 !$OMP THREADPRIVATE(sij)
    425 !
    426394!      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th
    427395      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th
     
    435403      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh
    436404!$OMP THREADPRIVATE(zx_rh)
    437       REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca
    438 !$OMP THREADPRIVATE(prfl, psfl, fraca)
     405      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmflxr, pmflxs, prfl, psfl, fraca
     406!$OMP THREADPRIVATE(pmflxr, pmflxs, prfl, psfl, fraca)
    439407      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2
    440408!$OMP THREADPRIVATE(Vprecip, zw2)
     
    449417
    450418! ug et d'autres encore:
     419      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wdtrainA, wdtrainM
     420!$OMP THREADPRIVATE(wdtrainA, wdtrainM)
    451421      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec
    452422!$OMP THREADPRIVATE(beta_prec)
     
    512482!
    513483!---2D budget variables
    514       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs
    515       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2
    516484      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4
    517485      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part
    518 !$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part)
    519       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs
    520       REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2
     486!$OMP THREADPRIVATE(budg_dep_dry_h2so4,budg_dep_dry_part)
    521487      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4
    522488      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part
    523 !$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part)
     489!$OMP THREADPRIVATE(budg_dep_wet_h2so4,budg_dep_wet_part)
    524490      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs
    525491      REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2
     
    578544      ALLOCATE(plul_st(klon),plul_th(klon))
    579545      ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))
     546!nrlmd+jyg<
     547      ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))
     548      ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))
     549!>nrlmd+jyg
    580550      ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))
    581551      ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))
     
    612582      ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))
    613583      ALLOCATE(scdnc(klon, klev))
    614       ALLOCATE(dNovrN(klon))
    615584      ALLOCATE(cldncl(klon))
    616585      ALLOCATE(reffclwtop(klon))
     
    622591      ALLOCATE(lcc3dcon(klon, klev))
    623592      ALLOCATE(lcc3dstra(klon, klev))
    624       ALLOCATE(icc3dcon(klon, klev))
    625       ALLOCATE(icc3dstra(klon, klev))
    626       ALLOCATE(zfice(klon, klev))
    627593      ALLOCATE(od443aer(klon))
    628594      ALLOCATE(od550aer(klon))
     
    680646!!
    681647!!          Wake variables
    682       ALLOCATE(alp_wake(klon))
     648      ALLOCATE(ale_wake(klon), alp_wake(klon))
     649      ale_wake(:)=0.
    683650      ALLOCATE(wake_h(klon),wake_k(klon))
    684651      ALLOCATE(wake_omg(klon, klev))
    685652      ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev))
    686       ALLOCATE(d_s_wk(klon), d_dens_a_wk(klon), d_dens_wk(klon))
     653      ALLOCATE(d_s_wk(klon), d_dens_wk(klon))
    687654      ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev))
    688655      ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev))
     
    710677      ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon))
    711678      ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon))
    712       ALLOCATE(uwat(klon), vwat(klon))
    713679      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
    714680      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
     
    723689!!      ALLOCATE(q_x(klon,klev), q_w(klon,klev))
    724690!>jyg
     691      ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev))
     692      dtvdf_x = 0 ; dtvdf_w=0 ;   !ym missing init
     693      ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev))
     694      dqvdf_x = 0 ; dqvdf_w=0 ;   !ym missing init
    725695      ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf))
    726696      ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev))
     
    730700!
    731701      ALLOCATE(ptconv(klon,klev))
    732       ALLOCATE(ratqsc(klon,klev))
    733702!
    734703      ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon))
     
    737706      ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon))
    738707      ALLOCATE(sens(klon), flwp(klon), fiwp(klon))
    739       ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon))
     708      ALLOCATE(ale_bl_stat(klon), alp_bl_conv(klon), alp_bl_det(klon))
    740709      ale_bl_stat(:)=0 ; alp_bl_conv(:)=0 ;  alp_bl_det(:)=0
    741710      ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon))
     
    744713      alp_bl_stat(:)=0
    745714      ALLOCATE(proba_notrig(klon), random_notrig(klon))
    746       ALLOCATE(cv_gen(klon))
    747 
    748       ALLOCATE(dnwd0(klon, klev))
     715
     716      ALLOCATE(dnwd(klon, klev), dnwd0(klon, klev))
    749717!      ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))
    750       ALLOCATE(omega(klon, klev))
     718      ALLOCATE(upwd(klon, klev), omega(klon, klev))
    751719      ALLOCATE(epmax_diag(klon)) ! epmax_cape
     720      ALLOCATE(ep(klon,klev)) ! epmax_cape
    752721!      ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))
    753722      ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev))
     
    764733      ALLOCATE(wfevap(klon, nbsrf), wfrain(klon,nbsrf), wfsnow(klon, nbsrf))
    765734      ALLOCATE(evap_pot(klon, nbsrf))
    766 !
    767 !  Deep convective variables used in phytrac
    768       ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1))
    769       ALLOCATE(wdtrainA(klon,klev),wdtrainM(klon,klev))
    770       ALLOCATE(dnwd(klon, klev), upwd(klon, klev) )
    771       ALLOCATE(ep(klon,klev))                          ! epmax_cape
    772       ALLOCATE(da(klon,klev), mp(klon,klev) )
    773       ALLOCATE(phi(klon,klev,klev) )
    774       ALLOCATE(wght_cvfd(klon,klev) )
    775       ALLOCATE(phi2(klon,klev,klev) )
    776       ALLOCATE(d1a(klon,klev), dam(klon,klev))
    777       ALLOCATE(ev(klon,klev) )
    778       ALLOCATE(elij(klon,klev,klev) )
    779       ALLOCATE(clw(klon,klev) )
    780       ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev) )
    781       ALLOCATE(sij(klon,klev,klev) )
    782 
    783       ALLOCATE(prfl(klon, klev+1))
     735
     736      ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1), prfl(klon, klev+1))
    784737      ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))
    785738      ALLOCATE(zw2(klon, klev+1))
     
    794747
    795748! ug et d'autres encore:
     749      ALLOCATE(wdtrainA(klon,klev),wdtrainM(klon,klev))
    796750      ALLOCATE(beta_prec(klon,klev))
    797751      ALLOCATE(rneb(klon,klev),rnebjn(klon,klev),rneblsvol(klon,klev))
     
    825779      ALLOCATE (tau_strat_1020(klon,klev))
    826780      ALLOCATE (tausum_strat(klon,3))
    827       ALLOCATE (budg_dep_dry_ocs(klon))
    828       ALLOCATE (budg_dep_wet_ocs(klon))
    829       ALLOCATE (budg_dep_dry_so2(klon))
    830       ALLOCATE (budg_dep_wet_so2(klon))
    831781      ALLOCATE (budg_dep_dry_h2so4(klon))
    832782      ALLOCATE (budg_dep_wet_h2so4(klon))
     
    882832      DEALLOCATE(plul_st,plul_th)
    883833      DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)
     834!nrlmd+jyg<
     835      DEALLOCATE(d_t_vdf_w,d_q_vdf_w)
     836      DEALLOCATE(d_t_vdf_x,d_q_vdf_x)
     837!>nrlmd+jyg
    884838      DEALLOCATE(d_u_vdf,d_v_vdf)
    885839      DEALLOCATE(d_t_oli,d_t_oro)
     
    905859      DEALLOCATE(tau3d_aero)
    906860      DEALLOCATE(scdnc)
    907       DEALLOCATE(dNovrN)
    908861      DEALLOCATE(cldncl)
    909862      DEALLOCATE(reffclwtop)
     
    915868      DEALLOCATE(lcc3dcon)
    916869      DEALLOCATE(lcc3dstra)
    917       DEALLOCATE(icc3dcon)
    918       DEALLOCATE(icc3dstra)
    919       DEALLOCATE(zfice)
    920870      DEALLOCATE(od443aer)
    921871      DEALLOCATE(od550aer)
     
    975925      DEALLOCATE(ptstar, pt0, slp)
    976926!
    977       DEALLOCATE(alp_wake)
     927      DEALLOCATE(ale_wake, alp_wake)
    978928      DEALLOCATE(wake_h,wake_k)
    979929      DEALLOCATE(wake_omg)
    980930      DEALLOCATE(d_deltat_wk, d_deltaq_wk)
    981       DEALLOCATE(d_s_wk, d_dens_a_wk, d_dens_wk)
     931      DEALLOCATE(d_s_wk, d_dens_wk)
    982932      DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw)
    983933      DEALLOCATE(d_deltat_vdf, d_deltaq_vdf)
     
    1002952      DEALLOCATE(slab_wfbils, tpot, tpote, ue)
    1003953      DEALLOCATE(uq, ve, vq, zxffonte)
    1004       DEALLOCATE(uwat, vwat)
    1005954      DEALLOCATE(zxfqcalving, zxfluxlat)
    1006955      DEALLOCATE(zxrunofflic)
     
    1015964!!      DEALLOCATE(q_x, q_w)
    1016965!>jyg
    1017       DEALLOCATE(d_t_vdf_x, d_t_vdf_w)
    1018       DEALLOCATE(d_q_vdf_x, d_q_vdf_w)
     966      DEALLOCATE(dtvdf_x, dtvdf_w)
     967      DEALLOCATE(dqvdf_x, dqvdf_w)
    1019968      DEALLOCATE(pbl_tke_input)
    1020969      DEALLOCATE(t_therm, q_therm, u_therm, v_therm)
     
    1024973!
    1025974      DEALLOCATE(ptconv)
    1026       DEALLOCATE(ratqsc)
    1027975!
    1028976      DEALLOCATE(wbeff, convoccur, zmax_th)
     
    1031979      DEALLOCATE(t2m_min_mon, t2m_max_mon)
    1032980      DEALLOCATE(sens, flwp, fiwp)
    1033       DEALLOCATE(alp_bl_conv,alp_bl_det)
     981      DEALLOCATE(ale_bl_stat,alp_bl_conv,alp_bl_det)
    1034982      DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)
    1035983      DEALLOCATE(alp_bl_stat, n2, s2)
    1036984      DEALLOCATE(proba_notrig, random_notrig)
    1037       DEALLOCATE(cv_gen)
    1038 
    1039       DEALLOCATE(dnwd0)
     985
     986      DEALLOCATE(dnwd, dnwd0)
    1040987!      DEALLOCATE(upwd, omega, coefh)
    1041       DEALLOCATE(omega)
     988      DEALLOCATE(upwd, omega)
    1042989      DEALLOCATE(epmax_diag)
     990      DEALLOCATE(ep)
    1043991!      DEALLOCATE(coefm, lambda_th, cldemi)
    1044992      DEALLOCATE(lambda_th, cldemi)
     
    10551003      DEALLOCATE(wfevap,wfrain,wfsnow)
    10561004
    1057       DEALLOCATE(pmflxr, pmflxs)
    1058       DEALLOCATE(wdtrainA, wdtrainM)
    1059       DEALLOCATE(upwd, dnwd)
    1060       DEALLOCATE(ep)
    1061       DEALLOCATE(da, mp )
    1062       DEALLOCATE(phi )
    1063       DEALLOCATE(wght_cvfd )
    1064       DEALLOCATE(phi2 )
    1065       DEALLOCATE(d1a, dam)
    1066       DEALLOCATE(ev )
    1067       DEALLOCATE(elij )
    1068       DEALLOCATE(clw )
    1069       DEALLOCATE(epmlmMm, eplaMm )
    1070       DEALLOCATE(sij )
    1071 
    1072 
    1073       DEALLOCATE(prfl, psfl, fraca, Vprecip)
     1005      DEALLOCATE(pmflxr, pmflxs, prfl)
     1006      DEALLOCATE(psfl, fraca, Vprecip)
    10741007      DEALLOCATE(zw2)
    10751008
     
    10821015
    10831016! ug et d'autres encore:
     1017      DEALLOCATE(wdtrainA, wdtrainM)
    10841018      DEALLOCATE(beta_prec)
    10851019      DEALLOCATE(rneb)
     
    11131047      DEALLOCATE (budg_3D_nucl)
    11141048      DEALLOCATE (budg_3D_cond_evap)
    1115       DEALLOCATE (budg_dep_dry_ocs)
    1116       DEALLOCATE (budg_dep_wet_ocs)
    1117       DEALLOCATE (budg_dep_dry_so2)
    1118       DEALLOCATE (budg_dep_wet_so2)
    11191049      DEALLOCATE (budg_dep_dry_h2so4)
    11201050      DEALLOCATE (budg_dep_wet_h2so4)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_output_ctrlout_mod.F90

    r3356 r3411  
    1 !
    2 ! $Id$
    3 !
    41MODULE phys_output_ctrlout_mod
    52
     
    1916!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2017!  CHARACTER(len=20), dimension(nfiles) :: TEF = type_ecri_files
    21 
    22 !!! saving lon and lat as variables for CMIP6 DataRequest
    23   TYPE(ctrl_out), SAVE :: o_longitude = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    24     'io_lon', '', '', (/ ('once', i=1, 10) /))
    25   TYPE(ctrl_out), SAVE :: o_latitude = ctrl_out((/ 1, 1, 1, 1, 1, 1, 11, 11, 11, 11/), &
    26     'io_lat', '', '', (/ ('once', i=1, 10) /))
    2718
    2819!!! Comosantes de la coordonnee sigma-hybride
     
    5445
    5546!!! 2D
    56   TYPE(ctrl_out), SAVE :: o_sza = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
    57     'sza', 'Solar zenithal angle', 'degrees', (/ ('', i=1, 10) /))
    5847
    5948! Marine
     
    335324    'ndayrain', 'Number of dayrain(liq+sol)', '-', &
    336325      (/ "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /))
    337   TYPE(ctrl_out), SAVE :: o_rain_fall = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11, 11/), &
    338     'rain_fall', 'Precip Totale liq', 'kg/(s*m2)', (/ ('', i=1, 10) /))
    339   TYPE(ctrl_out), SAVE :: o_rain_con = ctrl_out((/ 7, 7, 7, 10, 7, 10, 11, 11, 11, 11/), &
    340     'rain_con', 'Precip liq conv.', 'kg/(s*m2)', (/ ('', i=1, 10) /))
    341326  TYPE(ctrl_out), SAVE :: o_precip = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11, 11/), &
    342327    'precip', 'Precip Totale liq+sol', 'kg/(s*m2)', (/ ('', i=1, 10) /))
     
    396381  TYPE(ctrl_out), SAVE :: o_SWupTOAclr = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
    397382    'SWupTOAclr', 'SWup clear sky at TOA', 'W/m2', (/ ('', i=1, 10) /))
    398   TYPE(ctrl_out), SAVE :: o_SWupTOAcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    399     'SWupTOAcleanclr', 'SWup clear sky clean (no aerosol) at TOA', 'W/m2', (/ ('', i=1, 10) /))
    400383  TYPE(ctrl_out), SAVE :: o_SWdnTOA = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11, 11/), &
    401384    'SWdnTOA', 'SWdn at TOA', 'W/m2', (/ ('', i=1, 10) /))
     
    444427  TYPE(ctrl_out), SAVE :: o_SWupSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
    445428    'SWupSFCclr', 'SWup clear sky at surface', 'W/m2', (/ ('', i=1, 10) /))
    446   TYPE(ctrl_out), SAVE :: o_SWupSFCcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    447     'SWupSFCcleanclr', 'SWup clear sky clean (no aerosol) at surface', 'W/m2', (/ ('', i=1, 10) /))
    448429  TYPE(ctrl_out), SAVE :: o_SWdnSFC = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), &
    449430    'SWdnSFC', 'SWdn at surface', 'W/m2', (/ ('', i=1, 10) /))
    450431  TYPE(ctrl_out), SAVE :: o_SWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
    451432    'SWdnSFCclr', 'SWdn clear sky at surface', 'W/m2', (/ ('', i=1, 10) /))
    452   TYPE(ctrl_out), SAVE :: o_SWdnSFCcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    453     'SWdnSFCcleanclr', 'SWdn clear sky clean (no aerosol) at surface', 'W/m2', (/ ('', i=1, 10) /))
    454433  TYPE(ctrl_out), SAVE :: o_LWupSFC = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
    455434    'LWupSFC', 'Upwd. IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
     
    460439  TYPE(ctrl_out), SAVE :: o_LWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), &
    461440    'LWdnSFCclr', 'Down. CS IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
    462   TYPE(ctrl_out), SAVE :: o_LWupTOAcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    463     'LWupTOAcleanclr', 'Upward CS clean (no aerosol) IR rad. at TOA', 'W/m2', (/ ('', i=1, 10) /))
    464   TYPE(ctrl_out), SAVE :: o_LWdnSFCcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), &
    465     'LWdnSFCcleanclr', 'Downward CS clean (no aerosol) IR rad. at surface', 'W/m2', (/ ('', i=1, 10) /))
    466441  TYPE(ctrl_out), SAVE :: o_bils = ctrl_out((/ 1, 2, 10, 5, 10, 10, 11, 11, 11, 11/), &
    467442    'bils', 'Surf. total heat flux', 'W/m2', (/ ('', i=1, 10) /))
     
    490465  TYPE(ctrl_out), SAVE :: o_fqfonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    491466    'fqfonte', 'Land ice melt', 'kg/m2/s', (/ ('', i=1, 10) /))
    492   TYPE(ctrl_out), SAVE :: o_mrroli = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    493     'mrroli', 'Runoff flux over land ice', 'kg/m2/s', (/ ('', i=1, 10) /))
    494467  TYPE(ctrl_out), SAVE :: o_runofflic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    495468    'runofflic', 'Land ice melt to ocean', 'kg/m2/s', (/ ('', i=1, 10) /))
     
    679652    'iwp', 'Cloud ice water path', 'kg/m2', (/ ('', i=1, 10) /))
    680653  TYPE(ctrl_out), SAVE :: o_ue = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    681     'ue', 'Zonal dry static energy transport', '-', (/ ('', i=1, 10) /))
     654    'ue', 'Zonal energy transport', '-', (/ ('', i=1, 10) /))
    682655  TYPE(ctrl_out), SAVE :: o_ve = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    683     've', 'Merid dry static energy transport', '-', (/ ('', i=1, 10) /))
     656    've', 'Merid energy transport', '-', (/ ('', i=1, 10) /))
    684657  TYPE(ctrl_out), SAVE :: o_uq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    685658    'uq', 'Zonal humidity transport', '-', (/ ('', i=1, 10) /))
    686659  TYPE(ctrl_out), SAVE :: o_vq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    687660    'vq', 'Merid humidity transport', '-', (/ ('', i=1, 10) /))
    688   TYPE(ctrl_out), SAVE :: o_uwat = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    689     'uwat', 'Zonal total water transport', '-', (/ ('', i=1, 10) /))
    690   TYPE(ctrl_out), SAVE :: o_vwat = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    691     'vwat', 'Merid total water transport', '-', (/ ('', i=1, 10) /))
    692661  TYPE(ctrl_out), SAVE :: o_cape = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    693662    'cape', 'Conv avlbl pot ener', 'J/kg', (/ ('', i=1, 10) /))
     
    818787    's2', 'Surface moyenne des panaches de type 2', 'm2', (/ ('', i=1, 10) /))
    819788             
    820 !-------Déclenchement stochastique
     789!-------Déclenchement stochastiqu
    821790  TYPE(ctrl_out), SAVE :: o_proba_notrig = ctrl_out((/ 1, 6, 6, 6, 10, 10, 11, 11, 11, 11/), &
    822791    'proba_notrig', 'Probabilite de non-declenchement', ' ', (/ ('', i=1, 10) /))
     
    972941  TYPE(ctrl_out), SAVE :: o_rh2m = ctrl_out((/ 5, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    973942    'rh2m', 'Relative humidity at 2m', '%', (/ ('', i=1, 10) /))
    974 !  TYPE(ctrl_out), SAVE :: o_rh2m_min = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    975 !    'rh2m_min', 'Min Relative humidity at 2m', '%',                        &
    976 !      (/ 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', &
    977 !         't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)' /))
    978 !  TYPE(ctrl_out), SAVE :: o_rh2m_max = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    979 !    'rh2m_max', 'Max Relative humidity at 2m', '%',                         &
    980 !      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
    981 !         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
     943  TYPE(ctrl_out), SAVE :: o_rh2m_min = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
     944    'rh2m_min', 'Min Relative humidity at 2m', '%',                        &
     945      (/ 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', &
     946         't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)', 't_min(X)' /))
     947  TYPE(ctrl_out), SAVE :: o_rh2m_max = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
     948    'rh2m_max', 'Max Relative humidity at 2m', '%',                         &
     949      (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', &
     950         't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /))
    982951  TYPE(ctrl_out), SAVE :: o_qsat2m = ctrl_out((/ 10, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    983952    'qsat2m', 'Saturant humidity at 2m', '%', (/ ('', i=1, 10) /))
     
    10711040  TYPE(ctrl_out), SAVE :: o_SWnetOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    10721041    'SWnetOR', 'Sfce net SW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
     1042  TYPE(ctrl_out), SAVE :: o_SWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     1043    'SWdownOR', 'Sfce incident SW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
    10731044  TYPE(ctrl_out), SAVE :: o_LWdownOR = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    10741045    'LWdownOR', 'Sfce incident LW radiation OR', 'W/m2', (/ ('', i=1, 10) /))
     
    13161287    'vsed_aer', 'Strat. aerosol sedimentation velocity (mass-weighted)', 'm/s', (/ ('', i=1, 10) /))
    13171288!--budget  2D
    1318   TYPE(ctrl_out), SAVE :: o_budg_dep_dry_ocs = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    1319     'budg_dep_dry_ocs',   'OCS dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
    1320   TYPE(ctrl_out), SAVE :: o_budg_dep_wet_ocs = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    1321     'budg_dep_wet_ocs',   'OCS wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
    1322   TYPE(ctrl_out), SAVE :: o_budg_dep_dry_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    1323     'budg_dep_dry_so2',   'SO2 dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
    1324   TYPE(ctrl_out), SAVE :: o_budg_dep_wet_so2 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    1325     'budg_dep_wet_so2',   'SO2 wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
    13261289  TYPE(ctrl_out), SAVE :: o_budg_dep_dry_h2so4 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), &
    13271290    'budg_dep_dry_h2so4', 'H2SO4 dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 10) /))
     
    14541417  TYPE(ctrl_out), SAVE :: o_lcc3dstra = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    14551418    'lcc3dstra', 'Stratiform cloud liquid fraction', '1', (/ ('', i=1, 10) /))
    1456   TYPE(ctrl_out), SAVE :: o_icc3dcon = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1457     'icc3dcon', 'Convective cloud ice fraction', '1', (/ ('', i=1, 10) /))
    1458   TYPE(ctrl_out), SAVE :: o_icc3dstra = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1459     'icc3dstra', 'Stratiform cloud ice fraction', '1', (/ ('', i=1, 10) /))
    1460   TYPE(ctrl_out), SAVE :: o_cldicemxrat = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1461     'cldicemxrat', 'Cloud Ice Mixing Ratio', '1', (/ ('', i=1, 10) /))
    1462   TYPE(ctrl_out), SAVE :: o_cldwatmxrat = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1463     'cldwatmxrat', 'Cloud Water Mixing Ratio', '1', (/ ('', i=1, 10) /))
    1464   TYPE(ctrl_out), SAVE :: o_solbnd = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1465     'solbnd', 'Top-of-Atmosphere Solar Insolation for each band', 'W m-2', (/ ('', i=1, 10) /))
    14661419  TYPE(ctrl_out), SAVE :: o_stratomask = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
    14671420    'stratomask', 'Stratospheric fraction', '1', (/ ('', i=1, 10) /))
     
    15121465  TYPE(ctrl_out), SAVE :: o_mc = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    15131466    'mc', 'Convective mass flux', 'kg/m2/s', (/ ('', i=1, 10) /))
    1514   TYPE(ctrl_out), SAVE :: o_ftime_deepcv = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1515     'ftime_deepcv', 'Fraction of time deep convection Occurs', ' ', (/ ('', i=1, 10) /))
    15161467  TYPE(ctrl_out), SAVE :: o_ftime_con = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1517     'ftime_con', 'Fraction of time convection Occurs', ' ', (/ ('', i=1, 10) /))
    1518 !!jyg    'ftime_con', 'Fraction of time convection Occurs', ' ',                 &
    1519 !!jyg      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', &
    1520 !!jyg         'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /))
     1468    'ftime_con', 'Fraction of time convection Occurs', ' ',                 &
     1469      (/ 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', &
     1470         'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)', 'inst(X)' /))
    15211471  TYPE(ctrl_out), SAVE :: o_dtdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    15221472    'dtdyn', 'Dynamics dT', 'K/s', (/ ('', i=1, 10) /))
     
    15531503  TYPE(ctrl_out), SAVE :: o_dqwak2d = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    15541504    'dqwak2d', 'Wake dQ', '(kg/m2)/s', (/ ('', i=1, 10) /))
    1555   TYPE(ctrl_out), SAVE :: o_cv_gen = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1556     'cv_gen', 'Cumulonimbus genesis', '1/(m2 s)', (/ ('', i=1, 10) /))
    15571505  TYPE(ctrl_out), SAVE :: o_wake_h = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    15581506    'wake_h', 'wake_h', '-', (/ ('', i=1, 10) /))
    1559   TYPE(ctrl_out), SAVE :: o_wake_dens = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1560     'wake_dens', 'number of wakes per m2', '1/m2', (/ ('', i=1, 10) /))
    15611507  TYPE(ctrl_out), SAVE :: o_wake_s = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    15621508    'wake_s', 'wake_s', '-', (/ ('', i=1, 10) /))
     
    15661512    'wake_deltaq', 'wake_deltaq', ' ', (/ ('', i=1, 10) /))
    15671513  TYPE(ctrl_out), SAVE :: o_wake_omg = ctrl_out((/ 4, 5, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1568     'wake_omg', 'wake_omg', 'Pa/s', (/ ('', i=1, 10) /))
     1514    'wake_omg', 'wake_omg', ' ', (/ ('', i=1, 10) /))
    15691515  TYPE(ctrl_out), SAVE :: o_wdtrainA = ctrl_out((/ 4, 5, 10,  4, 10, 10, 11, 11, 11, 11 /), &
    15701516    'wdtrainA', 'precipitation from AA', '-', (/ ('', i=1, 10) /))
     
    17441690  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_trac(:)
    17451691  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_trac_cum(:)
    1746 #ifdef REPROBUS
    1747   TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_nas(:)
    1748 #endif
    17491692  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_dtr_vdf(:)
    17501693  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_dtr_the(:)
     
    17721715  TYPE(ctrl_out), SAVE :: o_rsucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    17731716    'rsucs', 'SW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /))
    1774   TYPE(ctrl_out), SAVE :: o_rsucsaf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1775     'rsucsaf', 'SW CS clean (no aerosol) upward radiation', 'W m-2', (/ ('', i=1, 10) /))
    17761717  TYPE(ctrl_out), SAVE :: o_rsdcs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    17771718    'rsdcs', 'SW CS downward radiation', 'W m-2', (/ ('', i=1, 10) /))
    1778   TYPE(ctrl_out), SAVE :: o_rsdcsaf = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    1779     'rsdcsaf', 'SW CS clean (no aerosol) downward radiation', 'W m-2', (/ ('', i=1, 10) /))
    17801719  TYPE(ctrl_out), SAVE :: o_rlucs = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
    17811720    'rlucs', 'LW CS upward radiation', 'W m-2', (/ ('', i=1, 10) /))
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_output_mod.F90

    r3356 r3411  
    3535    USE iophy
    3636    USE dimphy
    37     USE infotrac_phy, ONLY: nqtot, nqo, niadv, tname, ttext, type_trac
     37    USE infotrac_phy, ONLY: nqtot, nqo, niadv, tname, ttext
    3838    USE ioipsl
    3939    USE phys_cal_mod, only : hour, calend
     
    4646    USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs, aps, bps, pseudoalt
    4747    USE time_phylmdz_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref
    48 #ifdef REPROBUS
    49     USE chem_rep, ONLY: nbnas, tnamenas, ttextnas
    50 #endif
    5148#ifdef CPP_XIOS
    5249    ! ug Pour les sorties XIOS
     
    140137    REAL :: ini_heure
    141138#endif
    142     INTEGER                         :: ISW
    143     REAL, DIMENSION(NSW)            :: wl1_sun, wl2_sun !wavelength bounds (in um) for SW
    144     REAL, DIMENSION(NSW)            :: wn1_sun, wn2_sun !wavenumber bounds (in m-1) for SW
    145     REAL, DIMENSION(NSW)            :: spectband  !mean wavenumb. of each sp.band
    146     REAL, DIMENSION(NSW,2)          :: spbnds_sun !bounds of spectband
    147139
    148140    WRITE(lunout,*) 'Debut phys_output_mod.F90'
     
    159151    IF (.NOT. ALLOCATED(o_trac)) ALLOCATE(o_trac(nqtot))
    160152    IF (.NOT. ALLOCATED(o_trac_cum)) ALLOCATE(o_trac_cum(nqtot))
    161 #ifdef REPROBUS
    162     IF (.NOT. ALLOCATED(o_nas)) ALLOCATE(o_nas(nbnas))
    163 #endif
    164153    ALLOCATE(o_dtr_the(nqtot),o_dtr_con(nqtot),o_dtr_lessi_impa(nqtot))
    165154    ALLOCATE(o_dtr_lessi_nucl(nqtot),o_dtr_insc(nqtot),o_dtr_bcscav(nqtot))
     
    365354     CALL wxios_add_vaxis("Alt", &
    366355            levmax(iff) - levmin(iff) + 1, pseudoalt)
    367 
    368     IF (NSW.EQ.6) THEN
    369 !
    370 !wl1_sun: minimum bound of wavelength (in um)
    371 !
    372       wl1_sun(1)=0.180
    373       wl1_sun(2)=0.250
    374       wl1_sun(3)=0.440
    375       wl1_sun(4)=0.690
    376       wl1_sun(5)=1.190
    377       wl1_sun(6)=2.380
    378 !
    379 !wl2_sun: maximum bound of wavelength (in um)
    380 !
    381       wl2_sun(1)=0.250
    382       wl2_sun(2)=0.440
    383       wl2_sun(3)=0.690
    384       wl2_sun(4)=1.190
    385       wl2_sun(5)=2.380
    386       wl2_sun(6)=4.000
    387 !
    388     ELSE IF(NSW.EQ.2) THEN
    389 !
    390 !wl1_sun: minimum bound of wavelength (in um)
    391 !
    392       wl1_sun(1)=0.250
    393       wl1_sun(2)=0.690
    394 !
    395 !wl2_sun: maximum bound of wavelength (in um)
    396 !
    397       wl2_sun(1)=0.690
    398       wl2_sun(2)=4.000
    399     ENDIF
    400 
    401     DO ISW=1, NSW
    402      wn1_sun(ISW)=1.e+6/wl1_sun(ISW)
    403      wn2_sun(ISW)=1.e+6/wl2_sun(ISW)
    404      spbnds_sun(ISW,1)=wn2_sun(ISW)
    405      spbnds_sun(ISW,2)=wn1_sun(ISW)
    406      spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2
    407     ENDDO
    408 !
    409 !!! ajout axe vertical spectband : solar band number
    410     CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down')
    411356   ELSE
    412357    ! NMC files
     
    578523            ENDDO
    579524      ENDIF
    580       IF (type_trac=='repr') THEN
    581 #ifdef REPROBUS
    582          DO iiq=1,nbnas
    583             o_nas(iiq) = ctrl_out((/ 4, 5, 5, 5, 10, 10, 11, 11, 11, 11 /), &
    584                  tnamenas(iiq),ttextnas(iiq), "-", &
    585                  (/ '', '', '', '', '', '', '', '', '', '' /))
    586          ENDDO
    587 #endif
    588       ENDIF
    589525
    590526   ENDDO !  iff
     
    600536
    601537    IF (prt_level >= 10) THEN
    602       WRITE(lunout,*)'swaerofree_diag=',swaerofree_diag
    603538      WRITE(lunout,*)'swaero_diag=',swaero_diag
    604539      WRITE(lunout,*)'dryaod_diag=',dryaod_diag
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_output_var_mod.F90

    r3356 r3411  
    1414  REAL, SAVE, ALLOCATABLE :: snow_o(:), zfra_o(:)
    1515  !$OMP THREADPRIVATE(snow_o, zfra_o)
    16   REAL, SAVE, ALLOCATABLE :: sza_o(:) ! solar zenithal angle
    17   !$OMP THREADPRIVATE(sza_o)
    1816  INTEGER, SAVE, ALLOCATABLE ::  itau_con(:)       ! Nombre de pas ou rflag <= 1
    1917  !$OMP THREADPRIVATE(itau_con)
     
    8886
    8987  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
    90   ! swaerofree_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
    9188  ! dryaod_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
    9289  !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call
    9390  !--    and corrected back to TRUE based on output requests
    94   LOGICAL, SAVE                                :: swaerofree_diag=.TRUE.
    9591  LOGICAL, SAVE                                :: swaero_diag=.TRUE.
    9692  LOGICAL, SAVE                                :: dryaod_diag=.TRUE.
    97   !$OMP THREADPRIVATE(swaerofree_diag, swaero_diag, dryaod_diag)
     93  !$OMP THREADPRIVATE(swaero_diag, dryaod_diag)
    9894  ! ok_4xCO2atm : flag indicates if it is necessary to do a second call of
    9995  ! radiation code with a 4xCO2 or another different GES to assess SW/LW
     
    10298  !--    changed back to FALSE after first radiation call and corrected back to TRUE
    10399  !--    based on output requests
    104   LOGICAL, SAVE                                :: ok_4xCO2atm=.TRUE.
     100  LOGICAL, SAVE                                :: ok_4xCO2atm=.FALSE.
    105101  !$OMP THREADPRIVATE(ok_4xCO2atm)
    106102
     
    146142
    147143    allocate(snow_o(klon), zfra_o(klon))
    148     allocate(sza_o(klon) )
    149144    allocate(itau_con(klon))
    150145    allocate(sens_prec_liq_o(klon,2))
     
    201196
    202197    deallocate(snow_o,zfra_o,itau_con)
    203     deallocate(sza_o)
    204198    deallocate (bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
    205199    deallocate (d_qw_col, d_ql_col, d_qs_col, d_qt_col, d_ek_col, d_h_dair_col &
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_output_write_mod.F90

    r3356 r3411  
    1414CONTAINS
    1515
    16   ! ug Routine pour définir (lors du premier passage) ET sortir les variables
     16  ! ug Routine pour définir (los du premier passageà) ET sortir les variables
    1717  SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, &
    1818       pplay, lmax_th, aerosol_couple,         &
     
    3131    USE vertical_layers_mod, ONLY : ap, bp, aps, bps
    3232    USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, &
    33          o_longitude, o_latitude, &
    3433         o_Ahyb, o_Bhyb,o_Ahyb_inter, o_Bhyb_inter, &
    3534         is_ave, is_sic, o_contfracATM, o_contfracOR, &
     
    4039         o_wind10m, o_wind10max, o_gusts, o_sicf, &
    4140         o_psol, o_mass, o_qsurf, o_qsol, &
    42          o_precip, o_rain_fall, o_rain_con, o_ndayrain, o_plul, o_pluc, o_plun, &
     41         o_precip, o_ndayrain, o_plul, o_pluc, o_plun, &
    4342         o_snow, o_msnow, o_fsnow, o_evap, o_ep,o_epmax_diag, & ! epmax_cape
    4443         o_tops, o_tops0, o_topl, o_topl0, &
    45          o_SWupTOA, o_SWupTOAclr, o_SWupTOAcleanclr, o_SWdnTOA, &
     44         o_SWupTOA, o_SWupTOAclr, o_SWdnTOA, &
    4645         o_SWdnTOAclr, o_nettop, o_SWup200, &
    4746         o_SWup200clr, o_SWdn200, o_SWdn200clr, &
     
    4948         o_LWdn200clr, o_sols, o_sols0, &
    5049         o_soll, o_radsol, o_soll0, o_SWupSFC, &
    51          o_SWupSFCclr, o_SWupSFCcleanclr, o_SWdnSFC, o_SWdnSFCclr, o_SWdnSFCcleanclr, &
     50         o_SWupSFCclr, o_SWdnSFC, o_SWdnSFCclr, &
    5251         o_LWupSFC, o_LWdnSFC, o_LWupSFCclr, &
    53          o_LWdnSFCclr, o_LWupTOAcleanclr, o_LWdnSFCcleanclr, o_bils, o_bils_diss, &
     52         o_LWdnSFCclr, o_bils, o_bils_diss, &
    5453         o_bils_ec,o_bils_ech, o_bils_tke, o_bils_kinetic, &
    5554         o_bils_latent, o_bils_enthalp, o_sens, &
    56          o_fder, o_ffonte, o_fqcalving, o_fqfonte, o_mrroli, o_runofflic, &
     55         o_fder, o_ffonte, o_fqcalving, o_fqfonte, o_runofflic, &
    5756         o_taux, o_tauy, o_snowsrf, o_qsnow, &
    5857         o_snowhgt, o_toice, o_sissnow, o_runoff, &
     
    7069         o_cldhjn, o_cldtjn, o_cldq, o_lwp, o_iwp, &
    7170         o_ue, o_ve, o_uq, o_vq, o_cape, o_pbase, &
    72          o_uwat, o_vwat, &
    7371         o_ptop, o_fbase, o_plcl, o_plfc, &
    7472         o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, &
    75          o_dnwd, o_dnwd0, o_ftime_deepcv, o_ftime_con, o_mc, &
     73         o_dnwd, o_dnwd0, o_ftime_con, o_mc, &
    7674         o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, &
    7775         o_s_therm, o_uSTDlevs, o_vSTDlevs, &
     
    8482         o_cdragh_x   , o_cdragh_w   , o_cdragm_x   , o_cdragm_w   , &
    8583         o_kh         , o_kh_x       , o_kh_w       , &
    86          o_ale, o_alp, o_cin, o_WAPE, o_wake_h, o_cv_gen, o_wake_dens, &
     84         o_ale, o_alp, o_cin, o_WAPE, o_wake_h, &
    8785         o_wake_s, o_wake_deltat, o_wake_deltaq, &
    8886         o_wake_omg, o_dtwak, o_dqwak, o_dqwak2d, o_Vprecip, &
     
    9997         o_cldemi, o_pr_con_l, o_pr_con_i, &
    10098         o_pr_lsc_l, o_pr_lsc_i, o_re, o_fl, &
    101          o_rh2m, &
     99         o_rh2m, o_rh2m_min, o_rh2m_max, &
    102100         o_qsat2m, o_tpot, o_tpote, o_SWnetOR, &
    103          o_LWdownOR, o_snowl, &
     101         o_SWdownOR, o_LWdownOR, o_snowl, &
    104102         o_solldown, o_dtsvdfo, o_dtsvdft, &
    105103         o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h,  o_od443aer, o_od550aer, &
     
    121119         o_swtoacf_zero, o_swsrfcf_zero, &
    122120         o_topswai, o_solswai, o_toplwai, o_sollwai, o_scdnc, &
    123          o_cldncl, o_reffclws, o_reffclwc, o_solbnd, o_stratomask,&
     121         o_cldncl, o_reffclws, o_reffclwc, o_stratomask,&
    124122         o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, &
    125          o_lcc3dstra, o_icc3dcon, o_icc3dstra, &
    126          o_cldicemxrat, o_cldwatmxrat, o_reffclwtop, o_ec550aer, &
     123         o_lcc3dstra, o_reffclwtop, o_ec550aer, &
    127124         o_lwcon, o_iwcon, o_temp, o_theta, &
    128125         o_ovapinit, o_ovap, o_oliq, o_ocond, o_geop, &
     
    156153         o_du_gwd_front, o_dv_gwd_front, &
    157154         o_east_gwstress, o_west_gwstress, &
    158          o_rsd, o_rlu, o_rld, o_rsucs, o_rsdcs, o_rsucsaf, o_rsdcsaf, &
     155         o_rsd, o_rlu, o_rld, o_rsucs, o_rsdcs, &
    159156         o_rlucs, o_rldcs, o_tnt, o_tntr, &
    160157         o_tntscpbl, o_tnhus, o_tnhusscpbl, &
     
    169166         o_uxv, o_vxq, o_vxT, o_wxq, o_vxphi, &
    170167         o_wxT, o_uxu, o_vxv, o_TxT, o_trac, &
    171 #ifdef REPROBUS
    172          o_nas, &
    173 #endif
    174168         o_dtr_vdf, o_dtr_the, o_dtr_con, &
    175169         o_dtr_lessi_impa, o_dtr_lessi_nucl, &
     
    183177         o_lat_prec_liq_oce, o_lat_prec_liq_sic, &
    184178         o_lat_prec_sol_oce, o_lat_prec_sol_sic, &
    185          o_sza, &
    186179! Marine
    187180         o_map_prop_hc, o_map_prop_hist, o_map_emis_hc, o_map_iwp_hc, &
     
    204197         o_budg_sed_part, o_R2SO4, o_OCS_lifetime, o_SO2_lifetime, &
    205198         o_budg_3D_backgr_ocs, o_budg_3D_backgr_so2, &
    206          o_budg_dep_dry_ocs, o_budg_dep_wet_ocs, &
    207          o_budg_dep_dry_so2, o_budg_dep_wet_so2, &
    208199         o_budg_dep_dry_h2so4, o_budg_dep_wet_h2so4, &
    209200         o_budg_dep_dry_part, o_budg_dep_wet_part, &
     
    218209         nday_rain, rain_con, snow_con, &
    219210         topsw, toplw, toplw0, swup, swdn, &
    220          topsw0, swupc0, swdnc0, swup0, swdn0, SWup200, SWup200clr, &
     211         topsw0, swup0, swdn0, SWup200, SWup200clr, &
    221212         SWdn200, SWdn200clr, LWup200, LWup200clr, &
    222213         LWdn200, LWdn200clr, solsw, solsw0, sollw, &
    223214         radsol, swradcorr, sollw0, sollwdown, sollw, gustiness, &
    224          sollwdownclr, lwdnc0, lwdn0, ftsol, ustar, u10m, &
     215         sollwdownclr, lwdn0, ftsol, ustar, u10m, &
    225216         v10m, pbl_tke, wake_delta_pbl_TKE, &
    226217         delta_tsurf, &
    227218         wstar, cape, ema_pcb, ema_pct, &
    228219         ema_cbmf, Ma, fm_therm, ale_bl, alp_bl, ale, &
    229          alp, cin, wake_pe, wake_dens, wake_s, wake_deltat, &
     220         alp, cin, wake_pe, wake_s, wake_deltat, &
    230221         wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, &
    231          ale_wake, ale_bl_stat, &
    232222         rnebcon, wo, falb1, albsol2, coefh, clwcon0, &
    233223         ratqs, entr_therm, zqasc, detr_therm, f0, &
    234          lwup, lwdn, lwupc0, lwup0, coefm, &
    235          swupp, lwupp, swupc0p, swup0p, lwupc0p, lwup0p, swdnp, lwdnp, &
    236          swdnc0p, swdn0p, lwdnc0p, lwdn0p, tnondef, O3sumSTD, uvsumSTD, &
     224         lwup, lwdn, lwup0, coefm, &
     225         swupp, lwupp, swup0p, lwup0p, swdnp, lwdnp, &
     226         swdn0p, lwdn0p, tnondef, O3sumSTD, uvsumSTD, &
    237227         vqsumSTD, vTsumSTD, O3daysumSTD, wqsumSTD, &
    238228         vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, &
     
    255245         cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, &
    256246         cldtjn, cldq, flwp, fiwp, ue, ve, uq, vq, &
    257          uwat, vwat, &
    258247         plcl, plfc, wbeff, convoccur, upwd, dnwd, dnwd0, prw, prlw, prsw, &
    259248         s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, &
    260249         vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, &
    261          twriteSTD, alp_wake, &
    262 !!         dtvdf_x    ,dtvdf_w    ,dqvdf_x    ,dqvdf_w    , &
    263          d_t_vdf_x    ,d_t_vdf_w    ,d_q_vdf_x    ,d_q_vdf_w    , &
     250         twriteSTD, ale_wake, alp_wake, &
     251         dtvdf_x    ,dtvdf_w    ,dqvdf_x    ,dqvdf_w    , &
    264252         sens_x     ,sens_w     ,zxfluxlat_x,zxfluxlat_w, &
    265253         cdragh_x   ,cdragh_w   ,cdragm_x   ,cdragm_w   , &
    266254         kh         ,kh_x       ,kh_w       , &
    267          cv_gen, wake_h, &
     255         wake_h, &
    268256         wake_omg, d_t_wake, d_q_wake, Vprecip, &
    269257         wdtrainA, wdtrainM, n2, s2, proba_notrig, &
    270          random_notrig, &
     258         random_notrig, ale_bl_stat, &
    271259         alp_bl_det, alp_bl_fluct_m, alp_bl_conv, &
    272260         alp_bl_stat, alp_bl_fluct_tke, slab_wfbils, &
     
    285273         sollwad0_aero, toplwai_aero, sollwai_aero, &
    286274         scdnc, cldncl, reffclws, reffclwc, cldnvi, stratomask,&
    287          lcc, lcc3d, lcc3dcon, lcc3dstra, &
    288          icc3dcon, icc3dstra, zfice, reffclwtop, &
     275         lcc, lcc3d, lcc3dcon, lcc3dstra, reffclwtop, &
    289276         ec550aer, flwc, fiwc, t_seri, theta, q_seri, &
    290277         ql_seri, qs_seri, tr_seri, &
     
    314301         budg_sed_part, R2SO4, OCS_lifetime, SO2_lifetime, &
    315302         budg_3D_backgr_ocs, budg_3D_backgr_so2, &
    316          budg_dep_dry_ocs, budg_dep_wet_ocs, &
    317          budg_dep_dry_so2, budg_dep_wet_so2, &
    318303         budg_dep_dry_h2so4, budg_dep_wet_h2so4, &
    319304         budg_dep_dry_part, budg_dep_wet_part, &
     
    324309#endif
    325310
    326 #ifdef REPROBUS
    327     USE CHEM_REP, ONLY : nas, nbnas, tnamenas, ttextnas
    328 #endif
    329 
    330311    USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, &
    331312         bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, &
    332313         itau_con, nfiles, clef_files, nid_files, dryaod_diag, &
    333314         zustr_gwd_hines, zvstr_gwd_hines,zustr_gwd_rando, zvstr_gwd_rando, &
    334          zustr_gwd_front, zvstr_gwd_front, sza_o,    &
     315         zustr_gwd_front, zvstr_gwd_front,     &
    335316         sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o, &
    336317         cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, &
     
    355336    USE indice_sol_mod, ONLY: nbsrf
    356337    USE infotrac_phy, ONLY: nqtot, nqo, type_trac, tname, niadv
    357     USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
     338    USE geometry_mod, ONLY: cell_area
    358339    USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow
    359340    USE aero_mod, ONLY: naero_tot, id_STRAT_phy
     
    405386    INTEGER :: itau_w
    406387    INTEGER :: i, iinit, iinitend=1, iff, iq, iiq, nsrf, k, ll, naero
    407     REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d
     388    REAL, DIMENSION (klon) :: zx_tmp_fi2d
    408389    REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv
    409390    REAL, DIMENSION (klon,klev+1) :: zx_tmp_fi3d1
    410     REAL, DIMENSION (klon,NSW) :: zx_tmp_fi3dsp
    411391    CHARACTER (LEN=4)              :: bb2
    412392    INTEGER, DIMENSION(nbp_lon*nbp_lat)  :: ndex2d
     
    570550       CALL histwrite_phy(o_Ahyb_inter, Ahyb_bounds)
    571551       CALL histwrite_phy(o_Bhyb_inter, Bhyb_bounds)
    572        CALL histwrite_phy(o_longitude, longitude_deg)
    573        CALL histwrite_phy(o_latitude, latitude_deg)
    574552!
    575553#ifdef CPP_RRTM
     
    631609     ENDIF
    632610
    633        CALL histwrite_phy(o_sza, sza_o)
    634611       CALL histwrite_phy(o_flat, zxfluxlat)
    635612       CALL histwrite_phy(o_ptstar, ptstar)
     
    690667
    691668       CALL histwrite_phy(o_precip, zx_tmp_fi2d)
    692        CALL histwrite_phy(o_rain_fall, rain_fall)
    693669       CALL histwrite_phy(o_ndayrain, nday_rain)
    694670
     
    711687       ENDIF
    712688       CALL histwrite_phy(o_pluc, zx_tmp_fi2d)
    713        CALL histwrite_phy(o_rain_con, rain_con)
    714689       CALL histwrite_phy(o_snow, snow_fall)
    715690       CALL histwrite_phy(o_msnow, zxsnow)
     
    739714       ENDIF
    740715       CALL histwrite_phy(o_SWupTOAclr, zx_tmp_fi2d)
    741 
    742        IF (vars_defined) THEN
    743           zx_tmp_fi2d(:) = swupc0(:,klevp1)*swradcorr(:)
    744        ENDIF
    745        CALL histwrite_phy(o_SWupTOAcleanclr, zx_tmp_fi2d)
    746716
    747717       IF (vars_defined) THEN
     
    811781
    812782       IF (vars_defined) THEN
    813           zx_tmp_fi2d(:) = swupc0(:,1)*swradcorr(:)
    814        ENDIF
    815        CALL histwrite_phy(o_SWupSFCcleanclr, zx_tmp_fi2d)
    816 
    817        IF (vars_defined) THEN
    818783          zx_tmp_fi2d(:) = swdn(:,1)*swradcorr(:)
    819784       ENDIF
     
    824789       ENDIF
    825790       CALL histwrite_phy(o_SWdnSFCclr, zx_tmp_fi2d)
    826 
    827        IF (vars_defined) THEN
    828           zx_tmp_fi2d(:) = swdnc0(:,1)*swradcorr(:)
    829        ENDIF
    830        CALL histwrite_phy(o_SWdnSFCcleanclr, zx_tmp_fi2d)
    831791
    832792       IF (vars_defined) THEN
     
    842802       CALL histwrite_phy(o_LWupSFCclr, zx_tmp_fi2d)
    843803       CALL histwrite_phy(o_LWdnSFCclr, sollwdownclr)
    844 
    845        IF (vars_defined) THEN
    846           zx_tmp_fi2d(:) = lwupc0(:,klevp1)
    847        ENDIF
    848        CALL histwrite_phy(o_LWupTOAcleanclr, zx_tmp_fi2d)
    849        IF (vars_defined) THEN
    850           zx_tmp_fi2d(:) = -1.*lwdnc0(:,1)
    851        ENDIF
    852        CALL histwrite_phy(o_LWdnSFCcleanclr, zx_tmp_fi2d)
    853 
    854804       CALL histwrite_phy(o_bils, bils)
    855805       CALL histwrite_phy(o_bils_diss, bils_diss)
     
    869819       CALL histwrite_phy(o_fqcalving, zxfqcalving)
    870820       CALL histwrite_phy(o_fqfonte, zxfqfonte)
    871        IF (vars_defined) THEN
    872           zx_tmp_fi2d(1:klon)=(zxfqfonte(1:klon)+rain_fall(1:klon))*pctsrf(1:klon,is_lic)
    873        ENDIF
    874        CALL histwrite_phy(o_mrroli, zx_tmp_fi2d)
    875821       CALL histwrite_phy(o_runofflic, zxrunofflic)
    876822       IF (vars_defined) THEN
     
    1012958       CALL histwrite_phy(o_uq, uq)
    1013959       CALL histwrite_phy(o_vq, vq)
    1014        CALL histwrite_phy(o_uwat, uwat)
    1015        CALL histwrite_phy(o_vwat, vwat)
    1016960       IF (iflag_con.GE.3) THEN ! sb
    1017961          CALL histwrite_phy(o_cape, cape)
     
    1032976          CALL histwrite_phy(o_dnwd, dnwd)
    1033977          CALL histwrite_phy(o_dnwd0, dnwd0)
    1034           !! The part relative to the frequency of occurence of convection
    1035           !! is now grouped with the part relative to thermals and shallow
    1036           !! convection (output of the 3 fields: ftime_deepcv, ftime_th and
    1037           !!  ftime_con).
     978          IF (vars_defined)         zx_tmp_fi2d=float(itau_con)/float(itap)
     979          CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
    1038980          IF (vars_defined) THEN
    1039981             IF (iflag_thermals>=1)THEN
    1040                 zx_tmp_fi3d=-dnwd+dnwd0+upwd+fm_therm(:,1:klev)
     982                zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev)
    1041983             ELSE
    1042                 zx_tmp_fi3d=-dnwd+dnwd0+upwd
     984                zx_tmp_fi3d=dnwd+dnwd0+upwd
    1043985             ENDIF
    1044986          ENDIF
     
    11571099             CALL histwrite_phy(o_alp_wk, alp_wake)
    11581100             IF (iflag_pbl_split>=1) THEN
    1159                IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf_x(1:klon,1:klev)/pdtphys
    1160                CALL histwrite_phy(o_dtvdf_x    ,zx_tmp_fi3d)
    1161                IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf_w(1:klon,1:klev)/pdtphys
    1162                CALL histwrite_phy(o_dtvdf_w    ,zx_tmp_fi3d)
    1163                IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf_x(1:klon,1:klev)/pdtphys
    1164                CALL histwrite_phy(o_dqvdf_x    ,zx_tmp_fi3d)
    1165                IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf_w(1:klon,1:klev)/pdtphys
    1166 
    1167 !
     1101               !ym warning : dtvdf_x, dtvdf_w, dqvdf_x, dqvdf_w are not defined by model
     1102               !ym => init to 0 in phys_local_var_mod
     1103               IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=dtvdf_x(1:klon,1:klev)/pdtphys
     1104               CALL histwrite_phy(o_dtvdf_x    ,zx_tmp_fi3d)
     1105               IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=dtvdf_w(1:klon,1:klev)/pdtphys
     1106               CALL histwrite_phy(o_dtvdf_w    ,zx_tmp_fi3d)
     1107               IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=dqvdf_x(1:klon,1:klev)/pdtphys
     1108               CALL histwrite_phy(o_dqvdf_x    ,zx_tmp_fi3d)
     1109               IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=dqvdf_w(1:klon,1:klev)/pdtphys
    11681110               CALL histwrite_phy(o_dqvdf_w    ,zx_tmp_fi3d)
    11691111               CALL histwrite_phy(o_sens_x     ,sens_x     )
     
    11841126             CALL histwrite_phy(o_cin, cin)
    11851127             CALL histwrite_phy(o_WAPE, wake_pe)
    1186              CALL histwrite_phy(o_cv_gen, cv_gen)
    11871128             CALL histwrite_phy(o_wake_h, wake_h)
    1188              CALL histwrite_phy(o_wake_dens, wake_dens)
    11891129             CALL histwrite_phy(o_wake_s, wake_s)
    11901130             CALL histwrite_phy(o_wake_deltat, wake_deltat)
     
    12811221       CALL histwrite_phy(o_rh2m, zx_tmp_fi2d)
    12821222
    1283 !       IF (vars_defined) THEN
    1284 !          DO i=1, klon
    1285 !             zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
    1286 !          ENDDO
    1287 !       ENDIF
    1288 !       CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d)
    1289 
    1290 !       IF (vars_defined) THEN
    1291 !          DO i=1, klon
    1292 !             zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
    1293 !          ENDDO
    1294 !       ENDIF
    1295 !       CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d)
     1223       IF (vars_defined) THEN
     1224          DO i=1, klon
     1225             zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
     1226          ENDDO
     1227       ENDIF
     1228       CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d)
     1229
     1230       IF (vars_defined) THEN
     1231          DO i=1, klon
     1232             zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)
     1233          ENDDO
     1234       ENDIF
     1235       CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d)
    12961236
    12971237       CALL histwrite_phy(o_qsat2m, qsat2m)
     
    13001240       IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)
    13011241       CALL histwrite_phy(o_SWnetOR,  zx_tmp_fi2d)
     1242       IF (vars_defined) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon))
     1243       CALL histwrite_phy(o_SWdownOR,  zx_tmp_fi2d)
    13021244       CALL histwrite_phy(o_LWdownOR, sollwdown)
    13031245       CALL histwrite_phy(o_snowl, snow_lsc)
     
    13881330          CALL histwrite_phy(o_budg_3D_nucl,         budg_3D_nucl)
    13891331          CALL histwrite_phy(o_budg_3D_cond_evap,    budg_3D_cond_evap)
    1390           CALL histwrite_phy(o_budg_dep_dry_ocs,     budg_dep_dry_ocs)
    1391           CALL histwrite_phy(o_budg_dep_wet_ocs,     budg_dep_wet_ocs)
    1392           CALL histwrite_phy(o_budg_dep_dry_so2,     budg_dep_dry_so2)
    1393           CALL histwrite_phy(o_budg_dep_wet_so2,     budg_dep_wet_so2)
    13941332          CALL histwrite_phy(o_budg_dep_dry_h2so4,   budg_dep_dry_h2so4)
    13951333          CALL histwrite_phy(o_budg_dep_wet_h2so4,   budg_dep_wet_h2so4)
     
    14971435          CALL histwrite_phy(o_lcc3dcon, lcc3dcon)
    14981436          CALL histwrite_phy(o_lcc3dstra, lcc3dstra)
    1499           CALL histwrite_phy(o_icc3dcon, icc3dcon)
    1500           CALL histwrite_phy(o_icc3dstra, icc3dstra)
    1501           CALL histwrite_phy(o_cldicemxrat, zfice)
    1502           zx_tmp_fi3d(:,:)=1-zfice(:,:)
    1503           CALL histwrite_phy(o_cldwatmxrat, zx_tmp_fi3d)
    15041437          CALL histwrite_phy(o_reffclwtop, reffclwtop)
    15051438       ENDIF
     
    15291462       CALL histwrite_phy(o_zfull,zx_tmp_fi3d)
    15301463
    1531 #ifdef CPP_XIOS
    1532 !solbnd begin
    1533 #ifdef CPP_RRTM
    1534       IF (iflag_rrtm.EQ.1) THEN
    1535        IF (vars_defined) THEN
    1536         DO ISW=1, NSW
    1537           zx_tmp_fi3dsp(:,ISW) = swdn(:,klevp1)*swradcorr(:)*RSUN(ISW)
    1538         ENDDO
    1539         CALL histwrite_phy(o_solbnd, zx_tmp_fi3dsp)
    1540        ENDIF
    1541       ENDIF
    1542 #endif
    1543 !solbnd end
    1544 #endif
    1545 
    15461464       IF (flag_aerosol_strat.EQ.2) THEN
    15471465         CALL histwrite_phy(o_stratomask, stratomask)
     
    15521470        DO k = 2, klev
    15531471         DO i = 1, klon
    1554             zx_tmp_fi3d(i,k) = zphi(i,k-1)/RG + &
     1472            zx_tmp_fi3d(i,k) = zphi(i,k)/RG + &
    15551473                          (zphi(i,k)-zphi(i,k-1))/RG * &
    1556                           (paprs(i,k)-pplay(i,k-1))/(pplay(i,k)-pplay(i,k-1))
     1474                          (paprs(i,k)-pplay(i,k))/(pplay(i,k)-pplay(i,k-1))
    15571475         ENDDO
    15581476        ENDDO
     
    17241642          CALL histwrite_phy(o_plulst, plul_st)
    17251643          IF (vars_defined) THEN
    1726              do i=1,klon
    1727                 zx_tmp_fi2d(1:klon)=lmax_th(:)
    1728              enddo
    1729           ENDIF
    1730           CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)
    1731           IF (vars_defined) THEN
    17321644             DO k=1,klev
    17331645                DO i=1,klon
     
    17411653          ENDIF
    17421654          CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d)
     1655          IF (vars_defined) THEN
     1656             do i=1,klon
     1657                zx_tmp_fi2d(1:klon)=lmax_th(:)
     1658             enddo
     1659          ENDIF
     1660          CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)
    17431661       ENDIF ! iflag_thermals>=1
    1744 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1745        zpt_conv = 0.
    1746        WHERE (ptconv) zpt_conv = 1.
    1747        CALL histwrite_phy(o_ptconv, zpt_conv)
    1748 !!       IF (vars_defined)         zx_tmp_fi2d=float(itau_con)/float(itap)
    1749 !!       CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
    1750        IF (vars_defined) THEN
    1751           zpt_conv2d(:) = 0.
    1752           DO k=1,klev
    1753             WHERE (ptconv(:,k)) zpt_conv2d(:) = 1.
    1754           ENDDO
    1755        ENDIF
    1756        CALL histwrite_phy(o_ftime_deepcv, zpt_conv2d)
    1757        IF (vars_defined) THEN
    1758           zx_tmp_fi2d(:) = 0.
    1759           DO k=1,klev
    1760             WHERE (ptconvth(:,k)) zx_tmp_fi2d(:) = 1.
    1761           ENDDO
    1762        ENDIF
    1763        CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
    1764        IF (vars_defined) THEN
    1765            zx_tmp_fi2d(:) = max(zx_tmp_fi2d(:),zpt_conv2d(:))
    1766        ENDIF
    1767        CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d)
    17681662!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    17691663       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys
     
    17811675       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    17821676       CALL histwrite_phy(o_dqeva2d, zx_tmp_fi2d)
     1677       zpt_conv = 0.
     1678       WHERE (ptconv) zpt_conv = 1.
     1679       CALL histwrite_phy(o_ptconv, zpt_conv)
    17831680       CALL histwrite_phy(o_ratqs, ratqs)
    17841681       IF (vars_defined) THEN
     
    17981695       IF (iflag_thermals>=1) THEN
    17991696          ! Pour l instant 0 a y reflichir pour les thermiques
    1800           ! regroupe avec ftime_deepcv et ftime_con
    1801           !!zx_tmp_fi2d=0.
    1802           !!CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
     1697          zx_tmp_fi2d=0.
     1698          CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)
    18031699          CALL histwrite_phy(o_f_th, fm_therm)
    18041700          CALL histwrite_phy(o_e_th, entr_therm)
     
    19321828       ENDIF
    19331829       CALL histwrite_phy(o_rsdcs, zx_tmp_fi3d1)
    1934        DO k=1, klevp1
    1935          zx_tmp_fi3d1(:,k)=swdnc0(:,k)*swradcorr(:)
    1936        ENDDO
    1937        CALL histwrite_phy(o_rsdcsaf, zx_tmp_fi3d1)
    19381830
    19391831       CALL histwrite_phy(o_rlu, lwup)
     
    21702062            IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN
    21712063             !--3D fields
    2172              CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo))
    2173              CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo))
    2174              CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo))
    2175              CALL histwrite_phy(o_dtr_con(iq-nqo),d_tr_cv(:,:,iq-nqo))
    2176              CALL histwrite_phy(o_dtr_lessi_impa(iq-nqo),d_tr_lessi_impa(:,:,iq-nqo))
    2177              CALL histwrite_phy(o_dtr_lessi_nucl(iq-nqo),d_tr_lessi_nucl(:,:,iq-nqo))
    2178              CALL histwrite_phy(o_dtr_insc(iq-nqo),d_tr_insc(:,:,iq-nqo))
    2179              CALL histwrite_phy(o_dtr_bcscav(iq-nqo),d_tr_bcscav(:,:,iq-nqo))
    2180              CALL histwrite_phy(o_dtr_evapls(iq-nqo),d_tr_evapls(:,:,iq-nqo))
    2181              CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo))
    2182              CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo))
    2183              CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo))
    2184              CALL histwrite_phy(o_dtr_sat(iq-nqo),d_tr_sat(:,:,iq-nqo))
    2185              CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo))
     2064!             CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo))
     2065!             CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo))
     2066!             CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo))
     2067!             CALL histwrite_phy(o_dtr_con(iq-nqo),d_tr_cv(:,:,iq-nqo))
     2068!             CALL histwrite_phy(o_dtr_lessi_impa(iq-nqo),d_tr_lessi_impa(:,:,iq-nqo))
     2069!             CALL histwrite_phy(o_dtr_lessi_nucl(iq-nqo),d_tr_lessi_nucl(:,:,iq-nqo))
     2070!             CALL histwrite_phy(o_dtr_insc(iq-nqo),d_tr_insc(:,:,iq-nqo))
     2071!             CALL histwrite_phy(o_dtr_bcscav(iq-nqo),d_tr_bcscav(:,:,iq-nqo))
     2072!             CALL histwrite_phy(o_dtr_evapls(iq-nqo),d_tr_evapls(:,:,iq-nqo))
     2073!             CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo))
     2074!             CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo))
     2075!             CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo))
     2076!             CALL histwrite_phy(o_dtr_sat(iq-nqo),d_tr_sat(:,:,iq-nqo))
     2077!             CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo))
    21862078             !--2D fields
    2187              CALL histwrite_phy(o_dtr_dry(iq-nqo), flux_tr_dry(:,iq-nqo))
     2079!             CALL histwrite_phy(o_dtr_dry(iq-nqo), flux_tr_dry(:,iq-nqo))
    21882080             zx_tmp_fi2d=0.
    21892081             IF (vars_defined) THEN
     
    21922084                ENDDO
    21932085             ENDIF
    2194 #ifndef REPROBUS
    2195              CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d)
    2196 #endif
     2086!             CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d)
    21972087            ENDIF
    21982088          ENDDO
    21992089       ENDIF
    2200 
    2201        IF (type_trac == 'repr') THEN
    2202 #ifdef REPROBUS
    2203            DO iq=1,nbnas
    2204              CALL histwrite_phy(o_nas(iq), nas(:,:,iq))
    2205            ENDDO
    2206 #endif
    2207        ENDIF
    2208 
    22092090       ENDIF   !(iflag_phytrac==1)
    22102091
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_state_var_mod.F90

    r3356 r3411  
    1616      INTEGER, PARAMETER :: nout=3
    1717      INTEGER, PARAMETER :: napisccp=1
    18       INTEGER, SAVE :: radpas  ! radiation is called every "radpas" step
    19       INTEGER, SAVE :: cvpas   ! convection is called every "cvpas" step
    20       INTEGER, SAVE :: cvpas_0 ! reference value for cvpas
    21       INTEGER, SAVE :: wkpas   ! wake scheme is called every "wkpas" step
     18      INTEGER, SAVE :: radpas
     19      INTEGER, SAVE :: cvpas
     20      INTEGER, SAVE :: wkpas
    2221      REAL, PARAMETER :: missing_val_nf90=nf90_fill_real
    2322!$OMP THREADPRIVATE(radpas)
    2423!$OMP THREADPRIVATE(cvpas)
    25 !$OMP THREADPRIVATE(cvpas_0)
    2624!$OMP THREADPRIVATE(wkpas)
    2725      REAL, SAVE :: phys_tstep, solaire_etat0
     
    113111!$OMP THREADPRIVATE(clwcon0th,rnebcon0th)
    114112! radiation outputs
    115       REAL,ALLOCATABLE,SAVE :: swdnc0(:,:), swdn0(:,:), swdn(:,:)
    116 !$OMP THREADPRIVATE(swdnc0,swdn0,swdn)
    117       REAL,ALLOCATABLE,SAVE :: swupc0(:,:), swup0(:,:), swup(:,:)
    118 !$OMP THREADPRIVATE(swupc0, swup0,swup)
     113      REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:)
     114!$OMP THREADPRIVATE(swdn0,swdn)
     115      REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:)
     116!$OMP THREADPRIVATE(swup0,swup)
    119117      REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:)
    120118!$OMP THREADPRIVATE(SWdn200clr,SWdn200)
    121119      REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:)
    122120!$OMP THREADPRIVATE(SWup200clr,SWup200)
    123       REAL,ALLOCATABLE,SAVE :: lwdnc0(:,:), lwdn0(:,:), lwdn(:,:)
    124 !$OMP THREADPRIVATE(lwdnc0,lwdn0,lwdn)
    125       REAL,ALLOCATABLE,SAVE :: lwupc0(:,:), lwup0(:,:), lwup(:,:)
    126 !$OMP THREADPRIVATE(lwupc0,lwup0,lwup)
     121      REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:)
     122!$OMP THREADPRIVATE(lwdn0,lwdn)
     123      REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:)
     124!$OMP THREADPRIVATE(lwup0,lwup)
    127125      REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:)
    128126!$OMP THREADPRIVATE(LWdn200clr,LWdn200)
     
    238236      REAL,ALLOCATABLE,SAVE :: wght_th(:,:)
    239237!$OMP THREADPRIVATE(wght_th)
    240       REAL,ALLOCATABLE,SAVE    :: ale_wake(:)
    241 !$OMP THREADPRIVATE(ale_wake)
    242       REAL,ALLOCATABLE,SAVE    :: ale_bl_stat(:)
    243 !$OMP THREADPRIVATE(ale_bl_stat)
    244238!
    245239! variables de la wake
     
    247241! wake_deltaq : ecart d'humidite avec la zone non perturbee
    248242! wake_s      : fraction surfacique occupee par la poche froide
    249 ! awake_dens  : number of active wakes per unit area
    250243! wake_dens   : number of wakes per unit area
    251244! wake_occ    : occurence of wakes (= 1 if wakes occur, =0 otherwise)
     
    259252      REAL,ALLOCATABLE,SAVE :: wake_s(:)
    260253!$OMP THREADPRIVATE(wake_s)
    261       REAL,ALLOCATABLE,SAVE :: awake_dens(:), wake_dens(:)
    262 !$OMP THREADPRIVATE(awake_dens, wake_dens)
     254      REAL,ALLOCATABLE,SAVE :: wake_dens(:)
     255!$OMP THREADPRIVATE(wake_dens)
    263256      REAL,ALLOCATABLE,SAVE :: wake_Cstar(:)
    264257!$OMP THREADPRIVATE(wake_Cstar)
     
    357350      REAL,ALLOCATABLE,SAVE :: solsw0p(:),sollw0p(:)
    358351!$OMP THREADPRIVATE(topsw0p,toplw0p,solsw0p,sollw0p)
    359       REAL,ALLOCATABLE,SAVE :: lwdnc0p(:,:), lwdn0p(:,:), lwdnp(:,:)
    360       REAL,ALLOCATABLE,SAVE :: lwupc0p(:,:), lwup0p(:,:), lwupp(:,:)
    361 !$OMP THREADPRIVATE(lwdnc0p, lwdn0p, lwdnp, lwupc0p, lwup0p, lwupp)
    362       REAL,ALLOCATABLE,SAVE :: swdnc0p(:,:), swdn0p(:,:), swdnp(:,:)
    363       REAL,ALLOCATABLE,SAVE :: swupc0p(:,:), swup0p(:,:), swupp(:,:)
    364 !$OMP THREADPRIVATE(swdnc0p, swdn0p, swdnp, swupc0p, swup0p, swupp)
     352      REAL,ALLOCATABLE,SAVE :: lwdn0p(:,:), lwdnp(:,:)
     353      REAL,ALLOCATABLE,SAVE :: lwup0p(:,:), lwupp(:,:)
     354!$OMP THREADPRIVATE(lwdn0p, lwdnp, lwup0p, lwupp)
     355      REAL,ALLOCATABLE,SAVE :: swdn0p(:,:), swdnp(:,:)
     356      REAL,ALLOCATABLE,SAVE :: swup0p(:,:), swupp(:,:)
     357!$OMP THREADPRIVATE(swdn0p, swdnp, swup0p, swupp)
    365358
    366359! pbase : cloud base pressure
     
    488481      ALLOCATE(clwcon0th(klon,klev),rnebcon0th(klon,klev))
    489482! radiation outputs
    490       ALLOCATE(swdnc0(klon,klevp1), swdn0(klon,klevp1), swdn(klon,klevp1))
    491       ALLOCATE(swupc0(klon,klevp1), swup0(klon,klevp1), swup(klon,klevp1))
    492       ALLOCATE(lwdnc0(klon,klevp1), lwdn0(klon,klevp1), lwdn(klon,klevp1))
    493       ALLOCATE(lwupc0(klon,klevp1), lwup0(klon,klevp1), lwup(klon,klevp1))
     483      ALLOCATE(swdn0(klon,klevp1), swdn(klon,klevp1))
     484      ALLOCATE(swup0(klon,klevp1), swup(klon,klevp1))
     485      ALLOCATE(lwdn0(klon,klevp1), lwdn(klon,klevp1))
     486      ALLOCATE(lwup0(klon,klevp1), lwup(klon,klevp1))
    494487      ALLOCATE(SWdn200clr(klon), SWdn200(klon))
    495488      ALLOCATE(SWup200clr(klon), SWup200(klon))
     
    541534      ALLOCATE(ftd(klon,klev), fqd(klon,klev))
    542535      ALLOCATE(Ale_bl(klon))
    543       ALLOCATE(ale_wake(klon))
    544       ALLOCATE(ale_bl_stat(klon))
    545536      ALLOCATE(Alp_bl(klon))
    546537      ALLOCATE(lalim_conv(klon))
    547538      ALLOCATE(wght_th(klon,klev))
    548539      ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev))
    549       ALLOCATE(wake_s(klon), awake_dens(klon), wake_dens(klon))
     540      ALLOCATE(wake_s(klon), wake_dens(klon))
    550541      ALLOCATE(wake_Cstar(klon))
    551542      ALLOCATE(wake_pe(klon), wake_fip(klon))
     
    587578      ALLOCATE(topsw0p(klon),toplw0p(klon))
    588579      ALLOCATE(solsw0p(klon),sollw0p(klon))
    589       ALLOCATE(lwdnc0p(klon,klevp1), lwdn0p(klon,klevp1), lwdnp(klon,klevp1))
    590       ALLOCATE(lwupc0p(klon,klevp1), lwup0p(klon,klevp1), lwupp(klon,klevp1))
    591       ALLOCATE(swdnc0p(klon,klevp1), swdn0p(klon,klevp1), swdnp(klon,klevp1))
    592       ALLOCATE(swupc0p(klon,klevp1), swup0p(klon,klevp1), swupp(klon,klevp1))
     580      ALLOCATE(lwdn0p(klon,klevp1), lwdnp(klon,klevp1))
     581      ALLOCATE(lwup0p(klon,klevp1), lwupp(klon,klevp1))
     582      ALLOCATE(swdn0p(klon,klevp1), swdnp(klon,klevp1))
     583      ALLOCATE(swup0p(klon,klevp1), swupp(klon,klevp1))
    593584
    594585      ALLOCATE(cape(klon))
     
    650641      deallocate(clwcon0th, rnebcon0th)
    651642! radiation outputs
    652       deallocate(swdnc0, swdn0, swdn)
    653       deallocate(swupc0, swup0, swup)
    654       deallocate(lwdnc0, lwdn0, lwdn)
    655       deallocate(lwupc0, lwup0, lwup)
     643      deallocate(swdn0, swdn)
     644      deallocate(swup0, swup)
     645      deallocate(lwdn0, lwdn)
     646      deallocate(lwup0, lwup)
    656647      deallocate(SWdn200clr, SWdn200)
    657648      deallocate(SWup200clr, SWup200)
     
    690681      deallocate(ftd, fqd)
    691682      deallocate(Ale_bl, Alp_bl)
    692       deallocate(ale_wake)
    693       deallocate(ale_bl_stat)
    694683      deallocate(lalim_conv, wght_th)
    695684      deallocate(wake_deltat, wake_deltaq)
    696       deallocate(wake_s, awake_dens, wake_dens)
     685      deallocate(wake_s, wake_dens)
    697686      deallocate(wake_Cstar, wake_pe, wake_fip)
    698687!jyg<
     
    726715      deallocate(topsw0p,toplw0p)
    727716      deallocate(solsw0p,sollw0p)
    728       deallocate(lwdnc0p, lwdn0p, lwdnp)
    729       deallocate(lwupc0p, lwup0p, lwupp)
    730       deallocate(swdnc0p, swdn0p, swdnp)
    731       deallocate(swupc0p, swup0p, swupp)
     717      deallocate(lwdn0p, lwdnp)
     718      deallocate(lwup0p, lwupp)
     719      deallocate(swdn0p, swdnp)
     720      deallocate(swup0p, swupp)
    732721      deallocate(cape)
    733722      deallocate(pbase,bbase)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/physiq_mod.F90

    r3356 r3411  
    6363       !
    6464       d_t_vdf,d_q_vdf,d_u_vdf,d_v_vdf,d_t_diss, &
     65       d_t_vdf_w,d_q_vdf_w, &
     66       d_t_vdf_x,d_q_vdf_x, &
    6567       d_ts, &
    6668       !
     
    125127       slab_wfbils, tpot, tpote,               &
    126128       ue, uq, ve, vq, zxffonte,               &
    127        uwat, vwat,                             &
    128129       zxfqcalving, zxfluxlat,                 &
    129130       zxrunofflic,                            &
     
    134135       zxfluxlat_x, zxfluxlat_w, &
    135136       !
    136        d_t_vdf_x, d_t_vdf_w, &
    137        d_q_vdf_x, d_q_vdf_w, &
     137       dtvdf_x, dtvdf_w, &
     138       dqvdf_x, dqvdf_w, &
    138139       pbl_tke_input, &
    139140       t_therm, q_therm, u_therm, v_therm, &
     
    143144       !
    144145       wake_k, &
    145        alp_wake, &
     146       ale_wake, alp_wake, &
    146147       wake_h, wake_omg, &
    147148                       ! tendencies of delta T and delta q:
     
    152153       d_deltat_ajs_cv, d_deltaq_ajs_cv, & ! due to dry adjustment of (w) before convection
    153154                       ! tendencies of wake fractional area and wake number per unit area:
    154        d_s_wk,  d_dens_a_wk,  d_dens_wk, &  ! due to wakes
    155 !!!       d_s_vdf, d_dens_a_vdf, d_dens_vdf, & ! due to vertical diffusion
    156 !!!       d_s_the, d_dens_a_the, d_dens_the, & ! due to thermals
     155       d_s_wk,  d_dens_wk, &             ! due to wakes
     156!!!       d_s_vdf, d_dens_vdf, &            ! due to vertical diffusion
     157!!!       d_s_the, d_dens_the, &            ! due to thermals
    157158       !                                 
    158        ptconv, ratqsc, &
     159       ptconv, &
    159160       wbeff, convoccur, zmax_th, &
    160161       sens, flwp, fiwp,  &
    161        alp_bl_conv,alp_bl_det,  &
     162       ale_bl_stat,alp_bl_conv,alp_bl_det,  &
    162163       alp_bl_fluct_m,alp_bl_fluct_tke,  &
    163164       alp_bl_stat, n2, s2,  &
    164165       proba_notrig, random_notrig,  &
    165        cv_gen,  &
    166        !
    167        dnwd0,  &
    168        omega,  &
     166       !
     167       dnwd, dnwd0,  &
     168       upwd, omega,  &
    169169       epmax_diag,  &
    170 
    171        !    Deep convective variables used in phytrac
    172        pmflxr, pmflxs,  &
    173        wdtrainA, wdtrainM,  &
    174        upwd, dnwd, &
    175170       ep,  &
    176        da, mp, &
    177        phi, &
    178        wght_cvfd, &
    179        phi2, &
    180        d1a, dam, &
    181        ev, &
    182        elij, &
    183        clw, &
    184        epmlmMm, eplaMm, &
    185        sij, &
    186 
    187171       cldemi,  &
    188172       cldfra, cldtau, fiwc,  &
     
    197181       fsolsw, wfbils, wfbilo,  &
    198182       wfevap, wfrain, wfsnow,  & 
    199        prfl, psfl, fraca, Vprecip,  &
     183       pmflxr, pmflxs, prfl,  &
     184       psfl, fraca, Vprecip,  &
    200185       zw2,  &
    201186       
     
    207192       qwriteSTD, twriteSTD, rhwriteSTD, &    !pour calcul_STDlev.h
    208193       
     194       wdtrainA, wdtrainM,  &
    209195       beta_prec,  &
    210196       rneb,  &
     
    347333    INTEGER igout
    348334    !======================================================================
    349     ! Clef iflag_cycle_diurne controlant l'activation du cycle diurne:
     335    ! Clef controlant l'activation du cycle diurne:
    350336    ! en attente du codage des cles par Fred
    351     ! iflag_cycle_diurne est initialise par conf_phys et se trouve
    352     ! dans clesphys.h (IM)
     337    INTEGER iflag_cycle_diurne
     338    PARAMETER (iflag_cycle_diurne=1)
    353339    !======================================================================
    354340    ! Modele thermique du sol, a activer pour le cycle diurne:
     
    460446    REAL dtadd(klon,klev)
    461447
     448    ! Variables pour le transport convectif
     449    real da(klon,klev),phi(klon,klev,klev),mp(klon,klev)
     450    real wght_cvfd(klon,klev)
    462451#ifndef CPP_XIOS
    463452    REAL, SAVE :: missing_val=nf90_fill_real
    464453#endif
    465 !!   Variables moved to phys_local_var_mod
    466 !!    ! Variables pour le transport convectif
    467 !!    real da(klon,klev),phi(klon,klev,klev),mp(klon,klev)
    468 !!    real wght_cvfd(klon,klev)
    469 !!    ! Variables pour le lessivage convectif
    470 !!    ! RomP >>>
    471 !!    real phi2(klon,klev,klev)
    472 !!    real d1a(klon,klev),dam(klon,klev)
    473 !!    real ev(klon,klev)
    474 !!    real clw(klon,klev),elij(klon,klev,klev)
    475 !!    real epmlmMm(klon,klev,klev),eplaMm(klon,klev)
    476 !!    ! RomP <<<
     454    ! Variables pour le lessivage convectif
     455    ! RomP >>>
     456    real phi2(klon,klev,klev)
     457    real d1a(klon,klev),dam(klon,klev)
     458    real ev(klon,klev)
     459    real clw(klon,klev),elij(klon,klev,klev)
     460    real epmlmMm(klon,klev,klev),eplaMm(klon,klev)
     461    ! RomP <<<
    477462    !IM definition dynamique o_trac dans phys_output_open
    478463    !      type(ctrl_out) :: o_trac(nqtot)
     
    549534    INTEGER k_upper_cv
    550535    !------------------------------------------------------------------
    551     ! Compteur de l'occurence de cvpas=1
    552     INTEGER Ncvpaseq1
    553     SAVE Ncvpaseq1
    554     !$OMP THREADPRIVATE(Ncvpaseq1)
    555536    !
    556537    !==========================================================================
     
    568549    ! variables supplementaires de concvl
    569550    REAL Tconv(klon,klev)
    570 !!    variable moved to phys_local_var_mod
    571 !!    REAL sij(klon,klev,klev)
     551    REAL sij(klon,klev,klev)
    572552!!    !
    573553!!    ! variables pour tester la conservation de l'energie dans concvl
     
    644624    REAL, SAVE :: alp_offset
    645625    !$OMP THREADPRIVATE(alp_offset)
    646     REAL, SAVE :: dtcon_multistep_max=1.e6
    647     !$OMP THREADPRIVATE(dtcon_multistep_max)
    648     REAL, SAVE :: dqcon_multistep_max=1.e6
    649     !$OMP THREADPRIVATE(dqcon_multistep_max)
    650 
    651626 
    652627    !
     
    899874    INTEGER :: flag_inhib_tend = 0 !  0 is the default value
    900875!!    INTEGER :: flag_inhib_tend = 2
    901     !
    902     ! Logical switch to a bug : reseting to 0 convective variables at the
    903     ! begining of physiq.
    904     LOGICAL, SAVE :: ok_bug_cv_trac = .TRUE.
    905     !$OMP THREADPRIVATE(ok_bug_cv_trac)
    906     !
    907     ! Logical switch to a bug : changing wake_deltat when thermals are active
    908     ! even when there are no wakes.
    909     LOGICAL, SAVE :: ok_bug_split_th = .TRUE.
    910     !$OMP THREADPRIVATE(ok_bug_split_th)
    911876
    912877    !
     
    921886    INTEGER kcbot(klon), kctop(klon), kdtop(klon)
    922887    !
     888    REAL ratqsc(klon,klev)
    923889    real ratqsbas,ratqshaut,tau_ratqs
    924890    save ratqsbas,ratqshaut,tau_ratqs
     
    11451111    REAL, dimension(klon, klev) :: cldfrarad   ! fraction nuageuse
    11461112
    1147     !lwoff=y : offset LW CRE for radiation code and other schemes
    1148     REAL, SAVE :: betalwoff
    1149     !OMP THREADPRIVATE(betalwoff)
    1150 !
    11511113    INTEGER :: nbtr_tmp ! Number of tracer inside concvl
    11521114    REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac
     
    11631125    logical, parameter :: mass_fixer=.false.
    11641126    real qql1(klon),qql2(klon),corrqql
    1165 
    1166     REAL pi
    1167 
    1168     pi = 4. * ATAN(1.)
    11691127
    11701128    ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter"
     
    12461204       ENDIF
    12471205
    1248        Ncvpaseq1 = 0
    12491206       dnwd0=0.0
    12501207       ftd=0.0
     
    12541211       pbase=0
    12551212       !IM 180608
     1213
    12561214
    12571215       itau_con=0
     
    12791237    IF (debut) THEN
    12801238       CALL suphel ! initialiser constantes et parametres phys.
    1281 ! tau_gl : constante de rappel de la temperature a la surface de la glace - en
    1282        tau_gl=5.
    1283        CALL getin_p('tau_gl', tau_gl)
    1284 ! tau_gl : constante de rappel de la temperature a la surface de la glace - en
    1285 ! secondes
    1286        tau_gl=86400.*tau_gl
    1287        print*,'debut physiq_mod tau_gl=',tau_gl
    12881239       CALL getin_p('iflag_alp_wk_cond', iflag_alp_wk_cond)
    12891240       CALL getin_p('random_notrig_max',random_notrig_max)
     
    12941245                      ! 2 => convective adjustment and state variables are changed
    12951246       CALL getin_p('iflag_adjwk',iflag_adjwk)
    1296        CALL getin_p('dtcon_multistep_max',dtcon_multistep_max)
    1297        CALL getin_p('dqcon_multistep_max',dqcon_multistep_max)
    12981247       CALL getin_p('oliqmax',oliqmax)
    12991248       CALL getin_p('oicemax',oicemax)
     
    13051254                                  ! in rrtm/suphec.F90 (and rvtmp2 is set to 0).
    13061255       CALL getin_p('ok_bad_ecmwf_thermo',ok_bad_ecmwf_thermo)
    1307        CALL getin_p('ok_bug_cv_trac',ok_bug_cv_trac)
    1308        CALL getin_p('ok_bug_split_th',ok_bug_split_th)
    13091256       fl_ebil = 0 ! by default, conservation diagnostics are desactivated
    13101257       CALL getin_p('fl_ebil',fl_ebil)
     
    13811328       print*,'iflag_coupl,iflag_clos,iflag_wake', &
    13821329            iflag_coupl,iflag_clos,iflag_wake
    1383        print*,'iflag_cycle_diurne', iflag_cycle_diurne
     1330       print*,'iflag_CYCLE_DIURNE', iflag_cycle_diurne
    13841331       !
    13851332       IF (iflag_con.EQ.2.AND.iflag_cld_th.GT.-1) THEN
     
    14321379       print *,'physiq, nbapp_cv, nbapp_wk ',nbapp_cv,nbapp_wk
    14331380       IF (MOD(NINT(86400./phys_tstep),nbapp_cv).EQ.0) THEN
    1434           cvpas_0 = NINT( 86400./phys_tstep)/nbapp_cv
    1435           cvpas = cvpas_0
     1381          cvpas = NINT( 86400./phys_tstep)/nbapp_cv
    14361382       print *,'physiq, cvpas ',cvpas
    14371383       ELSE
     
    15641510!jyg<
    15651511       IF (klon_glo==1) THEN
    1566           IF (iflag_pbl > 1) THEN         
    1567               pbl_tke(:,:,is_ave) = 0.
    1568               DO nsrf=1,nbsrf
    1569                 DO k = 1,klev+1
    1570                      pbl_tke(:,k,is_ave) = pbl_tke(:,k,is_ave) &
    1571                          +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf)
    1572                 ENDDO
    1573               ENDDO
    1574           ELSE   ! (iflag_pbl > 1)
    1575               pbl_tke(:,:,:) = 0.
    1576           ENDIF  ! (iflag_pbl > 1)
     1512          pbl_tke(:,:,is_ave) = 0.
     1513          DO nsrf=1,nbsrf
     1514            DO k = 1,klev+1
     1515                 pbl_tke(:,k,is_ave) = pbl_tke(:,k,is_ave) &
     1516                     +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf)
     1517            ENDDO
     1518          ENDDO
    15771519        ELSE
    15781520          pbl_tke(:,:,is_ave) = 0. !ym missing init : maybe must be initialized in the same way that for klon_glo==1 ??
     
    17441686
    17451687#ifdef CPP_XIOS
    1746 ! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only
    1747 ! initialised at that moment
    1748        ! Get "missing_val" value from XML files (from temperature variable)
    1749        !$OMP MASTER
    1750        CALL xios_get_field_attr("temp",default_value=missing_val_omp)
    1751        !$OMP END MASTER
    1752        !$OMP BARRIER
    1753        missing_val=missing_val_omp
     1688       !--setting up swaero_diag to TRUE in XIOS case
     1689       IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
     1690           xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
     1691           xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
     1692             (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
     1693                                 xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
     1694           !!!--for now these fields are not in the XML files so they are omitted
     1695           !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
     1696           swaero_diag=.TRUE.
     1697
     1698       !--setting up dryaod_diag to TRUE in XIOS case
     1699       DO naero = 1, naero_tot-1
     1700         IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
     1701       ENDDO
     1702       !
     1703       !--setting up ok_4xCO2atm to TRUE in XIOS case
     1704       IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
     1705           xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
     1706           xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
     1707           xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
     1708           xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
     1709           xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
     1710           ok_4xCO2atm=.TRUE.
    17541711#endif
    17551712
     
    18671824       WRITE(*,*)'lat2_beta=',lat2_beta
    18681825       WRITE(*,*)'mskocean_beta=',mskocean_beta
    1869 
    1870       !lwoff=y : offset LW CRE for radiation code and other schemes
    1871       !lwoff=y : betalwoff=1.
    1872       betalwoff=0.
    1873       IF (ok_lwoff) THEN
    1874          betalwoff=1.
    1875       ENDIF
    1876       WRITE(*,*)'ok_lwoff=',ok_lwoff
    1877       !
    1878       !lwoff=y to begin only sollw and sollwdown are set up to CS values
    1879       sollw = sollw + betalwoff * (sollw0 - sollw)
    1880       sollwdown(:)= sollwdown(:) + betalwoff *(-1.*ZFLDN0(:,1) - &
    1881                     sollwdown(:))
    18821826    ENDIF
    18831827    !
     
    19461890       ENDDO
    19471891    ENDDO
     1892    da(:,:)=0.
     1893    mp(:,:)=0.
     1894    phi(:,:,:)=0.
     1895    ! RomP >>>
     1896    phi2(:,:,:)=0.
    19481897    beta_prec_fisrt(:,:)=0.
    19491898    beta_prec(:,:)=0.
    1950     !
    1951     !   Output variables from the convective scheme should not be set to 0
    1952     !   since convection is not always called at every time step.
    1953     IF (ok_bug_cv_trac) THEN
    1954       da(:,:)=0.
    1955       mp(:,:)=0.
    1956       phi(:,:,:)=0.
    1957       ! RomP >>>
    1958       phi2(:,:,:)=0.
    1959       epmlmMm(:,:,:)=0.
    1960       eplaMm(:,:)=0.
    1961       d1a(:,:)=0.
    1962       dam(:,:)=0.
    1963       pmflxr(:,:)=0.
    1964       pmflxs(:,:)=0.
    1965       ! RomP <<<
    1966     ENDIF
     1899    epmlmMm(:,:,:)=0.
     1900    eplaMm(:,:)=0.
     1901    d1a(:,:)=0.
     1902    dam(:,:)=0.
     1903    pmflxr=0.
     1904    pmflxs=0.
     1905    ! RomP <<<
    19671906
    19681907    !
     
    21412080          IF(adjust_tropopause) THEN
    21422081             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz),   &
    2143                       ro3i, 'C', press_cen_climoz, pplay, wo, paprs(:,1),    &
    2144                       time_climoz ,  longitude_deg,   latitude_deg,          &
     2082                      ro3i,  press_edg_climoz,  paprs,   wo, time_climoz,    &
     2083                      longitude_deg,   latitude_deg,    press_cen_climoz,    &
    21452084                      dyn_tropopause(t_seri, ztsol, paprs, pplay, rot))
    21462085          ELSE
    2147              CALL regr_pr_time_av(ncid_climoz,  vars_climoz(1:read_climoz),  &
    2148                       ro3i, 'C', press_cen_climoz, pplay, wo, paprs(:,1),    &
    2149                       time_climoz )
     2086             CALL regr_pr_time_av(ncid_climoz, vars_climoz(1:read_climoz),   &
     2087                      ro3i,  press_edg_climoz,  paprs,  wo,  time_climoz)
    21502088          END IF
    21512089          ! Convert from mole fraction of ozone to column density of ozone in a
     
    22592197       END SELECT
    22602198    ENDIF
    2261     sza_o = ACOS (rmu0) *180./pi
    22622199
    22632200    IF (mydebug) THEN
     
    22972234!!jyg       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,2) .eq. 1) THEN
    22982235       IF (prt_level .ge. 2 .and. mod(iflag_pbl_split,10) .ge. 1) THEN
    2299           print *,'debut du splitting de la PBL, wake_s = ', wake_s(:)
    2300           print *,'debut du splitting de la PBL, wake_deltat = ', wake_deltat(:,1)
    2301           print *,'debut du splitting de la PBL, wake_deltaq = ', wake_deltaq(:,1)
     2236          print *,'debut du splitting de la PBL'
    23022237       ENDIF
    23032238       ! !!
     
    23112246          gustiness(1:klon)=0
    23122247       ELSE IF (iflag_gusts==1) THEN
    2313           gustiness(1:klon)=f_gust_bl*ale_bl(1:klon)+f_gust_wk*ale_wake(1:klon)
    2314        ELSE IF (iflag_gusts==2) THEN
    2315           gustiness(1:klon)=f_gust_bl*ale_bl_stat(1:klon)+f_gust_wk*ale_wake(1:klon)
     2248          do i = 1, klon
     2249             gustiness(i)=f_gust_bl*ale_bl(i)+f_gust_wk*ale_wake(i)
     2250          enddo
    23162251          ! ELSE IF (iflag_gusts==2) THEN
    23172252          !    do i = 1, klon
     
    23882323          d_deltaq_vdf(:,:) = d_q_vdf_w(:,:)-d_q_vdf_x(:,:)
    23892324          CALL add_wake_tend &
    2390              (d_deltat_vdf, d_deltaq_vdf, dsig0, ddens0, ddens0, wkoccur1, 'vdf', abortphy)
     2325             (d_deltat_vdf, d_deltaq_vdf, dsig0, ddens0, wkoccur1, 'vdf', abortphy)
    23912326       ELSE
    23922327          d_deltat_vdf(:,:) = 0.
     
    25302465    ! Appel de la convection tous les "cvpas"
    25312466    !
    2532 !!jyg    IF (MOD(itapcv,cvpas).EQ.0) THEN
    2533 !!    print *,' physiq : itapcv, cvpas, itap-1, cvpas_0 ', &
    2534 !!                       itapcv, cvpas, itap-1, cvpas_0
    2535     IF (MOD(itapcv,cvpas).EQ.0 .OR. MOD(itap-1,cvpas_0).EQ.0) THEN
    2536 
    2537     !
    2538     ! Mettre a zero des variables de sortie (pour securite)
    2539     !
    2540     pmflxr(:,:) = 0.
    2541     pmflxs(:,:) = 0.
    2542     wdtrainA(:,:) = 0.
    2543     wdtrainM(:,:) = 0.
    2544     upwd(:,:) = 0.
    2545     dnwd(:,:) = 0.
    2546     ep(:,:) = 0.
    2547     da(:,:)=0.
    2548     mp(:,:)=0.
    2549     wght_cvfd(:,:)=0.
    2550     phi(:,:,:)=0.
    2551     phi2(:,:,:)=0.
    2552     epmlmMm(:,:,:)=0.
    2553     eplaMm(:,:)=0.
    2554     d1a(:,:)=0.
    2555     dam(:,:)=0.
    2556     elij(:,:,:)=0.
    2557     ev(:,:)=0.
    2558     clw(:,:)=0.
    2559     sij(:,:,:)=0.
    2560     !
     2467    IF (MOD(itapcv,cvpas).EQ.0) THEN
     2468
    25612469    IF (iflag_con.EQ.1) THEN
    25622470       abort_message ='reactiver le call conlmd dans physiq.F'
     
    26312539             IF (iflag_adjwk == 2) THEN
    26322540               CALL add_wake_tend &
    2633                  (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, ddens0, wkoccur1, 'ajs_cv', abortphy)
     2541                 (d_deltat_ajs_cv, d_deltaq_ajs_cv, dsig0, ddens0, wkoccur1, 'ajs_cv', abortphy)
    26342542             ENDIF  ! (iflag_adjwk == 2)
    26352543          ENDIF  ! (iflag_adjwk >= 1)
     
    26602568          ! Calculate the upmost level of deep convection loops: k_upper_cv
    26612569          !  (near 22 km)
     2570          izero = klon/2+1/klon
    26622571          k_upper_cv = klev
    2663           !izero = klon/2+1/klon
    2664           !DO k = klev,1,-1
    2665           !   IF (pphi(izero,k) > 22.e4) k_upper_cv = k
    2666           !ENDDO
    2667           ! FH : nouveau calcul base sur un profil global sans quoi
    2668           ! le modele etait sensible au decoupage de domaines
    26692572          DO k = klev,1,-1
    2670              IF (-7*log(presnivs(k)/presnivs(1)) > 25.) k_upper_cv = k
     2573             IF (pphi(izero,k) > 22.e4) k_upper_cv = k
    26712574          ENDDO
    26722575          IF (prt_level .ge. 5) THEN
     
    27122615          clwcon0=qcondc
    27132616          pmfu(:,:)=upwd(:,:)+dnwd(:,:)
    2714           !
    2715           !jyg<
    2716           ! If convective tendencies are too large, then call convection
    2717           !  every time step
    2718           cvpas = cvpas_0
    2719           DO k=1,k_upper_cv
    2720              DO i=1,klon
    2721                IF (d_t_con(i,k) > 6.721 .AND. d_t_con(i,k) < 6.722 .AND.&
    2722                    d_q_con(i,k) > -.0002171 .AND. d_q_con(i,k) < -.0002170) THEN
    2723                      dtcon_multistep_max = 3.
    2724                      dqcon_multistep_max = 0.02
    2725                ENDIF
    2726              ENDDO
    2727           ENDDO
    2728 !
    2729           DO k=1,k_upper_cv
    2730              DO i=1,klon
    2731 !!               IF (abs(d_t_con(i,k)) > 0.24 .OR. &
    2732 !!                   abs(d_q_con(i,k)) > 2.e-2) THEN
    2733                IF (abs(d_t_con(i,k)) > dtcon_multistep_max .OR. &
    2734                    abs(d_q_con(i,k)) > dqcon_multistep_max) THEN
    2735                  cvpas = 1
    2736 !!                 print *,'physiq1, i,k,d_t_con(i,k),d_q_con(i,k) ', &
    2737 !!                                   i,k,d_t_con(i,k),d_q_con(i,k)
    2738                ENDIF
    2739              ENDDO
    2740           ENDDO
    2741 !!!   Ligne a ne surtout pas remettre sans avoir murement reflechi (jyg)
    2742 !!!          call bcast(cvpas)
    2743 !!!   ------------------------------------------------------------
    2744           !>jyg
    2745           !
     2617
    27462618          DO i = 1, klon
    2747              IF (iflagctrl(i).le.1) itau_con(i)=itau_con(i)+cvpas
     2619             IF (iflagctrl(i).le.1) itau_con(i)=itau_con(i)+1
    27482620          ENDDO
    27492621          !
     
    28532725    proba_notrig(:) = 1.
    28542726    itapcv = 0
    2855     ENDIF !  (MOD(itapcv,cvpas).EQ.0 .OR. MOD(itapcv,cvpas_0).EQ.0)
     2727    ENDIF !  (MOD(itapcv,cvpas).EQ.0)
    28562728!
    28572729    itapcv = itapcv+1
    2858     !
    2859     ! Compter les steps ou cvpas=1
    2860     IF (cvpas == 1) THEN
    2861       Ncvpaseq1 = Ncvpaseq1+1
    2862     ENDIF
    2863     IF (mod(itap,1000) == 0) THEN
    2864       print *,' physiq, nombre de steps ou cvpas = 1 : ', Ncvpaseq1
    2865     ENDIF
    28662730
    28672731!!!jyg  Appel diagnostique a add_phys_tend pour tester la conservation de
     
    29852849               t_seri, q_seri, omega,  &
    29862850               dt_dwn, dq_dwn, M_dwn, M_up,  &
    2987                dt_a, dq_a, cv_gen, &
    2988                sigd, cin, &
    2989                wake_deltat, wake_deltaq, wake_s, awake_dens, wake_dens,  &
     2851               dt_a, dq_a, &
     2852               sigd, &
     2853               wake_deltat, wake_deltaq, wake_s, wake_dens,  &
    29902854               wake_dth, wake_h,  &
    29912855!!               wake_pe, wake_fip, wake_gfl,  &
     
    29972861               wake_omg, wake_dp_deltomg,  &
    29982862               wake_spread, wake_Cstar, d_deltat_wk_gw,  &
    2999                d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_a_wk, d_dens_wk)
     2863               d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk)
    30002864          !
    30012865          !jyg    Reinitialize itapwk when wakes have been called
     
    30162880
    30172881         CALL add_wake_tend &
    3018             (d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_a_wk, d_dens_wk, wake_k, &
     2882            (d_deltat_wk, d_deltaq_wk, d_s_wk, d_dens_wk, wake_k, &
    30192883             'wake', abortphy)
    30202884          call prt_enerbil('wake',itap)
    30212885       ENDIF   ! (iflag_wake_tend .GT. 0.)
    3022        !
    3023        IF (prt_level .GE. 10) THEN
    3024          print *,' physiq, after calwake, wake_s: ',wake_s(:)
    3025          print *,' physiq, after calwake, wake_deltat: ',wake_deltat(:,1)
    3026          print *,' physiq, after calwake, wake_deltaq: ',wake_deltaq(:,1)
    3027        ENDIF
    30282886
    30292887       IF (iflag_alp_wk_cond .GT. 0.) THEN
     
    31533011             ENDDO
    31543012          !
    3155              IF (ok_bug_split_th) THEN
    3156                CALL add_wake_tend &
    3157                    (d_deltat_the, d_deltaq_the, dsig0, ddens0, ddens0, wkoccur1, 'the', abortphy)
    3158              ELSE
    3159                CALL add_wake_tend &
    3160                    (d_deltat_the, d_deltaq_the, dsig0, ddens0, ddens0, wake_k, 'the', abortphy)
    3161              ENDIF
     3013             CALL add_wake_tend &
     3014                 (d_deltat_the, d_deltaq_the, dsig0, ddens0, wkoccur1, 'the', abortphy)
    31623015             call prt_enerbil('the',itap)
    31633016          !
     
    31733026                          ale_bl_trig, ale_bl_stat, ale_bl,  &
    31743027                          alp_bl, alp_bl_stat, &
    3175                           proba_notrig, random_notrig, cv_gen)
     3028                          proba_notrig, random_notrig)
    31763029          !>jyg
    31773030
     
    36353488                        tausum_aero, drytausum_aero, tau3d_aero)
    36363489#endif
    3637 
    3638                    IF (flag_aerosol .EQ. 7) THEN
    3639                       CALL MACv2SP(pphis,pplay,paprs,longitude_deg,latitude_deg,  &
    3640                                    tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm)
    3641                    ENDIF
    3642 
    36433490                   !
    36443491                ELSE IF (NSW.EQ.2) THEN
     
    36953542       !
    36963543       !--WMO criterion to determine tropopause
    3697        CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg)
     3544       CALL stratosphere_mask(missing_val, t_seri, pplay, latitude_deg)
    36983545       !
    36993546       !--STRAT AEROSOL
     
    37353582#ifdef CPP_StratAer
    37363583       !--compute stratospheric mask
    3737        CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg)
     3584       CALL stratosphere_mask(missing_val, t_seri, pplay, latitude_deg)
    37383585       !--interactive strat aerosols
    37393586       CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut)
     
    37653612#endif
    37663613          ENDIF
    3767           CALL newmicro (flag_aerosol, ok_cdnc, bl95_b0, bl95_b1, &
     3614          CALL newmicro (ok_cdnc, bl95_b0, bl95_b1, &
    37683615               paprs, pplay, t_seri, cldliq, cldfra, &
    37693616               cldtau, cldemi, cldh, cldl, cldm, cldt, cldq, &
     
    37953642          ! global
    37963643          !
    3797 !IM 251017 begin
    3798 !               print*,'physiq betaCRF global zdtime=',zdtime
    3799 !IM 251017 end
    38003644          DO k=1, klev
    38013645             DO i=1, klon
     
    39123756             print *,' ->radlwsw, number 1 '
    39133757          ENDIF
    3914 
    39153758          !
    39163759          CALL radlwsw &
     
    39293772               tau_aero_lw_rrtm, &
    39303773               cldtaupirad,new_aod, &
    3931 !              zqsat, flwcrad, fiwcrad, &
    39323774               zqsat, flwc, fiwc, &
    39333775               ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
     
    39363778               sollwdown, &
    39373779               topsw0,toplw0,solsw0,sollw0, &
    3938                lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup,  &
    3939                swdnc0, swdn0, swdn, swupc0, swup0, swup, &
     3780               lwdn0, lwdn, lwup0, lwup,  &
     3781               swdn0, swdn, swup0, swup, &
    39403782               topswad_aero, solswad_aero, &
    39413783               topswai_aero, solswai_aero, &
     
    39523794               ZSWFT0_i, ZFSDN0, ZFSUP0)
    39533795
    3954           !lwoff=y, betalwoff=1. : offset LW CRE for radiation code and other
    3955           !schemes
    3956           toplw = toplw + betalwoff * (toplw0 - toplw)
    3957           sollw = sollw + betalwoff * (sollw0 - sollw)
    3958           lwdn = lwdn + betalwoff * (lwdn0 - lwdn)
    3959           lwup = lwup + betalwoff * (lwup0 - lwup)
    3960           sollwdown(:)= sollwdown(:) + betalwoff *(-1.*ZFLDN0(:,1) - &
    3961                         sollwdown(:))
    3962           cool = cool + betalwoff * (cool0 - cool)
    3963  
    39643796#ifndef CPP_XIOS
    39653797          !--OB 30/05/2016 modified 21/10/2016
     
    39683800          !--this is necessary to get the right swaero at first step
    39693801          !--but only in the case of no XIOS as XIOS is covered elsewhere
    3970           IF (debut) swaerofree_diag = .FALSE.
    39713802          IF (debut) swaero_diag = .FALSE.
    39723803          IF (debut) dryaod_diag = .FALSE.
     
    39743805          !--as for swaero_diag, see above
    39753806          IF (debut) ok_4xCO2atm = .FALSE.
    3976 
     3807#endif
    39773808          !
    39783809          !IM 2eme calcul radiatif pour le cas perturbe ou au moins un
     
    39853816              RCFC11_per.NE.RCFC11_act.OR. &
    39863817              RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE.
    3987 #endif
    39883818   !
    39893819          IF (ok_4xCO2atm) THEN
     
    40143844                     tau_aero_lw_rrtm, &
    40153845                     cldtaupi,new_aod, &
    4016 !                    zqsat, flwcrad, fiwcrad, &
    40173846                     zqsat, flwc, fiwc, &
    40183847                     ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
     
    40213850                     sollwdownp, &
    40223851                     topsw0p,toplw0p,solsw0p,sollw0p, &
    4023                      lwdnc0p, lwdn0p, lwdnp, lwupc0p, lwup0p, lwupp,  &
    4024                      swdnc0p, swdn0p, swdnp, swupc0p, swup0p, swupp, &
     3852                     lwdn0p, lwdnp, lwup0p, lwupp,  &
     3853                     swdn0p, swdnp, swup0p, swupp, &
    40253854                     topswad_aerop, solswad_aerop, &
    40263855                     topswai_aerop, solswai_aerop, &
     
    40363865                     ZLWFT0_i, ZFLDN0, ZFLUP0, &
    40373866                     ZSWFT0_i, ZFSDN0, ZFSUP0)
    4038           endif !ok_4xCO2atm
     3867          endif
     3868          !
    40393869       ENDIF ! aerosol_couple
    40403870       itaprad = 0
     
    44274257
    44284258
    4429     CALL tend_to_tke(pdtphys,paprs,exner,t_seri,u_seri,v_seri,dtadd,duadd,dvadd,pctsrf,pbl_tke)
     4259    CALL tend_to_tke(pdtphys,paprs,exner,t_seri,u_seri,v_seri,dtadd,duadd,dvadd,pbl_tke)
    44304260
    44314261
     
    45824412    !
    45834413    CALL transp (paprs,zxtsol, &
    4584          t_seri, q_seri, ql_seri, qs_seri, u_seri, v_seri, zphi, &
    4585          ve, vq, ue, uq, vwat, uwat)
     4414         t_seri, q_seri, u_seri, v_seri, zphi, &
     4415         ve, vq, ue, uq)
    45864416    !
    45874417    !IM global posePB BEG
     
    48794709#endif
    48804710
    4881 ! On remet des variables a .false. apres un premier appel
    4882     if (debut) then
    4883 #ifdef CPP_XIOS
    4884       swaero_diag=.FALSE.
    4885       swaerofree_diag=.FALSE.
    4886       dryaod_diag=.FALSE.
    4887       ok_4xCO2atm= .FALSE.
    4888 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    4889 
    4890       IF (is_master) then
    4891         !--setting up swaero_diag to TRUE in XIOS case
    4892         IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &
    4893            xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &
    4894            xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR.  &
    4895              (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &
    4896                                  xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0"))))  &
    4897            !!!--for now these fields are not in the XML files so they are omitted
    4898            !!!  xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &
    4899            swaero_diag=.TRUE.
    4900 
    4901         !--setting up swaerofree_diag to TRUE in XIOS case
    4902         IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &
    4903            xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR.   &
    4904            xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &
    4905            xios_field_is_active("LWupTOAcleanclr")) &
    4906            swaerofree_diag=.TRUE.
    4907 
    4908         !--setting up dryaod_diag to TRUE in XIOS case
    4909         DO naero = 1, naero_tot-1
    4910          IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
    4911         ENDDO
    4912         !
    4913         !--setting up ok_4xCO2atm to TRUE in XIOS case
    4914         IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
    4915            xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
    4916            xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
    4917            xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
    4918            xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
    4919            xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
    4920            ok_4xCO2atm=.TRUE.
    4921       endif
    4922       !$OMP BARRIER
    4923       call bcast(swaero_diag)
    4924       call bcast(swaerofree_diag)
    4925       call bcast(dryaod_diag)
    4926       call bcast(ok_4xCO2atm)
    4927 !      write (lunout,*)'ok_4xCO2atm= ',swaero_diag, swaerofree_diag, dryaod_diag, ok_4xCO2atm
    4928 #endif
    4929     endif
    49304711
    49314712    !====================================================================
     
    49644745       IF (is_omp_master) CALL xios_context_finalize
    49654746#endif
    4966        print *,' physiq fin, nombre de steps ou cvpas = 1 : ', Ncvpaseq1
    49674747    ENDIF
    49684748
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phytrac_mod.F90

    r3356 r3411  
    4949!$OMP THREADPRIVATE(d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qPr,qDi)
    5050!$OMP THREADPRIVATE(d_tr_insc,d_tr_bcscav,d_tr_evapls,d_tr_ls,qPrls)
    51 !$OMP THREADPRIVATE(d_tr_cl,d_tr_dry,flux_tr_dry,d_tr_dec,d_tr_cv)
     51!$OMP THREADPRIVATE(d_tr,d_tr_cl,d_tr_dry,flux_tr_dry,d_tr_dec,d_tr_cv)
    5252
    5353
     
    104104    USE traccoag_mod
    105105    USE phys_local_var_mod, ONLY: mdw
    106     USE phys_local_var_mod, ONLY: budg_dep_dry_ocs,   budg_dep_wet_ocs
    107     USE phys_local_var_mod, ONLY: budg_dep_dry_so2,   budg_dep_wet_so2
    108106    USE phys_local_var_mod, ONLY: budg_dep_dry_h2so4, budg_dep_wet_h2so4
    109107    USE phys_local_var_mod, ONLY: budg_dep_dry_part,  budg_dep_wet_part
    110     USE infotrac, ONLY: nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat
     108    USE infotrac, ONLY: nbtr_sulgas, id_SO2_strat, id_H2SO4_strat
    111109    USE aerophys
    112110#endif
     
    509507                ENDIF
    510508
    511              CASE('repr')
    512                  flag_cvltr(it)=.false.
    513 
    514509             CASE('inca')
    515510!                IF ((it.EQ.id_Rn222) .OR. ((it.GE.id_SO2) .AND. (it.LE.id_NH3)) ) THEN
     
    706701       IF (type_trac=='coag') THEN
    707702         ! initialize wet deposition flux of sulfur
    708          budg_dep_wet_ocs(:)=0.0
    709          budg_dep_wet_so2(:)=0.0
    710703         budg_dep_wet_h2so4(:)=0.0
    711704         budg_dep_wet_part(:)=0.0
     
    716709         DO it = 1, nbtr
    717710         !do not include SO2 because most of it comes trom the troposphere
    718            IF (it==id_OCS_strat) THEN
    719              budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_cv(i,k,it)*(mSatom/mOCSmol) &
    720                             & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
    721            ELSEIF (it==id_SO2_strat) THEN
    722              budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_cv(i,k,it)*(mSatom/mSO2mol) &
    723                             & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
    724            ELSEIF (it==id_H2SO4_strat) THEN
     711           IF (it==id_H2SO4_strat) THEN
    725712             budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) &
    726713                            & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
     
    747734             d_tr_th(i,k,it)=0.
    748735             tr_seri(i,k,it)=MAX(tr_seri(i,k,it),0.)
    749 ! the next safeguard causes some problem for stratospheric aerosol tracers (particle number)
    750 ! and there is little justification for it so it is commented out (4 December 2017) by OB
    751 ! if reinstated please keep the ifndef CPP_StratAer
    752 !#ifndef CPP_StratAer
    753 !             tr_seri(i,k,it)=MIN(tr_seri(i,k,it),1.e10)
    754 !#endif
     736             tr_seri(i,k,it)=MIN(tr_seri(i,k,it),1.e10)
    755737          END DO
    756738       END DO
     
    788770
    789771         ! initialize dry deposition flux of sulfur
    790          budg_dep_dry_ocs(:)=0.0
    791          budg_dep_dry_so2(:)=0.0
    792772         budg_dep_dry_h2so4(:)=0.0
    793773         budg_dep_dry_part(:)=0.0
     
    824804             IF (type_trac=='coag') THEN
    825805               ! compute dry deposition flux of sulfur (sum over gases and particles)
    826                IF (it==id_OCS_strat) THEN
    827                  budg_dep_dry_ocs(:)=budg_dep_dry_ocs(:)-source(:,it)*(mSatom/mOCSmol)
    828                ELSEIF (it==id_SO2_strat) THEN
    829                  budg_dep_dry_so2(:)=budg_dep_dry_so2(:)-source(:,it)*(mSatom/mSO2mol)
    830                ELSEIF (it==id_H2SO4_strat) THEN
     806               IF (it==id_H2SO4_strat) THEN
    831807                 budg_dep_dry_h2so4(:)=budg_dep_dry_h2so4(:)-source(:,it)*(mSatom/mH2SO4mol)
    832808               ELSEIF (it.GT.nbtr_sulgas) THEN
     
    914890           DO k = 1, klev
    915891           DO it = 1, nbtr
    916              IF (it==id_OCS_strat) THEN
    917                budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_ls(i,k,it)*(mSatom/mOCSmol) &
    918                               & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
    919              ELSEIF (it==id_SO2_strat) THEN
    920                budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_ls(i,k,it)*(mSatom/mSO2mol) &
    921                               & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
    922              ELSEIF (it==id_H2SO4_strat) THEN
     892             IF (it==id_H2SO4_strat) THEN
    923893               budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) &
    924894                              & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/printflag.F90

    r3356 r3411  
    3030    &  ************'
    3131  PRINT 100
    32   PRINT 10, iflag_cycle_diurne.GE.1, soil_model
     32  PRINT 10, cycle_diurne, soil_model
    3333  PRINT 100
    3434
     
    9797  END IF
    9898
    99   IF (cycle_diurn0 .AND. .NOT. (iflag_cycle_diurne.GE.1) .OR. .NOT. cycle_diurn0 .AND. &
    100       (iflag_cycle_diurne.GE.1) ) THEN
    101     PRINT 13, cycle_diurn0, iflag_cycle_diurne
     99  IF (cycle_diurn0 .AND. .NOT. cycle_diurne .OR. .NOT. cycle_diurn0 .AND. &
     100      cycle_diurne) THEN
     101    PRINT 13, cycle_diurn0, cycle_diurne
    102102    PRINT 100
    103103  END IF
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/radiation_ar4_param.F90

    r3356 r3411  
    11MODULE radiation_ar4_param
    2 
    3  IMPLICIT NONE
    42
    53 REAL(KIND=8), parameter :: ZPDH2O = 0.8
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/radlwsw_m.F90

    r3356 r3411  
    2828   sollwdown,&
    2929   topsw0,toplw0,solsw0,sollw0,&
    30    lwdnc0, lwdn0, lwdn, lwupc0, lwup0, lwup,&
    31    swdnc0, swdn0, swdn, swupc0, swup0, swup,&
     30   lwdn0, lwdn, lwup0, lwup,&
     31   swdn0, swdn, swup0, swup,&
    3232   topswad_aero, solswad_aero,&
    3333   topswai_aero, solswai_aero, &
     
    148148  ! ZFSDWN(klon,KLEV+1)           ; TOTAL SW  DWN FLUXES           ! added by MPL 080411
    149149  ! ZFCDWN(klon,KLEV+1)           ; CLEAR SKY SW  DWN FLUXES       ! added by MPL 080411
    150   ! ZFCCDWN(klon,KLEV+1)          ; CLEAR SKY CLEAN (NO AEROSOL) SW  DWN FLUXES      ! added by OB 211117
    151150  ! ZFSUP (klon,KLEV+1)           ; TOTAL SW  UP  FLUXES           ! added by MPL 080411
    152151  ! ZFCUP (klon,KLEV+1)           ; CLEAR SKY SW  UP  FLUXES       ! added by MPL 080411
    153   ! ZFCCUP (klon,KLEV+1)          ; CLEAR SKY CLEAN (NO AEROSOL) SW  UP  FLUXES      ! added by OB 211117
    154   ! ZFLCCDWN(klon,KLEV+1)         ; CLEAR SKY CLEAN (NO AEROSOL) LW  DWN FLUXES      ! added by OB 211117
    155   ! ZFLCCUP (klon,KLEV+1)         ; CLEAR SKY CLEAN (NO AEROSOL) LW  UP  FLUXES      ! added by OB 211117
    156152 
    157153  !======================================================================
     
    230226  REAL,    INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON)
    231227  REAL,    INTENT(out) :: sollwdown(KLON)
    232   REAL,    INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1), swdnc0(KLON,kflev+1)
    233   REAL,    INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1), swupc0(KLON,kflev+1)
    234   REAL,    INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1), lwdnc0(KLON,kflev+1)
    235   REAL,    INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1), lwupc0(KLON,kflev+1)
     228  REAL,    INTENT(out) :: swdn(KLON,kflev+1),swdn0(KLON,kflev+1)
     229  REAL,    INTENT(out) :: swup(KLON,kflev+1),swup0(KLON,kflev+1)
     230  REAL,    INTENT(out) :: lwdn(KLON,kflev+1),lwdn0(KLON,kflev+1)
     231  REAL,    INTENT(out) :: lwup(KLON,kflev+1),lwup0(KLON,kflev+1)
    236232  REAL,    INTENT(out) :: topswad_aero(KLON), solswad_aero(KLON)         ! output: aerosol direct forcing at TOA and surface
    237233  REAL,    INTENT(out) :: topswai_aero(KLON), solswai_aero(KLON)         ! output: aerosol indirect forcing atTOA and surface
     
    256252  REAL(KIND=8) ZFSUP0(KDLON,KFLEV+1)
    257253  REAL(KIND=8) ZFSDN0(KDLON,KFLEV+1)
    258   REAL(KIND=8) ZFSUPC0(KDLON,KFLEV+1)
    259   REAL(KIND=8) ZFSDNC0(KDLON,KFLEV+1)
    260254  REAL(KIND=8) ZFLUP(KDLON,KFLEV+1)
    261255  REAL(KIND=8) ZFLDN(KDLON,KFLEV+1)
    262256  REAL(KIND=8) ZFLUP0(KDLON,KFLEV+1)
    263257  REAL(KIND=8) ZFLDN0(KDLON,KFLEV+1)
    264   REAL(KIND=8) ZFLUPC0(KDLON,KFLEV+1)
    265   REAL(KIND=8) ZFLDNC0(KDLON,KFLEV+1)
    266258  REAL(KIND=8) zx_alpha1, zx_alpha2
    267259  INTEGER k, kk, i, j, iof, nb_gr
     
    372364      REAL(KIND=8) ZFSDWN_i (klon,klev+1)
    373365      REAL(KIND=8) ZFCDWN_i (klon,klev+1)
    374       REAL(KIND=8) ZFCCDWN_i (klon,klev+1)
    375366      REAL(KIND=8) ZFSUP_i (klon,klev+1)
    376367      REAL(KIND=8) ZFCUP_i (klon,klev+1)
    377       REAL(KIND=8) ZFCCUP_i (klon,klev+1)
    378       REAL(KIND=8) ZFLCCDWN_i (klon,klev+1)
    379       REAL(KIND=8) ZFLCCUP_i (klon,klev+1)
    380368! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412)
    381369!      REAL(KIND=8) RSUN(3,2)
     
    588576      ZFSUP0(i,k)=0.
    589577      ZFSDN0(i,k)=0.
    590       ZFSUPC0(i,k)=0.
    591       ZFSDNC0(i,k)=0.
    592       ZFLUPC0(i,k)=0.
    593       ZFLDNC0(i,k)=0.
    594578      ZSWFT0_i(i,k)=0.
    595579      ZFCUP_i(i,k)=0.
    596580      ZFCDWN_i(i,k)=0.
    597       ZFCCUP_i(i,k)=0.
    598       ZFCCDWN_i(i,k)=0.
    599       ZFLCCUP_i(i,k)=0.
    600       ZFLCCDWN_i(i,k)=0.
    601581      ENDDO
    602582      ENDDO
     
    701681      ZFSDWN_i(i,k)=0.
    702682      ZFCDWN_i(i,k)=0.
    703       ZFCCDWN_i(i,k)=0.
    704683      ZFSUP_i(i,k)=0.
    705684      ZFCUP_i(i,k)=0.
    706       ZFCCUP_i(i,k)=0.
    707       ZFLCCDWN_i(i,k)=0.
    708       ZFLCCUP_i(i,k)=0.
    709685      ENDDO
    710686      ENDDO
     
    852828         PTAU_LW_TOT, PTAU_LW_NAT,               &  ! rajoute par C. Kleinschmitt
    853829         ZFLUX_i  , ZFLUC_i ,&
    854          ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i, ZFCCDWN_i, ZFCCUP_i, ZFLCCDWN_i, ZFLCCUP_i, &
     830         ZFSDWN_i , ZFSUP_i , ZFCDWN_i, ZFCUP_i,&
    855831         ZTOPSWADAERO,ZSOLSWADAERO,&  ! rajoute par OB pour diagnostics
    856832         ZTOPSWAD0AERO,ZSOLSWAD0AERO,&
     
    933909         ZFSDN(i,k+1)  = ZFSDWN_i(i,k+1)*fract(i)
    934910         ZFSDN0(i,k+1) = ZFCDWN_i(i,k+1)*fract(i)
    935          ZFSDNC0(i,k+1)= ZFCCDWN_i(i,k+1)*fract(i)
    936911         ZFSUP (i,k+1) = ZFSUP_i(i,k+1)*fract(i)
    937912         ZFSUP0(i,k+1) = ZFCUP_i(i,k+1)*fract(i)
    938          ZFSUPC0(i,k+1)= ZFCCUP_i(i,k+1)*fract(i)
    939          ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1)
    940          ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1)
    941913!   Nouveau calcul car visiblement ZSWFT et ZSWFC sont nuls dans RRTM cy32
    942914!   en sortie de radlsw.F90 - MPL 7.01.09
     
    10501022
    10511023      DO k = 1, kflev+1
    1052         swdnc0( iof+i,k)   = ZFSDNC0( i,k)
    10531024        swdn0 ( iof+i,k)   = ZFSDN0 ( i,k)
    10541025        swdn  ( iof+i,k)   = ZFSDN  ( i,k)
    1055         swupc0( iof+i,k)   = ZFSUPC0( i,k)
    10561026        swup0 ( iof+i,k)   = ZFSUP0 ( i,k)
    10571027        swup  ( iof+i,k)   = ZFSUP  ( i,k)
    1058         lwdnc0( iof+i,k)   = ZFLDNC0( i,k)
    1059         lwupc0( iof+i,k)   = ZFLUPC0( i,k)
    10601028      ENDDO
    10611029    ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/readchlorophyll.F90

    r3356 r3411  
    22! $Id$
    33!
    4 !--This routine is to be tested with MPI / OMP parallelism
    5 !--OB 26/03/2018
    64
    7 SUBROUTINE readchlorophyll(debut)
     5subroutine readchlorophyll(debut)
    86
    9     USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, nf95_inq_varid, nf95_open
    10     USE netcdf, ONLY: nf90_get_var, nf90_noerr, nf90_nowrite
    11     USE phys_cal_mod, ONLY: mth_cur
    12     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, grid2dto1d_glo
    13     USE mod_phys_lmdz_mpi_data, ONLY: is_mpi_root
    14     USE mod_phys_lmdz_omp_data, ONLY: is_omp_root
     7    use netcdf95, only: nf95_close, nf95_gw_var, nf95_inq_dimid, &
     8                        nf95_inq_varid, nf95_open
     9    use netcdf, only: nf90_get_var, nf90_noerr, nf90_nowrite
     10
     11    USE phys_cal_mod, ONLY : mth_cur
     12    USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, &
     13                                 grid2dto1d_glo
     14    USE mod_phys_lmdz_mpi_data, ONLY :  is_mpi_root
    1515    USE mod_phys_lmdz_para, ONLY: scatter
    1616    USE phys_state_var_mod, ONLY: chl_con
    1717
    18     IMPLICIT NONE
     18    implicit none
    1919
    20     INCLUDE "YOMCST.h"
     20    include "YOMCST.h"
    2121
    2222! Variable input
    23     LOGICAL debut
     23    logical debut
    2424
    2525! Variables locales
    26     INTEGER n_lat   ! number of latitudes in the input data
    27     INTEGER n_lon   ! number of longitudes in the input data
    28     INTEGER n_lev   ! number of levels in the input data
    29     INTEGER n_month ! number of months in the input data
    30     REAL, POINTER :: latitude(:)
    31     REAL, POINTER :: longitude(:)
    32     REAL, POINTER :: time(:)
    33     INTEGER i, k
    34     INTEGER, SAVE :: mth_pre
     26    integer n_lat   ! number of latitudes in the input data
     27    integer n_lon   ! number of longitudes in the input data
     28    integer n_lev   ! number of levels in the input data
     29    integer n_month ! number of months in the input data
     30    real, pointer:: latitude(:)
     31    real, pointer:: longitude(:)
     32    real, pointer:: time(:)
     33    integer i, k
     34    integer, save :: mth_pre
    3535!$OMP THREADPRIVATE(mth_pre)
    3636
    3737! Champs reconstitues
    38     REAL, ALLOCATABLE :: chlorocon(:, :, :)
    39     REAL, ALLOCATABLE :: chlorocon_mois(:, :)
    40     REAL, ALLOCATABLE :: chlorocon_mois_glo(:)
     38    real, allocatable:: chlorocon(:, :, :)
     39    real, allocatable:: chlorocon_mois(:, :)
     40    real, allocatable:: chlorocon_mois_glo(:)
    4141
    4242! For NetCDF:
    43     INTEGER ncid_in  ! IDs for input files
    44     INTEGER varid, ncerr
     43    integer ncid_in  ! IDs for input files
     44    integer varid, ncerr
     45
    4546
    4647!--------------------------------------------------------
     48
    4749
    4850!--only read file if beginning of run or start of new month
    4951    IF (debut.OR.mth_cur.NE.mth_pre) THEN
    5052
    51     IF (is_mpi_root.AND.is_omp_root) THEN
     53    IF (is_mpi_root) THEN
     54
    5255
    5356    CALL nf95_open("chlorophyll.nc", nf90_nowrite, ncid_in)
     
    6164       STOP
    6265    ENDIF
     66
    6367
    6468    CALL nf95_inq_varid(ncid_in, "lat", varid)
     
    100104    CALL grid2dTo1d_glo(chlorocon_mois,chlorocon_mois_glo)
    101105
    102     print *,"chrolophyll current month",mth_cur
    103     DO i=1,klon_glo
     106
     107    print*,"chrolophyll current month",mth_cur
     108    do i=1,klon_glo
    104109!      if(isnan(chlorocon_mois_glo(i)))then ! isnan() is not in the Fortran standard...
    105110!      Another way to check for NaN:
    106        IF (chlorocon_mois_glo(i).NE.chlorocon_mois_glo(i)) chlorocon_mois_glo(i)=0.
    107     ENDDO
     111       if(chlorocon_mois_glo(i).ne.chlorocon_mois_glo(i)) then
     112         chlorocon_mois_glo(i)=0.
     113      endif
     114      !print*,"high chl con",i,chlorocon_mois_glo(i)
     115    enddo
    108116
    109117!    DEALLOCATE(chlorocon)
     
    111119!    DEALLOCATE(chlorocon_mois_glo)
    112120 
    113     ENDIF !--is_mpi_root and is_omp_root
     121    ENDIF !--is_mpi_root
    114122
    115123!--scatter on all proc
     
    121129    ENDIF !--debut ou nouveau mois
    122130
    123 END SUBROUTINE readchlorophyll
     131end subroutine readchlorophyll
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/regr_horiz_time_climoz_m.F90

    r3356 r3411  
    190190    !--- Ensure first input longitudes interval contains first output point boundslon_reg(1,west)
    191191    dx1=locate(v1,boundslon_reg(1,west))-1
    192     v1=CSHIFT(v1,SHIFT=dx1,DIM=1); v1(nlon_in-dx1+2:)=v1(nlon_in-dx1+2:)+2.*pi
    193 
    194     !--- Extend input longitudes vector until last interval contains boundslon_reg(nlon_ou,east)
    195     dx2=0; DO WHILE(v1(1+dx2)+2.*pi<=boundslon_reg(nlon_ou,east)); dx2=dx2+1; END DO
     192    v1=CSHIFT(v1,SHIFT=dx1,DIM=1); v1(nlon_in-dx1+1:)=v1(nlon_in-dx1+1:)+2.*pi
     193
     194    !--- Extend input longitudes vector until last interval contains boundslon_reg(nlat_ou,east)
     195    dx2=0; DO WHILE(v1(1+dx2)+2.*pi<boundslon_reg(nlon_ou,east)); dx2=dx2+1; END DO
    196196
    197197    !--- Final edges longitudes vector (with margin and end point)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/regr_pr_comb_coefoz_m.F90

    r3356 r3411  
    128128    !$omp end master
    129129
    130     call regr_pr_time_av(ncid, (/"a2           ", "a4           ", "a6           ", &
    131          "P_net_Mob    ", "r_Mob        ", "temp_Mob     ", "R_Het        "/),      &
    132          REAL(julien-1), 'I', press_in_edg, paprs, coefoz)
     130    call regr_pr_time_av(ncid, (/"a2       ", "a4       ", "a6       ", &
     131         "P_net_Mob", "r_Mob    ", "temp_Mob ", "R_Het    "/), REAL(julien-1), &
     132         press_in_edg, paprs, coefoz)
    133133    a2 = coefoz(:, :, 1)
    134134    a4_mass = coefoz(:, :, 2) * 48. / 29.
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/regr_pr_time_av_m.F90

    r3356 r3411  
    55  USE mod_phys_lmdz_transfert_para, ONLY: bcast
    66  USE mod_phys_lmdz_para, ONLY: mpi_rank, omp_rank
    7   USE print_control_mod,  ONLY: prt_level
    87  IMPLICIT NONE
    98
     
    1615!    to the LMDZ vertical grid.
    1716!  * the forcing fields are stretched if the following arguments are present:
    18 !     - "lat_in":  input file latitudes.
    19 !     - "Ptrp_ou": target grid (LMDZ) tropopause pressure.
     17!     - "lat_in":   input file latitudes.
     18!     - "pcen_in":  input file cells center pressure levels.
     19!     - "ptrop_ou": target grid (LMDZ) tropopause pressure.
    2020!   so that the tropopause is shifted to the position of the one of LMDZ.
    2121!  Note that the ozone quantity conservation is not ensured.
     
    3434!    except that the latitudes are in ascending order in the input file.
    3535!  * We assume that all the input fields have the same coordinates.
    36 !  * The target vertical LMDZ grid is the grid of layer centers.
    37 !  * Regridding in pressure can be:
    38 !    - Ploc=='I': pressures provided at Interfaces    => conservative 2nd order
    39 !         OK for ozone coefficients regridding in Cariolle routines.
    40 !    - Ploc=='C': pressures provides at cells Centers => classical linear       
    41 !         OK for ozone vertical regridding, especially when torpopause
    42 !      adjustment is activated, to avoid "strairs shape effect" on profiles.
     36!  * The target vertical LMDZ grid is the grid of layer boundaries.
     37!  * Regridding in pressure is conservative, second order.
    4338!  * All the fields are regridded as a single multi-dimensional array, so it
    4439!    saves CPU time to call this procedure once for several NetCDF variables
     
    4742!    1) read from the file if "tropopause_air_pressure" field is available.
    4843!    2) computed using "tro3" and "tro3_at_tropopause' (if available).
    49 !    3) computed using "tro3" and a fixed threshold otherwise, constant or
    50 !    determined using an empirical three parameters law:
     44!    3) computed using "tro3" and a fixed threshold otherwise, determined using
     45!    an empirical three parameters law:
    5146!         o3t(ppbV)=co1+co2*SIN(PI*(month-2)/6)*TANH(lat_deg/co3)
    5247!       => co1 and co2 are in ppbV, and co3 in degrees.
     
    5651!  * Fields with suffix "m"/"p" are at the closest records earlier/later than
    5752!  the mid-julian day "julien", on the global "dynamics" horizontal grid.
    58 !  * Fields(i,j,k,l) are at longitude-latitude-name "rlonv(i)-rlatu(j)-nam(l)",
    59 !    pressure level/interval (Ploc=="C"/"I") "pcen_in(k)"/"pcen_in(k:k+1)]".
     53!  * Fields(i,j,k,l) are at longitude-latitude "rlonv(i)-rlatu(j)", pressure
     54!    interval "pint_in(k:k+1)]" and variable "nam(l)".
    6055!  * In the 2D file case, the values are the same for all longitudes.
    6156!  * The tropopause correction works like this: the input fields (file) are
    6257!  interpolated on output (LMDZ) pressure field, which is streched using a power
    63 !  law in a limited zone made of 2 layers:
    64 !    1) between lower bound (lower than lowest tropopause) and LMDZ tropopause
    65 !    2) between LMDZ tropopause and upper bound (higher thzn highest tropopause)
     58!  law in a limited zone made of 3 layers:
     59!    1) between the two tropopauses (file and LMDZ)
     60!    2) in an upper and a lower transitions layers
    6661!  The stretching function has the following form:
    67 !        Sigma_str = Sigma^(1+alpha*phi(Sigma)), where:
    68  * alpha=LOG(SigT_in/SigT_ou)/LOG(SigT_ou)
    69    This value shifts the file tropopause to the height of the one of LMDZ.
    70  * phi is quasi-linear (sections of 1/log function) in the adjacent intervals:
    71      - from 0 to 1 in [Sig_top,SigT_ou]
    72      - from 1 to 0 in [SigT_ou,Sig_bot]
    73 This quasi-triangular localization function ponderates alpha-law from one near
    74 the tropopause to zero each side apart.
     62!    Sigma_str = Sigma^(1+alpha), with alpha=LOG(SigT_in/SigT_ou)/LOG(SigT_ou)
     63This value shifts the file tropopause to the height of the one of LMDZ.
     64The stretching is fully applied in the central zone only, and only partially
     65in the transitions zones, thick enough to guarantee a growing stretched
     66pressure field. The ponderation function for alpha to modulate the stretching
     67is constant equal to 1 in the central layer, and quasi-linear (from 1 to 0)
     68in the transition layers (from 1 to 0 ; in fact: sections of 1/log function),
     69making this localisation function quasi-trapezoidal.
    7570!
    7671! * The following fields are on the global "dynamics" grid, as read from files:
    77   REAL,    SAVE, ALLOCATABLE :: v1 (:,:,:,:)       !--- Current  time ozone fields
    78 ! v1: Field read/interpol at time "julien" on the global "dynamics" horiz. grid.
    79   REAL,    SAVE, ALLOCATABLE :: v1m(:,:,:,:)       !--- Previous time ozone fields
    80   REAL,    SAVE, ALLOCATABLE :: v1p(:,:,:,:)       !--- Next     time ozone fields
    81   REAL,    SAVE, ALLOCATABLE :: pgm(:,:), pgp(:,:) !--- Ground     pressure
     72  REAL,    SAVE, ALLOCATABLE :: v1m(:,:,:,:)       !--- Previous ozone fields
     73  REAL,    SAVE, ALLOCATABLE :: v1p(:,:,:,:)       !--- Next ozone fields
     74  REAL,    SAVE, ALLOCATABLE :: psm(:,:), psp(:,:) !--- Surface pressure
    8275  REAL,    SAVE, ALLOCATABLE :: ptm(:,:), ptp(:,:) !--- Tropopause pressure
    8376  REAL,    SAVE, ALLOCATABLE :: otm(:,:), otp(:,:) !--- Tropopause o3 mix. ratio
     
    8881!      * for monthly input files: julien is in [time_in(irec),time_in(irec+1)]
    8982  LOGICAL, SAVE :: linterp                         !--- Interpolation in time
    90   LOGICAL, SAVE :: lPrSfile                        !--- Surface pressure flag
    91   LOGICAL, SAVE :: lPrTfile                        !--- Tropopause pressure flag
    92   LOGICAL, SAVE :: lO3Tfile                        !--- Tropopause ozone flag
     83  LOGICAL, SAVE :: lPrSurf                         !--- Surface pressure flag
     84  LOGICAL, SAVE :: lPrTrop                         !--- Tropopause pressure flag
     85  LOGICAL, SAVE :: lO3Trop                         !--- Tropopause ozone flag
    9386  LOGICAL, SAVE :: lfirst=.TRUE.                   !--- First call flag
    9487!$OMP THREADPRIVATE(lfirst)
    95   REAL,    PARAMETER :: pTropUp=9.E+3 !--- Value  <  tropopause pressure (Pa)
    96   REAL,    PARAMETER :: gamm   =0.4   !--- Max. stretched layer sigma ratio
    97   REAL,    PARAMETER :: rho    =1.4   !--- Max tropopauses sigma ratio
    98   REAL,    PARAMETER :: o3t0   =1.E-7 !--- Nominal O3 vmr at tropopause
    99   LOGICAL, PARAMETER :: lO3Tpara=.FALSE. !--- Parametrized O3 vmr at tropopause
    100   LOGICAL, PARAMETER :: ldebug=.FALSE.!--- Force writefield_phy multiple outputs
    101   REAL, PARAMETER :: ChemPTrMin=9.E+3 !--- Thresholds for minimum and maximum
    102   REAL, PARAMETER :: ChemPTrMax=4.E+4 !    chemical  tropopause pressure (Pa).
    103   REAL, PARAMETER :: DynPTrMin =8.E+3 !--- Thresholds for minimum and maximum
    104   REAL, PARAMETER :: DynPTrMax =4.E+4 !    dynamical tropopause pressure (Pa).
     88  REAL,    PARAMETER :: pTropUp=5.E+3 !--- Value < tropopause pressure (Pa)
     89  REAL,    PARAMETER :: gamm = 0.4    !--- Relative thickness of transitions
     90  REAL,    PARAMETER :: rho  = 1.3    !--- Max tropopauses sigma ratio
     91  REAL,    PARAMETER :: o3t0 = 1.E-7  !--- Nominal O3 vmr at tropopause
     92  LOGICAL, PARAMETER :: lo3tp=.FALSE. !--- Use parametrized O3 vmr at tropopause
    10593
    10694CONTAINS
     
    10896!-------------------------------------------------------------------------------
    10997!
    110 SUBROUTINE regr_pr_time_av(fID, nam, julien, Ploc, Pre_in, Pre_ou, v3, Pgnd_ou,&
    111                                              time_in, lon_in, lat_in, Ptrp_ou)
     98SUBROUTINE regr_pr_time_av(fID, nam, julien, pint_in, pint_ou, v3,             &
     99                             time_in, lon_in, lat_in, pcen_in, ptrop_ou)
    112100!
    113101!-------------------------------------------------------------------------------
     
    124112  USE slopes_m,       ONLY: slopes
    125113  USE mod_phys_lmdz_mpi_data,       ONLY: is_mpi_root
    126   USE mod_grid_phy_lmdz, ONLY: nlon=>nbp_lon, nlat=>nbp_lat, nlev_ou=>nbp_lev
     114  USE mod_grid_phy_lmdz,            ONLY: nbp_lon, nbp_lat, nbp_lev
    127115  USE mod_phys_lmdz_transfert_para, ONLY: scatter2d, scatter
    128116  USE phys_cal_mod,                 ONLY: calend, year_len, days_elapsed, jH_cur
    129117!-------------------------------------------------------------------------------
    130118! Arguments:
    131   INTEGER,           INTENT(IN) :: fID        !--- NetCDF file ID
     119  INTEGER, INTENT(IN)  :: fID           !--- NetCDF file ID
    132120  CHARACTER(LEN=13), INTENT(IN) :: nam(:)     !--- NetCDF variables names
    133   REAL,              INTENT(IN) :: julien     !--- Days since Jan 1st
    134   CHARACTER(LEN=1),  INTENT(IN) :: Ploc       !--- Pressures locations
    135   !--- File/LMDZ (resp. decreasing & increasing order) pressure, Pa
    136   !    At cells centers or interfaces depending on "Ploc" keyword (C/I)
    137   REAL,    INTENT(IN)  :: Pre_in(:)           !--- in:  file      (nlev_in[+1])
    138   REAL,    INTENT(IN)  :: Pre_ou(:,:)         !--- out: LMDZ (klon,nlev_ou[+1])
    139   REAL,    INTENT(OUT) :: v3(:,:,:)           !--- Regr. fld (klon,nlev_ou,n_var)
    140   REAL,    INTENT(IN), OPTIONAL :: Pgnd_ou(:) !--- LMDZ ground pressure   (klon)
     121  REAL,    INTENT(IN)  :: julien        !--- Days since Jan 1st
     122  REAL,    INTENT(IN)  :: pint_in(:)    !--- Interfaces file Pres, Pa, ascending
     123  REAL,    INTENT(IN)  :: pint_ou(:,:)  !--- Interfaces LMDZ pressure, Pa (g,nbp_lev+1)
     124  REAL,    INTENT(OUT) :: v3(:,:,:)     !--- Regridded field (klon,llm,SIZE(nam))
    141125  REAL,    INTENT(IN), OPTIONAL :: time_in(:) !--- Records times, in days
    142126                                              !    since Jan 1 of current year
    143   REAL,    INTENT(IN), OPTIONAL :: lon_in(:)  !--- File longitudes vector (klon)
    144   REAL,    INTENT(IN), OPTIONAL :: lat_in(:)  !--- File latitudes  vector (klon)
    145   REAL,    INTENT(IN), OPTIONAL :: Ptrp_ou(:) !--- LMDZ tropopause pres   (klon)
     127  REAL,    INTENT(IN), OPTIONAL :: lon_in(:)  !--- Input/output longitudes vector
     128  REAL,    INTENT(IN), OPTIONAL :: lat_in(:)  !--- Input/output latitudes vector
     129  REAL,    INTENT(IN), OPTIONAL :: pcen_in(:) !--- Mid-layers file pressure
     130  REAL,    INTENT(IN), OPTIONAL :: ptrop_ou(:)!--- Output tropopause pres (klon)
    146131!-------------------------------------------------------------------------------
    147132! Local variables:
     
    150135  CHARACTER(LEN=80)  :: sub
    151136  CHARACTER(LEN=320) :: str
    152   INTEGER :: vID, ncerr, n_var, ibot, iout, nn
    153   INTEGER :: i, nlev_in, n_dim, itop, itrp, i0
     137  INTEGER :: vID, ncerr, n_var, ibot, ibo0, nn, itrp
     138  INTEGER :: i, nlev_in, n_dim, itop, ito0, i0
    154139  LOGICAL :: lAdjTro                          !--- Need to adjust tropopause
    155140  REAL    :: y_frac                           !--- Elapsed year fraction
    156141  REAL    :: alpha, beta, al                  !--- For stretching/interpolation
    157142  REAL    :: SigT_in, SigT_ou                 !--- Input and output tropopauses
    158   REAL    :: Sig_bot, Sig_top                 !--- Bounds of quasi-hat function
    159   REAL    :: Sig_bo0, Sig_to0                 !--- Lower/upper tropopauses
    160   REAL    :: Sig_in (SIZE(Pre_in))            !--- Input field sigma levels
    161   REAL    :: Sig_ou (SIZE(Pre_ou,2))          !--- Output LMDZ sigma levels
    162   REAL    :: phi    (SIZE(Pre_ou,2))          !--- Stretching exponent anomaly
    163   REAL    :: Pstr_ou(SIZE(Pre_ou,2))          !--- Stretched pressure levels
    164   REAL    :: Pres_ou(SIZE(Pre_ou,2))          !--- Pre_ou(i,:), reversed order
    165   REAL, DIMENSION(nlon, nlat) :: pg1,      pt1,      ot1
    166   REAL, DIMENSION(klon)       :: Pgnd_in,  Ptrp_in,  Otrp_in
    167   REAL, DIMENSION(klon)       :: Ptrop_ou, Pgrnd_ou
    168 ! * The following fields are scattered to the partial "physics" horizontal grid.
    169   REAL, POINTER :: v2(:,:,:)                  !--- Current  time ozone fields
     143  REAL    :: Sig_bot, Sig_top                 !--- Fully strained layer  bounds
     144  REAL    :: Sig_bo0, Sig_to0                 !--- Total strained layers bounds
     145  REAL    :: Sig_in(SIZE(pint_in))            !--- Input field sigma levels
     146  REAL    :: Sig_ou (nbp_lev+1)               !--- Output LMDZ sigma levels
     147  REAL    :: phi    (nbp_lev+1)               !--- Stretching exponent anomaly
     148  REAL    :: pstr_ou(nbp_lev+1)               !--- Stretched pressure levels
     149  REAL    :: pintou (nbp_lev+1)               !--- pint_ou in reversed order
     150  REAL    :: v1(nbp_lon,nbp_lat,SIZE(pint_in)-1,SIZE(nam))
     151  REAL    :: v2(klon,           SIZE(pint_in)-1,SIZE(nam))
     152! v1: Field read/interpol at time "julien" on the global "dynamics" horiz. grid.
     153! v2: Field scattered to the partial "physics" horizontal grid.
    170154!     In the 2D file case, the values are the same for all longitudes.
    171 !     "v2(i, k, l)" is at longitude-latitude "xlon(i)-xlat(i)" and name "nam(l)"
    172 ! Both are:          * if Ploc=='I' in pressure interval "press_in_edg(k:k+1)"
    173 !                    * if Ploc=='C' at pressure          "press_in_cen(k)"
    174   REAL, TARGET :: &
    175     v2i(klon,SIZE(Pre_in)-1,SIZE(nam)), &     !--- v2 in Ploc=='I' case
    176     v2c(klon,SIZE(Pre_in)  ,SIZE(nam))        !--- v2 in Ploc=='C' case
     155!     "v2(i,    k, l)" is at longitude-latitude  "xlon(i)-xlat(i)".
     156! Both are for pressure interval "press_in_edg(k:k+1)]" and variable "nam(l)"
     157  REAL, DIMENSION(nbp_lon, nbp_lat)   :: ps1, pt1, ot1
     158  REAL, DIMENSION(klon)               :: ps2, pt2, ot2, ptropou
    177159  LOGICAL :: ll
    178 !--- For debug
    179   REAL, DIMENSION(klon)             :: Ptrop_in, Ptrop_ef
    180   REAL, DIMENSION(klon)             :: dzStrain, dzStrain0
    181   REAL, DIMENSION(klon,SIZE(Pre_ou,2)) :: Pstrn_ou, phii
    182160!-------------------------------------------------------------------------------
    183161  sub="regr_pr_time_av"
    184   nlev_in=SIZE(Pre_in); IF(Ploc=='I') nlev_in=nlev_in-1
    185   IF(Ploc=='I') THEN; v2 => v2i; ELSE; v2 => v2c; END IF
    186   CALL assert(SIZE(Pre_ou,1)==klon,TRIM(sub)//" Pre_ou klon")
    187   CALL assert(SIZE(v3,1)==klon,    TRIM(sub)//" v3 klon")
    188   CALL assert(SIZE(v3,2)==nlev_ou, TRIM(sub)//" v3 nlev_ou")
    189   IF(Ploc=='I') CALL assert(SIZE(Pre_ou,2)==nlev_ou+1,TRIM(sub)//" Pre_ou nlev_ou+1")
    190   IF(Ploc=='C') CALL assert(SIZE(Pre_ou,2)==nlev_ou  ,TRIM(sub)//" Pre_ou nlev_ou")
     162  nlev_in=SIZE(pint_in)-1
     163  CALL assert(SIZE(v3,1)==klon,          TRIM(sub)//" v3 klon")
     164  CALL assert(SIZE(v3,2)==nbp_lev,       TRIM(sub)//" v3 nbp_lev")
    191165  n_var = assert_eq(SIZE(nam),SIZE(v3,3),TRIM(sub)//" v3 n_var")
    192   IF(PRESENT(Pgnd_ou)) CALL assert(SIZE(Pgnd_ou)==klon,TRIM(sub)//" Pgnd_ou klon")
    193   IF(PRESENT(lon_in))  CALL assert(SIZE(lon_in )==klon,TRIM(sub)//" lon_in klon")
    194   IF(PRESENT(lat_in))  CALL assert(SIZE(lat_in )==klon,TRIM(sub)//" lat_in klon")
    195   IF(PRESENT(Ptrp_ou)) CALL assert(SIZE(Ptrp_ou)==klon,TRIM(sub)//" Ptrp_ou klon")
    196   lAdjTro=PRESENT(Ptrp_ou)
    197   IF(lAdjTro) THEN
    198     IF(.NOT.PRESENT(lat_in)) &
    199       CALL abort_physic(sub, 'Missing lat_in (required if adjust_tropopause=T)', 1)
    200     IF(.NOT.PRESENT(Pgnd_ou).AND.Ploc=='C') &
    201       CALL abort_physic(sub, 'Missing ground Pr(required if adjust_tropopause=T)', 1)
    202     IF(PRESENT(Pgnd_ou)) THEN; Pgrnd_ou=Pgnd_ou; ELSE; Pgrnd_ou=Pre_ou(:,1); END IF
    203   END IF
     166  CALL assert(SIZE(pint_ou,1)==klon     ,TRIM(sub)//" pint_ou klon")
     167  CALL assert(SIZE(pint_ou,2)==nbp_lev+1,TRIM(sub)//" pint_ou nbp_lev+1")
     168  IF(PRESENT(lon_in))   CALL assert(SIZE(lon_in  )==klon,TRIM(sub)//" lon_in klon")
     169  IF(PRESENT(lat_in))   CALL assert(SIZE(lat_in  )==klon,TRIM(sub)//" lat_in klon")
     170  IF(PRESENT(ptrop_ou)) CALL assert(SIZE(ptrop_ou)==klon,TRIM(sub)//" ptrop_ou klon")
     171  IF(PRESENT(pcen_in))  CALL assert(SIZE(pcen_in )==nlev_in,TRIM(sub)//" pcen_in")
     172  lAdjTro=PRESENT(ptrop_ou)
     173  IF(lAdjTro.AND.(.NOT.PRESENT(lat_in).OR..NOT.PRESENT(pcen_in))) &
     174  CALL abort_physic(sub, 'Missing lat_in and/or pcen_in (adjust_tropopause=T)', 1)
    204175
    205176  !$OMP MASTER
     
    208179    !=== CHECK WHICH FIELDS ARE AVAILABLE IN THE INPUT FILE
    209180    IF(lfirst) THEN
    210       lPrSfile=lAdjTro.AND.NF90_INQ_VARID(fID,"ps"                     ,vID)==NF90_NOERR
    211       lPrTfile=lAdjTro.AND.NF90_INQ_VARID(fID,"tropopause_air_pressure",vID)==NF90_NOERR
    212       lO3Tfile=lAdjTro.AND.NF90_INQ_VARID(fID,"tro3_at_tropopause"     ,vID)==NF90_NOERR
     181      lPrSurf=NF90_INQ_VARID(fID,"ps"                     ,vID)==NF90_NOERR
     182      lPrTrop=NF90_INQ_VARID(fID,"tropopause_air_pressure",vID)==NF90_NOERR
     183      lO3Trop=NF90_INQ_VARID(fID,"tro3_at_tropopause"     ,vID)==NF90_NOERR
    213184      CALL NF95_INQ_DIMID(fID,"time",vID)
    214185      CALL NF95_INQUIRE_DIMENSION(fID,vID,nclen=ntim_in)
    215186      linterp=PRESENT(time_in).AND.ntim_in==14
    216       ALLOCATE(v1(nlon,nlat,nlev_in,n_var))
    217187      IF(linterp) THEN
    218         ALLOCATE(v1m(nlon,nlat,nlev_in,n_var),v1p(nlon,nlat,nlev_in,n_var))
    219         IF(lPrSfile) ALLOCATE(pgm(nlon,nlat),pgp(nlon,nlat))
    220         IF(lPrTfile) ALLOCATE(ptm(nlon,nlat),ptp(nlon,nlat))
    221         IF(lO3Tfile) ALLOCATE(otm(nlon,nlat),otp(nlon,nlat))
     188        ALLOCATE(v1m(nbp_lon,nbp_lat,nlev_in,n_var))
     189        ALLOCATE(v1p(nbp_lon,nbp_lat,nlev_in,n_var))
     190        ALLOCATE(psm(nbp_lon,nbp_lat),psp(nbp_lon,nbp_lat))
     191        ALLOCATE(ptm(nbp_lon,nbp_lat),ptp(nbp_lon,nbp_lat))
     192        IF(lO3Trop) ALLOCATE(otm(nbp_lon,nbp_lat),otp(nbp_lon,nbp_lat))
    222193      END IF
    223194      !--- INITIAL INDEX: LOCATE A LAYER WELL ABOVE TROPOPAUSE (50hPa)
    224       IF(lAdjTro) itrp0=locate(Pre_in,pTropUp)
    225       CALL msg(linterp,'Monthly O3 files => ONLINE TIME INTERPOLATION.'    ,sub)
    226       CALL msg(lPrSfile,'Using GROUND PRESSURE from input O3 forcing file.',sub)
    227       CALL msg(lAdjTro ,'o3 forcing file tropopause location uses:'        ,sub)
    228       IF(lPrTfile)      THEN; str='    INPUT FILE PRESSURE'
    229       ELSE IF(lO3Tfile) THEN; str='    INPUT FILE O3 CONCENTRATION'
    230       ELSE IF(lO3Tpara) THEN; str='    PARAMETRIZED O3 concentration'
    231       ELSE;                   str='    CONSTANT O3 concentration'; END IF
    232       CALL msg(lAdjTro,TRIM(str)//' at tropopause')
     195      IF(lAdjTro) itrp0=locate(pcen_in,pTropUp)
     196      CALL msg(lPrSurf,'Using GROUND PRESSURE from input O3 forcing file.',sub)
     197      CALL msg(linterp,'Monthly O3 files => ONLINE TIME INTERPOLATION.',sub)
     198      CALL msg(lAdjTro,'o3 forcing file tropopause location uses:',sub)
     199      IF(lPrTrop) THEN
     200        CALL msg(lAdjTro,'    PRESSURE AT TROPOPAUSE from file.')
     201      ELSE IF(lO3Trop) THEN
     202        CALL msg(lAdjTro,'    O3 CONCENTRATION AT TROPOPAUSE from file.')
     203      ELSE IF(lo3tp) THEN
     204        CALL msg(lAdjTro,'    PARAMETRIZED O3 concentration at tropopause.')
     205      ELSE
     206        CALL msg(lAdjTro,'    CONSTANT O3 concentration at tropopause.')
     207      END IF
    233208    END IF
    234209
     
    238213    !=== TIME INTERPOLATION FOR MONTHLY INPUT FILES
    239214    IF(linterp) THEN
    240       WRITE(str,'(a,f12.8,2(a,f5.1))')'Interpolating O3 at julian day ',julien,&
    241         ' from fields at times ',time_in(irec),' and ', time_in(irec+1)
     215      WRITE(str,'(3(a,f12.8))')'Interpolating O3 at julian day ',julien,' from '&
     216      &//'fields at times ',time_in(irec),' and ', time_in(irec+1)
    242217      CALL msg(.TRUE.,str,sub)
    243218      al=(time_in(irec+1)-julien)/(time_in(irec+1)-time_in(irec))
    244219      v1=al*v1m+(1.-al)*v1p
    245       IF(lPrSfile) pg1=al*pgm+(1.-al)*pgp
    246       IF(lPrTfile) pt1=al*ptm+(1.-al)*ptp
    247       IF(lO3Tfile) ot1=al*otm+(1.-al)*otp
     220      IF(lPrSurf) ps1=al*psm+(1.-al)*psp
     221      IF(lPrTrop) pt1=al*ptm+(1.-al)*ptp
     222      IF(lO3Trop) ot1=al*otm+(1.-al)*otp
    248223    END IF
    249224  END IF
    250225  !$OMP END MASTER
    251226  IF(lfirst) THEN
    252     lfirst=.FALSE.;       CALL bcast(lfirst)
    253     IF(lAdjTro)           CALL bcast(itrp0)
    254     CALL bcast(lPrSfile); CALL bcast(lPrTfile)
    255     CALL bcast(lO3Tfile); CALL bcast(linterp)
     227    lfirst=.FALSE.;      CALL bcast(lfirst)
     228    IF(lAdjTro)          CALL bcast(itrp0)
     229    CALL bcast(lPrTrop); CALL bcast(lPrSurf)
     230    CALL bcast(lO3Trop); CALL bcast(linterp)
    256231  END IF
    257232  CALL scatter2d(v1,v2)
    258   IF(lPrSfile) CALL scatter2d(pg1,Pgnd_in)
    259   IF(lPrTfile) CALL scatter2d(pt1,Ptrp_in)
    260   IF(lO3Tfile) CALL scatter2d(ot1,Otrp_in)
    261   !--- No ground pressure in input file => choose it to be the one of LMDZ
    262   IF(lAdjTro.AND..NOT.lPrSfile) Pgnd_in(:)=Pgrnd_ou(:)
    263  
    264 !-------------------------------------------------------------------------------
    265   IF(.NOT.lAdjTro) THEN       !--- REGRID IN PRESSURE ; NO TROPOPAUSE ADJUSTMENT
    266 !-------------------------------------------------------------------------------
     233  !--- No "ps" in input file => assumed to be equal to current LMDZ ground press
     234  IF(lPrSurf) THEN; CALL scatter2d(ps1,ps2); ELSE; ps2=pint_ou(:,1); END IF
     235  IF(lPrTrop) CALL scatter2d(pt1,pt2)
     236  IF(lO3Trop) CALL scatter2d(ot1,ot2)
     237
     238  !--- REGRID IN PRESSURE ; 3rd index inverted because "paprs" is decreasing
     239  IF(.NOT.lAdjTro) THEN
    267240    DO i=1,klon
    268       Pres_ou=Pre_ou(i,SIZE(Pre_ou,2):1:-1)   !--- pplay & paprs are decreasing
    269       IF(Ploc=='C') CALL regr_lint   (1,v2(i,:,:), LOG(Pre_in(:)),             &
    270         LOG(Pres_ou(:)), v3(i,nlev_ou:1:-1,:))
    271       IF(Ploc=='I') CALL regr_conserv(1,v2(i,:,:),     Pre_in(:) ,             &
    272             Pres_ou(:) , v3(i,nlev_ou:1:-1,:), slopes(1,v2(i,:,:), Pre_in(:)))
     241      pintou = pint_ou(i,nbp_lev+1:1:-1)
     242      CALL regr_conserv(1,v2(i,:,:), pint_in(:), pintou(:),                    &
     243                          v3(i,nbp_lev:1:-1,:), slopes(1,v2(i,:,:), pint_in(:)))
    273244    END DO
    274 !-------------------------------------------------------------------------------
    275   ELSE                        !--- REGRID IN PRESSURE ; TROPOPAUSE ADJUSTMENT
    276 !-------------------------------------------------------------------------------
     245  ELSE
    277246    y_frac=(REAL(days_elapsed)+jH_cur)/year_len
    278247
     
    280249    DO i=1,klon
    281250
    282       !--- INPUT/OUTPUT (FILE/LMDZ) SIGMA LEVELS IN CURRENT COLUMN
    283       Pres_ou   = Pre_ou(i,SIZE(Pre_ou,2):1:-1)!--- pplay & paprs are decreasing
    284       Sig_in(:) = Pre_in (:)/Pgnd_in(i)            !--- increasing values
    285       Sig_ou(:) = Pres_ou(:)/Pgnd_ou(i)            !--- increasing values
    286 
    287       !--- INPUT (FILE) SIGMA LEVEL AT TROPOPAUSE ; extreme values are filtered
    288       ! to keep tropopause pressure realistic ; high values are usually due to
    289       ! ozone hole fooling the crude chemical tropopause detection algorithm.
     251      !--- LOCAL INPUT/OUTPUT (FILE/LMDZ) SIGMA LEVELS AT INTERFACES
     252      pintou=pint_ou(i,nbp_lev+1:1:-1)            !--- increasing values
     253      Sig_in(:) = [pint_in(1:nlev_in+1)/ps2(i)]   !--- increasing values
     254      Sig_ou(:) = [pintou (1:nbp_lev)/ps2(i),1.0] !--- increasing values
     255
     256      !--- INPUT (FILE) AND OUTPUT (LMDZ) SIGMA LEVELS AT TROPOPAUSE
    290257      SigT_in = get_SigTrop(i,itrp)
    291       SigT_in=MIN(SigT_in,ChemPTrMax/Pgnd_in(i))   !--- too low  value filtered
    292       SigT_in=MAX(SigT_in,ChemPTrMin/Pgnd_ou(i))   !--- too high value filtered
    293 
    294       !--- OUTPUT (LMDZ) SIGMA LEVEL AT TROPOPAUSE ; too high variations of the
    295       ! dynamical tropopause (especially in filaments) are conterbalanced with
    296       ! a filter ensuring it stays within a certain distance around input (file)
    297       ! tropopause, hence avoiding avoid a too thick stretched region ; a final
    298       ! extra-safety filter keeps the tropopause pressure value realistic.
    299       SigT_ou = Ptrp_ou(i)/Pgnd_ou(i)
    300       IF(SigT_ou<SigT_in/rho) SigT_ou=SigT_in/rho  !--- too low  value w/r input
    301       IF(SigT_ou>SigT_in*rho) SigT_ou=SigT_in*rho  !--- too high value w/r input
    302       SigT_ou=MIN(SigT_ou,DynPTrMax/Pgnd_ou(i))    !--- too low  value filtered
    303       SigT_ou=MAX(SigT_ou,DynPTrMin/Pgnd_ou(i))    !--- too high value filtered
    304       Ptrop_ou(i)=SigT_ou*Pgnd_ou(i)
    305       iout = locate(Sig_ou(:),SigT_ou)
    306 
    307       !--- POWER LAW COEFFICIENT FOR TROPOPAUSES MATCHING
     258      SigT_ou = ptrop_ou(i)/ps2(i)
     259
     260      !--- AVOID THE FILAMENTS WHICH WOULD NEED A VERY THICK STRETCHED REGION
     261      IF(SigT_ou>SigT_in*rho) SigT_ou = SigT_in*rho
     262      IF(SigT_ou<SigT_in/rho) SigT_ou = SigT_in/rho
     263      ptropou(i)=SigT_ou*ps2(i)
     264
     265      !--- STRETCHING EXPONENT INCREMENT FOR SIMPLE POWER LAW
    308266      alpha = LOG(SigT_in/SigT_ou)/LOG(SigT_ou)
    309267
    310       !--- DETERMINE STRETCHING DOMAIN UPPER AND LOWER BOUNDS
    311       Sig_bo0 = MAX(SigT_in,SigT_ou)               !--- lowest  tropopause
    312       Sig_to0 = MIN(SigT_in,SigT_ou)               !--- highest tropopause
    313       beta    = (Sig_bo0/Sig_to0)**gamm            !--- stretching exponent
    314       Sig_bot = MIN(Sig_bo0*beta,0.1*(9.+Sig_bo0)) !--- must be <1
    315       ibot = locate(Sig_ou(:),Sig_bot)             !--- layer index
    316       IF(ibot-iout<2) THEN                         !--- at least one layer thick
    317         ibot=MIN(iout+2,nlev_ou); Sig_bot=Sig_ou(ibot)
    318       END IF
    319       Sig_top = Sig_to0/beta                       !--- upper bound
    320       itop = locate(Sig_ou(:),Sig_top)             !--- layer index
    321       IF(iout-itop<2) THEN                         !--- at least one layer thick
    322         itop=MAX(iout-2,1); Sig_top=Sig_ou(itop)
    323       END IF
    324 
    325       !--- STRETCHING POWER LAW LOCALIZATION FUNCTION:
    326       !    0 in [0,Sig_top]    0->1 in [Sig_top,SigT_ou]
    327       !    0 in [Sig_bot,1]    1->0 in [SigT_ou, Sig_bot]
     268      !--- FULLY STRETCHED LAYER BOUNDS (FILE AND MODEL TROPOPAUSES)
     269      Sig_bot = MAX(SigT_in,SigT_ou) ; ibot = locate(Sig_ou(:),Sig_bot)
     270      Sig_top = MIN(SigT_in,SigT_ou) ; itop = locate(Sig_ou(:),Sig_top)
     271
     272      !--- PARTIALLY STRETCHED LAYER BOUNDS, ENSURING >0 DERIVATIVE
     273      beta = LOG(Sig_top)/LOG(Sig_bot)
     274      Sig_bo0 = Sig_bot ; IF(alpha<0.) Sig_bo0 = Sig_bot**(1/beta)
     275      Sig_to0 = Sig_top ; IF(alpha>0.) Sig_to0 = Sig_top **  beta
     276
     277      !--- SOME ADDITIONAL MARGIN, PROPORTIONAL TO STRETCHED REGION THICKNESS
     278      !--- gamma<log(Sig_bo0/|alpha|) to keep Sig_bo0<1
     279      Sig_bo0 = MIN(Sig_bo0*EXP( gamm*ABS(alpha)), 0.95+(1.-0.95)*Sig_bo0)
     280      Sig_to0 =     Sig_to0*EXP(-gamm*ABS(alpha))
     281      ibo0 = locate(Sig_ou(:),Sig_bo0)
     282      ito0 = locate(Sig_ou(:),Sig_to0)
     283
     284      !--- FUNCTION FOR STRETCHING LOCALISATION
     285      !    0 < Sig_to0 < Sig_top <= Sig_bo0 < Sig_bot < 1
    328286      phi(:)=0.
    329       phi(itop+1:iout) = (1.-LOG(Sig_top)/LOG(Sig_ou(itop+1:iout)))&
    330                             *LOG(SigT_ou)/LOG(SigT_ou/Sig_top)
    331       phi(iout+1:ibot) = (1.-LOG(Sig_bot)/LOG(Sig_ou(iout+1:ibot)))&
    332                             *LOG(SigT_ou)/LOG(SigT_ou/Sig_bot)
    333 
    334       !--- LOCALY STRECHED OUTPUT (LMDZ) PRESSURE PROFILES (INCREASING ORDER)
    335       Pstr_ou(:) = Pres_ou(:) * Sig_ou(:)**(alpha*phi(:))
     287      phi(itop+1:ibot) =  1.
     288      phi(ito0+1:itop) = (1.-LOG(Sig_to0)/LOG(Sig_ou(ito0+1:itop)))&
     289                            *LOG(Sig_top)/LOG(Sig_top/Sig_to0)
     290      phi(ibot+1:ibo0) = (1.-LOG(Sig_bo0)/LOG(Sig_ou(ibot+1:ibo0)))&
     291                            *LOG(Sig_bot)/LOG(Sig_bot/Sig_bo0)
     292
     293      !--- LOCAL STRAINED OUTPUT (LMDZ) PRESSURE PROFILES (INCREASING ORDER)
     294      pstr_ou(:) = pintou(:) * Sig_ou(:)**(alpha*phi(:))
    336295
    337296      !--- REGRID INPUT PROFILE ON STRAINED VERTICAL OUTPUT LEVELS
    338       IF(Ploc=='C') CALL regr_lint   (1, v2(i,:,:), LOG(Pre_in(:)),            &
    339         LOG(Pstr_ou(:)), v3(i,nlev_ou:1:-1,:))
    340       IF(Ploc=='I') CALL regr_conserv(1, v2(i,:,:),     Pre_in(:) ,            &
    341             Pstr_ou(:) , v3(i,nlev_ou:1:-1,:), slopes(1,v2(i,:,:), Pre_in(:)))
     297      CALL regr_conserv(1, v2(i,:,:), pint_in(:), pstr_ou(:),                  &
     298                           v3(i,nbp_lev:1:-1,:), slopes(1,v2(i,:,:),pint_in(:)))
    342299
    343300      !--- CHECK CONCENTRATIONS. strato: 50ppbV-15ppmV ; tropo: 5ppbV-300ppbV.
    344       i0=nlev_ou-locate(Pres_ou(:),Ptrop_ou(i))+1
    345       ll=check_ozone(v3(i, 1:i0-1   ,1),lon_in(i),lat_in(i),1 ,'troposphere',  &
     301      i0=nbp_lev-locate(pintou(:),ptropou(i))+1
     302      ll=check_ozone(v3(i, 1:i0     ,1),lon_in(i),lat_in(i),1 ,'troposphere',  &
    346303                     5.E-9,3.0E-7)
    347304!     IF(ll) CALL abort_physic(sub, 'Inconsistent O3 values in troposphere', 1)
    348       ll=check_ozone(v3(i,i0:nlev_ou,1),lon_in(i),lat_in(i),i0,'stratosphere', &
     305      ll=check_ozone(v3(i,i0:nbp_lev,1),lon_in(i),lat_in(i),i0,'stratosphere', &
    349306                     5.E-8,1.5E-5)
    350307!     IF(ll) CALL abort_physic(sub, 'Inconsistent O3 values in stratosphere', 1)
    351308
    352       IF(ldebug) THEN
    353         dzStrain0(i) = SIGN(7.*LOG(Sig_bo0/Sig_to0),SigT_in-SigT_ou)
    354         dzStrain (i) = SIGN(7.*LOG(Sig_bot/Sig_top),SigT_in-SigT_ou)
    355         Ptrop_in (i) = SigT_in*Pgnd_in(i)
    356         Pstrn_ou(i,:)= Pstr_ou
    357         phii(i,:)    = phi(:)
    358         Ptrop_ef(i)  = PTrop_chem(i, itrp, locate(Pres_ou(:),PTropUp),    &
    359                              Pres_ou(:), v3(:,nlev_ou:1:-1,1),o3trop=o3t0)
    360       END IF
    361309    END DO
    362   END IF
    363   IF(ldebug.AND.lAdjTro) THEN
    364     CALL writefield_phy('PreSt_ou' ,Pstrn_ou,SIZE(Pre_ou,2)) !--- Strained Pres
    365     CALL writefield_phy('dzStrain' ,dzStrain ,1)     !--- Strained thickness
    366     CALL writefield_phy('dzStrain0',dzStrain0,1)     !--- Tropopauses distance
    367     CALL writefield_phy('phi',phii,nlev_ou)          !--- Localization function
    368     !--- Tropopauses pressures:
    369     CALL writefield_phy('PreTr_in',Ptrop_in,1)       !--- Input and effective
    370     CALL writefield_phy('PreTr_ou',Ptrop_ou,1)       !--- LMDz dyn tropopause
    371     CALL writefield_phy('PreTr_ef',Ptrop_ef,1)       !--- Effective chem tropop
    372   END IF
    373   IF(ldebug) THEN
    374     CALL writefield_phy('Ozone_in',v2(:,:,1),nlev_in)!--- Raw input O3 field
    375     CALL writefield_phy('Ozone_ou',v3(:,:,1),nlev_ou)!--- Output ozone field
    376     CALL writefield_phy('Pres_ou' ,Pre_ou,SIZE(Pre_ou,2))!--- LMDZ Pressure
    377310  END IF
    378311
     
    391324    CALL get_3Dfields(v1)               !--- Read ozone field(s)
    392325    IF(lAdjTro) THEN                    !--- Additional files for fields strain
    393       IF(lPrSfile) CALL get_2Dfield(pg1,"ps")
    394       IF(lPrTfile) CALL get_2Dfield(pt1,"tropopause_air_pressure")
    395       IF(lO3Tfile) CALL get_2Dfield(ot1,"tro3_at_tropopause")
     326      IF(lPrSurf) CALL get_2Dfield(ps1,"ps")
     327      IF(lPrTrop) CALL get_2Dfield(pt1,"tropopause_air_pressure")
     328      IF(lO3Trop) CALL get_2Dfield(ot1,"tro3_at_tropopause")
    396329    END IF
    397330  ELSE                                  !=== MONTHLY FILES: GET 2 NEAREST RECS
     
    405338      CALL get_3Dfields(v1m)            !--- Read ozone field(s)
    406339      IF(lAdjTro) THEN                  !--- Additional files for fields strain
    407         IF(lPrSfile) CALL get_2Dfield(pgm,"ps")
    408         IF(lPrTfile) CALL get_2Dfield(ptm,"tropopause_air_pressure")
    409         IF(lO3Tfile) CALL get_2Dfield(otm,"tro3_at_tropopause")
     340        IF(lPrSurf) CALL get_2Dfield(psm,"ps")
     341        IF(lPrTrop) CALL get_2Dfield(ptm,"tropopause_air_pressure")
     342        IF(lO3Trop) CALL get_2Dfield(otm,"tro3_at_tropopause")
    410343      END IF
    411344    ELSE                                !=== SHIFT FIELDS
     
    416349      v1m=v1p                           !--- Ozone fields
    417350      IF(lAdjTro) THEN                  !--- Additional files for fields strain
    418         IF(lPrSfile) pgm=pgp             !--- Surface pressure
    419         IF(lPrTfile) ptm=ptp             !--- Tropopause pressure
    420         IF(lO3Tfile) otm=otp             !--- Tropopause ozone
     351        IF(lPrSurf) psm=psp             !--- Surface pressure
     352        IF(lPrTrop) ptm=ptp             !--- Tropopause pressure
     353        IF(lO3Trop) otm=otp             !--- Tropopause ozone
    421354      END IF
    422355    END IF
     
    427360    CALL get_3Dfields(v1p)              !--- Read ozone field(s)
    428361    IF(lAdjTro) THEN                    !--- Additional files for fields strain
    429       IF(lPrSfile) CALL get_2Dfield(pgp,"ps")
    430       IF(lPrTfile) CALL get_2Dfield(ptp,"tropopause_air_pressure")
    431       IF(lO3Tfile) CALL get_2Dfield(otp,"tro3_at_tropopause")
     362      IF(lPrSurf) CALL get_2Dfield(psp,"ps")
     363      IF(lPrTrop) CALL get_2Dfield(ptp,"tropopause_air_pressure")
     364      IF(lO3Trop) CALL get_2Dfield(otp,"tro3_at_tropopause")
    432365    END IF
    433366    irec=irec-1
     
    460393  !--- Flip latitudes: ascending in input file, descending in "rlatu".
    461394  IF(n_dim==3) THEN
    462     v(1,:) = v(1,nlat:1:-1)
    463     v(2:,:)= SPREAD(v(1,:),DIM=1,ncopies=nlon-1)  !--- Duplication
     395    v(1,:) = v(1,nbp_lat:1:-1)
     396    v(2:,:)= SPREAD(v(1,:),DIM=1,ncopies=nbp_lon-1)  !--- Duplication
    464397  ELSE
    465     v(:,:) = v(:,nlat:1:-1)
     398    v(:,:) = v(:,nbp_lat:1:-1)
    466399  END IF
    467400
     
    493426  !--- Flip latitudes: ascending in input file, descending in "rlatu".
    494427  IF(n_dim==3) THEN
    495     v(1,:,:,:) = v(1,nlat:1:-1,:,:)
    496     v(2:,:,:,:)= SPREAD(v(1,:,:,:),DIM=1,ncopies=nlon-1)  !--- Duplication
     428    v(1,:,:,:) = v(1,nbp_lat:1:-1,:,:)
     429    v(2:,:,:,:)= SPREAD(v(1,:,:,:),DIM=1,ncopies=nbp_lon-1)  !--- Duplication
    497430  ELSE
    498     v(:,:,:,:) = v(:,nlat:1:-1,:,:)
     431    v(:,:,:,:) = v(:,nbp_lat:1:-1,:,:)
    499432  END IF
    500433
     
    507440!-------------------------------------------------------------------------------
    508441!
    509 FUNCTION get_SigTrop(ih,it) RESULT(out)
    510 !
    511 !-------------------------------------------------------------------------------
    512 ! Arguments:
    513   REAL                 :: out
     442FUNCTION get_SigTrop(ih,it)
     443!
     444!-------------------------------------------------------------------------------
     445! Arguments:
    514446  INTEGER, INTENT(IN)  :: ih
    515447  INTEGER, INTENT(OUT) :: it
    516 !-------------------------------------------------------------------------------
    517   !--- Pressure at tropopause read from the forcing file
    518        IF(lPrTfile) THEN; out=Ptrp_in(ih)/Pgnd_in(ih); RETURN; END IF
    519 
    520   !--- Chemical tropopause definition based on a particular threshold
    521        IF(lO3Tfile) THEN; out=PTrop_chem(ih,it,itrp0,Pre_in,v2(:,:,1),Otrp_in(ih))
    522   ELSE IF(lO3Tpara) THEN; out=PTrop_chem(ih,it,itrp0,Pre_in,v2(:,:,1))
    523   ELSE                  ; out=PTrop_chem(ih,it,itrp0,Pre_in,v2(:,:,1),o3t0); END IF
    524   out=out/Pgnd_in(ih)
     448  REAL                 :: get_Sigtrop
     449!-------------------------------------------------------------------------------
     450  !--- Pressure at tropopause is read in the forcing file
     451  IF(lPrTrop) THEN                             !--- PrTrop KNOWN FROM FILE
     452    get_SigTrop=pt2(ih)/ps2(ih); RETURN
     453  END IF
     454  !--- Chemical tropopause definition is used using a particular threshold
     455  IF(lO3Trop) THEN                             !--- o3trop KNOWN FROM FILE
     456    get_SigTrop=chem_tropopause(ih,it,itrp0,pint_in,v2(:,:,1),pcen_in,ot2(ih))
     457  ELSE IF(lo3tp) THEN                          !--- o3trop PARAMETRIZATION
     458    get_SigTrop=chem_tropopause(ih,it,itrp0,pint_in,v2(:,:,1),pcen_in)
     459  ELSE                                         !--- o3trop CONSTANT
     460    get_SigTrop=chem_tropopause(ih,it,itrp0,pint_in,v2(:,:,1),pcen_in,o3t0)
     461  END IF
     462  get_SigTrop=get_SigTrop/ps2(ih)
    525463
    526464END FUNCTION get_SigTrop
     
    531469!-------------------------------------------------------------------------------
    532470!
    533 FUNCTION PTrop_chem(ih,it,it0,pres,o3,o3trop) RESULT(out)
     471FUNCTION chem_tropopause(ih,it,it0,pint,o3,pcen,o3trop)
    534472!
    535473!-------------------------------------------------------------------------------
     
    546484!-------------------------------------------------------------------------------
    547485! Arguments:
    548   REAL                        :: out           !--- Pressure at tropopause
     486  REAL ::                   chem_tropopause    !--- Pressure at tropopause
    549487  INTEGER,        INTENT(IN)  :: ih            !--- Horizontal index
    550488  INTEGER,        INTENT(OUT) :: it            !--- Index of tropopause layer
    551489  INTEGER,        INTENT(IN)  :: it0           !--- Idx: higher than tropopause
    552   REAL,           INTENT(IN)  :: pres(:)       !--- Pressure profile, increasing
     490  REAL,           INTENT(IN)  :: pint(:)       !--- Cells-interf Pr, increasing
    553491  REAL,           INTENT(IN)  :: o3(:,:)       !--- Ozone field (pptV)
     492  REAL, OPTIONAL, INTENT(IN)  :: pcen(:)       !--- Cells-center Pr, increasing
    554493  REAL, OPTIONAL, INTENT(IN)  :: o3trop        !--- Ozone at tropopause
    555494!-------------------------------------------------------------------------------
    556495! Local variables:
    557   REAL :: o3t                                  !--- Ozone concent. at tropopause
    558   REAL :: al                                   !--- Interpolation coefficient
    559   REAL :: coef                                 !--- Coeff of latitude modulation
     496  REAL    :: o3t                               !--- Ozone concent. at tropopause
     497  REAL    :: al                                !--- Interpolation coefficient
     498  REAL    :: coef                              !--- Coeff of latitude modulation
    560499  REAL, PARAMETER :: co3(3)=[91.,28.,20.]      !--- Coeff for o3 at tropopause
    561500!-------------------------------------------------------------------------------
     
    572511  it=it0; DO WHILE(o3(ih,it+1)>=o3t); it=it+1; END DO
    573512  al=(o3(ih,it)-o3t)/(o3(ih,it)-o3(ih,it+1))
    574   IF(Ploc=='C') out =      pres(it)**(1.-al) * pres(it+1)**al
    575   IF(Ploc=='I') out = SQRT(pres(it)**(1.-al) * pres(it+2)**al *pres(it+1))
    576   it = locate(pres(:), out)                    !--- pres(it)<Ptrop<pres(it+1)
    577 
    578 END FUNCTION PTrop_chem
    579 !
    580 !-------------------------------------------------------------------------------
    581 
    582 
    583 !-------------------------------------------------------------------------------
    584 !
    585 FUNCTION check_ozone(o3col, lon, lat, ilev0, layer, vmin, vmax) RESULT(out)
     513  IF(PRESENT(pcen)) THEN
     514    chem_tropopause =       pcen(it)**(1.-al) * pcen(it+1)**al
     515  ELSE
     516    chem_tropopause = SQRT( pint(it)**(1.-al) * pint(it+2)**al * pint(it+1) )
     517  END IF
     518  it = locate(pint(:), chem_tropopause)        !--- pint(it)<ptrop<pint(it+1)
     519
     520END FUNCTION chem_tropopause
     521!
     522!-------------------------------------------------------------------------------
     523
     524
     525!-------------------------------------------------------------------------------
     526!
     527FUNCTION check_ozone(o3col, lon, lat, ilev0, layer, vmin, vmax)
    586528!
    587529!-------------------------------------------------------------------------------
     
    589531!-------------------------------------------------------------------------------
    590532! Arguments:
    591   LOGICAL                      :: out          !--- .T. => some wrong values
     533  LOGICAL                      :: check_ozone      !--- .T. => some wrong values
    592534  REAL,             INTENT(IN) :: o3col(:), lon, lat
    593535  INTEGER,          INTENT(IN) :: ilev0
     
    605547  lmin=.FALSE.; IF(PRESENT(vmin)) lmin=COUNT(o3col<vmin)/=0
    606548  lmax=.FALSE.; IF(PRESENT(vmax)) lmax=COUNT(o3col>vmax)/=0
    607   out=lmin.OR.lmax; IF(.NOT.out.OR.prt_level>100) RETURN
     549  check_ozone=lmin.OR.lmax; IF(.NOT.check_ozone) RETURN
    608550
    609551  !--- SOME TOO LOW VALUES FOUND
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90

    r3356 r3411  
    381381     ALLOCATE (aerosol_name(nb_aer))
    382382     aerosol_name(1) = id_CIDUSTM_phy
    383   ELSEIF (flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     383  ELSEIF (flag_aerosol .EQ. 6) THEN
    384384     nb_aer = 13
    385385     ALLOCATE (aerosol_name(nb_aer))
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90

    r3356 r3411  
    507507     ALLOCATE (aerosol_name(nb_aer))
    508508     aerosol_name(1) = id_CIDUSTM_phy
    509   ELSEIF (flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     509  ELSEIF (flag_aerosol .EQ. 6) THEN
    510510     nb_aer = 13
    511511     ALLOCATE (aerosol_name(nb_aer))
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/aeropt_lw_rrtm.F90

    • Property svn:executable set to *
    r3356 r3411  
    4646  IF (ok_alw) THEN                                   !--aerosol LW effects
    4747   !
    48    IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6.OR.flag_aerosol.EQ.7) THEN  !-Dust
     48   IF (flag_aerosol.EQ.5.OR.flag_aerosol.EQ.6) THEN  !-Dust
    4949    !
    5050    zdh(:,:)=pdel(:,:)/(RG*zrho(:,:))      ! m
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90

    r3356 r3411  
    173173     !
    174174     ! Read and interpolate sulfate
    175      IF ( flag_aerosol .EQ. 1 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     175     IF ( flag_aerosol .EQ. 1 .OR. flag_aerosol .EQ. 6 ) THEN
    176176
    177177        CALL readaerosol_interp(id_ASSO4M_phy, itap, pdtphys, rjourvrai, debut, pplay, paprs, t_seri, sulfacc, sulfacc_pi,loadso4)
     
    182182
    183183     ! Read and interpolate bcsol and bcins
    184      IF ( flag_aerosol .EQ. 2 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     184     IF ( flag_aerosol .EQ. 2 .OR. flag_aerosol .EQ. 6 ) THEN
    185185
    186186        ! Get bc aerosol distribution
     
    195195
    196196     ! Read and interpolate pomsol and pomins
    197      IF ( flag_aerosol .EQ. 3 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     197     IF ( flag_aerosol .EQ. 3 .OR. flag_aerosol .EQ. 6 ) THEN
    198198
    199199        CALL readaerosol_interp(id_ASPOMM_phy, itap, pdtphys, rjourvrai, debut, pplay, paprs, t_seri, pomsol, pomsol_pi, load_tmp3)
     
    207207
    208208     ! Read and interpolate csssm, ssssm, assssm
    209      IF (flag_aerosol .EQ. 4 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     209     IF (flag_aerosol .EQ. 4 .OR. flag_aerosol .EQ. 6 ) THEN
    210210
    211211        CALL readaerosol_interp(id_SSSSM_phy ,itap, pdtphys,rjourvrai, &
     
    224224
    225225     ! Read and interpolate cidustm
    226      IF (flag_aerosol .EQ. 5 .OR. flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     226     IF (flag_aerosol .EQ. 5 .OR. flag_aerosol .EQ. 6 ) THEN
    227227
    228228        CALL readaerosol_interp(id_CIDUSTM_phy, itap, pdtphys, rjourvrai, debut, pplay, paprs, t_seri, cidust, cidust_pi, loaddust)
     
    234234     !
    235235     ! Read and interpolate asno3m, csno3m, cino3m
    236      IF (flag_aerosol .EQ. 6 .OR. flag_aerosol .EQ. 7 ) THEN
     236     IF (flag_aerosol .EQ. 6) THEN
    237237
    238238        CALL readaerosol_interp(id_ASNO3M_phy, itap, pdtphys, rjourvrai, &
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/recmwf_aero.F90

    r3356 r3411  
    2424!--end
    2525 & PFLUX,PFLUC,&
    26  & PFSDN ,PFSUP , PFSCDN , PFSCUP, PFSCCDN, PFSCCUP, PFLCCDN, PFLCCUP,&
     26 & PFSDN ,PFSUP , PFSCDN , PFSCUP,&
    2727!--OB diagnostics
    2828 & PTOPSWADAERO,PSOLSWADAERO,&
     
    8282! ok_ade---input-L- apply the Aerosol Direct Effect or not?
    8383! ok_aie---input-L- apply the Aerosol Indirect Effect or not?
    84 ! flag_aerosol-input-I- aerosol flag from 0 to 7
     84! flag_aerosol-input-I- aerosol flag from 0 to 6
    8585! flag_aerosol_strat-input-I- use stratospheric aerosols flag (T/F)
    8686! PPIZA_NAT  : (KPROMA,KLEV,NSW); Single scattering albedo of natural aerosol
     
    110110! PFSCDN(KPROMA,KLEV+1)         ; SW clear sky flux down
    111111! PFSCUP(KPROMA,KLEV+1)         ; SW clear sky flux up
    112 ! PFSCCDN(KPROMA,KLEV+1)        ; SW clear sky clean (no aerosol) flux down
    113 ! PFSCCUP(KPROMA,KLEV+1)        ; SW clear sky clean (no aerosol) flux up
    114 ! PFLCCDN(KPROMA,KLEV+1)        ; LW clear sky clean (no aerosol) flux down
    115 ! PFLCCUP(KPROMA,KLEV+1)        ; LW clear sky clean (no aerosol) flux up
    116112
    117113
     
    156152USE YOERDI   , ONLY : RRAE   ,REPCLC    ,REPH2O
    157153USE YOMARPHY , ONLY : LRDUST
    158 USE phys_output_mod, ONLY : swaerofree_diag, swaero_diag
     154USE phys_output_mod, ONLY : swaero_diag
    159155
    160156!-----------------------------------------------------------------------
     
    245241REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFSCDN(KPROMA,KLEV+1)  ! SW clear sky flux down
    246242REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFSCUP(KPROMA,KLEV+1)  ! SW clear sky flux up
    247 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFSCCDN(KPROMA,KLEV+1) ! SW clear sky clean (no aerosol) flux down
    248 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFSCCUP(KPROMA,KLEV+1) ! SW clear sky clean (no aerosol) flux up
    249 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFLCCDN(KPROMA,KLEV+1) ! LW clear sky clean (no aerosol) flux down
    250 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFLCCUP(KPROMA,KLEV+1) ! LW clear sky clean (no aerosol) flux up
    251243
    252244!     ==== COMPUTED IN RADITE ===
     
    615607
    616608! case with no aerosols at all is also computed IF ACTIVEFEEDBACK_ACTIVE is false
    617 IF (.not. AEROSOLFEEDBACK_ACTIVE .OR. flag_aerosol .EQ. 0 .OR. swaerofree_diag) THEN   
     609!IF (swaero_diag .OR. .not. AEROSOLFEEDBACK_ACTIVE .OR. flag_aerosol .EQ. 0 ) THEN   
     610IF (.not. AEROSOLFEEDBACK_ACTIVE .OR. flag_aerosol .EQ. 0 ) THEN   
    618611
    619612! ZERO aerosol effect
     
    782775ENDIF
    783776
    784 IF (swaerofree_diag) THEN
    785 ! copy shortwave clear-sky clean (no aerosol) case
    786   PFSCCUP(:,:) =   ZFSUP0_AERO(:,:,5)
    787   PFSCCDN(:,:) =   ZFSDN0_AERO(:,:,5)
    788 ! copy longwave clear-sky clean (no aerosol) case
    789   PFLCCUP(:,:) =   LWUP0_AERO(:,:,5)
    790   PFLCCDN(:,:) =   LWDN0_AERO(:,:,5)
    791 ENDIF
    792 
    793777!OB- HERE CHECK WITH MP IF BOTTOM AND TOP INDICES ARE OK !!!!!!!!!!!!!!!!!!
    794778! net anthropogenic forcing direct and 1st indirect effect diagnostics
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/suecrad.F90

    r3356 r3411  
    681681!    CALL GSTATS(667,0)     MPL 2.12.08
    682682    IF( NPROC > 1 )THEN
    683       stop 'Pas pret pour proc > 1'
     683      stop'Pas pret pour proc > 1'
    684684!     CALL MPL_BROADCAST (RADGRID%NDGLG,MTAGRAD,JPIOMASTER,CDSTRING='SUECRAD:')
    685685    ENDIF
     
    689689    ENDIF
    690690    IF( NPROC > 1 )THEN
    691       stop 'Pas pret pour proc > 1'
     691      stop'Pas pret pour proc > 1'
    692692!     CALL MPL_BROADCAST (RADGRID%NRGRI(1:RADGRID%NDGLG),MTAGRAD,JPIOMASTER,CDSTRING='SUECRAD:')
    693693    ENDIF
     
    864864        WRITE(NULOUT,'("RADGRID,BEGIN")')
    865865        IF( MYPROC /= 1 )THEN
    866           stop 'Pas pret pour proc > 1'
     866          stop'Pas pret pour proc > 1'
    867867!         CALL MPL_SEND(RADGRID%NGPTOT,KDEST=NPRCIDS(1),KTAG=1,CDSTRING='SUECRAD.R')
    868868!         CALL MPL_SEND(ZLATX(1:RADGRID%NGPTOT),KDEST=NPRCIDS(1),KTAG=2,CDSTRING='SUECRAD.R')
     
    876876              ENDDO
    877877            ELSE
    878               stop 'Pas pret pour proc > 1'
     878              stop'Pas pret pour proc > 1'
    879879!             CALL MPL_RECV(IGPTOT,KSOURCE=NPRCIDS(JROC),KTAG=1,CDSTRING='SUECRAD.M')
    880880!             CALL MPL_RECV(ZLATX(1:IGPTOT),KSOURCE=NPRCIDS(JROC),KTAG=2,CDSTRING='SUECRAD.M')
     
    904904        WRITE(NULOUT,'("MODELGRID,BEGIN")')
    905905        IF( MYPROC /= 1 )THEN
    906           stop 'Pas pret pour proc > 1'
     906          stop'Pas pret pour proc > 1'
    907907!         CALL MPL_SEND(NGPTOT,KDEST=NPRCIDS(1),KTAG=1,CDSTRING='SUECRAD')
    908908!         CALL MPL_SEND(ZLATX(1:NGPTOT),KDEST=NPRCIDS(1),KTAG=2,CDSTRING='SUECRAD')
     
    917917              ENDDO
    918918            ELSE
    919               stop 'Pas pret pour proc > 1'
     919              stop'Pas pret pour proc > 1'
    920920!             CALL MPL_RECV(IGPTOT,KSOURCE=NPRCIDS(JROC),KTAG=1,CDSTRING='SUECRAD')
    921921!             CALL MPL_RECV(ZLATX(1:IGPTOT),KSOURCE=NPRCIDS(JROC),KTAG=2,CDSTRING='SUECRAD')
     
    11661166        IWIDE(10)=NAROB1
    11671167        IF( MYPROC /= 1 )THEN
    1168           stop 'Pas pret pour proc > 1'
     1168          stop'Pas pret pour proc > 1'
    11691169!         CALL MPL_SEND(IWIDE(1:10),KDEST=NPRCIDS(1),KTAG=1,CDSTRING='SUECRAD.W')
    11701170        ENDIF
     
    11721172          DO JROC=1,NPROC
    11731173            IF( JROC /= MYPROC )THEN
    1174               stop 'Pas pret pour proc > 1'
     1174              stop'Pas pret pour proc > 1'
    11751175!             CALL MPL_RECV(IWIDE(1:10),KSOURCE=NPRCIDS(JROC),KTAG=1,CDSTRING='SUECRAD.W')
    11761176            ENDIF
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/susw15.F90

    r3356 r3411  
    5858
    5959IMPLICIT NONE
    60 REAL(KIND=JPRB),SAVE   :: ZPDH2O=0.8_JPRB
    61 REAL(KIND=JPRB),SAVE   :: ZPDUMG=0.75_JPRB
    62 REAL(KIND=JPRB),SAVE   :: ZPRH2O=30000._JPRB
    63 REAL(KIND=JPRB),SAVE   :: ZPRUMG=30000._JPRB
     60REAL(KIND=JPRB)   :: ZPDH2O=0.8_JPRB
     61REAL(KIND=JPRB)   :: ZPDUMG=0.75_JPRB
     62REAL(KIND=JPRB)   :: ZPRH2O=30000._JPRB
     63REAL(KIND=JPRB)   :: ZPRUMG=30000._JPRB
    6464
    6565!$OMP THREADPRIVATE(zpdh2o,zpdumg,zprh2o,zprumg)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/stratosphere_mask.F90

    r3356 r3411  
    22! $Id$
    33!
    4 SUBROUTINE stratosphere_mask(missing_val, pphis, t_seri, pplay, xlat)
     4SUBROUTINE stratosphere_mask(missing_val, t_seri, pplay, xlat)
    55
    66!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    88! determination of tropopause height and temperature from gridded temperature data
    99!
    10 ! reference: Reichler, T., M. Dameris, and R. Sausen (GRL, 10.1029/2003GL018240, 2003)
     10! reference: Reichler, T., M. Dameris, and R. Sausen (2003):
    1111! modified: 6/28/06 tjr
    1212! adapted to LMDZ by C. Kleinschmitt (2016-02-15)
    13 ! committed to LMDz by O. Boucher (2016) with a mistake
    14 ! mistake corrected by O. Boucher (2017-12-11)
    15 !
    16 ! input:  temp(nlon,nlat,nlev)  3D-temperature field
    17 !         ps(nlon,nlat)         2D-surface pressure field
    18 !         zs(nlon,nlat)         2D-surface height
    19 !         nlon                  grid points in x
    20 !         nlat                  grid points in y
    21 !         pfull(nlon,nlat,nlev) full pressure levels in Pa
    22 !         plimu                 upper limit for tropopause pressure
    23 !         pliml                 lower limit for tropopause pressure
    24 !         gamma                 tropopause criterion, e.g. -0.002 K/m
    25 !
    26 ! output: p_tropopause(klon)    tropopause pressure in Pa with missing values
    27 !         t_tropopause(klon)    tropopause temperature in K with missing values
    28 !         z_tropopause(klon)    tropopause height in m with missing values
    29 !         stratomask            stratospheric mask withtout missing values
    30 !         ifil                  # of undetermined values
     13!
     14! input:    temp(nlon,nlat,nlev)    3D-temperature field
     15!       ps(nlon,nlat)       2D-surface pressure field
     16!       zs(nlon,nlat)       2D-surface height
     17!       nlon            grid points in x
     18!       nlat            grid points in y
     19!       pfull(nlon,nlat,nlev)   full pressure levels in Pa
     20!       plimu           upper limit for tropopause pressure
     21!       pliml           lower limit for tropopause pressure
     22!       gamma           tropopause criterion, e.g. -0.002 K/m
     23!
     24! output:   p_tropopause(klon)     tropopause pressure in Pa with missing values
     25!           t_tropopause(klon)     tropopause temperature in K with missing values
     26!           z_tropopause(klon)     tropopause height in m with missing values
     27!           stratomask             stratospheric mask withtout missing values
     28!           ifil                  # of undetermined values
    3129!
    3230!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    3937IMPLICIT NONE
    4038
    41 INCLUDE "YOMCST.h"
    42 
    4339REAL, INTENT(IN)                       :: missing_val ! missing value, also XIOS
    44 REAL,DIMENSION(klon),INTENT(IN)        :: pphis   ! Geopotentiel de surface
    4540REAL,DIMENSION(klon,klev),INTENT(IN)   :: t_seri  ! Temperature
    4641REAL,DIMENSION(klon,klev),INTENT(IN)   :: pplay   ! pression pour le mileu de chaque couche (en Pa)
     
    6560  ENDDO
    6661  psrf=pplay(i,1)
    67   zsrf=pphis(i)/RG           !--altitude de la surface
     62  zsrf=0.0
    6863  call twmo(missing_val, klev, t, p, psrf, zsrf, plimu, pliml, gamma, ptrp, ttrp, ztrp)
    6964  tp(i)=ptrp
     
    109104subroutine twmo(missing_val, level, t, p, ps, zs, plimu, pliml, gamma, ptrp, ttrp, ztrp)
    110105
    111 ! reference: Reichler, T., M. Dameris, and R. Sausen (GRL, 10.1029/2003GL018240, 2003)
    112 
    113106implicit none
    114107
     
    135128ztrp=missing_val
    136129
    137 faktor = -RG/RD
     130faktor = -RG/R
    138131
    139132do j=level,2,-1
     
    225218TDLNP = TDLNP + TM*DLNP
    226219
    227 ZTRP = ZS + TDLNP*RD/RG
    228 
    229 !!if (ZTRP .lt. 0) then
    230 !!  print*,'ZTRP=',ZTRP
    231 !!  print*,'PS=',PS
    232 !!  print*,'P=',P
    233 !!  print*,'T=',T
    234 !!  print*,'ZS=',ZS
    235 !!  stop
    236 !!endif
     220ZTRP = ZS + TDLNP*R/RG
     221
     222if (ZTRP .lt. 0) then
     223  print*,ZTRP
     224  print*,PS
     225  print*,P
     226  print*,T
     227  print*,ZS
     228  stop
     229endif
    237230
    238231return
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/suphel.F90

    r3356 r3411  
    33
    44SUBROUTINE suphel
    5 
    6   IMPLICIT NONE
    75
    86  include "YOMCST.h"
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_land_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_land_orchidee_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_land_orchidee_nofrein_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_land_orchidee_noz0h_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_landice_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_ocean_mod.F90

    • Property svn:executable set to *
    r3356 r3411  
    185185!--old parametrizations of ocean surface albedo
    186186!
    187     IF (iflag_cycle_diurne.GE.1) THEN
     187    IF (cycle_diurne) THEN
    188188!
    189189       CALL alboc_cd(rmu0,alb_eau)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surf_seaice_mod.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/surface_data.F90

    • Property svn:executable set to *
    r3356 r3411  
    44MODULE surface_data
    55
    6   IMPLICIT NONE
    7 
    86  REAL, PARAMETER        :: calice=1.0/(5.1444e+06*0.15)
     7  REAL, PARAMETER        :: tau_gl=86400.*5.
    98  REAL, PARAMETER        :: calsno=1./(2.3867e+06*.15)
    109 
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/tend_to_tke.F90

    r3356 r3411  
    3232!**************************************************************************************
    3333
    34  SUBROUTINE tend_to_tke(dt,plev,exner,temp,windu,windv,dt_a,du_a,dv_a,pctsrf,tke)
     34 SUBROUTINE tend_to_tke(dt,plev,exner,temp,windu,windv,dt_a,du_a,dv_a,tke)
    3535
    3636 USE dimphy, ONLY: klon, klev
    3737 USE indice_sol_mod, ONLY: nbsrf
    38 
    39 IMPLICIT NONE
    4038#include "YOMCST.h"
    4139
     
    5553  REAL du_a(klon,klev)      ! Zonal wind speed tendency [m/s], grid-cell average or for a one subsurface
    5654  REAL dv_a(klon,klev)      ! Meridional wind speed tendency [m/s], grid-cell average or for a one subsurface
    57   REAL pctsrf(klon,nbsrf+1)       ! Turbulent Kinetic energy [m2/s2], grid-cell average or for a subsurface
    5855
    5956! Inputs/Outputs
    6057!---------------
    61   REAL tke(klon,klev+1,nbsrf+1)       ! Turbulent Kinetic energy [m2/s2], grid-cell average or for a subsurface
     58  REAL tke(klon,klev,nbsrf)       ! Turbulent Kinetic energy [m2/s2], grid-cell average or for a subsurface
    6259
    6360
     
    6663
    6764
    68   INTEGER i,k,isrf                 ! indices
     65  INTEGER ig,k,isrf                 ! indices
    6966  REAL    masse(klon,klev)          ! mass in the layers [kg/m2]
    7067  REAL    unsmasse(klon,klev+1)     ! linear mass in the layers [kg/m2]
     
    124121 DO isrf=1,nbsrf
    125122    DO k=1,klev
    126        DO i=1,klon
    127           IF (pctsrf(i,isrf)>0.) THEN
    128             tke(i,k,isrf)= tke(i,k,isrf)+tendu(i,k)+tendv(i,k)+tendt(i,k)
    129             tke(i,k,isrf)= max(tke(i,k,isrf),1.e-10)
    130           ENDIF
    131        ENDDO
     123       tke(:,k,isrf)= tke(:,k,isrf)+tendu(:,k)+tendv(:,k)+tendt(:,k)
     124       tke(:,k,isrf)= max(tke(:,k,isrf),1.e-10)
    132125    ENDDO
    133126 ENDDO
     127
     128! dtke_t(:,:)=tendt(:,:)
     129! dtke_u(:,:)=tendu(:,:)
     130! dtke_v(:,:)=tendv(:,:)
    134131
    135132
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/thermcell.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/thermcell_condens.F90

    r3356 r3411  
    2424REAL RLvCp
    2525REAL, SAVE :: DDT0=.01
    26   !$OMP THREADPRIVATE(DDT0)
    27 
    2826LOGICAL afaire(klon),tout_converge
    2927
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/thermcell_flux2.F90

    • Property svn:executable set to *
    r3356 r3411  
    4747      REAL f_old,ddd0,eee0,ddd,eee,zzz
    4848
    49       REAL,SAVE :: fomass_max=0.5
    50       REAL,SAVE :: alphamax=0.7
    51 !$OMP THREADPRIVATE(fomass_max,alphamax)
     49      REAL fomass_max,alphamax
     50      save fomass_max,alphamax
    5251
    5352      logical check_debug,labort_physic
     
    5655      character (len=80) :: abort_message
    5756
     57      fomass_max=0.5
     58      alphamax=0.7
    5859
    5960      ncorecfm1=0
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/thermcell_plume.F90

    r3356 r3411  
    1212!--------------------------------------------------------------------------
    1313USE IOIPSL, ONLY : getin
    14 USE ioipsl_getin_p_mod, ONLY : getin_p
    1514
    1615       USE print_control_mod, ONLY: prt_level
     
    9796      REAL fact_gamma,fact_gamma2,fact_epsilon2
    9897
    99       REAL, SAVE :: fact_epsilon=0.002
    100       REAL, SAVE :: betalpha=0.9
    101       REAL, SAVE :: afact=2./3.
    102       REAL, SAVE :: fact_shell=1.
    103       REAL,SAVE :: detr_min=1.e-5
    104       REAL,SAVE :: entr_min=1.e-5
    105       REAL,SAVE :: detr_q_coef=0.012
    106       REAL,SAVE :: detr_q_power=0.5
    107       REAL,SAVE :: mix0=0.
    108       INTEGER,SAVE :: thermals_flag_alim=0
     98      REAL, SAVE :: fact_epsilon, fact_epsilon_omp=0.002
     99      REAL, SAVE :: betalpha, betalpha_omp=0.9
     100      REAL, SAVE :: afact, afact_omp=2./3.
     101      REAL, SAVE :: fact_shell, fact_shell_omp=1.
     102      REAL,SAVE :: detr_min,detr_min_omp=1.e-5
     103      REAL,SAVE :: entr_min,entr_min_omp=1.e-5
     104      REAL,SAVE :: detr_q_coef,detr_q_coef_omp=0.012
     105      REAL,SAVE :: detr_q_power,detr_q_power_omp=0.5
     106      REAL,SAVE :: mix0,mix0_omp=0.
     107      INTEGER,SAVE :: thermals_flag_alim,thermals_flag_alim_omp=0
    109108
    110109!$OMP THREADPRIVATE(fact_epsilon, betalpha, afact, fact_shell)
     
    113112
    114113      LOGICAL, SAVE :: first=.true.
    115   !$OMP THREADPRIVATE(first)
    116 
    117114
    118115      REAL c2(ngrid,klev)
     
    124121      RLvCp = RLVTT/RCPD
    125122      IF (first) THEN
    126 
    127      CALL getin_p('thermals_fact_epsilon',fact_epsilon)
    128      CALL getin_p('thermals_betalpha',betalpha)
    129      CALL getin_p('thermals_afact',afact)
    130      CALL getin_p('thermals_fact_shell',fact_shell)
    131      CALL getin_p('thermals_detr_min',detr_min)
    132      CALL getin_p('thermals_entr_min',entr_min)
    133      CALL getin_p('thermals_detr_q_coef',detr_q_coef)
    134      CALL getin_p('thermals_detr_q_power',detr_q_power)
    135      CALL getin_p('thermals_mix0',mix0)
    136      CALL getin_p('thermals_flag_alim',thermals_flag_alim)
    137 
     123     !$OMP MASTER
     124! FH : if ok_sync=.true. , the time axis is written at each time step
     125! in the output files. Only at the end in the opposite case
     126     CALL getin('thermals_fact_epsilon',fact_epsilon_omp)
     127     CALL getin('thermals_betalpha',betalpha_omp)
     128     CALL getin('thermals_afact',afact_omp)
     129     CALL getin('thermals_fact_shell',fact_shell_omp)
     130     CALL getin('thermals_detr_min',detr_min_omp)
     131     CALL getin('thermals_entr_min',entr_min_omp)
     132     CALL getin('thermals_detr_q_coef',detr_q_coef_omp)
     133     CALL getin('thermals_detr_q_power',detr_q_power_omp)
     134     CALL getin('thermals_mix0',mix0_omp)
     135     CALL getin('thermals_flag_alim',thermals_flag_alim_omp)
     136!    CALL getin('thermals_X',X_omp)
     137!    X=X_omp
     138     !$OMP END MASTER
     139     !$OMP BARRIER
     140     fact_epsilon=fact_epsilon_omp
     141     betalpha=betalpha_omp
     142     afact=afact_omp
     143     fact_shell=fact_shell_omp
     144     detr_min=detr_min_omp
     145     entr_min=entr_min_omp
     146     detr_q_coef=detr_q_coef_omp
     147     detr_q_power=detr_q_power_omp
     148     mix0=mix0_omp
     149     thermals_flag_alim=thermals_flag_alim_omp
    138150
    139151      first=.false.
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/thermcell_qsat.F90

    r3356 r3411  
    2323logical Zsat
    2424REAL RLvCp
    25 
    2625REAL, SAVE :: DDT0=.01
    27 !$OMP THREADPRIVATE(DDT0)
    28 
    2926LOGICAL afaire(klon),tout_converge
    3027
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/tracreprobus_mod.F90

    r3356 r3411  
    7272          WRITE(*,*)it,'nqtot',nqtot,'nbtr',nbtr
    7373          IF (it < nqtot) THEN
    74              WRITE(*,*)'iciav',it,nqtot
     74             WRITE(*,*)'ici',it,nqtot
    7575#ifdef REPROBUS
    76              CALL minmaxqfi_chimie(it,tr_seri(1,1,it),0.,1.e10,'avant chimie ')
     76             CALL minmaxqfi_chimie(tr_seri(1,1,it),0.,1.e10,'avant chimie ')
    7777#endif
    78              WRITE(*,*)iter,'avpres'
     78             WRITE(*,*)'apres'
    7979          ENDIF
    8080       ENDDO
     
    9494       ! pdel, pdt_rep, daynum : definit dans phytrac et utilise dans chemmain
    9595       !                 et transporte par CHEM_REP
    96 
    97        DO it=1, nbtr
    98 !     WRITE(lunout,*)it,' ',minval(tr_seri(:,:,it)),maxval(tr_seri(:,:,it))
    99 ! seulement pour les especes chimiques (pas l'age de l'air)
    100 ! verif valeurs extremes
    101 ! correction: a 1.e-30 quand =0 ou negatif et
    102 ! call abort si >ou= 1.e10
    103           WRITE(*,*)it,'nqtot',nqtot,'nbtr',nbtr
    104           IF (it < nqtot) THEN
    105              WRITE(*,*)'iciap',it,nqtot
    106              CALL minmaxqfi_chimie(it,tr_seri(1,1,it),0.,1.e10,'apres chemmain')
    107              WRITE(*,*)iter,'appres'
    108           ENDIF
    109        ENDDO
    110 
    11196#endif       
    11297       
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/transp.F90

    r3356 r3411  
    11
    2 ! $Id$
     2! $Header$
    33
    4 SUBROUTINE transp(paprs, tsol, t, q, ql, qs, u, v, geom, vtran_e, vtran_q, utran_e, &
    5     utran_q, vtran_w, utran_w)
     4SUBROUTINE transp(paprs, tsol, t, q, u, v, geom, vtran_e, vtran_q, utran_e, &
     5    utran_q)
    66
    77  USE dimphy
     
    1616
    1717  REAL paprs(klon, klev+1), tsol(klon)
    18   REAL t(klon, klev), q(klon, klev), ql(klon, klev), qs(klon, klev)
    19   REAL u(klon, klev), v(klon, klev)
     18  REAL t(klon, klev), q(klon, klev), u(klon, klev), v(klon, klev)
    2019  REAL utran_e(klon), utran_q(klon), vtran_e(klon), vtran_q(klon)
    21   REAL utran_w(klon), vtran_w(klon)
    2220
    2321  INTEGER i, l
     
    3028    vtran_e(i) = 0.0
    3129    vtran_q(i) = 0.0
    32     utran_w(i) = 0.0
    33     vtran_w(i) = 0.0
    3430  END DO
    3531
    3632  DO l = 1, klev
    3733    DO i = 1, klon
    38 !      e = rcpd*t(i, l) + rlvtt*q(i, l) + geom(i, l)
    39       e = rcpd*t(i, l) + geom(i, l)
     34      e = rcpd*t(i, l) + rlvtt*q(i, l) + geom(i, l)
    4035      utran_e(i) = utran_e(i) + u(i, l)*e*(paprs(i,l)-paprs(i,l+1))/rg
    4136      utran_q(i) = utran_q(i) + u(i, l)*q(i, l)*(paprs(i,l)-paprs(i,l+1))/rg
    42       utran_w(i) = utran_w(i) + u(i, l)*(q(i, l)+ql(i, l)+qs(i, l))           &
    43                                        *(paprs(i,l)-paprs(i,l+1))/rg
    4437      vtran_e(i) = vtran_e(i) + v(i, l)*e*(paprs(i,l)-paprs(i,l+1))/rg
    4538      vtran_q(i) = vtran_q(i) + v(i, l)*q(i, l)*(paprs(i,l)-paprs(i,l+1))/rg
    46       vtran_w(i) = vtran_w(i) + v(i, l)*(q(i, l)+ql(i, l)+qs(i, l))           &
    47                                        *(paprs(i,l)-paprs(i,l+1))/rg
    4839    END DO
    4940  END DO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/transp_lay.F90

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/tropopause_m.F90

    r3356 r3411  
    99!-------------------------------------------------------------------------------
    1010!
    11 FUNCTION dyn_tropopause(t, ts, paprs, pplay, rot, itrop, thet0, pvor0)
     11FUNCTION dyn_tropopause(t, ts, paprs, pplay, rot, thet0, pvor0)
    1212!
    1313!-------------------------------------------------------------------------------
     
    2626  REAL, INTENT(IN)  ::  pplay(:,:) !--- Cells-centers pressure
    2727  REAL, INTENT(IN)  ::    rot(:,:) !--- Cells-centers relative vorticity
    28   INTEGER, INTENT(OUT), OPTIONAL :: itrop(klon) !--- Last tropospheric layer idx
    29   REAL,    INTENT(IN),  OPTIONAL :: thet0, pvor0
     28  REAL, INTENT(IN), OPTIONAL :: thet0, pvor0
    3029!-------------------------------------------------------------------------------
    3130! Local variables:
    3231  include "YOMCST.h"
    33   REAL, PARAMETER :: DynPTrMin =8.E+3 !--- Thresholds for minimum and maximum
    34   REAL, PARAMETER :: DynPTrMax =4.E+4 !    dynamical tropopause pressure (Pa).
    3532  CHARACTER(LEN=80)  :: sub
    3633  INTEGER :: i, k, kb, kt, kp, ib, ie, nw
     
    103100    dyn_tropopause(i) = MAX( pplay(i,kp+1)*(pplay(i,kp)/pplay(i,kp+1))**al,    &
    104101                            dyn_tropopause(i) )
    105     !--- UNREALISTIC VALUES DETECTION
    106     IF(dyn_tropopause(i)<DynPTrMin.OR.dyn_tropopause(i)>DynPTrMax) THEN
    107       dyn_tropopause(i)=MIN(MAX(dyn_tropopause(i),DynPTrMax),DynPTrMin)
    108       DO kt=1,klev-1; IF(pplay(i,kt+1)>dyn_tropopause(i)) EXIT; END DO; kp=kt
    109     END IF
    110     !--- LAST TROPOSPHERIC LAYER INDEX NEEDED
    111     IF(PRESENT(itrop)) itrop(i)=MAX(kt,kp)
    112102  END DO
    113103
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/wake.F90

    r3356 r3411  
    44SUBROUTINE wake(znatsurf, p, ph, pi, dtime, &
    55                te0, qe0, omgb, &
    6                 dtdwn, dqdwn, amdwn, amup, dta, dqa, wgen, &
    7                 sigd_con, Cin, &
    8                 deltatw, deltaqw, sigmaw, awdens, wdens, &                  ! state variables
     6                dtdwn, dqdwn, amdwn, amup, dta, dqa, &
     7                sigd_con, &
     8                deltatw, deltaqw, sigmaw, wdens, &                          ! state variables
    99                dth, hw, wape, fip, gfl, &
    1010                dtls, dqls, ktopw, omgbdth, dp_omgb, tu, qu, &
    1111                dtke, dqke, omg, dp_deltomg, spread, cstar, &
    1212                d_deltat_gw, &
    13                 d_deltatw2, d_deltaqw2, d_sigmaw2, d_awdens2, d_wdens2)     ! tendencies
     13                d_deltatw2, d_deltaqw2, d_sigmaw2, d_wdens2)                ! tendencies
    1414
    1515
     
    4848  ! dtls : large scale temperature tendency due to wake
    4949  ! dqls : large scale humidity tendency due to wake
    50   ! hw   : wake top hight (given by hw*deltatw(1)/2=wape)
     50  ! hw   : hauteur de la poche
    5151  ! dp_omgb : vertical gradient of large scale omega
    52   ! awdens  : densite de poches actives
    5352  ! wdens   : densite de poches
    5453  ! omgbdth: flux of Delta_Theta transported by LS omega
     
    7372  ! dta  : source de chaleur due courants satures et detrain  (K/s)
    7473  ! dqa  : source d'humidite due aux courants satures et detra (kg/kg/s)
    75   ! wgen : number of wakes generated per unit area and per sec (/m^2/s)
    7674  ! amdwn: flux de masse total des descentes, par unite de
    77   !        surface de la maille (kg/m2/s)
     75  ! surface de la maille (kg/m2/s)
    7876  ! amup : flux de masse total des ascendances, par unite de
    79   !        surface de la maille (kg/m2/s)
    80   ! sigd_con:
    81   ! Cin  : convective inhibition
     77  ! surface de la maille (kg/m2/s)
    8278  ! p    : pressions aux milieux des couches (Pa)
    8379  ! ph   : pressions aux interfaces (Pa)
     
    109105  ! deltatw0   : deltatw initial
    110106  ! deltaqw0   : deltaqw initial
    111   ! hw0    : wake top hight (defined as the altitude at which deltatw=0)
     107  ! hw0    : hw initial
     108  ! sigmaw0: sigmaw initial
    112109  ! amflux : horizontal mass flux through wake boundary
    113110  ! wdens_ref: initial number of wakes per unit area (3D) or per
     
    136133  REAL, DIMENSION (klon, klev),     INTENT(IN)          :: amdwn, amup
    137134  REAL, DIMENSION (klon, klev),     INTENT(IN)          :: dta, dqa
    138   REAL, DIMENSION (klon),           INTENT(IN)          :: wgen
    139135  REAL, DIMENSION (klon),           INTENT(IN)          :: sigd_con
    140   REAL, DIMENSION (klon),           INTENT(IN)          :: Cin
    141136
    142137  !
     
    145140  REAL, DIMENSION (klon, klev),     INTENT(INOUT)       :: deltatw, deltaqw
    146141  REAL, DIMENSION (klon),           INTENT(INOUT)       :: sigmaw
    147   REAL, DIMENSION (klon),           INTENT(INOUT)       :: awdens
    148142  REAL, DIMENSION (klon),           INTENT(INOUT)       :: wdens
    149143
     
    155149  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: dtls, dqls
    156150  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: dtke, dqke
    157   REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: spread    !  unused (jyg)
     151  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: spread
    158152  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: omgbdth, omg
    159153  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: dp_omgb, dp_deltomg
     
    163157  ! Tendencies of state variables
    164158  REAL, DIMENSION (klon, klev),     INTENT(OUT)         :: d_deltatw2, d_deltaqw2
    165   REAL, DIMENSION (klon),           INTENT(OUT)         :: d_sigmaw2, d_awdens2, d_wdens2
     159  REAL, DIMENSION (klon),           INTENT(OUT)         :: d_sigmaw2, d_wdens2
    166160
    167161  ! Variables internes
     
    171165  INTEGER, SAVE                                         :: igout
    172166  !$OMP THREADPRIVATE(igout)
     167  REAL                                                  :: alon
    173168  LOGICAL, SAVE                                         :: first = .TRUE.
    174169  !$OMP THREADPRIVATE(first)
     
    181176  !$OMP THREADPRIVATE(stark, wdens_ref, coefgw, alpk, crep_upper, crep_sol)
    182177
    183   REAL, SAVE                                            :: tau_cv
    184   !$OMP THREADPRIVATE(tau_cv)
    185   REAL, SAVE                                            :: rzero, aa0 ! minimal wake radius and area
    186   !$OMP THREADPRIVATE(rzero, aa0)
    187 
    188178  LOGICAL, SAVE                                         :: flag_wk_check_trgl
    189179  !$OMP THREADPRIVATE(flag_wk_check_trgl)
    190180  INTEGER, SAVE                                         :: iflag_wk_check_trgl
    191181  !$OMP THREADPRIVATE(iflag_wk_check_trgl)
    192   INTEGER, SAVE                                         :: iflag_wk_pop_dyn
    193   !$OMP THREADPRIVATE(iflag_wk_pop_dyn)
    194182
    195183  REAL                                                  :: delta_t_min
    196184  INTEGER                                               :: nsub
    197185  REAL                                                  :: dtimesub
    198   REAL                                                  :: wdensmin
    199   REAL, SAVE                                            :: sigmad, hwmin, wapecut, cstart
    200   !$OMP THREADPRIVATE(sigmad, hwmin, wapecut, cstart)
     186  REAL                                                  :: sigmad, hwmin, wapecut
    201187  REAL                                                  :: sigmaw_max
    202188  REAL                                                  :: dens_rate
     
    209195  REAL, DIMENSION (klon, klev)                          :: deltaqw0
    210196  REAL, DIMENSION (klon, klev)                          :: te, qe
     197  REAL, DIMENSION (klon)                                :: sigmaw0
    211198!!  REAL, DIMENSION (klon)                                :: sigmaw1
    212 
    213   ! Variables liees a la dynamique de population
    214   REAL, DIMENSION(klon)                                 :: act
    215   REAL, DIMENSION(klon)                                 :: rad_wk, tau_wk_inv
    216   REAL, DIMENSION(klon)                                 :: f_shear
    217   REAL, DIMENSION(klon)                                 :: drdt
    218   REAL, DIMENSION(klon)                                 :: d_sig_gen, d_sig_death, d_sig_col
    219   REAL, DIMENSION(klon)                                 :: wape1_act, wape2_act
    220   LOGICAL, DIMENSION (klon)                             :: kill_wake
    221   INTEGER, SAVE                                         :: iflag_wk_act
    222   !$OMP THREADPRIVATE(iflag_wk_act)
    223   REAL                                                  :: drdt_pos
    224   REAL                                                  :: tau_wk_inv_min
    225199
    226200  ! Variables pour les GW
     
    230204  REAL, DIMENSION (klon, klev)                          :: tgw
    231205
    232   ! Variables liees au calcul de hw
     206  ! Variables liées au calcul de hw
    233207  REAL, DIMENSION (klon)                                :: ptop_provis, ptop, ptop_new
    234208  REAL, DIMENSION (klon)                                :: sum_dth
     
    237211  INTEGER, DIMENSION (klon)                             :: ktop, kupper
    238212
    239   ! Variables liees au test de la forme triangulaire du profil de Delta_theta
     213  ! Variables liées au test de la forme triangulaire du profil de Delta_theta
    240214  REAL, DIMENSION (klon)                                :: sum_half_dth
    241215  REAL, DIMENSION (klon)                                :: dz_half
     
    244218  REAL, DIMENSION (klon, klev)                          :: d_deltatw, d_deltaqw
    245219  REAL, DIMENSION (klon, klev)                          :: d_te, d_qe
    246   REAL, DIMENSION (klon)                                :: d_awdens, d_wdens
    247220  REAL, DIMENSION (klon)                                :: d_sigmaw, alpha
    248221  REAL, DIMENSION (klon)                                :: q0_min, q1_min
     
    255228  INTEGER                                               ::isubstep, k, i
    256229
    257   REAL                                                  :: wdens_targ
    258230  REAL                                                  :: sigmaw_targ
    259231
     
    301273  REAL, DIMENSION (klon, klev)                          :: detr
    302274
    303   REAL, DIMENSION(klon)                                 :: sigmaw_in             ! pour les prints
    304   REAL, DIMENSION(klon)                                 :: awdens_in, wdens_in   ! pour les prints
     275  REAL, DIMENSION(klon)                                 :: sigmaw_in   ! pour les prints
    305276
    306277  ! -------------------------------------------------------------------------
     
    313284  ! -------------------------------------------------------------------------
    314285
    315 !!  DATA wapecut, sigmad, hwmin/5., .02, 10./
    316   DATA wapecut, sigmad, hwmin/1., .02, 10./
    317 !!  DATA wdensmin/1.e-12/
    318   DATA wdensmin/1.e-14/
     286  DATA wapecut, sigmad, hwmin/5., .02, 10./
    319287  ! cc nrlmd
    320288  DATA sigmaw_max/0.4/
    321289  DATA dens_rate/0.1/
    322   DATA rzero /5000./
    323290  ! cc
    324291  ! Longueur de maille (en m)
     
    326293
    327294  ! ALON = 3.e5
    328   ! alon = 1.E6
    329 
    330   !  Provisionnal; to be suppressed when f_shear is parameterized
    331   f_shear(:) = 1.       ! 0. for strong shear, 1. for weak shear
     295  alon = 1.E6
    332296
    333297
     
    336300  ! coefgw : Coefficient pour les ondes de gravité
    337301  ! stark : Coefficient k dans Cstar=k*sqrt(2*WAPE)
    338   ! wdens : Densité surfacique de poche froide
     302  ! wdens : Densité de poche froide par maille
    339303  ! -------------------------------------------------------------------------
    340304
     
    357321  crep_sol = 1.0
    358322
    359   aa0 = 3.14*rzero*rzero
    360 
    361   tau_cv = 4000.
    362 
    363323  ! cc nrlmd Lecture du fichier wake_param.data
    364324  stark=0.33
    365325  CALL getin_p('stark',stark)
    366   cstart = stark*sqrt(2.*wapecut)
    367 
    368326  alpk=0.25
    369327  CALL getin_p('alpk',alpk)
     
    376334  CALL getin_p('wdens_ref_l',wdens_ref(2))    !wake number per unit area ; land
    377335!>jyg
    378   iflag_wk_pop_dyn = 0
    379   CALL getin_p('iflag_wk_pop_dyn',iflag_wk_pop_dyn) ! switch between wdens prescribed
    380                                                     ! and wdens prognostic
    381   iflag_wk_act = 0
    382   CALL getin_p('iflag_wk_act',iflag_wk_act) ! 0: act(:)=0.
    383                                             ! 1: act(:)=1.
    384                                             ! 2: act(:)=f(Wape)
    385336  coefgw=4.
    386337  CALL getin_p('coefgw',coefgw)
     
    393344  WRITE(*,*) 'wdens_ref_l=', wdens_ref(2)
    394345!>jyg
    395   WRITE(*,*) 'iflag_wk_pop_dyn=',iflag_wk_pop_dyn
    396   WRITE(*,*) 'iflag_wk_act',iflag_wk_act
    397346  WRITE(*,*) 'coefgw=', coefgw
    398347
     
    408357 endif
    409358
    410  IF (iflag_wk_pop_dyn == 0) THEN
    411359  ! Initialisation de toutes des densites a wdens_ref.
    412360  ! Les densites peuvent evoluer si les poches debordent
    413361  ! (voir au tout debut de la boucle sur les substeps)
    414   !jyg<
    415   !!  wdens(:) = wdens_ref
    416    DO i = 1,klon
    417      wdens(i) = wdens_ref(znatsurf(i)+1)
    418    ENDDO
    419   !>jyg
    420  ENDIF  ! (iflag_wk_pop_dyn == 0)
     362!jyg<
     363!!  wdens(:) = wdens_ref
     364  DO i = 1,klon
     365    wdens(i) = wdens_ref(znatsurf(i)+1)
     366  ENDDO
     367!>jyg
    421368
    422369  ! print*,'stark',stark
     
    468415      d_deltatw2(:,:) = 0.
    469416      d_deltaqw2(:,:) = 0.
    470 
    471       IF (iflag_wk_act == 0) THEN
    472         act(:) = 0.
    473       ELSEIF (iflag_wk_act == 1) THEN
    474         act(:) = 1.
    475       ENDIF
    476 
    477417!!  DO i = 1, klon
    478418!!   sigmaw_in(i) = sigmaw(i)
     
    485425  ! print*, 'sigmaw,sigd_con', sigmaw, sigd_con
    486426  ! ENDIF
    487   IF (iflag_wk_pop_dyn >=1) THEN
    488     DO i = 1, klon
    489       wdens_targ = max(wdens(i),wdensmin)
    490       d_wdens2(i) = wdens_targ - wdens(i)
    491       wdens(i) = wdens_targ
    492     END DO
    493   ELSE
    494     DO i = 1, klon
    495       d_awdens2(i) = 0.
    496       d_wdens2(i) = 0.
    497     END DO
    498   ENDIF  ! (iflag_wk_pop_dyn >=1)
    499 !
    500427  DO i = 1, klon
    501428    ! c      sigmaw(i) = amax1(sigmaw(i),sigd_con(i))
     
    507434    sigmaw(i) = sigmaw_targ
    508435!>jyg
    509   END DO
    510 
    511 !
    512   IF (iflag_wk_pop_dyn >= 1) THEN
    513     awdens_in(:) = awdens(:)
    514     wdens_in(:) = wdens(:)
    515 !!    wdens(:) = wdens(:) + wgen(:)*dtime
    516 !!    d_wdens2(:) = wgen(:)*dtime
    517 !!  ELSE
    518   ENDIF  ! (iflag_wk_pop_dyn >= 1)
    519 
    520   wape(:) = 0.
    521   wape2(:) = 0.
    522   d_sigmaw(:) = 0.
    523   ktopw(:) = 0
     436    sigmaw0(i) = sigmaw(i)
     437    wape(i) = 0.
     438    wape2(i) = 0.
     439    d_sigmaw(i) = 0.
     440    d_wdens2(i) = 0.
     441    ktopw(i) = 0
     442  END DO
    524443!
    525444!<jyg
     
    914833      gwake(i) = .FALSE.
    915834    ELSE
    916       hw(i) = hw0(i)
    917835      cstar(i) = stark*sqrt(2.*wape(i))
    918836      gwake(i) = .TRUE.
     
    973891    ! cc           On calcule pour cela une densité wdens0 pour laquelle on
    974892    ! aurait un entrainement nul ---
    975     !jyg<
    976     ! Dans la configuration avec wdens prognostique, il s'agit d'un cas ou
    977     ! les poches sont insuffisantes pour accueillir tout le flux de masse
    978     ! des descentes unsaturees. Nous faisons alors l'hypothese que la
    979     ! convection profonde cree directement de nouvelles poches, sans passer
    980     ! par les thermiques. La nouvelle valeur de wdens est alors imposée.
    981 
    982893    DO i = 1, klon
    983894      ! c       print *,' isubstep,wk_adv(i),cstar(i),wape(i) ',
     
    988899        wdens0 = (sigmaw(i)/(4.*3.14))* &
    989900          ((1.-sigmaw(i))*omg(i,kupper(i)+1)/((ph(i,1)-pupper(i))*cstar(i)))**(2)
    990         IF (prt_level >= 10) THEN
    991              print*,'omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i), ph(i,1)-pupper(i)', &
    992                      omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i), ph(i,1)-pupper(i)
    993         ENDIF
    994901        IF (wdens(i)<=wdens0*1.1) THEN
    995           IF (iflag_wk_pop_dyn >= 1) THEN
    996              d_wdens2(i) = d_wdens2(i) + wdens0 - wdens(i)
    997           ENDIF
    998902          wdens(i) = wdens0
    999903        END IF
    1000       END IF
    1001     END DO
     904        ! c        print*,'omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i)
     905        ! c     $     ,ph(i,1)-pupper(i)',
     906        ! c     $             omg(i,kupper(i)+1),wdens0,wdens(i),cstar(i)
     907        ! c     $     ,ph(i,1)-pupper(i)
     908      END IF
     909    END DO
     910
     911    ! cc nrlmd
    1002912
    1003913    DO i = 1, klon
    1004914      IF (wk_adv(i)) THEN
    1005915        gfl(i) = 2.*sqrt(3.14*wdens(i)*sigmaw(i))
    1006         rad_wk(i) = sqrt(sigmaw(i)/(3.14*wdens(i)))
    1007916!jyg<
    1008917!!        sigmaw(i) = amin1(sigmaw(i), sigmaw_max)
     
    1014923    END DO
    1015924
    1016     IF (iflag_wk_pop_dyn >= 1) THEN
    1017 
    1018       IF (iflag_wk_act ==2) THEN
    1019       DO i = 1, klon
    1020         IF (wk_adv(i)) THEN
    1021           wape1_act(i) = abs(cin(i))
    1022           wape2_act(i) = 2.*wape1_act(i) + 1.
    1023           act(i) = min(1., max(0., (wape(i)-wape1_act(i)) / (wape2_act(i)-wape1_act(i)) ))
    1024         ENDIF  ! (wk_adv(i))
    1025       ENDDO
    1026       ENDIF  ! (iflag_wk_act ==2)
    1027 
    1028 
    1029       DO i = 1, klon
    1030         IF (wk_adv(i)) THEN
    1031 !!          tau_wk(i) = max(rad_wk(i)/(3.*cstar(i))*((cstar(i)/cstart)**1.5 - 1), 100.)
    1032           tau_wk_inv(i) = max( (3.*cstar(i))/(rad_wk(i)*((cstar(i)/cstart)**1.5 - 1)), 0.)
    1033           tau_wk_inv_min = min(tau_wk_inv(i), 1./dtimesub)
    1034           drdt(i) = (cstar(i) - wgen(i)*(sigmaw(i)/wdens(i)-aa0)/gfl(i)) / &
    1035                     (1 + 2*f_shear(i)*(2.*sigmaw(i)-aa0*wdens(i)) - 2.*sigmaw(i))
    1036 !!                    (1 - 2*sigmaw(i)*(1.-f_shear(i)))
    1037           drdt_pos=max(drdt(i),0.)
    1038 
    1039 !!          d_wdens(i) = ( wgen(i)*(1.+2.*(sigmaw(i)-sigmad)) &
    1040 !!                     - wdens(i)*tau_wk_inv_min &
    1041 !!                     - 2.*gfl(i)*wdens(i)*Cstar(i) )*dtimesub
    1042           d_awdens(i) = ( wgen(i) - (1./tau_cv)*(awdens(i) - act(i)*wdens(i)) )*dtimesub
    1043           d_wdens(i) = ( wgen(i) - (wdens(i)-awdens(i))*tau_wk_inv_min -  &
    1044                          2.*wdens(i)*gfl(i)*drdt_pos )*dtimesub
    1045           d_wdens(i) = max(d_wdens(i), wdensmin-wdens(i))
    1046 
    1047 !!          d_sigmaw(i) = ( (1.-2*f_shear(i)*sigmaw(i))*(gfl(i)*Cstar(i)+wgen(i)*sigmad/wdens(i)) &
    1048 !!                      + 2.*f_shear(i)*wgen(i)*sigmaw(i)**2/wdens(i) &
    1049 !!                      - sigmaw(i)*tau_wk_inv_min )*dtimesub
    1050           d_sig_gen(i) = wgen(i)*aa0
    1051           d_sig_death(i) = - sigmaw(i)*(1.-awdens(i)/wdens(i))*tau_wk_inv_min
    1052 !!          d_sig_col(i) = - 2*f_shear(i)*sigmaw(i)*gfl(i)*drdt_pos
    1053           d_sig_col(i) = - 2*f_shear(i)*(2.*sigmaw(i)-wdens(i)*aa0)*gfl(i)*drdt_pos
    1054           d_sigmaw(i) = ( d_sig_gen(i) + d_sig_death(i) + d_sig_col(i) + gfl(i)*cstar(i) )*dtimesub
    1055           d_sigmaw(i) = max(d_sigmaw(i), sigmad-sigmaw(i))
    1056         ENDIF
    1057       ENDDO
    1058 
    1059       IF (prt_level >= 10) THEN
    1060         print *,'wake, cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), drdt(1) ', &
    1061                        cstar(1), cstar(1)/cstart, rad_wk(1), tau_wk_inv(1), drdt(1)
    1062         print *,'wake, wdens(1), awdens(1), act(1), d_awdens(1) ', &
    1063                        wdens(1), awdens(1), act(1), d_awdens(1)
    1064         print *,'wake, wgen, -(wdens-awdens)*tau_wk_inv, -2.*wdens*gfl*drdt_pos, d_wdens ', &
    1065                        wgen(1), -(wdens(1)-awdens(1))*tau_wk_inv(1), -2.*wdens(1)*gfl(1)*drdt_pos, d_wdens(1)
    1066         print *,'wake, d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1) ', &
    1067                        d_sig_gen(1), d_sig_death(1), d_sig_col(1), d_sigmaw(1)
    1068       ENDIF
    1069    
    1070     ELSE  !  (iflag_wk_pop_dyn >= 1)
    1071 
    1072     ! cc nrlmd
    1073 
    1074       DO i = 1, klon
    1075         IF (wk_adv(i)) THEN
    1076           ! cc nrlmd          Introduction du taux de mortalité des poches et
    1077           ! test sur sigmaw_max=0.4
    1078           ! cc         d_sigmaw(i) = gfl(i)*Cstar(i)*dtimesub
    1079           IF (sigmaw(i)>=sigmaw_max) THEN
    1080             death_rate(i) = gfl(i)*cstar(i)/sigmaw(i)
    1081           ELSE
    1082             death_rate(i) = 0.
    1083           END IF
    1084    
    1085           d_sigmaw(i) = gfl(i)*cstar(i)*dtimesub - death_rate(i)*sigmaw(i)* &
    1086             dtimesub
    1087           ! $              - nat_rate(i)*sigmaw(i)*dtimesub
    1088           ! c        print*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
    1089           ! c     $  death_rate(i),ktop(i),kupper(i)',
    1090           ! c     $              d_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
    1091           ! c     $  death_rate(i),ktop(i),kupper(i)
    1092    
    1093           ! sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub
    1094           ! sigmaw(i) =min(sigmaw(i),0.99)     !!!!!!!!
    1095           ! wdens = wdens0/(10.*sigmaw)
    1096           ! sigmaw =max(sigmaw,sigd_con)
    1097           ! sigmaw =max(sigmaw,sigmad)
    1098         END IF
    1099       END DO
    1100 
    1101     ENDIF   !  (iflag_wk_pop_dyn >= 1)
    1102 
     925    DO i = 1, klon
     926      IF (wk_adv(i)) THEN
     927        ! cc nrlmd          Introduction du taux de mortalité des poches et
     928        ! test sur sigmaw_max=0.4
     929        ! cc         d_sigmaw(i) = gfl(i)*Cstar(i)*dtimesub
     930        IF (sigmaw(i)>=sigmaw_max) THEN
     931          death_rate(i) = gfl(i)*cstar(i)/sigmaw(i)
     932        ELSE
     933          death_rate(i) = 0.
     934        END IF
     935
     936        d_sigmaw(i) = gfl(i)*cstar(i)*dtimesub - death_rate(i)*sigmaw(i)* &
     937          dtimesub
     938        ! $              - nat_rate(i)*sigmaw(i)*dtimesub
     939        ! c        print*, 'd_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
     940        ! c     $  death_rate(i),ktop(i),kupper(i)',
     941        ! c     $                d_sigmaw(i),sigmaw(i),gfl(i),Cstar(i),wape(i),
     942        ! c     $  death_rate(i),ktop(i),kupper(i)
     943
     944        ! sigmaw(i) =sigmaw(i) + gfl(i)*Cstar(i)*dtimesub
     945        ! sigmaw(i) =min(sigmaw(i),0.99)     !!!!!!!!
     946        ! wdens = wdens0/(10.*sigmaw)
     947        ! sigmaw =max(sigmaw,sigd_con)
     948        ! sigmaw =max(sigmaw,sigmad)
     949      END IF
     950    END DO
    1103951
    1104952    ! calcul de la difference de vitesse verticale poche - zone non perturbee
     
    13751223
    13761224    ! Increment state variables
    1377 !jyg<
    1378     IF (iflag_wk_pop_dyn >= 1) THEN
    1379       DO k = 1, klev
    1380         DO i = 1, klon
    1381           IF (wk_adv(i) .AND. k<=kupper(i)) THEN
    1382             detr(i,k) = - d_sig_death(i) - d_sig_col(i)     
    1383             entr(i,k) = d_sig_gen(i)
    1384           ENDIF
    1385         ENDDO
    1386       ENDDO
    1387       ELSE  ! (iflag_wk_pop_dyn >= 1)
    1388       DO k = 1, klev
    1389         DO i = 1, klon
    1390           IF (wk_adv(i) .AND. k<=kupper(i)) THEN
    1391             detr(i, k) = 0.
    1392    
    1393             entr(i, k) = 0.
    1394           ENDIF
    1395         ENDDO
    1396       ENDDO
    1397     ENDIF  ! (iflag_wk_pop_dyn >= 1)
    1398 
    1399    
    14001225
    14011226    DO k = 1, klev
     
    14391264          ! cc nrlmd          Prise en compte du taux de mortalité
    14401265          ! cc               Définitions de entr, detr
    1441 !jyg<
    1442 !!            detr(i, k) = 0.
    1443 !!   
    1444 !!            entr(i, k) = detr(i, k) + gfl(i)*cstar(i) + &
    1445 !!              sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k)
    1446 !!
    1447             entr(i, k) = entr(i,k) + gfl(i)*cstar(i) + &
    1448                          sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k)   
    1449 !>jyg
    1450             spread(i, k) = (entr(i,k)-detr(i,k))/sigmaw(i)
    1451 
     1266          detr(i, k) = 0.
     1267
     1268          entr(i, k) = detr(i, k) + gfl(i)*cstar(i) + &
     1269            sigmaw(i)*(1.-sigmaw(i))*dp_deltomg(i, k)
     1270
     1271          spread(i, k) = (entr(i,k)-detr(i,k))/sigmaw(i)
    14521272          ! cc        spread(i,k) =
    14531273          ! (1.-sigmaw(i))*dp_deltomg(i,k)+gfl(i)*Cstar(i)/
     
    15641384      END DO
    15651385    END DO
    1566 !
    15671386    DO i = 1, klon
    15681387      IF (wk_adv(i)) THEN
    15691388        sigmaw(i) = sigmaw(i) + d_sigmaw(i)
     1389!jyg<
    15701390        d_sigmaw2(i) = d_sigmaw2(i) + d_sigmaw(i)
    1571       END IF
    1572     END DO
    1573 !jyg<
    1574     IF (iflag_wk_pop_dyn >= 1) THEN
    1575       DO i = 1, klon
    1576         IF (wk_adv(i)) THEN
    1577           awdens(i) = awdens(i) + d_awdens(i)
    1578           wdens(i) = wdens(i) + d_wdens(i)
    1579           d_awdens2(i) = d_awdens2(i) + d_awdens(i)
    1580           d_wdens2(i) = d_wdens2(i) + d_wdens(i)
    1581         END IF
    1582       END DO
    1583       DO i = 1, klon
    1584         IF (wk_adv(i)) THEN
    1585           wdens_targ = max(wdens(i),wdensmin)
    1586           d_wdens2(i) = d_wdens2(i) + wdens_targ - wdens(i)
    1587           wdens(i) = wdens_targ
    1588 !
    1589           wdens_targ = min( max(awdens(i),0.), wdens(i) )
    1590           d_awdens2(i) = d_awdens2(i) + wdens_targ - awdens(i)
    1591           awdens(i) = wdens_targ
    1592         END IF
    1593       END DO
    1594       DO i = 1, klon
    1595         IF (wk_adv(i)) THEN
    1596           sigmaw_targ = max(sigmaw(i),sigmad)
    1597           d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i)
    1598           sigmaw(i) = sigmaw_targ
    1599         END IF
    1600       END DO
    1601     ENDIF  ! (iflag_wk_pop_dyn >= 1)
    16021391!>jyg
     1392      END IF
     1393    END DO
    16031394
    16041395
     
    21101901  ! ENDDO
    21111902  ! cc
    2112 
    2113   !jyg<
    2114   IF (iflag_wk_pop_dyn >= 1) THEN
    2115     DO i = 1, klon
    2116       kill_wake(i) = ((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. &
    2117           .NOT. ok_qx_qw(i) .OR. (wdens(i) < 2.*wdensmin)
    2118     ENDDO
    2119   ELSE  ! (iflag_wk_pop_dyn >= 1)
    2120     DO i = 1, klon
    2121       kill_wake(i) = ((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. &
    2122           .NOT. ok_qx_qw(i)
    2123     ENDDO
    2124   ENDIF  ! (iflag_wk_pop_dyn >= 1)
    2125   !>jyg
    2126 
    21271903  DO k = 1, klev
    21281904    DO i = 1, klon
    2129 !!jyg      IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. &
    2130 !!jyg          .NOT. ok_qx_qw(i)) THEN
    2131       IF (kill_wake(i)) THEN
     1905
     1906      ! cc nrlmd      On maintient désormais constant sigmaw en régime
     1907      ! permanent
     1908      ! cc      IF ((sigmaw(i).GT.sigmaw_max).or.
     1909      IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=1.0)) .OR. (ktopw(i)<=2) .OR. &
     1910          .NOT. ok_qx_qw(i)) THEN
    21321911        ! cc
    21331912        dtls(i, k) = 0.
     
    21371916        d_deltatw2(i,k) = -deltatw0(i,k)
    21381917        d_deltaqw2(i,k) = -deltaqw0(i,k)
    2139       END IF  ! (kill_wake(i))
    2140     END DO
    2141   END DO
    2142 
    2143   DO i = 1, klon
    2144 !!jyg    IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=wapecut)) .OR. (ktopw(i)<=2) .OR. &
    2145 !!jyg        .NOT. ok_qx_qw(i)) THEN
    2146       IF (kill_wake(i)) THEN
     1918      END IF
     1919    END DO
     1920  END DO
     1921
     1922  ! cc nrlmd      On maintient désormais constant sigmaw en régime permanent
     1923  DO i = 1, klon
     1924    IF (((wape(i)>=wape2(i)) .AND. (wape2(i)<=1.0)) .OR. (ktopw(i)<=2) .OR. &
     1925        .NOT. ok_qx_qw(i)) THEN
    21471926      ktopw(i) = 0
    21481927      wape(i) = 0.
    21491928      cstar(i) = 0.
    2150 !!jyg   Outside subroutine "Wake" hw, wdens and sigmaw are zero when there are no wakes
     1929!!jyg   Outside subroutine "Wake" hw and sigmaw are zero when there are no wakes
    21511930!!      hw(i) = hwmin                       !jyg
    21521931!!      sigmaw(i) = sigmad                  !jyg
    21531932      hw(i) = 0.                            !jyg
     1933      sigmaw(i) = 0.                        !jyg
    21541934      fip(i) = 0.
    2155 !!      sigmaw(i) = 0.                        !jyg
    2156       sigmaw_targ = 0.
    2157       d_sigmaw2(i) = d_sigmaw2(i) + sigmaw_targ - sigmaw(i)
    2158       sigmaw(i) = sigmaw_targ
    2159       IF (iflag_wk_pop_dyn >= 1) THEN
    2160 !!        awdens(i) = 0.
    2161 !!        wdens(i) = 0.
    2162         wdens_targ = 0.
    2163         d_wdens2(i) = wdens_targ - wdens(i)
    2164         wdens(i) = wdens_targ
    2165         wdens_targ = 0.
    2166         d_awdens2(i) = wdens_targ - awdens(i)
    2167         awdens(i) = wdens_targ
    2168       ENDIF  ! (iflag_wk_pop_dyn >= 1)
    2169     ELSE  ! (kill_wake(i))
     1935    ELSE
    21701936      wape(i) = wape2(i)
    21711937      cstar(i) = cstar2(i)
    2172     END IF  ! (kill_wake(i))
     1938    END IF
    21731939    ! c        print*,'wape wape2 ktopw OK_qx_qw =',
    21741940    ! c     $          wape(i),wape2(i),ktopw(i),OK_qx_qw(i)
     
    22061972  DO i = 1, klon
    22071973    d_sigmaw2(i) = d_sigmaw2(i)/dtime
    2208     d_awdens2(i) = d_awdens2(i)/dtime
    22091974    d_wdens2(i) = d_wdens2(i)/dtime
    22101975  ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/write_bilKP_ave.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/write_bilKP_ins.h

    • Property svn:executable set to *
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/yamada4.F90

    r3356 r3411  
    117117  REAL aa(klon, klev+1), aa0, aa1
    118118  INTEGER nlay, nlev
    119 
     119  LOGICAL first
     120  INTEGER ipas
     121  SAVE first, ipas
     122  ! FH/IM     data first,ipas/.true.,0/
     123  DATA first, ipas/.FALSE., 0/
     124  !$OMP THREADPRIVATE( first,ipas)
    120125  LOGICAL,SAVE :: hboville=.TRUE.
    121126  REAL,SAVE :: viscom,viscoh
     
    131136  INTEGER iter
    132137  REAL dissip(klon,klev), tkeprov,tkeexp, shear(klon,klev), buoy(klon,klev)
    133   REAL :: disseff
    134 
    135138  REAL,SAVE :: ric0,ric,rifc, b1, kap
    136139  !$OMP THREADPRIVATE(ric0,ric,rifc,b1,kap)
     
    144147  !$OMP THREADPRIVATE(new_yamada4,yamada4_num)
    145148  REAL, SAVE :: yun,ydeux
     149  REAL :: disseff
    146150  !$OMP THREADPRIVATE(yun,ydeux)
    147 
    148151  REAL frif, falpha, fsm
    149152  REAL rino(klon, klev+1), smyam(klon, klev), styam(klon, klev), &
     
    222225  nlay = klev
    223226  nlev = klev + 1
     227  ipas = ipas + 1
    224228
    225229
     
    655659
    656660! Ajout d'une viscosite moleculaire
    657    km(1:ngrid,2:klev)=km(1:ngrid,2:klev)+viscom
    658    kn(1:ngrid,2:klev)=kn(1:ngrid,2:klev)+viscoh
    659    kq(1:ngrid,2:klev)=kq(1:ngrid,2:klev)+viscoh
     661   km(:,:)=km(:,:)+viscom
     662   kn(:,:)=kn(:,:)+viscoh
     663   kq(:,:)=kq(:,:)+viscoh
    660664
    661665  IF (prt_level>1) THEN
     
    721725!============================================================================
    722726
     727  first = .FALSE.
    723728  RETURN
    724729
     
    969974 REAL     hlim(klon)
    970975 REAL, SAVE :: kap=0.4,kapb=0.4
    971   !$OMP THREADPRIVATE(kap,kapb)
    972976 REAL zq
    973977 REAL sq(klon), sqz(klon)
  • LMDZ6/branches/DYNAMICO-conv/makelmdz

    r3356 r3411  
    7575  fi
    7676fi
    77 #COSP_PATH=$LMDGCM/.void_dir
     77COSP_PATH=$LMDGCM/.void_dir
    7878
    7979
     
    311311
    312312# get ar command from arch.fcm file
    313 archfileline=$( grep -i '^%AR ' arch.fcm )
     313archfileline=$( grep -i '^%AR' arch.fcm )
    314314arcommand=$( echo ${archfileline##%AR} )
    315 
    316 # get ar command options from arch.fcm file
    317 archfileline=$( grep -i '^%ARFLAGS' arch.fcm )
    318 arflags=$( echo ${archfileline##%ARFLAGS} )
    319315
    320316# get make utility from arch.fcm file
     
    464460   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
    465461   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    466    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     462   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
    467463elif [[ $io == xios ]]
    468464then
     
    470466   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
    471467   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    472    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     468   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
    473469fi
    474470
     
    476472then
    477473   CPP_KEY="$CPP_KEY CPP_COSP"
    478 #   COSP_PATH="$LIBFGCM/phylmd/cosp"
    479    src_dirs="$src_dirs phy${physique}/cosp"
     474   COSP_PATH="$LIBFGCM/phylmd/cosp"
     475   src_dirs="$src_dirs cosp"
    480476#   LIB="${LIB} -l${LIBPREFIX}cosp"
    481 #  opt_dep="$opt_dep cosp"
    482 #  lcosp="-l${LIBPREFIX}cosp"
    483    INCLUDE="$INCLUDE"' -I$(LIBF)/'phy${physique}'/cosp'
     477   opt_dep="$opt_dep cosp"
     478   lcosp="-l${LIBPREFIX}cosp"
     479   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
    484480fi
    485481
     
    768764MOD_SUFFIX="mod" \
    769765AR=$arcommand \
    770 ARFLAGS="$arflags" \
    771766DIRMAIN=$dirmain \
    772767SOURCE=$source_code \
     
    801796MOD_SUFFIX="mod" \
    802797AR=$arcommand \
    803 ARFLAGS="$arflags" \
    804798DIRMAIN=$dirmain \
    805799SOURCE=$source_code \
  • LMDZ6/branches/DYNAMICO-conv/makelmdz_fcm

    r3356 r3411  
    429429   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
    430430   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    431    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     431   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
    432432elif [[ $io == xios ]]
    433433then
     
    435435   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
    436436   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    437    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios -l${LIBPREFIX}stdc++"
     437   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
    438438fi
    439439
Note: See TracChangeset for help on using the changeset viewer.