Changeset 3851 for LMDZ6/branches
- Timestamp:
- Feb 22, 2021, 12:44:07 PM (3 years ago)
- Location:
- LMDZ6/branches/LMDZ-tracers
- Files:
-
- 5 deleted
- 77 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ-tracers
- Property svn:mergeinfo changed
-
LMDZ6/branches/LMDZ-tracers/DefLists/CMIP6_ping_atmos.xml
r3484 r3851 155 155 <field id="CMIP6_loadss" field_ref="loadss" /> <!-- P1 (kg m-2) atmosphere_mass_content_of_seasalt_dry_aerosol : Load of Seasalt --> 156 156 <field id="CMIP6_longitude" field_ref="dummy_not_provided" /> <!-- P1 (degrees_east) longitude : Longitude --> 157 <!--field id="CMIP6_lwsffluxaero" field_ref="sollwad" --> <!-- 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 with ok_volcan=y--> 157 158 <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 159 <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 --> … … 161 162 <field id="CMIP6_lwtoacsaer" field_ref="toplwad0" /> <!-- P1 (W m-2) toa_instantaneous_longwave_forcing : Clear-Sky LW-RF Aerosols at TOA --> 162 163 <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 --> 164 <!-- field id="CMIP6_lwtoafluxaerocs" field_ref="toplwad0" --> <!-- 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 with ok_volcan=y --> 163 165 <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 166 <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. --> … … 282 284 <field id="CMIP6_snwc" field_ref="dummy_not_provided" /> <!-- P1 (kg m-2) canopy_snow_amount : canopy_snow_amount --> 283 285 <field id="CMIP6_solbnd" field_ref="solbnd" /> <!-- P1 (W m-2) solar_irradiance : Top-of-Atmosphere Solar Insolation for each band --> 286 <!-- field id="CMIP6_swsffluxaero" field_ref="solswad" --> <!-- 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 with ok_volcan=y--> 284 287 <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 --> 285 288 <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 --> … … 287 290 <field id="CMIP6_swtoaasdust" field_ref="dummy_not_provided" /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : all sky sw-rf dust at toa --> 288 291 <field id="CMIP6_swtoacsdust" field_ref="dummy_not_provided" /> <!-- P1 (W m-2) toa_instantaneous_shortwave_forcing : clear sky sw-rf dust at toa --> 292 <!-- field id="CMIP6_swtoafluxaerocs" field_ref="topswad0" --> <!-- 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 with ok_volcan=y--> 289 293 <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 --> 290 294 <field id="CMIP6_sza" field_ref="sza" /> <!-- P1 (degree) solar_zenith_angle : solar zenith angle --> -
LMDZ6/branches/LMDZ-tracers/DefLists/field_def_cosp1.xml
r3653 r3851 1 <field_group operation="average" freq_offset="0ts" freq_op="3h"> <!-- ----------------------------COSP------------------------ -->1 <field_group operation="average" freq_offset="0ts" freq_op="3h"> 2 2 3 3 <field_group id="fields_COSP_CALIPSO_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h"> … … 6 6 <field id="clmcalipso" long_name="Lidar Mid-level Cloud Fraction" unit="1" detect_missing_value=".true." /> 7 7 <field id="cltcalipso" long_name="Lidar Total Cloud Fraction" unit="1" detect_missing_value=".true." /> 8 <field id="pcllcalipso" long_name="Lidar Low-level Cloud Fraction" unit="%" detect_missing_value=".true." > cllcalipso*100 </field>9 <field id="pclhcalipso" long_name="Lidar Hight-level Cloud Fraction" unit="%" detect_missing_value=".true." > clhcalipso*100 </field>10 <field id="pclmcalipso" long_name="Lidar Mid-level Cloud Fraction" unit="%" detect_missing_value=".true." > clmcalipso*100 </field>11 <field id="pcltcalipso" long_name="Lidar Total Cloud Fraction" unit="%" detect_missing_value=".true." > cltcalipso*100 </field>12 8 <field id="cllcalipsoice" long_name="Lidar Ice-Phase Low-level Cloud Fraction" unit="1" detect_missing_value=".true." /> 13 9 <field id="clhcalipsoice" long_name="Lidar Ice-Phase Hight-level Cloud Fraction" unit="1" detect_missing_value=".true." /> … … 28 24 <field_group id="fields_COSP_CALIPSO_3D_height" grid_ref="grid_glo_height" freq_offset="0ts" freq_op="3h"> 29 25 <field id="clcalipso" long_name="Lidar Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> 30 <field id="pclcalipso" long_name="Lidar Cloud Fraction (532 nm)" unit="%" detect_missing_value=".true." > clcalipso*100 </field>31 26 <field id="clcalipsoice" long_name="Lidar Ice-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> 32 27 <field id="clcalipsoliq" long_name="Lidar Liq-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> -
LMDZ6/branches/LMDZ-tracers/DefLists/field_def_cospv2.xml
r3653 r3851 1 <field_group operation=" average" freq_offset="0ts" freq_op="3h"> <!-- ----------------------------COSP------------------------ -->1 <field_group operation="instant" freq_offset="0ts" freq_op="3h"> 2 2 3 3 <field_group id="fields_COSP_LIDAR_2D" grid_ref="grid_glo" freq_offset="0ts" freq_op="3h"> … … 7 7 <field id="clmcalipso" long_name="CALIPSO Mid-level Cloud Fraction" unit="1" detect_missing_value=".true." /> 8 8 <field id="cltcalipso" long_name="CALIPSO Total Cloud Fraction" unit="1" detect_missing_value=".true." /> 9 <field id="pcllcalipso" long_name="CALIPSO Low-level Cloud Fraction" unit="%" detect_missing_value=".true." > cllcalipso*100 </field>10 <field id="pclhcalipso" long_name="CALIPSO High-level Cloud Fraction" unit="%" detect_missing_value=".true." > clhcalipso*100 </field>11 <field id="pclmcalipso" long_name="CALIPSO Mid-level Cloud Fraction" unit="%" detect_missing_value=".true." > clmcalipso*100 </field>12 <field id="pcltcalipso" long_name="CALIPSO Total Cloud Fraction" unit="%" detect_missing_value=".true." > cltcalipso*100 </field>13 9 <field id="cllcalipsoice" long_name="CALIPSO Ice-Phase Low-level Cloud Fraction" unit="1" detect_missing_value=".true." /> 14 10 <field id="clhcalipsoice" long_name="CALIPSO Ice-Phase Hight-level Cloud Fraction" unit="1" detect_missing_value=".true." /> … … 50 46 <!-- CALIPSO 3D --> 51 47 <field id="clcalipso" long_name="CALIPSO Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> 52 <field id="pclcalipso" long_name="CALIPSO Cloud Fraction (532 nm)" unit="%" detect_missing_value=".true." > clcalipso*100 </field>53 48 <field id="clcalipsoice" long_name="CALIPSO Ice-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> 54 49 <field id="clcalipsoliq" long_name="CALIPSO Liq-Phase Cloud Fraction (532 nm)" unit="1" detect_missing_value=".true." /> … … 163 158 <field id="modis_ot_vs_reffliq" long_name="MODIS Joint-PDF of optical-depth and liquid particle size" unit="1" freq_offset="0ts" freq_op="3h" grid_ref="grid4Dreffl" detect_missing_value=".true." /> 164 159 165 </field_group> <!-- ----------------------------COSP------------------------ -->160 </field_group> -
LMDZ6/branches/LMDZ-tracers/DefLists/field_def_lmdz.xml
r3702 r3851 56 56 <field id="t2m_oce" long_name="Temp 2m oce" unit="K" /> 57 57 <field id="t2m_sic" long_name="Temp 2m sic" unit="K" /> 58 <field id="nt2mout" long_name="nt2m hors intervalle, calc.complet" unit="-" /> 59 <field id="nq2mout" long_name="nq2m hors intervalle, calc. complet" unit="-" /> 60 <field id="nu2mout" long_name="nu2m hors intervalle, calc. complet" unit="-" /> 61 <field id="nt2moutfg" long_name="nt2m hors intervalle, calc. complet/fg" unit="-" /> 62 <field id="nq2moutfg" long_name="nq2m hors intervalle, calc. complet/fg" unit="-" /> 63 <field id="nu2moutfg" long_name="nu2m hors intervalle, calc. complet/fg" unit="-" /> 58 64 <field id="t2m_probsup25" field_ref="t2m" long_name="Prob. t2m exceeds 25 degC" unit="-"> t2m > 298.15 </field> 59 65 <field id="t2m_probsup28" field_ref="t2m" long_name="Prob. t2m exceeds 28 degC" unit="-"> t2m > 301.15 </field> … … 142 148 <field id="SWdnSFCclr" long_name="SWdn clear sky at surface" unit="W/m2" /> 143 149 <field id="SWdnSFCcleanclr" long_name="SWdn clean (no aerosol) clear sky at surface" unit="W/m2" /> 150 <field id="fdiffSWdnSFC" long_name="Fraction of diffuse SWdn at surface" unit="-" /> 144 151 <field id="LWupSFC" long_name="Upwd. IR rad. at surface" unit="W/m2" /> 145 152 <field id="LWupSFCclr" long_name="CS Upwd. IR rad. at surface" unit="W/m2" /> … … 521 528 <field id="flx_co2_ff" long_name="CO2 flux from ff" unit="kg CO2/m2/s" /> <!-- Added OB --> 522 529 <field id="flx_co2_bb" long_name="CO2 flux from bb" unit="kg CO2/m2/s" /> <!-- Added OB --> 530 <field id="delta_SST" long_name="ocean-air interface temperature minus bulk SST" unit="K" detect_missing_value=".true." /> 531 <field id="delta_sal" 532 long_name="ocean-air interface salinity minus bulk salinity" 533 unit="ppt" detect_missing_value=".true." /> 534 <field id="dS_ns" long_name="delta salinity near surface" unit="ppt" detect_missing_value=".true." /> 535 <field id="dT_ns" long_name="sub-skin temperature minus foundation temperature" unit="K" detect_missing_value=".true." /> 536 <field id="dTer" long_name="interface temperature minus sub-skin temperature" unit="K" detect_missing_value=".true." /> 537 <field id="dSer" 538 long_name="salinity variation in the diffusive microlayer" 539 unit="ppt" detect_missing_value=".true." /> 540 <field id="tkt" long_name="thickness of thermal microlayer" unit="m" detect_missing_value=".true." /> 541 <field id="tks" long_name="thickness of salinity microlayer" unit="m" detect_missing_value=".true." /> 542 <field id="taur" long_name="momentum flux due to rain" unit="Pa" detect_missing_value=".true." /> 543 <field id="SSS" long_name="bulk sea-surface salinity" unit="ppt" detect_missing_value=".true." /> 523 544 </field_group> 524 545 525 546 <field_group id="fields_3D" grid_ref="grid_glo_presnivs" > 526 547 <field id="tke" long_name="TKE" unit="m2/s2" /> 548 <field id="tke_dissip" long_name="TKE DISSIPATION" unit="m2/s3" /> 527 549 <field id="tke_ter" long_name="Max Turb. Kinetic Energy ter" unit="m2/s2" /> 528 550 <field id="tke_lic" long_name="Max Turb. Kinetic Energy lic" unit="m2/s2" /> … … 584 606 <field id="rneblsvol" long_name="LS Cloud fraction by volume" unit="-" /> 585 607 <field id="rhum" long_name="Relative humidity" unit="-" /> 608 <field id="rhl" long_name="Relative humidity wrt liquid" unit="%" /> 609 <field id="rhi" long_name="Relative humidity wrt ice" unit="%" /> 586 610 <field id="ozone" long_name="Ozone mole fraction" unit="-" /> 587 611 <field id="ozone_daylight" long_name="Daylight ozone mole fraction" unit="-" /> -
LMDZ6/branches/LMDZ-tracers/DefLists/file_def_histdayCOSP_lmdz.xml
r3653 r3851 10 10 <field field_ref="clhcalipso" level="5" grid_ref="grid_out"/> 11 11 <field field_ref="cltcalipso" level="5" grid_ref="grid_out"/> 12 <field field_ref="pcllcalipso" level="5" grid_ref="grid_out"/>13 <field field_ref="pclmcalipso" level="5" grid_ref="grid_out"/>14 <field field_ref="pclhcalipso" level="5" grid_ref="grid_out"/>15 <field field_ref="pcltcalipso" level="5" grid_ref="grid_out"/>16 12 <field field_ref="cllcalipsoice" level="5" grid_ref="grid_out"/> 17 13 <field field_ref="clmcalipsoice" level="5" grid_ref="grid_out"/> -
LMDZ6/branches/LMDZ-tracers/DefLists/file_def_histhfCOSP_lmdz.xml
r3653 r3851 8 8 <field field_ref="clhcalipso" level="5" /> 9 9 <field field_ref="cltcalipso" level="5" /> 10 <field field_ref="pcllcalipso" level="5" />11 <field field_ref="pclmcalipso" level="5" />12 <field field_ref="pclhcalipso" level="5" />13 <field field_ref="pcltcalipso" level="5" />14 10 <field field_ref="cllcalipsoice" level="5" /> 15 11 <field field_ref="clmcalipsoice" level="5" /> -
LMDZ6/branches/LMDZ-tracers/DefLists/file_def_histmthCOSP_lmdz.xml
r3653 r3851 11 11 <field field_ref="clhcalipso" level="5" grid_ref="grid_out"/> 12 12 <field field_ref="cltcalipso" level="5" grid_ref="grid_out"/> 13 <field field_ref="pcllcalipso" level="5" grid_ref="grid_out"/>14 <field field_ref="pclmcalipso" level="5" grid_ref="grid_out"/>15 <field field_ref="pclhcalipso" level="5" grid_ref="grid_out"/>16 <field field_ref="pcltcalipso" level="5" grid_ref="grid_out"/>17 13 <field field_ref="cllcalipsoice" level="5" grid_ref="grid_out"/> 18 14 <field field_ref="clmcalipsoice" level="5" grid_ref="grid_out"/> -
LMDZ6/branches/LMDZ-tracers/bld.cfg
r3441 r3851 27 27 src::dyn_phys_sub %DYN_PHYS_SUB 28 28 src::sisvat %SISVAT 29 src::inlandsis %INLANDSIS 29 30 src::rrtm %RRTM 30 31 src::dust %DUST … … 37 38 src::cosp %COSP 38 39 src::ext_src %EXT_SRC 40 src::Ocean_skin %SRC_PATH/%PHYS/Ocean_skin 39 41 40 42 bld::lib lmdz -
LMDZ6/branches/LMDZ-tracers/libf/dyn3d/dynredem.F90
r2622 r3851 9 9 USE infotrac 10 10 USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL, & 11 NF90_CLOSE, NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER 11 NF90_CLOSE, NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER, & 12 NF90_64BIT_OFFSET 12 13 USE dynredem_mod, ONLY: cre_var, put_var1, put_var2, err, modname, fil 13 14 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff, & … … 104 105 105 106 !--- File creation 106 CALL err(NF90_CREATE(fichnom, NF90_CLOBBER,nid))107 CALL err(NF90_CREATE(fichnom,IOR(NF90_CLOBBER,NF90_64BIT_OFFSET),nid)) 107 108 108 109 !--- Some global attributes -
LMDZ6/branches/LMDZ-tracers/libf/dyn3d/guide_mod.F90
r3103 r3851 1550 1550 ! ---------------------------------------------- 1551 1551 ! Ouverture du fichier 1552 ierr=NF_CREATE("guide_ins.nc", NF_CLOBBER,nid)1552 ierr=NF_CREATE("guide_ins.nc",IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid) 1553 1553 ! Definition des dimensions 1554 1554 ierr=NF_DEF_DIM(nid,"LONU",iip1,id_lonu) -
LMDZ6/branches/LMDZ-tracers/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
r2600 r3851 78 78 ! CREATION OUTPUT 79 79 ! ouverture fichier netcdf de sortie out 80 status=NF_CREATE('grilles_gcm.nc', NF_CLOBBER,ncid_out)80 status=NF_CREATE('grilles_gcm.nc',IOR(NF_CLOBBER,NF_64BIT_OFFSET),ncid_out) 81 81 CALL handle_err(status) 82 82 status=NF_DEF_DIM(ncid_out,'lonu',iim+1,out_lonudim) -
LMDZ6/branches/LMDZ-tracers/libf/dyn3d_common/infotrac.F90
-
Property
svn:keywords
set to
Id
r3666 r3851 32 32 INTEGER, ALLOCATABLE, DIMENSION(:,:), SAVE :: iqfils 33 33 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: iqpere 34 REAL :: qperemin,masseqmin,ratiomin ! MVals et CRisi 35 PARAMETER (qperemin=1e-16,masseqmin=1e-16,ratiomin=1e-16) ! MVals 34 36 35 37 ! conv_flg(it)=0 : convection desactivated for tracer number it -
Property
svn:keywords
set to
-
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/conf_gcm.F90
r3579 r3851 345 345 ngroup=3 346 346 CALL getin('ngroup',ngroup) 347 if (mod(iim, 2**ngroup) /= 0) & 348 call abort_gcm("conf_gcm", 'iim must be multiple of 2**ngroup', 1) 349 if (2**ngroup > jjm + 1) & 350 call abort_gcm("conf_gcm", '2**ngroup must be <= jjm + 1', 1) 347 351 348 352 ! mode_top_bound : fields towards which sponge relaxation will be done: -
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/dynredem_loc.F90
r2622 r3851 11 11 USE infotrac 12 12 USE netcdf, ONLY: NF90_CREATE, NF90_DEF_DIM, NF90_INQ_VARID, NF90_GLOBAL, & 13 NF90_CLOSE, NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER 13 NF90_CLOSE, NF90_PUT_ATT, NF90_UNLIMITED, NF90_CLOBBER, & 14 NF90_64BIT_OFFSET 14 15 USE dynredem_mod, ONLY: cre_var, put_var, err, modname, fil 15 16 USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt,pa,preff, & … … 110 111 111 112 !--- File creation 112 CALL err(NF90_CREATE(fichnom, NF90_CLOBBER,nid))113 CALL err(NF90_CREATE(fichnom,IOR(NF90_CLOBBER,NF90_64BIT_OFFSET),nid)) 113 114 114 115 !--- Some global attributes -
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/groupe_loc.F
r2600 r3851 40 40 c$OMP THREADPRIVATE(firstcall) 41 41 42 data firstcall/.true./43 42 integer ijb,ije,jjb,jje 44 43 45 if (firstcall) then46 if(mod(iim,2**ngroup).ne.0) stop'probleme du nombre ede point'47 firstcall=.false.48 endif49 50 44 c Champs 1D 51 45 -
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/guide_loc_mod.F90
r3547 r3851 27 27 LOGICAL, PRIVATE, SAVE :: invert_p,invert_y,ini_anal 28 28 LOGICAL, PRIVATE, SAVE :: guide_2D,guide_sav,guide_modele 29 !FC 30 LOGICAL, PRIVATE, SAVE :: convert_Pa 29 31 30 32 REAL, PRIVATE, SAVE :: tau_min_u,tau_max_u … … 152 154 guide_plevs=1 153 155 ENDIF 156 !FC 157 CALL getpar('convert_Pa',.true.,convert_Pa,'Convert Pressure levels in Pa') 154 158 ! Fin raccord 155 159 CALL getpar('ini_anal',.false.,ini_anal,'Etat initial = analyse') … … 1695 1699 status=NF_GET_VARA_REAL(ncidpl,varidpl,1,nlevnc,apnc) 1696 1700 #endif 1697 apnc=apnc*100.! conversion en Pascals 1701 !FC Pour les corrections la pression est deja en Pascals on commente la ligne ci-dessous 1702 IF(convert_Pa) apnc=apnc*100.! conversion en Pascals 1698 1703 bpnc(:)=0. 1699 1704 ENDIF … … 2193 2198 ! ---------------------------------------------- 2194 2199 ! Ouverture du fichier 2195 ierr=NF_CREATE("guide_ins.nc", NF_CLOBBER,nid)2200 ierr=NF_CREATE("guide_ins.nc",IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid) 2196 2201 ! Definition des dimensions 2197 2202 ierr=NF_DEF_DIM(nid,"LONU",iip1,id_lonu) -
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/qminimum_loc.F
-
Property
svn:keywords
set to
Id
r2600 r3851 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE qminimum_loc( q,nqtot,deltap ) 2 5 USE parallel_lmdz 3 USE infotrac, ONLY: ok_isotopes,ntraciso,iqiso,ok_iso_verif 6 USE infotrac, ONLY: ok_isotopes,ntraciso,iqiso,ok_iso_verif, & 7 & ratiomin,qperemin ! CRisi 23nov2020 4 8 IMPLICIT none 5 9 c … … 9 13 include "dimensions.h" 10 14 include "paramet.h" 15 include "iniprint.h" 11 16 c 12 17 INTEGER nqtot ! CRisi: on remplace nq par nqtot … … 49 54 c 50 55 51 !write( *,*) 'qminimum 52: entree'56 !write(lunout,*) 'qminimum 52: entree' 52 57 if (ok_iso_verif) then 53 58 call check_isotopes(q,ij_begin,ij_end,'qminimum 52') … … 60 65 q_follow(ijb:ije,:,1:2)=q(ijb:ije,:,1:2) 61 66 62 !write( *,*) 'qminimum 57'67 !write(lunout,*) 'qminimum 57' 63 68 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 64 69 DO 1000 k = 1, llm … … 85 90 c le defaut en prennant de l'eau vapeur de la couche au-dessous. 86 91 c 87 !write( *,*) 'qminimum 81'92 !write(lunout,*) 'qminimum 81' 88 93 iq = iq_vap 89 94 c … … 113 118 c doit imprimer un message d'avertissement (saturation possible). 114 119 c 115 !write( *,*) 'qminimum 106'120 !write(lunout,*) 'qminimum 106' 116 121 nb_pump=0 117 122 c$OMP DO SCHEDULE(STATIC) … … 135 140 ENDIF 136 141 137 !write( *,*) 'qminimum 128'142 !write(lunout,*) 'qminimum 128' 138 143 if (ok_isotopes) then 144 !write(lunout,*) 'qminimum 140' 139 145 ! CRisi: traiter de même les traceurs d'eau 140 146 ! Mais il faut les prendre à l'envers pour essayer de conserver la … … 144 150 ! rien ici et on croise les doigts pour que ça ne soit pas trop 145 151 ! génant 152 ! en fait, si, c'est genant quand les isotopes doivent eux même transporter des 153 ! traceurs -> apporter aussi un peu d'isotopes... Combien? 154 ! Essayer tnat/2 = -500 permil? C'est déjà mieux que -1000 155 ! permil... 156 ! pb: que faire pour les traceurs? 157 c$OMP DO SCHEDULE(STATIC) 146 158 DO i = ijb, ije 147 159 if (zx_pump(i).gt.0.0) then … … 149 161 endif !if (zx_pump(i).gt.0.0) then 150 162 enddo !DO i = ijb, ije 163 c$OMP END DO 151 164 152 165 ! 2) transfert de vap vers les couches plus hautes 153 !write( *,*) 'qminimum 139'166 !write(lunout,*) 'qminimum 158' 154 167 do k=2,llm 168 c$OMP DO SCHEDULE(STATIC) 155 169 DO i = ijb, ije 156 170 if (zx_defau_diag(i,k,iq_vap).gt.0.0) then 157 ! on ajoute la vapeur en k 158 do ixt=1,ntraciso 171 ! on ajoute la vapeur en k 172 ! write(lunout,*) 'i,k,q_follow(i,k-1,iq_vap)=', 173 ! : i,k,q_follow(i,k-1,iq_vap) 174 if (q_follow(i,k-1,iq_vap).lt.qperemin) then 175 write(lunout,*) 'tmp qmin: on stoppe' 176 write(lunout,*) 'zx_pump(i)=',zx_pump(i) 177 write(lunout,*) 'q_follow(i,:,iq_vap)=', 178 : q_follow(i,:,iq_vap) 179 write(lunout,*) 'k=',k 180 call abort_gcm("qminimum","not enough vapor",1) 181 endif 182 do ixt=1,ntraciso 183 ! write(lunout,*) 'qmin 168: ixt=',ixt 184 ! write(lunout,*) 'q(i,k,iqiso(ixt,iq_vap)=', 185 ! : q(i,k,iqiso(ixt,iq_vap)) 186 ! write(lunout,*) 'zx_defau_diag(i,k,iq_vap)=', 187 ! : zx_defau_diag(i,k,iq_vap) 188 ! write(lunout,*) 'q(i,k-1,iqiso(ixt,iq_vap)=', 189 ! : q(i,k-1,iqiso(ixt,iq_vap)) 190 159 191 q(i,k,iqiso(ixt,iq_vap))=q(i,k,iqiso(ixt,iq_vap)) 160 192 : +zx_defau_diag(i,k,iq_vap) … … 207 239 endif !if (zx_defau_diag(i,k,iq_vap).gt.0.0) then 208 240 enddo !DO i = 1, ip1jmp1 209 enddo !do k=2,llm 241 c$OMP END DO 242 enddo !do k=2,llm 210 243 211 244 if (ok_iso_verif) then … … 217 250 !write(*,*) 'qminimum 164' 218 251 do k=1,llm 252 c$OMP DO SCHEDULE(STATIC) 219 253 DO i = ijb, ije 220 254 if (zx_defau_diag(i,k,iq_liq).gt.0.0) then … … 235 269 : -zx_defau_diag(i,k,iq_liq) 236 270 endif !if (zx_defau_diag(i,k,iq_vap).gt.0.0) then 237 enddo !DO i = 1, ip1jmp1 271 enddo !DO i = ijb, ije 272 c$OMP END DO 238 273 enddo !do k=2,llm 239 274 -
Property
svn:keywords
set to
-
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/vlsplt_loc.F
-
Property
svn:keywords
set to
Id
r3435 r3851 14 14 c -------------------------------------------------------------------- 15 15 USE parallel_lmdz 16 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils ! CRisi 16 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils, ! CRisi & 17 & qperemin,masseqmin,ratiomin ! MVals et CRisi 17 18 IMPLICIT NONE 18 19 c … … 329 330 ! Il faut faire ça avant d'avoir mis à jour q et masse 330 331 331 !write(*,*) 'vlsplt 326: iq,ijb_x,nqfils(iq)=',iq,ijb_x,nqfils(iq) 332 333 if (nqfils(iq).gt.0) then 332 if (nqfils(iq).gt.0) then 334 333 do ifils=1,nqdesc(iq) 334 !do ifils=1,nqfils(iq) ! modif C Risi 22nov2020 335 ! attention: comme Ratio est utilisé comme q dans l'appel 336 ! recursif, il doit contenir à lui seul tous les indices de tous 337 ! les descendants! 335 338 iq2=iqfils(ifils,iq) 336 339 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 339 342 ! On a besoin de q et masse seulement entre ijb et ije. On ne 340 343 ! les calcule donc que de ijb à ije 341 masse(ij,l,iq2)=masse(ij,l,iq)*q(ij,l,iq) 342 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 344 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 345 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin) 346 if (q(ij,l,iq).gt.qperemin) then ! modif 13 nov 2020 347 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 348 else 349 Ratio(ij,l,iq2)=ratiomin 350 endif 343 351 enddo 344 352 enddo … … 352 360 ! end CRisi 353 361 354 !write(*,*) 'vlsplt 360: iq,ijb_x=',iq,ijb_x355 362 356 363 c calcul des tENDances … … 358 365 DO l=1,llm 359 366 DO ij=ijb+1,ije 360 new_m=masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l) 367 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 368 new_m=max(masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l),masseqmin) 361 369 q(ij,l,iq)=(q(ij,l,iq)*masse(ij,l,iq)+ 362 370 & u_mq(ij-1,l)-u_mq(ij,l)) … … 371 379 ENDDO 372 380 c$OMP END DO NOWAIT 373 !write(*,*) 'vlsplt 380: iq,ijb_x=',iq,ijb_x374 381 375 382 ! retablir les fils en rapport de melange par rapport a l'air: … … 378 385 if (nqfils(iq).gt.0) then 379 386 do ifils=1,nqdesc(iq) 387 !do ifils=1,nqfils(iq) ! modif C Risi 22nov2020 380 388 iq2=iqfils(ifils,iq) 381 389 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) … … 414 422 c -------------------------------------------------------------------- 415 423 USE parallel_lmdz 416 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils ! CRisi 424 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils, ! CRisi & 425 & qperemin,masseqmin,ratiomin ! MVals et CRisi 417 426 USE comconst_mod, ONLY: pi 418 427 IMPLICIT NONE … … 468 477 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 469 478 INTEGER ijb,ije 479 INTEGER ijbm,ijem 470 480 471 481 ijb=ij_begin-2*iip1 … … 726 736 ijb=ij_begin-2*iip1 727 737 ije=ij_end+2*iip1 738 ijbm=ij_begin-iip1 739 ijem=ij_end+iip1 728 740 if (pole_nord) ijb=ij_begin 729 if (pole_sud) ije=ij_end 730 741 if (pole_sud) ije=ij_end 742 if (pole_nord) ijbm=ij_begin 743 if (pole_sud) ijem=ij_end 744 731 745 if (nqfils(iq).gt.0) then 732 746 do ifils=1,nqdesc(iq) 747 !do ifils=1,nqfils(iq) ! modif C Risi 22nov2020 733 748 iq2=iqfils(ifils,iq) 734 749 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 735 750 DO l=1,llm 751 ! modif des bornes: CRisi 16 nov 2020 752 ! d'abord masse avec bornes corrigées 753 DO ij=ijbm,ijem 754 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 755 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin) 756 enddo !DO ij=ijbm,ijem 757 758 ! ensuite Ratio avec anciennes bornes 736 759 DO ij=ijb,ije 737 masse(ij,l,iq2)=masse(ij,l,iq)*q(ij,l,iq) 738 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 739 enddo 740 enddo 760 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 761 if (q(ij,l,iq).gt.qperemin) then ! modif 13 nov 2020 762 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 763 else 764 Ratio(ij,l,iq2)=ratiomin 765 endif 766 enddo !DO ij=ijbm,ijem 767 enddo !DO l=1,llm 741 768 c$OMP END DO NOWAIT 742 769 enddo !do ifils=1,nqdesc(iq) … … 868 895 USE parallel_lmdz 869 896 USE vlz_mod 870 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils ! CRisi 897 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils, ! CRisi & 898 & qperemin,masseqmin,ratiomin ! MVals et CRisi 899 871 900 IMPLICIT NONE 872 901 c … … 1084 1113 lorig(ij,l)=lorig(ij,l)-1 1085 1114 ENDIF 1115 ! CRisi 24nov2020: ajout d'un message d'erreur clair au lieu d'un plantage 1116 ! pour seg fault 1117 if (lorig(ij,l).eq.0) then 1118 call abort_gcm("vlz in vlsplt_loc", 1119 : "unfixable violation of CFL",1) 1120 endif 1086 1121 morig(ij,l)=masse(ij,lorig(ij,l),iq) 1087 1122 qorig(ij,l)=q(ij,lorig(ij,l),iq) … … 1127 1162 if (nqfils(iq).gt.0) then 1128 1163 do ifils=1,nqdesc(iq) 1164 !do ifils=1,nqfils(iq) ! modif C Risi 22 nov 2020 1129 1165 iq2=iqfils(ifils,iq) 1130 1166 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 1131 1167 DO l=1,llm 1132 1168 DO ij=ijb,ije 1133 masse(ij,l,iq2)=masse(ij,l,iq)*q(ij,l,iq) 1134 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 1169 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 1170 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin) 1171 if (q(ij,l,iq).gt.qperemin) then 1172 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 1173 else 1174 Ratio(ij,l,iq2)=ratiomin 1175 endif 1135 1176 !wq(ij,l,iq2)=wq(ij,l,iq) ! correction bug le 15mai2015 1136 1177 w(ij,l,iq2)=wq(ij,l,iq) -
Property
svn:keywords
set to
-
LMDZ6/branches/LMDZ-tracers/libf/dyn3dmem/vlspltqs_loc.F
-
Property
svn:keywords
set to
Id
r2603 r3851 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE vlxqs_loc(q,pente_max,masse,u_m,qsat,ijb_x,ije_x,iq) 2 5 c … … 9 12 c -------------------------------------------------------------------- 10 13 USE parallel_lmdz 11 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils ! CRisi 14 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils, ! CRisi & 15 & qperemin,masseqmin,ratiomin ! MVals et CRisi 12 16 IMPLICIT NONE 13 17 c … … 342 346 DO l=1,llm 343 347 DO ij=ijb,ije 344 masse(ij,l,iq2)=masse(ij,l,iq)*q(ij,l,iq) 345 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 348 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 349 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin) 350 if (q(ij,l,iq).gt.qperemin) then ! modif 13 nov 2020 351 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 352 else 353 Ratio(ij,l,iq2)=ratiomin 354 endif 346 355 enddo 347 356 enddo … … 362 371 DO l=1,llm 363 372 DO ij=ijb+1,ije 364 new_m=masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l) 373 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 374 new_m=max(masse(ij,l,iq)+u_m(ij-1,l)-u_m(ij,l),masseqmin) 365 375 q(ij,l,iq)=(q(ij,l,iq)*masse(ij,l,iq)+ 366 376 & u_mq(ij-1,l)-u_mq(ij,l)) … … 416 426 c -------------------------------------------------------------------- 417 427 USE parallel_lmdz 418 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils ! CRisi 428 USE infotrac, ONLY : nqtot,nqfils,nqdesc,iqfils, ! CRisi & 429 & qperemin,masseqmin,ratiomin ! MVals et CRisi 419 430 USE comconst_mod, ONLY: pi 420 431 IMPLICIT NONE … … 423 434 include "paramet.h" 424 435 include "comgeom.h" 436 include "iniprint.h" 425 437 c 426 438 c … … 464 476 DATA first/.true./ 465 477 INTEGER ijb,ije 478 INTEGER ijbm,ijem 466 479 467 480 ijb=ij_begin-2*iip1 … … 724 737 ijb=ij_begin-2*iip1 725 738 ije=ij_end+2*iip1 739 ijbm=ij_begin-iip1 740 ijem=ij_end+iip1 726 741 if (pole_nord) ijb=ij_begin 727 742 if (pole_sud) ije=ij_end 728 743 if (pole_nord) ijbm=ij_begin 744 if (pole_sud) ijem=ij_end 745 746 !write(lunout,*) 'vlspltqs 737: iq,ijb,ije=',iq,ijb,ije 747 !write(lunout,*) 'ij_begin,ij_end=',ij_begin,ij_end 748 !write(lunout,*) 'pole_nord,pole_sud=',pole_nord,pole_sud 729 749 if (nqfils(iq).gt.0) then 730 750 do ifils=1,nqdesc(iq) … … 732 752 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 733 753 DO l=1,llm 754 ! modif des bornes: CRisi 16 nov 2020 755 ! d'abord masse avec bornes corrigées 756 DO ij=ijbm,ijem 757 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 758 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),masseqmin) 759 enddo !DO ij=ijbm,ijem 760 761 ! ensuite Ratio avec anciennes bornes 734 762 DO ij=ijb,ije 735 masse(ij,l,iq2)=masse(ij,l,iq)*q(ij,l,iq) 736 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 737 enddo 738 enddo 763 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 764 !write(lunout,*) 'ij,l,q(ij,l,iq)=',ij,l,q(ij,l,iq) 765 if (q(ij,l,iq).gt.qperemin) then ! modif 13 nov 2020 766 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 767 else 768 Ratio(ij,l,iq2)=ratiomin 769 endif 770 enddo !DO ij=ijbm,ijem 771 enddo !DO l=1,llm 739 772 c$OMP END DO NOWAIT 740 773 enddo !do ifils=1,nqdesc(iq) 741 774 do ifils=1,nqfils(iq) 742 775 iq2=iqfils(ifils,iq) 776 !write(lunout,*) 'vly: appel recursiv vly iq2=',iq2 743 777 call vly_loc(Ratio,pente_max,masse,qbyv,iq2) 744 778 enddo !do ifils=1,nqfils(iq) -
Property
svn:keywords
set to
-
LMDZ6/branches/LMDZ-tracers/libf/dynphy_lonlat/phylmd/ce0l.F90
r2665 r3851 29 29 USE iniphysiq_mod, ONLY: iniphysiq 30 30 USE mod_const_mpi, ONLY: comm_lmdz 31 31 32 #ifdef CPP_PARA 32 33 USE mod_const_mpi, ONLY: init_const_mpi 33 USE parallel_lmdz, ONLY: init_parallel, mpi_rank, omp_rank 34 USE parallel_lmdz, ONLY: init_parallel, mpi_rank, omp_rank, using_mpi 34 35 USE bands, ONLY: read_distrib, distrib_phys 35 36 USE mod_hallo, ONLY: init_mod_hallo 36 37 USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys 37 #endif 38 #ifdef CPP_XIOS 39 USE xios, only: xios_finalize 40 #endif 41 #endif 42 38 43 USE comconst_mod, ONLY: cpp, daysec, dtphys, dtvr, g, kappa, omeg, r, rad, & 39 44 pi, jmp1 … … 50 55 include "comgeom2.h" 51 56 include "iniprint.h" 57 #ifdef CPP_MPI 58 include 'mpif.h' 59 #endif 60 52 61 REAL :: masque(iip1,jjp1) !--- CONTINENTAL MASK 53 62 REAL :: phis (iip1,jjp1) !--- GROUND GEOPOTENTIAL … … 67 76 REAL, ALLOCATABLE :: masktmp(:) 68 77 69 #ifndef CPP_PARA 78 #ifdef CPP_PARA 79 integer ierr 80 #else 70 81 ! for iniphysiq in serial mode 71 82 INTEGER,PARAMETER :: mpi_rank=0 … … 168 179 ocemask = ocetmp 169 180 IF(dlat_omask(1)<dlat_omask(jml_omask)) THEN 170 DO j=1,jjp1; ocemask(:,j) = ocetmp(:,jjp1-j+1); END DO 181 DO j=1,jjp1 182 ocemask(:,j) = ocetmp(:,jjp1-j+1) 183 END DO 171 184 END IF 172 185 DEALLOCATE(ocetmp,lon_omask,lat_omask,dlon_omask,dlat_omask) … … 239 252 #ifdef CPP_PARA 240 253 END IF 254 #ifdef CPP_XIOS 255 CALL xios_finalize 256 #endif 257 #ifdef CPP_MPI 258 IF (using_mpi) call MPI_FINALIZE(ierr) 259 #endif 241 260 #endif 242 261 -
LMDZ6/branches/LMDZ-tracers/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
r3630 r3851 42 42 USE conf_dat_m, ONLY: conf_dat2d 43 43 USE phys_state_var_mod, ONLY: zmea, zstd, zsig, zgam, zthe, zpic, zval, z0m, & 44 solsw, radsol, t_ancien, wake_deltat, wake_s, rain_fall, qsol, z0h, &44 solsw, solswfdiff, radsol, t_ancien, wake_deltat, wake_s, rain_fall, qsol, z0h, & 45 45 sollw,sollwdown, rugoro, q_ancien, wake_deltaq, wake_pe, snow_fall, ratqs,w01, & 46 46 sig1, ftsol, clwcon, fm_therm, wake_Cstar, pctsrf, entr_therm,radpas, f0,& … … 107 107 REAL, DIMENSION(SIZE(masque,1),SIZE(masque,2)) :: masque_tmp,phiso 108 108 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0, fder 109 REAL, DIMENSION(klon,nbsrf) :: qs olsrf, snsrf109 REAL, DIMENSION(klon,nbsrf) :: qsurf, snsrf 110 110 REAL, DIMENSION(klon,nsoilmx,nbsrf) :: tsoil 111 111 … … 192 192 WRITE(lunout,*)'phystep =', phystep, radpas 193 193 194 ! Init: ftsol, snsrf, qs olsrf, tsoil, rain_fall, snow_fall, solsw, sollw, z0194 ! Init: ftsol, snsrf, qsurf, tsoil, rain_fall, snow_fall, solsw, sollw, z0 195 195 !******************************************************************************* 196 196 DO i=1,nbsrf; ftsol(:,i) = tsol; END DO … … 209 209 210 210 fevap(:,:) = 0. 211 DO i=1,nbsrf; qsolsrf(:,i)=150.; END DO211 qsurf = 0. 212 212 DO i=1,nbsrf; DO j=1,nsoilmx; tsoil(:,j,i) = tsol; END DO; END DO 213 213 rain_fall = 0. 214 214 snow_fall = 0. 215 215 solsw = 165. 216 solswfdiff = 1. 216 217 sollw = -53. 217 218 !ym warning missing init for sollwdown => set to 0 … … 271 272 272 273 CALL fonte_neige_init(run_off_lic_0) 273 CALL pbl_surface_init( fder, snsrf, qs olsrf, tsoil )274 CALL pbl_surface_init( fder, snsrf, qsurf, tsoil ) 274 275 CALL phyredem( "startphy.nc" ) 275 276 -
LMDZ6/branches/LMDZ-tracers/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
r3380 r3851 74 74 NF90_DEF_DIM, NF90_DEF_VAR, NF90_PUT_VAR, NF90_PUT_ATT, & 75 75 NF90_NOERR, NF90_NOWRITE, NF90_DOUBLE, NF90_GLOBAL, & 76 NF90_CLOBBER, NF90_ENDDEF, NF90_UNLIMITED, NF90_FLOAT 76 NF90_CLOBBER, NF90_ENDDEF, NF90_UNLIMITED, NF90_FLOAT, & 77 NF90_64BIT_OFFSET 77 78 USE inter_barxy_m, ONLY: inter_barxy 78 79 USE netcdf95, ONLY: nf95_def_var, nf95_put_att, nf95_put_var … … 228 229 229 230 !--- File creation 230 CALL ncerr(NF90_CREATE(fnam, NF90_CLOBBER,nid),fnam)231 CALL ncerr(NF90_CREATE(fnam,IOR(NF90_CLOBBER,NF90_64BIT_OFFSET),nid),fnam) 231 232 CALL ncerr(NF90_PUT_ATT(nid,NF90_GLOBAL,"title","Fichier conditions aux limites"),fnam) 232 233 str='File produced using ce0l executable.' -
LMDZ6/branches/LMDZ-tracers/libf/misc/handle_err_m.F90
r3435 r3851 27 27 28 28 if (ncerr /= nf90_noerr) then 29 print *, "NetCDF95 handle_err:" 29 30 print *, message, ":" 30 31 if (present(varid)) print *, "varid = ", varid … … 39 40 end if 40 41 end if 41 call abort_physic("NetCDF95 handle_err", " ", 1)42 call abort_physic("NetCDF95 handle_err", "see above", 1) 42 43 end if 43 44 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/dustemission_mod.F90
r2630 r3851 153 153 !====================================================================================== 154 154 !-------------------------------------------------------------------------------------- 155 156 SUBROUTINE dustemis_out_init() 157 158 USE dimphy 159 160 !AS: moved here from subroutine initdust 161 ALLOCATE( m1dflux(klon) ) 162 ALLOCATE( m2dflux(klon) ) 163 ALLOCATE( m3dflux(klon) ) 164 165 END SUBROUTINE dustemis_out_init 155 166 156 167 SUBROUTINE dustemission( debutphy, xlat, xlon, & !Input … … 625 636 ALLOCATE( srel(nats,nclass) ) 626 637 ALLOCATE( srel2(nats,nclass) ) 627 ALLOCATE( m1dflux(klon) )628 ALLOCATE( m2dflux(klon) )629 ALLOCATE( m3dflux(klon) )630 638 631 639 … … 672 680 !& .and.pctsrf(i)>0.5.and.Pini(i,nts)>0.)THEN 673 681 ! JE20150605<< easier to read 674 ! IF(pctsrf(i)>0.5.and.Pini(i,nts)>0.)THEN675 682 IF(pctsrf(i,is_ter)>0.5.and.Pini(i,nts)>0.)THEN 676 683 ! JE20150605>> … … 1263 1270 modwm=sqrt((wind10ms(kwb)**2)+(1.2*zwstar(i))**2) 1264 1271 ustarns=cdnms*modwm*100. 1265 !JE20150202 <<1266 ! Do not have too much sense.. and is not anymore in the chimere14b version.1267 !1268 ! utmin=umin/(cdnms*ceff)1269 ! IF(wind10cm(kwb).ge.utmin)THEN1270 ! ustarsalt=ustarns+ &1271 ! (0.3*(wind10cm(kwb)/100.-utmin/100.)**2.)1272 ! ELSE1273 ! ustarsalt=ustarns1274 ! ENDIF1275 ! ustarsalt should be :1276 1272 ustarsalt=ustarns 1277 !JE20150202 >>1278 1273 1279 1274 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/lsc_scav_spl.F90
r2630 r3851 179 179 180 180 ! pressure and size of the layer 181 DO k=klev -1, 1, -1181 DO k=klev, 1, -1 182 182 DO i=1, klon 183 183 zrho(i,k)=pplay(i,k)/t(i,k)/RD -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r3630 r3851 68 68 flux_sparam_sscoa,u10m_ss,v10m_ss 69 69 70 USE dustemission_mod, ONLY : m1dflux, m2dflux, m3dflux 70 USE dustemission_mod, ONLY : m1dflux, m2dflux, m3dflux 71 71 72 72 ! USE phytrac_mod, ONLY : d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, & … … 82 82 CONTAINS 83 83 84 ! ug Routine pour définir (lo s du premier passageà) ET sortir les variables84 ! ug Routine pour définir (lors du premier passageà) ET sortir les variables 85 85 SUBROUTINE phys_output_write_spl(itap, pdtphys, paprs, pphis, & 86 86 pplay, lmax_th, aerosol_couple, & … … 90 90 91 91 ! This subroutine does the actual writing of diagnostics that were 92 ! defined and initialised in phys_output_mod.F9092 ! defined and initialised mainly in phytracr_spl_mod.F90 (SPLA tracers, subroutine phytracr_spl_out_init) 93 93 94 94 USE dimphy, ONLY: klon, klev, klevp1 … … 148 148 o_alp_bl_fluct_m, o_alp_bl_fluct_tke, & 149 149 o_alp_bl_conv, o_alp_bl_stat, & 150 o_slab_qflux, o_tslab, o_slab_bils, & 150 o_slab_qflux, o_tslab, & 151 !o_slab_bils, & 151 152 o_slab_bilg, o_slab_sic, o_slab_tice, & 152 153 o_weakinv, o_dthmin, o_cldtau, & 153 154 o_cldemi, o_pr_con_l, o_pr_con_i, & 154 155 o_pr_lsc_l, o_pr_lsc_i, o_re, o_fl, & 155 o_rh2m, o_rh2m_min, o_rh2m_max, & 156 o_rh2m, & 157 !o_rh2m_min, o_rh2m_max, & 156 158 o_qsat2m, o_tpot, o_tpote, o_SWnetOR, & 157 159 o_LWdownOR, o_snowl, & 158 160 o_solldown, o_dtsvdfo, o_dtsvdft, & 159 161 o_dtsvdfg, o_dtsvdfi, o_z0m, o_z0h, o_od550aer, & 160 o_od865aer, o_abs visaer, o_od550lt1aer, &162 o_od865aer, o_abs550aer, o_od550lt1aer, & 161 163 o_sconcso4, o_sconcno3, o_sconcoa, o_sconcbc, & 162 164 o_sconcss, o_sconcdust, o_concso4, o_concno3, & … … 300 302 ema_cbmf, Ma, fm_therm, ale_bl, alp_bl, ale, & 301 303 alp, cin, wake_pe, wake_s, wake_deltat, & 304 ale_wake, ale_bl_stat, & 302 305 wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, & 303 306 rnebcon, wo, falb1, albsol2, coefh, clwcon0, & … … 323 326 t2m, fluxt, fluxlat, fsollw, fsolsw, & 324 327 wfbils, wfbilo, cdragm, cdragh, cldl, cldm, & 325 cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, & 326 cldtjn, cldq, flwp, fiwp, ue, ve, uq, vq, & 328 cldh, cldt, JrNt, & 329 ! cldljn, cldmjn, cldhjn, cldtjn & 330 cldq, flwp, fiwp, ue, ve, uq, vq, & 327 331 plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, & 328 332 s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, & 329 333 vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, & 330 twriteSTD, ale_wake, alp_wake, wake_h, & 334 twriteSTD, alp_wake, wake_h, & 335 !ale_wake, & 331 336 wake_omg, d_t_wake, d_q_wake, Vprecip, & 332 337 wdtrainA, wdtrainM, n2, s2, proba_notrig, & 333 random_notrig, ale_bl_stat, & 338 random_notrig, & 339 !ale_bl_stat, & 334 340 alp_bl_det, alp_bl_fluct_m, alp_bl_conv, & 335 341 alp_bl_stat, alp_bl_fluct_tke, slab_wfbils, & … … 337 343 pmflxr, pmflxs, prfl, psfl, re, fl, rh2m, & 338 344 qsat2m, tpote, tpot, d_ts, od550aer, & 339 od865aer, abs visaer, od550lt1aer, sconcso4, sconcno3, &345 od865aer, abs550aer, od550lt1aer, sconcso4, sconcno3, & 340 346 sconcoa, sconcbc, sconcss, sconcdust, concso4, concno3, & 341 347 concoa, concbc, concss, concdust, loadso4, & … … 372 378 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & 373 379 itau_con, nfiles, clef_files, nid_files, zvstr_gwd_rando 374 USE ocean_slab_mod, ONLY: tslab, slab_bil s, slab_bilg, tice, seaice380 USE ocean_slab_mod, ONLY: tslab, slab_bilg, tice, seaice 375 381 USE pbl_surface_mod, ONLY: snow 376 382 USE indice_sol_mod, ONLY: nbsrf 377 383 USE infotrac, ONLY: nqtot, nqo, nbtr, type_trac 378 384 USE geometry_mod, ONLY: cell_area 379 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow385 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt 380 386 ! USE aero_mod, ONLY: naero_spc 381 387 USE aero_mod, ONLY: naero_tot, id_STRAT_phy … … 405 411 INTEGER, DIMENSION(klon) :: lmax_th 406 412 LOGICAL :: aerosol_couple, ok_sync 413 LOGICAL :: ok_ade, ok_aie 407 414 LOGICAL, DIMENSION(klon, klev) :: ptconv, ptconvth 408 415 REAL :: pdtphys … … 442 449 CALL set_itau_iophy(itau_w) 443 450 444 IF (.NOT.vars_defined) THEN 445 iinitend = 2 446 ELSE 447 iinitend = 1 448 ENDIF 451 !AS, vu avec LF : le test est fait maintenant au debut du pdt, pas a la fin, alors on ne passe plus qu'une fois 452 ! Donc le "IF (.NOT.vars_defined)" devient inutile, et la boucle "DO iinit=1, iinitend" pourra etre eliminee 453 ! ainsi que iinit, iinitend 454 ! IF (.NOT.vars_defined) THEN 455 ! iinitend = 2 456 ! ELSE 457 ! iinitend = 1 458 ! ENDIF 449 459 450 460 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage: … … 667 677 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 668 678 669 IF ( ok_snow) THEN679 IF (landice_opt .GE. 1 ) THEN 670 680 CALL histwrite_phy(o_snowsrf, snow_o) 671 681 CALL histwrite_phy(o_qsnow, qsnow) … … 735 745 CALL histwrite_phy(o_cldt, cldt) 736 746 CALL histwrite_phy(o_JrNt, JrNt) 737 CALL histwrite_phy(o_cldljn, cldl*JrNt) 738 CALL histwrite_phy(o_cldmjn, cldm*JrNt) 739 CALL histwrite_phy(o_cldhjn, cldh*JrNt) 740 CALL histwrite_phy(o_cldtjn, cldt*JrNt) 747 748 !CALL histwrite_phy(o_cldljn, cldl*JrNt) 749 IF (vars_defined) zx_tmp_fi2d=cldl*JrNt 750 CALL histwrite_phy(o_cldljn, zx_tmp_fi2d) 751 !CALL histwrite_phy(o_cldmjn, cldm*JrNt) 752 IF (vars_defined) zx_tmp_fi2d=cldm*JrNt 753 CALL histwrite_phy(o_cldmjn, zx_tmp_fi2d) 754 !CALL histwrite_phy(o_cldhjn, cldh*JrNt) 755 IF (vars_defined) zx_tmp_fi2d=cldh*JrNt 756 CALL histwrite_phy(o_cldhjn, zx_tmp_fi2d) 757 !CALL histwrite_phy(o_cldtjn, cldt*JrNt) 758 IF (vars_defined) zx_tmp_fi2d=cldt*JrNt 759 CALL histwrite_phy(o_cldtjn, zx_tmp_fi2d) 760 741 761 CALL histwrite_phy(o_cldq, cldq) 742 762 IF (vars_defined) zx_tmp_fi2d(1:klon) = flwp(1:klon) … … 932 952 IF (type_ocean=='slab ') THEN 933 953 CALL histwrite_phy(o_slab_qflux, slab_wfbils) 934 CALL histwrite_phy(o_slab_bils, slab_bils)954 !CALL histwrite_phy(o_slab_bils, slab_bils) 935 955 IF (nslay.EQ.1) THEN 936 956 zx_tmp_fi2d(:)=tslab(:,1) … … 967 987 ENDDO 968 988 ENDIF 969 CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d)989 !CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d) 970 990 971 991 IF (vars_defined) THEN … … 974 994 ENDDO 975 995 ENDIF 976 CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d)996 !CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d) 977 997 978 998 CALL histwrite_phy(o_qsat2m, qsat2m) … … 996 1016 CALL histwrite_phy(o_od550aer, od550aer) 997 1017 CALL histwrite_phy(o_od865aer, od865aer) 998 CALL histwrite_phy(o_abs visaer, absvisaer)1018 CALL histwrite_phy(o_abs550aer, abs550aer) 999 1019 CALL histwrite_phy(o_od550lt1aer, od550lt1aer) 1000 1020 CALL histwrite_phy(o_sconcso4, sconcso4) … … 1136 1156 CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d) 1137 1157 CALL histwrite_phy(o_rhum, zx_rh) 1138 CALL histwrite_phy(o_ozone, & 1139 wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 1158 !CALL histwrite_phy(o_ozone, & 1159 ! wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 1160 IF (vars_defined) zx_tmp_fi3d = wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd 1161 CALL histwrite_phy(o_ozone, zx_tmp_fi3d) 1140 1162 1141 1163 IF (read_climoz == 2) THEN 1142 CALL histwrite_phy(o_ozone_light, & 1143 wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 1144 ENDIF 1145 1164 !CALL histwrite_phy(o_ozone_light, & 1165 ! wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 1166 IF (vars_defined) zx_tmp_fi3d = wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd 1167 CALL histwrite_phy(o_ozone_light, zx_tmp_fi3d) 1168 ENDIF 1169 1170 !AS: dans phys_output_write il y a en plus : CALL histwrite_phy(o_duphy, d_u) 1146 1171 CALL histwrite_phy(o_dtphy, d_t) 1147 1172 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap)) … … 1585 1610 #endif 1586 1611 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1587 IF (nqtot.GE.nqo+1) THEN 1588 DO iq=nqo+1,nqtot 1589 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1590 1612 IF (nqtot.GE.nqo+1) THEN 1613 !AS: type_trac = 'lmdz' par defaut dans libf/dyn3d/conf_gcm.F90 1614 !Changé par inca, repr(obus), coag(ulation), co2i(nteractif), PAS par SPLA 1615 !Cet "if" est donc inutile : IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1616 DO iq=nqo+1,nqtot 1591 1617 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 1592 1618 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) … … 1612 1638 ENDIF 1613 1639 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 1614 ENDIF1615 ENDDO1640 ENDDO 1641 !ENDIF 1616 1642 ENDIF 1617 1643 … … 1639 1665 ENDIF 1640 1666 1641 ENDDO 1667 ENDDO ! iinit 1642 1668 1643 1669 IF (vars_defined) THEN -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/phytracr_spl_mod.F90
r2648 r3851 3 3 4 4 MODULE phytracr_spl_mod 5 6 5 7 6 ! Recuperation des morceaux de la physique de Jeronimo specifiques … … 35 34 CHARACTER*800 fileregionsdimsbb 36 35 CHARACTER*800 fileregionsdimswstar 37 ! CHARACTER*800 filescaleparamsind38 ! CHARACTER*800 filescaleparamsdust39 ! CHARACTER*800 filescaleparamsbb40 36 CHARACTER*100 paramname_ind 41 37 CHARACTER*100 paramname_bb … … 424 420 !$OMP THREADPRIVATE(flux_sparam_sscoa,u10m_ss,v10m_ss) 425 421 426 ! Select dust emission scheme ver the Sahara:422 ! Select dust emission scheme for the Sahara: 427 423 ! LOGICAL,PARAMETER,SAVE :: ok_chimeredust=.FALSE. 428 424 LOGICAL,PARAMETER :: ok_chimeredust=.TRUE. 429 425 !!!!!! !$OMP THREADPRIVATE(ok_chimeredust) 430 426 431 !OH REAL,SAVE :: scale_param_ssacc !Scaling parameter for Fine Sea Salt432 !OH REAL,SAVE :: scale_param_sscoa !Scaling parameter for Coarse Sea Salt433 !OH REAL,ALLOCATABLE,SAVE :: scale_param_ind(nbreg_ind) !Scaling parameter for industrial emissionsi of SO2434 !OH REAL,ALLOCATABLE,SAVE :: scale_param_bb(nbreg_bb) !Scaling parameter for biomas burning (SO2, BC & OM)435 !OH REAL,ALLOCATABLE,SAVE :: scale_param_ff(nbreg_ind) !Scaling parameter for industrial emissions (fossil fuel)436 !OH REAL,ALLOCATABLE,SAVE :: scale_param_dustacc(nbreg_dust) !Scaling parameter for Fine Dust437 !OH REAL,ALLOCATABLE,SAVE :: scale_param_dustcoa(nbreg_dust) !Scaling parameter for Coarse Dust438 !OH REAL,ALLOCATABLE,SAVE :: scale_param_dustsco(nbreg_dust) !Scaling parameter for SCoarse Dust439 !OH REAL,ALLOCATABLE,SAVE :: param_wstarBLperregion(nbreg_wstardust)440 !OH REAL,ALLOCATABLE,SAVE :: param_wstarWAKEperregion(nbreg_wstardust)441 !!!! !$OMP THREADPRIVATE( scale_param_ssacc, scale_param_sscoa, scale_param_ind, scale_param_bb, scale_param_ff, scale_param_dustacc, scale_param_dustcoa, scale_param_dustsco, param_wstarBLperregion, param_wstarWAKEperregion)442 443 427 444 428 CONTAINS 445 429 ! 446 430 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 447 SUBROUTINE phytracr_spl_ ini(klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust)431 SUBROUTINE phytracr_spl_out_init() 448 432 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 449 450 451 IMPLICIT NONE 452 INTEGER klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust 453 454 ALLOCATE( tsol(klon) ) 455 fileregionsdimsind='regions_ind_meta' 456 fileregionsdimsdust='regions_dustacc_meta' 457 ! fileregionsdimsdust='regions_dust_meta' 458 fileregionsdimsbb='regions_bb_meta' 459 fileregionsdimswstar='regions_pwstarwake_meta' 460 call readregionsdims2_spl(nbreg_ind,fileregionsdimsind) 461 call readregionsdims2_spl(nbreg_dust,fileregionsdimsdust) 462 call readregionsdims2_spl(nbreg_bb,fileregionsdimsbb) 463 call readregionsdims2_spl(nbreg_wstardust,fileregionsdimswstar) 464 465 !readregions_spl() 466 467 ALLOCATE(scale_param_ind(nbreg_ind)) 468 ALLOCATE(scale_param_bb(nbreg_bb)) 469 ALLOCATE(scale_param_ff(nbreg_ind)) 470 ALLOCATE(scale_param_dustacc(nbreg_dust)) 471 ALLOCATE(scale_param_dustcoa(nbreg_dust)) 472 ALLOCATE(scale_param_dustsco(nbreg_dust)) 473 ALLOCATE(param_wstarBLperregion(nbreg_wstardust)) 474 ALLOCATE(param_wstarWAKEperregion(nbreg_wstardust)) 475 ALLOCATE( dust_ec(klon) ) 476 ALLOCATE( u10m_ec(klon) ) 477 ALLOCATE( v10m_ec(klon) ) 478 ALLOCATE( lmt_so2volc_cont(klon) ) 479 ALLOCATE( lmt_altvolc_cont(klon) ) 480 ALLOCATE( lmt_so2volc_expl(klon) ) 481 ALLOCATE( lmt_altvolc_expl(klon) ) 482 ALLOCATE( lmt_so2ff_l(klon) ) 483 ALLOCATE( lmt_so2ff_h(klon) ) 484 ALLOCATE( lmt_so2nff(klon) ) 485 ALLOCATE( lmt_so2ba(klon) ) 486 ALLOCATE( lmt_so2bb_l(klon) ) 487 ALLOCATE( lmt_so2bb_h(klon) ) 488 ALLOCATE( lmt_dmsconc(klon) ) 489 ALLOCATE( lmt_dmsbio(klon) ) 490 ALLOCATE( lmt_h2sbio(klon) ) 491 ALLOCATE( lmt_bcff(klon) ) 492 ALLOCATE( lmt_bcnff(klon) ) 493 ALLOCATE( lmt_bcbb_l(klon) ) 494 ALLOCATE( lmt_bcbb_h(klon) ) 495 ALLOCATE( lmt_bcba(klon) ) 496 ALLOCATE( lmt_omff(klon) ) 497 ALLOCATE( lmt_omnff(klon) ) 498 ALLOCATE( lmt_ombb_l(klon) ) 499 ALLOCATE( lmt_ombb_h(klon) ) 500 ALLOCATE( lmt_omnat(klon) ) 501 ALLOCATE( lmt_omba(klon) ) 502 ALLOCATE(lmt_sea_salt(klon,ss_bins)) 503 504 505 506 507 !temporal hardcoded null inicialization of assimilation emmision factors 508 scale_param_ssacc=1. 509 scale_param_sscoa=1. 510 scale_param_ind(:)=1. 511 scale_param_bb(:)=1. 512 scale_param_ff(:)=1. 513 scale_param_dustacc(:)=1. 514 scale_param_dustcoa(:)=1. 515 scale_param_dustsco(:)=1. 516 param_wstarBLperregion(:)=0. 517 param_wstarWAKEperregion(:)=0. 518 519 520 521 RETURN 522 END SUBROUTINE phytracr_spl_ini 523 524 525 526 527 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 528 SUBROUTINE phytracr_spl ( debutphy,lafin,jD_cur,jH_cur,iflag_conv, & ! I 529 pdtphys,ftsol, & ! I 530 t_seri,q_seri,paprs,pplay,RHcl, & ! I 531 pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & ! I 532 coefh, cdragh, cdragm, yu1, yv1, & ! I 533 u_seri, v_seri, rlat,rlon, & ! I 534 pphis,pctsrf,pmflxr,pmflxs,prfl,psfl, & ! I 535 da,phi,phi2,d1a,dam,mp,ep,sigd,sij,clw,elij, & ! I 536 epmlmMm,eplaMm,upwd,dnwd,itop_con,ibas_con, & ! I 537 evapls,wdtrainA, wdtrainM,wght_cvfd, & ! I 538 fm_therm, entr_therm, rneb, & ! I 539 beta_fisrt,beta_v1, & ! I 540 zu10m,zv10m,wstar,ale_bl,ale_wake, & ! I 541 d_tr_dyn,tr_seri) ! O 542 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 543 544 USE mod_grid_phy_lmdz 545 USE mod_phys_lmdz_para 546 USE IOIPSL 547 USE dimphy 548 USE infotrac 549 USE indice_sol_mod 550 USE write_field_phy 551 552 553 USE mod_phys_lmdz_transfert_para 554 555 USE phys_cal_mod, only: jD_1jan,year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 556 mth_cur, phys_cal_update 557 558 ! 559 IMPLICIT none 560 ! 561 562 !====================================================================== 563 ! Auteur(s) FH 564 ! Objet: Moniteur general des tendances traceurs 565 ! 566 ! Remarques en vrac: 567 ! ------------------ 568 ! 1/ le call phytrac se fait avec nqmax-2 donc nous avons bien 569 ! les vrais traceurs (nbtr) dans phytrac (pas la vapeur ni eau liquide) 570 !====================================================================== 571 #include "dimensions.h" 572 #include "chem.h" 573 #include "chem_spla.h" 574 #include "YOMCST.h" 575 #include "YOETHF.h" 576 #include "paramet.h" 577 #include "thermcell.h" 578 579 !====================================================================== 580 581 ! Arguments: 582 ! 583 ! EN ENTREE: 584 ! ========== 585 ! 586 ! divers: 587 ! ------- 588 ! 589 real,intent(in) :: pdtphys ! pas d'integration pour la physique (seconde) 590 REAL, intent(in):: jD_cur, jH_cur 591 real, intent(in) :: ftsol(klon,nbsrf) ! temperature du sol par type 592 real, intent(in) :: t_seri(klon,klev) ! temperature 593 real, intent(in) :: u_seri(klon,klev) ! vent 594 real , intent(in) :: v_seri(klon,klev) ! vent 595 real , intent(in) :: q_seri(klon,klev) ! vapeur d eau kg/kg 596 597 LOGICAL, INTENT(IN) :: lafin 598 599 real tr_seri(klon,klev,nbtr) ! traceur 600 real tmp_var(klon,klev) ! auxiliary variable to replace traceur 601 real tmp_var2(klon,nbtr) ! auxiliary variable to replace source 602 real tmp_var3(klon,klev,nbtr) ! auxiliary variable 3D 603 real dummy1d ! JE auxiliary variable 604 real aux_var2(klon) ! auxiliary variable to replace traceur 605 real aux_var3(klon,klev) ! auxiliary variable to replace traceur 606 real d_tr(klon,klev,nbtr) ! traceur tendance 607 real sconc_seri(klon,nbtr) ! surface concentration of traceur 608 ! 609 integer nbjour 610 save nbjour 611 !$OMP THREADPRIVATE(nbjour) 612 ! 613 INTEGER masque_aqua_cur(klon) 614 INTEGER masque_terra_cur(klon) 615 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: masque_aqua !mask for 1 day 616 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: masque_terra ! 617 !$OMP THREADPRIVATE(masque_aqua,masque_terra) 618 !!$OMP THREADPRIVATE(aod550_aqua,aod550_terra,aod670_aqua,aod670_terra) 619 !!$OMP THREADPRIVATE(aod865_aqua,aod865_terra) 620 621 INTEGER, SAVE :: nbreg_dust, nbreg_ind, nbreg_bb, nbreg_ss,nbreg_wstardust 622 !$OMP THREADPRIVATE(nbreg_dust, nbreg_ind, nbreg_bb,nbreg_ss,nbreg_wstardust) 623 624 625 626 REAL lmt_dms(klon) ! emissions de dms 627 628 !JE20150518<< 629 REAL, DIMENSION(klon_glo) :: aod550_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 630 REAL, DIMENSION(klon_glo) :: aod550_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 631 REAL, DIMENSION(klon_glo) :: aod550_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 632 REAL, DIMENSION(klon_glo) :: aod550_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 633 REAL, DIMENSION(klon_glo) :: aod550_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 634 REAL, DIMENSION(klon_glo) :: aod670_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 635 REAL, DIMENSION(klon_glo) :: aod670_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 636 REAL, DIMENSION(klon_glo) :: aod670_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 637 REAL, DIMENSION(klon_glo) :: aod670_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 638 REAL, DIMENSION(klon_glo) :: aod670_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 639 REAL, DIMENSION(klon_glo) :: aod865_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 640 REAL, DIMENSION(klon_glo) :: aod865_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 641 REAL, DIMENSION(klon_glo) :: aod865_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 642 REAL, DIMENSION(klon_glo) :: aod865_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 643 REAL, DIMENSION(klon_glo) :: aod865_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 644 645 REAL, DIMENSION(klon_glo) :: aod550_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 646 REAL, DIMENSION(klon_glo) :: aod550_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 647 REAL, DIMENSION(klon_glo) :: aod550_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 648 REAL, DIMENSION(klon_glo) :: aod550_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 649 REAL, DIMENSION(klon_glo) :: aod550_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 650 REAL, DIMENSION(klon_glo) :: aod670_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 651 REAL, DIMENSION(klon_glo) :: aod670_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 652 REAL, DIMENSION(klon_glo) :: aod670_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 653 REAL, DIMENSION(klon_glo) :: aod670_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 654 REAL, DIMENSION(klon_glo) :: aod670_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 655 REAL, DIMENSION(klon_glo) :: aod865_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 656 REAL, DIMENSION(klon_glo) :: aod865_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 657 REAL, DIMENSION(klon_glo) :: aod865_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 658 REAL, DIMENSION(klon_glo) :: aod865_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 659 REAL, DIMENSION(klon_glo) :: aod865_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 660 !!!!!!!!!!!!! 661 !JE20150518>> 662 663 664 665 666 real , intent(in) :: paprs(klon,klev+1) ! pression pour chaque inter-couche (en Pa) 667 real , intent(in) :: pplay(klon,klev) ! pression pour le mileu de chaque couche (en Pa) 668 real , intent(in) :: RHcl(klon,klev) ! humidite relativen ciel clair 669 real znivsig(klev) ! indice des couches 670 real paire(klon) 671 real, intent(in) :: pphis(klon) 672 real, intent(in) :: pctsrf(klon,nbsrf) 673 logical , intent(in) :: debutphy ! le flag de l'initialisation de la physique 674 ! 675 ! Scaling Parameters: 676 ! ---------------------- 677 ! 678 CHARACTER*50 c_Directory 679 CHARACTER*80 c_FileName1 680 CHARACTER*80 c_FileName2 681 CHARACTER*130 c_FullName1 682 CHARACTER*130 c_FullName2 683 INTEGER :: xidx, yidx 684 INTEGER,DIMENSION(klon) :: mask_bbreg 685 INTEGER,DIMENSION(klon) :: mask_ffso2reg 686 INTEGER :: aux_mask1 687 INTEGER :: aux_mask2 688 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_so4 !Defines regions for SO4 689 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_ind !Defines regions for SO2, BC & OM 690 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_bb !Defines regions for SO2, BC & OM 691 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_dust !Defines dust regions 692 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_wstardust !Defines dust regions 693 !$OMP THREADPRIVATE(iregion_so4,iregion_ind,iregion_bb,iregion_dust,iregion_wstardust) 694 695 ! Emissions: 696 697 ! 698 !---------------------------- SEA SALT & DUST emissions ------------------------ 699 REAL lmt_sea_salt(klon,ss_bins) !Sea salt 0.03-8.0 um 700 REAL u10m_ec1(klon),v10m_ec1(klon) 701 REAL u10m_ec2(klon),v10m_ec2(klon),dust_ec2(klon) 702 REAL dust_ec(klon) 703 ! new dust emission chimere je20140522 704 REAL,DIMENSION(klon),INTENT(IN) :: zu10m 705 REAL,DIMENSION(klon),INTENT(IN) :: zv10m 706 REAL,DIMENSION(klon),INTENT(IN) :: wstar,ale_bl,ale_wake 707 708 709 ! 710 ! Rem : nbtr : nombre de vrais traceurs est defini dans dimphy.h 711 712 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 713 !Dynamique 714 !-------- 715 REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: d_tr_dyn 716 717 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 718 ! convection: 719 ! ----------- 720 ! 721 REAL , intent(in) :: pmfu(klon,klev) ! flux de masse dans le panache montant 722 REAL , intent(in) :: pmfd(klon,klev) ! flux de masse dans le panache descendant 723 REAL, intent(in) :: pen_u(klon,klev) ! flux entraine dans le panache montant 724 REAL, intent(in) :: pde_u(klon,klev) ! flux detraine dans le panache montant 725 REAL, intent(in) :: pen_d(klon,klev) ! flux entraine dans le panache descendant 726 REAL, intent(in) :: pde_d(klon,klev) ! flux detraine dans le panache descendant 727 ! 728 ! Convection KE scheme: 729 ! --------------------- 730 ! 731 !! Variables pour le lessivage convectif 732 REAL,DIMENSION(klon,klev),INTENT(IN) :: da 733 REAL,DIMENSION(klon,klev,klev),INTENT(IN):: phi 734 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: phi2 735 REAL,DIMENSION(klon,klev),INTENT(IN) :: d1a,dam 736 REAL,DIMENSION(klon,klev),INTENT(IN) :: mp 737 REAL,DIMENSION(klon,klev),INTENT(IN) :: upwd ! saturated 738 ! updraft mass flux 739 REAL,DIMENSION(klon,klev),INTENT(IN) :: dnwd ! saturated 740 ! downdraft mass flux 741 INTEGER,DIMENSION(klon),INTENT(IN) :: itop_con 742 INTEGER,DIMENSION(klon),INTENT(IN) :: ibas_con 743 REAL,DIMENSION(klon,klev) :: evapls 744 REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainA 745 REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainM 746 747 748 REAL,DIMENSION(klon,klev),INTENT(IN) :: ep 749 REAL,DIMENSION(klon),INTENT(IN) :: sigd 750 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: sij 751 REAL,DIMENSION(klon,klev),INTENT(IN) :: clw 752 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: elij 753 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: epmlmMm 754 REAL,DIMENSION(klon,klev),INTENT(IN) :: eplaMm 755 REAL,DIMENSION(klon,klev),INTENT(IN) :: wght_cvfd !RL 756 757 758 ! KE: Tendances de traceurs (Td) et flux de traceurs: 759 ! ------------------------ 760 REAL,DIMENSION(klon,klev) :: Mint 761 REAL,DIMENSION(klon,klev,nbtr) :: zmfd1a 762 REAL,DIMENSION(klon,klev,nbtr) :: zmfdam 763 REAL,DIMENSION(klon,klev,nbtr) :: zmfphi2 764 765 ! !tra dans pluie LS a la surf. 766 ! outputs for cvltr_spl 767 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cv_o 768 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_trsp_o 769 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sscav_o 770 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sat_o 771 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_uscav_o 772 !!!!!!!!!!!!!!!!! 773 !!!!!!!!!!!!!!!!! 774 !!!!!!!!!!!!!!!!! 775 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_insc_o 776 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_bcscav_o 777 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_evapls_o 778 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_ls_o 779 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_dyn_o 780 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cl_o 781 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_th_o 782 !!!!!!!!!!!!!!!!! 783 !!!!!!!!!!!!!!!!! 784 !!!!!!!!!!!!!!!!! 785 786 !$OMP THREADPRIVATE(d_tr_cv_o,d_tr_trsp_o,d_tr_sscav_o,d_tr_sat_o,d_tr_uscav_o) 787 !$OMP THREADPRIVATE(d_tr_insc_o,d_tr_bcscav_o,d_tr_evapls_o,d_tr_ls_o) 788 !$OMP THREADPRIVATE(d_tr_dyn_o,d_tr_cl_o,d_tr_th_o) 789 790 791 INTEGER :: nsplit 792 ! 793 794 795 796 ! 797 ! Lessivage 798 ! --------- 799 ! 800 REAL, intent(in) :: pmflxr(klon,klev+1), pmflxs(klon,klev+1) !--convection 801 REAL, intent(in) :: prfl(klon,klev+1), psfl(klon,klev+1) !--large-scale 802 ! JE REAL pmflxr(klon,klev), pmflxs(klon,klev) !--convection ! Titane 803 ! JE REAL prfl(klon,klev), psfl(klon,klev) !--large-scale ! Titane 804 REAL :: ql_incl ! contenu en eau liquide nuageuse dans le nuage ! ql_incl=oliq/rneb 805 REAL :: ql_incloud_ref ! ref value of in-cloud condensed water content 806 807 REAL,DIMENSION(klon,klev),INTENT(IN) :: rneb ! fraction nuageuse (grande echelle) 808 ! 809 810 REAL,DIMENSION(klon,klev) :: beta_fisrt ! taux de conversion 811 ! ! de l'eau cond (de fisrtilp) 812 REAL,DIMENSION(klon,klev) :: beta_v1 ! -- (originale version) 813 INTEGER,SAVE :: iflag_lscav_omp,iflag_lscav 814 !$OMP THREADPRIVATE(iflag_lscav_omp,iflag_lscav) 815 816 817 818 819 !Thermiques: 820 !---------- 821 REAL,DIMENSION(klon,klev+1),INTENT(IN) :: fm_therm 822 REAL,DIMENSION(klon,klev),INTENT(IN) :: entr_therm 823 824 825 ! 826 ! Couche limite: 827 ! -------------- 828 ! 829 REAL , intent(in) :: coefh(klon,klev) ! coeff melange CL 830 REAL , intent(in) :: cdragh(klon), cdragm(klon) 831 REAL, intent(in) :: yu1(klon) ! vent dans la 1iere couche 832 REAL, intent(in) :: yv1(klon) ! vent dans la 1iere couche 833 ! 834 ! 835 !---------------------------------------------------------------------- 836 REAL his_ds(klon,nbtr) 837 REAL his_dh(klon,nbtr) 838 REAL his_dhlsc(klon,nbtr) ! in-cloud scavenging lsc 839 REAL his_dhcon(klon,nbtr) ! in-cloud scavenging con 840 REAL his_dhbclsc(klon,nbtr) ! below-cloud scavenging lsc 841 REAL his_dhbccon(klon,nbtr) ! below-cloud scavenging con 842 REAL trm(klon,nbtr) 843 ! 844 REAL u10m_ec(klon), v10m_ec(klon) 845 ! 846 REAL his_th(klon,nbtr) 847 REAL his_dhkecv(klon,nbtr) 848 REAL his_dhkelsc(klon,nbtr) 849 850 851 ! 852 ! Coordonnees 853 ! ----------- 854 ! 855 REAL, intent(in) :: rlat(klon) ! latitudes pour chaque point 856 REAL, intent(in) :: rlon(klon) ! longitudes pour chaque point 857 ! 858 INTEGER i, k, it, j, ig 859 ! 860 ! DEFINITION OF DIAGNOSTIC VARIABLES 861 ! 862 REAL diag_trm(nbtr), diag_drydep(nbtr) 863 REAL diag_wetdep(nbtr), diag_cvtdep(nbtr) 864 REAL diag_emissn(nbtr), diag_g2part 865 REAL diag_sedimt 866 REAL trm_aux(nbtr), src_aux(nbtr) 867 ! 868 ! Variables locales pour effectuer les appels en serie 869 !---------------------------------------------------- 870 REAL source_tr(klon,nbtr) 871 REAL flux_tr(klon,nbtr) 872 REAL m_conc(klon,klev) 873 ! REAL sed_ss(klon) ! corresponds to tracer 3 874 ! REAL sed_dust(klon) ! corresponds to tracer 4 875 ! REAL sed_dustsco(klon) ! corresponds to tracer 4 876 REAL henry(nbtr) !--cste de Henry mol/l/atm 877 REAL kk(nbtr) !--coefficient de var avec T (K) 878 REAL alpha_r(nbtr)!--coefficient d'impaction pour la pluie 879 REAL alpha_s(nbtr)!--coefficient d'impaction pour la neige 880 REAL vdep_oce(nbtr), vdep_sic(nbtr) 881 REAL vdep_ter(nbtr), vdep_lic(nbtr) 882 REAL ccntrAA_spla(nbtr) 883 REAL ccntrENV_spla(nbtr) 884 REAL coefcoli_spla(nbtr) 885 REAL dtrconv(klon,nbtr) 886 REAL zrho(klon,klev), zdz(klon,klev) 887 REAL zalt(klon,klev) 888 REAL,DIMENSION(klon,klev) :: zmasse ! densité atmosphérique 889 ! . Kg/m2 890 REAL,DIMENSION(klon,klev) :: ztra_th 891 REAL qmin, qmax, aux 892 ! PARAMETER (qmin=0.0, qmax=1.e33) 893 PARAMETER (qmin=1.e33, qmax=-1.e33) 894 895 ! Variables to save data into file 896 !---------------------------------- 897 898 CHARACTER*2 str2 899 LOGICAL ok_histrac 900 !JE2014124 PARAMETER (ok_histrac=.true.) 901 PARAMETER (ok_histrac=.false.) 902 ! PARAMETER (ok_chimeredust=.false.) 903 ! PARAMETER (ok_chimeredust=.true.) 904 INTEGER ndex2d(iim*(jjm+1)), ndex3d(iim*(jjm+1)*klev) 905 INTEGER nhori1, nhori2, nhori3, nhori4, nhori5, nvert 906 INTEGER nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5 907 SAVE nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5 908 !$OMP THREADPRIVATE(nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5) 909 INTEGER itra 910 SAVE itra ! compteur pour la physique 911 !$OMP THREADPRIVATE(itra) 912 INTEGER ecrit_tra, ecrit_tra_h, ecrit_tra_m 913 SAVE ecrit_tra, ecrit_tra_h, ecrit_tra_m 914 !$OMP THREADPRIVATE(ecrit_tra, ecrit_tra_h, ecrit_tra_m) 915 REAL presnivs(klev) ! pressions approximat. des milieux couches ( en PA) 916 REAL zx_tmp_2d(iim,jjm+1), zx_tmp_3d(iim,jjm+1,klev) 917 REAL zx_tmp_fi2d(klon), zx_tmp_fi3d(klon, klev) 918 ! REAL zx_lon(iim,jjm+1), zx_lat(iim,jjm+1) 919 REAL zx_lon_glo(nbp_lon,nbp_lat), zx_lat_glo(nbp_lon,nbp_lat) 920 REAL zsto, zout, zout_h, zout_m, zjulian 921 922 !------Molar Masses 923 REAL masse(nbtr) 924 ! 925 REAL fracso2emis !--fraction so2 emis en so2 926 PARAMETER (fracso2emis=0.95) 927 REAL frach2sofso2 !--fraction h2s from so2 928 PARAMETER (frach2sofso2=0.0426) 929 ! 930 ! Controles 931 !------------- 932 LOGICAL convection,lessivage,lminmax,lcheckmass 933 DATA convection,lessivage,lminmax,lcheckmass & 934 /.true.,.true.,.true.,.false./ 935 ! 936 REAL xconv(nbtr) 937 ! 938 LOGICAL anthropo, bateau, edgar 939 DATA anthropo,bateau,edgar/.true.,.true.,.true./ 940 ! 941 !c bc_source 942 INTEGER kminbc, kmaxbc 943 !JE20150715 PARAMETER (kminbc=3, kmaxbc=5) 944 PARAMETER (kminbc=4, kmaxbc=7) 945 ! 946 REAL tr1_cont, tr2_cont, tr3_cont, tr4_cont 947 ! 948 ! JE for updating in cltrac 949 REAL,DIMENSION(klon,klev) :: delp ! epaisseur de couche (Pa) 950 !JE20140507 REAL,DIMENSION(klon,nbtr) :: d_tr_dry ! Td depot sec/traceur (1st layer),ALLOCATABLE,SAVE jyg 951 !JE20140507 REAL,DIMENSION(klon,nbtr) :: flux_tr_dry 952 ! SAVE d_tr_dry 953 !! JE for include gas to particle conversion in output 954 ! REAL his_g2pgas(klon) ! gastoparticle in gas units (check!) 955 ! REAL his_g2paer(klon) ! gastoparticle in aerosol units (check!) 956 ! 957 INTEGER ,intent(in) :: iflag_conv 958 LOGICAL iscm3 ! debug variable. for checkmass ! JE 959 960 !------------------------------------------------------------------------ 961 ! only to compute time consumption of each process 962 !---- 963 INTEGER clock_start,clock_end,clock_rate,clock_start_spla 964 INTEGER clock_end_outphytracr,clock_start_outphytracr 965 INTEGER ti_init,dife,ti_inittype,ti_inittwrite 966 INTEGER ti_spla,ti_emis,ti_depo,ti_cltr,ti_ther 967 INTEGER ti_sedi,ti_gasp,ti_wetap,ti_cvltr,ti_lscs,ti_brop,ti_outs 968 INTEGER ti_nophytracr,clock_per_max 969 REAL tia_init,tia_inittype,tia_inittwrite 970 REAL tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther 971 REAL tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs 972 REAL tia_brop,tia_outs 973 REAL tia_nophytracr 974 975 SAVE tia_init,tia_inittype,tia_inittwrite 976 SAVE tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther 977 SAVE tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs 978 SAVE tia_brop,tia_outs 979 SAVE ti_nophytracr 980 SAVE tia_nophytracr 981 SAVE clock_end_outphytracr,clock_start_outphytracr 982 SAVE clock_per_max 983 LOGICAL logitime 984 !$OMP THREADPRIVATE(tia_init,tia_inittype,tia_inittwrite) 985 !$OMP THREADPRIVATE(tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther) 986 !$OMP THREADPRIVATE(tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs) 987 !$OMP THREADPRIVATE(tia_brop,tia_outs) 988 !$OMP THREADPRIVATE(ti_nophytracr) 989 !$OMP THREADPRIVATE(tia_nophytracr) 990 !$OMP THREADPRIVATE(clock_end_outphytracr,clock_start_outphytracr) 991 !$OMP THREADPRIVATE(clock_per_max) 992 993 ! utils parallelization 994 REAL :: auxklon_glo(klon_glo) 995 INTEGER :: iauxklon_glo(klon_glo) 996 REAL, DIMENSION(klon_glo,nbp_lev) :: auxklonnbp_lev 997 REAL, DIMENSION(klon_glo,nbp_lev,nbtr) :: auxklonklevnbtr_glo 998 REAL,DIMENSION(nbp_lon,nbp_lat) :: zx_tmp_2d_glo 999 REAL,DIMENSION(nbp_lon,nbp_lat,nbp_lev) :: zx_tmp_3d_glo 1000 REAL,DIMENSION(klon_glo) :: zx_tmp_fi2d_glo 1001 REAL,DIMENSION(klon_glo , nbp_lev) :: zx_tmp_fi3d_glo 1002 REAL,DIMENSION(klon_glo,nbtr) :: auxklonnbtr_glo 1003 1004 1005 1006 source_tr=0. 1007 1008 1009 1010 if (debutphy) then 1011 #ifdef IOPHYS_DUST 1012 CALL iophys_ini 1013 #endif 1014 nbreg_ind=1 1015 nbreg_bb=1 1016 nbreg_dust=1 1017 nbreg_wstardust=1 1018 CALL phytracr_spl_ini(klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust) 1019 endif 1020 1021 1022 #ifdef IOPHYS_DUST 1023 do it=1,nbtr 1024 write(str2,'(i2.2)') it 1025 call iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,it)) 1026 enddo 1027 #endif 1028 1029 1030 1031 1032 ijulday=jD_cur-jD_1jan+1 1033 nbjour = 1 1034 1035 paramname_ind='ind' 1036 paramname_bb='bb' 1037 paramname_ff='ind' 1038 paramname_dustacc='dustacc' 1039 paramname_dustcoa='dustcoasco' 1040 paramname_dustsco='dustcoasco' 1041 ! paramname_dustacc='dust' 1042 ! paramname_dustcoa='dust' 1043 ! paramname_dustsco='dust' 1044 paramname_wstarBL='pwstarbl' 1045 paramname_wstarWAKE='pwstarwake' 1046 paramname_ssacc='ssacc' 1047 paramname_sscoa='sscoa' 1048 1049 filescaleparams='modvalues.nc' 1050 CALL readscaleparamsnc_spl(scale_param_ind, & 1051 nbreg_ind, paramname_ind, & 1052 scale_param_ff, nbreg_ind,paramname_ff, & 1053 scale_param_bb, nbreg_bb,paramname_bb, & 1054 scale_param_dustacc, nbreg_dust,paramname_dustacc, & 1055 scale_param_dustcoa, nbreg_dust,paramname_dustcoa, & 1056 scale_param_dustsco, nbreg_dust,paramname_dustsco, & 1057 param_wstarBLperregion, nbreg_wstardust, paramname_wstarBL, & 1058 param_wstarWAKEperregion, nbreg_wstardust, paramname_wstarWAKE, & 1059 scale_param_ssacc , paramname_ssacc, & 1060 scale_param_sscoa , paramname_sscoa, & 1061 filescaleparams,ijulday,jH_cur, pdtphys,debutphy) 1062 ! add seasalt 1063 1064 print *,'JE : check scale_params' 1065 1066 print *, 'nbreg_ind', nbreg_ind 1067 print *, 'nbreg_dust', nbreg_dust 1068 print *, 'nbreg_bb', nbreg_bb 1069 print *, 'ind', scale_param_ind 1070 print *, 'dustacc', scale_param_dustacc 1071 print *, 'dustcoa', scale_param_dustcoa 1072 print *, 'dustsco', scale_param_dustsco 1073 print *, 'wstardustBL', param_wstarBLperregion 1074 print *, 'wstardustWAKE', param_wstarWAKEperregion 1075 print *, 'ff', scale_param_ff 1076 print *, 'bb', scale_param_bb 1077 print *, 'ssacc', scale_param_ssacc 1078 print *, 'sscoa', scale_param_sscoa 1079 1080 print *,'JE: before read_newemissions ' 1081 print *,'JE: jD_cur:',jD_cur,' ijulday:',ijulday,' jH_cur:',jH_cur,' pdtphys:',pdtphys 1082 print *,'JE: now read_newemissions:' 1083 print *,'lmt_so2ff_l AVANT' , MINVAL(lmt_so2ff_l), MAXVAL(lmt_so2ff_l) 1084 call read_newemissions(ijulday,jH_cur ,edgar, flag_dms,debutphy, & !I 1085 pdtphys, lafin, nbjour, pctsrf, & !I 1086 t_seri, rlat, rlon, & !I 1087 pmflxr, pmflxs, prfl, psfl, & !I 1088 u10m_ec, v10m_ec, dust_ec, & !O 1089 lmt_sea_salt, lmt_so2ff_l, & !O 1090 lmt_so2ff_h, lmt_so2nff, & !O 1091 lmt_so2ba, lmt_so2bb_l, lmt_so2bb_h, & !O 1092 lmt_so2volc_cont, lmt_altvolc_cont, & !O 1093 lmt_so2volc_expl, lmt_altvolc_expl, & !O 1094 lmt_dmsbio, lmt_h2sbio, lmt_dmsconc, & !O 1095 lmt_bcff, lmt_bcnff, lmt_bcbb_l, & !O 1096 lmt_bcbb_h, lmt_bcba, lmt_omff, & !O 1097 lmt_omnff, lmt_ombb_l, lmt_ombb_h, & !O 1098 lmt_omnat, lmt_omba) !O 1099 1100 1101 print *,'Check emissions' 1102 print *,'lmt_so2ff_l' , MINVAL(lmt_so2ff_l), MAXVAL(lmt_so2ff_l) 1103 print *,'lmt_so2ff_h' , MINVAL(lmt_so2ff_h), MAXVAL(lmt_so2ff_h) 1104 print *,'lmt_so2nff' , MINVAL(lmt_so2nff), MAXVAL(lmt_so2nff) 1105 print *,'lmt_so2ba' , MINVAL(lmt_so2ba), MAXVAL(lmt_so2ba) 1106 print *,'lmt_so2bb_l' , MINVAL(lmt_so2bb_l), MAXVAL(lmt_so2bb_l) 1107 print *,'lmt_so2bb_h' , MINVAL(lmt_so2bb_h), MAXVAL(lmt_so2bb_h) 1108 print *,'lmt_so2volc_cont' , MINVAL(lmt_so2volc_cont), MAXVAL(lmt_so2volc_cont) 1109 print *,'lmt_altvolc_cont' , MINVAL(lmt_altvolc_cont), MAXVAL(lmt_altvolc_cont) 1110 print *,'lmt_so2volc_expl' , MINVAL(lmt_so2volc_expl), MAXVAL(lmt_so2volc_expl) 1111 print *,'lmt_altvolc_expl' , MINVAL(lmt_altvolc_expl), MAXVAL(lmt_altvolc_expl) 1112 print *,'lmt_dmsbio' , MINVAL(lmt_dmsbio), MAXVAL(lmt_dmsbio) 1113 print *,'lmt_h2sbio' , MINVAL(lmt_h2sbio), MAXVAL(lmt_h2sbio) 1114 print *,'lmt_dmsconc' , MINVAL(lmt_dmsconc), MAXVAL(lmt_dmsconc) 1115 print *,'lmt_bcff' , MINVAL(lmt_bcff), MAXVAL(lmt_bcff) 1116 print *,'lmt_bcnff' , MINVAL(lmt_bcnff), MAXVAL(lmt_bcnff) 1117 print *,'lmt_bcbb_l' , MINVAL(lmt_bcbb_l), MAXVAL(lmt_bcbb_l) 1118 print *,'lmt_bcbb_h' , MINVAL(lmt_bcbb_h), MAXVAL(lmt_bcbb_h) 1119 print *,'lmt_bcba' , MINVAL(lmt_bcba), MAXVAL(lmt_bcba) 1120 print *,'lmt_omff' , MINVAL(lmt_omff), MAXVAL(lmt_omff) 1121 print *,'lmt_omnff' , MINVAL(lmt_omnff), MAXVAL(lmt_omnff) 1122 print *,'lmt_ombb_l' , MINVAL(lmt_ombb_l), MAXVAL(lmt_ombb_l) 1123 print *,'lmt_ombb_h' , MINVAL(lmt_ombb_h), MAXVAL(lmt_ombb_h) 1124 print *,'lmt_omnat' , MINVAL(lmt_omnat), MAXVAL(lmt_omnat) 1125 print *,'lmt_omba' , MINVAL(lmt_omba), MAXVAL(lmt_omba) 1126 print *,'JE iflag_con',iflag_conv 1127 1128 1129 !JE_dbg 1130 do i=1,klon 1131 tsol(i)=0.0 1132 do j=1,nbsrf 1133 tsol(i)=tsol(i)+ftsol(i,j)*pctsrf(i,j) 1134 enddo 1135 enddo 1136 1137 1138 !====================================================================== 1139 ! INITIALISATIONS 1140 !====================================================================== 1141 ! CALL checknanqfi(da(:,:),1.,-1.,' da_ before 1142 ! . phytracr_inphytracr') 1143 1144 ! 1145 ! computing time 1146 ! logitime=.true. 1147 logitime=.false. 1148 IF (logitime) THEN 1149 clock_start=0 1150 clock_end=0 1151 clock_rate=0 1152 CALL SYSTEM_CLOCK(COUNT_RATE=clock_rate,COUNT_MAX=clock_per_max) 1153 CALL SYSTEM_CLOCK(COUNT=clock_start_spla) 1154 clock_start=clock_start_spla 1155 clock_end_outphytracr=clock_start_spla 1156 ENDIF 1157 1158 1159 ! Definition of tracers index. 1160 print*,'OK ON PASSSE BIEN LA' 1161 CALL minmaxsource(source_tr,qmin,qmax,'A1 maxsource init phytracr') 1162 1163 1164 IF (debutphy) THEN 1165 id_prec=-1 1166 id_fine=-1 1167 id_coss=-1 1168 id_codu=-1 1169 id_scdu=-1 1170 !print *,nbtr 1171 do it=1,nbtr 1172 print *, it, tname(it+nqo) 1173 if (tname(it+nqo) == 'PREC' ) then 1174 id_prec=it 1175 endif 1176 if (tname(it+nqo) == 'FINE' ) then 1177 id_fine=it 1178 endif 1179 if (tname(it+nqo) == 'COSS' ) then 1180 id_coss=it 1181 endif 1182 if (tname(it+nqo) == 'CODU' ) then 1183 id_codu=it 1184 endif 1185 if (tname(it+nqo) == 'SCDU' ) then 1186 id_scdu=it 1187 endif 1188 enddo 1189 ! check consistency with dust emission scheme: 1190 if (ok_chimeredust) then 1191 if (.not.( id_scdu>0 .and. id_codu>0 .and. id_fine>0)) then 1192 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 0',1) 1193 endif 1194 else 1195 if (id_scdu>0) then 1196 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU',1) 1197 endif 1198 if ( (id_codu .le. 0) .or. ( id_fine.le.0) ) then 1199 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1',1) 1200 endif 1201 endif 1202 1203 1204 !print *,id_prec,id_fine,id_coss,id_codu,id_scdu 1205 ENDIF 1206 1207 1208 1209 1210 1211 1212 !---fraction of tracer that is convected (Tiedke) 1213 xconv(:)=0. 1214 if(id_prec>0) xconv(id_prec)=0.8 1215 if(id_fine>0) xconv(id_fine)=0.5 1216 if(id_coss>0) xconv(id_coss)=0.5 1217 if(id_codu>0) xconv(id_codu)=0.6 1218 if(id_scdu>0) xconv(id_scdu)=0.6 !!JE fix 1219 1220 masse(:)=1. 1221 if(id_prec>0) masse(id_prec)=32. 1222 if(id_fine>0) masse(id_fine)=6.02e23 1223 if(id_coss>0) masse(id_coss)=6.02e23 1224 if(id_codu>0) masse(id_codu)=6.02e23 1225 if(id_scdu>0) masse(id_scdu)=6.02e23 1226 1227 henry(:)=0. 1228 if(id_prec>0) henry(id_prec)=1.4 1229 if(id_fine>0) henry(id_fine)=0.0 1230 if(id_coss>0) henry(id_coss)=0.0 1231 if(id_codu>0) henry(id_codu)=0.0 1232 if(id_scdu>0) henry(id_scdu)=0.0 1233 !henry= (/1.4, 0.0, 0.0, 0.0/) 1234 kk(:)=0. 1235 if(id_prec>0) kk(id_prec)=2900. 1236 if(id_fine>0) kk(id_fine)=0.0 1237 if(id_coss>0) kk(id_coss)=0.0 1238 if(id_codu>0) kk(id_codu)=0.0 1239 if(id_scdu>0) kk(id_scdu)=0.0 1240 !kk = (/2900., 0., 0., 0./) 1241 alpha_r(:)=0. 1242 if(id_prec>0) alpha_r(id_prec)=0.0 1243 if(id_fine>0) alpha_r(id_fine)=0.001 1244 if(id_coss>0) alpha_r(id_coss)=0.001 1245 if(id_codu>0) alpha_r(id_codu)=0.001 1246 if(id_scdu>0) alpha_r(id_scdu)=0.001 !JE fix 1247 alpha_s(:)=0. 1248 if(id_prec>0) alpha_s(id_prec)=0.0 1249 if(id_fine>0) alpha_s(id_fine)=0.01 1250 if(id_coss>0) alpha_s(id_coss)=0.01 1251 if(id_codu>0) alpha_s(id_codu)=0.01 1252 if(id_scdu>0) alpha_s(id_scdu)=0.01 !JE fix 1253 1254 ! alpha_r = (/0., 0.001, 0.001, 0.001/) 1255 ! alpha_s = (/0., 0.01, 0.01, 0.01/) 1256 1257 ! nhl DATA vdep_oce /0.7, 0.05, 1.2, 1.2/ 1258 ! nhl vdep_oce for tr1 is a weighted average of dms and so2 dep velocities 1259 !vdep_oce = (/0.28, 0.28, 1.2, 1.2/) 1260 vdep_oce(:)=0. 1261 if(id_prec>0) vdep_oce(id_prec) = 0.28 1262 if(id_fine>0) vdep_oce(id_fine) = 0.28 1263 if(id_coss>0) vdep_oce(id_coss) = 1.2 1264 if(id_codu>0) vdep_oce(id_codu) = 1.2 1265 if(id_scdu>0) vdep_oce(id_scdu) = 1.2 1266 vdep_sic(:)=0. 1267 if(id_prec>0) vdep_sic(id_prec) = 0.2 1268 if(id_fine>0) vdep_sic(id_fine) = 0.17 1269 if(id_coss>0) vdep_sic(id_coss) = 1.2 1270 if(id_codu>0) vdep_sic(id_codu) = 1.2 1271 if(id_scdu>0) vdep_sic(id_scdu) = 1.2 1272 1273 !vdep_sic = (/0.2, 0.17, 1.2, 1.2/) 1274 !vdep_ter = (/0.3, 0.14, 1.2, 1.2/) 1275 vdep_ter(:)=0. 1276 if(id_prec>0) vdep_ter(id_prec) = 0.3 1277 if(id_fine>0) vdep_ter(id_fine) = 0.14 1278 if(id_coss>0) vdep_ter(id_coss) = 1.2 1279 if(id_codu>0) vdep_ter(id_codu) = 1.2 1280 if(id_scdu>0) vdep_ter(id_scdu) = 1.2 1281 1282 vdep_lic(:)=0. 1283 if(id_prec>0) vdep_lic(id_prec) = 0.2 1284 if(id_fine>0) vdep_lic(id_fine) = 0.17 1285 if(id_coss>0) vdep_lic(id_coss) = 1.2 1286 if(id_codu>0) vdep_lic(id_codu) = 1.2 1287 if(id_scdu>0) vdep_lic(id_scdu) = 1.2 1288 1289 1290 ! convective KE lessivage aer params: 1291 ccntrAA_spla(:)=0. 1292 if(id_prec>0) ccntrAA_spla(id_prec)=-9999. 1293 if(id_fine>0) ccntrAA_spla(id_fine)=0.7 1294 if(id_coss>0) ccntrAA_spla(id_coss)=1.0 1295 if(id_codu>0) ccntrAA_spla(id_codu)=0.7 1296 if(id_scdu>0) ccntrAA_spla(id_scdu)=0.7 1297 1298 ccntrENV_spla(:)=0. 1299 if(id_prec>0) ccntrENV_spla(id_prec)=-9999. 1300 if(id_fine>0) ccntrENV_spla(id_fine)=0.7 1301 if(id_coss>0) ccntrENV_spla(id_coss)=1.0 1302 if(id_codu>0) ccntrENV_spla(id_codu)=0.7 1303 if(id_scdu>0) ccntrENV_spla(id_scdu)=0.7 1304 1305 coefcoli_spla(:)=0. 1306 if(id_prec>0) coefcoli_spla(id_prec)=-9999. 1307 if(id_fine>0) coefcoli_spla(id_fine)=0.001 1308 if(id_coss>0) coefcoli_spla(id_coss)=0.001 1309 if(id_codu>0) coefcoli_spla(id_codu)=0.001 1310 if(id_scdu>0) coefcoli_spla(id_scdu)=0.001 1311 1312 !vdep_lic = (/0.2, 0.17, 1.2, 1.2/) 1313 ! 1314 1315 iscm3=.false. 1316 if (debutphy) then 1317 !$OMP MASTER 1318 CALL suphel 1319 print *, 'let s check nbtr=', nbtr 1320 ! JE before put in zero 1321 IF (lminmax) THEN 1322 DO it=1,nbtr 1323 CALL checknanqfi(tr_seri(:,:,it),qmin,qmax,'nan init phytracr') 1324 ENDDO 1325 DO it=1,nbtr 1326 CALL minmaxqfi2(tr_seri(:,:,it),qmin,qmax,'minmax init phytracr') 1327 ENDDO 1328 CALL minmaxsource(source_tr,qmin,qmax,'maxsource init phytracr') 1329 ENDIF 1330 ! JE initializon to cero the tracers 1331 ! DO it=1, nbtr 1332 ! tr_seri(:,:,it)=0.0 1333 ! ENDDO 1334 ! JE end 1335 ! Initializing to zero tr_seri for comparison purposes 1336 ! tr_seri(:,:,:)=0.0 1337 ! 1338 ! DO it=1,nbtr 1339 ! trm_aux(it)=0.0 1340 ! src_aux(it)=0.0 1341 ! diag_trm(it)=0.0 1342 ! diag_drydep(it)=0.0 1343 ! diag_wetdep(it)=0.0 1344 ! diag_cvtdep(it)=0.0 1345 ! diag_emissn(it)=0.0 1346 ! ENDDO 1347 ! diag_g2part=0.0 1348 print *,'PREPARE FILES TO SAVE VARIABLES' 1349 ! 1350 nbjour=30 1351 ecrit_tra = NINT(86400./pdtphys) !--1-day average 1352 ecrit_tra_h = NINT(86400./pdtphys*0.25) !--6-hour average 1353 ecrit_tra_m = NINT(86400./pdtphys*FLOAT(nbjour)) !--1-mth average 1354 print *,'ecrit_tra=', pdtphys, ecrit_tra 1355 1356 IF (ok_histrac) THEN 1357 IF (is_mpi_root .AND. is_omp_root) THEN 1358 1359 itra=0 1360 ! 1361 CALL ymds2ju(1900, 1, 1, 0.0, zjulian) 1362 ! 1363 ! print *, 'klon,iim,jjm+1 = ',klon,iim,jjm+1 1364 print *, 'glo klon,iim,jjm+1 = ',klon_glo,nbp_lon,nbp_lat 1365 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,rlon,zx_lon_glo) 1366 ! 1367 ! DO i = 1, iim 1368 DO i = 1, nbp_lon 1369 zx_lon_glo(i,1) = rlon(i+1) 1370 zx_lon_glo(i,nbp_lat) = rlon(i+1) 1371 ENDDO 1372 ! 1373 CALL histbeg("histrac_spl", nbp_lon,zx_lon_glo, & 1374 nbp_lat,zx_lat_glo, & 1375 1,nbp_lon,1,nbp_lat, 0, zjulian, pdtphys, & 1376 nhori1, nid_tra1) 1377 ! 1378 CALL histbeg("lessivage_spl", nbp_lon,zx_lon_glo, & 1379 nbp_lat,zx_lat_glo, & 1380 1,nbp_lon,1,nbp_lat, 0, zjulian, pdtphys, & 1381 nhori2, nid_tra2) 1382 ! 1383 CALL histbeg("traceur_spl", nbp_lon,zx_lon_glo, & 1384 nbp_lat,zx_lat_glo, & 1385 1,nbp_lon,1,nbp_lat, 0, zjulian, pdtphys, & 1386 nhori3, nid_tra3) 1387 ! 1388 CALL histvert(nid_tra1, "presnivs", "Vertical levels", "mb", & 1389 nbp_lev, presnivs, nvert) 1390 ! 1391 CALL histvert(nid_tra2, "presnivs", "Vertical levels", "mb", & 1392 nbp_lev, presnivs, nvert) 1393 ! 1394 CALL histvert(nid_tra3, "presnivs", "Vertical levels", "mb", & 1395 nbp_lev, presnivs, nvert) 1396 ! 1397 zsto = pdtphys 1398 zout = pdtphys * FLOAT(ecrit_tra) 1399 zout_h = pdtphys * FLOAT(ecrit_tra_h) 1400 zout_m = pdtphys * FLOAT(ecrit_tra_m) 1401 print *,'zsto zout=', zsto, zout 1402 1403 ! 1404 !----------------- HISTORY FILES OF TRACER EMISSIONS ------------------- 1405 ! 1406 ! HISTRAC 1407 ! 1408 CALL histdef(nid_tra1, "fluxbb", "Flux BB", "mg/m2/s", & 1409 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1410 "ave(X)", zsto,zout) 1411 ! 1412 CALL histdef(nid_tra1, "fluxff", "Flux FF", "mg/m2/s", & 1413 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1414 "ave(X)", zsto,zout) 1415 ! 1416 CALL histdef(nid_tra1, "fluxbcbb", "Flux BC-BB", "mg/m2/s", & 1417 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1418 "ave(X)", zsto,zout) 1419 ! 1420 CALL histdef(nid_tra1, "fluxbcff", "Flux BC-FF", "mg/m2/s", & 1421 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1422 "ave(X)", zsto,zout) 1423 ! 1424 CALL histdef(nid_tra1, "fluxbcnff", "Flux BC-NFF", "mg/m2/s", & 1425 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1426 "ave(X)", zsto,zout) 1427 ! 1428 CALL histdef(nid_tra1, "fluxbcba", "Flux BC-BA", "mg/m2/s", & 1429 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1430 "ave(X)", zsto,zout) 1431 ! 1432 CALL histdef(nid_tra1, "fluxbc", "Flux BC", "mg/m2/s", & 1433 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1434 "ave(X)", zsto,zout) 1435 ! 1436 CALL histdef(nid_tra1, "fluxombb", "Flux OM-BB", "mg/m2/s" , & 1437 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1438 "ave(X)", zsto,zout) 1439 ! 1440 CALL histdef(nid_tra1, "fluxomff", "Flux OM-FF", "mg/m2/s", & 1441 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1442 "ave(X)", zsto,zout) 1443 ! 1444 CALL histdef(nid_tra1, "fluxomnff", "Flux OM-NFF", "mg/m2/s", & 1445 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1446 "ave(X)", zsto,zout) 1447 ! 1448 CALL histdef(nid_tra1, "fluxomba", "Flux OM-BA", "mg/m2/s", & 1449 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1450 "ave(X)", zsto,zout) 1451 ! 1452 CALL histdef(nid_tra1, "fluxomnat", "Flux OM-NT", "mg/m2/s", & 1453 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1454 "ave(X)", zsto,zout) 1455 ! 1456 CALL histdef(nid_tra1, "fluxom", "Flux OM", "mg/m2/s", & 1457 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1458 "ave(X)", zsto,zout) 1459 ! 1460 CALL histdef(nid_tra1,"fluxh2sff","Flux H2S FF","mgS/m2/s", & 1461 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1462 "ave(X)", zsto,zout) 1463 ! 1464 CALL histdef(nid_tra1,"fluxh2snff","Flux H2S non-FF", & 1465 "mgS/m2/s",nbp_lon,nbp_lat,nhori1, 1,1,1, & 1466 -99, 32, & 1467 "ave(X)", zsto,zout) 1468 ! 1469 CALL histdef(nid_tra1,"fluxso2ff","Flux SO2 FF","mgS/m2/s", & 1470 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1471 "ave(X)", zsto,zout) 1472 ! 1473 CALL histdef(nid_tra1,"fluxso2nff","Flux SO2 non-FF", & 1474 "mgS/m2/s",nbp_lon,nbp_lat,nhori1, 1,1,1, & 1475 -99, 32, & 1476 "ave(X)", zsto,zout) 1477 ! 1478 CALL histdef(nid_tra1, "fluxso2bb", "Flux SO2 BB","mgS/m2/s", & 1479 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1480 "ave(X)", zsto,zout) 1481 ! 1482 CALL histdef(nid_tra1,"fluxso2vol","Flux SO2 Vol","mgS/m2/s", & 1483 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1484 "ave(X)", zsto,zout) 1485 ! 1486 CALL histdef(nid_tra1, "fluxso2ba", "Flux SO2 Ba","mgS/m2/s", & 1487 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1488 "ave(X)", zsto,zout) 1489 ! 1490 CALL histdef(nid_tra1, "fluxso2", "Flux SO2","mgS/m2/s", & 1491 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1492 "ave(X)", zsto,zout) 1493 ! 1494 CALL histdef(nid_tra1,"fluxso4ff","Flux SO4 FF","mgS/m2/s", & 1495 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1496 "ave(X)", zsto,zout) 1497 ! 1498 CALL histdef(nid_tra1,"fluxso4nff","Flux SO4 non-FF", & 1499 "mgS/m2/s", nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1500 "ave(X)", zsto,zout) 1501 ! 1502 CALL histdef(nid_tra1, "fluxso4bb", "Flux SO4 BB","mgS/m2/s", & 1503 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1504 "ave(X)", zsto,zout) 1505 ! 1506 CALL histdef(nid_tra1, "fluxso4ba", "Flux SO4 Ba","mgS/m2/s", & 1507 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1508 "ave(X)", zsto,zout) 1509 ! 1510 CALL histdef(nid_tra1, "fluxso4", "Flux SO4","mgS/m2/s", & 1511 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1512 "ave(X)", zsto,zout) 1513 ! 1514 CALL histdef(nid_tra1, "fluxdms", "Flux DMS", "mgS/m2/s", & 1515 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1516 "ave(X)", zsto,zout) 1517 ! 1518 CALL histdef(nid_tra1,"fluxh2sbio","Flux H2S Bio","mgS/m2/s", & 1519 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1520 "ave(X)", zsto,zout) 1521 ! 1522 CALL histdef(nid_tra1, "fluxdustec", & 1523 "Flux Dust EC", "mg/m2/s", & 1524 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1525 "ave(X)", zsto,zout) 1526 ! 1527 CALL histdef(nid_tra1,"fluxddfine","DD Fine Mode","mg/m2/s", & 1528 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1529 "ave(X)", zsto,zout) 1530 ! 1531 CALL histdef(nid_tra1,"fluxddcoa","DD Coarse Mode","mg/m2/s", & 1532 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1533 "ave(X)", zsto,zout) 1534 ! 1535 CALL histdef(nid_tra1,"fluxddsco","DD SCoarse Mode","mg/m2/s", & 1536 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1537 "ave(X)", zsto,zout) 1538 ! 1539 CALL histdef(nid_tra1,"fluxdd","Flux DD","mg/m2/s", & 1540 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1541 "ave(X)", zsto,zout) 1542 ! 1543 CALL histdef(nid_tra1,"fluxssfine","SS Fine Mode","mg/m2/s", & 1544 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1545 "ave(X)", zsto,zout) 1546 ! 1547 CALL histdef(nid_tra1,"fluxsscoa","SS Coarse Mode","mg/m2/s", & 1548 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1549 "ave(X)", zsto,zout) 1550 ! 1551 CALL histdef(nid_tra1,"fluxss","Flux SS","mg/m2/s", & 1552 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1553 "ave(X)", zsto,zout) 1554 ! 1555 !nhl CALL histdef(nid_tra1,"fluxso4chem","SO4 chem prod", 1556 !nhl . "gAer/kgAir", 1557 !nhl . nbp_lon,nbp_lat,nhori1, nbp_lev,1,nbp_lev,nvert, 32, 1558 !nhl . "ave(X)", zsto,zout) 1559 ! 1560 CALL histdef(nid_tra1,"flux_sparam_ind","Ind emiss", & 1561 "mg/m2/s", & 1562 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1563 "ave(X)", zsto,zout) 1564 ! 1565 CALL histdef(nid_tra1,"flux_sparam_bb","BB emiss", & 1566 "mg/m2/s", & 1567 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1568 "ave(X)", zsto,zout) 1569 ! 1570 CALL histdef(nid_tra1,"flux_sparam_ff","FF emiss", & 1571 "mg/m2/s", & 1572 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1573 "ave(X)", zsto,zout) 1574 ! 1575 CALL histdef(nid_tra1,"flux_sparam_ddfine","DD fine emiss", & 1576 "mg/m2/s", & 1577 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1578 "ave(X)", zsto,zout) 1579 ! 1580 CALL histdef(nid_tra1,"flux_sparam_ddcoa","DD coarse emiss", & 1581 "mg/m2/s", & 1582 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1583 "ave(X)", zsto,zout) 1584 ! 1585 CALL histdef(nid_tra1,"flux_sparam_ddsco","DD Scoarse emiss", & 1586 "mg/m2/s", & 1587 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1588 "ave(X)", zsto,zout) 1589 ! 1590 CALL histdef(nid_tra1,"flux_sparam_ssfine","SS fine emiss", & 1591 "mg/m2/s", & 1592 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1593 "ave(X)", zsto,zout) 1594 ! 1595 CALL histdef(nid_tra1,"flux_sparam_sscoa","SS coarse emiss", & 1596 "mg/m2/s", & 1597 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1598 "ave(X)", zsto,zout) 1599 ! 1600 CALL histdef(nid_tra1,"u10m","Zonal wind at 10 m", & 1601 "m/s", & 1602 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1603 "ave(X)", zsto,zout) 1604 ! 1605 CALL histdef(nid_tra1,"v10m","Meridional wind at 10 m", & 1606 "m/s", & 1607 nbp_lon,nbp_lat,nhori1, 1,1,1, -99, 32, & 1608 "ave(X)", zsto,zout) 1609 ! 1610 !nhl CALL histdef(nid_tra1,"flux_sparam_sulf","SO4 chem prod", 1611 !nhl . "gAer/kgAir", 1612 !nhl . nbp_lon,nbp_lat,nhori1, nbp_lev,1,nbp_lev,nvert, 32, 1613 !nhl . "ave(X)", zsto,zout) 1614 ! 1615 ! TRACEUR 1616 ! 1617 CALL histdef(nid_tra3, "taue550", "Tau ext 550", " ", & 1618 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1619 "ave(X)", zsto,zout) 1620 ! 1621 CALL histdef(nid_tra3, "taue670", "Tau ext 670", " ", & 1622 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1623 "ave(X)", zsto,zout) 1624 ! 1625 CALL histdef(nid_tra3, "taue865", "Tau ext 865", " ", & 1626 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1627 "ave(X)", zsto,zout) 1628 ! 1629 CALL histdef(nid_tra3, "taue550_tr2", "Tau ext 550tr2", " ", & 1630 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1631 "ave(X)", zsto,zout) 1632 ! 1633 CALL histdef(nid_tra3, "taue670_tr2", "Tau ext 670tr2", " ", & 1634 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1635 "ave(X)", zsto,zout) 1636 ! 1637 CALL histdef(nid_tra3, "taue865_tr2", "Tau ext 865tr2", " ", & 1638 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1639 "ave(X)", zsto,zout) 1640 ! 1641 CALL histdef(nid_tra3, "taue550_ss", "Tau ext 550ss", " ", & 1642 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1643 "ave(X)", zsto,zout) 1644 ! 1645 CALL histdef(nid_tra3, "taue670_ss", "Tau ext 670ss", " ", & 1646 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1647 "ave(X)", zsto,zout) 1648 ! 1649 CALL histdef(nid_tra3, "taue865_ss", "Tau ext 865ss", " ", & 1650 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1651 "ave(X)", zsto,zout) 1652 ! 1653 CALL histdef(nid_tra3, "taue550_dust", "Tau ext 550dust", " " & 1654 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1655 "ave(X)", zsto,zout) 1656 ! 1657 CALL histdef(nid_tra3, "taue670_dust", "Tau ext 670dust", " " & 1658 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1659 "ave(X)", zsto,zout) 1660 ! 1661 CALL histdef(nid_tra3, "taue865_dust", "Tau ext 865dust", " " & 1662 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1663 "ave(X)", zsto,zout) 1664 1665 CALL histdef(nid_tra3, "taue550_dustsco", & 1666 "Tau ext 550dustsco", " " & 1667 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1668 "ave(X)", zsto,zout) 1669 ! 1670 CALL histdef(nid_tra3, "taue670_dustsco", & 1671 "Tau ext 670dustsco", " " & 1672 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1673 "ave(X)", zsto,zout) 1674 ! 1675 CALL histdef(nid_tra3, "taue865_dustsco", & 1676 "Tau ext 865dustsco", " " & 1677 ,nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1678 "ave(X)", zsto,zout) 1679 1680 1681 CALL histdef(nid_tra3, "taue550_aqua", "Tau ext 550 aqua", " ", & 1682 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1683 "inst(X)", zout,zout) 1684 CALL histdef(nid_tra3, "taue550_terra", "Tau ext 550 terra", " ", & 1685 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1686 "inst(X)", zout,zout) 1687 CALL histdef(nid_tra3, "taue670_aqua", "Tau ext 670 aqua", " ", & 1688 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1689 "inst(X)", zout,zout) 1690 CALL histdef(nid_tra3, "taue670_terra", "Tau ext 670 terra", " ", & 1691 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1692 "inst(X)", zout,zout) 1693 CALL histdef(nid_tra3, "taue865_aqua", "Tau ext 865 aqua", " ", & 1694 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1695 "inst(X)", zout,zout) 1696 CALL histdef(nid_tra3, "taue865_terra", "Tau ext 865 terra", " ", & 1697 nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1698 "inst(X)", zout,zout) 1699 1700 1701 DO it=1, nbtr 1702 ! 1703 WRITE(str2,'(i2.2)') it 1704 ! 1705 CALL histdef(nid_tra3, "trm"//str2, "Burden No."//str2, & 1706 "mgS/m2", nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1707 "ave(X)", zsto,zout) 1708 ! 1709 CALL histdef(nid_tra3, "sconc"//str2, "Surf Conc. No."//str2, & 1710 "mg/m3", nbp_lon,nbp_lat,nhori3, 1,1,1, -99, 32, & 1711 "ave(X)", zsto,zout) 1712 ! 1713 ! LESSIVAGE 1714 ! 1715 CALL histdef(nid_tra2, "flux"//str2, "emission"//str2, & 1716 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1717 "ave(X)", zsto,zout) 1718 ! 1719 CALL histdef(nid_tra2, "ds"//str2, "Depot sec No."//str2, & 1720 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1721 "ave(X)", zsto,zout) 1722 ! 1723 CALL histdef(nid_tra2,"dh"//str2, & 1724 "Depot hum No."//str2, & 1725 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1726 "ave(X)", zsto,zout) 1727 ! 1728 CALL histdef(nid_tra2,"dtrconv"//str2, & 1729 "Tiedke convective"//str2, & 1730 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1731 "ave(X)", zsto,zout) 1732 1733 CALL histdef(nid_tra2,"dtherm"//str2, & 1734 "Thermals dtracer"//str2, & 1735 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1736 "ave(X)", zsto,zout) 1737 1738 CALL histdef(nid_tra2,"dhkecv"//str2, & 1739 "KE dep hum convective"//str2, & 1740 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1741 "ave(X)", zsto,zout) 1742 CALL histdef(nid_tra2,"dhkelsc"//str2, & 1743 "KE dep hum large scale"//str2, & 1744 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1745 "ave(X)", zsto,zout) 1746 1747 1748 CALL histdef(nid_tra2,"d_tr_ds"//str2, & 1749 " Tendance dep sec"//str2, & 1750 "mgS/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, 32, & 1751 "ave(X)", zsto,zout) 1752 1753 1754 CALL histdef(nid_tra2,"d_tr_cv"//str2, & 1755 "cvltr d_tr_cv"//str2, & 1756 "mgS/m2/s", & 1757 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1758 "ave(X)", zsto,zout) 1759 CALL histdef(nid_tra2,"d_tr_trsp"//str2 & 1760 ,"cvltr d_tr_trsp"//str2, & 1761 "mgS/m2/s", & 1762 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1763 "ave(X)", zsto,zout) 1764 CALL histdef(nid_tra2,"d_tr_sscav"//str2 & 1765 ,"cvltr d_tr_sscav"//str2,"mgS/m2/s", & 1766 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1767 "ave(X)", zsto,zout) 1768 CALL histdef(nid_tra2,"d_tr_sat"//str2 & 1769 ,"cvltr d_tr_sat"//str2, & 1770 "mgS/m2/s", & 1771 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1772 "ave(X)", zsto,zout) 1773 CALL histdef(nid_tra2,"d_tr_uscav"//str2, & 1774 "cvltr d_tr_uscav"//str2, & 1775 "mgS/m2/s", & 1776 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1777 "ave(X)", zsto,zout) 1778 CALL histdef(nid_tra2,"d_tr_insc"//str2, & !!! 1779 "cvltr d_tr_insc"//str2, & 1780 "mgS/m2/s", & 1781 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1782 "ave(X)", zsto,zout) 1783 CALL histdef(nid_tra2,"d_tr_bcscav"//str2, & 1784 "cvltr d_tr_bcscav"//str2, & 1785 "mgS/m2/s", & 1786 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1787 "ave(X)", zsto,zout) 1788 CALL histdef(nid_tra2,"d_tr_evapls"//str2, & 1789 "cvltr d_tr_evapls"//str2, & 1790 "mgS/m2/s", & 1791 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1792 "ave(X)", zsto,zout) 1793 CALL histdef(nid_tra2,"d_tr_ls"//str2, & 1794 "cvltr d_tr_ls"//str2, & 1795 "mgS/m2/s", & 1796 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1797 "ave(X)", zsto,zout) !! 1798 CALL histdef(nid_tra2,"d_tr_dyn"//str2, & 1799 "large-scale d_tr_dyn"//str2, & 1800 "mgS/m2/s", & 1801 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1802 "ave(X)", zsto,zout) !! 1803 CALL histdef(nid_tra2,"d_tr_cl"//str2, & 1804 "cvltr d_tr_cl"//str2, & 1805 "mgS/m2/s", & 1806 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1807 "ave(X)", zsto,zout) !! 1808 CALL histdef(nid_tra2,"d_tr_th"//str2, & 1809 "cvltr d_tr_th"//str2, & 1810 "mgS/m2/s", & 1811 nbp_lon,nbp_lat,nhori2, nbp_lev,1,nbp_lev,nvert, 32, & 1812 "ave(X)", zsto,zout) !! 1813 1814 1815 1816 ! 1817 ENDDO 1818 ! 1819 CALL histdef(nid_tra2, "sed_ss", "Sedmet. Tr3", & 1820 "mg/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, -99, & 1821 32, & 1822 "ave(X)", zsto,zout) 1823 ! 1824 CALL histdef(nid_tra2, "sed_dust", "Sedmet. Tr4", & 1825 "mg/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, & 1826 -99, 32, & 1827 "ave(X)", zsto,zout) 1828 ! 1829 CALL histdef(nid_tra2, "sed_dustsco", "Sedmet. Tr5", & 1830 "mg/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1, & 1831 -99, 32, & 1832 "ave(X)", zsto,zout) 1833 ! 1834 CALL histdef(nid_tra2, "g2p_gas", "Gas2particle gas sink", & 1835 "mg-S/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1,-99, 32, & 1836 "ave(X)", zsto,zout) 1837 ! 1838 CALL histdef(nid_tra2, "g2p_aer", "Gas2particle tr2 src", & 1839 "mg/m2/s", nbp_lon,nbp_lat,nhori2, 1,1,1,-99,32, & 1840 "ave(X)", zsto,zout) 1841 ! 1842 !------------------------------------------------------------------- 1843 ! 1844 CALL histend(nid_tra1) 1845 ! 1846 CALL histend(nid_tra2) 1847 ! 1848 CALL histend(nid_tra3) 1849 ! 1850 !------------------------------------------------------------------- 1851 1852 ! nbjour=1 1853 ENDIF ! mpi root 1854 ENDIF !--ok_histrac 1855 1856 ! 1857 ! IF (.NOT.edgar.AND.bateau) THEN 1858 ! PRINT *,'ATTENTION risque de compter double les bateaux' 1859 ! STOP 1860 ! ENDIF 1861 ! 1862 ! 1863 ! 1864 !$OMP END MASTER 1865 !$OMP BARRIER 1866 endif ! debutphy 1867 ! 1868 !====================================================================== 1869 ! Initialisations 1870 !====================================================================== 1871 ! 1872 ! 1873 ! je KE init 1874 IF (debutphy) THEN 1875 !$OMP MASTER 1876 1877 ALLOCATE(d_tr_cl(klon,klev,nbtr),d_tr_dry(klon,nbtr)) 1878 ALLOCATE(flux_tr_dry(klon,nbtr),d_tr_dec(klon,klev,nbtr)) 1879 ALLOCATE(d_tr_cv(klon,klev,nbtr)) 1880 ALLOCATE(d_tr_insc(klon,klev,nbtr),d_tr_bcscav(klon,klev,nbtr)) 1881 ALLOCATE(d_tr_evapls(klon,klev,nbtr),d_tr_ls(klon,klev,nbtr)) 1882 ALLOCATE(qPrls(klon,nbtr),d_tr_trsp(klon,klev,nbtr)) 1883 ALLOCATE(d_tr_sscav(klon,klev,nbtr),d_tr_sat(klon,klev,nbtr)) 1884 ALLOCATE(d_tr_uscav(klon,klev,nbtr),qPr(klon,klev,nbtr)) 1885 ALLOCATE(qDi(klon,klev,nbtr)) 1886 ALLOCATE(qPa(klon,klev,nbtr),qMel(klon,klev,nbtr)) 1887 ALLOCATE(qTrdi(klon,klev,nbtr),dtrcvMA(klon,klev,nbtr)) 1888 ALLOCATE(d_tr_th(klon,klev,nbtr)) 1889 ALLOCATE(d_tr_lessi_impa(klon,klev,nbtr)) 1890 ALLOCATE(d_tr_lessi_nucl(klon,klev,nbtr)) 1891 433 !AS : This subroutine centralises the ALLOCATE needed for the 1st call of 434 ! phys_output_write_spl in physiq 435 436 USE dimphy 437 USE infotrac_phy, ONLY: nbtr 438 USE dustemission_mod, ONLY : dustemis_out_init 439 440 ! pour les variables m[1-3]dflux 441 CALL dustemis_out_init() 442 443 !traceur 1892 444 ALLOCATE( diff_aod550_tot(klon) ) 1893 445 ALLOCATE( diag_aod670_tot(klon) ) … … 1905 457 ALLOCATE( diag_aod670_dustsco(klon) ) 1906 458 ALLOCATE( diag_aod865_dustsco(klon) ) 1907 459 !AS: les 15 vars _terra et 15 _aqua suivantes sont groupees differemment dans spla_output_write.h 460 ALLOCATE( aod550_terra(klon)) 461 ALLOCATE( aod550_tr2_terra(klon)) 462 ALLOCATE( aod550_ss_terra(klon)) 463 ALLOCATE( aod550_dust_terra(klon)) 464 ALLOCATE( aod550_dustsco_terra(klon)) 465 ALLOCATE( aod670_terra(klon)) 466 ALLOCATE( aod670_tr2_terra(klon)) 467 ALLOCATE( aod670_ss_terra(klon)) 468 ALLOCATE( aod670_dust_terra(klon)) 469 ALLOCATE( aod670_dustsco_terra(klon)) 470 ALLOCATE( aod865_terra(klon)) 471 ALLOCATE( aod865_tr2_terra(klon)) 472 ALLOCATE( aod865_ss_terra(klon)) 473 ALLOCATE( aod865_dust_terra(klon)) 474 ALLOCATE( aod865_dustsco_terra(klon)) 475 476 ALLOCATE( aod550_aqua(klon)) 477 ALLOCATE( aod550_tr2_aqua(klon)) 478 ALLOCATE( aod550_ss_aqua(klon)) 479 ALLOCATE( aod550_dust_aqua(klon)) 480 ALLOCATE( aod550_dustsco_aqua(klon)) 481 ALLOCATE( aod670_aqua(klon)) 482 ALLOCATE( aod670_tr2_aqua(klon)) 483 ALLOCATE( aod670_ss_aqua(klon)) 484 ALLOCATE( aod670_dust_aqua(klon)) 485 ALLOCATE( aod670_dustsco_aqua(klon)) 486 ALLOCATE( aod865_aqua(klon)) 487 ALLOCATE( aod865_tr2_aqua(klon)) 488 ALLOCATE( aod865_ss_aqua(klon)) 489 ALLOCATE( aod865_dust_aqua(klon)) 490 ALLOCATE( aod865_dustsco_aqua(klon)) 1908 491 1909 492 ALLOCATE( sconc01(klon) ) … … 1918 501 ALLOCATE( trm05(klon) ) 1919 502 1920 503 ! Lessivage 1921 504 ALLOCATE( flux01(klon) ) 1922 505 ALLOCATE( flux02(klon) ) … … 1984 567 ALLOCATE( d_tr_uscav04(klon,klev)) 1985 568 ALLOCATE( d_tr_uscav05(klon,klev)) 1986 1987 569 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1988 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1989 570 ALLOCATE( d_tr_insc01(klon,klev)) 1990 571 ALLOCATE( d_tr_insc02(klon,klev)) … … 2007 588 ALLOCATE( d_tr_ls04(klon,klev)) 2008 589 ALLOCATE( d_tr_ls05(klon,klev)) 590 2009 591 ALLOCATE( d_tr_dyn01(klon,klev)) 2010 592 ALLOCATE( d_tr_dyn02(klon,klev)) … … 2012 594 ALLOCATE( d_tr_dyn04(klon,klev)) 2013 595 ALLOCATE( d_tr_dyn05(klon,klev)) 596 2014 597 ALLOCATE( d_tr_cl01(klon,klev)) 2015 598 ALLOCATE( d_tr_cl02(klon,klev)) … … 2023 606 ALLOCATE( d_tr_th05(klon,klev)) 2024 607 2025 ALLOCATE( sed_ss3D(klon,klev))2026 ALLOCATE( sed_dust3D(klon,klev))2027 ALLOCATE( sed_dustsco3D(klon,klev))2028 2029 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2030 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!2031 2032 608 ALLOCATE( sed_ss(klon)) 2033 609 ALLOCATE( sed_dust(klon)) … … 2036 612 ALLOCATE( his_g2paer(klon)) 2037 613 614 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 615 ALLOCATE( sed_ss3D(klon,klev)) 616 ALLOCATE( sed_dust3D(klon,klev)) 617 ALLOCATE( sed_dustsco3D(klon,klev)) 618 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 619 620 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 621 ! histrac_spl 622 ! 2038 623 ALLOCATE( fluxbb(klon)) 2039 624 ALLOCATE( fluxff(klon)) … … 2083 668 ALLOCATE( v10m_ss(klon)) 2084 669 2085 670 !AS: in phys_output_write_spl, but not in spla_output_write.h 671 !------------------------------------------------------ 672 ALLOCATE(d_tr_cl(klon,klev,nbtr)) 673 ALLOCATE(d_tr_th(klon,klev,nbtr)) 674 ALLOCATE(d_tr_cv(klon,klev,nbtr)) 675 ALLOCATE(d_tr_lessi_impa(klon,klev,nbtr)) 676 ALLOCATE(d_tr_lessi_nucl(klon,klev,nbtr)) 677 ALLOCATE(d_tr_insc(klon,klev,nbtr)) 678 ALLOCATE(d_tr_bcscav(klon,klev,nbtr)) 679 ALLOCATE(d_tr_evapls(klon,klev,nbtr)) 680 ALLOCATE(d_tr_ls(klon,klev,nbtr)) 681 ALLOCATE(d_tr_trsp(klon,klev,nbtr)) 682 ALLOCATE(d_tr_sscav(klon,klev,nbtr)) 683 ALLOCATE(d_tr_sat(klon,klev,nbtr)) 684 ALLOCATE(d_tr_uscav(klon,klev,nbtr)) 685 686 END SUBROUTINE phytracr_spl_out_init 687 688 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 689 SUBROUTINE phytracr_spl_ini(klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust) 690 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 691 692 693 IMPLICIT NONE 694 INTEGER klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust 695 696 ALLOCATE( tsol(klon) ) 697 698 !AS: IF permettant le debranchage des coefs de Jeronimo Escribano: fichiers *_meta 699 ! nbreg_* sont initialisés à 1 dans phytracr_spl, if debutphy, 700 ! avant d'appeler la subroutine presente, phytracr_spl_ini 701 ! (phytracr_spl_ini appele readregionsdims2_spl, 702 ! qui lit et fait "bcast" de nbreg_ind,_bb,_dust,_wstardust dans fichiers regions_*_meta) 703 IF("ASSIM"=="YES") THEN 704 fileregionsdimsind='regions_ind_meta' 705 fileregionsdimsdust='regions_dustacc_meta' 706 ! fileregionsdimsdust='regions_dust_meta' 707 fileregionsdimsbb='regions_bb_meta' 708 fileregionsdimswstar='regions_pwstarwake_meta' 709 call readregionsdims2_spl(nbreg_ind,fileregionsdimsind) 710 call readregionsdims2_spl(nbreg_dust,fileregionsdimsdust) 711 call readregionsdims2_spl(nbreg_bb,fileregionsdimsbb) 712 call readregionsdims2_spl(nbreg_wstardust,fileregionsdimswstar) 713 ENDIF ! ASSIM 714 ! fin debranchage 715 716 !readregions_spl() 717 718 ALLOCATE(scale_param_ind(nbreg_ind)) 719 ALLOCATE(scale_param_bb(nbreg_bb)) 720 ALLOCATE(scale_param_ff(nbreg_ind)) 721 ALLOCATE(scale_param_dustacc(nbreg_dust)) 722 ALLOCATE(scale_param_dustcoa(nbreg_dust)) 723 ALLOCATE(scale_param_dustsco(nbreg_dust)) 724 ALLOCATE(param_wstarBLperregion(nbreg_wstardust)) 725 ALLOCATE(param_wstarWAKEperregion(nbreg_wstardust)) 726 ALLOCATE( dust_ec(klon) ) 727 ALLOCATE( u10m_ec(klon) ) 728 ALLOCATE( v10m_ec(klon) ) 729 ALLOCATE( lmt_so2volc_cont(klon) ) 730 ALLOCATE( lmt_altvolc_cont(klon) ) 731 ALLOCATE( lmt_so2volc_expl(klon) ) 732 ALLOCATE( lmt_altvolc_expl(klon) ) 733 ALLOCATE( lmt_so2ff_l(klon) ) 734 ALLOCATE( lmt_so2ff_h(klon) ) 735 ALLOCATE( lmt_so2nff(klon) ) 736 ALLOCATE( lmt_so2ba(klon) ) 737 ALLOCATE( lmt_so2bb_l(klon) ) 738 ALLOCATE( lmt_so2bb_h(klon) ) 739 ALLOCATE( lmt_dmsconc(klon) ) 740 ALLOCATE( lmt_dmsbio(klon) ) 741 ALLOCATE( lmt_h2sbio(klon) ) 742 ALLOCATE( lmt_bcff(klon) ) 743 ALLOCATE( lmt_bcnff(klon) ) 744 ALLOCATE( lmt_bcbb_l(klon) ) 745 ALLOCATE( lmt_bcbb_h(klon) ) 746 ALLOCATE( lmt_bcba(klon) ) 747 ALLOCATE( lmt_omff(klon) ) 748 ALLOCATE( lmt_omnff(klon) ) 749 ALLOCATE( lmt_ombb_l(klon) ) 750 ALLOCATE( lmt_ombb_h(klon) ) 751 ALLOCATE( lmt_omnat(klon) ) 752 ALLOCATE( lmt_omba(klon) ) 753 ALLOCATE(lmt_sea_salt(klon,ss_bins)) 754 755 756 757 758 !temporal hardcoded null inicialization of assimilation emmision factors 759 !AS: scale_param sont ensuite lus dans modvalues.nc 760 ! par la subroutine read_scalenc, appelee par readscaleparamsnc_spl 761 scale_param_ssacc=1. 762 scale_param_sscoa=1. 763 scale_param_ind(:)=1. 764 scale_param_bb(:)=1. 765 scale_param_ff(:)=1. 766 scale_param_dustacc(:)=1. 767 scale_param_dustcoa(:)=1. 768 scale_param_dustsco(:)=1. 769 param_wstarBLperregion(:)=0. 770 param_wstarWAKEperregion(:)=0. 771 772 773 RETURN 774 END SUBROUTINE phytracr_spl_ini 775 776 777 778 779 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 780 SUBROUTINE phytracr_spl ( debutphy,lafin,jD_cur,jH_cur,iflag_conv, & ! I 781 pdtphys,ftsol, & ! I 782 t_seri,q_seri,paprs,pplay,RHcl, & ! I 783 pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & ! I 784 coefh, cdragh, cdragm, yu1, yv1, & ! I 785 u_seri, v_seri, rlat,rlon, & ! I 786 pphis,pctsrf,pmflxr,pmflxs,prfl,psfl, & ! I 787 da,phi,phi2,d1a,dam,mp,ep,sigd,sij,clw,elij, & ! I 788 epmlmMm,eplaMm,upwd,dnwd,itop_con,ibas_con, & ! I 789 evapls,wdtrainA, wdtrainM,wght_cvfd, & ! I 790 fm_therm, entr_therm, rneb, & ! I 791 beta_fisrt,beta_v1, & ! I 792 zu10m,zv10m,wstar,ale_bl,ale_wake, & ! I 793 d_tr_dyn,tr_seri) ! O 794 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 795 796 USE mod_grid_phy_lmdz 797 USE mod_phys_lmdz_para 798 USE IOIPSL 799 USE dimphy 800 USE infotrac 801 USE indice_sol_mod 802 USE write_field_phy 803 804 805 USE mod_phys_lmdz_transfert_para 806 807 USE phys_cal_mod, only: jD_1jan,year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 808 mth_cur, phys_cal_update 809 810 ! 811 IMPLICIT none 812 ! 813 814 !====================================================================== 815 ! Auteur(s) FH 816 ! Objet: Moniteur general des tendances traceurs 817 ! 818 ! Remarques en vrac: 819 ! ------------------ 820 ! 1/ le call phytrac se fait avec nqmax-2 donc nous avons bien 821 ! les vrais traceurs (nbtr) dans phytrac (pas la vapeur ni eau liquide) 822 !====================================================================== 823 #include "dimensions.h" 824 #include "chem.h" 825 #include "chem_spla.h" 826 #include "YOMCST.h" 827 #include "YOETHF.h" 828 #include "paramet.h" 829 #include "thermcell.h" 830 831 !====================================================================== 832 833 ! Arguments: 834 ! 835 ! EN ENTREE: 836 ! ========== 837 ! 838 ! divers: 839 ! ------- 840 ! 841 real,intent(in) :: pdtphys ! pas d'integration pour la physique (seconde) 842 REAL, intent(in):: jD_cur, jH_cur 843 real, intent(in) :: ftsol(klon,nbsrf) ! temperature du sol par type 844 real, intent(in) :: t_seri(klon,klev) ! temperature 845 real, intent(in) :: u_seri(klon,klev) ! vent 846 real , intent(in) :: v_seri(klon,klev) ! vent 847 real , intent(in) :: q_seri(klon,klev) ! vapeur d eau kg/kg 848 849 LOGICAL, INTENT(IN) :: lafin 850 851 real tr_seri(klon,klev,nbtr) ! traceur 852 real tmp_var(klon,klev) ! auxiliary variable to replace traceur 853 real tmp_var2(klon,nbtr) ! auxiliary variable to replace source 854 real tmp_var3(klon,klev,nbtr) ! auxiliary variable 3D 855 real dummy1d ! JE auxiliary variable 856 real aux_var2(klon) ! auxiliary variable to replace traceur 857 real aux_var3(klon,klev) ! auxiliary variable to replace traceur 858 real d_tr(klon,klev,nbtr) ! traceur tendance 859 real sconc_seri(klon,nbtr) ! surface concentration of traceur 860 ! 861 integer nbjour 862 save nbjour 863 !$OMP THREADPRIVATE(nbjour) 864 ! 865 INTEGER masque_aqua_cur(klon) 866 INTEGER masque_terra_cur(klon) 867 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: masque_aqua !mask for 1 day 868 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: masque_terra ! 869 !$OMP THREADPRIVATE(masque_aqua,masque_terra) 870 871 INTEGER, SAVE :: nbreg_dust, nbreg_ind, nbreg_bb, nbreg_ss,nbreg_wstardust 872 !$OMP THREADPRIVATE(nbreg_dust, nbreg_ind, nbreg_bb,nbreg_ss,nbreg_wstardust) 873 874 875 876 REAL lmt_dms(klon) ! emissions de dms 877 878 !JE20150518<< 879 REAL, DIMENSION(klon_glo) :: aod550_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 880 REAL, DIMENSION(klon_glo) :: aod550_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 881 REAL, DIMENSION(klon_glo) :: aod550_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 882 REAL, DIMENSION(klon_glo) :: aod550_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 883 REAL, DIMENSION(klon_glo) :: aod550_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 884 REAL, DIMENSION(klon_glo) :: aod670_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 885 REAL, DIMENSION(klon_glo) :: aod670_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 886 REAL, DIMENSION(klon_glo) :: aod670_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 887 REAL, DIMENSION(klon_glo) :: aod670_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 888 REAL, DIMENSION(klon_glo) :: aod670_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 889 REAL, DIMENSION(klon_glo) :: aod865_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 890 REAL, DIMENSION(klon_glo) :: aod865_tr2_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 891 REAL, DIMENSION(klon_glo) :: aod865_ss_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 892 REAL, DIMENSION(klon_glo) :: aod865_dust_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 893 REAL, DIMENSION(klon_glo) :: aod865_dustsco_terra_glo ! AOD at terra overpass time ( 10.30 local hour) 894 895 REAL, DIMENSION(klon_glo) :: aod550_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 896 REAL, DIMENSION(klon_glo) :: aod550_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 897 REAL, DIMENSION(klon_glo) :: aod550_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 898 REAL, DIMENSION(klon_glo) :: aod550_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 899 REAL, DIMENSION(klon_glo) :: aod550_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 900 REAL, DIMENSION(klon_glo) :: aod670_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 901 REAL, DIMENSION(klon_glo) :: aod670_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 902 REAL, DIMENSION(klon_glo) :: aod670_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 903 REAL, DIMENSION(klon_glo) :: aod670_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 904 REAL, DIMENSION(klon_glo) :: aod670_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 905 REAL, DIMENSION(klon_glo) :: aod865_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 906 REAL, DIMENSION(klon_glo) :: aod865_tr2_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 907 REAL, DIMENSION(klon_glo) :: aod865_ss_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 908 REAL, DIMENSION(klon_glo) :: aod865_dust_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 909 REAL, DIMENSION(klon_glo) :: aod865_dustsco_aqua_glo ! AOD at aqua overpass time ( 13.30 local hour) 910 !!!!!!!!!!!!! 911 !JE20150518>> 912 913 914 915 916 real , intent(in) :: paprs(klon,klev+1) ! pression pour chaque inter-couche (en Pa) 917 real , intent(in) :: pplay(klon,klev) ! pression pour le mileu de chaque couche (en Pa) 918 real , intent(in) :: RHcl(klon,klev) ! humidite relativen ciel clair 919 real znivsig(klev) ! indice des couches 920 real paire(klon) 921 real, intent(in) :: pphis(klon) 922 real, intent(in) :: pctsrf(klon,nbsrf) 923 logical , intent(in) :: debutphy ! le flag de l'initialisation de la physique 924 ! 925 ! Scaling Parameters: 926 ! ---------------------- 927 ! 928 CHARACTER*50 c_Directory 929 CHARACTER*80 c_FileName1 930 CHARACTER*80 c_FileName2 931 CHARACTER*130 c_FullName1 932 CHARACTER*130 c_FullName2 933 INTEGER :: xidx, yidx 934 INTEGER,DIMENSION(klon) :: mask_bbreg 935 INTEGER,DIMENSION(klon) :: mask_ffso2reg 936 INTEGER :: aux_mask1 937 INTEGER :: aux_mask2 938 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_so4 !Defines regions for SO4 ; AS: PAS UTILISE! 939 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_ind !Defines regions for SO2, BC & OM 940 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_bb !Defines regions for SO2, BC & OM 941 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_dust !Defines dust regions 942 INTEGER, DIMENSION(:), ALLOCATABLE, SAVE :: iregion_wstardust !Defines dust regions 943 !$OMP THREADPRIVATE(iregion_so4,iregion_ind,iregion_bb,iregion_dust,iregion_wstardust) 944 945 ! Emissions: 946 947 ! 948 !---------------------------- SEA SALT & DUST emissions ------------------------ 949 REAL lmt_sea_salt(klon,ss_bins) !Sea salt 0.03-8.0 um 950 REAL u10m_ec1(klon),v10m_ec1(klon) 951 REAL u10m_ec2(klon),v10m_ec2(klon),dust_ec2(klon) 952 REAL dust_ec(klon) 953 ! new dust emission chimere je20140522 954 REAL,DIMENSION(klon),INTENT(IN) :: zu10m 955 REAL,DIMENSION(klon),INTENT(IN) :: zv10m 956 REAL,DIMENSION(klon),INTENT(IN) :: wstar,ale_bl,ale_wake 957 958 959 ! 960 ! Rem : nbtr : nombre de vrais traceurs est defini dans dimphy.h 961 962 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 963 !Dynamique 964 !-------- 965 REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: d_tr_dyn 966 967 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 968 ! convection: 969 ! ----------- 970 ! 971 REAL , intent(in) :: pmfu(klon,klev) ! flux de masse dans le panache montant 972 REAL , intent(in) :: pmfd(klon,klev) ! flux de masse dans le panache descendant 973 REAL, intent(in) :: pen_u(klon,klev) ! flux entraine dans le panache montant 974 REAL, intent(in) :: pde_u(klon,klev) ! flux detraine dans le panache montant 975 REAL, intent(in) :: pen_d(klon,klev) ! flux entraine dans le panache descendant 976 REAL, intent(in) :: pde_d(klon,klev) ! flux detraine dans le panache descendant 977 ! 978 ! Convection KE scheme: 979 ! --------------------- 980 ! 981 !! Variables pour le lessivage convectif 982 REAL,DIMENSION(klon,klev),INTENT(IN) :: da 983 REAL,DIMENSION(klon,klev,klev),INTENT(IN):: phi 984 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: phi2 985 REAL,DIMENSION(klon,klev),INTENT(IN) :: d1a,dam 986 REAL,DIMENSION(klon,klev),INTENT(IN) :: mp 987 REAL,DIMENSION(klon,klev),INTENT(IN) :: upwd ! saturated 988 ! updraft mass flux 989 REAL,DIMENSION(klon,klev),INTENT(IN) :: dnwd ! saturated 990 ! downdraft mass flux 991 INTEGER,DIMENSION(klon),INTENT(IN) :: itop_con 992 INTEGER,DIMENSION(klon),INTENT(IN) :: ibas_con 993 REAL,DIMENSION(klon,klev) :: evapls 994 REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainA 995 REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainM 996 997 998 REAL,DIMENSION(klon,klev),INTENT(IN) :: ep 999 REAL,DIMENSION(klon),INTENT(IN) :: sigd 1000 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: sij 1001 REAL,DIMENSION(klon,klev),INTENT(IN) :: clw 1002 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: elij 1003 REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: epmlmMm 1004 REAL,DIMENSION(klon,klev),INTENT(IN) :: eplaMm 1005 REAL,DIMENSION(klon,klev),INTENT(IN) :: wght_cvfd !RL 1006 1007 1008 ! KE: Tendances de traceurs (Td) et flux de traceurs: 1009 ! ------------------------ 1010 REAL,DIMENSION(klon,klev) :: Mint 1011 REAL,DIMENSION(klon,klev,nbtr) :: zmfd1a 1012 REAL,DIMENSION(klon,klev,nbtr) :: zmfdam 1013 REAL,DIMENSION(klon,klev,nbtr) :: zmfphi2 1014 1015 ! !tra dans pluie LS a la surf. 1016 ! outputs for cvltr_spl 1017 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cv_o 1018 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_trsp_o 1019 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sscav_o 1020 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sat_o 1021 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_uscav_o 1022 !!!!!!!!!!!!!!!!! 1023 !!!!!!!!!!!!!!!!! 1024 !!!!!!!!!!!!!!!!! 1025 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_insc_o 1026 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_bcscav_o 1027 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_evapls_o 1028 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_ls_o 1029 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_dyn_o 1030 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cl_o 1031 REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_th_o 1032 !!!!!!!!!!!!!!!!! 1033 !!!!!!!!!!!!!!!!! 1034 !!!!!!!!!!!!!!!!! 1035 1036 !$OMP THREADPRIVATE(d_tr_cv_o,d_tr_trsp_o,d_tr_sscav_o,d_tr_sat_o,d_tr_uscav_o) 1037 !$OMP THREADPRIVATE(d_tr_insc_o,d_tr_bcscav_o,d_tr_evapls_o,d_tr_ls_o) 1038 !$OMP THREADPRIVATE(d_tr_dyn_o,d_tr_cl_o,d_tr_th_o) 1039 1040 1041 INTEGER :: nsplit 1042 ! 1043 1044 1045 1046 ! 1047 ! Lessivage 1048 ! --------- 1049 ! 1050 REAL, intent(in) :: pmflxr(klon,klev+1), pmflxs(klon,klev+1) !--convection 1051 REAL, intent(in) :: prfl(klon,klev+1), psfl(klon,klev+1) !--large-scale 1052 REAL :: ql_incl ! contenu en eau liquide nuageuse dans le nuage ! ql_incl=oliq/rneb 1053 REAL :: ql_incloud_ref ! ref value of in-cloud condensed water content 1054 1055 REAL,DIMENSION(klon,klev),INTENT(IN) :: rneb ! fraction nuageuse (grande echelle) 1056 ! 1057 1058 REAL,DIMENSION(klon,klev) :: beta_fisrt ! taux de conversion 1059 ! ! de l'eau cond (de fisrtilp) 1060 REAL,DIMENSION(klon,klev) :: beta_v1 ! -- (originale version) 1061 INTEGER,SAVE :: iflag_lscav_omp,iflag_lscav 1062 !$OMP THREADPRIVATE(iflag_lscav_omp,iflag_lscav) 1063 1064 1065 1066 1067 !Thermiques: 1068 !---------- 1069 REAL,DIMENSION(klon,klev+1),INTENT(IN) :: fm_therm 1070 REAL,DIMENSION(klon,klev),INTENT(IN) :: entr_therm 1071 1072 1073 ! 1074 ! Couche limite: 1075 ! -------------- 1076 ! 1077 REAL , intent(in) :: coefh(klon,klev) ! coeff melange CL 1078 REAL , intent(in) :: cdragh(klon), cdragm(klon) 1079 REAL, intent(in) :: yu1(klon) ! vent dans la 1iere couche 1080 REAL, intent(in) :: yv1(klon) ! vent dans la 1iere couche 1081 ! 1082 ! 1083 !---------------------------------------------------------------------- 1084 REAL his_ds(klon,nbtr) 1085 REAL his_dh(klon,nbtr) 1086 REAL his_dhlsc(klon,nbtr) ! in-cloud scavenging lsc 1087 REAL his_dhcon(klon,nbtr) ! in-cloud scavenging con 1088 REAL his_dhbclsc(klon,nbtr) ! below-cloud scavenging lsc 1089 REAL his_dhbccon(klon,nbtr) ! below-cloud scavenging con 1090 REAL trm(klon,nbtr) 1091 ! 1092 REAL u10m_ec(klon), v10m_ec(klon) 1093 ! 1094 REAL his_th(klon,nbtr) 1095 REAL his_dhkecv(klon,nbtr) 1096 REAL his_dhkelsc(klon,nbtr) 1097 1098 1099 ! 1100 ! Coordonnees 1101 ! ----------- 1102 ! 1103 REAL, intent(in) :: rlat(klon) ! latitudes pour chaque point 1104 REAL, intent(in) :: rlon(klon) ! longitudes pour chaque point 1105 ! 1106 INTEGER i, k, it, j, ig 1107 ! 1108 ! DEFINITION OF DIAGNOSTIC VARIABLES 1109 ! 1110 REAL diag_trm(nbtr), diag_drydep(nbtr) 1111 REAL diag_wetdep(nbtr), diag_cvtdep(nbtr) 1112 REAL diag_emissn(nbtr), diag_g2part 1113 REAL diag_sedimt 1114 REAL trm_aux(nbtr), src_aux(nbtr) 1115 ! 1116 ! Variables locales pour effectuer les appels en serie 1117 !---------------------------------------------------- 1118 REAL source_tr(klon,nbtr) 1119 REAL flux_tr(klon,nbtr) 1120 REAL m_conc(klon,klev) 1121 REAL henry(nbtr) !--cste de Henry mol/l/atm 1122 REAL kk(nbtr) !--coefficient de var avec T (K) 1123 REAL alpha_r(nbtr)!--coefficient d'impaction pour la pluie 1124 REAL alpha_s(nbtr)!--coefficient d'impaction pour la neige 1125 REAL vdep_oce(nbtr), vdep_sic(nbtr) 1126 REAL vdep_ter(nbtr), vdep_lic(nbtr) 1127 REAL ccntrAA_spla(nbtr) 1128 REAL ccntrENV_spla(nbtr) 1129 REAL coefcoli_spla(nbtr) 1130 REAL dtrconv(klon,nbtr) 1131 REAL zrho(klon,klev), zdz(klon,klev) 1132 REAL zalt(klon,klev) 1133 REAL,DIMENSION(klon,klev) :: zmasse ! densité atmosphérique 1134 ! . Kg/m2 1135 REAL,DIMENSION(klon,klev) :: ztra_th 1136 REAL qmin, qmax, aux 1137 ! PARAMETER (qmin=0.0, qmax=1.e33) 1138 PARAMETER (qmin=1.e33, qmax=-1.e33) 1139 1140 ! Variables to save data into file 1141 !---------------------------------- 1142 1143 CHARACTER*2 str2 1144 !!AS: LOGICAL ok_histrac 1145 !!!JE2014124 PARAMETER (ok_histrac=.true.) 1146 !! PARAMETER (ok_histrac=.false.) 1147 INTEGER ndex2d(iim*(jjm+1)), ndex3d(iim*(jjm+1)*klev) 1148 INTEGER nhori1, nhori2, nhori3, nhori4, nhori5, nvert 1149 INTEGER nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5 1150 SAVE nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5 1151 !$OMP THREADPRIVATE(nid_tra1, nid_tra2, nid_tra3, nid_tra4, nid_tra5) 1152 INTEGER itra 1153 SAVE itra ! compteur pour la physique 1154 !$OMP THREADPRIVATE(itra) 1155 INTEGER ecrit_tra, ecrit_tra_h, ecrit_tra_m 1156 SAVE ecrit_tra, ecrit_tra_h, ecrit_tra_m 1157 !$OMP THREADPRIVATE(ecrit_tra, ecrit_tra_h, ecrit_tra_m) 1158 REAL presnivs(klev) ! pressions approximat. des milieux couches ( en PA) 1159 REAL zx_tmp_2d(iim,jjm+1), zx_tmp_3d(iim,jjm+1,klev) 1160 REAL zx_tmp_fi2d(klon), zx_tmp_fi3d(klon, klev) 1161 REAL zx_lon_glo(nbp_lon,nbp_lat), zx_lat_glo(nbp_lon,nbp_lat) 1162 REAL zsto, zout, zout_h, zout_m, zjulian 1163 1164 !------Molar Masses 1165 REAL masse(nbtr) 1166 ! 1167 REAL fracso2emis !--fraction so2 emis en so2 1168 PARAMETER (fracso2emis=0.95) 1169 REAL frach2sofso2 !--fraction h2s from so2 1170 PARAMETER (frach2sofso2=0.0426) 1171 ! 1172 ! Controles 1173 !------------- 1174 LOGICAL convection,lessivage,lminmax,lcheckmass 1175 DATA convection,lessivage,lminmax,lcheckmass & 1176 /.true.,.true.,.true.,.false./ 1177 ! 1178 REAL xconv(nbtr) 1179 ! 1180 LOGICAL anthropo, bateau, edgar 1181 DATA anthropo,bateau,edgar/.true.,.true.,.true./ 1182 ! 1183 !c bc_source 1184 INTEGER kminbc, kmaxbc 1185 !JE20150715 PARAMETER (kminbc=3, kmaxbc=5) 1186 PARAMETER (kminbc=4, kmaxbc=7) 1187 ! 1188 REAL tr1_cont, tr2_cont, tr3_cont, tr4_cont 1189 ! 1190 ! JE for updating in cltrac 1191 REAL,DIMENSION(klon,klev) :: delp ! epaisseur de couche (Pa) 1192 !! JE for include gas to particle conversion in output 1193 ! REAL his_g2pgas(klon) ! gastoparticle in gas units (check!) 1194 ! REAL his_g2paer(klon) ! gastoparticle in aerosol units (check!) 1195 ! 1196 INTEGER ,intent(in) :: iflag_conv 1197 LOGICAL iscm3 ! debug variable. for checkmass ! JE 1198 1199 !------------------------------------------------------------------------ 1200 ! only to compute time consumption of each process 1201 !---- 1202 INTEGER clock_start,clock_end,clock_rate,clock_start_spla 1203 INTEGER clock_end_outphytracr,clock_start_outphytracr 1204 INTEGER ti_init,dife,ti_inittype,ti_inittwrite 1205 INTEGER ti_spla,ti_emis,ti_depo,ti_cltr,ti_ther 1206 INTEGER ti_sedi,ti_gasp,ti_wetap,ti_cvltr,ti_lscs,ti_brop,ti_outs 1207 INTEGER ti_nophytracr,clock_per_max 1208 REAL tia_init,tia_inittype,tia_inittwrite 1209 REAL tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther 1210 REAL tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs 1211 REAL tia_brop,tia_outs 1212 REAL tia_nophytracr 1213 1214 SAVE tia_init,tia_inittype,tia_inittwrite 1215 SAVE tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther 1216 SAVE tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs 1217 SAVE tia_brop,tia_outs 1218 SAVE ti_nophytracr 1219 SAVE tia_nophytracr 1220 SAVE clock_end_outphytracr,clock_start_outphytracr 1221 SAVE clock_per_max 1222 LOGICAL logitime 1223 !$OMP THREADPRIVATE(tia_init,tia_inittype,tia_inittwrite) 1224 !$OMP THREADPRIVATE(tia_spla,tia_emis,tia_depo,tia_cltr,tia_ther) 1225 !$OMP THREADPRIVATE(tia_sedi,tia_gasp,tia_wetap,tia_cvltr,tia_lscs) 1226 !$OMP THREADPRIVATE(tia_brop,tia_outs) 1227 !$OMP THREADPRIVATE(ti_nophytracr) 1228 !$OMP THREADPRIVATE(tia_nophytracr) 1229 !$OMP THREADPRIVATE(clock_end_outphytracr,clock_start_outphytracr) 1230 !$OMP THREADPRIVATE(clock_per_max) 1231 1232 ! utils parallelization 1233 REAL :: auxklon_glo(klon_glo) 1234 INTEGER :: iauxklon_glo(klon_glo) 1235 REAL, DIMENSION(klon_glo,nbp_lev) :: auxklonnbp_lev 1236 REAL, DIMENSION(klon_glo,nbp_lev,nbtr) :: auxklonklevnbtr_glo 1237 REAL,DIMENSION(nbp_lon,nbp_lat) :: zx_tmp_2d_glo 1238 REAL,DIMENSION(nbp_lon,nbp_lat,nbp_lev) :: zx_tmp_3d_glo 1239 REAL,DIMENSION(klon_glo) :: zx_tmp_fi2d_glo 1240 REAL,DIMENSION(klon_glo , nbp_lev) :: zx_tmp_fi3d_glo 1241 REAL,DIMENSION(klon_glo,nbtr) :: auxklonnbtr_glo 1242 1243 1244 1245 source_tr=0. 1246 1247 1248 1249 if (debutphy) then 1250 #ifdef IOPHYS_DUST 1251 CALL iophys_ini 1252 #endif 1253 nbreg_ind=1 1254 nbreg_bb=1 1255 nbreg_dust=1 1256 nbreg_wstardust=1 1257 CALL phytracr_spl_ini(klon,nbreg_ind,nbreg_bb,nbreg_dust,nbreg_wstardust) 1258 endif 1259 1260 1261 #ifdef IOPHYS_DUST 1262 do it=1,nbtr 1263 write(str2,'(i2.2)') it 1264 call iophys_ecrit('TRA'//str2,klev,'SOURCE','',tr_seri(:,:,it)) 1265 enddo 1266 #endif 1267 1268 1269 1270 1271 ijulday=jD_cur-jD_1jan+1 1272 nbjour = 1 1273 1274 paramname_ind='ind' 1275 paramname_bb='bb' 1276 paramname_ff='ind' 1277 paramname_dustacc='dustacc' 1278 paramname_dustcoa='dustcoasco' 1279 paramname_dustsco='dustcoasco' 1280 ! paramname_dustacc='dust' 1281 ! paramname_dustcoa='dust' 1282 ! paramname_dustsco='dust' 1283 paramname_wstarBL='pwstarbl' 1284 paramname_wstarWAKE='pwstarwake' 1285 paramname_ssacc='ssacc' 1286 paramname_sscoa='sscoa' 1287 1288 filescaleparams='modvalues.nc' 1289 !AS: debranchage de lecture des coefs d'assmilation de Jeronimo Escribano 1290 IF("ASSIM"=="YES") THEN 1291 CALL readscaleparamsnc_spl(scale_param_ind, & 1292 nbreg_ind, paramname_ind, & 1293 scale_param_ff, nbreg_ind,paramname_ff, & 1294 scale_param_bb, nbreg_bb,paramname_bb, & 1295 scale_param_dustacc, nbreg_dust,paramname_dustacc, & 1296 scale_param_dustcoa, nbreg_dust,paramname_dustcoa, & 1297 scale_param_dustsco, nbreg_dust,paramname_dustsco, & 1298 param_wstarBLperregion, nbreg_wstardust, paramname_wstarBL, & 1299 param_wstarWAKEperregion, nbreg_wstardust, paramname_wstarWAKE, & 1300 scale_param_ssacc , paramname_ssacc, & 1301 scale_param_sscoa , paramname_sscoa, & 1302 filescaleparams,ijulday,jH_cur, pdtphys,debutphy) 1303 ENDIF ! ASSIM 1304 !AS: le commentaire suivant "add seasalt" ne semble pas avoir ete mis en pratique. 1305 ! Des fichiers regions_ssacc et _sscoa existent mais ne semblent pas lus. 1306 ! Ca reste donc aux valeurs initialisées: nbreg_ss=1, scale_param_ss*=1, cf fichiers ss et modvalues 1307 !! add seasalt 1308 1309 print *,'JE : check scale_params' 1310 1311 print *, 'nbreg_ind', nbreg_ind 1312 print *, 'nbreg_dust', nbreg_dust 1313 print *, 'nbreg_bb', nbreg_bb 1314 print *, 'ind', scale_param_ind 1315 print *, 'dustacc', scale_param_dustacc 1316 print *, 'dustcoa', scale_param_dustcoa 1317 print *, 'dustsco', scale_param_dustsco 1318 print *, 'wstardustBL', param_wstarBLperregion 1319 print *, 'wstardustWAKE', param_wstarWAKEperregion 1320 print *, 'ff', scale_param_ff 1321 print *, 'bb', scale_param_bb 1322 print *, 'ssacc', scale_param_ssacc 1323 print *, 'sscoa', scale_param_sscoa 1324 1325 print *,'JE: before read_newemissions ' 1326 print *,'JE: jD_cur:',jD_cur,' ijulday:',ijulday,' jH_cur:',jH_cur,' pdtphys:',pdtphys 1327 print *,'JE: now read_newemissions:' 1328 !AS: La ligne suivante fait planter a l'execution : lmt_so2ff_l pas initialise 1329 ! print *,'lmt_so2ff_l AVANT' , MINVAL(lmt_so2ff_l), MAXVAL(lmt_so2ff_l) 1330 call read_newemissions(ijulday,jH_cur ,edgar, flag_dms,debutphy, & !I 1331 pdtphys, lafin, nbjour, pctsrf, & !I 1332 t_seri, rlat, rlon, & !I 1333 pmflxr, pmflxs, prfl, psfl, & !I 1334 u10m_ec, v10m_ec, dust_ec, & !O 1335 lmt_sea_salt, lmt_so2ff_l, & !O 1336 lmt_so2ff_h, lmt_so2nff, & !O 1337 lmt_so2ba, lmt_so2bb_l, lmt_so2bb_h, & !O 1338 lmt_so2volc_cont, lmt_altvolc_cont, & !O 1339 lmt_so2volc_expl, lmt_altvolc_expl, & !O 1340 lmt_dmsbio, lmt_h2sbio, lmt_dmsconc, & !O 1341 lmt_bcff, lmt_bcnff, lmt_bcbb_l, & !O 1342 lmt_bcbb_h, lmt_bcba, lmt_omff, & !O 1343 lmt_omnff, lmt_ombb_l, lmt_ombb_h, & !O 1344 lmt_omnat, lmt_omba) !O 1345 1346 1347 print *,'Check emissions' 1348 print *,'lmt_so2ff_l' , MINVAL(lmt_so2ff_l), MAXVAL(lmt_so2ff_l) 1349 print *,'lmt_so2ff_h' , MINVAL(lmt_so2ff_h), MAXVAL(lmt_so2ff_h) 1350 print *,'lmt_so2nff' , MINVAL(lmt_so2nff), MAXVAL(lmt_so2nff) 1351 print *,'lmt_so2ba' , MINVAL(lmt_so2ba), MAXVAL(lmt_so2ba) 1352 print *,'lmt_so2bb_l' , MINVAL(lmt_so2bb_l), MAXVAL(lmt_so2bb_l) 1353 print *,'lmt_so2bb_h' , MINVAL(lmt_so2bb_h), MAXVAL(lmt_so2bb_h) 1354 print *,'lmt_so2volc_cont' , MINVAL(lmt_so2volc_cont), MAXVAL(lmt_so2volc_cont) 1355 print *,'lmt_altvolc_cont' , MINVAL(lmt_altvolc_cont), MAXVAL(lmt_altvolc_cont) 1356 print *,'lmt_so2volc_expl' , MINVAL(lmt_so2volc_expl), MAXVAL(lmt_so2volc_expl) 1357 print *,'lmt_altvolc_expl' , MINVAL(lmt_altvolc_expl), MAXVAL(lmt_altvolc_expl) 1358 print *,'lmt_dmsbio' , MINVAL(lmt_dmsbio), MAXVAL(lmt_dmsbio) 1359 print *,'lmt_h2sbio' , MINVAL(lmt_h2sbio), MAXVAL(lmt_h2sbio) 1360 print *,'lmt_dmsconc' , MINVAL(lmt_dmsconc), MAXVAL(lmt_dmsconc) 1361 print *,'lmt_bcff' , MINVAL(lmt_bcff), MAXVAL(lmt_bcff) 1362 print *,'lmt_bcnff' , MINVAL(lmt_bcnff), MAXVAL(lmt_bcnff) 1363 print *,'lmt_bcbb_l' , MINVAL(lmt_bcbb_l), MAXVAL(lmt_bcbb_l) 1364 print *,'lmt_bcbb_h' , MINVAL(lmt_bcbb_h), MAXVAL(lmt_bcbb_h) 1365 print *,'lmt_bcba' , MINVAL(lmt_bcba), MAXVAL(lmt_bcba) 1366 print *,'lmt_omff' , MINVAL(lmt_omff), MAXVAL(lmt_omff) 1367 print *,'lmt_omnff' , MINVAL(lmt_omnff), MAXVAL(lmt_omnff) 1368 print *,'lmt_ombb_l' , MINVAL(lmt_ombb_l), MAXVAL(lmt_ombb_l) 1369 print *,'lmt_ombb_h' , MINVAL(lmt_ombb_h), MAXVAL(lmt_ombb_h) 1370 print *,'lmt_omnat' , MINVAL(lmt_omnat), MAXVAL(lmt_omnat) 1371 print *,'lmt_omba' , MINVAL(lmt_omba), MAXVAL(lmt_omba) 1372 print *,'JE iflag_con',iflag_conv 1373 1374 1375 !JE_dbg 1376 do i=1,klon 1377 tsol(i)=0.0 1378 do j=1,nbsrf 1379 tsol(i)=tsol(i)+ftsol(i,j)*pctsrf(i,j) 1380 enddo 1381 enddo 1382 1383 1384 !====================================================================== 1385 ! INITIALISATIONS 1386 !====================================================================== 1387 ! CALL checknanqfi(da(:,:),1.,-1.,' da_ before 1388 ! . phytracr_inphytracr') 1389 1390 ! 1391 ! computing time 1392 ! logitime=.true. 1393 logitime=.false. 1394 IF (logitime) THEN 1395 clock_start=0 1396 clock_end=0 1397 clock_rate=0 1398 CALL SYSTEM_CLOCK(COUNT_RATE=clock_rate,COUNT_MAX=clock_per_max) 1399 CALL SYSTEM_CLOCK(COUNT=clock_start_spla) 1400 clock_start=clock_start_spla 1401 clock_end_outphytracr=clock_start_spla 1402 ENDIF 1403 1404 1405 ! Definition of tracers index. 1406 print*,'OK ON PASSSE BIEN LA' 1407 CALL minmaxsource(source_tr,qmin,qmax,'A1 maxsource init phytracr') 1408 1409 1410 IF (debutphy) THEN 1411 id_prec=-1 1412 id_fine=-1 1413 id_coss=-1 1414 id_codu=-1 1415 id_scdu=-1 1416 !print *,nbtr 1417 do it=1,nbtr 1418 print *, it, tname(it+nqo) 1419 if (tname(it+nqo) == 'PREC' ) then 1420 id_prec=it 1421 endif 1422 if (tname(it+nqo) == 'FINE' ) then 1423 id_fine=it 1424 endif 1425 if (tname(it+nqo) == 'COSS' ) then 1426 id_coss=it 1427 endif 1428 if (tname(it+nqo) == 'CODU' ) then 1429 id_codu=it 1430 endif 1431 if (tname(it+nqo) == 'SCDU' ) then 1432 id_scdu=it 1433 endif 1434 enddo 1435 ! check consistency with dust emission scheme: 1436 if (ok_chimeredust) then 1437 if (.not.( id_scdu>0 .and. id_codu>0 .and. id_fine>0)) then 1438 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 0',1) 1439 endif 1440 else 1441 if (id_scdu>0) then 1442 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1 SCDU',1) 1443 endif 1444 if ( (id_codu .le. 0) .or. ( id_fine.le.0) ) then 1445 call abort_gcm('phytracr_mod', 'pb in ok_chimdust 1',1) 1446 endif 1447 endif 1448 1449 1450 !print *,id_prec,id_fine,id_coss,id_codu,id_scdu 1451 ENDIF 1452 1453 1454 1455 1456 1457 1458 !---fraction of tracer that is convected (Tiedke) 1459 xconv(:)=0. 1460 if(id_prec>0) xconv(id_prec)=0.8 1461 if(id_fine>0) xconv(id_fine)=0.5 1462 if(id_coss>0) xconv(id_coss)=0.5 1463 if(id_codu>0) xconv(id_codu)=0.6 1464 if(id_scdu>0) xconv(id_scdu)=0.6 !!JE fix 1465 1466 masse(:)=1. 1467 if(id_prec>0) masse(id_prec)=32. 1468 if(id_fine>0) masse(id_fine)=6.02e23 1469 if(id_coss>0) masse(id_coss)=6.02e23 1470 if(id_codu>0) masse(id_codu)=6.02e23 1471 if(id_scdu>0) masse(id_scdu)=6.02e23 1472 1473 henry(:)=0. 1474 if(id_prec>0) henry(id_prec)=1.4 1475 if(id_fine>0) henry(id_fine)=0.0 1476 if(id_coss>0) henry(id_coss)=0.0 1477 if(id_codu>0) henry(id_codu)=0.0 1478 if(id_scdu>0) henry(id_scdu)=0.0 1479 !henry= (/1.4, 0.0, 0.0, 0.0/) 1480 kk(:)=0. 1481 if(id_prec>0) kk(id_prec)=2900. 1482 if(id_fine>0) kk(id_fine)=0.0 1483 if(id_coss>0) kk(id_coss)=0.0 1484 if(id_codu>0) kk(id_codu)=0.0 1485 if(id_scdu>0) kk(id_scdu)=0.0 1486 !kk = (/2900., 0., 0., 0./) 1487 alpha_r(:)=0. 1488 if(id_prec>0) alpha_r(id_prec)=0.0 1489 if(id_fine>0) alpha_r(id_fine)=0.001 1490 if(id_coss>0) alpha_r(id_coss)=0.001 1491 if(id_codu>0) alpha_r(id_codu)=0.001 1492 if(id_scdu>0) alpha_r(id_scdu)=0.001 !JE fix 1493 alpha_s(:)=0. 1494 if(id_prec>0) alpha_s(id_prec)=0.0 1495 if(id_fine>0) alpha_s(id_fine)=0.01 1496 if(id_coss>0) alpha_s(id_coss)=0.01 1497 if(id_codu>0) alpha_s(id_codu)=0.01 1498 if(id_scdu>0) alpha_s(id_scdu)=0.01 !JE fix 1499 1500 ! alpha_r = (/0., 0.001, 0.001, 0.001/) 1501 ! alpha_s = (/0., 0.01, 0.01, 0.01/) 1502 1503 ! nhl DATA vdep_oce /0.7, 0.05, 1.2, 1.2/ 1504 ! nhl vdep_oce for tr1 is a weighted average of dms and so2 dep velocities 1505 !vdep_oce = (/0.28, 0.28, 1.2, 1.2/) 1506 vdep_oce(:)=0. 1507 if(id_prec>0) vdep_oce(id_prec) = 0.28 1508 if(id_fine>0) vdep_oce(id_fine) = 0.28 1509 if(id_coss>0) vdep_oce(id_coss) = 1.2 1510 if(id_codu>0) vdep_oce(id_codu) = 1.2 1511 if(id_scdu>0) vdep_oce(id_scdu) = 1.2 1512 vdep_sic(:)=0. 1513 if(id_prec>0) vdep_sic(id_prec) = 0.2 1514 if(id_fine>0) vdep_sic(id_fine) = 0.17 1515 if(id_coss>0) vdep_sic(id_coss) = 1.2 1516 if(id_codu>0) vdep_sic(id_codu) = 1.2 1517 if(id_scdu>0) vdep_sic(id_scdu) = 1.2 1518 1519 !vdep_sic = (/0.2, 0.17, 1.2, 1.2/) 1520 !vdep_ter = (/0.3, 0.14, 1.2, 1.2/) 1521 vdep_ter(:)=0. 1522 if(id_prec>0) vdep_ter(id_prec) = 0.3 1523 if(id_fine>0) vdep_ter(id_fine) = 0.14 1524 if(id_coss>0) vdep_ter(id_coss) = 1.2 1525 if(id_codu>0) vdep_ter(id_codu) = 1.2 1526 if(id_scdu>0) vdep_ter(id_scdu) = 1.2 1527 1528 vdep_lic(:)=0. 1529 if(id_prec>0) vdep_lic(id_prec) = 0.2 1530 if(id_fine>0) vdep_lic(id_fine) = 0.17 1531 if(id_coss>0) vdep_lic(id_coss) = 1.2 1532 if(id_codu>0) vdep_lic(id_codu) = 1.2 1533 if(id_scdu>0) vdep_lic(id_scdu) = 1.2 1534 1535 1536 ! convective KE lessivage aer params: 1537 ! AS: #DFB (Binta) a aussi teste ccntrAA_spla=ccntrENV_spla=0.9/1.0/0.9/0.9 1538 ! mais effet negligeable sur l'AOD 1539 ccntrAA_spla(:)=0. 1540 if(id_prec>0) ccntrAA_spla(id_prec)=-9999. 1541 if(id_fine>0) ccntrAA_spla(id_fine)=0.7 1542 if(id_coss>0) ccntrAA_spla(id_coss)=1.0 1543 if(id_codu>0) ccntrAA_spla(id_codu)=0.7 1544 if(id_scdu>0) ccntrAA_spla(id_scdu)=0.7 1545 1546 ccntrENV_spla(:)=0. 1547 if(id_prec>0) ccntrENV_spla(id_prec)=-9999. 1548 if(id_fine>0) ccntrENV_spla(id_fine)=0.7 1549 if(id_coss>0) ccntrENV_spla(id_coss)=1.0 1550 if(id_codu>0) ccntrENV_spla(id_codu)=0.7 1551 if(id_scdu>0) ccntrENV_spla(id_scdu)=0.7 1552 ! #DFB 1553 coefcoli_spla(:)=0. 1554 if(id_prec>0) coefcoli_spla(id_prec)=-9999. 1555 if(id_fine>0) coefcoli_spla(id_fine)=0.001 1556 if(id_coss>0) coefcoli_spla(id_coss)=0.001 1557 if(id_codu>0) coefcoli_spla(id_codu)=0.001 1558 if(id_scdu>0) coefcoli_spla(id_scdu)=0.001 1559 1560 !vdep_lic = (/0.2, 0.17, 1.2, 1.2/) 1561 ! 1562 1563 iscm3=.false. 1564 if (debutphy) then 1565 !$OMP MASTER 1566 CALL suphel 1567 print *, 'let s check nbtr=', nbtr 1568 ! JE before put in zero 1569 IF (lminmax) THEN 1570 DO it=1,nbtr 1571 CALL checknanqfi(tr_seri(:,:,it),qmin,qmax,'nan init phytracr') 1572 ENDDO 1573 DO it=1,nbtr 1574 CALL minmaxqfi2(tr_seri(:,:,it),qmin,qmax,'minmax init phytracr') 1575 ENDDO 1576 CALL minmaxsource(source_tr,qmin,qmax,'maxsource init phytracr') 1577 ENDIF 1578 ! JE initializon to cero the tracers 1579 ! DO it=1, nbtr 1580 ! tr_seri(:,:,it)=0.0 1581 ! ENDDO 1582 ! JE end 1583 ! Initializing to zero tr_seri for comparison purposes 1584 ! tr_seri(:,:,:)=0.0 1585 ! 1586 ! DO it=1,nbtr 1587 ! trm_aux(it)=0.0 1588 ! src_aux(it)=0.0 1589 ! diag_trm(it)=0.0 1590 ! diag_drydep(it)=0.0 1591 ! diag_wetdep(it)=0.0 1592 ! diag_cvtdep(it)=0.0 1593 ! diag_emissn(it)=0.0 1594 ! ENDDO 1595 ! diag_g2part=0.0 1596 print *,'PREPARE FILES TO SAVE VARIABLES' 1597 ! 1598 nbjour=30 1599 ecrit_tra = NINT(86400./pdtphys) !--1-day average 1600 ecrit_tra_h = NINT(86400./pdtphys*0.25) !--6-hour average 1601 ecrit_tra_m = NINT(86400./pdtphys*FLOAT(nbjour)) !--1-mth average 1602 print *,'ecrit_tra=', pdtphys, ecrit_tra 1603 1604 !!AS deleting lines 1605 !! IF (ok_histrac) THEN 1606 !! IF (is_mpi_root .AND. is_omp_root) THEN 1607 !!-----many deleted lines---- 1608 !!! nbjour=1 1609 !! ENDIF ! mpi root 1610 !! ENDIF !--ok_histrac 1611 1612 !$OMP END MASTER 1613 !$OMP BARRIER 1614 endif ! debutphy 1615 ! 1616 !====================================================================== 1617 ! Initialisations 1618 !====================================================================== 1619 ! 1620 ! 1621 ! je KE init 1622 IF (debutphy) THEN 1623 !$OMP MASTER 1624 1625 ALLOCATE(d_tr_dry(klon,nbtr)) 1626 ALLOCATE(flux_tr_dry(klon,nbtr),d_tr_dec(klon,klev,nbtr)) 1627 ALLOCATE(qPrls(klon,nbtr),qPr(klon,klev,nbtr)) 1628 ALLOCATE(qDi(klon,klev,nbtr)) 1629 ALLOCATE(qPa(klon,klev,nbtr),qMel(klon,klev,nbtr)) 1630 ALLOCATE(qTrdi(klon,klev,nbtr),dtrcvMA(klon,klev,nbtr)) 1631 1632 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1633 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2086 1634 ALLOCATE(d_tr_cv_o(klon,klev,nbtr)) 2087 1635 ALLOCATE(d_tr_trsp_o(klon,klev,nbtr)) … … 2110 1658 ALLOCATE(masque_aqua(klon)) 2111 1659 ALLOCATE(masque_terra(klon)) 2112 ! ALLOCATE(aod550_aqua(klon))2113 ! ALLOCATE(aod550_terra(klon))2114 ! ALLOCATE(aod670_aqua(klon))2115 ! ALLOCATE(aod670_terra(klon))2116 ! ALLOCATE(aod865_aqua(klon))2117 ! ALLOCATE(aod865_terra(klon))2118 2119 ALLOCATE( aod550_terra(klon))2120 ALLOCATE( aod550_tr2_terra(klon))2121 ALLOCATE( aod550_ss_terra(klon))2122 ALLOCATE( aod550_dust_terra(klon))2123 ALLOCATE( aod550_dustsco_terra(klon))2124 ALLOCATE( aod670_terra(klon))2125 ALLOCATE( aod670_tr2_terra(klon))2126 ALLOCATE( aod670_ss_terra(klon))2127 ALLOCATE( aod670_dust_terra(klon))2128 ALLOCATE( aod670_dustsco_terra(klon))2129 ALLOCATE( aod865_terra(klon))2130 ALLOCATE( aod865_tr2_terra(klon))2131 ALLOCATE( aod865_ss_terra(klon))2132 ALLOCATE( aod865_dust_terra(klon))2133 ALLOCATE( aod865_dustsco_terra(klon))2134 2135 ALLOCATE( aod550_aqua(klon))2136 ALLOCATE( aod550_tr2_aqua(klon))2137 ALLOCATE( aod550_ss_aqua(klon))2138 ALLOCATE( aod550_dust_aqua(klon))2139 ALLOCATE( aod550_dustsco_aqua(klon))2140 ALLOCATE( aod670_aqua(klon))2141 ALLOCATE( aod670_tr2_aqua(klon))2142 ALLOCATE( aod670_ss_aqua(klon))2143 ALLOCATE( aod670_dust_aqua(klon))2144 ALLOCATE( aod670_dustsco_aqua(klon))2145 ALLOCATE( aod865_aqua(klon))2146 ALLOCATE( aod865_tr2_aqua(klon))2147 ALLOCATE( aod865_ss_aqua(klon))2148 ALLOCATE( aod865_dust_aqua(klon))2149 ALLOCATE( aod865_dustsco_aqua(klon))2150 1660 2151 1661 2152 1662 masque_aqua(:)=0 2153 1663 masque_terra(:)=0 2154 ! aod550_aqua(:)=0.2155 ! aod550_terra(:)=0.2156 ! aod670_aqua(:)=0.2157 ! aod670_terra(:)=0.2158 ! aod865_aqua(:)=0.2159 ! aod865_terra(:)=0.2160 1664 2161 1665 aod550_terra(:)=0. … … 2365 1869 2366 1870 2367 2368 IF (debutphy) then 2369 1871 IF (debutphy) then 1872 1873 ! AS: initialisation des indices par point de grille physique iregion_* 1874 ! (variables tenant de l'assimilation, a eliminer dans un 2eme temps) 1875 iregion_dust(:)=1 1876 iregion_ind(:)=1 1877 iregion_bb(:)=1 1878 iregion_wstardust(:)=1 1879 1880 !AS: lecture des indices dans fichiers "regions_*" eliminee par IF("ASSIM"="YES") (faux donc) 1881 IF("ASSIM"=="YES") THEN 2370 1882 c_FullName1='regions_dustacc' 2371 1883 !c_FullName1='regions_dust' … … 2450 1962 CLOSE(76) 2451 1963 CLOSE(77) 1964 CLOSE(95) 2452 1965 2453 1966 ENDIF ! mpi root 2454 1967 !$OMP END MASTER 2455 1968 !$OMP BARRIER 1969 1970 ENDIF ! ASSIM 2456 1971 2457 1972 ENDIF ! debutphy … … 3682 3197 ! choix du lessivage 3683 3198 IF (iflag_lscav .EQ. 3 .OR. iflag_lscav .EQ. 4) THEN 3684 print *,'JE iflag_lscav',iflag_lscav 3685 DO it = 1, nbtr 3199 !IF (.false.) THEN ! test #DFB (Binta) sans lsc_scav_spl 3200 print *,'JE iflag_lscav',iflag_lscav 3201 DO it = 1, nbtr 3686 3202 3687 3203 ! incloud scavenging and removal by large scale rain ! orig : ql_incl … … 3694 3210 ! . t_seri,tr_seri,d_tr_insc, 3695 3211 ! . d_tr_bcscav,d_tr_evapls,qPrls) 3696 CALL lsc_scav_spl(pdtphys,it,iflag_lscav,ql_incl,prfl,psfl, &3212 CALL lsc_scav_spl(pdtphys,it,iflag_lscav,ql_incl,prfl,psfl, & 3697 3213 rneb,beta_fisrt, beta_v1,pplay,paprs, & 3698 3214 t_seri,tr_seri,d_tr_insc, & … … 3702 3218 3703 3219 !large scale scavenging tendency 3704 DO k = 1, klev3705 DO i = 1, klon3706 d_tr_ls(i,k,it)=d_tr_insc(i,k,it)+d_tr_bcscav(i,k,it) &3220 DO k = 1, klev 3221 DO i = 1, klon 3222 d_tr_ls(i,k,it)=d_tr_insc(i,k,it)+d_tr_bcscav(i,k,it) & 3707 3223 +d_tr_evapls(i,k,it) 3708 tr_seri(i,k,it)=tr_seri(i,k,it)+d_tr_ls(i,k,it) 3709 tmp_var(i,k)=d_tr_ls(i,k,it) 3710 ENDDO 3711 ENDDO 3712 3713 CALL kg_to_cm3(pplay,t_seri,tmp_var) 3714 DO k=1,klev 3715 DO i=1,klon 3224 tr_seri(i,k,it)=tr_seri(i,k,it)+d_tr_ls(i,k,it) 3225 tmp_var(i,k)=d_tr_ls(i,k,it) 3226 ENDDO 3227 ENDDO 3228 3229 CALL kg_to_cm3(pplay,t_seri,tmp_var) 3230 3231 DO k=1,klev 3232 DO i=1,klon 3716 3233 his_dhkelsc(i,it)=his_dhkelsc(i,it)-tmp_var(i,k) & 3717 3234 /RNAVO*masse(it)*1.e3*1.e6*zdz(i,k)/pdtphys 3718 3235 3719 END DO 3720 END DO 3721 3722 END DO !tr 3236 END DO 3237 END DO 3238 3239 END DO !it=1,nbtr 3240 3723 3241 ELSE 3724 his_dhkelsc(i,it)=0.03725 3242 print *,'WARNING: NO lsc_scav, Please choose iflag_lscav=3 or 4' 3726 ENDIF !iflag_lscav 3243 DO it = 1, nbtr 3244 DO i=1,klon 3245 his_dhkelsc(i,it)=0.0 3246 END DO ! klon 3247 END DO !it=1,nbtr 3248 ENDIF !iflag_lscav 3727 3249 3728 3250 print *,' AFTER lsc_scav ' … … 3844 3366 !new utc day: put in 0 everything 3845 3367 !JE20150518<< 3846 ! aod550_aqua(:) =0.3847 ! aod550_terra(:) =0.3848 ! aod670_aqua(:) =0.3849 ! aod670_terra(:) =0.3850 ! aod865_aqua(:) =0.3851 ! aod865_terra(:) =0.3852 3368 masque_aqua(:) =0 3853 3369 masque_terra(:) =0 … … 3886 3402 3887 3403 DO i=1,klon 3888 ! aod550_aqua(i)=aod550_aqua(i)+ &3889 ! masque_aqua_cur(i)*diff_aod550_tot(i)3890 ! aod670_aqua(i)=aod670_aqua(i)+ &3891 ! masque_aqua_cur(i)*diag_aod670_tot(i)3892 ! aod865_aqua(i)=aod865_aqua(i)+ &3893 ! masque_aqua_cur(i)*diag_aod865_tot(i)3894 3404 3895 3405 aod550_terra(i)=aod550_terra(i)+ & … … 3956 3466 aod865_dustsco_aqua(i)= aod865_dustsco_aqua(i) + & 3957 3467 masque_aqua_cur(i)*diag_aod865_dustsco(i) 3958 ! aod550_terra(i)=aod550_terra(i)+ & 3959 ! masque_terra_cur(i)*diff_aod550_tot(i) 3960 ! aod670_terra(i)=aod670_terra(i)+ & 3961 ! masque_terra_cur(i)*diag_aod670_tot(i) 3962 ! aod865_terra(i)=aod865_terra(i)+ & 3963 ! masque_terra_cur(i)*diag_aod865_tot(i) 3964 masque_aqua(i)=masque_aqua(i)+masque_aqua_cur(i) 3468 3469 masque_aqua(i)=masque_aqua(i)+masque_aqua_cur(i) 3965 3470 masque_terra(i)=masque_terra(i)+masque_terra_cur(i) 3966 3471 ENDDO … … 4035 3540 aod865_dustsco_terra(i)= -999. 4036 3541 ENDIF 4037 ! IF (masque_terra(i).GT. 0) THEN4038 ! aod550_terra(i) = aod550_terra(i)/masque_terra(i)4039 ! aod670_terra(i)=aod670_terra(i)/masque_terra(i)4040 ! aod865_terra(i)=aod865_terra(i)/masque_terra(i)4041 !4042 ! ELSE4043 ! aod550_terra(i) = -999.4044 ! aod670_terra(i) = -999.4045 ! aod865_terra(i) = -999.4046 ! ENDIF4047 3542 ENDDO 4048 ! !write dbg 4049 ! CALL writefield_phy("aod550_aqua",aod550_aqua,1) 4050 ! CALL writefield_phy("aod550_terra",aod550_terra,1) 4051 ! CALL writefield_phy("masque_aqua",float(masque_aqua),1) 4052 ! CALL writefield_phy("masque_terra",float(masque_terra),1) 4053 4054 4055 IF (ok_histrac) THEN 4056 ! write in output file 4057 call gather(aod550_aqua,aod550_aqua_glo) 4058 call gather(aod550_terra,aod550_terra_glo) 4059 call gather(aod670_aqua,aod670_aqua_glo) 4060 call gather(aod670_terra,aod670_terra_glo) 4061 call gather(aod865_aqua,aod865_aqua_glo) 4062 call gather(aod865_terra,aod865_terra_glo) 4063 4064 !$OMP MASTER 4065 IF (is_mpi_root .AND. is_omp_root) THEN 4066 4067 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod550_aqua_glo ,zx_tmp_2d) 4068 CALL histwrite(nid_tra3,"taue550_aqua",itra,zx_tmp_2d, & 4069 nbp_lon*(nbp_lat),ndex2d) 4070 4071 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod550_terra_glo ,zx_tmp_2d) 4072 CALL histwrite(nid_tra3,"taue550_terra",itra,zx_tmp_2d, & 4073 nbp_lon*(nbp_lat),ndex2d) 4074 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod670_aqua_glo ,zx_tmp_2d) 4075 CALL histwrite(nid_tra3,"taue670_aqua",itra,zx_tmp_2d, & 4076 nbp_lon*(nbp_lat),ndex2d) 4077 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod670_terra_glo ,zx_tmp_2d) 4078 CALL histwrite(nid_tra3,"taue670_terra",itra,zx_tmp_2d, & 4079 nbp_lon*(nbp_lat),ndex2d) 4080 4081 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod865_aqua_glo ,zx_tmp_2d) 4082 CALL histwrite(nid_tra3,"taue865_aqua",itra,zx_tmp_2d, & 4083 nbp_lon*(nbp_lat),ndex2d) 4084 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, aod865_terra_glo ,zx_tmp_2d) 4085 CALL histwrite(nid_tra3,"taue865_terra",itra,zx_tmp_2d, & 4086 nbp_lon*(nbp_lat),ndex2d) 4087 ENDIF 4088 !$OMP END MASTER 4089 !$OMP BARRIER 4090 ENDIF 4091 ! !put in 0 everything 4092 ! aod550_aqua(:) =0. 4093 ! aod550_terra(:) =0. 4094 ! aod670_aqua(:) =0. 4095 ! aod670_terra(:) =0. 4096 ! aod865_aqua(:) =0. 4097 ! aod865_terra(:) =0. 4098 ! masque_aqua(:) =0 4099 ! masque_terra(:) =0 4100 ENDIF 3543 3544 !!AS deleting lines 3545 !! IF (ok_histrac) THEN 3546 !!!! write in output file 3547 !!----many deleted lines 3548 !! ENDIF !mpi_root 3549 !!!$OMP END MASTER 3550 !!!$OMP BARRIER 3551 !! ENDIF !--ok_histrac 3552 3553 ENDIF ! jH_cur... 4101 3554 4102 3555 … … 4138 3591 ! SAVING AEROSOL RELATED VARIABLES INTO FILE 4139 3592 !====================================================================== 4140 !4141 !JE20141224 IF (ok_histrac) THEN4142 3593 ! 4143 3594 ndex2d = 0 … … 4275 3726 fluxss(i)=fluxssfine(i)+fluxsscoa(i) 4276 3727 ENDDO 3728 4277 3729 ! prepare outputs cvltr 4278 3730 … … 4471 3923 ENDDO 4472 3924 4473 IF (ok_histrac) THEN 4474 ! 4475 ! SAVING VARIABLES IN TRACEUR 4476 ! 4477 call gather(diff_aod550_tot ,auxklon_glo ) 4478 !$OMP MASTER 4479 IF (is_mpi_root .AND. is_omp_root) THEN 4480 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4481 CALL histwrite(nid_tra3,"taue550",itra,zx_tmp_2d_glo, & 4482 nbp_lon*(nbp_lat),ndex2d) 4483 ENDIF ! mpi root 4484 !$OMP END MASTER 4485 !$OMP BARRIER 4486 call gather( diag_aod670_tot , auxklon_glo ) 4487 !$OMP MASTER 4488 IF (is_mpi_root .AND. is_omp_root) THEN 4489 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo,zx_tmp_2d_glo) 4490 CALL histwrite(nid_tra3,"taue670",itra,zx_tmp_2d_glo, & 4491 nbp_lon*(nbp_lat),ndex2d) 4492 ! 4493 ENDIF ! mpi root 4494 !$OMP END MASTER 4495 !$OMP BARRIER 4496 call gather( diag_aod865_tot , auxklon_glo ) 4497 !$OMP MASTER 4498 IF (is_mpi_root .AND. is_omp_root) THEN 4499 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo,zx_tmp_2d_glo) 4500 CALL histwrite(nid_tra3,"taue865",itra,zx_tmp_2d_glo, & 4501 nbp_lon*(nbp_lat),ndex2d) 4502 ! 4503 ENDIF ! mpi root 4504 !$OMP END MASTER 4505 !$OMP BARRIER 4506 call gather( diff_aod550_tr2 , auxklon_glo ) 4507 !$OMP MASTER 4508 IF (is_mpi_root .AND. is_omp_root) THEN 4509 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo,zx_tmp_2d_glo) 4510 CALL histwrite(nid_tra3,"taue550_tr2",itra,zx_tmp_2d_glo, & 4511 nbp_lon*(nbp_lat),ndex2d) 4512 ! 4513 ENDIF ! mpi root 4514 !$OMP END MASTER 4515 !$OMP BARRIER 4516 call gather( diag_aod670_tr2 , auxklon_glo ) 4517 !$OMP MASTER 4518 IF (is_mpi_root .AND. is_omp_root) THEN 4519 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo,zx_tmp_2d_glo) 4520 CALL histwrite(nid_tra3,"taue670_tr2",itra,zx_tmp_2d_glo, & 4521 nbp_lon*(nbp_lat),ndex2d) 4522 ! 4523 ENDIF ! mpi root 4524 !$OMP END MASTER 4525 !$OMP BARRIER 4526 call gather( diag_aod865_tr2 , auxklon_glo ) 4527 !$OMP MASTER 4528 IF (is_mpi_root .AND. is_omp_root) THEN 4529 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo,zx_tmp_2d_glo) 4530 CALL histwrite(nid_tra3,"taue865_tr2",itra,zx_tmp_2d_glo, & 4531 nbp_lon*(nbp_lat),ndex2d) 4532 ! 4533 ENDIF ! mpi root 4534 !$OMP END MASTER 4535 !$OMP BARRIER 4536 call gather( diag_aod550_ss, auxklon_glo ) 4537 !$OMP MASTER 4538 IF (is_mpi_root .AND. is_omp_root) THEN 4539 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4540 CALL histwrite(nid_tra3,"taue550_ss",itra,zx_tmp_2d_glo, & 4541 nbp_lon*(nbp_lat),ndex2d) 4542 ! 4543 ENDIF ! mpi root 4544 !$OMP END MASTER 4545 !$OMP BARRIER 4546 call gather( diag_aod670_ss , auxklon_glo ) 4547 !$OMP MASTER 4548 IF (is_mpi_root .AND. is_omp_root) THEN 4549 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4550 CALL histwrite(nid_tra3,"taue670_ss",itra,zx_tmp_2d_glo, & 4551 nbp_lon*(nbp_lat),ndex2d) 4552 ! 4553 ENDIF ! mpi root 4554 !$OMP END MASTER 4555 !$OMP BARRIER 4556 call gather( diag_aod865_ss, auxklon_glo ) 4557 !$OMP MASTER 4558 IF (is_mpi_root .AND. is_omp_root) THEN 4559 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4560 CALL histwrite(nid_tra3,"taue865_ss",itra,zx_tmp_2d_glo, & 4561 nbp_lon*(nbp_lat),ndex2d) 4562 ! 4563 ENDIF ! mpi root 4564 !$OMP END MASTER 4565 !$OMP BARRIER 4566 call gather( diag_aod550_dust, auxklon_glo ) 4567 !$OMP MASTER 4568 IF (is_mpi_root .AND. is_omp_root) THEN 4569 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4570 CALL histwrite(nid_tra3,"taue550_dust",itra,zx_tmp_2d_glo, & 4571 nbp_lon*(nbp_lat),ndex2d) 4572 ! 4573 ENDIF ! mpi root 4574 !$OMP END MASTER 4575 !$OMP BARRIER 4576 call gather( diag_aod670_dust, auxklon_glo ) 4577 !$OMP MASTER 4578 IF (is_mpi_root .AND. is_omp_root) THEN 4579 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4580 CALL histwrite(nid_tra3,"taue670_dust",itra,zx_tmp_2d_glo, & 4581 nbp_lon*(nbp_lat),ndex2d) 4582 ! 4583 ENDIF ! mpi root 4584 !$OMP END MASTER 4585 !$OMP BARRIER 4586 call gather( diag_aod865_dust, auxklon_glo ) 4587 !$OMP MASTER 4588 IF (is_mpi_root .AND. is_omp_root) THEN 4589 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4590 CALL histwrite(nid_tra3,"taue865_dust",itra,zx_tmp_2d_glo, & 4591 nbp_lon*(nbp_lat),ndex2d) 4592 ! 4593 ENDIF ! mpi root 4594 !$OMP END MASTER 4595 !$OMP BARRIER 4596 call gather( diag_aod550_dustsco, auxklon_glo ) 4597 !$OMP MASTER 4598 IF (is_mpi_root .AND. is_omp_root) THEN 4599 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4600 CALL histwrite(nid_tra3,"taue550_dustsco",itra,zx_tmp_2d_glo, & 4601 nbp_lon*(nbp_lat),ndex2d) 4602 ! 4603 ENDIF ! mpi root 4604 !$OMP END MASTER 4605 !$OMP BARRIER 4606 call gather( diag_aod670_dustsco, auxklon_glo ) 4607 !$OMP MASTER 4608 IF (is_mpi_root .AND. is_omp_root) THEN 4609 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4610 CALL histwrite(nid_tra3,"taue670_dustsco",itra,zx_tmp_2d_glo, & 4611 nbp_lon*(nbp_lat),ndex2d) 4612 ! 4613 ENDIF ! mpi root 4614 !$OMP END MASTER 4615 !$OMP BARRIER 4616 call gather( diag_aod865_dustsco, auxklon_glo ) 4617 !$OMP MASTER 4618 IF (is_mpi_root .AND. is_omp_root) THEN 4619 CALL gr_fi_ecrit(1, klon_glo,nbp_lon,nbp_lat, auxklon_glo ,zx_tmp_2d_glo) 4620 CALL histwrite(nid_tra3,"taue865_dustsco",itra,zx_tmp_2d_glo, & 4621 nbp_lon*(nbp_lat),ndex2d) 4622 ENDIF ! mpi root 4623 !$OMP END MASTER 4624 !$OMP BARRIER 4625 4626 !$OMP MASTER 4627 DO it=1,nbtr 4628 ! 4629 WRITE(str2,'(i2.2)') it 4630 ! 4631 call gather( trm, auxklonnbtr_glo ) 4632 ! !$OMP MASTER 4633 IF (is_mpi_root .AND. is_omp_root) THEN 4634 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) , zx_tmp_2d_glo) 4635 CALL histwrite(nid_tra3,"trm"//str2,itra,zx_tmp_2d_glo, & 4636 nbp_lon*(nbp_lat),ndex2d) 4637 ! 4638 ENDIF ! mpi root 4639 ! !$OMP END MASTER 4640 ! !$OMP BARRIER 4641 call gather( sconc_seri, auxklonnbtr_glo ) 4642 ! !$OMP MASTER 4643 IF (is_mpi_root .AND. is_omp_root) THEN 4644 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4645 CALL histwrite(nid_tra3,"sconc"//str2,itra,zx_tmp_2d_glo, & 4646 nbp_lon*(nbp_lat),ndex2d) 4647 ENDIF ! mpi root 4648 ! !$OMP END MASTER 4649 ! !$OMP BARRIER 4650 ! 4651 ! SAVING VARIABLES IN LESSIVAGE 4652 ! 4653 call gather( flux_tr, auxklonnbtr_glo ) 4654 ! !$OMP MASTER 4655 IF (is_mpi_root .AND. is_omp_root) THEN 4656 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4657 CALL histwrite(nid_tra2,"flux"//str2,itra,zx_tmp_2d_glo, & 4658 nbp_lon*(nbp_lat),ndex2d) 4659 ! 4660 ENDIF ! mpi root 4661 ! !$OMP END MASTER 4662 ! !$OMP BARRIER 4663 call gather( his_ds, auxklonnbtr_glo ) 4664 !! $OMP MASTER 4665 IF (is_mpi_root .AND. is_omp_root) THEN 4666 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4667 CALL histwrite(nid_tra2,"ds"//str2,itra,zx_tmp_2d_glo, & 4668 nbp_lon*(nbp_lat),ndex2d) 4669 ! 4670 ENDIF 4671 ! !$OMP END MASTER 4672 ! !$OMP BARRIER 4673 ENDDO 4674 4675 DO it=1,nbtr 4676 WRITE(str2,'(i2.2)') it 4677 DO i=1, klon 4678 zx_tmp_fi2d(i) = his_dhlsc(i,it)+his_dhcon(i,it)+ & 4679 his_dhbclsc(i,it)+his_dhbccon(i,it) 4680 his_dh(i,it)= his_dhlsc(i,it)+his_dhcon(i,it)+ & 4681 his_dhbclsc(i,it)+his_dhbccon(i,it) 4682 4683 ENDDO 4684 ! 4685 call gather( zx_tmp_fi2d, auxklon_glo ) 4686 ! !$OMP MASTER 4687 IF (is_mpi_root .AND. is_omp_root) THEN 4688 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4689 CALL histwrite(nid_tra2,"dh"//str2,itra,zx_tmp_2d_glo, & 4690 nbp_lon*(nbp_lat),ndex2d) 4691 ! 4692 ENDIF ! mpi root 4693 ! !$OMP END MASTER 4694 ! !$OMP BARRIER 4695 call gather( his_dhkecv, auxklonnbtr_glo ) 4696 ! !$OMP MASTER 4697 IF (is_mpi_root .AND. is_omp_root) THEN 4698 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4699 CALL histwrite(nid_tra2,"dhkecv"//str2,itra,zx_tmp_2d_glo, & 4700 nbp_lon*(nbp_lat),ndex2d) 4701 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4702 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4703 ! 4704 ENDIF ! mpi root 4705 ! !$OMP END MASTER 4706 ! !$OMP BARRIER 4707 call gather( his_dhkelsc, auxklonnbtr_glo ) 4708 ! !$OMP MASTER 4709 IF (is_mpi_root .AND. is_omp_root) THEN 4710 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4711 CALL histwrite(nid_tra2,"dhkelsc"//str2,itra,zx_tmp_2d_glo, & 4712 nbp_lon*(nbp_lat),ndex2d) 4713 ! 4714 4715 ENDIF ! mpi root 4716 ! !$OMP END MASTER 4717 ! !$OMP BARRIER 4718 ! call gather( d_tr_cv_o, auxklonklevnbtr_glo ) 4719 call gather( d_tr_cv, auxklonklevnbtr_glo ) 4720 ! !$OMP MASTER 4721 IF (is_mpi_root .AND. is_omp_root) THEN 4722 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4723 zx_tmp_3d_glo) 4724 CALL histwrite(nid_tra2,"d_tr_cv"//str2,itra,zx_tmp_3d_glo, & 4725 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4726 ! 4727 ENDIF ! mpi root 4728 ! !$OMP END MASTER 4729 ! !$OMP BARRIER 4730 call gather( d_tr_trsp_o, auxklonklevnbtr_glo ) 4731 ! !$OMP MASTER 4732 IF (is_mpi_root .AND. is_omp_root) THEN 4733 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4734 zx_tmp_3d_glo) 4735 CALL histwrite(nid_tra2,"d_tr_trsp"//str2,itra,zx_tmp_3d_glo, & 4736 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4737 ! 4738 ENDIF ! mpi root 4739 ! !$OMP END MASTER 4740 ! !$OMP BARRIER 4741 call gather( d_tr_sscav_o, auxklonklevnbtr_glo ) 4742 ! !$OMP MASTER 4743 IF (is_mpi_root .AND. is_omp_root) THEN 4744 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4745 zx_tmp_3d_glo) 4746 CALL histwrite(nid_tra2,"d_tr_sscav"//str2,itra,zx_tmp_3d_glo, & 4747 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4748 ! 4749 ENDIF ! mpi root 4750 ! !$OMP END MASTER 4751 ! !$OMP BARRIER 4752 call gather( d_tr_sat_o, auxklonklevnbtr_glo ) 4753 ! !$OMP MASTER 4754 IF (is_mpi_root .AND. is_omp_root) THEN 4755 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4756 zx_tmp_3d_glo) 4757 CALL histwrite(nid_tra2,"d_tr_sat"//str2,itra,zx_tmp_3d_glo, & 4758 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4759 ! 4760 ENDIF ! mpi root 4761 ! !$OMP END MASTER 4762 ! !$OMP BARRIER 4763 call gather( d_tr_uscav_o, auxklonklevnbtr_glo ) 4764 ! !$OMP MASTER 4765 IF (is_mpi_root .AND. is_omp_root) THEN 4766 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4767 zx_tmp_3d_glo) 4768 CALL histwrite(nid_tra2,"d_tr_uscav"//str2,itra,zx_tmp_3d_glo, & 4769 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4770 ! 4771 ENDIF ! mpi root 4772 ! !$OMP END MASTER 4773 ! !$OMP BARRIER 4774 4775 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4776 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4777 call gather( d_tr_insc_o, auxklonklevnbtr_glo ) 4778 ! !$OMP MASTER 4779 IF (is_mpi_root .AND. is_omp_root) THEN 4780 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4781 zx_tmp_3d_glo) 4782 CALL histwrite(nid_tra2,"d_tr_insc"//str2,itra,zx_tmp_3d_glo, & 4783 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4784 ! 4785 ENDIF ! mpi root 4786 ! !$OMP END MASTER 4787 ! !$OMP BARRIER 4788 4789 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4790 call gather( d_tr_bcscav_o, auxklonklevnbtr_glo ) 4791 ! !$OMP MASTER 4792 IF (is_mpi_root .AND. is_omp_root) THEN 4793 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4794 zx_tmp_3d_glo) 4795 CALL histwrite(nid_tra2,"d_tr_bcscav"//str2,itra,zx_tmp_3d_glo, & 4796 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4797 ! 4798 ENDIF ! mpi root 4799 ! !$OMP END MASTER 4800 ! !$OMP BARRIER 4801 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4802 call gather( d_tr_evapls_o, auxklonklevnbtr_glo ) 4803 ! !$OMP MASTER 4804 IF (is_mpi_root .AND. is_omp_root) THEN 4805 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4806 zx_tmp_3d_glo) 4807 CALL histwrite(nid_tra2,"d_tr_evapls"//str2,itra,zx_tmp_3d_glo, & 4808 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4809 ! 4810 ENDIF ! mpi root 4811 ! !$OMP END MASTER 4812 ! !$OMP BARRIER 4813 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4814 ! call gather( d_tr_ls_o, auxklonklevnbtr_glo ) 4815 call gather( d_tr_ls, auxklonklevnbtr_glo ) 4816 ! !$OMP MASTER 4817 IF (is_mpi_root .AND. is_omp_root) THEN 4818 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4819 zx_tmp_3d_glo) 4820 CALL histwrite(nid_tra2,"d_tr_ls"//str2,itra,zx_tmp_3d_glo, & 4821 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4822 4823 ENDIF ! mpi root 4824 ! !$OMP END MASTER 4825 ! !$OMP BARRIER 4826 4827 4828 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4829 ! call gather( d_tr_dyn_o, auxklonklevnbtr_glo ) 4830 call gather( d_tr_dyn, auxklonklevnbtr_glo ) 4831 ! !$OMP MASTER 4832 IF (is_mpi_root .AND. is_omp_root) THEN 4833 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4834 zx_tmp_3d_glo) 4835 CALL histwrite(nid_tra2,"d_tr_dyn"//str2,itra,zx_tmp_3d_glo, & 4836 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4837 4838 print*,'ECRTIURES TENDANCES MODIFIEES NON MAIS' 4839 ENDIF ! mpi root 4840 ! !$OMP END MASTER 4841 ! !$OMP BARRIER 4842 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4843 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4844 ! call gather( d_tr_cl_o, auxklonklevnbtr_glo ) 4845 call gather( d_tr_cl, auxklonklevnbtr_glo ) 4846 ! !$OMP MASTER 4847 IF (is_mpi_root .AND. is_omp_root) THEN 4848 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4849 zx_tmp_3d_glo) 4850 CALL histwrite(nid_tra2,"d_tr_cl"//str2,itra,zx_tmp_3d_glo, & 4851 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4852 4853 ENDIF ! mpi root 4854 ! !$OMP END MASTER 4855 ! !$OMP BARRIER 4856 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4857 ! call gather( d_tr_th_o, auxklonklevnbtr_glo ) 4858 call gather( d_tr_th, auxklonklevnbtr_glo ) 4859 ! !$OMP MASTER 4860 IF (is_mpi_root .AND. is_omp_root) THEN 4861 CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,auxklonklevnbtr_glo(1,1,it) , & 4862 zx_tmp_3d_glo) 4863 CALL histwrite(nid_tra2,"d_tr_th"//str2,itra,zx_tmp_3d_glo, & 4864 nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 4865 4866 ENDIF ! mpi root 4867 ! !$OMP END MASTER 4868 ! !$OMP BARRIER 4869 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4870 call gather( dtrconv,auxklonnbtr_glo ) 4871 ! !$OMP MASTER 4872 IF (is_mpi_root .AND. is_omp_root) THEN 4873 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4874 CALL histwrite(nid_tra2,"dtrconv"//str2,itra,zx_tmp_2d_glo, & 4875 nbp_lon*(nbp_lat),ndex2d) 4876 ! 4877 ENDIF ! mpi root 4878 ! !$OMP END MASTER 4879 ! !$OMP BARRIER 4880 call gather( his_th, auxklonnbtr_glo ) 4881 ! !$OMP MASTER 4882 IF (is_mpi_root .AND. is_omp_root) THEN 4883 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklonnbtr_glo(1,it) ,zx_tmp_2d_glo) 4884 CALL histwrite(nid_tra2,"dtherm"//str2,itra,zx_tmp_2d_glo, & 4885 nbp_lon*(nbp_lat),ndex2d) 4886 ENDIF ! mpi root 4887 ! !$OMP END MASTER 4888 ! !$OMP BARRIER 4889 ! 4890 4891 ENDDO 4892 ! 4893 !$OMP END MASTER 4894 !$OMP BARRIER 4895 call gather( sed_ss, auxklon_glo ) 4896 !$OMP MASTER 4897 IF (is_mpi_root .AND. is_omp_root) THEN 4898 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 4899 CALL histwrite(nid_tra2,"sed_ss",itra,zx_tmp_2d_glo, & 4900 nbp_lon*(nbp_lat),ndex2d) 4901 ! 4902 ENDIF ! mpi root 4903 !$OMP END MASTER 4904 !$OMP BARRIER 4905 call gather( sed_dust, auxklon_glo ) 4906 !$OMP MASTER 4907 IF (is_mpi_root .AND. is_omp_root) THEN 4908 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4909 CALL histwrite(nid_tra2,"sed_dust",itra,zx_tmp_2d_glo, & 4910 nbp_lon*(nbp_lat),ndex2d) 4911 ! 4912 ENDIF ! mpi root 4913 !$OMP END MASTER 4914 !$OMP BARRIER 4915 call gather( sed_dustsco, auxklon_glo ) 4916 !$OMP MASTER 4917 IF (is_mpi_root .AND. is_omp_root) THEN 4918 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4919 CALL histwrite(nid_tra2,"sed_dustsco",itra,zx_tmp_2d_glo, & 4920 nbp_lon*(nbp_lat),ndex2d) 4921 ! 4922 ENDIF ! mpi root 4923 !$OMP END MASTER 4924 !$OMP BARRIER 4925 call gather( his_g2pgas, auxklon_glo ) 4926 !$OMP MASTER 4927 IF (is_mpi_root .AND. is_omp_root) THEN 4928 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4929 CALL histwrite(nid_tra2,"g2p_gas",itra,zx_tmp_2d_glo, & 4930 nbp_lon*(nbp_lat),ndex2d) 4931 ! 4932 ENDIF ! mpi root 4933 !$OMP END MASTER 4934 !$OMP BARRIER 4935 call gather( his_g2paer, auxklon_glo ) 4936 !$OMP MASTER 4937 IF (is_mpi_root .AND. is_omp_root) THEN 4938 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4939 CALL histwrite(nid_tra2,"g2p_aer",itra,zx_tmp_2d_glo, & 4940 nbp_lon*(nbp_lat),ndex2d) 4941 ! SAVING VARIABLES IN HISTRAC 4942 ! 4943 ENDIF ! mpi root 4944 !$OMP END MASTER 4945 !$OMP BARRIER 4946 call gather( fluxbb, auxklon_glo ) 4947 !$OMP MASTER 4948 IF (is_mpi_root .AND. is_omp_root) THEN 4949 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4950 CALL histwrite(nid_tra1,"fluxbb",itra,zx_tmp_2d_glo, & 4951 nbp_lon*(nbp_lat),ndex2d) 4952 ! 4953 ENDIF ! mpi root 4954 !$OMP END MASTER 4955 !$OMP BARRIER 4956 call gather( fluxff, auxklon_glo ) 4957 !$OMP MASTER 4958 IF (is_mpi_root .AND. is_omp_root) THEN 4959 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4960 CALL histwrite(nid_tra1,"fluxff",itra,zx_tmp_2d_glo, & 4961 nbp_lon*(nbp_lat),ndex2d) 4962 ! 4963 ! ======================== BC ============================= 4964 ENDIF ! mpi root 4965 !$OMP END MASTER 4966 !$OMP BARRIER 4967 call gather( fluxbcbb, auxklon_glo ) 4968 !$OMP MASTER 4969 IF (is_mpi_root .AND. is_omp_root) THEN 4970 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4971 CALL histwrite(nid_tra1,"fluxbcbb",itra,zx_tmp_2d_glo, & 4972 nbp_lon*(nbp_lat),ndex2d) 4973 ! 4974 ENDIF ! mpi root 4975 !$OMP END MASTER 4976 !$OMP BARRIER 4977 call gather( fluxbcff, auxklon_glo ) 4978 !$OMP MASTER 4979 IF (is_mpi_root .AND. is_omp_root) THEN 4980 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4981 CALL histwrite(nid_tra1,"fluxbcff",itra,zx_tmp_2d_glo, & 4982 nbp_lon*(nbp_lat),ndex2d) 4983 ! 4984 ENDIF ! mpi root 4985 !$OMP END MASTER 4986 !$OMP BARRIER 4987 call gather( fluxbcnff, auxklon_glo ) 4988 !$OMP MASTER 4989 IF (is_mpi_root .AND. is_omp_root) THEN 4990 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 4991 CALL histwrite(nid_tra1,"fluxbcnff",itra,zx_tmp_2d_glo, & 4992 nbp_lon*(nbp_lat),ndex2d) 4993 ! 4994 ENDIF ! mpi root 4995 !$OMP END MASTER 4996 !$OMP BARRIER 4997 call gather( fluxbcba, auxklon_glo ) 4998 !$OMP MASTER 4999 IF (is_mpi_root .AND. is_omp_root) THEN 5000 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5001 CALL histwrite(nid_tra1,"fluxbcba",itra,zx_tmp_2d_glo, & 5002 nbp_lon*(nbp_lat),ndex2d) 5003 ! 5004 ENDIF ! mpi root 5005 !$OMP END MASTER 5006 !$OMP BARRIER 5007 call gather( fluxbc, auxklon_glo ) 5008 !$OMP MASTER 5009 IF (is_mpi_root .AND. is_omp_root) THEN 5010 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5011 CALL histwrite(nid_tra1,"fluxbc",itra,zx_tmp_2d_glo, & 5012 nbp_lon*(nbp_lat),ndex2d) 5013 ! ======================== OM ============================= 5014 ENDIF ! mpi root 5015 !$OMP END MASTER 5016 !$OMP BARRIER 5017 call gather( fluxombb, auxklon_glo ) 5018 !$OMP MASTER 5019 IF (is_mpi_root .AND. is_omp_root) THEN 5020 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5021 CALL histwrite(nid_tra1,"fluxombb",itra,zx_tmp_2d_glo, & 5022 nbp_lon*(nbp_lat),ndex2d) 5023 ! 5024 ENDIF ! mpi root 5025 !$OMP END MASTER 5026 !$OMP BARRIER 5027 call gather( fluxomff, auxklon_glo ) 5028 !$OMP MASTER 5029 IF (is_mpi_root .AND. is_omp_root) THEN 5030 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5031 CALL histwrite(nid_tra1,"fluxomff",itra,zx_tmp_2d_glo, & 5032 nbp_lon*(nbp_lat),ndex2d) 5033 ! 5034 ENDIF ! mpi root 5035 !$OMP END MASTER 5036 !$OMP BARRIER 5037 call gather( fluxomnff, auxklon_glo ) 5038 !$OMP MASTER 5039 IF (is_mpi_root .AND. is_omp_root) THEN 5040 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5041 CALL histwrite(nid_tra1,"fluxomnff",itra,zx_tmp_2d_glo, & 5042 nbp_lon*(nbp_lat),ndex2d) 5043 ! 5044 ENDIF ! mpi root 5045 !$OMP END MASTER 5046 !$OMP BARRIER 5047 call gather( fluxomba, auxklon_glo ) 5048 !$OMP MASTER 5049 IF (is_mpi_root .AND. is_omp_root) THEN 5050 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5051 CALL histwrite(nid_tra1,"fluxomba",itra,zx_tmp_2d_glo, & 5052 nbp_lon*(nbp_lat),ndex2d) 5053 ! 5054 ENDIF ! mpi root 5055 !$OMP END MASTER 5056 !$OMP BARRIER 5057 call gather( fluxomnat, auxklon_glo ) 5058 !$OMP MASTER 5059 IF (is_mpi_root .AND. is_omp_root) THEN 5060 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5061 CALL histwrite(nid_tra1,"fluxomnat",itra,zx_tmp_2d_glo, & 5062 nbp_lon*(nbp_lat),ndex2d) 5063 ! 5064 ENDIF ! mpi root 5065 !$OMP END MASTER 5066 !$OMP BARRIER 5067 call gather( fluxom, auxklon_glo ) 5068 !$OMP MASTER 5069 IF (is_mpi_root .AND. is_omp_root) THEN 5070 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5071 CALL histwrite(nid_tra1,"fluxom",itra,zx_tmp_2d_glo, & 5072 nbp_lon*(nbp_lat),ndex2d) 5073 ! ======================== SO4 ============================= 5074 ENDIF ! mpi root 5075 !$OMP END MASTER 5076 !$OMP BARRIER 5077 call gather( fluxso4ff, auxklon_glo ) 5078 !$OMP MASTER 5079 IF (is_mpi_root .AND. is_omp_root) THEN 5080 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5081 CALL histwrite(nid_tra1,"fluxso4ff",itra,zx_tmp_2d_glo, & 5082 nbp_lon*(nbp_lat),ndex2d) 5083 ! 5084 ENDIF ! mpi root 5085 !$OMP END MASTER 5086 !$OMP BARRIER 5087 call gather( fluxso4nff, auxklon_glo ) 5088 !$OMP MASTER 5089 IF (is_mpi_root .AND. is_omp_root) THEN 5090 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5091 CALL histwrite(nid_tra1,"fluxso4nff",itra,zx_tmp_2d_glo, & 5092 nbp_lon*(nbp_lat),ndex2d) 5093 ! 5094 ENDIF ! mpi root 5095 !$OMP END MASTER 5096 !$OMP BARRIER 5097 call gather( fluxso4bb, auxklon_glo ) 5098 !$OMP MASTER 5099 IF (is_mpi_root .AND. is_omp_root) THEN 5100 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5101 CALL histwrite(nid_tra1,"fluxso4bb",itra,zx_tmp_2d_glo, & 5102 nbp_lon*(nbp_lat),ndex2d) 5103 ! 5104 ENDIF ! mpi root 5105 !$OMP END MASTER 5106 !$OMP BARRIER 5107 call gather( fluxso4ba, auxklon_glo ) 5108 !$OMP MASTER 5109 IF (is_mpi_root .AND. is_omp_root) THEN 5110 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5111 CALL histwrite(nid_tra1,"fluxso4ba",itra,zx_tmp_2d_glo, & 5112 nbp_lon*(nbp_lat),ndex2d) 5113 ! 5114 ENDIF ! mpi root 5115 !$OMP END MASTER 5116 !$OMP BARRIER 5117 call gather( fluxso4, auxklon_glo ) 5118 !$OMP MASTER 5119 IF (is_mpi_root .AND. is_omp_root) THEN 5120 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo ,zx_tmp_2d_glo) 5121 CALL histwrite(nid_tra1,"fluxso4",itra,zx_tmp_2d_glo, & 5122 nbp_lon*(nbp_lat),ndex2d) 5123 ! ======================== H2S ============================= 5124 ENDIF ! mpi root 5125 !$OMP END MASTER 5126 !$OMP BARRIER 5127 call gather( fluxh2sff, auxklon_glo ) 5128 !$OMP MASTER 5129 IF (is_mpi_root .AND. is_omp_root) THEN 5130 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5131 CALL histwrite(nid_tra1,"fluxh2sff",itra,zx_tmp_2d_glo, & 5132 nbp_lon*(nbp_lat),ndex2d) 5133 ! 5134 ENDIF ! mpi root 5135 !$OMP END MASTER 5136 !$OMP BARRIER 5137 call gather( fluxh2snff, auxklon_glo ) 5138 !$OMP MASTER 5139 IF (is_mpi_root .AND. is_omp_root) THEN 5140 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5141 CALL histwrite(nid_tra1,"fluxh2snff",itra,zx_tmp_2d_glo, & 5142 nbp_lon*(nbp_lat),ndex2d) 5143 ! 5144 ENDIF ! mpi root 5145 !$OMP END MASTER 5146 !$OMP BARRIER 5147 call gather( fluxh2sbio, auxklon_glo ) 5148 !$OMP MASTER 5149 IF (is_mpi_root .AND. is_omp_root) THEN 5150 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5151 CALL histwrite(nid_tra1,"fluxh2sbio",itra,zx_tmp_2d_glo, & 5152 nbp_lon*(nbp_lat),ndex2d) 5153 ! ======================== SO2 ============================= 5154 ENDIF ! mpi root 5155 !$OMP END MASTER 5156 !$OMP BARRIER 5157 call gather( fluxso2ff, auxklon_glo ) 5158 !$OMP MASTER 5159 IF (is_mpi_root .AND. is_omp_root) THEN 5160 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5161 CALL histwrite(nid_tra1,"fluxso2ff",itra,zx_tmp_2d_glo, & 5162 nbp_lon*(nbp_lat),ndex2d) 5163 ! 5164 ENDIF ! mpi root 5165 !$OMP END MASTER 5166 !$OMP BARRIER 5167 call gather( fluxso2nff, auxklon_glo ) 5168 !$OMP MASTER 5169 IF (is_mpi_root .AND. is_omp_root) THEN 5170 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5171 CALL histwrite(nid_tra1,"fluxso2nff",itra,zx_tmp_2d_glo, & 5172 nbp_lon*(nbp_lat),ndex2d) 5173 ! 5174 ENDIF ! mpi root 5175 !$OMP END MASTER 5176 !$OMP BARRIER 5177 call gather( fluxso2bb, auxklon_glo ) 5178 !$OMP MASTER 5179 IF (is_mpi_root .AND. is_omp_root) THEN 5180 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5181 CALL histwrite(nid_tra1,"fluxso2bb",itra,zx_tmp_2d_glo, & 5182 nbp_lon*(nbp_lat),ndex2d) 5183 ! 5184 ENDIF ! mpi root 5185 !$OMP END MASTER 5186 !$OMP BARRIER 5187 call gather( fluxso2vol, auxklon_glo ) 5188 !$OMP MASTER 5189 IF (is_mpi_root .AND. is_omp_root) THEN 5190 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5191 CALL histwrite(nid_tra1,"fluxso2vol",itra,zx_tmp_2d_glo, & 5192 nbp_lon*(nbp_lat),ndex2d) 5193 ! 5194 ENDIF ! mpi root 5195 !$OMP END MASTER 5196 !$OMP BARRIER 5197 call gather( fluxso2ba, auxklon_glo ) 5198 !$OMP MASTER 5199 IF (is_mpi_root .AND. is_omp_root) THEN 5200 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5201 CALL histwrite(nid_tra1,"fluxso2ba",itra,zx_tmp_2d_glo, & 5202 nbp_lon*(nbp_lat),ndex2d) 5203 ! 5204 ENDIF ! mpi root 5205 !$OMP END MASTER 5206 !$OMP BARRIER 5207 call gather( fluxso2, auxklon_glo ) 5208 !$OMP MASTER 5209 IF (is_mpi_root .AND. is_omp_root) THEN 5210 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5211 CALL histwrite(nid_tra1,"fluxso2",itra,zx_tmp_2d_glo, & 5212 nbp_lon*(nbp_lat),ndex2d) 5213 ! 5214 ENDIF ! mpi root 5215 !$OMP END MASTER 5216 !$OMP BARRIER 5217 call gather( fluxdms, auxklon_glo ) 5218 !$OMP MASTER 5219 IF (is_mpi_root .AND. is_omp_root) THEN 5220 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5221 CALL histwrite(nid_tra1,"fluxdms",itra,zx_tmp_2d_glo, & 5222 nbp_lon*(nbp_lat),ndex2d) 5223 ! ======================== DD ============================= 5224 ENDIF ! mpi root 5225 !$OMP END MASTER 5226 !$OMP BARRIER 5227 call gather( fluxdustec, auxklon_glo ) 5228 !$OMP MASTER 5229 IF (is_mpi_root .AND. is_omp_root) THEN 5230 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5231 CALL histwrite(nid_tra1,"fluxdustec",itra,zx_tmp_2d_glo, & 5232 nbp_lon*(nbp_lat),ndex2d) 5233 ! 5234 ENDIF ! mpi root 5235 !$OMP END MASTER 5236 !$OMP BARRIER 5237 call gather( fluxddfine, auxklon_glo ) 5238 !$OMP MASTER 5239 IF (is_mpi_root .AND. is_omp_root) THEN 5240 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5241 CALL histwrite(nid_tra1,"fluxddfine",itra,zx_tmp_2d_glo, & 5242 nbp_lon*(nbp_lat),ndex2d) 5243 ! 5244 ENDIF ! mpi root 5245 !$OMP END MASTER 5246 !$OMP BARRIER 5247 call gather( fluxddcoa, auxklon_glo ) 5248 !$OMP MASTER 5249 IF (is_mpi_root .AND. is_omp_root) THEN 5250 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5251 CALL histwrite(nid_tra1,"fluxddcoa",itra,zx_tmp_2d_glo, & 5252 nbp_lon*(nbp_lat),ndex2d) 5253 ! 5254 ENDIF ! mpi root 5255 !$OMP END MASTER 5256 !$OMP BARRIER 5257 call gather( fluxddsco, auxklon_glo ) 5258 !$OMP MASTER 5259 IF (is_mpi_root .AND. is_omp_root) THEN 5260 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5261 CALL histwrite(nid_tra1,"fluxddsco",itra,zx_tmp_2d_glo, & 5262 nbp_lon*(nbp_lat),ndex2d) 5263 ! 5264 ENDIF ! mpi root 5265 !$OMP END MASTER 5266 !$OMP BARRIER 5267 call gather( fluxdd, auxklon_glo ) 5268 !$OMP MASTER 5269 IF (is_mpi_root .AND. is_omp_root) THEN 5270 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5271 CALL histwrite(nid_tra1,"fluxdd",itra,zx_tmp_2d_glo, & 5272 nbp_lon*(nbp_lat),ndex2d) 5273 ! ======================== SS ============================= 5274 ENDIF ! mpi root 5275 !$OMP END MASTER 5276 !$OMP BARRIER 5277 call gather( fluxssfine, auxklon_glo ) 5278 !$OMP MASTER 5279 IF (is_mpi_root .AND. is_omp_root) THEN 5280 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5281 CALL histwrite(nid_tra1,"fluxssfine",itra,zx_tmp_2d_glo, & 5282 nbp_lon*(nbp_lat),ndex2d) 5283 ! 5284 ENDIF ! mpi root 5285 !$OMP END MASTER 5286 !$OMP BARRIER 5287 call gather( fluxsscoa, auxklon_glo ) 5288 !$OMP MASTER 5289 IF (is_mpi_root .AND. is_omp_root) THEN 5290 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5291 CALL histwrite(nid_tra1,"fluxsscoa",itra,zx_tmp_2d_glo, & 5292 nbp_lon*(nbp_lat),ndex2d) 5293 ! 5294 ENDIF ! mpi root 5295 !$OMP END MASTER 5296 !$OMP BARRIER 5297 call gather( fluxss, auxklon_glo ) 5298 !$OMP MASTER 5299 IF (is_mpi_root .AND. is_omp_root) THEN 5300 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5301 CALL histwrite(nid_tra1,"fluxss",itra,zx_tmp_2d_glo, & 5302 nbp_lon*(nbp_lat),ndex2d) 5303 ! 5304 ENDIF ! mpi root 5305 !$OMP END MASTER 5306 !$OMP BARRIER 5307 5308 ! call gather( , auxklon_glo ) 5309 !!!! IF (is_mpi_root .AND. is_omp_root) THEN 5310 !nhl CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,fluxso4chem,zx_tmp_3d_glo) 5311 !nhl CALL histwrite(nid_tra1,"fluxso4chem",itra,zx_tmp_3d_glo, & 5312 !nhl . nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 5313 ! 5314 call gather( flux_sparam_ind, auxklon_glo ) 5315 !$OMP MASTER 5316 IF (is_mpi_root .AND. is_omp_root) THEN 5317 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5318 CALL histwrite(nid_tra1,"flux_sparam_ind",itra,zx_tmp_2d_glo, & 5319 nbp_lon*(nbp_lat),ndex2d) 5320 ! 5321 ENDIF ! mpi root 5322 !$OMP END MASTER 5323 !$OMP BARRIER 5324 call gather( flux_sparam_bb, auxklon_glo ) 5325 !$OMP MASTER 5326 IF (is_mpi_root .AND. is_omp_root) THEN 5327 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5328 CALL histwrite(nid_tra1,"flux_sparam_bb",itra,zx_tmp_2d_glo, & 5329 nbp_lon*(nbp_lat),ndex2d) 5330 ! 5331 ENDIF ! mpi root 5332 !$OMP END MASTER 5333 !$OMP BARRIER 5334 call gather( flux_sparam_ff, auxklon_glo ) 5335 !$OMP MASTER 5336 IF (is_mpi_root .AND. is_omp_root) THEN 5337 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5338 CALL histwrite(nid_tra1,"flux_sparam_ff",itra,zx_tmp_2d_glo, & 5339 nbp_lon*(nbp_lat),ndex2d) 5340 ! 5341 ENDIF ! mpi root 5342 !$OMP END MASTER 5343 !$OMP BARRIER 5344 call gather( flux_sparam_ddfine, auxklon_glo ) 5345 !$OMP MASTER 5346 IF (is_mpi_root .AND. is_omp_root) THEN 5347 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5348 CALL histwrite(nid_tra1,"flux_sparam_ddfine",itra,zx_tmp_2d_glo, & 5349 nbp_lon*(nbp_lat),ndex2d) 5350 ! 5351 ENDIF ! mpi root 5352 !$OMP END MASTER 5353 !$OMP BARRIER 5354 call gather( flux_sparam_ddcoa, auxklon_glo ) 5355 !$OMP MASTER 5356 IF (is_mpi_root .AND. is_omp_root) THEN 5357 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5358 CALL histwrite(nid_tra1,"flux_sparam_ddcoa",itra,zx_tmp_2d_glo, & 5359 nbp_lon*(nbp_lat),ndex2d) 5360 ! 5361 ENDIF ! mpi root 5362 !$OMP END MASTER 5363 !$OMP BARRIER 5364 call gather( flux_sparam_ddsco, auxklon_glo ) 5365 !$OMP MASTER 5366 IF (is_mpi_root .AND. is_omp_root) THEN 5367 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5368 CALL histwrite(nid_tra1,"flux_sparam_ddsco",itra,zx_tmp_2d_glo, & 5369 nbp_lon*(nbp_lat),ndex2d) 5370 ! 5371 ENDIF ! mpi root 5372 !$OMP END MASTER 5373 !$OMP BARRIER 5374 call gather( flux_sparam_ssfine, auxklon_glo ) 5375 !$OMP MASTER 5376 IF (is_mpi_root .AND. is_omp_root) THEN 5377 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5378 CALL histwrite(nid_tra1,"flux_sparam_ssfine",itra,zx_tmp_2d_glo, & 5379 nbp_lon*(nbp_lat),ndex2d) 5380 ! 5381 ENDIF ! mpi root 5382 !$OMP END MASTER 5383 !$OMP BARRIER 5384 call gather( flux_sparam_sscoa, auxklon_glo ) 5385 !$OMP MASTER 5386 IF (is_mpi_root .AND. is_omp_root) THEN 5387 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5388 CALL histwrite(nid_tra1,"flux_sparam_sscoa",itra,zx_tmp_2d_glo, & 5389 nbp_lon*(nbp_lat),ndex2d) 5390 ! 5391 ENDIF ! mpi root 5392 !$OMP END MASTER 5393 !$OMP BARRIER 5394 call gather( u10m_ec, auxklon_glo ) 5395 !$OMP MASTER 5396 IF (is_mpi_root .AND. is_omp_root) THEN 5397 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5398 CALL histwrite(nid_tra1,"u10m",itra,zx_tmp_2d_glo, & 5399 nbp_lon*(nbp_lat),ndex2d) 5400 ! 5401 ENDIF ! mpi root 5402 !$OMP END MASTER 5403 !$OMP BARRIER 5404 call gather( v10m_ec, auxklon_glo ) 5405 !$OMP MASTER 5406 IF (is_mpi_root .AND. is_omp_root) THEN 5407 CALL gr_fi_ecrit(1,klon_glo,nbp_lon,nbp_lat,auxklon_glo,zx_tmp_2d_glo) 5408 CALL histwrite(nid_tra1,"v10m",itra,zx_tmp_2d_glo, & 5409 nbp_lon*(nbp_lat),ndex2d) 5410 ! 5411 ! call gather( , auxklon_glo ) 5412 !!! !$OMP MASTER 5413 ! IF (is_mpi_root .AND. is_omp_root) THEN 5414 !nhl CALL gr_fi_ecrit(nbp_lev,klon_glo,nbp_lon,nbp_lat,flux_sparam_sulf,zx_tmp_3d_glo) 5415 !nhl CALL histwrite(nid_tra1,"flux_sparam_sulf",itra,zx_tmp_3d_glo, & 5416 !nhl . nbp_lon*(nbp_lat)*nbp_lev,ndex3d) 5417 ! 5418 ENDIF ! mpi root 5419 !$OMP END MASTER 5420 !$OMP BARRIER 5421 5422 ENDIF ! ok_histrac 3925 !AS: commenting out and deleting lines 3926 !! IF (ok_histrac) THEN 3927 !! 3928 !! SAVING VARIABLES IN TRACEUR 3929 !!----- many lines deleted---- 3930 !! ENDIF ! ok_histrac 5423 3931 5424 3932 … … 5479 3987 dhkelsc04(i)=0. 5480 3988 dhkelsc05(i)=0. 5481 ! u10m_ss(i)=u10m_ec(i)5482 ! v10m_ss(i)=v10m_ec(i)5483 3989 !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 5484 3990 … … 5599 4105 d_tr_th04(i,k)=0. 5600 4106 d_tr_th05(i,k)=0.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 4107 ENDDO 4108 ENDDO 4109 4110 IF(1==0) THEN 4111 ! calcul in original trunk version; problem: budget not closed. Corrected in "ELSE" 4112 DO i=1, klon 4113 DO k=1,klev 4114 5601 4115 if(id_prec>0) d_tr_cv01(i,k) =d_tr_cv_o(i,k,id_prec) 5602 4116 if(id_fine>0) d_tr_cv02(i,k) =d_tr_cv_o(i,k,id_fine) … … 5641 4155 ENDDO 5642 4156 ENDDO 5643 IF(1==0) THEN 4157 ELSE ! correction pour fermeture de bilan, par FH dans les simus de Binta pour Habib 4158 DO i=1, klon 4159 DO k=1,klev 4160 if(id_prec>0) d_tr_cv01(i,k) =d_tr_cv(i,k,id_prec)/pdtphys 4161 if(id_fine>0) d_tr_cv02(i,k) =d_tr_cv(i,k,id_fine)/pdtphys 4162 if(id_coss>0) d_tr_cv03(i,k) =d_tr_cv(i,k,id_coss)/pdtphys 4163 if(id_codu>0) d_tr_cv04(i,k) =d_tr_cv(i,k,id_codu)/pdtphys 4164 if(id_scdu>0) d_tr_cv05(i,k) =d_tr_cv(i,k,id_scdu)/pdtphys 4165 if(id_prec>0) d_tr_trsp01(i,k) =d_tr_trsp(i,k,id_prec)/pdtphys 4166 if(id_fine>0) d_tr_trsp02(i,k) =d_tr_trsp(i,k,id_fine)/pdtphys 4167 if(id_coss>0) d_tr_trsp03(i,k) =d_tr_trsp(i,k,id_coss)/pdtphys 4168 if(id_codu>0) d_tr_trsp04(i,k) =d_tr_trsp(i,k,id_codu)/pdtphys 4169 if(id_scdu>0) d_tr_trsp05(i,k) =d_tr_trsp(i,k,id_scdu)/pdtphys 4170 if(id_prec>0) d_tr_sscav01(i,k)=d_tr_sscav(i,k,id_prec)/pdtphys 4171 if(id_fine>0) d_tr_sscav02(i,k)=d_tr_sscav(i,k,id_fine)/pdtphys 4172 if(id_coss>0) d_tr_sscav03(i,k)=d_tr_sscav(i,k,id_coss)/pdtphys 4173 if(id_codu>0) d_tr_sscav04(i,k)=d_tr_sscav(i,k,id_codu)/pdtphys 4174 if(id_scdu>0) d_tr_sscav05(i,k)=d_tr_sscav(i,k,id_scdu)/pdtphys 4175 if(id_prec>0) d_tr_sat01(i,k) =d_tr_sat(i,k,id_prec)/pdtphys 4176 if(id_fine>0) d_tr_sat02(i,k) =d_tr_sat(i,k,id_fine)/pdtphys 4177 if(id_coss>0) d_tr_sat03(i,k) =d_tr_sat(i,k,id_coss)/pdtphys 4178 if(id_codu>0) d_tr_sat04(i,k) =d_tr_sat(i,k,id_codu)/pdtphys 4179 if(id_scdu>0) d_tr_sat05(i,k) =d_tr_sat(i,k,id_scdu)/pdtphys 4180 if(id_prec>0) d_tr_uscav01(i,k)=d_tr_uscav(i,k,id_prec)/pdtphys 4181 if(id_fine>0) d_tr_uscav02(i,k)=d_tr_uscav(i,k,id_fine)/pdtphys 4182 if(id_coss>0) d_tr_uscav03(i,k)=d_tr_uscav(i,k,id_coss)/pdtphys 4183 if(id_codu>0) d_tr_uscav04(i,k)=d_tr_uscav(i,k,id_codu)/pdtphys 4184 if(id_scdu>0) d_tr_uscav05(i,k)=d_tr_uscav(i,k,id_scdu)/pdtphys 4185 if(id_prec>0) d_tr_insc01(i,k)=d_tr_insc(i,k,id_prec)/pdtphys 4186 if(id_fine>0) d_tr_insc02(i,k)=d_tr_insc(i,k,id_fine)/pdtphys 4187 if(id_coss>0) d_tr_insc03(i,k)=d_tr_insc(i,k,id_coss)/pdtphys 4188 if(id_codu>0) d_tr_insc04(i,k)=d_tr_insc(i,k,id_codu)/pdtphys 4189 if(id_scdu>0) d_tr_insc05(i,k)=d_tr_insc(i,k,id_scdu)/pdtphys 4190 if(id_prec>0) d_tr_bcscav01(i,k)=d_tr_bcscav(i,k,id_prec)/pdtphys 4191 if(id_fine>0) d_tr_bcscav02(i,k)=d_tr_bcscav(i,k,id_fine)/pdtphys 4192 if(id_coss>0) d_tr_bcscav03(i,k)=d_tr_bcscav(i,k,id_coss)/pdtphys 4193 if(id_codu>0) d_tr_bcscav04(i,k)=d_tr_bcscav(i,k,id_codu)/pdtphys 4194 if(id_scdu>0) d_tr_bcscav05(i,k)=d_tr_bcscav(i,k,id_scdu)/pdtphys 4195 if(id_prec>0) d_tr_evapls01(i,k)=d_tr_evapls(i,k,id_prec)/pdtphys 4196 if(id_fine>0) d_tr_evapls02(i,k)=d_tr_evapls(i,k,id_fine)/pdtphys 4197 if(id_coss>0) d_tr_evapls03(i,k)=d_tr_evapls(i,k,id_coss)/pdtphys 4198 if(id_codu>0) d_tr_evapls04(i,k)=d_tr_evapls(i,k,id_codu)/pdtphys 4199 if(id_scdu>0) d_tr_evapls05(i,k)=d_tr_evapls(i,k,id_scdu)/pdtphys 4200 ENDDO 4201 ENDDO 4202 ENDIF 4203 4204 IF(1==0) THEN ! This "if" is as in original trunk 5644 4205 DO i=1, klon 5645 4206 DO k=1,klev … … 5865 4426 END SUBROUTINE readregions_spl 5866 4427 4428 !! AS: SUBROUTINE readscaleparams_spl pas appellee 5867 4429 SUBROUTINE readscaleparams_spl(scale_param, nbreg, & 5868 4430 filescaleparams) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/read_dust.F
r2630 r3851 14 14 real dust_ec_glo(klon_glo) 15 15 c 16 real dust_nc(iip1,jjp1)16 c as real dust_nc(iip1,jjp1) 17 17 real dust_nc_glo(nbp_lon+1,nbp_lat) 18 18 real rcode … … 59 59 c--upside down + physical grid 60 60 c 61 c--OB=change jjp1 to 1 here 61 c--OB=change jjp1 to 1 here ; 62 c----AS: OB's change is needed if lats N to S (90 to -90) in dust.nc 62 63 ! dust_ec(1)=MAX(dust_nc(1,jjp1),0.0) 63 dust_ec (1)=MAX(dust_nc(1,nbp_lat),0.0)64 dust_ec_glo(1)=MAX(dust_nc_glo(1,nbp_lat),0.0) 64 65 ig=2 65 66 ! DO j=2,jjm -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/read_newemissions.F
r2630 r3851 59 59 !$OMP THREADPRIVATE(u10m_ec1, v10m_ec1, dust_ec1) 60 60 !$OMP THREADPRIVATE(u10m_ec2, v10m_ec2, dust_ec2) 61 REAL u10m_nc(iip1,jjp1), v10m_nc(iip1,jjp1)61 c as REAL u10m_nc(iip1,jjp1), v10m_nc(iip1,jjp1) 62 62 REAL u10m_ec(klon), v10m_ec(klon), dust_ec(klon) 63 63 c REAL cly(klon), wth(klon), zprecipinsoil(klon) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/read_vent.F
r2630 r3851 33 33 c 34 34 ncidu1=NCOPN('u10m.nc',NCNOWRIT,rcode) 35 varidu1=NCVID(ncidu1,'U WND',rcode)35 varidu1=NCVID(ncidu1,'U10M',rcode) 36 36 ncidv1=NCOPN('v10m.nc',NCNOWRIT,rcode) 37 varidv1=NCVID(ncidv1,'V WND',rcode)37 varidv1=NCVID(ncidv1,'V10M',rcode) 38 38 c 39 39 endif -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/spla_output_write.h
r2752 r3851 9 9 CALL histwrite_phy( o_taue670 , diag_aod670_tot ) 10 10 CALL histwrite_phy( o_taue865 , diag_aod865_tot ) 11 IF(id_fine>0 ) CALL histwrite_phy( o_taue550_tr2 , diff_aod550_tr2 )12 IF(id_fine>0 ) CALL histwrite_phy( o_taue670_tr2 , diag_aod670_tr2 )13 IF(id_fine>0 ) CALL histwrite_phy( o_taue865_tr2 , diag_aod865_tr2 )14 IF(id_coss>0 ) CALL histwrite_phy( o_taue550_ss , diag_aod550_ss )15 IF(id_coss>0 ) CALL histwrite_phy( o_taue670_ss , diag_aod670_ss )16 IF(id_coss>0 ) CALL histwrite_phy( o_taue865_ss , diag_aod865_ss )17 IF(id_codu>0 ) CALL histwrite_phy( o_taue550_dust , diag_aod550_dust )18 IF(id_codu>0 ) CALL histwrite_phy( o_taue670_dust , diag_aod670_dust )19 IF(id_codu>0 ) CALL histwrite_phy( o_taue865_dust , diag_aod865_dust )20 IF(id_scdu>0 ) CALL histwrite_phy( o_taue550_dustsco , diag_aod550_dustsco )21 IF(id_scdu>0 ) CALL histwrite_phy( o_taue670_dustsco , diag_aod670_dustsco )22 IF(id_scdu>0 ) CALL histwrite_phy( o_taue865_dustsco , diag_aod865_dustsco )11 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_tr2 , diff_aod550_tr2 ) 12 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_tr2 , diag_aod670_tr2 ) 13 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_tr2 , diag_aod865_tr2 ) 14 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_ss , diag_aod550_ss ) 15 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_ss , diag_aod670_ss ) 16 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_ss , diag_aod865_ss ) 17 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_dust , diag_aod550_dust ) 18 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_dust , diag_aod670_dust ) 19 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_dust , diag_aod865_dust ) 20 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_dustsco , diag_aod550_dustsco ) 21 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_dustsco , diag_aod670_dustsco ) 22 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_dustsco , diag_aod865_dustsco ) 23 23 CALL histwrite_phy( o_taue550_aqua , aod550_aqua ) 24 24 CALL histwrite_phy( o_taue550_terra , aod550_terra ) … … 28 28 CALL histwrite_phy( o_taue865_terra , aod865_terra ) 29 29 30 IF(id_fine>0 ) CALL histwrite_phy( o_taue550_fine_aqua ,aod550_tr2_aqua )31 IF(id_fine>0 ) CALL histwrite_phy( o_taue670_fine_aqua ,aod670_tr2_aqua )32 IF(id_fine>0 ) CALL histwrite_phy( o_taue865_fine_aqua ,aod865_tr2_aqua )33 IF(id_coss>0 ) CALL histwrite_phy( o_taue550_coss_aqua ,aod550_ss_aqua )34 IF(id_coss>0 ) CALL histwrite_phy( o_taue670_coss_aqua ,aod670_ss_aqua )35 IF(id_coss>0 ) CALL histwrite_phy( o_taue865_coss_aqua ,aod865_ss_aqua )36 IF(id_codu>0 ) CALL histwrite_phy( o_taue550_codu_aqua ,aod550_dust_aqua )37 IF(id_codu>0 ) CALL histwrite_phy( o_taue670_codu_aqua ,aod670_dust_aqua )38 IF(id_codu>0 ) CALL histwrite_phy( o_taue865_codu_aqua ,aod865_dust_aqua )39 IF(id_scdu>0 ) CALL histwrite_phy( o_taue670_scdu_aqua ,aod670_dustsco_aqua )40 IF(id_scdu>0 ) CALL histwrite_phy( o_taue550_scdu_aqua ,aod550_dustsco_aqua )41 IF(id_scdu>0 ) CALL histwrite_phy( o_taue865_scdu_aqua ,aod865_dustsco_aqua )30 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_fine_aqua ,aod550_tr2_aqua ) 31 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_fine_aqua ,aod670_tr2_aqua ) 32 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_fine_aqua ,aod865_tr2_aqua ) 33 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_coss_aqua ,aod550_ss_aqua ) 34 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_coss_aqua ,aod670_ss_aqua ) 35 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_coss_aqua ,aod865_ss_aqua ) 36 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_codu_aqua ,aod550_dust_aqua ) 37 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_codu_aqua ,aod670_dust_aqua ) 38 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_codu_aqua ,aod865_dust_aqua ) 39 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_scdu_aqua ,aod670_dustsco_aqua ) 40 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_scdu_aqua ,aod550_dustsco_aqua ) 41 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_scdu_aqua ,aod865_dustsco_aqua ) 42 42 43 IF(id_fine>0 ) CALL histwrite_phy( o_taue550_fine_terra ,aod550_tr2_terra )44 IF(id_fine>0 ) CALL histwrite_phy( o_taue670_fine_terra ,aod670_tr2_terra )45 IF(id_fine>0 ) CALL histwrite_phy( o_taue865_fine_terra ,aod865_tr2_terra )46 IF(id_coss>0 ) CALL histwrite_phy( o_taue550_coss_terra ,aod550_ss_terra )47 IF(id_coss>0 ) CALL histwrite_phy( o_taue670_coss_terra ,aod670_ss_terra )48 IF(id_coss>0 ) CALL histwrite_phy( o_taue865_coss_terra ,aod865_ss_terra )49 IF(id_codu>0 ) CALL histwrite_phy( o_taue550_codu_terra ,aod550_dust_terra )50 IF(id_codu>0 ) CALL histwrite_phy( o_taue670_codu_terra ,aod670_dust_terra )51 IF(id_codu>0 ) CALL histwrite_phy( o_taue865_codu_terra ,aod865_dust_terra )52 IF(id_scdu>0 ) CALL histwrite_phy( o_taue670_scdu_terra ,aod670_dustsco_terra )53 IF(id_scdu>0 ) CALL histwrite_phy( o_taue550_scdu_terra ,aod550_dustsco_terra )54 IF(id_scdu>0 ) CALL histwrite_phy( o_taue865_scdu_terra ,aod865_dustsco_terra )55 56 57 IF(id_prec>0 ) CALL histwrite_phy( o_trm01 , trm01 )58 IF(id_fine>0 ) CALL histwrite_phy( o_trm02 , trm02 )59 IF(id_coss>0 ) CALL histwrite_phy( o_trm03 , trm03 )60 IF(id_codu>0 ) CALL histwrite_phy( o_trm04 , trm04 )61 IF(id_scdu>0 ) CALL histwrite_phy( o_trm05 , trm05 )62 IF(id_prec>0 ) CALL histwrite_phy( o_sconc01 , sconc01 )63 IF(id_fine>0 ) CALL histwrite_phy( o_sconc02 , sconc02 )64 IF(id_coss>0 ) CALL histwrite_phy( o_sconc03 , sconc03 )65 IF(id_codu>0 ) CALL histwrite_phy( o_sconc04 , sconc04 )66 IF(id_scdu>0 ) CALL histwrite_phy( o_sconc05 , sconc05 )43 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_fine_terra ,aod550_tr2_terra ) 44 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_fine_terra ,aod670_tr2_terra ) 45 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_fine_terra ,aod865_tr2_terra ) 46 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_coss_terra ,aod550_ss_terra ) 47 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_coss_terra ,aod670_ss_terra ) 48 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_coss_terra ,aod865_ss_terra ) 49 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_codu_terra ,aod550_dust_terra ) 50 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_codu_terra ,aod670_dust_terra ) 51 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_codu_terra ,aod865_dust_terra ) 52 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue670_scdu_terra ,aod670_dustsco_terra ) 53 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue550_scdu_terra ,aod550_dustsco_terra ) 54 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_taue865_scdu_terra ,aod865_dustsco_terra ) 55 56 57 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_trm01 , trm01 ) 58 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_trm02 , trm02 ) 59 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_trm03 , trm03 ) 60 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_trm04 , trm04 ) 61 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_trm05 , trm05 ) 62 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sconc01 , sconc01 ) 63 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sconc02 , sconc02 ) 64 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sconc03 , sconc03 ) 65 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sconc04 , sconc04 ) 66 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sconc05 , sconc05 ) 67 67 68 68 ! Lessivage 69 69 70 IF(id_prec>0 ) CALL histwrite_phy( o_flux01 , flux01 )71 IF(id_fine>0 ) CALL histwrite_phy( o_flux02 , flux02 )72 IF(id_coss>0 ) CALL histwrite_phy( o_flux03 , flux03 )73 IF(id_codu>0 ) CALL histwrite_phy( o_flux04 , flux04 )74 IF(id_scdu>0 ) CALL histwrite_phy( o_flux05 , flux05 )75 IF(id_prec>0 ) CALL histwrite_phy( o_ds01 , ds01 )76 IF(id_fine>0 ) CALL histwrite_phy( o_ds02 , ds02 )77 IF(id_coss>0 ) CALL histwrite_phy( o_ds03 , ds03 )78 IF(id_codu>0 ) CALL histwrite_phy( o_ds04 , ds04 )79 IF(id_scdu>0 ) CALL histwrite_phy( o_ds05 , ds05 )80 IF(id_prec>0 ) CALL histwrite_phy( o_dh01 , dh01 )81 IF(id_fine>0 ) CALL histwrite_phy( o_dh02 , dh02 )82 IF(id_coss>0 ) CALL histwrite_phy( o_dh03 , dh03 )83 IF(id_codu>0 ) CALL histwrite_phy( o_dh04 , dh04 )84 IF(id_scdu>0 ) CALL histwrite_phy( o_dh05 , dh05 )85 IF(id_prec>0 ) CALL histwrite_phy( o_dtrconv01 , dtrconv01 )86 IF(id_fine>0 ) CALL histwrite_phy( o_dtrconv02 , dtrconv02 )87 IF(id_coss>0 ) CALL histwrite_phy( o_dtrconv03 , dtrconv03 )88 IF(id_codu>0 ) CALL histwrite_phy( o_dtrconv04 , dtrconv04 )89 IF(id_scdu>0 ) CALL histwrite_phy( o_dtrconv05 , dtrconv05 )90 IF(id_prec>0 ) CALL histwrite_phy( o_dtherm01 , dtherm01 )91 IF(id_fine>0 ) CALL histwrite_phy( o_dtherm02 , dtherm02 )92 IF(id_coss>0 ) CALL histwrite_phy( o_dtherm03 , dtherm03 )93 IF(id_codu>0 ) CALL histwrite_phy( o_dtherm04 , dtherm04 )94 IF(id_scdu>0 ) CALL histwrite_phy( o_dtherm05 , dtherm05 )95 IF(id_prec>0 ) CALL histwrite_phy( o_dhkecv01 , dhkecv01 )96 IF(id_fine>0 ) CALL histwrite_phy( o_dhkecv02 , dhkecv02 )97 IF(id_coss>0 ) CALL histwrite_phy( o_dhkecv03 , dhkecv03 )98 IF(id_codu>0 ) CALL histwrite_phy( o_dhkecv04 , dhkecv04 )99 IF(id_scdu>0 ) CALL histwrite_phy( o_dhkecv05 , dhkecv05 )100 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_ds01 , d_tr_ds01 )101 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_ds02 , d_tr_ds02 )102 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_ds03 , d_tr_ds03 )103 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_ds04 , d_tr_ds04 )104 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_ds05 , d_tr_ds05 )105 IF(id_prec>0 ) CALL histwrite_phy( o_dhkelsc01 , dhkelsc01 )106 IF(id_fine>0 ) CALL histwrite_phy( o_dhkelsc02 , dhkelsc02 )107 IF(id_coss>0 ) CALL histwrite_phy( o_dhkelsc03 , dhkelsc03 )108 IF(id_codu>0 ) CALL histwrite_phy( o_dhkelsc04 , dhkelsc04 )109 IF(id_scdu>0 ) CALL histwrite_phy( o_dhkelsc05 , dhkelsc05 )110 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_cv01 , d_tr_cv01 )111 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_cv02 , d_tr_cv02 )112 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_cv03 , d_tr_cv03 )113 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_cv04 , d_tr_cv04 )114 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_cv05 , d_tr_cv05 )115 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_trsp01 , d_tr_trsp01 )116 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_trsp02 , d_tr_trsp02 )117 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_trsp03 , d_tr_trsp03 )118 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_trsp04 , d_tr_trsp04 )119 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_trsp05 , d_tr_trsp05 )120 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_sscav01 , d_tr_sscav01 )121 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_sscav02 , d_tr_sscav02 )122 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_sscav03 , d_tr_sscav03 )123 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_sscav04 , d_tr_sscav04 )124 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_sscav05 , d_tr_sscav05 )125 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_sat01 , d_tr_sat01 )126 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_sat02 , d_tr_sat02 )127 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_sat03 , d_tr_sat03 )128 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_sat04 , d_tr_sat04 )129 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_sat05 , d_tr_sat05 )130 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_uscav01 , d_tr_uscav01 )131 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_uscav02 , d_tr_uscav02 )132 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_uscav03 , d_tr_uscav03 )133 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_uscav04 , d_tr_uscav04 )134 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_uscav05 , d_tr_uscav05 )135 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_insc01 , d_tr_insc01 )136 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_insc02 , d_tr_insc02 )137 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_insc03 , d_tr_insc03 )138 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_insc04 , d_tr_insc04 )139 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_insc05 , d_tr_insc05 )140 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_bcscav01 , d_tr_bcscav01 )141 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_bcscav02 , d_tr_bcscav02 )142 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_bcscav03 , d_tr_bcscav03 )143 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_bcscav04 , d_tr_bcscav04 )144 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_bcscav05 , d_tr_bcscav05 )145 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_evapls01 , d_tr_evapls01 )146 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_evapls02 , d_tr_evapls02 )147 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_evapls03 , d_tr_evapls03 )148 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_evapls04 , d_tr_evapls04 )149 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_evapls05 , d_tr_evapls05 )150 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_ls01 , d_tr_ls01 )151 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_ls02 , d_tr_ls02 )152 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_ls03 , d_tr_ls03 )153 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_ls04 , d_tr_ls04 )154 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_ls05 , d_tr_ls05 )155 156 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_dyn01 , d_tr_dyn01 )157 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_dyn02 , d_tr_dyn02 )158 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_dyn03 , d_tr_dyn03 )159 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_dyn04 , d_tr_dyn04 )160 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_dyn05 , d_tr_dyn05 )70 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_flux01 , flux01 ) 71 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_flux02 , flux02 ) 72 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_flux03 , flux03 ) 73 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_flux04 , flux04 ) 74 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_flux05 , flux05 ) 75 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_ds01 , ds01 ) 76 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_ds02 , ds02 ) 77 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_ds03 , ds03 ) 78 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_ds04 , ds04 ) 79 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_ds05 , ds05 ) 80 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dh01 , dh01 ) 81 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dh02 , dh02 ) 82 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dh03 , dh03 ) 83 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dh04 , dh04 ) 84 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dh05 , dh05 ) 85 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtrconv01 , dtrconv01 ) 86 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtrconv02 , dtrconv02 ) 87 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtrconv03 , dtrconv03 ) 88 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtrconv04 , dtrconv04 ) 89 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtrconv05 , dtrconv05 ) 90 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtherm01 , dtherm01 ) 91 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtherm02 , dtherm02 ) 92 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtherm03 , dtherm03 ) 93 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtherm04 , dtherm04 ) 94 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dtherm05 , dtherm05 ) 95 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkecv01 , dhkecv01 ) 96 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkecv02 , dhkecv02 ) 97 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkecv03 , dhkecv03 ) 98 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkecv04 , dhkecv04 ) 99 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkecv05 , dhkecv05 ) 100 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ds01 , d_tr_ds01 ) 101 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ds02 , d_tr_ds02 ) 102 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ds03 , d_tr_ds03 ) 103 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ds04 , d_tr_ds04 ) 104 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ds05 , d_tr_ds05 ) 105 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkelsc01 , dhkelsc01 ) 106 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkelsc02 , dhkelsc02 ) 107 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkelsc03 , dhkelsc03 ) 108 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkelsc04 , dhkelsc04 ) 109 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_dhkelsc05 , dhkelsc05 ) 110 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cv01 , d_tr_cv01 ) 111 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cv02 , d_tr_cv02 ) 112 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cv03 , d_tr_cv03 ) 113 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cv04 , d_tr_cv04 ) 114 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cv05 , d_tr_cv05 ) 115 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_trsp01 , d_tr_trsp01 ) 116 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_trsp02 , d_tr_trsp02 ) 117 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_trsp03 , d_tr_trsp03 ) 118 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_trsp04 , d_tr_trsp04 ) 119 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_trsp05 , d_tr_trsp05 ) 120 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sscav01 , d_tr_sscav01 ) 121 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sscav02 , d_tr_sscav02 ) 122 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sscav03 , d_tr_sscav03 ) 123 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sscav04 , d_tr_sscav04 ) 124 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sscav05 , d_tr_sscav05 ) 125 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sat01 , d_tr_sat01 ) 126 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sat02 , d_tr_sat02 ) 127 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sat03 , d_tr_sat03 ) 128 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sat04 , d_tr_sat04 ) 129 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_sat05 , d_tr_sat05 ) 130 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_uscav01 , d_tr_uscav01 ) 131 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_uscav02 , d_tr_uscav02 ) 132 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_uscav03 , d_tr_uscav03 ) 133 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_uscav04 , d_tr_uscav04 ) 134 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_uscav05 , d_tr_uscav05 ) 135 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_insc01 , d_tr_insc01 ) 136 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_insc02 , d_tr_insc02 ) 137 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_insc03 , d_tr_insc03 ) 138 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_insc04 , d_tr_insc04 ) 139 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_insc05 , d_tr_insc05 ) 140 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_bcscav01 , d_tr_bcscav01 ) 141 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_bcscav02 , d_tr_bcscav02 ) 142 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_bcscav03 , d_tr_bcscav03 ) 143 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_bcscav04 , d_tr_bcscav04 ) 144 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_bcscav05 , d_tr_bcscav05 ) 145 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_evapls01 , d_tr_evapls01 ) 146 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_evapls02 , d_tr_evapls02 ) 147 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_evapls03 , d_tr_evapls03 ) 148 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_evapls04 , d_tr_evapls04 ) 149 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_evapls05 , d_tr_evapls05 ) 150 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ls01 , d_tr_ls01 ) 151 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ls02 , d_tr_ls02 ) 152 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ls03 , d_tr_ls03 ) 153 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ls04 , d_tr_ls04 ) 154 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_ls05 , d_tr_ls05 ) 155 156 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_dyn01 , d_tr_dyn01 ) 157 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_dyn02 , d_tr_dyn02 ) 158 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_dyn03 , d_tr_dyn03 ) 159 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_dyn04 , d_tr_dyn04 ) 160 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_dyn05 , d_tr_dyn05 ) 161 161 162 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_cl01 , d_tr_cl01 )163 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_cl02 , d_tr_cl02 )164 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_cl03 , d_tr_cl03 )165 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_cl04 , d_tr_cl04 )166 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_cl05 , d_tr_cl05 )167 IF(id_prec>0 ) CALL histwrite_phy( o_d_tr_th01 , d_tr_th01 )168 IF(id_fine>0 ) CALL histwrite_phy( o_d_tr_th02 , d_tr_th02 )169 IF(id_coss>0 ) CALL histwrite_phy( o_d_tr_th03 , d_tr_th03 )170 IF(id_codu>0 ) CALL histwrite_phy( o_d_tr_th04 , d_tr_th04 )171 IF(id_scdu>0 ) CALL histwrite_phy( o_d_tr_th05 , d_tr_th05 )172 173 IF(id_coss>0 ) CALL histwrite_phy( o_sed_ss , sed_ss)174 IF(id_codu>0 ) CALL histwrite_phy( o_sed_dust , sed_dust)175 IF(id_scdu>0 ) CALL histwrite_phy( o_sed_dustsco , sed_dustsco)176 IF(id_prec>0 ) CALL histwrite_phy( o_g2p_gas , his_g2pgas )177 IF(id_fine>0 ) CALL histwrite_phy( o_g2p_aer , his_g2paer)162 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cl01 , d_tr_cl01 ) 163 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cl02 , d_tr_cl02 ) 164 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cl03 , d_tr_cl03 ) 165 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cl04 , d_tr_cl04 ) 166 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_cl05 , d_tr_cl05 ) 167 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_th01 , d_tr_th01 ) 168 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_th02 , d_tr_th02 ) 169 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_th03 , d_tr_th03 ) 170 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_th04 , d_tr_th04 ) 171 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_d_tr_th05 , d_tr_th05 ) 172 173 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_ss , sed_ss) 174 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_dust , sed_dust) 175 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_dustsco , sed_dustsco) 176 IF(id_prec>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_g2p_gas , his_g2pgas ) 177 IF(id_fine>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_g2p_aer , his_g2paer) 178 178 179 179 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 180 IF(id_coss>0 ) CALL histwrite_phy( o_sed_ss3D , sed_ss3D)181 IF(id_codu>0 ) CALL histwrite_phy( o_sed_dust3D , sed_dust3D)182 IF(id_scdu>0 ) CALL histwrite_phy( o_sed_dustsco3D , sed_dustsco3D)180 IF(id_coss>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_ss3D , sed_ss3D) 181 IF(id_codu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_dust3D , sed_dust3D) 182 IF(id_scdu>0 .OR. .NOT. vars_defined) CALL histwrite_phy( o_sed_dustsco3D , sed_dustsco3D) 183 183 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 184 184 ! histrac_spl -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90
r2753 r3851 9 9 USE aero_mod 10 10 USE infotrac_phy 11 USE phys_local_var_mod, ONLY: abs visaer11 USE phys_local_var_mod, ONLY: abs550aer 12 12 13 13 ! Olivier Boucher Jan 2017 … … 260 260 !--waveband 2 and all aerosol (third index = 2) 261 261 inu=2 262 abs visaer(:)=SUM((1-piz_allaer(:,:,2,inu))*tau_allaer(:,:,2,inu),dim=2)262 abs550aer(:)=SUM((1-piz_allaer(:,:,2,inu))*tau_allaer(:,:,2,inu),dim=2) 263 263 264 264 END SUBROUTINE SPLAEROPT_6BANDS_RRTM -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/YOMCST.h
r3447 r3851 22 22 REAL RMO3,RMCO2,RMC,RMCH4,RMN2O,RMCFC11,RMCFC12 23 23 REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV 24 REAL RKAPPA,RETV 24 REAL RKAPPA,RETV, eps_w 25 25 ! A1.5,6 Thermodynamic liquid,solid phases 26 26 REAL RCW,RCS … … 38 38 & ,R ,RMD ,RMV ,RD ,RV ,RCPD & 39 39 & ,RMO3 ,RMCO2 ,RMC ,RMCH4 ,RMN2O ,RMCFC11 ,RMCFC12 & 40 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV 40 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV, eps_w & 41 41 & ,RCW ,RCS & 42 42 & ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/calbeta.F90
r3102 r3851 7 7 USE dimphy 8 8 USE indice_sol_mod 9 9 10 IMPLICIT none 11 12 #include "flux_arp.h" 13 10 14 !====================================================================== 11 15 ! Auteur(s): Z.X. Li (LMD/CNRS) (adaptation du GCM au LMD) … … 82 86 ENDDO 83 87 ENDIF 88 89 ! EV: when beta is prescribed for 1D cases: 90 IF (knon.EQ.1 .AND. ok_prescr_beta) THEN 91 DO i = 1, knon 92 vbeta(i)=betaevap 93 ENDDO 94 ENDIF 84 95 85 96 END SUBROUTINE calbeta -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/calcul_fluxs_mod.F90
r3319 r3851 13 13 fqsat, petAcoef, peqAcoef, petBcoef, peqBcoef, & 14 14 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 15 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )15 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 16 16 17 17 18 18 USE dimphy, ONLY : klon 19 19 USE indice_sol_mod 20 use sens_heat_rain_m, only: sens_heat_rain 20 21 21 22 INCLUDE "clesphys.h" … … 71 72 REAL, DIMENSION(klon), INTENT(IN) :: ps, q1lay 72 73 REAL, DIMENSION(klon), INTENT(IN) :: tsurf, p1lay, cal, beta, cdragh,cdragq 73 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow ! pas utiles74 REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow 74 75 REAL, DIMENSION(klon), INTENT(IN) :: radsol, dif_grnd 75 76 REAL, DIMENSION(klon), INTENT(IN) :: t1lay, u1lay, v1lay,gustiness 76 77 REAL, INTENT(IN) :: fqsat ! correction factor on qsat (generally 0.98 over salty water, 1 everywhere else) 77 78 79 real, intent(in), optional:: rhoa(:) ! (knon) 80 ! density of moist air (kg / m3) 81 78 82 ! Parametres entree-sorties 79 83 !**************************************************************************************** … … 85 89 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new, evap, fluxsens, fluxlat 86 90 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 87 REAL, DIMENSION(klon), OPTIONAL :: sens_prec_liq, sens_prec_sol91 REAL, intent(out), OPTIONAL:: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 88 92 REAL, DIMENSION(klon), OPTIONAL :: lat_prec_liq, lat_prec_sol 89 93 … … 140 144 dflux_s = 0. 141 145 dflux_l = 0. 142 if (PRESENT(sens_prec_liq)) sens_prec_liq = 0.143 if (PRESENT(sens_prec_sol)) sens_prec_sol = 0.144 146 if (PRESENT(lat_prec_liq)) lat_prec_liq = 0. 145 147 if (PRESENT(lat_prec_sol)) lat_prec_sol = 0. … … 259 261 ! 260 262 ! calcul de l'enthalpie des precipitations liquides et solides 261 ! 262 ! if (PRESENT(enth_prec_liq)) & 263 ! enth_prec_liq(i) = rcw * (t1lay(i) - tsurf(i)) * & 264 ! precip_rain(i) 265 ! if (PRESENT(enth_prec_sol)) & 266 ! enth_prec_sol(i) = rcs * (t1lay(i) - tsurf(i)) * & 267 ! precip_snow(i) 268 ! On calcule par rapport a T=0 269 if (PRESENT(sens_prec_liq)) & 270 sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * & 271 precip_rain(i) 272 if (PRESENT(sens_prec_sol)) & 273 sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * & 274 precip_snow(i) 263 if (PRESENT(sens_prec_liq)) sens_prec_liq(i) & 264 = - sens_heat_rain(precip_rain(i) + precip_snow(i), t1lay(i), & 265 q1lay(i), rhoa(i), rlvtt, tsurf_new(i), ps(i)) 266 if (PRESENT(sens_prec_sol)) sens_prec_sol(i) = 0. 267 ! On calcule par rapport a T=0 268 !! sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * precip_rain(i) 269 !! sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * precip_snow(i) 270 275 271 if (PRESENT(lat_prec_liq)) & 276 272 lat_prec_liq(i) = precip_rain(i) * (RLVTT - RLVTT) … … 280 276 281 277 282 ! if (PRESENT(sens_prec_liq)) & 283 ! WRITE(*,*)' calculs_fluxs sens_prec_liq (min, max)', & 284 ! MINVAL(sens_prec_liq(1:knon)), MAXVAL(sens_prec_liq(1:knon)) 285 ! if (PRESENT(sens_prec_sol)) & 286 ! WRITE(*,*)' calculs_fluxs sens_prec_sol (min, max)', & 287 ! MINVAL(sens_prec_sol(1:knon)), MAXVAL(sens_prec_sol(1:knon)) 288 289 ! 290 !**************************************************************************************** 278 !************************************************************************** 291 279 ! 292 280 END SUBROUTINE calcul_fluxs -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/change_srf_frac_mod.F90
r2656 r3851 183 183 tsurf, alb_dir,alb_dif, ustar, u10m, v10m, pbl_tke) 184 184 185 186 185 ELSE 187 186 ! No modifcation should be done -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/conf_phys_m.F90
r3630 r3851 29 29 USE mod_grid_phy_lmdz, ONLY: klon_glo 30 30 USE print_control_mod, ONLY: lunout 31 use config_ocean_skin_m, only: config_ocean_skin 31 32 USE phys_state_var_mod, ONLY: phys_tstep 32 33 … … 86 87 CHARACTER (len = 10),SAVE :: type_veget_omp 87 88 CHARACTER (len = 8), SAVE :: aer_type_omp 88 LOGICAL, SAVE :: ok_snow_omp 89 INTEGER, SAVE :: landice_opt_omp 90 INTEGER, SAVE :: n_dtis_omp 91 INTEGER, SAVE :: iflag_tsurf_inlandsis_omp 92 INTEGER, SAVE :: iflag_albzenith_omp 93 LOGICAL, SAVE :: SnoMod_omp,BloMod_omp,ok_outfor_omp 89 94 LOGICAL, SAVE :: ok_newmicro_omp 90 95 LOGICAL, SAVE :: ok_all_xml_omp … … 318 323 ! 319 324 320 ! Martin 321 !Config Key = ok_snow 322 !Config Desc = Flag to activate snow model SISVAT 323 !Config Def = .FALSE. 324 ok_snow_omp = .FALSE. 325 CALL getin('ok_snow', ok_snow_omp) 326 ! Martin 327 325 ! INLANDSIS 326 !================================================================== 327 ! Martin et Etienne 328 !Config Key = landice_opt 329 !Config Desc = which landice snow model (BULK, SISVAT or INLANDSIS) 330 !Config Def = 0 331 landice_opt_omp = 0 332 CALL getin('landice_opt', landice_opt_omp) 333 ! Martin et Etienne 334 335 !Etienne 336 !Config Key = iflag_tsurf_inlandsis 337 !Config Desc = which method to calculate tsurf in INLANDSIS 338 !Config Def = 0 339 iflag_tsurf_inlandsis_omp = 0 340 CALL getin('iflag_tsurf_inlandsis', iflag_tsurf_inlandsis_omp) 341 342 !Etienne 343 !Config Key = iflag_albzenith 344 !Config Desc = method to account for albedo sensitivity to solar zenith angle 345 !Config Def = 0 346 iflag_albzenith_omp = 0 347 CALL getin('iflag_albzenith', iflag_albzenith_omp) 348 349 !Etienne 350 !Config Key = n_dtis 351 !Config Desc = number of subtimesteps for INLANDSIS 352 !Config Def = 1 353 n_dtis_omp = 1 354 CALL getin('n_dtis', n_dtis_omp) 355 356 !Etienne 357 !Config Key = SnoMod 358 !Config Desc = activation of snow modules in inlandsis 359 !Config Def = 1 360 SnoMod_omp = .TRUE. 361 CALL getin('SnoMod', SnoMod_omp) 362 363 !Etienne 364 !Config Key = BloMod 365 !Config Desc = activation of blowing snow in inlandsis 366 !Config Def = 1 367 BloMod_omp = .FALSE. 368 CALL getin('BloMod', BloMod_omp) 369 370 !Etienne 371 !Config Key = ok_outfor 372 !Config Desc = activation of output ascii file in inlandsis 373 !Config Def = 1 374 ok_outfor_omp = .FALSE. 375 CALL getin('ok_outfor', ok_outfor_omp) 376 377 378 379 !================================================================== 380 328 381 !Config Key = OK_journe 329 382 !Config Desc = Pour des sorties journalieres … … 2291 2344 ok_veget=.FALSE. 2292 2345 ENDIF 2293 ! Martin 2294 ok_snow = ok_snow_omp 2295 ! Martin 2296 2346 ! SISVAT and INLANDSIS 2347 !================================================= 2348 landice_opt = landice_opt_omp 2349 iflag_tsurf_inlandsis = iflag_tsurf_inlandsis_omp 2350 iflag_albzenith = iflag_albzenith_omp 2351 n_dtis=n_dtis_omp 2352 SnoMod=SnoMod_omp 2353 BloMod=BloMod_omp 2354 ok_outfor=ok_outfor_omp 2355 !================================================= 2297 2356 ok_all_xml = ok_all_xml_omp 2298 2357 ok_lwoff = ok_lwoff_omp … … 2486 2545 ENDIF 2487 2546 2488 ! Test sur new_aod. Ce flag permet de retrouver les resultats de l'AR4 2489 ! il n'est utilisable que lors du couplage avec le SO4 seul 2547 ! Flag_aerosol cannot be set to zero if aerosol direct effect (ade) or aerosol indirect effect (aie) are activated 2490 2548 IF (ok_ade .OR. ok_aie) THEN 2491 2549 IF ( flag_aerosol .EQ. 0 ) THEN … … 2494 2552 ENDIF 2495 2553 2496 ! Flag_aerosol cannot be to zero if we are in coupled mode for aerosol2554 ! Flag_aerosol cannot be set to zero if we are in coupled mode for aerosol 2497 2555 IF (aerosol_couple .AND. flag_aerosol .EQ. 0 ) THEN 2498 2556 CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if aerosol_couple=y ', 1) 2499 2557 ENDIF 2500 2558 2501 ! Read_climoz need to bezero if we are in couple mode for chemistry2559 ! Read_climoz needs to be set zero if we are in couple mode for chemistry 2502 2560 IF (chemistry_couple .AND. read_climoz .ne. 0) THEN 2503 2561 CALL abort_physic('conf_phys', 'read_climoz need to be to zero if chemistry_couple=y ', 1) … … 2555 2613 WRITE(lunout,*) ' Version ocean = ', version_ocean 2556 2614 WRITE(lunout,*) ' Config veget = ', ok_veget,type_veget 2557 WRITE(lunout,*) ' Snow model SISVAT : ok_snow = ', ok_snow2615 WRITE(lunout,*) ' Snow model landice : landice_opt = ', landice_opt 2558 2616 WRITE(lunout,*) ' Config xml pour XIOS : ok_all_xml = ', ok_all_xml 2559 2617 WRITE(lunout,*) ' Sortie journaliere = ', ok_journe … … 2754 2812 WRITE(lunout,*) ' carbon_cycle_rad = ', carbon_cycle_rad 2755 2813 WRITE(lunout,*) ' level_coupling_esm = ', level_coupling_esm 2814 WRITE(lunout,*) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis 2815 WRITE(lunout,*) ' iflag_albzenith = ', iflag_albzenith 2816 WRITE(lunout,*) ' n_dtis = ', n_dtis 2817 WRITE(lunout,*) ' SnoMod = ', SnoMod 2818 WRITE(lunout,*) ' BloMod = ', BloMod 2819 WRITE(lunout,*) ' ok_outfor = ', ok_outfor 2820 2756 2821 2757 2822 !$OMP END MASTER 2758 2759 RETURN 2823 call config_ocean_skin 2760 2824 2761 2825 END SUBROUTINE conf_phys -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90
r3723 r3851 273 273 endif 274 274 if (cfg%LlidarBetaMol532) then 275 where(cospOUT%calipso_ tau_tot == R_UNDEF) cospOUT%calipso_tau_tot= missing_val275 where(cospOUT%calipso_beta_mol == R_UNDEF) cospOUT%calipso_beta_mol = missing_val 276 276 CALL histwrite3d_cosp(o_lidarBetaMol532,cospOUT%calipso_beta_mol,nvertmcosp) 277 277 endif … … 282 282 !!!! Sorties Ground Lidar 283 283 if (cfg%LgrLidar532) then 284 285 where(cospOUT%grLidar532_beta_tot == R_UNDEF) cospOUT%grLidar532_beta_tot = missing_val 286 where(cospOUT%grLidar532_cfad_sr == R_UNDEF) cospOUT%grLidar532_cfad_sr = missing_val 287 where(cospOUT%grLidar532_lidarcld == R_UNDEF) cospOUT%grLidar532_lidarcld = missing_val 288 where(cospOUT%grLidar532_cldlayer == R_UNDEF) cospOUT%grLidar532_cldlayer = missing_val 289 where(cospOUT%grLidar532_beta_mol == R_UNDEF) cospOUT%grLidar532_beta_mol = missing_val 290 where(cospOUT%grLidar532_srbval == R_UNDEF) cospOUT%grLidar532_srbval = missing_val 291 292 if (cfg%LcllgrLidar532) CALL histwrite2d_cosp(o_cllgrLidar532,cospOUT%grLidar532_cldlayer(:,1)) 293 if (cfg%LclmgrLidar532) CALL histwrite2d_cosp(o_clmgrLidar532,cospOUT%grLidar532_cldlayer(:,2)) 294 if (cfg%LclhgrLidar532) CALL histwrite2d_cosp(o_clhgrLidar532,cospOUT%grLidar532_cldlayer(:,3)) 295 if (cfg%LcltgrLidar532) CALL histwrite2d_cosp(o_cltgrLidar532,cospOUT%grLidar532_cldlayer(:,4)) 296 297 if (cfg%LclgrLidar532) CALL histwrite3d_cosp(o_clgrLidar532,cospOUT%grLidar532_lidarcld,nvert) 298 if (cfg%LlidarBetaMol532gr) CALL histwrite3d_cosp(o_lidarBetaMol532gr,cospOUT%grLidar532_beta_mol,nvertmcosp) 299 300 do icl=1,SR_BINS 284 ! AI juin 2020 Voir a quoi correspond ce champs 285 ! where(cospOUT%grLidar532_srbval == R_UNDEF) cospOUT%grLidar532_srbval = missing_val 286 287 if (cfg%LcllgrLidar532) then 288 where(cospOUT%grLidar532_cldlayer(:,1) == R_UNDEF) cospOUT%grLidar532_cldlayer(:,1) = missing_val 289 CALL histwrite2d_cosp(o_cllgrLidar532,cospOUT%grLidar532_cldlayer(:,1)) 290 endif 291 if (cfg%LclmgrLidar532) then 292 where(cospOUT%grLidar532_cldlayer(:,2) == R_UNDEF) cospOUT%grLidar532_cldlayer(:,2) = missing_val 293 CALL histwrite2d_cosp(o_clmgrLidar532,cospOUT%grLidar532_cldlayer(:,2)) 294 endif 295 if (cfg%LclhgrLidar532) then 296 where(cospOUT%grLidar532_cldlayer(:,3) == R_UNDEF) cospOUT%grLidar532_cldlayer(:,3) = missing_val 297 CALL histwrite2d_cosp(o_clhgrLidar532,cospOUT%grLidar532_cldlayer(:,3)) 298 endif 299 if (cfg%LcltgrLidar532) then 300 where(cospOUT%grLidar532_cldlayer(:,4) == R_UNDEF) cospOUT%grLidar532_cldlayer(:,4) = missing_val 301 CALL histwrite2d_cosp(o_cltgrLidar532,cospOUT%grLidar532_cldlayer(:,4)) 302 endif 303 304 if (cfg%LclgrLidar532) then 305 where(cospOUT%grLidar532_lidarcld == R_UNDEF) cospOUT%grLidar532_lidarcld = missing_val 306 CALL histwrite3d_cosp(o_clgrLidar532,cospOUT%grLidar532_lidarcld,nvert) 307 endif 308 if (cfg%LlidarBetaMol532gr) then 309 where(cospOUT%grLidar532_beta_mol == R_UNDEF) cospOUT%grLidar532_beta_mol = missing_val 310 CALL histwrite3d_cosp(o_lidarBetaMol532gr,cospOUT%grLidar532_beta_mol,nvertmcosp) 311 endif 312 if (cfg%LcfadLidarsr532gr) then 313 where(cospOUT%grLidar532_cfad_sr == R_UNDEF) cospOUT%grLidar532_cfad_sr = missing_val 314 do icl=1,SR_BINS 301 315 do k=1,Nlvgrid 302 316 do ip=1,Npoints … … 304 318 enddo 305 319 enddo 306 enddo 307 if (cfg%LcfadLidarsr532gr) CALL histwrite4d_cosp(o_cfadLidarsr532gr,tmp_fi4da_cfadLgr) 308 309 if (cfg%Latb532gr) CALL histwrite4d_cosp(o_atb532gr,cospOUT%grLidar532_beta_tot) 310 320 enddo 321 CALL histwrite4d_cosp(o_cfadLidarsr532gr,tmp_fi4da_cfadLgr) 322 endif 323 324 if (cfg%Latb532gr) then 325 where(cospOUT%grLidar532_beta_tot == R_UNDEF) cospOUT%grLidar532_beta_tot = missing_val 326 CALL histwrite4d_cosp(o_atb532gr,cospOUT%grLidar532_beta_tot) 327 endif 311 328 endif ! Ground Lidar 532 nm 312 329 … … 314 331 !!!! Sorties Atlid 315 332 if (cfg%Latlid) then 316 317 where(cospOUT%atlid_beta_tot == R_UNDEF) cospOUT%atlid_beta_tot = missing_val 318 where(cospOUT%atlid_cfad_sr == R_UNDEF) cospOUT%atlid_cfad_sr = missing_val 319 where(cospOUT%atlid_lidarcld == R_UNDEF) cospOUT%atlid_lidarcld = missing_val 320 where(cospOUT%atlid_cldlayer == R_UNDEF) cospOUT%atlid_cldlayer = missing_val 321 where(cospOUT%atlid_beta_mol == R_UNDEF) cospOUT%atlid_beta_mol = missing_val 322 where(cospOUT%atlid_srbval == R_UNDEF) cospOUT%atlid_srbval = missing_val 323 324 if (cfg%Lcllatlid) CALL histwrite2d_cosp(o_cllatlid,cospOUT%atlid_cldlayer(:,1)) 325 if (cfg%Lclmatlid) CALL histwrite2d_cosp(o_clmatlid,cospOUT%atlid_cldlayer(:,2)) 326 if (cfg%Lclhatlid) CALL histwrite2d_cosp(o_clhatlid,cospOUT%atlid_cldlayer(:,3)) 327 if (cfg%Lcltatlid) CALL histwrite2d_cosp(o_cltatlid,cospOUT%atlid_cldlayer(:,4)) 328 329 if (cfg%Lclatlid) CALL histwrite3d_cosp(o_clatlid,cospOUT%atlid_lidarcld,nvert) 330 if (cfg%LlidarBetaMol355) CALL histwrite3d_cosp(o_lidarBetaMol355,cospOUT%atlid_beta_mol,nvertmcosp) 331 332 do icl=1,SR_BINS 333 ! AI juin 2020 Voir a quoi correspond ce champs 334 ! where(cospOUT%atlid_srbval == R_UNDEF) cospOUT%atlid_srbval = missing_val 335 336 if (cfg%Lcllatlid) then 337 where(cospOUT%atlid_cldlayer(:,1) == R_UNDEF) cospOUT%atlid_cldlayer(:,1) = missing_val 338 CALL histwrite2d_cosp(o_cllatlid,cospOUT%atlid_cldlayer(:,1)) 339 endif 340 if (cfg%Lclmatlid) then 341 where(cospOUT%atlid_cldlayer(:,2) == R_UNDEF) cospOUT%atlid_cldlayer(:,2) = missing_val 342 CALL histwrite2d_cosp(o_clmatlid,cospOUT%atlid_cldlayer(:,2)) 343 endif 344 if (cfg%Lclhatlid) then 345 where(cospOUT%atlid_cldlayer(:,3) == R_UNDEF) cospOUT%atlid_cldlayer(:,3) = missing_val 346 CALL histwrite2d_cosp(o_clhatlid,cospOUT%atlid_cldlayer(:,3)) 347 endif 348 if (cfg%Lcltatlid) then 349 where(cospOUT%atlid_cldlayer(:,4) == R_UNDEF) cospOUT%atlid_cldlayer(:,4) = missing_val 350 CALL histwrite2d_cosp(o_cltatlid,cospOUT%atlid_cldlayer(:,4)) 351 endif 352 if (cfg%Lclatlid) then 353 where(cospOUT%atlid_lidarcld == R_UNDEF) cospOUT%atlid_lidarcld = missing_val 354 CALL histwrite3d_cosp(o_clatlid,cospOUT%atlid_lidarcld,nvert) 355 endif 356 if (cfg%LlidarBetaMol355) then 357 where(cospOUT%atlid_beta_mol == R_UNDEF) cospOUT%atlid_beta_mol = missing_val 358 CALL histwrite3d_cosp(o_lidarBetaMol355,cospOUT%atlid_beta_mol,nvertmcosp) 359 endif 360 if (cfg%LcfadLidarsr355) then 361 where(cospOUT%atlid_cfad_sr == R_UNDEF) cospOUT%atlid_cfad_sr = missing_val 362 do icl=1,SR_BINS 333 363 do k=1,Nlvgrid 334 364 do ip=1,Npoints … … 336 366 enddo 337 367 enddo 338 enddo 339 if (cfg%LcfadLidarsr355) CALL histwrite4d_cosp(o_cfadlidarsr355,tmp_fi4da_cfadLatlid) 340 341 if (cfg%Latb355) CALL histwrite4d_cosp(o_atb355,cospOUT%atlid_beta_tot) 342 368 enddo 369 CALL histwrite4d_cosp(o_cfadlidarsr355,tmp_fi4da_cfadLatlid) 370 endif 371 372 if (cfg%Latb355) then 373 where(cospOUT%atlid_beta_tot == R_UNDEF) cospOUT%atlid_beta_tot = missing_val 374 CALL histwrite4d_cosp(o_atb355,cospOUT%atlid_beta_tot) 375 endif 343 376 endif ! Atlid 344 377 … … 346 379 if (cfg%Lparasol) then 347 380 if (cfg%LparasolRefl) then 348 ! Ces 2 diagnostics sont controles par la clef logique "LparasolRefl" 349 350 !!! if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasolrefl,cospOUT%parasolrefl,nvertp) 381 where(cospOUT%parasolGrid_refl == R_UNDEF) cospOUT%parasolGrid_refl = missing_val 382 where(cospOUT%parasolPix_refl == R_UNDEF) cospOUT%parasolPix_refl = missing_val 351 383 CALL histwrite3d_cosp(o_parasolGrid_refl,cospOUT%parasolGrid_refl,nvertp) 352 353 384 CALL histwrite4d_cosp(o_parasolPix_refl,cospOUT%parasolPix_refl) 354 355 endif ! LparasolRefl 356 endif ! Parasol 385 endif ! LparasolRefl 386 endif ! Parasol 357 387 358 388 ! if (cfg%LparasolRefl) then … … 376 406 !!! Sorties CloudSat 377 407 if (cfg%Lcloudsat) then 378 379 where(cospOUT%cloudsat_Ze_tot == R_UNDEF) cospOUT%cloudsat_Ze_tot = missing_val 380 where(cospOUT%cloudsat_cfad_ze == R_UNDEF) cospOUT%cloudsat_cfad_ze = missing_val 381 where(cospOUT%cloudsat_precip_cover == R_UNDEF) cospOUT%cloudsat_precip_cover = missing_val 382 where(cospOUT%cloudsat_pia == R_UNDEF) cospOUT%cloudsat_pia = missing_val 383 384 if (cfg%Lptradarflag0) CALL histwrite2d_cosp(o_ptradarflag0,cospOUT%cloudsat_precip_cover(:,1)) 385 if (cfg%Lptradarflag1) CALL histwrite2d_cosp(o_ptradarflag1,cospOUT%cloudsat_precip_cover(:,2)) 386 if (cfg%Lptradarflag2) CALL histwrite2d_cosp(o_ptradarflag2,cospOUT%cloudsat_precip_cover(:,3)) 387 if (cfg%Lptradarflag3) CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,4)) 388 if (cfg%Lptradarflag4) CALL histwrite2d_cosp(o_ptradarflag4,cospOUT%cloudsat_precip_cover(:,5)) 389 if (cfg%Lptradarflag5) CALL histwrite2d_cosp(o_ptradarflag5,cospOUT%cloudsat_precip_cover(:,6)) 390 if (cfg%Lptradarflag6) CALL histwrite2d_cosp(o_ptradarflag6,cospOUT%cloudsat_precip_cover(:,7)) 391 if (cfg%Lptradarflag7) CALL histwrite2d_cosp(o_ptradarflag7,cospOUT%cloudsat_precip_cover(:,8)) 392 if (cfg%Lptradarflag8) CALL histwrite2d_cosp(o_ptradarflag8,cospOUT%cloudsat_precip_cover(:,9)) 393 if (cfg%Lptradarflag9) CALL histwrite2d_cosp(o_ptradarflag9,cospOUT%cloudsat_precip_cover(:,10)) 394 if (cfg%Lradarpia) CALL histwrite2d_cosp(o_radarpia,cospOUT%cloudsat_pia) 395 396 do icl=1,CLOUDSAT_DBZE_BINS 408 ! AI juin 2020 voir a quoi correspond ce champs 409 ! where(cospOUT%cloudsat_pia == R_UNDEF) cospOUT%cloudsat_pia = missing_val 410 411 if (cfg%Lptradarflag0) then 412 where(cospOUT%cloudsat_precip_cover(:,1) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,1) = missing_val 413 CALL histwrite2d_cosp(o_ptradarflag0,cospOUT%cloudsat_precip_cover(:,1)) 414 endif 415 if (cfg%Lptradarflag1) then 416 where(cospOUT%cloudsat_precip_cover(:,2) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,2) = missing_val 417 CALL histwrite2d_cosp(o_ptradarflag1,cospOUT%cloudsat_precip_cover(:,2)) 418 endif 419 if (cfg%Lptradarflag2) then 420 where(cospOUT%cloudsat_precip_cover(:,3) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,3) = missing_val 421 CALL histwrite2d_cosp(o_ptradarflag2,cospOUT%cloudsat_precip_cover(:,3)) 422 endif 423 if (cfg%Lptradarflag3) then 424 where(cospOUT%cloudsat_precip_cover(:,4) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,4) = missing_val 425 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,4)) 426 endif 427 if (cfg%Lptradarflag4) then 428 where(cospOUT%cloudsat_precip_cover(:,5) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,5) = missing_val 429 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,5)) 430 endif 431 if (cfg%Lptradarflag5) then 432 where(cospOUT%cloudsat_precip_cover(:,6) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,6) = missing_val 433 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,6)) 434 endif 435 if (cfg%Lptradarflag6) then 436 where(cospOUT%cloudsat_precip_cover(:,7) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,7) = missing_val 437 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,7)) 438 endif 439 if (cfg%Lptradarflag7) then 440 where(cospOUT%cloudsat_precip_cover(:,8) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,8) = missing_val 441 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,8)) 442 endif 443 if (cfg%Lptradarflag8) then 444 where(cospOUT%cloudsat_precip_cover(:,9) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,9) = missing_val 445 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,9)) 446 endif 447 if (cfg%Lptradarflag9) then 448 where(cospOUT%cloudsat_precip_cover(:,10) == R_UNDEF) cospOUT%cloudsat_precip_cover(:,10) = missing_val 449 CALL histwrite2d_cosp(o_ptradarflag3,cospOUT%cloudsat_precip_cover(:,10)) 450 endif 451 452 if (cfg%Ldbze94) then 453 where(cospOUT%cloudsat_Ze_tot == R_UNDEF) cospOUT%cloudsat_Ze_tot = missing_val 454 CALL histwrite4d_cosp(o_dbze94,cospOUT%cloudsat_Ze_tot) 455 endif 456 if (cfg%LcfadDbze94) then 457 where(cospOUT%cloudsat_cfad_ze == R_UNDEF) cospOUT%cloudsat_cfad_ze = missing_val 458 do icl=1,CLOUDSAT_DBZE_BINS 397 459 do k=1,Nlvgrid 398 460 do ip=1,Npoints … … 400 462 enddo 401 463 enddo 402 enddo 403 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,cospOUT%cloudsat_Ze_tot) 404 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 405 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 464 enddo 465 CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 466 endif 406 467 endif 407 468 ! endif pour CloudSat … … 410 471 !!! Sorties combinees Cloudsat et Calipso 411 472 if (cfg%Lcalipso .and. cfg%Lcloudsat) then 412 where(cospOUT%lidar_only_freq_cloud == R_UNDEF) & 473 474 if (cfg%Lclcalipso2) then 475 where(cospOUT%lidar_only_freq_cloud == R_UNDEF) & 413 476 cospOUT%lidar_only_freq_cloud = missing_val 414 where(cospOUT%cloudsat_tcc == R_UNDEF) & 477 CALL histwrite3d_cosp(o_clcalipso2,cospOUT%lidar_only_freq_cloud,nvert) 478 endif 479 if (cfg%Lcloudsat_tcc) then 480 where(cospOUT%cloudsat_tcc == R_UNDEF) & 415 481 cospOUT%cloudsat_tcc = missing_val 416 where(cospOUT%cloudsat_tcc2 == R_UNDEF) & 482 CALL histwrite2d_cosp(o_cloudsat_tcc,cospOUT%cloudsat_tcc) 483 endif 484 if (cfg%Lcloudsat_tcc2) then 485 where(cospOUT%cloudsat_tcc2 == R_UNDEF) & 417 486 cospOUT%cloudsat_tcc2 = missing_val 418 where(cospOUT%radar_lidar_tcc == R_UNDEF) &419 cospOUT%radar_lidar_tcc = missing_val420 421 if (cfg%Lclcalipso2) CALL histwrite3d_cosp(o_clcalipso2,cospOUT%lidar_only_freq_cloud,nvert)422 if (cfg%Lcloudsat_tcc) CALL histwrite2d_cosp(o_cloudsat_tcc,cospOUT%cloudsat_tcc)423 if (cfg%Lcloudsat_tcc2) CALL histwrite2d_cosp(o_cloudsat_tcc2,cospOUT%cloudsat_tcc2)424 if (cfg%Lcltlidarradar) CALL histwrite2d_cosp(o_cltlidarradar,cospOUT%radar_lidar_tcc)487 CALL histwrite2d_cosp(o_cloudsat_tcc2,cospOUT%cloudsat_tcc2) 488 endif 489 if (cfg%Lcltlidarradar) then 490 where(cospOUT%radar_lidar_tcc == R_UNDEF) & 491 cospOUT%radar_lidar_tcc = missing_val 492 CALL histwrite2d_cosp(o_cltlidarradar,cospOUT%radar_lidar_tcc) 493 endif 425 494 endif 426 495 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/cpl_mod.F90
r3494 r3851 48 48 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_snow, cpl_evap, cpl_tsol 49 49 !$OMP THREADPRIVATE(cpl_snow,cpl_evap,cpl_tsol) 50 51 REAL, ALLOCATABLE, SAVE:: cpl_delta_sst(:), cpl_delta_sal(:) 52 !$OMP THREADPRIVATE(cpl_delta_sst, cpl_delta_sal) 53 50 54 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_fder, cpl_albe, cpl_taux, cpl_tauy 51 55 !$OMP THREADPRIVATE(cpl_fder,cpl_albe,cpl_taux,cpl_tauy) … … 66 70 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_sit ! sea ice temperature 67 71 !$OMP THREADPRIVATE(read_sit) 72 73 REAL, ALLOCATABLE, SAVE:: read_sss(:, :) 74 ! bulk salinity of the surface layer of the ocean, in ppt 75 !$OMP THREADPRIVATE(read_sss) 76 68 77 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: read_sic ! sea ice fraction 69 78 !$OMP THREADPRIVATE(read_sic) … … 84 93 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_snow2D, cpl_evap2D, cpl_tsol2D 85 94 !$OMP THREADPRIVATE(cpl_snow2D, cpl_evap2D, cpl_tsol2D) 95 96 REAL, ALLOCATABLE, SAVE:: cpl_delta_sst_2D(:,:), cpl_delta_sal_2D(:,:) 97 !$OMP THREADPRIVATE(cpl_delta_sst_2D, cpl_delta_sal_2D) 98 86 99 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_fder2D, cpl_albe2D 87 100 !$OMP THREADPRIVATE(cpl_fder2D, cpl_albe2D) … … 122 135 USE geometry_mod, ONLY : longitude_deg, latitude_deg, ind_cell_glo, cell_area 123 136 USE ioipsl_getin_p_mod, ONLY: getin_p 137 use config_ocean_skin_m, only: activate_ocean_skin 124 138 125 139 ! Input arguments … … 153 167 cpl_old_calving=.FALSE. 154 168 CALL getin_p("cpl_old_calving",cpl_old_calving) 169 WRITE(lunout,*)' cpl_old_calving = ', cpl_old_calving 155 170 156 171 … … 217 232 ALLOCATE(read_sit(nbp_lon, jj_nb), stat = error) 218 233 sum_error = sum_error + error 234 235 if (activate_ocean_skin >= 1) then 236 ALLOCATE(read_sss(nbp_lon, jj_nb), stat = error) 237 sum_error = sum_error + error 238 239 if (activate_ocean_skin == 2) then 240 ALLOCATE(cpl_delta_sst(klon), cpl_delta_sal(klon), stat = error) 241 sum_error = sum_error + error 242 end if 243 end if 244 219 245 ALLOCATE(read_alb_sic(nbp_lon, jj_nb), stat = error) 220 246 sum_error = sum_error + error … … 240 266 ALLOCATE(cell_area2D(nbp_lon, jj_nb), stat = error) 241 267 sum_error = sum_error + error 242 243 268 244 269 CALL gather_omp(longitude_deg,rlon_mpi) … … 251 276 CALL Grid1DTo2D_mpi(rlat_mpi,lat2D) 252 277 CALL Grid1DTo2D_mpi(cell_area_mpi,cell_area2D) 278 !--the next line is required for lat-lon grid and should have no impact 279 !--for an unstructured grid for which nbp_lon=1 280 !--if north pole in process mpi then divide cell area of pole cell by number of replicates 281 IF (is_north_pole_dyn) cell_area2D(:,1)=cell_area2D(:,1)/FLOAT(nbp_lon) 282 !--if south pole in process mpi then divide cell area of pole cell by number of replicates 283 IF (is_south_pole_dyn) cell_area2D(:,jj_nb)=cell_area2D(:,jj_nb)/FLOAT(nbp_lon) 253 284 mask_calving(:,:,:) = 0 254 285 WHERE ( lat2D >= 40) mask_calving(:,:,1) = 1 … … 278 309 ENDIF 279 310 280 281 311 IF (sum_error /= 0) THEN 282 312 abort_message='Pb allocation variables couplees' … … 349 379 ENDIF ! is_sequential 350 380 351 352 381 !************************************************************************************* 353 382 ! compatibility test … … 376 405 USE time_phylmdz_mod, ONLY: start_time, itau_phy 377 406 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 407 use config_ocean_skin_m, only: activate_ocean_skin 378 408 379 409 INCLUDE "YOMCST.h" … … 437 467 read_alb_sic(:,:) = tab_read_flds(:,:,idr_icealw) ! Albedo at sea ice 438 468 read_sit(:,:) = tab_read_flds(:,:,idr_icetem) ! Sea ice temperature 469 if (activate_ocean_skin >= 1) read_sss(:,:) = tab_read_flds(:,:,idr_sss) 439 470 !$OMP END MASTER 440 471 … … 494 525 ! 495 526 496 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new, u0_new, v0_new) 527 SUBROUTINE cpl_receive_ocean_fields(knon, knindex, tsurf_new, u0_new, & 528 v0_new, sss) 497 529 ! 498 530 ! This routine returns the field for the ocean that has been read from the coupler … … 502 534 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day 503 535 USE indice_sol_mod 536 use config_ocean_skin_m, only: activate_ocean_skin 504 537 505 538 ! Input arguments … … 511 544 !************************************************************************************* 512 545 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 546 547 REAL, INTENT(OUT):: sss(:) ! (klon) 548 ! bulk salinity of the surface layer of the ocean, in ppt 549 513 550 REAL, DIMENSION(klon), INTENT(OUT) :: u0_new 514 551 REAL, DIMENSION(klon), INTENT(OUT) :: v0_new … … 525 562 !************************************************************************************* 526 563 CALL cpl2gath(read_sst, tsurf_new, knon, knindex) 564 if (activate_ocean_skin >= 1) CALL cpl2gath(read_sss, sss, knon, knindex) 527 565 CALL cpl2gath(read_sic, sic_new, knon, knindex) 528 566 CALL cpl2gath(read_u0, u0_new, knon, knindex) … … 611 649 swdown, lwdown, fluxlat, fluxsens, & 612 650 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,& 613 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 614 ! 615 ! This subroutine cumulates some fields for each time-step during a coupling 616 ! period. At last time-step in a coupling period the fields are transformed to the 617 ! grid accepted by the coupler. No sending to the coupler will be done from here 618 ! (it is done in cpl_send_seaice_fields). 619 ! 651 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, delta_sst, & 652 delta_sal) 653 654 ! This subroutine cumulates some fields for each time-step during 655 ! a coupling period. At last time-step in a coupling period the 656 ! fields are transformed to the grid accepted by the coupler. No 657 ! sending to the coupler will be done from here (it is done in 658 ! cpl_send_seaice_fields). Crucial hypothesis is that the surface 659 ! fractions do not change between coupling time-steps. 660 620 661 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 621 662 USE indice_sol_mod 622 663 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 664 use config_ocean_skin_m, only: activate_ocean_skin 623 665 624 666 ! Input arguments … … 632 674 REAL, DIMENSION(klon), INTENT(IN) :: evap, tsurf, fder, albsol 633 675 REAL, DIMENSION(klon), INTENT(IN) :: taux, tauy, windsp 634 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol676 REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 635 677 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 678 679 REAL, intent(in):: delta_sst(:) ! (knon) 680 ! Ocean-air interface temperature minus bulk SST, in 681 ! K. Defined only if activate_ocean_skin >= 1. 682 683 real, intent(in):: delta_sal(:) ! (knon) 684 ! Ocean-air interface salinity minus bulk salinity, in ppt. 636 685 637 686 ! Local variables … … 669 718 cpl_taumod(1:knon,cpl_index) = 0.0 670 719 IF (carbon_cycle_cpl) cpl_atm_co2(1:knon,cpl_index) = 0.0 720 721 if (activate_ocean_skin == 2) then 722 cpl_delta_sst = 0. 723 cpl_delta_sal = 0. 724 end if 671 725 ENDIF 672 726 … … 710 764 !!---OB: this is correct but why knindex ?? 711 765 ENDIF 766 767 if (activate_ocean_skin == 2) then 768 cpl_delta_sst(ig) = cpl_delta_sst(ig) + delta_sst(ig) / REAL(nexca) 769 cpl_delta_sal(ig) = cpl_delta_sal(ig) + delta_sal(ig) / REAL(nexca) 770 end if 712 771 ENDDO 713 772 … … 755 814 sum_error = sum_error + error 756 815 ENDIF 816 817 if (activate_ocean_skin == 2) then 818 ALLOCATE(cpl_delta_sst_2D(nbp_lon, jj_nb), & 819 cpl_delta_sal_2D(nbp_lon, jj_nb), stat = error) 820 sum_error = sum_error + error 821 end if 757 822 758 823 IF (sum_error /= 0) THEN … … 810 875 IF (carbon_cycle_cpl) & 811 876 CALL gath2cpl(cpl_atm_co2(:,cpl_index), cpl_atm_co22D(:,:), knon, knindex) 812 ENDIF 877 if (activate_ocean_skin == 2) then 878 CALL gath2cpl(cpl_delta_sst, cpl_delta_sst_2D, knon, knindex) 879 CALL gath2cpl(cpl_delta_sal, cpl_delta_sal_2D, knon, knindex) 880 end if 881 ENDIF 813 882 814 883 END SUBROUTINE cpl_send_ocean_fields … … 846 915 REAL, DIMENSION(klon), INTENT(IN) :: albsol, taux, tauy 847 916 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 848 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol917 REAL, INTENT(IN):: sens_prec_liq(:), sens_prec_sol(:) ! (knon) 849 918 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 850 919 LOGICAL, INTENT(IN) :: lafin … … 1145 1214 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 1146 1215 USE time_phylmdz_mod, ONLY: start_time, itau_phy 1216 use config_ocean_skin_m, only: activate_ocean_skin 1147 1217 ! Some includes 1148 1218 ! … … 1202 1272 tab_flds(:,:,ids_qraiic) = cpl_sens_rain2D(:,:,2) 1203 1273 tab_flds(:,:,ids_qsnoic) = cpl_sens_snow2D(:,:,2) 1274 1275 if (activate_ocean_skin == 2) then 1276 tab_flds(:, :, ids_delta_sst) = cpl_delta_sst_2D 1277 tab_flds(:, :, ids_delta_sal) = cpl_delta_sal_2D 1278 end if 1204 1279 1205 1280 IF (version_ocean=='nemo') THEN … … 1438 1513 ENDIF 1439 1514 1515 if (activate_ocean_skin == 2) deallocate(cpl_delta_sst_2d, cpl_delta_sal_2d) 1516 1440 1517 IF (sum_error /= 0) THEN 1441 1518 abort_message='Pb in deallocation of cpl_xxxx2D coupling variables' -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dimsoil.h
r1907 r3851 4 4 INTEGER nsoilmx 5 5 PARAMETER (nsoilmx=11) 6 7 ! For Inlandsis, Etienne Vignon: 8 9 INTEGER nsnowmx 10 PARAMETER (nsnowmx=35) 11 12 INTEGER nsismx 13 PARAMETER (nsismx=46) 14 15 ! nsismx should be equal to nsoilmx+nsnowmx 16 17 18 19 20 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/1DUTILS.h
r3686 r3851 233 233 CALL getin('ok_flux_surf',ok_flux_surf) 234 234 235 !Config Key = ok_forc_tsurf 236 !Config Desc = forcage ou non par la Ts 237 !Config Def = false 238 !Config Help = forcage ou non par la Ts 239 ok_forc_tsurf=.false. 240 CALL getin('ok_forc_tsurf',ok_forc_tsurf) 241 235 242 !Config Key = ok_prescr_ust 236 243 !Config Desc = ustar impose ou non … … 239 246 ok_prescr_ust = .false. 240 247 CALL getin('ok_prescr_ust',ok_prescr_ust) 248 249 250 !Config Key = ok_prescr_beta 251 !Config Desc = betaevap impose ou non 252 !Config Def = false 253 !Config Help = betaevap impose ou non 254 ok_prescr_beta = .false. 255 CALL getin('ok_prescr_beta',ok_prescr_beta) 241 256 242 257 !Config Key = ok_old_disvert … … 280 295 !Config Desc = surface temperature 281 296 !Config Def = 290. 282 !Config Help = not used if type_ts_forcing=1 in lmdz1d.F297 !Config Help = surface temperature 283 298 tsurf = 290. 284 299 CALL getin('tsurf',tsurf) … … 297 312 zsurf = 0. 298 313 CALL getin('zsurf',zsurf) 314 ! EV pour accord avec format standard 315 CALL getin('zorog',zsurf) 316 299 317 300 318 !Config Key = rugos … … 359 377 qsolinp = 1. 360 378 CALL getin('qsolinp',qsolinp) 379 380 381 382 !Config Key = betaevap 383 !Config Desc = beta for actual evaporation when prescribed 384 !Config Def = 1.0 385 !Config Help = 386 betaevap = 1. 387 CALL getin('betaevap',betaevap) 361 388 362 389 !Config Key = zpicinp … … 520 547 CALL getin('forc_ustar',forc_ustar) 521 548 IF (forc_ustar .EQ. 1) ok_prescr_ust=.true. 549 522 550 523 551 !Config Key = nudging_u … … 1248 1276 END 1249 1277 1250 ! ======================================================================1251 SUBROUTINE read_tsurf1d(knon,sst_out)1252 1253 ! This subroutine specifies the surface temperature to be used in 1D simulations1254 1255 USE dimphy, ONLY : klon1256 1257 INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid1258 REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model1259 1260 INTEGER :: i1261 ! COMMON defined in lmdz1d.F:1262 real ts_cur1263 common /sst_forcing/ts_cur1264 1265 DO i = 1, knon1266 sst_out(i) = ts_cur1267 ENDDO1268 1269 END SUBROUTINE read_tsurf1d1270 1278 !!====================================================================== 1279 ! SUBROUTINE read_tsurf1d(knon,sst_out) 1280 ! 1281 !! This subroutine specifies the surface temperature to be used in 1D simulations 1282 ! 1283 ! USE dimphy, ONLY : klon 1284 ! 1285 ! INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid 1286 ! REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model 1287 ! 1288 ! INTEGER :: i 1289 !! COMMON defined in lmdz1d.F: 1290 ! real ts_cur 1291 ! common /sst_forcing/ts_cur 1292 1293 ! DO i = 1, knon 1294 ! sst_out(i) = ts_cur 1295 ! ENDDO 1296 ! 1297 ! END SUBROUTINE read_tsurf1d 1298 ! 1271 1299 !=============================================================== 1272 1300 subroutine advect_vert(llm,w,dt,q,plev) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/1D_decl_cases.h
r3686 r3851 34 34 real w_mod(llm), t_mod(llm),q_mod(llm) 35 35 real u_mod(llm),v_mod(llm), ht_mod(llm),vt_mod(llm),ug_mod(llm),vg_mod(llm) 36 real temp_nudg_mod(llm),qv_nudg_mod(llm),u_nudg_mod(llm),v_nudg_mod(llm)36 real temp_nudg_mod(llm),qv_nudg_mod(llm),u_nudg_mod(llm),v_nudg_mod(llm) 37 37 real hq_mod(llm),vq_mod(llm),qv_mod(llm),ql_mod(llm),qt_mod(llm) 38 38 real th_mod(llm) 39 39 40 real ts_cur 41 common /sst_forcing/ts_cur ! also in read_tsurf1d.F 40 ! EV comment these lines 41 ! real ts_cur 42 ! common /sst_forcing/ts_cur ! also in read_tsurf1d.F 42 43 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 43 44 ! Declarations specifiques au cas RICO … … 286 287 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm),v_nudg_mod_cas(llm),u_nudg_mod_cas(llm) 287 288 real u_mod_cas(llm),v_mod_cas(llm) 288 real omega_mod_cas(llm) 289 real omega_mod_cas(llm),tke_mod_cas(llm+1) 289 290 real ht_mod_cas(llm),vt_mod_cas(llm),dt_mod_cas(llm),dtrad_mod_cas(llm) 290 291 real hth_mod_cas(llm),vth_mod_cas(llm),dth_mod_cas(llm) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/1D_interp_cases.h
r3686 r3851 1 1 2 2 print*,'FORCING CASE forcing_case2' 3 3 ! print*, & 4 4 ! & '#### ITAP,day,day1,(day-day1)*86400,(day-day1)*86400/pdt_cas=', & … … 13 13 & ,u_cas,v_cas,ug_cas,vg_cas & 14 14 & ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 15 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &15 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 16 16 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 17 17 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 18 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &18 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 19 19 ! 20 20 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & … … 22 22 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 23 23 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 24 & ,vitw_prof_cas,omega_prof_cas 24 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 25 25 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & 26 26 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas & 27 27 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 28 28 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 29 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke _prof_cas)30 31 t s_cur= ts_prof_cas29 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 30 ! EV tg instead of ts_cur 31 tg = ts_prof_cas 32 32 ! psurf=plev_prof_cas(1) 33 33 psurf=ps_prof_cas 34 34 35 35 ! vertical interpolation: 36 CALL interp2_case_vertical_std(play, nlev_cas,plev_prof_cas &36 CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 37 37 & ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas & 38 38 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & 39 39 & ,ug_prof_cas,vg_prof_cas & 40 40 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 41 & ,vitw_prof_cas,omega_prof_cas &41 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 42 42 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 43 43 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 47 47 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 48 48 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 49 & ,w_mod_cas,omega_mod_cas 49 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 50 50 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 51 51 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 109 109 do l = 1, llm 110 110 ! Modif w_mod_cas -> omega_mod_cas (MM+MPL 20170309) 111 print*, l, llm 112 print*, play(l), temp(l) 111 113 omega(l) = -w_mod_cas(l)*play(l)*rg/(rd*temp(l)) 112 114 enddo -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/1D_read_forc_cases.h
r3686 r3851 27 27 & ,u_cas,v_cas,ug_cas,vg_cas & 28 28 & ,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 29 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &29 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 30 30 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 31 31 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas,lat_cas,sens_cas,ustar_cas & 32 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &32 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 33 33 ! 34 34 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas,thv_prof_cas & … … 36 36 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 37 37 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 38 & ,vitw_prof_cas,omega_prof_cas 38 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 39 39 & ,du_prof_cas,hu_prof_cas,vu_prof_cas & 40 40 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas,ht_prof_cas,vt_prof_cas & 41 41 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & 42 42 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 43 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke _prof_cas)43 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 44 44 45 45 do l = 1, nlev_cas … … 49 49 ! vertical interpolation using interpolation routine: 50 50 ! write(*,*)'avant interp vert', t_prof 51 CALL interp2_case_vertical_std(play, nlev_cas,plev_prof_cas &51 CALL interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 52 52 & ,t_prof_cas,theta_prof_cas,thv_prof_cas,thl_prof_cas & 53 53 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & … … 55 55 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 56 56 57 & ,vitw_prof_cas,omega_prof_cas 57 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 58 58 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 59 59 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 63 63 & ,u_mod_cas,v_mod_cas,ug_mod_cas,vg_mod_cas & 64 64 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 65 & ,w_mod_cas,omega_mod_cas 65 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 66 66 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 67 67 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 70 70 71 71 ! initial and boundary conditions : 72 ! 72 ! tsurf = ts_prof_cas 73 73 psurf = ps_prof_cas 74 ts_cur = ts_prof_cas 74 !EV tg instead of ts_cur 75 tg = ts_prof_cas 76 print*, 'tg=', tg 77 75 78 do l = 1, llm 76 79 temp(l) = t_mod_cas(l) … … 95 98 d_u_adv(l) = du_mod_cas(l)+hu_mod_cas(l)+vu_mod_cas(l) 96 99 d_v_adv(l) = dv_mod_cas(l)+hv_mod_cas(l)+vv_mod_cas(l) 100 enddo 97 101 98 ! print*,'d_t_adv ',d_t_adv(1:20)*86400102 ! Etienne pour initialisation de TKE 99 103 100 enddo 104 do l=1,llm+1 105 pbl_tke(:,l,:)=tke_mod_cas(l) 106 enddo 101 107 102 108 ! Faut-il multiplier par -1 ? (MPL 20160713) … … 108 114 IF (ok_prescr_ust) THEN 109 115 ust=ustar_prof_cas 110 print *,'ust=',ust111 116 ENDIF 112 117 118 113 119 endif !forcing_SCM -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/mod_1D_cases_read_std.F90
r3688 r3851 18 18 real, allocatable:: t_cas(:,:),q_cas(:,:),qv_cas(:,:),ql_cas(:,:),qi_cas(:,:),rh_cas(:,:) 19 19 real, allocatable:: th_cas(:,:),thv_cas(:,:),thl_cas(:,:),rv_cas(:,:) 20 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:) 20 real, allocatable:: u_cas(:,:),v_cas(:,:),vitw_cas(:,:),omega_cas(:,:),tke_cas(:,:) 21 21 22 22 !forcing … … 30 30 real, allocatable:: temp_nudg_cas(:,:),qv_nudg_cas(:,:),u_nudg_cas(:,:),v_nudg_cas(:,:) 31 31 real, allocatable:: lat_cas(:),sens_cas(:),ts_cas(:),ps_cas(:),ustar_cas(:) 32 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tke _cas(:)32 real, allocatable:: uw_cas(:,:),vw_cas(:,:),q1_cas(:,:),q2_cas(:,:),tkes_cas(:) 33 33 34 34 !champs interpoles … … 48 48 real, allocatable:: vitw_prof_cas(:) 49 49 real, allocatable:: omega_prof_cas(:) 50 real, allocatable:: tke_prof_cas(:) 50 51 real, allocatable:: ug_prof_cas(:) 51 52 real, allocatable:: vg_prof_cas(:) … … 73 74 74 75 75 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tke _prof_cas76 real lat_prof_cas,sens_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas,tkes_prof_cas 76 77 real o3_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough,rugos_cas,sand_cas,clay_cas 77 78 … … 92 93 REAL, ALLOCATABLE :: time_val(:) 93 94 94 print*,'ON EST VRAIMENT LA'95 print*,'ON EST VRAIMENT DASN MOD_1D_CASES_READ_STD' 95 96 fich_cas='cas.nc' 96 97 print*,'fich_cas ',fich_cas … … 168 169 allocate(th_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),rv_cas(nlev_cas,nt_cas)) 169 170 allocate(u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas),vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas)) 170 171 allocate(tke_cas(nlev_cas,nt_cas)) 171 172 !forcing 172 173 allocate(ht_cas(nlev_cas,nt_cas),vt_cas(nlev_cas,nt_cas),dt_cas(nlev_cas,nt_cas),dtrad_cas(nlev_cas,nt_cas)) … … 179 180 allocate(temp_nudg_cas(nlev_cas,nt_cas),qv_nudg_cas(nlev_cas,nt_cas)) 180 181 allocate(u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas)) 181 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tke _cas(nt_cas))182 allocate(lat_cas(nt_cas),sens_cas(nt_cas),ts_cas(nt_cas),ps_cas(nt_cas),ustar_cas(nt_cas),tkes_cas(nt_cas)) 182 183 allocate(uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas),q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas)) 183 184 … … 200 201 allocate(vitw_prof_cas(nlev_cas)) 201 202 allocate(omega_prof_cas(nlev_cas)) 203 allocate(tke_prof_cas(nlev_cas)) 202 204 allocate(ug_prof_cas(nlev_cas)) 203 205 allocate(vg_prof_cas(nlev_cas)) … … 228 230 CALL read_SCM (nid,nlev_cas,nt_cas, & 229 231 & ap_cas,bp_cas,z_cas,plev_cas,zh_cas,plevh_cas,t_cas,th_cas,thv_cas,thl_cas,qv_cas, & 230 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas, ug_cas,vg_cas, &232 & ql_cas,qi_cas,rh_cas,rv_cas,u_cas,v_cas,vitw_cas,omega_cas,tke_cas,ug_cas,vg_cas, & 231 233 & temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas, & 232 234 & du_cas,hu_cas,vu_cas, & 233 235 & dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas, & 234 & dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tke _cas, &236 & dr_cas,hr_cas,vr_cas,dtrad_cas,sens_cas,lat_cas,ts_cas,ps_cas,ustar_cas,tkes_cas, & 235 237 & uw_cas,vw_cas,q1_cas,q2_cas,orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough,heat_rough, & 236 238 & o3_cas,rugos_cas,clay_cas,sand_cas) … … 254 256 deallocate(t_cas,q_cas,qv_cas,ql_cas,qi_cas,rh_cas) 255 257 deallocate(th_cas,thl_cas,thv_cas,rv_cas) 256 deallocate(u_cas,v_cas,vitw_cas,omega_cas )258 deallocate(u_cas,v_cas,vitw_cas,omega_cas,tke_cas) 257 259 258 260 !forcing … … 265 267 deallocate(ug_cas) 266 268 deallocate(vg_cas) 267 deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tke _cas,uw_cas,vw_cas,q1_cas,q2_cas)269 deallocate(lat_cas,sens_cas,ts_cas,ps_cas,ustar_cas,tkes_cas,uw_cas,vw_cas,q1_cas,q2_cas) 268 270 269 271 !champs interpoles … … 283 285 deallocate(vitw_prof_cas) 284 286 deallocate(omega_prof_cas) 287 deallocate(tke_prof_cas) 285 288 deallocate(ug_prof_cas) 286 289 deallocate(vg_prof_cas) … … 312 315 !===================================================================== 313 316 SUBROUTINE read_SCM(nid,nlevel,ntime, & 314 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega, ug,vg,&317 & ap,bp,zz,pp,zzh,pph,temp,theta,thv,thl,qv,ql,qi,rh,rv,u,v,vitw,omega,tke,ug,vg,& 315 318 & temp_nudg,qv_nudg,u_nudg,v_nudg, & 316 319 & du,hu,vu,dv,hv,vv,dt,ht,vt,dq,hq,vq, & 317 & dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tke t,uw,vw,q1,q2, &320 & dth,hth,vth,dr,hr,vr,dtrad,sens,flat,ts,ps,ustar,tkes,uw,vw,q1,q2, & 318 321 & orog_cas,albedo_cas,emiss_cas,t_skin_cas,q_skin_cas,mom_rough, & 319 322 & heat_rough,o3_cas,rugos_cas,clay_cas,sand_cas) … … 334 337 real temp(nlevel,ntime),qv(nlevel,ntime),ql(nlevel,ntime),qi(nlevel,ntime),rh(nlevel,ntime) 335 338 real theta(nlevel,ntime),thv(nlevel,ntime),thl(nlevel,ntime),rv(nlevel,ntime) 336 real u(nlevel,ntime),v(nlevel,ntime),tke t(ntime)339 real u(nlevel,ntime),v(nlevel,ntime),tkes(ntime) 337 340 real temp_nudg(nlevel,ntime),qv_nudg(nlevel,ntime),u_nudg(nlevel,ntime),v_nudg(nlevel,ntime) 338 341 real ug(nlevel,ntime),vg(nlevel,ntime) 339 real vitw(nlevel,ntime),omega(nlevel,ntime) 342 real vitw(nlevel,ntime),omega(nlevel,ntime),tke(nlevel,ntime) 340 343 real du(nlevel,ntime),hu(nlevel,ntime),vu(nlevel,ntime) 341 344 real dv(nlevel,ntime),hv(nlevel,ntime),vv(nlevel,ntime) … … 371 374 &'height_f','pressure_forc','tempt','theta','thv','thl','qvt','qlt','qit','rv','ut','vt', & ! #46-58 372 375 ! coordonnees temps #12 373 &'tke t','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',&376 &'tkes','sfc_sens_flx','sfc_lat_flx','ts','ps','ustar',& 374 377 &'orog','albedo','emiss','t_skin','q_skin','mom_rough','heat_rough',& 375 378 ! scalaires #4 … … 546 549 case(56) ; u=resul 547 550 case(57) ; v=resul 548 case(58) ; tke t=resul2 ! donnees indexees en time551 case(58) ; tkes=resul2 ! donnees indexees en time 549 552 case(59) ; sens=resul2 550 553 case(60) ; flat=resul2 … … 581 584 u(k,t)=u0(k) 582 585 v(k,t)=v0(k) 583 !tke(k,t)=tke0(k)586 tke(k,t)=tke0(k) 584 587 enddo 585 588 enddo … … 593 596 594 597 !====================================================================== 598 599 !********************************************************************************************** 595 600 596 601 !********************************************************************************************** … … 601 606 & ,qv_cas,ql_cas,qi_cas,u_cas,v_cas & 602 607 & ,ug_cas,vg_cas,temp_nudg_cas,qv_nudg_cas,u_nudg_cas,v_nudg_cas & 603 & ,vitw_cas,omega_cas, du_cas,hu_cas,vu_cas &608 & ,vitw_cas,omega_cas,tke_cas,du_cas,hu_cas,vu_cas & 604 609 & ,dv_cas,hv_cas,vv_cas,dt_cas,ht_cas,vt_cas,dtrad_cas & 605 610 & ,dq_cas,hq_cas,vq_cas,dth_cas,hth_cas,vth_cas & 606 611 & ,lat_cas,sens_cas,ustar_cas & 607 & ,uw_cas,vw_cas,q1_cas,q2_cas,tke _cas &612 & ,uw_cas,vw_cas,q1_cas,q2_cas,tkes_cas & 608 613 ! 609 614 & ,ts_prof_cas,ps_prof_cas,plev_prof_cas,t_prof_cas,theta_prof_cas & … … 611 616 & ,u_prof_cas,v_prof_cas,ug_prof_cas,vg_prof_cas & 612 617 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 613 & ,vitw_prof_cas,omega_prof_cas, du_prof_cas,hu_prof_cas,vu_prof_cas &618 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas,du_prof_cas,hu_prof_cas,vu_prof_cas & 614 619 & ,dv_prof_cas,hv_prof_cas,vv_prof_cas,dt_prof_cas & 615 620 & ,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas & 616 621 & ,hq_prof_cas,vq_prof_cas,dth_prof_cas,hth_prof_cas,vth_prof_cas & 617 622 & ,lat_prof_cas,sens_prof_cas & 618 & ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas) 619 620 621 implicit none 623 & ,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tkes_prof_cas) 624 625 626 627 628 629 630 implicit none 622 631 623 632 !--------------------------------------------------------------------------------------- … … 639 648 real ts_cas(nt_cas),ps_cas(nt_cas) 640 649 real plev_cas(nlev_cas,nt_cas) 641 real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas),thv_cas(nlev_cas,nt_cas),thl_cas(nlev_cas,nt_cas) 650 real t_cas(nlev_cas,nt_cas),theta_cas(nlev_cas,nt_cas) 651 real thv_cas(nlev_cas,nt_cas), thl_cas(nlev_cas,nt_cas) 642 652 real qv_cas(nlev_cas,nt_cas),ql_cas(nlev_cas,nt_cas),qi_cas(nlev_cas,nt_cas) 643 653 real u_cas(nlev_cas,nt_cas),v_cas(nlev_cas,nt_cas) … … 646 656 real u_nudg_cas(nlev_cas,nt_cas),v_nudg_cas(nlev_cas,nt_cas) 647 657 648 real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas) 658 real vitw_cas(nlev_cas,nt_cas),omega_cas(nlev_cas,nt_cas),tke_cas(nlev_cas,nt_cas) 649 659 real du_cas(nlev_cas,nt_cas),hu_cas(nlev_cas,nt_cas),vu_cas(nlev_cas,nt_cas) 650 660 real dv_cas(nlev_cas,nt_cas),hv_cas(nlev_cas,nt_cas),vv_cas(nlev_cas,nt_cas) … … 653 663 real dtrad_cas(nlev_cas,nt_cas) 654 664 real dq_cas(nlev_cas,nt_cas),hq_cas(nlev_cas,nt_cas),vq_cas(nlev_cas,nt_cas) 655 real lat_cas(nt_cas),sens_cas(nt_cas),tke _cas(nt_cas)665 real lat_cas(nt_cas),sens_cas(nt_cas),tkes_cas(nt_cas) 656 666 real ustar_cas(nt_cas),uw_cas(nlev_cas,nt_cas),vw_cas(nlev_cas,nt_cas) 657 667 real q1_cas(nlev_cas,nt_cas),q2_cas(nlev_cas,nt_cas) … … 666 676 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) 667 677 668 real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas) 678 real vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 669 679 real du_prof_cas(nlev_cas),hu_prof_cas(nlev_cas),vu_prof_cas(nlev_cas) 670 680 real dv_prof_cas(nlev_cas),hv_prof_cas(nlev_cas),vv_prof_cas(nlev_cas) … … 673 683 real dtrad_prof_cas(nlev_cas) 674 684 real dq_prof_cas(nlev_cas),hq_prof_cas(nlev_cas),vq_prof_cas(nlev_cas) 675 real lat_prof_cas,sens_prof_cas,tke _prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas685 real lat_prof_cas,sens_prof_cas,tkes_prof_cas,ts_prof_cas,ps_prof_cas,ustar_prof_cas 676 686 real uw_prof_cas(nlev_cas),vw_prof_cas(nlev_cas),q1_prof_cas(nlev_cas),q2_prof_cas(nlev_cas) 677 687 ! local: … … 757 767 sens_prof_cas = sens_cas(it_cas2) & 758 768 & -frac*(sens_cas(it_cas2)-sens_cas(it_cas1)) 759 tke _prof_cas = tke_cas(it_cas2) &760 & -frac*(tke _cas(it_cas2)-tke_cas(it_cas1))769 tkes_prof_cas = tkes_cas(it_cas2) & 770 & -frac*(tkes_cas(it_cas2)-tkes_cas(it_cas1)) 761 771 ts_prof_cas = ts_cas(it_cas2) & 762 772 & -frac*(ts_cas(it_cas2)-ts_cas(it_cas1)) … … 804 814 omega_prof_cas(k) = omega_cas(k,it_cas2) & 805 815 & -frac*(omega_cas(k,it_cas2)-omega_cas(k,it_cas1)) 816 tke_prof_cas(k) = tke_cas(k,it_cas2) & 817 & -frac*(tke_cas(k,it_cas2)-tke_cas(k,it_cas1)) 806 818 du_prof_cas(k) = du_cas(k,it_cas2) & 807 819 & -frac*(du_cas(k,it_cas2)-du_cas(k,it_cas1)) … … 851 863 !********************************************************************************************** 852 864 !===================================================================== 853 SUBROUTINE interp2_case_vertical_std(play, nlev_cas,plev_prof_cas&865 SUBROUTINE interp2_case_vertical_std(play,plev,nlev_cas,plev_prof_cas & 854 866 & ,t_prof_cas,th_prof_cas,thv_prof_cas,thl_prof_cas & 855 867 & ,qv_prof_cas,ql_prof_cas,qi_prof_cas,u_prof_cas,v_prof_cas & 856 868 & ,ug_prof_cas,vg_prof_cas & 857 869 & ,temp_nudg_prof_cas,qv_nudg_prof_cas,u_nudg_prof_cas,v_nudg_prof_cas & 858 & ,vitw_prof_cas,omega_prof_cas 870 & ,vitw_prof_cas,omega_prof_cas,tke_prof_cas & 859 871 & ,du_prof_cas,hu_prof_cas,vu_prof_cas,dv_prof_cas,hv_prof_cas,vv_prof_cas & 860 872 & ,dt_prof_cas,ht_prof_cas,vt_prof_cas,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas & … … 865 877 & ,ug_mod_cas,vg_mod_cas & 866 878 & ,temp_nudg_mod_cas,qv_nudg_mod_cas,u_nudg_mod_cas,v_nudg_mod_cas & 867 & ,w_mod_cas,omega_mod_cas 879 & ,w_mod_cas,omega_mod_cas,tke_mod_cas & 868 880 & ,du_mod_cas,hu_mod_cas,vu_mod_cas,dv_mod_cas,hv_mod_cas,vv_mod_cas & 869 881 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & … … 888 900 ! real hq_prof(nlevmax),vq_prof(nlevmax) 889 901 890 real play(llm), plev _prof_cas(nlev_cas)902 real play(llm), plev(llm+1), plev_prof_cas(nlev_cas) 891 903 real t_prof_cas(nlev_cas),th_prof_cas(nlev_cas),thv_prof_cas(nlev_cas),thl_prof_cas(nlev_cas) 892 904 real qv_prof_cas(nlev_cas),ql_prof_cas(nlev_cas),qi_prof_cas(nlev_cas) 893 905 real u_prof_cas(nlev_cas),v_prof_cas(nlev_cas) 894 real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas) 906 real ug_prof_cas(nlev_cas),vg_prof_cas(nlev_cas), vitw_prof_cas(nlev_cas),omega_prof_cas(nlev_cas),tke_prof_cas(nlev_cas) 895 907 real temp_nudg_prof_cas(nlev_cas),qv_nudg_prof_cas(nlev_cas) 896 908 real u_nudg_prof_cas(nlev_cas),v_nudg_prof_cas(nlev_cas) … … 905 917 real qv_mod_cas(llm),ql_mod_cas(llm),qi_mod_cas(llm) 906 918 real u_mod_cas(llm),v_mod_cas(llm) 907 real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm) 919 real ug_mod_cas(llm),vg_mod_cas(llm), w_mod_cas(llm),omega_mod_cas(llm),tke_mod_cas(llm+1) 908 920 real temp_nudg_mod_cas(llm),qv_nudg_mod_cas(llm) 909 921 real u_nudg_mod_cas(llm),v_nudg_mod_cas(llm) … … 917 929 real frac,frac1,frac2,fact 918 930 919 ! do l = 1, llm 920 ! print *,'debut interp2, play=',l,play(l) 921 ! enddo 922 ! do l = 1, nlev_cas 923 ! print *,'debut interp2, plev_prof_cas=',l,play(l),plev_prof_cas(l) 924 ! enddo 931 932 933 ! for variables defined at the middle of layers 925 934 926 935 do l = 1, llm … … 950 959 endif 951 960 961 962 952 963 frac = (plev_prof_cas(k2)-play(l))/(plev_prof_cas(k2)-plev_prof_cas(k1)) 964 953 965 t_mod_cas(l)= t_prof_cas(k2) - frac*(t_prof_cas(k2)-t_prof_cas(k1)) 954 966 theta_mod_cas(l)= th_prof_cas(k2) - frac*(th_prof_cas(k2)-th_prof_cas(k1)) … … 1075 1087 enddo ! l 1076 1088 1089 ! for variables defined at layer interfaces (EV): 1090 1091 1092 do l = 1, llm+1 1093 1094 if (plev(l).ge.plev_prof_cas(nlev_cas)) then 1095 1096 mxcalc=l 1097 k1=0 1098 k2=0 1099 1100 if (plev(l).le.plev_prof_cas(1)) then 1101 1102 do k = 1, nlev_cas-1 1103 if (plev(l).le.plev_prof_cas(k).and. plev(l).gt.plev_prof_cas(k+1)) then 1104 k1=k 1105 k2=k+1 1106 endif 1107 enddo 1108 1109 if (k1.eq.0 .or. k2.eq.0) then 1110 write(*,*) 'PB! k1, k2 = ',k1,k2 1111 write(*,*) 'l,plev(l) = ',l,plev(l)/100 1112 do k = 1, nlev_cas-1 1113 write(*,*) 'k,plev_prof_cas(k) = ',k,plev_prof_cas(k)/100 1114 enddo 1115 endif 1116 1117 frac = (plev_prof_cas(k2)-plev(l))/(plev_prof_cas(k2)-plev_prof_cas(k1)) 1118 tke_mod_cas(l)= tke_prof_cas(k2) - frac*(tke_prof_cas(k2)-tke_prof_cas(k1)) 1119 else !play>plev_prof_cas(1) 1120 k1=1 1121 k2=2 1122 tke_mod_cas(l)= frac1*tke_prof_cas(k1) - frac2*tke_prof_cas(k2) 1123 1124 endif ! plev.le.plev_prof_cas(1) 1125 1126 else ! above max altitude of forcing file 1127 1128 tke_mod_cas(l)=0.0 1129 1130 endif ! plev 1131 1132 enddo ! l 1133 1134 1135 1077 1136 return 1078 1137 end SUBROUTINE interp2_case_vertical_std -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/old_1D_decl_cases.h
r3593 r3851 37 37 real th_mod(llm) 38 38 39 real ts_cur40 common /sst_forcing/ts_cur ! also in read_tsurf1d.F39 !real ts_cur 40 !common /sst_forcing/ts_cur ! also in read_tsurf1d.F 41 41 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 42 42 ! Declarations specifiques au cas RICO -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/old_1D_interp_cases.h
r3593 r3851 62 62 & ,ts_prof,plev_prof,t_prof,q_prof,u_prof,v_prof,w_prof & 63 63 & ,ht_prof,vt_prof,hq_prof,vq_prof) 64 65 if (type_ts_forcing.eq.1) t s_cur = ts_prof ! SST used in read_tsurf1d64 ! EV: tg instead of ts_cur 65 if (type_ts_forcing.eq.1) tg = ts_prof ! 66 66 67 67 ! vertical interpolation: … … 113 113 ! print *,'llm l omega_profd',llm,l,omega_profd(l) 114 114 ! enddo 115 116 if (type_ts_forcing.eq.1) t s_cur = tg_prof ! SST used in read_tsurf1d115 ! EV tg instead of ts_cur 116 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used 117 117 118 118 ! vertical interpolation: … … 206 206 & ,ug_gabls4,vg_gabls4,ht_gabls4,hq_gabls4,tg_gabls4 & 207 207 & ,ug_profg,vg_profg,ht_profg,hq_profg,tg_profg) 208 209 if (type_ts_forcing.eq.1) t s_cur = tg_prof ! SST used in read_tsurf1d208 !EV tg instead of ts_cur 209 if (type_ts_forcing.eq.1) tg = tg_prof ! SST used 210 210 211 211 ! vertical interpolation: … … 499 499 & ,nlev_sandu & 500 500 & ,ts_sandu,ts_prof) 501 502 if (type_ts_forcing.eq.1) t s_cur= ts_prof ! SST used in read_tsurf1d501 ! EV tg instead of ts_cur 502 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used in read_tsurf1d 503 503 504 504 ! vertical interpolation: … … 582 582 & ,ufa_astex,vfa_astex,div_prof,ts_prof,ug_prof,vg_prof & 583 583 & ,ufa_prof,vfa_prof) 584 585 if (type_ts_forcing.eq.1) ts_cur = ts_prof ! SST used in read_tsurf1d 586 584 ! EV tg instead of ts_cur 585 if (type_ts_forcing.eq.1) tg = ts_prof ! SST used 587 586 ! vertical interpolation: 588 587 CALL interp_astex_vertical(play,nlev_astex,plev_profa & … … 675 674 & ,dtrad_prof_cas,dq_prof_cas,hq_prof_cas,vq_prof_cas,lat_prof_cas & 676 675 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas) 677 678 ts_cur = ts_prof_cas 676 ! EV tg instead of ts_cur 677 678 tg = ts_prof_cas 679 679 psurf=plev_prof_cas(1) 680 680 … … 850 850 & ,dth_prof_cas,hth_prof_cas,vth_prof_cas,lat_prof_cas & 851 851 & ,sens_prof_cas,ustar_prof_cas,uw_prof_cas,vw_prof_cas,q1_prof_cas,q2_prof_cas,tke_prof_cas) 852 853 ts_cur = ts_prof_cas 852 ! EV tg instead of ts_cur 853 854 tg = ts_prof_cas 854 855 ! psurf=plev_prof_cas(1) 855 856 psurf=ps_prof_cas -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/old_1D_read_forc_cases.h
r3679 r3851 875 875 876 876 ! initial and boundary conditions : 877 ! tsurf = ts_prof_cas 878 ts_cur = ts_prof_cas 877 ! tsurf = ts_prof_cas 878 ! EV tg instead of ts_cur 879 tg= ts_prof_cas 879 880 psurf=plev_prof_cas(1) 880 881 write(*,*) 'SST initiale: ',tsurf … … 965 966 ! initial and boundary conditions : 966 967 ! tsurf = ts_prof_cas 967 ts_cur = ts_prof_cas 968 ! EV tg instead of ts_cur 969 tg = ts_prof_cas 968 970 psurf=plev_prof_cas(1) 969 971 write(*,*) 'SST initiale: ',tsurf … … 1063 1065 ! initial and boundary conditions : 1064 1066 ! tsurf = ts_prof_cas 1065 ts_cur = ts_prof_cas 1067 ! EV tg instead of ts_cur 1068 1069 tg = ts_prof_cas 1066 1070 psurf=plev_prof_cas(1) 1067 1071 write(*,*) 'SST initiale: ',tsurf -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/old_lmdz1d.F90
r3594 r3851 632 632 ! (phys_state_var_init is called again in physiq) 633 633 read_climoz = 0 634 ! 634 nsw=6 ! EV et LF: sinon, falb_dir et falb_dif ne peuvent etre alloues 635 636 635 637 call phys_state_var_init(read_climoz) 636 638 … … 728 730 729 731 !Al1 pour SST forced, appell?? depuis ocean_forced_noice 730 ts_cur = tsurf ! SST used in read_tsurf1d 732 ! EV tg instead of ts_cur 733 734 tg = tsurf ! SST used in read_tsurf1d 731 735 !===================================================================== 732 736 ! Initialisation de la physique : … … 791 795 792 796 fder=0. 797 print *, 'snsrf', snsrf 793 798 snsrf(1,:)=snowmass ! masse de neige des sous surface 794 799 qsurfsrf(1,:)=qsurf ! humidite de l'air des sous surface … … 841 846 end if 842 847 843 844 848 print*,'nat_surf,pctsrf(1,is_oce),pctsrf(1,is_ter)',nat_surf & 845 849 & ,pctsrf(1,is_oce),pctsrf(1,is_ter) … … 848 852 zpic = zpicinp 849 853 ftsol=tsurf 850 nsw=6 ! on met le nb de bandes SW=6, pour initialiser851 ! 6 albedo, mais on peut quand meme tourner avec852 ! moins. Seules les 2 ou 4 premiers seront lus853 854 falb_dir=albedo 854 855 falb_dif=albedo … … 913 914 v_ancien(1,:)=v(:) 914 915 915 u10m=0.916 v10m=0.917 ale_wake=0.918 ale_bl_stat=0.916 u10m=0. 917 v10m=0. 918 ale_wake=0. 919 ale_bl_stat=0. 919 920 920 921 !------------------------------------------------------------------------ -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/dyn1d/scm.F90
r3693 r3851 75 75 real :: zcufi = 1. 76 76 real :: zcvfi = 1. 77 78 !- real :: nat_surf79 !- logical :: ok_flux_surf80 !- real :: fsens81 !- real :: flat82 !- real :: tsurf83 !- real :: rugos84 !- real :: qsol(1:2)85 !- real :: qsurf86 !- real :: psurf87 !- real :: zsurf88 !- real :: albedo89 !-90 !- real :: time = 0.91 !- real :: time_ini92 !- real :: xlat93 !- real :: xlon94 !- real :: wtsurf95 !- real :: wqsurf96 !- real :: restart_runoff97 !- real :: xagesno98 !- real :: qsolinp99 !- real :: zpicinp100 !-101 77 real :: fnday 102 78 real :: day, daytime … … 141 117 logical :: forcing_case2 = .false. 142 118 logical :: forcing_SCM = .false. 143 integer :: type_ts_forcing ! 0 = SST constant; 1 = SST read from a file144 ! (cf read_tsurf1d.F)145 119 146 120 !flag forcings … … 148 122 logical :: nudge_thermo=.false. 149 123 logical :: cptadvw=.true. 124 125 150 126 !===================================================================== 151 127 ! DECLARATIONS FOR EACH CASE … … 248 224 ! 249 225 integer :: it_end ! iteration number of the last call 250 !Al1 226 !Al1,plev,play,phi,phis,presnivs, 251 227 integer ecrit_slab_oc !1=ecrit,-1=lit,0=no file 252 228 data ecrit_slab_oc/-1/ … … 278 254 d_v_age(:)=0. 279 255 256 280 257 ! Initialization of Common turb_forcing 281 258 dtime_frcg = 0. … … 290 267 ! OPTIONS OF THE 1D SIMULATION (lmdz1d.def => unicol.def) 291 268 !--------------------------------------------------------------------- 292 !Al1293 269 call conf_unicol 294 270 !Al1 moves this gcssold var from common fcg_gcssold to … … 296 272 ! -------------------------------------------------------------------- 297 273 close(1) 298 !Al1299 274 write(*,*) 'lmdz1d.def lu => unicol.def' 300 275 … … 302 277 year_ini_cas=1997 303 278 ! It is possible that those parameters are run twice. 304 305 279 ! A REVOIR : LIRE PEUT ETRE AN MOIS JOUR DIRECETEMENT 280 281 306 282 call getin('anneeref',year_ini_cas) 307 283 call getin('dayref',day_deb) … … 309 285 call getin('time_ini',heure_ini_cas) 310 286 311 type_ts_forcing = 0 312 IF (nat_surf==0) type_ts_forcing=1 ! SST forcee sur OCEAN 313 print*,'NATURE DE LA SURFACE ',nat_surf 287 print*,'NATURE DE LA SURFACE ',nat_surf 314 288 ! 315 289 ! Initialization of the logical switch for nudging 290 316 291 jcode = iflag_nudge 317 292 do i = 1,nudge_max … … 319 294 jcode = jcode/10 320 295 enddo 321 !--------------------------------------------------------------------- 296 !----------------------------------------------------------------------- 322 297 ! Definition of the run 323 !--------------------------------------------------------------------- 298 !----------------------------------------------------------------------- 324 299 325 300 call conf_gcm( 99, .TRUE. ) … … 343 318 allocate( phy_flic(year_len)) ! Fraction de glace 344 319 phy_flic(:)=0.0 320 321 345 322 !----------------------------------------------------------------------- 346 323 ! Choix du calendrier … … 373 350 ! Le numero du jour est dans "day". L heure est traitee separement. 374 351 ! La date complete est dans "daytime" (l'unite est le jour). 352 353 375 354 if (nday>0) then 376 355 fnday=nday … … 409 388 ! Initialization of dimensions, geometry and initial state 410 389 !--------------------------------------------------------------------- 411 ! 390 ! call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq 412 391 ! but we still need to initialize dimphy module (klon,klev,etc.) here. 413 392 call init_dimphy1D(1,llm) … … 433 412 ! (phys_state_var_init is called again in physiq) 434 413 read_climoz = 0 435 ! 414 nsw=6 415 436 416 call phys_state_var_init(read_climoz) 437 417 … … 446 426 !!! Feedback forcing values for Gateaux differentiation (al1) 447 427 !!!===================================================================== 448 !!! Surface Planck forcing bracketing call radiation449 !! surf_Planck = 0.450 !! surf_Conv = 0.451 !! write(*,*) 'Gateaux-dif Planck,Conv:',surf_Planck,surf_Conv452 !!! a mettre dans le lmdz1d.def ou autre453 !!454 428 !! 455 429 qsol = qsolinp … … 469 443 ENDIF 470 444 print*,'Flux sol ',fsens,flat 471 !! ok_flux_surf=.false.472 !! fsens=-wtsurf*rcpd*rho(1)473 !! flat=-wqsurf*rlvtt*rho(1)474 !!!!475 445 476 446 ! Vertical discretization and pressure levels at half and mid levels: … … 496 466 plev =ap+bp*psurf 497 467 play = 0.5*(plev(1:llm)+plev(2:llm+1)) 498 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles 468 zlay=-rd*300.*log(play/psurf)/rg ! moved after reading profiles. 499 469 500 470 IF (forcing_type .eq. 59) THEN … … 527 497 print*,'mxcalc=',mxcalc 528 498 ! print*,'zlay=',zlay(mxcalc) 529 print*,'play=',play(mxcalc) 530 531 !Al1 pour SST forced, appell?? depuis ocean_forced_noice 532 ts_cur = tsurf ! SST used in read_tsurf1d 499 ! print*,'play=',play(mxcalc) 500 501 !! When surface temperature is forced 502 tg= tsurf ! surface T used in read_tsurf1d 503 504 533 505 !===================================================================== 534 506 ! Initialisation de la physique : … … 546 518 ! airefi,zcufi,zcvfi initialises au debut de ce programme 547 519 ! rday,ra,rg,rd,rcpd declares dans YOMCST.h et calcules dans suphel.F 520 521 548 522 day_step = float(nsplit_phys)*day_step/float(iphysiq) 549 523 write (*,*) 'Time step divided by nsplit_phys (=',nsplit_phys,')' … … 563 537 ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 564 538 ! with '0.' when necessary 539 565 540 call iniphysiq(iim,jjm,llm, & 566 541 1,comm_lmdz, & … … 650 625 zpic = zpicinp 651 626 ftsol=tsurf 652 nsw=6 ! on met le nb de bandes SW=6, pour initialiser653 ! 6 albedo, mais on peut quand meme tourner avec654 ! moins. Seules les 2 ou 4 premiers seront lus655 627 falb_dir=albedo 656 628 falb_dif=albedo … … 664 636 prw_ancien = 0. 665 637 !jyg< 666 !! pbl_tke(:,:,:)=1.e-8 667 pbl_tke(:,:,:)=0. 668 pbl_tke(:,2,:)=1.e-2 669 PRINT *, ' pbl_tke dans lmdz1d ' 670 if (prt_level .ge. 5) then 671 DO nsrf = 1,4 672 PRINT *,'pbl_tke(1,:,',nsrf,') ',pbl_tke(1,:,nsrf) 673 ENDDO 674 end if 675 638 ! Etienne: comment those lines since now the TKE is inialized in 1D_read_forc_cases 639 !! pbl_tke(:,:,:)=1.e-8 640 ! pbl_tke(:,:,:)=0. 641 ! pbl_tke(:,2,:)=1.e-2 676 642 !>jyg 677 678 643 rain_fall=0. 679 644 snow_fall=0. … … 715 680 v_ancien(1,:)=v(:) 716 681 717 u10m=0.718 v10m=0.719 ale_wake=0.720 ale_bl_stat=0.682 u10m=0. 683 v10m=0. 684 ale_wake=0. 685 ale_bl_stat=0. 721 686 722 687 !------------------------------------------------------------------------ … … 738 703 ! to be set at some arbitratry convenient values. 739 704 !------------------------------------------------------------------------ 740 !Al1 =============== restart option ========================== 705 !Al1 =============== restart option ====================================== 741 706 if (.not.restart) then 742 707 iflag_pbl = 5 … … 803 768 print*,'plev,play,phi,phis,presnivs,u,v,temp,q,omega2' 804 769 print*,'temp(1),q(1,1),u(1),v(1),plev(1),phis :' 805 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis 770 print*,temp(1),q(1,1),u(1),v(1),plev(1),phis(1) 806 771 ! raz for safety 807 772 do l=1,llm … … 809 774 enddo 810 775 endif 811 ! Al1================ end restart =================================776 !====================== end restart ================================= 812 777 IF (ecrit_slab_oc.eq.1) then 813 778 open(97,file='div_slab.dat',STATUS='UNKNOWN') … … 820 785 CALL iophys_ini 821 786 #endif 787 788 !===================================================================== 822 789 ! START OF THE TEMPORAL LOOP : 823 790 !===================================================================== 824 791 825 792 it_end = nint(fnday*day_step) 826 !test JLD it_end = 10827 793 do while(it.le.it_end) 828 794 … … 832 798 print*,'PAS DE TEMPS ',timestep 833 799 endif 834 !Al1 demande de restartphy.nc835 800 if (it.eq.it_end) lastcall=.True. 836 801 … … 844 809 ! Geopotential : 845 810 !--------------------------------------------------------------------- 846 811 ! phis(1)=zsurf*RG 812 ! phi(1)=phis(1)+RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 847 813 phi(1)=RD*temp(1)*(plev(1)-play(1))/(.5*(plev(1)+play(1))) 814 848 815 do l = 1, llm-1 849 816 phi(l+1)=phi(l)+RD*(temp(l)+temp(l+1))* & 850 817 & (play(l)-play(l+1))/(play(l)+play(l+1)) 851 818 enddo 819 852 820 853 821 !--------------------------------------------------------------------- … … 950 918 sfdt = sin(0.5*fcoriolis*timestep) 951 919 cfdt = cos(0.5*fcoriolis*timestep) 952 ! print *,'fcoriolis,sfdt,cfdt,timestep',fcoriolis,sfdt,cfdt,timestep 953 ! 920 954 921 d_u_age(1:mxcalc)= -2.*sfdt/timestep* & 955 922 & (sfdt*(u(1:mxcalc)-ug(1:mxcalc)) - & … … 1030 997 temp(1:mxcalc)=temp(1:mxcalc)+timestep*( & 1031 998 & dt_phys(1:mxcalc) & 1032 & +d_t_adv(1:mxcalc) &1033 & +d_t_nudge(1:mxcalc) 999 & +d_t_adv(1:mxcalc) & 1000 & +d_t_nudge(1:mxcalc) & 1034 1001 & +dt_cooling(1:mxcalc)) ! Taux de chauffage ou refroid. 1035 1002 1036 1003 1037 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1004 !======================================================================= 1038 1005 !! CONSERVE EN ATTENDANT QUE LE CAS EN QUESTION FONCTIONNE EN STD !! 1039 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1040 ! endif ! forcing_sandu or forcing_astex 1041 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1006 !======================================================================= 1042 1007 1043 1008 teta=temp*(pzero/play)**rkappa 1044 ! 1009 1045 1010 !--------------------------------------------------------------------- 1046 1011 ! Nudge soil temperature if requested … … 1080 1045 1081 1046 ! incremente day time 1082 ! print*,'daytime bef',daytime,1./day_step1083 1047 daytime = daytime+1./day_step 1084 !Al1dbg1085 1048 day = int(daytime+0.1/day_step) 1086 1049 ! time = max(daytime-day,0.0) … … 1088 1051 !cc time = real(mod(it,day_step))/day_step 1089 1052 time = time_ini/24.+real(mod(it,day_step))/day_step 1090 ! print*,'daytime nxt time',daytime,time1091 1053 it=it+1 1092 1054 1093 1055 enddo 1094 1056 1095 !Al11096 1057 if (ecrit_slab_oc.ne.-1) close(97) 1097 1058 1098 1059 !Al1 Call to 1D equivalent of dynredem (an,mois,jour,heure ?) 1099 ! ------------------------------------- 1060 ! --------------------------------------------------------------------------- 1100 1061 call dyn1dredem("restart1dyn.nc", & 1101 1062 & plev,play,phi,phis,presnivs, & -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/fisrtilp.F90
r3493 r3851 817 817 ! Variables calculees: 818 818 ! rneb : nebulosite 819 ! zqn : eau condensee, dans le nuage (in cloudwater content)819 ! zqn : eau totale dans le nuage (in cloud total water content) 820 820 ! zcond: eau condensee en moyenne dans la maille 821 821 ! rhcl: humidite relative ciel-clair -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/flux_arp.h
r2329 r3851 1 1 ! 2 2 ! $Id: flux_arp.h 2010-08-04 17:02:56Z lahellec $ 3 ! Modif EV, 10/2020 3 4 ! 4 5 logical :: ok_flux_surf 5 6 logical :: ok_prescr_ust !for prescribed ustar 7 logical :: ok_prescr_beta 8 logical :: ok_forc_tsurf 9 10 6 11 real :: fsens 7 12 real :: flat 13 real :: betaevap 8 14 real :: ust 9 15 real :: tg 10 16 11 common /flux_arp/fsens,flat,ust,tg,ok_flux_surf,ok_prescr_ust 17 common /flux_arp/fsens,flat,ust,tg,ok_flux_surf,ok_prescr_ust,ok_prescr_beta,betaevap,ok_forc_tsurf 12 18 13 19 !$OMP THREADPRIVATE(/flux_arp/) 14 20 15 21 22 16 23 17 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/oasis.F90
r3465 r3851 59 59 INTEGER, PARAMETER :: ids_qraiic = 28 60 60 INTEGER, PARAMETER :: ids_qsnoic = 29 61 INTEGER, PARAMETER :: maxsend = 29 ! Maximum number of fields to send 61 INTEGER, PARAMETER :: ids_delta_sst = 30, ids_delta_sal = 31 62 63 INTEGER, PARAMETER :: maxsend = 31 ! Maximum number of fields to send 62 64 63 65 ! Id for fields received from ocean 66 64 67 INTEGER, PARAMETER :: idr_sisutw = 1 65 68 INTEGER, PARAMETER :: idr_icecov = 2 … … 70 73 INTEGER, PARAMETER :: idr_curenz = 7 71 74 INTEGER, PARAMETER :: idr_oceco2 = 8 72 INTEGER, PARAMETER :: maxrecv = 8 ! Maximum number of fields to receive 75 76 INTEGER, PARAMETER :: idr_sss = 9 77 ! bulk salinity of the surface layer of the ocean, in ppt 78 79 INTEGER, PARAMETER :: maxrecv = 9 ! Maximum number of fields to receive 73 80 74 81 … … 110 117 USE geometry_mod, ONLY: ind_cell_glo 111 118 USE mod_phys_lmdz_mpi_data, ONLY: klon_mpi_para_nb 112 113 119 use config_ocean_skin_m, only: activate_ocean_skin 114 120 115 121 ! Local variables … … 183 189 infosend(ids_calvin)%action = .TRUE. ; infosend(ids_calvin)%name = 'COCALVIN' 184 190 191 if (activate_ocean_skin == 2) then 192 infosend(ids_delta_sst)%action = .TRUE. 193 infosend(ids_delta_sst)%name = 'CODELSST' 194 infosend(ids_delta_sal)%action = .TRUE. 195 infosend(ids_delta_sal)%name = 'CODELSSS' 196 end if 197 185 198 IF (version_ocean=='nemo') THEN 186 199 infosend(ids_shftot)%action = .TRUE. ; infosend(ids_shftot)%name = 'COQSRMIX' … … 219 232 inforecv(idr_icealw)%action = .TRUE. ; inforecv(idr_icealw)%name = 'SIICEALW' 220 233 inforecv(idr_icetem)%action = .TRUE. ; inforecv(idr_icetem)%name = 'SIICTEMW' 234 235 if (activate_ocean_skin >= 1) then 236 inforecv(idr_sss)%action = .TRUE. 237 inforecv(idr_sss)%name = 'SISUSALW' 238 end if 221 239 222 240 IF (cpl_current ) THEN -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/ocean_cpl_mod.F90
r3102 r3851 52 52 AcoefH, AcoefQ, BcoefH, BcoefQ, & 53 53 AcoefU, AcoefV, BcoefU, BcoefV, & 54 ps, u1, v1, gustiness, &54 ps, u1, v1, gustiness, tsurf_in, & 55 55 radsol, snow, agesno, & 56 56 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 57 tsurf_new, dflux_s, dflux_l) 57 tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, & 58 delta_sst) 58 59 59 60 ! … … 63 64 ! 64 65 USE dimphy, ONLY : klon 65 USE cpl_mod66 66 USE calcul_fluxs_mod 67 67 USE indice_sol_mod 68 68 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 69 USE cpl_mod, ONLY : gath2cpl 69 USE cpl_mod, ONLY : gath2cpl, cpl_receive_ocean_fields, & 70 cpl_send_ocean_fields 71 use config_ocean_skin_m, only: activate_ocean_skin 70 72 71 73 INCLUDE "YOMCST.h" … … 90 92 REAL, DIMENSION(klon), INTENT(IN) :: ps 91 93 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 94 REAL, INTENT(IN) :: tsurf_in(:) ! (klon) 95 96 real, intent(in):: delta_sal(:) ! (knon) 97 ! ocean-air interface salinity minus bulk salinity, in ppt 98 99 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 100 101 REAL, intent(in):: delta_sst(:) ! (knon) 102 ! Ocean-air interface temperature minus bulk SST, in K. Defined 103 ! only if activate_ocean_skin >= 1. 92 104 93 105 ! In/Output arguments … … 104 116 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 105 117 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 118 REAL, intent(out):: sens_prec_liq(:) ! (knon) 119 120 REAL, INTENT(OUT):: sss(:) ! (klon) 121 ! bulk salinity of the surface layer of the ocean, in ppt 106 122 107 123 … … 116 132 REAL, DIMENSION(klon) :: u1_lay, v1_lay 117 133 LOGICAL :: check=.FALSE. 118 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol134 REAL sens_prec_sol(knon) 119 135 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 120 136 … … 128 144 ! 129 145 !**************************************************************************************** 130 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl, u0_cpl, v0_cpl) 146 CALL cpl_receive_ocean_fields(knon, knindex, tsurf_cpl, u0_cpl, v0_cpl, & 147 sss) 131 148 132 149 !**************************************************************************************** … … 138 155 dif_grnd = 0. 139 156 agesno(:) = 0. 140 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.157 lat_prec_liq = 0.; lat_prec_sol = 0. 141 158 142 159 … … 147 164 148 165 CALL calcul_fluxs(knon, is_oce, dtime, & 149 tsurf_cpl, p1lay, cal, beta, cdragh, cdragq, ps, & 166 merge(tsurf_in, tsurf_cpl, activate_ocean_skin == 2), p1lay, cal, & 167 beta, cdragh, cdragq, ps, & 150 168 precip_rain, precip_snow, snow, qsurf, & 151 169 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 152 170 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 153 171 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 154 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 172 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 173 174 if (activate_ocean_skin == 2) then 175 ! tsurf_new was set to tsurf_in in calcul_flux, correct it to 176 ! the new bulk SST tsurf_cpl: 177 tsurf_new = tsurf_cpl 178 end if 179 180 ! assertion: tsurf_new == tsurf_cpl 181 155 182 do j = 1, knon 156 183 i = knindex(j) … … 189 216 !**************************************************************************************** 190 217 191 CALL cpl_send_ocean_fields(itime, knon, knindex, & 192 swnet, lwnet, fluxlat, fluxsens, & 193 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp,& 194 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 195 218 CALL cpl_send_ocean_fields(itime, knon, knindex, swnet, lwnet, fluxlat, & 219 fluxsens, precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, & 220 flux_u1, flux_v1, windsp, sens_prec_liq, sens_prec_sol, lat_prec_liq, & 221 lat_prec_sol, delta_sst, delta_sal) 196 222 197 223 END SUBROUTINE ocean_cpl_noice … … 210 236 radsol, snow, qsurf, & 211 237 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 212 tsurf_new, dflux_s, dflux_l )238 tsurf_new, dflux_s, dflux_l, rhoa) 213 239 ! 214 240 ! This subroutine treats the ocean where there is ice. The subroutine first receives … … 245 271 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 246 272 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 273 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 247 274 248 275 ! In/output arguments … … 272 299 REAL, DIMENSION(klon) :: u0, v0 273 300 REAL, DIMENSION(klon) :: u1_lay, v1_lay 274 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol301 REAL sens_prec_liq(knon), sens_prec_sol(knon) 275 302 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 276 303 … … 280 307 IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon 281 308 282 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.309 lat_prec_liq = 0.; lat_prec_sol = 0. 283 310 284 311 !**************************************************************************************** … … 313 340 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 314 341 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 315 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )342 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 316 343 do j = 1, knon 317 344 i = knindex(j) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/ocean_forced_mod.F90
r3327 r3851 19 19 AcoefH, AcoefQ, BcoefH, BcoefQ, & 20 20 AcoefU, AcoefV, BcoefU, BcoefV, & 21 ps, u1, v1, gustiness, &21 ps, u1, v1, gustiness, tsurf_in, & 22 22 radsol, snow, agesno, & 23 23 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 24 tsurf_new, dflux_s, dflux_l )24 tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa) 25 25 ! 26 26 ! This subroutine treats the "open ocean", all grid points that are not entierly covered … … 35 35 USE indice_sol_mod 36 36 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 37 use config_ocean_skin_m, only: activate_ocean_skin 37 38 38 39 INCLUDE "YOMCST.h" 39 40 INCLUDE "clesphys.h" 40 41 INCLUDE "flux_arp.h" 41 42 42 43 ! Input arguments … … 53 54 REAL, DIMENSION(klon), INTENT(IN) :: ps 54 55 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 56 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in 57 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 55 58 56 59 ! In/Output arguments … … 67 70 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 68 71 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 72 REAL, intent(out):: sens_prec_liq(:) ! (knon) 69 73 70 74 ! Local variables … … 76 80 REAL, DIMENSION(klon) :: u1_lay, v1_lay 77 81 LOGICAL :: check=.FALSE. 78 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol82 REAL sens_prec_sol(knon) 79 83 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 80 84 … … 92 96 !!jyg if (knon.eq.1) then ! single-column model 93 97 if (klon_glo.eq.1) then ! single-column model 94 CALL read_tsurf1d(knon,tsurf_lim) ! new 98 ! EV: now surface Tin flux_arp.h 99 !CALL read_tsurf1d(knon,tsurf_lim) ! new 100 DO i = 1, knon 101 tsurf_lim(i) = tg 102 ENDDO 103 95 104 else ! GCM 96 105 CALL limit_read_sst(knon,knindex,tsurf_lim) … … 104 113 !**************************************************************************************** 105 114 ! Set some variables for calcul_fluxs 106 cal = 0. 107 beta = 1. 108 dif_grnd = 0. 115 !cal = 0. 116 !beta = 1. 117 !dif_grnd = 0. 118 119 120 ! EV: use calbeta to calculate beta 121 ! Need to initialize qsurf for calbeta but it is not modified by this routine 122 qsurf(:)=0. 123 CALL calbeta(dtime, is_oce, knon, snow, qsurf, beta, cal, dif_grnd) 124 125 109 126 alb_neig(:) = 0. 110 127 agesno(:) = 0. 111 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.128 lat_prec_liq = 0.; lat_prec_sol = 0. 112 129 113 130 ! Suppose zero surface speed … … 119 136 ! Calcul de tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l and qsurf 120 137 CALL calcul_fluxs(knon, is_oce, dtime, & 121 tsurf_lim, p1lay, cal, beta, cdragh, cdragq, ps, & 138 merge(tsurf_in, tsurf_lim, activate_ocean_skin == 2), p1lay, cal, & 139 beta, cdragh, cdragq, ps, & 122 140 precip_rain, precip_snow, snow, qsurf, & 123 141 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 124 142 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 125 143 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 126 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 144 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 145 if (activate_ocean_skin == 2) tsurf_new = tsurf_lim 127 146 128 147 do j = 1, knon … … 154 173 radsol, snow, qsol, agesno, tsoil, & 155 174 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 156 tsurf_new, dflux_s, dflux_l )175 tsurf_new, dflux_s, dflux_l, rhoa) 157 176 ! 158 177 ! This subroutine treats the ocean where there is ice. … … 168 187 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 169 188 170 ! 189 ! INCLUDE "indicesol.h" 171 190 INCLUDE "dimsoil.h" 172 191 INCLUDE "YOMCST.h" 173 192 INCLUDE "clesphys.h" 193 INCLUDE "flux_arp.h" 174 194 175 195 ! Input arguments … … 187 207 REAL, DIMENSION(klon), INTENT(IN) :: ps 188 208 REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness 209 real, intent(in):: rhoa(:) ! (knon) density of moist air (kg / m3) 189 210 190 211 ! In/Output arguments … … 216 237 REAL, DIMENSION(klon) :: u0, v0 217 238 REAL, DIMENSION(klon) :: u1_lay, v1_lay 218 REAL , DIMENSION(klon) :: sens_prec_liq, sens_prec_sol239 REAL sens_prec_liq(knon), sens_prec_sol (knon) 219 240 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 220 241 … … 233 254 tsurf_tmp(:) = tsurf_in(:) 234 255 235 ! calculate the parameters cal, beta, capsol and dif_grnd 256 ! calculate the parameters cal, beta, capsol and dif_grnd and then recalculate cal 236 257 CALL calbeta(dtime, is_sic, knon, snow, qsol, beta, capsol, dif_grnd) 237 258 … … 249 270 ENDIF 250 271 251 beta = 1.0252 sens_prec_liq = 0.; sens_prec_sol = 0.;lat_prec_liq = 0.; lat_prec_sol = 0.272 ! beta = 1.0 273 lat_prec_liq = 0.; lat_prec_sol = 0. 253 274 254 275 ! Suppose zero surface speed … … 263 284 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 264 285 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 265 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol )286 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 266 287 do j = 1, knon 267 288 i = knindex(j) … … 307 328 ! 1D case 308 329 !************************************************************************ 309 SUBROUTINE read_tsurf1d(knon,sst_out)310 330 ! SUBROUTINE read_tsurf1d(knon,sst_out) 331 ! 311 332 ! This subroutine specifies the surface temperature to be used in 1D simulations 312 313 USE dimphy, ONLY : klon314 315 INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid316 REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model317 318 INTEGER :: i333 ! 334 ! USE dimphy, ONLY : klon 335 ! 336 ! INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid 337 ! REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model 338 ! 339 ! INTEGER :: i 319 340 ! COMMON defined in lmdz1d.F: 320 real ts_cur321 common /sst_forcing/ts_cur322 323 DO i = 1, knon324 sst_out(i) = ts_cur325 ENDDO326 327 END SUBROUTINE read_tsurf1d328 341 ! real ts_cur 342 ! common /sst_forcing/ts_cur 343 ! 344 ! DO i = 1, knon 345 ! sst_out(i) = ts_cur 346 ! ENDDO 347 ! 348 ! END SUBROUTINE read_tsurf1d 349 ! 329 350 ! 330 351 !************************************************************************ 331 !332 352 END MODULE ocean_forced_mod 333 353 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/ocean_slab_mod.F90
r3102 r3851 421 421 ! 422 422 !**************************************************************************************** 423 cal(:) = 0. ! infinite thermal inertia 424 beta(:) = 1. ! wet surface 425 dif_grnd(:) = 0. ! no diffusion into ground 423 !cal(:) = 0. ! infinite thermal inertia 424 !beta(:) = 1. ! wet surface 425 !dif_grnd(:) = 0. ! no diffusion into ground 426 ! EV: use calbeta 427 CALL calbeta(dtime, is_oce, knon, snow,qsurf, beta, cal, dif_grnd) 428 429 426 430 427 431 ! Suppose zero surface speed … … 742 746 ! set beta, cal, compute conduction fluxes inside ice/snow 743 747 slab_bilg(:)=0. 744 dif_grnd(:)=0. 745 beta(:) = 1. 748 !dif_grnd(:)=0. 749 !beta(:) = 1. 750 ! EV: use calbeta to calculate beta and then recalculate properly cal 751 CALL calbeta(dtime, is_sic, knon, snow, qsol, beta, cal, dif_grnd) 752 753 746 754 DO i=1,knon 747 755 ki=knindex(i) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/pbl_surface_mod.F90
r3435 r3851 23 23 USE climb_wind_mod, ONLY : climb_wind_down, climb_wind_up 24 24 USE coef_diff_turb_mod, ONLY : coef_diff_turb 25 USE ioipsl_getin_p_mod, ONLY : getin_p 26 USE cdrag_mod 27 USE stdlevvar_mod 25 28 USE wx_pbl_mod, ONLY : wx_pbl_init, wx_pbl_final, & 26 29 !! wx_pbl_fuse_no_dts, wx_pbl_split_no_dts, & 27 30 !! wx_pbl_fuse, wx_pbl_split 28 31 wx_pbl0_fuse, wx_pbl0_split 32 use config_ocean_skin_m, only: activate_ocean_skin 29 33 30 34 IMPLICIT NONE … … 42 46 INTEGER, SAVE :: iflag_pbl_surface_t2m_bug 43 47 !$OMP THREADPRIVATE(iflag_pbl_surface_t2m_bug) 48 integer, save :: iflag_new_t2mq2m 49 !$OMP THREADPRIVATE(iflag_new_t2mq2m) 50 44 51 !FC 45 52 ! integer, save :: iflag_frein … … 164 171 rlon, rlat, rugoro, rmu0, & 165 172 zsig, lwdown_m, pphi, cldt, & 166 rain_f, snow_f, solsw_m, sol lw_m, &173 rain_f, snow_f, solsw_m, solswfdiff_m, sollw_m, & 167 174 gustiness, & 168 175 t, q, u, v, & … … 177 184 alb_dir_m, alb_dif_m, zxsens, zxevap, & 178 185 alb3_lic, runoff, snowhgt, qsnow, to_ice, sissnow, & 179 zxtsol, zxfluxlat, zt2m, qsat2m, 186 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & 180 187 d_t, d_q, d_u, d_v, d_t_diss, & 181 188 !!! nrlmd+jyg le 02/05/2011 et le 20/02/2012 … … 206 213 !jyg< 207 214 !! zxfluxt, zxfluxq, q2m, flux_q, tke, & 208 zxfluxt, zxfluxq, q2m, flux_q, tke_x, 215 zxfluxt, zxfluxq, q2m, flux_q, tke_x, & 209 216 !>jyg 210 217 !!! nrlmd+jyg le 02/05/2011 et le 20/02/2012 … … 286 293 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm 287 294 USE carbon_cycle_mod, ONLY : co2_send, nbcf_out, fields_out, yfields_out, cfname_out 295 use hbtm_mod, only: hbtm 288 296 USE indice_sol_mod 289 297 USE time_phylmdz_mod, ONLY : day_ini,annee_ref,itau_phy … … 291 299 USE print_control_mod, ONLY : prt_level,lunout 292 300 USE ioipsl_getin_p_mod, ONLY : getin_p 301 use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal 302 use phys_output_var_mod, only: dter, dser, tkt, tks, taur, sss 303 #ifdef CPP_XIOS 304 USE wxios, ONLY: missing_val 305 #else 306 use netcdf, only: missing_val => nf90_fill_real 307 #endif 293 308 294 309 IMPLICIT NONE … … 318 333 REAL, DIMENSION(klon), INTENT(IN) :: snow_f ! snow fall 319 334 REAL, DIMENSION(klon), INTENT(IN) :: solsw_m ! net shortwave radiation at mean surface 335 REAL, DIMENSION(klon), INTENT(IN) :: solswfdiff_m ! diffuse fraction fordownward shortwave radiation at mean surface 320 336 REAL, DIMENSION(klon), INTENT(IN) :: sollw_m ! net longwave radiation at mean surface 321 337 REAL, DIMENSION(klon,klev), INTENT(IN) :: t ! temperature (K) … … 394 410 REAL, DIMENSION(klon), INTENT(OUT) :: zxfluxlat ! latent flux, mean for each grid point 395 411 REAL, DIMENSION(klon), INTENT(OUT) :: zt2m ! temperature at 2m, mean for each grid point 412 INTEGER, DIMENSION(klon, 6), INTENT(OUT) :: zn2mout ! number of times the 2m temperature is out of the [tsol,temp] 396 413 REAL, DIMENSION(klon), INTENT(OUT) :: qsat2m 397 414 REAL, DIMENSION(klon, klev), INTENT(OUT) :: d_t ! change in temperature … … 453 470 REAL, DIMENSION(klon, klev), INTENT(OUT) :: zxfluxu ! u wind tension, mean for each grid point 454 471 REAL, DIMENSION(klon, klev), INTENT(OUT) :: zxfluxv ! v wind tension, mean for each grid point 455 REAL, DIMENSION(klon, nbsrf+1), INTENT(INOUT) 456 REAL, DIMENSION(klon, nbsrf), INTENT(INOUT) 472 REAL, DIMENSION(klon, nbsrf+1), INTENT(INOUT) :: z0m,z0h ! rugosity length (m) 473 REAL, DIMENSION(klon, nbsrf), INTENT(INOUT) :: agesno ! age of snow at surface 457 474 REAL, DIMENSION(klon, nbsrf), INTENT(OUT) :: solsw ! net shortwave radiation at surface 458 475 REAL, DIMENSION(klon, nbsrf), INTENT(OUT) :: sollw ! net longwave radiation at surface 459 476 REAL, DIMENSION(klon, nbsrf), INTENT(OUT) :: d_ts ! change in temperature at surface 460 REAL, DIMENSION(klon, nbsrf), INTENT(INOUT) 477 REAL, DIMENSION(klon, nbsrf), INTENT(INOUT) :: evap ! evaporation at surface 461 478 REAL, DIMENSION(klon, nbsrf), INTENT(OUT) :: fluxlat ! latent flux 462 479 REAL, DIMENSION(klon, nbsrf), INTENT(OUT) :: t2m ! temperature at 2 meter height … … 537 554 REAL, DIMENSION(klon) :: y_flux_u1, y_flux_v1 538 555 REAL, DIMENSION(klon) :: yt2m, yq2m, yu10m 556 INTEGER, DIMENSION(klon, nbsrf, 6) :: yn2mout, yn2mout_x, yn2mout_w 557 INTEGER, DIMENSION(klon, nbsrf, 6) :: n2mout, n2mout_x, n2mout_w 539 558 REAL, DIMENSION(klon) :: yustar 540 559 REAL, DIMENSION(klon) :: ywstar … … 822 841 ! Martin 823 842 843 real, DIMENSION(klon):: ydelta_sst, ydelta_sal, yds_ns, ydt_ns, ydter, ydser, & 844 ytkt, ytks, ytaur, ysss 845 ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, 846 ! taur, sss on ocean points 847 824 848 !**************************************************************************************** 825 849 ! End of declarations … … 838 862 839 863 IF (first_call) THEN 864 865 iflag_new_t2mq2m=1 866 CALL getin_p('iflag_new_t2mq2m',iflag_new_t2mq2m) 867 print*,'pbl_iflag_new_t2mq2m=',iflag_new_t2mq2m 868 840 869 print*,'PBL SURFACE AVEC GUSTINESS' 841 870 first_call=.FALSE. … … 843 872 ! Initialize ok_flux_surf (for 1D model) 844 873 if (klon_glo>1) ok_flux_surf=.FALSE. 874 if (klon_glo>1) ok_forc_tsurf=.FALSE. 845 875 846 876 ! intialize beta_land … … 903 933 zxfluxlat(:)=0. 904 934 zt2m(:)=0. ; zq2m(:)=0. ; qsat2m(:)=0. ; rh2m(:)=0. 935 zn2mout(:,:)=0 ; 905 936 d_t(:,:)=0. ; d_t_diss(:,:)=0. ; d_q(:,:)=0. ; d_u(:,:)=0. ; d_v(:,:)=0. 906 937 zcoefh(:,:,:)=0. ; zcoefm(:,:,:)=0. … … 945 976 !! tke(:,:,is_ave)=0. 946 977 tke_x(:,:,is_ave)=0. 978 947 979 wake_dltke(:,:,is_ave)=0. 948 980 !>jyg … … 955 987 !!! jyg le 10/02/2012 956 988 rh2m_x(:) = 0. ; qsat2m_x(:) = 0. ; rh2m_w(:) = 0. ; qsat2m_w(:) = 0. 957 !!!958 989 959 990 ! 2b) Initialization of all local variables that will be compressed later … … 965 996 yqsurf = 0.0 ; yalb = 0.0 ; yalb_vis = 0.0 966 997 !albedo SB <<< 967 yrain_f = 0.0 ; ysnow_f = 0.0 ; yfder = 0.0 ; ysolsw = 0.0 998 yrain_f = 0.0 ; ysnow_f = 0.0 ; yfder = 0.0 ; ysolsw = 0.0 968 999 ysollw = 0.0 ; yz0m = 0.0 ; yz0h = 0.0 ; yu1 = 0.0 969 1000 yv1 = 0.0 ; ypaprs = 0.0 ; ypplay = 0.0 … … 976 1007 !! d_t_diss= 0.0 ;d_u = 0.0 ; d_v = 0.0 977 1008 yqsol = 0.0 978 ytherm = 0.0 ; ytke=0. 1009 1010 ytke=0. 979 1011 !FC 980 1012 y_treedrg=0. … … 1183 1215 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1184 1216 1217 !--OB this line is not satisfactory because alb is the direct albedo not total albedo 1185 1218 solsw(i,nsrf) = solsw_m(i) * (1.-alb(i,nsrf)) / (1.-alb_m(i)) 1186 1219 ENDDO … … 1205 1238 !>al1 1206 1239 1240 !--OB add diffuse fraction of SW down 1241 DO n=1,nbcf_out 1242 IF (cfname_out(n) == "swdownfdiff" ) fields_out(:,n) = solswfdiff_m(:) 1243 ENDDO 1207 1244 ! >> PC 1208 1245 IF (carbon_cycle_cpl .AND. carbon_cycle_tr .AND. nbcf_out.GT.0 ) THEN … … 1381 1418 ytke_w(j,k) = tke_x(i,k,nsrf)+wake_dltke(i,k,nsrf) 1382 1419 ywake_dltke(j,k) = wake_dltke(i,k,nsrf) 1420 1383 1421 !>jyg 1384 1422 ENDDO … … 1415 1453 ENDDO 1416 1454 ENDIF 1455 1456 if (nsrf == is_oce .and. activate_ocean_skin >= 1) then 1457 if (activate_ocean_skin == 2 .and. type_ocean == "couple") then 1458 ydelta_sal(:knon) = delta_sal(ni(:knon)) 1459 ydelta_sst(:knon) = delta_sst(ni(:knon)) 1460 end if 1461 1462 yds_ns(:knon) = ds_ns(ni(:knon)) 1463 ydt_ns(:knon) = dt_ns(ni(:knon)) 1464 end if 1417 1465 1418 1466 !**************************************************************************************** … … 1455 1503 ENDDO 1456 1504 ENDIF 1505 1457 1506 IF (prt_level >=10) print *,'clcdrag -> ycdragh ', ycdragh 1458 1507 ELSE !(iflag_split .eq.0) … … 1538 1587 print *,' args coef_diff_turb: ycdragh ', ycdragh 1539 1588 print *,' args coef_diff_turb: ytke ', ytke 1589 1540 1590 ENDIF 1541 1591 CALL coef_diff_turb(dtime, nsrf, knon, ni, & … … 1567 1617 print *,' args coef_diff_turb: ycdragh_x ', ycdragh_x 1568 1618 print *,' args coef_diff_turb: ytke_x ', ytke_x 1619 1569 1620 ENDIF 1570 1621 CALL coef_diff_turb(dtime, nsrf, knon, ni, & … … 1821 1872 1822 1873 ! Calculate the temperature et relative humidity at 2m and the wind at 10m 1874 IF (iflag_new_t2mq2m==1) THEN 1875 CALL stdlevvarn(klon, knon, is_ter, zxli, & 1876 yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, & 1877 yts, yqsurf, yz0m, yz0h, ypaprs(:,1), ypplay(:,1), & 1878 yt2m, yq2m, yt10m, yq10m, yu10m, yustar, & 1879 yn2mout(:, nsrf, :)) 1880 ELSE 1823 1881 CALL stdlevvar(klon, knon, is_ter, zxli, & 1824 1882 yu(:,1), yv(:,1), yt(:,1), yq(:,1), zgeo1, & 1825 1883 yts, yqsurf, yz0m, yz0h, ypaprs(:,1), ypplay(:,1), & 1826 1884 yt2m, yq2m, yt10m, yq10m, yu10m, yustar) 1885 ENDIF 1827 1886 1828 1887 ENDIF … … 1935 1994 yz0m, yz0h, SFRWL,yalb_dir_new, yalb_dif_new, yevap, yfluxsens,yfluxlat,& 1936 1995 ytsurf_new, y_dflux_t, y_dflux_q, slab_wfbils, & 1937 y_flux_u1, y_flux_v1) 1996 y_flux_u1, y_flux_v1, ydelta_sst(:knon), ydelta_sal(:knon), & 1997 yds_ns(:knon), ydt_ns(:knon), ydter(:knon), ydser(:knon), & 1998 ytkt(:knon), ytks(:knon), ytaur(:knon), ysss) 1938 1999 IF (prt_level >=10) THEN 1939 2000 print *,'arg de surf_ocean: ycdragh ',ycdragh … … 2013 2074 ! 2014 2075 !**************************************************************************************** 2015 2016 !!! 2017 !!! jyg le 10/04/2013 2076 !! 2077 !!! 2078 !!! jyg le 10/04/2013 et EV 10/2020 2079 2080 IF (ok_forc_tsurf) THEN 2081 DO j=1,knon 2082 ytsurf_new(j)=tg 2083 y_d_ts(j) = ytsurf_new(j) - yts(j) 2084 ENDDO 2085 ENDIF ! ok_forc_tsurf 2086 2018 2087 !!! 2019 2088 IF (ok_flux_surf) THEN … … 2444 2513 tke_x(i,k,nsrf) = ytke(j,k) 2445 2514 tke_x(i,k,is_ave) = tke_x(i,k,is_ave) + ytke(j,k)*ypct(j) 2515 2446 2516 !>jyg 2447 2517 ENDDO … … 2457 2527 !! tke(i,k,is_ave) = tke(i,k,is_ave) + tke(i,k,nsrf)*ypct(j) 2458 2528 tke_x(i,k,nsrf) = ytke_x(j,k) 2459 tke_x(i,k,is_ave) = tke_x(i,k,is_ave) + tke_x(i,k,nsrf)*ypct(j) 2529 tke_x(i,k,is_ave) = tke_x(i,k,is_ave) + tke_x(i,k,nsrf)*ypct(j) 2460 2530 wake_dltke(i,k,is_ave) = wake_dltke(i,k,is_ave) + wake_dltke(i,k,nsrf)*ypct(j) 2531 2461 2532 2462 2533 !>jyg … … 2538 2609 d_t_w(:,1), d_t_x(:,1), d_t(:,1) 2539 2610 ENDIF 2611 2612 if (nsrf == is_oce .and. activate_ocean_skin >= 1) then 2613 delta_sal = missing_val 2614 ds_ns = missing_val 2615 dt_ns = missing_val 2616 delta_sst = missing_val 2617 dter = missing_val 2618 dser = missing_val 2619 tkt = missing_val 2620 tks = missing_val 2621 taur = missing_val 2622 sss = missing_val 2623 2624 delta_sal(ni(:knon)) = ydelta_sal(:knon) 2625 ds_ns(ni(:knon)) = yds_ns(:knon) 2626 dt_ns(ni(:knon)) = ydt_ns(:knon) 2627 delta_sst(ni(:knon)) = ydelta_sst(:knon) 2628 dter(ni(:knon)) = ydter(:knon) 2629 dser(ni(:knon)) = ydser(:knon) 2630 tkt(ni(:knon)) = ytkt(:knon) 2631 tks(ni(:knon)) = ytks(:knon) 2632 taur(ni(:knon)) = ytaur(:knon) 2633 sss(ni(:knon)) = ysss(:knon) 2634 end if 2540 2635 2541 2636 !**************************************************************************************** … … 2614 2709 !!! jyg le 07/02/2012 2615 2710 IF (iflag_split .eq.0) THEN 2711 IF (iflag_new_t2mq2m==1) THEN 2712 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2713 uzon, vmer, tair1, qair1, zgeo1, & 2714 tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2715 yt2m, yq2m, yt10m, yq10m, yu10m, yustar, & 2716 yn2mout(:, nsrf, :)) 2717 ELSE 2616 2718 CALL stdlevvar(klon, knon, nsrf, zxli, & 2617 2719 uzon, vmer, tair1, qair1, zgeo1, & 2618 2720 tairsol, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2619 2721 yt2m, yq2m, yt10m, yq10m, yu10m, yustar) 2722 ENDIF 2620 2723 ELSE !(iflag_split .eq.0) 2724 IF (iflag_new_t2mq2m==1) THEN 2725 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2726 uzon_x, vmer_x, tair1_x, qair1_x, zgeo1_x, & 2727 tairsol_x, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2728 yt2m_x, yq2m_x, yt10m_x, yq10m_x, yu10m_x, yustar_x, & 2729 yn2mout_x(:, nsrf, :)) 2730 CALL stdlevvarn(klon, knon, nsrf, zxli, & 2731 uzon_w, vmer_w, tair1_w, qair1_w, zgeo1_w, & 2732 tairsol_w, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2733 yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yustar_w, & 2734 yn2mout_w(:, nsrf, :)) 2735 ELSE 2621 2736 CALL stdlevvar(klon, knon, nsrf, zxli, & 2622 2737 uzon_x, vmer_x, tair1_x, qair1_x, zgeo1_x, & … … 2627 2742 tairsol_w, qairsol, yz0m, yz0h_oupas, psfce, patm, & 2628 2743 yt2m_w, yq2m_w, yt10m_w, yq10m_w, yu10m_w, yustar_w) 2744 ENDIF 2629 2745 !!! 2630 2746 ENDIF ! (iflag_split .eq.0) … … 2640 2756 u10m(i,nsrf)=(yu10m(j) * uzon(j))/SQRT(uzon(j)**2+vmer(j)**2) 2641 2757 v10m(i,nsrf)=(yu10m(j) * vmer(j))/SQRT(uzon(j)**2+vmer(j)**2) 2758 ! 2759 DO k = 1, 6 2760 n2mout(i,nsrf,k) = yn2mout(j,nsrf,k) 2761 END DO 2762 ! 2642 2763 ENDDO 2643 2764 ELSE !(iflag_split .eq.0) … … 2650 2771 u10m_x(i,nsrf)=(yu10m_x(j) * uzon_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 2651 2772 v10m_x(i,nsrf)=(yu10m_x(j) * vmer_x(j))/SQRT(uzon_x(j)**2+vmer_x(j)**2) 2773 ! 2774 DO k = 1, 6 2775 n2mout_x(i,nsrf,k) = yn2mout_x(j,nsrf,k) 2776 END DO 2777 ! 2652 2778 ENDDO 2653 2779 DO j=1, knon … … 2663 2789 u10m(i,nsrf) = u10m_x(i,nsrf) + wake_s(i)*(u10m_w(i,nsrf)-u10m_x(i,nsrf)) 2664 2790 v10m(i,nsrf) = v10m_x(i,nsrf) + wake_s(i)*(v10m_w(i,nsrf)-v10m_x(i,nsrf)) 2791 ! 2792 DO k = 1, 6 2793 n2mout_w(i,nsrf,k) = yn2mout_w(j,nsrf,k) 2794 END DO 2795 ! 2665 2796 ENDDO 2666 2797 !!! … … 2919 3050 ! 2920 3051 zxtsol(:) = 0.0 ; zxfluxlat(:) = 0.0 2921 zt2m(:) = 0.0 ; zq2m(:) = 0.0 3052 zt2m(:) = 0.0 ; zq2m(:) = 0.0 ; zn2mout(:,:) = 0 2922 3053 zustar(:)=0.0 ; zu10m(:) = 0.0 ; zv10m(:) = 0.0 2923 3054 s_pblh(:) = 0.0 ; s_plcl(:) = 0.0 … … 2972 3103 zt2m(i) = zt2m(i) + t2m(i,nsrf) * pctsrf(i,nsrf) 2973 3104 zq2m(i) = zq2m(i) + q2m(i,nsrf) * pctsrf(i,nsrf) 3105 ! 3106 DO k = 1, 6 3107 zn2mout(i,k) = zn2mout(i,k) + n2mout(i,nsrf,k) * pctsrf(i,nsrf) 3108 ENDDO 3109 ! 2974 3110 zustar(i) = zustar(i) + ustar(i,nsrf) * pctsrf(i,nsrf) 2975 3111 wstar(i,is_ave)=wstar(i,is_ave)+wstar(i,nsrf)*pctsrf(i,nsrf) … … 3003 3139 zt2m(i) = zt2m(i) + (t2m_x(i,nsrf)+wake_s(i)*(t2m_w(i,nsrf)-t2m_x(i,nsrf))) * pctsrf(i,nsrf) 3004 3140 zq2m(i) = zq2m(i) + q2m_x(i,nsrf) * pctsrf(i,nsrf) 3141 ! 3142 DO k = 1, 6 3143 zn2mout(i,k) = zn2mout(i,k) + n2mout_x(i,nsrf,k) * pctsrf(i,nsrf) 3144 ENDDO 3145 ! 3005 3146 zustar(i) = zustar(i) + ustar_x(i,nsrf) * pctsrf(i,nsrf) 3006 3147 wstar(i,is_ave)=wstar(i,is_ave)+wstar_x(i,nsrf)*pctsrf(i,nsrf) … … 3081 3222 DO nsrf = 1, nbsrf 3082 3223 DO i = 1, klon 3083 zxqsurf(i) = zxqsurf(i) + qsurf(i,nsrf) * pctsrf(i,nsrf)3224 zxqsurf(i) = zxqsurf(i) + MAX(qsurf(i,nsrf),0.0) * pctsrf(i,nsrf) 3084 3225 zxsnow(i) = zxsnow(i) + snow(i,nsrf) * pctsrf(i,nsrf) 3085 3226 ENDDO … … 3142 3283 3143 3284 !albedo SB >>> 3144 SUBROUTINE pbl_surface_newfrac(itime, pctsrf_new, pctsrf_old, &3145 evap, z0m, z0h, agesno, &3146 tsurf,alb_dir,alb_dif, ustar, u10m, v10m, tke)3147 !albedo SB <<<3285 SUBROUTINE pbl_surface_newfrac(itime, pctsrf_new, pctsrf_old, & 3286 evap, z0m, z0h, agesno, & 3287 tsurf,alb_dir,alb_dif, ustar, u10m, v10m, tke) 3288 !albedo SB <<< 3148 3289 ! Give default values where new fraction has appread 3149 3290 3150 3291 USE indice_sol_mod 3292 use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst 3293 use config_ocean_skin_m, only: activate_ocean_skin 3151 3294 3152 3295 INCLUDE "dimsoil.h" … … 3235 3378 alb_dif(i,k,nsrf) = 0.06 3236 3379 ENDDO 3380 if (activate_ocean_skin >= 1) then 3381 if (activate_ocean_skin == 2 & 3382 .and. type_ocean == "couple") then 3383 delta_sal(i) = 0. 3384 delta_sst(i) = 0. 3385 end if 3386 3387 ds_ns(i) = 0. 3388 dt_ns(i) = 0. 3389 end if 3237 3390 ELSE IF (nsrf.EQ.is_sic) THEN 3238 3391 tsurf(i,nsrf) = 271.35 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phyetat0.F90
r3581 r3851 15 15 ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, radpas, radsol, rain_fall, ratqs, & 16 16 rnebcon, rugoro, sig1, snow_fall, solaire_etat0, sollw, sollwdown, & 17 solsw, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, &17 solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, & 18 18 wake_deltat, wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, & 19 19 wake_s, wake_dens, zgam, zmax0, zmea, zpic, zsig, & 20 20 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl, u10m, v10m, treedrg, & 21 ale_wake, ale_bl_stat 21 ale_wake, ale_bl_stat, ds_ns, dt_ns, delta_sst, delta_sal 22 22 !FC 23 23 USE geometry_mod, ONLY : longitude_deg, latitude_deg … … 29 29 USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init 30 30 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 31 #ifdef CPP_XIOS 32 USE wxios, ONLY: missing_val 33 #else 34 use netcdf, only: missing_val => nf90_fill_real 35 #endif 36 use config_ocean_skin_m, only: activate_ocean_skin 31 37 32 38 IMPLICIT none … … 35 41 ! Objet: Lecture de l'etat initial pour la physique 36 42 !====================================================================== 37 include "netcdf.inc"38 43 include "dimsoil.h" 39 44 include "clesphys.h" … … 307 312 308 313 found=phyetat0_get(1,solsw,"solsw","net SW radiation surf",0.) 314 found=phyetat0_get(1,solswfdiff,"solswfdiff","fraction of SW radiation surf that is diffuse",1.) 309 315 found=phyetat0_get(1,sollw,"sollw","net LW radiation surf",0.) 310 316 found=phyetat0_get(1,sollwdown,"sollwdown","down LW radiation surf",0.) 311 317 IF (.NOT. found) THEN 312 sollwdown = 0. ; zts=0.313 donsrf=1,nbsrf318 sollwdown(:) = 0. ; zts(:)=0. 319 DO nsrf=1,nbsrf 314 320 zts(:)=zts(:)+ftsol(:,nsrf)*pctsrf(:,nsrf) 315 enddo321 ENDDO 316 322 sollwdown(:)=sollw(:)+RSIGMA*zts(:)**4 317 323 ENDIF … … 518 524 ENDIF ! Slab 519 525 526 if (activate_ocean_skin >= 1) then 527 if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then 528 found = phyetat0_get(1, delta_sal, "delta_sal", & 529 "ocean-air interface salinity minus bulk salinity", 0.) 530 found = phyetat0_get(1, delta_sst, "delta_SST", & 531 "ocean-air interface temperature minus bulk SST", 0.) 532 end if 533 534 found = phyetat0_get(1, ds_ns, "dS_ns", "delta salinity near surface", 0.) 535 found = phyetat0_get(1, dt_ns, "dT_ns", "delta temperature near surface", & 536 0.) 537 538 where (pctsrf(:, is_oce) == 0.) 539 ds_ns = missing_val 540 dt_ns = missing_val 541 delta_sst = missing_val 542 delta_sal = missing_val 543 end where 544 end if 545 520 546 ! on ferme le fichier 521 547 CALL close_startphy -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phyredem.F90
r3506 r3851 26 26 detr_therm, ale_bl, ale_bl_trig, alp_bl, & 27 27 ale_wake, ale_bl_stat, & 28 du_gwd_rando, du_gwd_front, u10m, v10m, & 29 treedrg 28 du_gwd_rando, du_gwd_front, u10m, v10m, & 29 treedrg, solswfdiff, delta_sal, ds_ns, dt_ns, & 30 delta_sst 31 30 32 USE geometry_mod, ONLY : longitude_deg, latitude_deg 31 33 USE iostart, ONLY: open_restartphy, close_restartphy, enddef_restartphy, put_field, put_var … … 37 39 USE ocean_slab_mod, ONLY : nslay, tslab, seaice, tice, fsic 38 40 USE time_phylmdz_mod, ONLY: annee_ref, day_end, itau_phy, pdtphys 41 use config_ocean_skin_m, only: activate_ocean_skin 39 42 40 43 IMPLICIT none … … 184 187 185 188 CALL put_field(pass,"solsw", "Rayonnement solaire a la surface", solsw) 189 190 CALL put_field(pass,"solswfdiff", "Fraction du rayonnement solaire a la surface qui est diffus", solswfdiff) 186 191 187 192 CALL put_field(pass,"sollw", "Rayonnement IF a la surface", sollw) … … 340 345 "tendency on zonal wind due to acama gravity waves", du_gwd_front) 341 346 347 if (activate_ocean_skin >= 1) then 348 if (activate_ocean_skin == 2 .and. type_ocean == 'couple') then 349 CALL put_field(pass, "delta_sal", & 350 "ocean-air interface salinity minus bulk salinity", delta_sal) 351 CALL put_field(pass, "delta_SST", & 352 "ocean-air interface temperature minus bulk SST", delta_sst) 353 end if 354 355 CALL put_field(pass, "dS_ns", "delta salinity near surface", ds_ns) 356 CALL put_field(pass, "dT_ns", "delta temperature near surface", dT_ns) 357 end if 358 342 359 IF (pass==1) CALL enddef_restartphy 343 360 IF (pass==2) CALL close_restartphy 344 361 ENDDO 345 362 346 363 !$OMP BARRIER -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_local_var_mod.F90
r3662 r3851 16 16 REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:) 17 17 !$OMP THREADPRIVATE(u_seri, v_seri) 18 REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:), l_mix(:,:,:) 19 !$OMP THREADPRIVATE(l_mixmin, l_mix) 20 18 REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:), l_mix(:,:,:), tke_dissip(:,:,:) 19 !$OMP THREADPRIVATE(l_mixmin, l_mix, tke_dissip) 21 20 REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:) 22 21 !$OMP THREADPRIVATE(tr_seri) … … 301 300 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m 302 301 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m ) 303 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldhjn, cldljn, cldmjn,cldtjn 304 !$OMP THREADPRIVATE(cldhjn, cldljn, cldmjn, cldtjn) 302 !AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics 305 303 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt 306 304 !$OMP THREADPRIVATE(JrNt) … … 380 378 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon 381 379 !$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon) 382 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zq2m_cor, zt2m_cor383 !$OMP THREADPRIVATE(zq2m_cor, zt2m_cor)384 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zu10m_cor, zv10m_cor385 !$OMP THREADPRIVATE(zu10m_cor, zv10m_cor)386 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zrh2m_cor, zqsat2m_cor387 !$OMP THREADPRIVATE(zrh2m_cor, zqsat2m_cor)388 380 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion 389 381 !$OMP THREADPRIVATE(weak_inversion) … … 446 438 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi 447 439 !$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi) 448 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh 449 !$OMP THREADPRIVATE(zx_rh )440 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh, zx_rhl, zx_rhi 441 !$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi) 450 442 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca 451 443 !$OMP THREADPRIVATE(prfl, psfl, fraca) … … 475 467 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause 476 468 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause) 469 470 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout 471 !$OMP THREADPRIVATE(zn2mout) 477 472 478 473 #ifdef CPP_StratAer … … 562 557 ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev)) 563 558 ALLOCATE(u_seri(klon,klev),v_seri(klon,klev)) 564 ALLOCATE(l_mixmin(klon,klev+1,nbsrf), l_mix(klon,klev+1,nbsrf) )565 l_mix(:,:,:)=0. ; l_mixmin(:,:,:)=0. ! doit etre initialse car pas toujours remplis559 ALLOCATE(l_mixmin(klon,klev+1,nbsrf), l_mix(klon,klev+1,nbsrf), tke_dissip(klon,klev+1,nbsrf)) 560 l_mix(:,:,:)=0. ; l_mixmin(:,:,:)=0. ; tke_dissip(:,:,:)=0. ! doit etre initialse car pas toujours remplis 566 561 567 562 ALLOCATE(tr_seri(klon,klev,nbtr)) … … 716 711 ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon)) 717 712 ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon)) 718 ALLOCATE(cldhjn(klon), cldljn(klon), cldmjn(klon), cldtjn(klon))719 713 ALLOCATE(JrNt(klon)) 720 714 ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon)) … … 760 754 ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon)) 761 755 ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon)) 762 ALLOCATE(zq2m_cor(klon), zt2m_cor(klon), zu10m_cor(klon), zv10m_cor(klon))763 ALLOCATE(zrh2m_cor(klon), zqsat2m_cor(klon))764 756 ALLOCATE(sens(klon), flwp(klon), fiwp(klon)) 765 757 ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon)) … … 782 774 ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev)) 783 775 ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev)) 784 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev) )776 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon,klev), zx_rhi(klon,klev)) 785 777 ALLOCATE(pmfd(klon, klev), pmfu(klon, klev)) 786 778 … … 831 823 ALLOCATE (z_tropopause(klon)) 832 824 ALLOCATE (t_tropopause(klon)) 825 826 ALLOCATE(zn2mout(klon,6)) 833 827 834 828 #ifdef CPP_StratAer … … 881 875 DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri) 882 876 DEALLOCATE(u_seri,v_seri) 883 DEALLOCATE(l_mixmin,l_mix )877 DEALLOCATE(l_mixmin,l_mix, tke_dissip) 884 878 885 879 DEALLOCATE(tr_seri) … … 1017 1011 DEALLOCATE(cdragm, cdragh, cldh, cldl) 1018 1012 DEALLOCATE(cldm, cldq, cldt, qsat2m) 1019 DEALLOCATE( cldljn, cldmjn, cldhjn, cldtjn,JrNt)1013 DEALLOCATE(JrNt) 1020 1014 DEALLOCATE(dthmin, evap, fder, plcl, plfc) 1021 1015 DEALLOCATE(prw, prlw, prsw, zustar, zu10m, zv10m, rh2m, s_lcl) … … 1057 1051 DEALLOCATE(zt2m_min_mon, zt2m_max_mon) 1058 1052 DEALLOCATE(t2m_min_mon, t2m_max_mon) 1059 DEALLOCATE(zq2m_cor, zt2m_cor, zu10m_cor, zv10m_cor)1060 DEALLOCATE(zrh2m_cor, zqsat2m_cor)1061 1053 DEALLOCATE(sens, flwp, fiwp) 1062 1054 DEALLOCATE(alp_bl_conv,alp_bl_det) … … 1076 1068 DEALLOCATE(ref_liq, ref_ice, theta) 1077 1069 DEALLOCATE(ref_liq_pi, ref_ice_pi) 1078 DEALLOCATE(zphi, zx_rh )1070 DEALLOCATE(zphi, zx_rh, zx_rhl, zx_rhi) 1079 1071 DEALLOCATE(pmfd, pmfu) 1080 1072 … … 1119 1111 DEALLOCATE (z_tropopause) 1120 1112 DEALLOCATE (t_tropopause) 1113 DEALLOCATE(zn2mout) 1121 1114 1122 1115 #ifdef CPP_StratAer -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_output_ctrlout_mod.F90
r3702 r3851 271 271 ctrl_out((/ 10, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 272 272 't2m_sic', "Temp 2m "//clnsurf(4), "K", (/ ('', i=1, 10) /)) /) 273 274 TYPE(ctrl_out), SAVE :: o_nt2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 275 'nt2mout', 'Nbt2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 276 TYPE(ctrl_out), SAVE :: o_nq2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 277 'nq2mout', 'Nbq2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 278 TYPE(ctrl_out), SAVE :: o_nu2mout = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 279 'nu2mout', 'Nbu2m out of range complete computation', '-', (/ ('', i=1, 10) /)) 280 281 TYPE(ctrl_out), SAVE :: o_nt2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 282 'nt2moutfg', 'Nbt2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 283 TYPE(ctrl_out), SAVE :: o_nq2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 284 'nq2moutfg', 'Nbq2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 285 TYPE(ctrl_out), SAVE :: o_nu2moutfg = ctrl_out((/ 1, 1, 1, 5, 10, 10, 11, 11, 11, 11/), & 286 'nu2moutfg', 'Nbu2m out of range complete/fgRi1 computation', '-', (/ ('', i=1, 10) /)) 273 287 274 288 TYPE(ctrl_out), SAVE :: o_gusts = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), & … … 461 475 TYPE(ctrl_out), SAVE :: o_SWupSFCcleanclr = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 462 476 'SWupSFCcleanclr', 'SWup clear sky clean (no aerosol) at surface', 'W/m2', (/ ('', i=1, 10) /)) 463 TYPE(ctrl_out), SAVE :: o_SWdnSFC = ctrl_out((/ 1, 1, 10, 10, 5, 10, 11, 11, 11, 11/), & 477 TYPE(ctrl_out), SAVE :: o_fdiffSWdnSFC = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11/), & 478 'fdiffSWdnSFC', 'Fraction of diffuse SWdn at surface', 'W/m2', (/ ('', i=1, 10) /)) 479 TYPE(ctrl_out), SAVE :: o_SWdnSFC = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11, 11/), & 464 480 'SWdnSFC', 'SWdn at surface', 'W/m2', (/ ('', i=1, 10) /)) 465 481 TYPE(ctrl_out), SAVE :: o_SWdnSFCclr = ctrl_out((/ 1, 4, 10, 10, 5, 10, 11, 11, 11, 11/), & … … 694 710 'iwp', 'Cloud ice water path', 'kg/m2', (/ ('', i=1, 10) /)) 695 711 TYPE(ctrl_out), SAVE :: o_ue = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 696 'ue', 'Zonal dry static energy transport', ' -', (/ ('', i=1, 10) /))712 'ue', 'Zonal dry static energy transport', 'J/m/s', (/ ('', i=1, 10) /)) 697 713 TYPE(ctrl_out), SAVE :: o_ve = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 698 've', 'Merid dry static energy transport', ' -', (/ ('', i=1, 10) /))714 've', 'Merid dry static energy transport', 'J/m/s', (/ ('', i=1, 10) /)) 699 715 TYPE(ctrl_out), SAVE :: o_uq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 700 'uq', 'Zonal humidity transport', ' -', (/ ('', i=1, 10) /))716 'uq', 'Zonal humidity transport', 'kg/m/s', (/ ('', i=1, 10) /)) 701 717 TYPE(ctrl_out), SAVE :: o_vq = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 702 'vq', 'Merid humidity transport', ' -', (/ ('', i=1, 10) /))718 'vq', 'Merid humidity transport', 'kg/m/s', (/ ('', i=1, 10) /)) 703 719 TYPE(ctrl_out), SAVE :: o_uwat = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 704 'uwat', 'Zonal total water transport', ' -', (/ ('', i=1, 10) /))720 'uwat', 'Zonal total water transport', 'kg/m/s', (/ ('', i=1, 10) /)) 705 721 TYPE(ctrl_out), SAVE :: o_vwat = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 706 'vwat', 'Merid total water transport', ' -', (/ ('', i=1, 10) /))722 'vwat', 'Merid total water transport', 'kg/m/s', (/ ('', i=1, 10) /)) 707 723 TYPE(ctrl_out), SAVE :: o_cape = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 708 724 'cape', 'Conv avlbl pot ener', 'J/kg', (/ ('', i=1, 10) /)) … … 1003 1019 TYPE(ctrl_out), SAVE :: o_tke = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1004 1020 'tke ', 'TKE', 'm2/s2', (/ ('', i=1, 10) /)) 1021 TYPE(ctrl_out), SAVE :: o_tke_dissip = ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1022 'tke_dissip ', 'TKE DISSIPATION', 'm2/s3', (/ ('', i=1, 10) /)) 1005 1023 TYPE(ctrl_out), SAVE :: o_tke_max = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1006 1024 'tke_max', 'TKE max', 'm2/s2', & 1007 1025 (/ 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', & 1008 1026 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)', 't_max(X)' /)) 1009 1010 1027 TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tke_srf = (/ & 1011 1028 ctrl_out((/ 10, 4, 10, 10, 10, 10, 11, 11, 11, 11/),'tke_ter', & … … 1048 1065 ctrl_out((/ 10, 10, 10, 10, 10, 10, 11, 11, 11, 11/),'l_mix_sic', & 1049 1066 "min PBL mixing length "//clnsurf(4),"m", (/ ('', i=1, 10) /)) /) 1067 1050 1068 1051 1069 TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_tke_max_srf = (/ & … … 1432 1450 TYPE(ctrl_out), SAVE :: o_rhum = ctrl_out((/ 2, 5, 10, 10, 10, 10, 11, 11, 11, 11/), & 1433 1451 'rhum', 'Relative humidity', '-', (/ ('', i=1, 10) /)) 1452 TYPE(ctrl_out), SAVE :: o_rhl = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1453 'rhl', 'Relative humidity wrt liquid', '%', (/ ('', i=1, 10) /)) 1454 TYPE(ctrl_out), SAVE :: o_rhi = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11, 11/), & 1455 'rhi', 'Relative humidity wrt ice', '%', (/ ('', i=1, 10) /)) 1434 1456 TYPE(ctrl_out), SAVE :: o_ozone = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11, 11/), & 1435 1457 'ozone', 'Ozone mole fraction', '-', (/ ('', i=1, 10) /)) … … 1946 1968 #endif 1947 1969 1970 type(ctrl_out), save:: o_delta_sst & 1971 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_SST', & 1972 "ocean-air interface temperature minus bulk SST", "K", '') 1973 1974 type(ctrl_out), save:: o_delta_sal & 1975 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'delta_sal', & 1976 "ocean-air interface salinity minus bulk salinity", "ppt", '') 1977 1978 type(ctrl_out), save:: o_ds_ns & 1979 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dS_ns', & 1980 "subskin salinity minus foundation salinity", "ppt", '') 1981 1982 type(ctrl_out), save:: o_dt_ns & 1983 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dT_ns', & 1984 "subskin temperature minus foundation temperature", "K", '') 1985 1986 type(ctrl_out), save:: o_dter & 1987 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dTer', & 1988 "ocean-air interface temperature minus sub-skin temperature", "K", '') 1989 1990 type(ctrl_out), save:: o_dser & 1991 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'dSer', & 1992 "ocean-air interface salinity minus sub-skin salinity", "ppt", '') 1993 1994 type(ctrl_out), save:: o_tkt & 1995 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'tkt', & 1996 "thickness of thermal microlayer", "m", '') 1997 1998 type(ctrl_out), save:: o_tks & 1999 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'tks', & 2000 "thickness of salinity microlayer", "m", '') 2001 2002 type(ctrl_out), save:: o_taur & 2003 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'taur', & 2004 "momentum flux due to rain", "Pa", '') 2005 2006 type(ctrl_out), save:: o_sss & 2007 = ctrl_out([1, 10, 10, 1, 10, 10, 11, 11, 11, 11], 'SSS', & 2008 "bulk sea-surface salinity", "ppt", '') 2009 1948 2010 END MODULE phys_output_ctrlout_mod -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_output_mod.F90
r3666 r3851 40 40 USE mod_phys_lmdz_para 41 41 !Martin 42 USE surface_data, ONLY : ok_snow42 USE surface_data, ONLY : landice_opt 43 43 USE phys_output_ctrlout_mod 44 44 USE mod_grid_phy_lmdz, only: klon_glo,nbp_lon,nbp_lat -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_output_var_mod.F90
r3149 r3851 133 133 !$OMP THREADPRIVATE(sens_prec_liq_o, sens_prec_sol_o,lat_prec_liq_o,lat_prec_sol_o) 134 134 135 ! Ocean-atmosphere interface, subskin ocean and near-surface ocean: 136 137 REAL, ALLOCATABLE, SAVE:: dter(:) 138 ! Temperature variation in the diffusive microlayer, that is 139 ! ocean-air interface temperature minus subskin temperature. In K. 140 141 REAL, SAVE, ALLOCATABLE:: dser(:) 142 ! Temperature variation in the diffusive microlayer, that is 143 ! subskin temperature minus ocean-air interface temperature. In K. 144 145 REAL, SAVE, ALLOCATABLE:: tkt(:) 146 ! épaisseur (m) de la couche de diffusion thermique (microlayer) 147 ! cool skin thickness 148 149 REAL, SAVE, ALLOCATABLE:: tks(:) 150 ! épaisseur (m) de la couche de diffusion de masse (microlayer) 151 152 REAL, SAVE, ALLOCATABLE:: taur(:) ! momentum flux due to rain, in Pa 153 154 REAL, SAVE, ALLOCATABLE:: sss(:) 155 ! bulk salinity of the surface layer of the ocean, in ppt 156 157 !$OMP THREADPRIVATE(dter, dser, tkt, tks, taur, sss) 158 135 159 CONTAINS 136 160 … … 138 162 SUBROUTINE phys_output_var_init 139 163 use dimphy 164 use config_ocean_skin_m, only: activate_ocean_skin 140 165 141 166 IMPLICIT NONE … … 191 216 IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon)) 192 217 218 if (activate_ocean_skin >= 1) allocate(dter(klon), dser(klon), tkt(klon), & 219 tks(klon), taur(klon), sss(klon)) 220 193 221 END SUBROUTINE phys_output_var_init 194 222 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_output_write_mod.F90
r3702 r3851 38 38 o_t2m, o_t2m_min, o_t2m_max, & 39 39 o_t2m_min_mon, o_t2m_max_mon, & 40 o_nt2mout, o_nt2moutfg, & 41 o_nq2mout, o_nq2moutfg, & 42 o_nu2mout, o_nu2moutfg, & 40 43 o_q2m, o_ustar, o_u10m, o_v10m, & 41 44 o_wind10m, o_wind10max, o_wind100m, o_gusts, o_sicf, & … … 45 48 o_snow, o_msnow, o_fsnow, o_evap, o_ep,o_epmax_diag, & ! epmax_cape 46 49 o_tops, o_tops0, o_topl, o_topl0, & 47 o_SWupTOA, o_SWupTOAclr, o_SWupTOAcleanclr, o_SWdnTOA, &50 o_SWupTOA, o_SWupTOAclr, o_SWupTOAcleanclr, o_SWdnTOA, o_fdiffSWdnSFC, & 48 51 o_SWdnTOAclr, o_nettop, o_SWup200, & 49 52 o_SWup200clr, o_SWdn200, o_SWdn200clr, & … … 133 136 o_vitu, o_vitv, o_vitw, o_pres, o_paprs, & 134 137 o_zfull, o_zhalf, o_rneb, o_rnebjn, o_rnebcon, & 135 o_rnebls, o_rneblsvol, o_rhum, o_ ozone, o_ozone_light, &138 o_rnebls, o_rneblsvol, o_rhum, o_rhl, o_rhi, o_ozone, o_ozone_light, & 136 139 o_duphy, o_dtphy, o_dqphy, o_dqphy2d, o_dqlphy, o_dqlphy2d, & 137 140 o_dqsphy, o_dqsphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, & 138 o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, &141 o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, o_tke_dissip, & 139 142 o_tke_max, o_kz, o_kz_max, o_clwcon, & 140 143 o_dtdyn, o_dqdyn, o_dqdyn2d, o_dqldyn, o_dqldyn2d, & … … 199 202 o_col_O3_strato, o_col_O3_tropo, & 200 203 !--interactive CO2 201 o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb 202 204 o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, & 205 o_delta_sst, o_delta_sal, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, & 206 o_tks, o_taur, o_sss 203 207 204 208 #ifdef CPP_StratAer … … 223 227 qsol, z0m, z0h, fevap, agesno, & 224 228 nday_rain, rain_con, snow_con, & 225 topsw, toplw, toplw0, swup, swdn, &229 topsw, toplw, toplw0, swup, swdn, solswfdiff, & 226 230 topsw0, swupc0, swdnc0, swup0, swdn0, SWup200, SWup200clr, & 227 231 SWdn200, SWdn200clr, LWup200, LWup200clr, & … … 245 249 T2sumSTD, nlevSTD, du_gwd_rando, du_gwd_front, & 246 250 ulevSTD, vlevSTD, wlevSTD, philevSTD, qlevSTD, tlevSTD, & 247 rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, & 248 vphiSTD, wTSTD, u2STD, v2STD, T2STD, missing_val_nf90 251 rhlevSTD, O3STD, O3daySTD, uvSTD, vqSTD, vTSTD, wqSTD, vphiSTD, & 252 wTSTD, u2STD, v2STD, T2STD, missing_val_nf90, delta_sal, ds_ns, & 253 dt_ns, delta_sst 249 254 250 255 USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, & 251 zt2m_cor,zq2m_cor,zu10m_cor,zv10m_cor, zrh2m_cor, zqsat2m_cor, & 252 t2m_min_mon, t2m_max_mon, evap, & 253 l_mixmin,l_mix, & 256 zn2mout, t2m_min_mon, t2m_max_mon, evap, & 257 l_mixmin,l_mix, tke_dissip, & 254 258 zu10m, zv10m, zq2m, zustar, zxqsurf, & 255 259 rain_lsc, rain_num, snow_lsc, bils, sens, fder, & … … 258 262 sissnow, runoff, albsol3_lic, evap_pot, & 259 263 t2m, fluxt, fluxlat, fsollw, fsolsw, & 260 wfbils, wfbilo, wfevap, wfrain, wfsnow, & 264 wfbils, wfbilo, wfevap, wfrain, wfsnow, & 261 265 cdragm, cdragh, cldl, cldm, & 262 cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, &263 cld tjn, cldq, flwp, fiwp, ue, ve, uq, vq, &266 cldh, cldt, JrNt, & ! only output names: cldljn,cldmjn,cldhjn,cldtjn 267 cldq, flwp, fiwp, ue, ve, uq, vq, & 264 268 uwat, vwat, & 265 269 plcl, plfc, wbeff, convoccur, upwd, dnwd, dnwd0, prw, prlw, prsw, & … … 297 301 ql_seri, qs_seri, tr_seri, & 298 302 zphi, u_seri, v_seri, omega, cldfra, & 299 rneb, rnebjn, rneblsvol, zx_rh, d_t_dyn, &303 rneb, rnebjn, rneblsvol, zx_rh, zx_rhl, zx_rhi, d_t_dyn, & 300 304 d_q_dyn, d_ql_dyn, d_qs_dyn, & 301 305 d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, & … … 353 357 alt_tropo, & 354 358 !Ionela 355 ok_4xCO2atm 359 ok_4xCO2atm, dter, dser, tkt, tks, taur, sss 356 360 357 361 USE ocean_slab_mod, ONLY: nslay, tslab, slab_bilg, tice, seaice, & … … 361 365 USE infotrac_phy, ONLY: nqtot, nqo, type_trac, tname, niadv 362 366 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 363 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow367 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt 364 368 USE aero_mod, ONLY: naero_tot, id_STRAT_phy 365 369 USE ioipsl, ONLY: histend, histsync … … 380 384 #endif 381 385 USE tracinca_mod, ONLY: config_inca 386 use config_ocean_skin_m, only: activate_ocean_skin 382 387 383 388 USE vertical_layers_mod, ONLY: presnivs … … 458 463 #ifdef CPP_XIOS 459 464 CALL wxios_set_context 465 #endif 466 467 #ifndef CPP_XIOS 468 missing_val=missing_val_nf90 460 469 #endif 461 470 … … 676 685 CALL histwrite_phy(o_slp, slp) 677 686 CALL histwrite_phy(o_tsol, zxtsol) 678 CALL histwrite_phy(o_t2m, zt2m _cor)679 CALL histwrite_phy(o_t2m_min, zt2m _cor)680 CALL histwrite_phy(o_t2m_max, zt2m _cor)687 CALL histwrite_phy(o_t2m, zt2m) 688 CALL histwrite_phy(o_t2m_min, zt2m) 689 CALL histwrite_phy(o_t2m_max, zt2m) 681 690 CALL histwrite_phy(o_t2m_max_mon, t2m_max_mon) 682 691 CALL histwrite_phy(o_t2m_min_mon, t2m_min_mon) … … 684 693 IF (vars_defined) THEN 685 694 DO i=1, klon 686 zx_tmp_fi2d(i)=SQRT(zu10m_cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i)) 695 zx_tmp_fi2d(i)=real(zn2mout(i,1)) 696 ENDDO 697 ENDIF 698 CALL histwrite_phy(o_nt2mout, zx_tmp_fi2d) 699 700 IF (vars_defined) THEN 701 DO i=1, klon 702 zx_tmp_fi2d(i)=real(zn2mout(i,2)) 703 ENDDO 704 ENDIF 705 CALL histwrite_phy(o_nt2moutfg, zx_tmp_fi2d) 706 707 IF (vars_defined) THEN 708 DO i=1, klon 709 zx_tmp_fi2d(i)=real(zn2mout(i,3)) 710 ENDDO 711 ENDIF 712 CALL histwrite_phy(o_nq2mout, zx_tmp_fi2d) 713 714 IF (vars_defined) THEN 715 DO i=1, klon 716 zx_tmp_fi2d(i)=real(zn2mout(i,4)) 717 ENDDO 718 ENDIF 719 CALL histwrite_phy(o_nq2moutfg, zx_tmp_fi2d) 720 721 IF (vars_defined) THEN 722 DO i=1, klon 723 zx_tmp_fi2d(i)=real(zn2mout(i,5)) 724 ENDDO 725 ENDIF 726 CALL histwrite_phy(o_nu2mout, zx_tmp_fi2d) 727 728 IF (vars_defined) THEN 729 DO i=1, klon 730 zx_tmp_fi2d(i)=real(zn2mout(i,6)) 731 ENDDO 732 ENDIF 733 CALL histwrite_phy(o_nu2moutfg, zx_tmp_fi2d) 734 735 IF (vars_defined) THEN 736 DO i=1, klon 737 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 687 738 ENDDO 688 739 ENDIF … … 691 742 IF (vars_defined) THEN 692 743 DO i=1, klon 693 zx_tmp_fi2d(i)=SQRT(zu10m _cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i))744 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 694 745 ENDDO 695 746 ENDIF … … 699 750 700 751 IF (vars_defined) THEN 701 missing_val=missing_val_nf90702 752 DO k = 1, kmax_100m !--we could stop much lower 703 753 zrho(:) = pplay(:,k)/t_seri(:,k)/RD ! air density in kg/m3 … … 771 821 ENDIF 772 822 CALL histwrite_phy(o_sicf, zx_tmp_fi2d) 773 CALL histwrite_phy(o_q2m, zq2m_cor) 774 CALL histwrite_phy(o_ustar, zustar) 775 CALL histwrite_phy(o_u10m, zu10m_cor) 776 CALL histwrite_phy(o_v10m, zv10m_cor) 823 CALL histwrite_phy(o_q2m, zq2m) 824 IF (vars_defined) zx_tmp_fi2d = zustar 825 CALL histwrite_phy(o_ustar, zx_tmp_fi2d) 826 CALL histwrite_phy(o_u10m, zu10m) 827 CALL histwrite_phy(o_v10m, zv10m) 777 828 778 829 IF (vars_defined) THEN … … 935 986 ENDIF 936 987 CALL histwrite_phy(o_SWdnSFCcleanclr, zx_tmp_fi2d) 988 989 CALL histwrite_phy(o_fdiffSWdnSFC, solswfdiff) 937 990 938 991 IF (vars_defined) THEN … … 996 1049 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 997 1050 998 IF ( ok_snow) THEN1051 IF (landice_opt .GE. 1) THEN 999 1052 CALL histwrite_phy(o_snowsrf, snow_o) 1000 1053 CALL histwrite_phy(o_qsnow, qsnow) … … 1054 1107 CALL histwrite_phy(o_l_mixmin(nsrf), l_mixmin(:,1:klev,nsrf)) 1055 1108 CALL histwrite_phy(o_tke_max_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 1109 1110 1056 1111 ENDIF 1057 1112 !jyg< … … 1064 1119 ! ENDIF 1065 1120 1066 1067 1121 ENDDO 1122 1123 1124 IF (iflag_pbl > 1) THEN 1125 zx_tmp_fi3d=0. 1126 IF (vars_defined) THEN 1127 DO nsrf=1,nbsrf 1128 DO k=1,klev 1129 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) & 1130 +pctsrf(:,nsrf)*tke_dissip(:,k,nsrf) 1131 ENDDO 1132 ENDDO 1133 ENDIF 1134 1135 CALL histwrite_phy(o_tke_dissip, zx_tmp_fi3d) 1136 ENDIF 1068 1137 1069 1138 IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_liq_o(1 : klon, 1) … … 1189 1258 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 1190 1259 ! Champs interpolles sur des niveaux de pression 1191 missing_val=missing_val_nf901192 1260 DO iff=1, nfiles 1193 1261 ll=0 … … 1412 1480 ! CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d) 1413 1481 1414 CALL histwrite_phy(o_qsat2m, zqsat2m_cor)1482 CALL histwrite_phy(o_qsat2m, qsat2m) 1415 1483 CALL histwrite_phy(o_tpot, tpot) 1416 1484 CALL histwrite_phy(o_tpote, tpote) … … 1691 1759 CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d) 1692 1760 CALL histwrite_phy(o_rhum, zx_rh) 1761 IF (iflag_ice_thermo .GT. 0) THEN 1762 IF (vars_defined) zx_tmp_fi3d = zx_rhl * 100. 1763 CALL histwrite_phy(o_rhl, zx_tmp_fi3d) 1764 IF (vars_defined) zx_tmp_fi3d = zx_rhi * 100. 1765 CALL histwrite_phy(o_rhi, zx_tmp_fi3d) 1766 ENDIF 1767 1693 1768 1694 1769 IF (vars_defined) zx_tmp_fi3d = wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd … … 1749 1824 ENDIF 1750 1825 CALL histwrite_phy(o_tke, zx_tmp_fi3d) 1751 1752 CALL histwrite_phy(o_tke_max, zx_tmp_fi3d) 1826 CALL histwrite_phy(o_tke_max, zx_tmp_fi3d) 1827 1753 1828 ENDIF 1754 1829 … … 2168 2243 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 2169 2244 ! Champs interpolles sur des niveaux de pression 2170 missing_val=missing_val_nf902171 2245 DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9 2172 2246 … … 2359 2433 ENDIF !(iflag_phytrac==1) 2360 2434 2435 if (activate_ocean_skin >= 1) then 2436 CALL histwrite_phy(o_delta_sst, delta_sst) 2437 CALL histwrite_phy(o_delta_sal, delta_sal) 2438 CALL histwrite_phy(o_ds_ns, ds_ns) 2439 CALL histwrite_phy(o_dt_ns, dt_ns) 2440 CALL histwrite_phy(o_dter, dter) 2441 CALL histwrite_phy(o_dser, dser) 2442 CALL histwrite_phy(o_tkt, tkt) 2443 CALL histwrite_phy(o_tks, tks) 2444 CALL histwrite_phy(o_taur, taur) 2445 CALL histwrite_phy(o_sss, sss) 2446 end if 2447 2361 2448 IF (.NOT.vars_defined) THEN 2362 2449 !$OMP MASTER -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/phys_state_var_mod.F90
r3496 r3851 47 47 !albedo SB >>> 48 48 REAL, ALLOCATABLE, SAVE :: falb_dif(:,:,:), falb_dir(:,:,:) 49 real, allocatable, save:: chl_con(:)49 REAL, ALLOCATABLE, SAVE :: chl_con(:) 50 50 !$OMP THREADPRIVATE(falb_dir,falb_dif,chl_con) 51 51 !albedo SB <<< … … 54 54 REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:) 55 55 !$OMP THREADPRIVATE( rain_fall, snow_fall) 56 REAL, ALLOCATABLE, SAVE :: solsw(:), sol lw(:)57 !$OMP THREADPRIVATE(solsw, sol lw)56 REAL, ALLOCATABLE, SAVE :: solsw(:), solswfdiff(:), sollw(:) 57 !$OMP THREADPRIVATE(solsw, solswfdiff, sollw) 58 58 REAL, ALLOCATABLE, SAVE :: radsol(:) 59 59 !$OMP THREADPRIVATE(radsol) … … 358 358 REAL,ALLOCATABLE,SAVE :: albplap(:) 359 359 !$OMP THREADPRIVATE(albplap) 360 REAL,ALLOCATABLE,SAVE :: solswp(:), sol lwp(:)361 !$OMP THREADPRIVATE(solswp, sol lwp)360 REAL,ALLOCATABLE,SAVE :: solswp(:), solswfdiffp(:), sollwp(:) 361 !$OMP THREADPRIVATE(solswp, solswfdiffp, sollwp) 362 362 REAL,ALLOCATABLE,SAVE :: sollwdownp(:) 363 363 !$OMP THREADPRIVATE(sollwdownp) … … 430 430 !$OMP THREADPRIVATE(is_initialized) 431 431 432 CONTAINS 432 ! Ocean-atmosphere interface: 433 434 REAL, ALLOCATABLE, SAVE:: ds_ns(:) ! (klon) 435 ! "delta salinity near surface". Salinity variation in the 436 ! near-surface turbulent layer. That is subskin salinity minus 437 ! foundation salinity. In ppt. 438 439 REAL, ALLOCATABLE, SAVE:: dt_ns(:) ! (klon) 440 ! "delta temperature near surface". Temperature variation in the 441 ! near-surface turbulent layer. That is subskin temperature 442 ! minus foundation temperature. (Can be negative.) In K. 443 444 REAL, ALLOCATABLE, SAVE:: delta_sst(:) ! (klon) 445 ! Ocean-air interface temperature minus bulk SST, in 446 ! K. Allocated and defined only if activate_ocean_skin >= 1. 447 448 REAL, ALLOCATABLE, SAVE:: delta_sal(:) ! (klon) 449 ! Ocean-air interface salinity minus bulk salinity, in ppt 450 451 !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst) 452 453 CONTAINS 433 454 434 455 !====================================================================== … … 438 459 USE infotrac_phy, ONLY : nbtr 439 460 USE indice_sol_mod 461 use config_ocean_skin_m, only: activate_ocean_skin 440 462 IMPLICIT NONE 441 463 … … 450 472 include "clesphys.h" 451 473 474 print*, 'is_initialized', is_initialized 452 475 IF (is_initialized) RETURN 453 476 is_initialized=.TRUE. … … 461 484 ALLOCATE(falb2(klon,nbsrf)) 462 485 !albedo SB >>> 486 print*, 'allocate falb' 463 487 ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf)) 488 print*, 'allocate falb good', falb_dir(1,1,1) 464 489 ALLOCATE(chl_con(klon)) 465 490 !albedo SB <<< 466 491 ALLOCATE(rain_fall(klon)) 467 492 ALLOCATE(snow_fall(klon)) 468 ALLOCATE(solsw(klon), sol lw(klon))493 ALLOCATE(solsw(klon), solswfdiff(klon), sollw(klon)) 469 494 sollw=0.0 470 495 ALLOCATE(radsol(klon)) … … 597 622 ALLOCATE(radsolp(klon), topswp(klon), toplwp(klon)) 598 623 ALLOCATE(albplap(klon)) 599 ALLOCATE(solswp(klon), sol lwp(klon))624 ALLOCATE(solswp(klon), solswfdiffp(klon), sollwp(klon)) 600 625 ALLOCATE(gustiness(klon)) 601 626 ALLOCATE(sollwdownp(klon)) … … 628 653 !!! fin nrlmd le 10/04/2012 629 654 IF (ok_gwd_rando) THEN 630 allocate(du_gwd_rando(klon, klev))655 ALLOCATE(du_gwd_rando(klon, klev)) 631 656 du_gwd_rando(:,:)=0. 632 657 ENDIF … … 635 660 du_gwd_front(:,:) = 0 !ym missing init 636 661 ENDIF 637 END SUBROUTINE phys_state_var_init 662 if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), & 663 dt_ns(klon), delta_sst(klon)) 664 665 END SUBROUTINE phys_state_var_init 638 666 639 667 !====================================================================== 640 SUBROUTINE phys_state_var_end 668 SUBROUTINE phys_state_var_end 669 ! Useful only for lmdz1d. 641 670 !USE dimphy 642 671 USE indice_sol_mod 672 use config_ocean_skin_m, only: activate_ocean_skin 643 673 IMPLICIT NONE 644 674 include "clesphys.h" 645 675 646 deallocate(pctsrf, ftsol, falb1, falb2)647 deallocate(qsol,fevap,z0m,z0h,agesno)676 DEALLOCATE(pctsrf, ftsol, falb1, falb2) 677 DEALLOCATE(qsol,fevap,z0m,z0h,agesno) 648 678 !FC 649 deallocate(treedrg)650 deallocate(rain_fall, snow_fall, solsw, sollw, radsol, swradcorr)651 deallocate(zmea, zstd, zsig, zgam)652 deallocate(zthe, zpic, zval)653 deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon)654 deallocate(qs_ancien, ql_ancien)655 deallocate(prw_ancien, prlw_ancien, prsw_ancien)656 deallocate(qtc_cv,sigt_cv)657 deallocate(u_ancien, v_ancien)658 deallocate(tr_ancien) !RomP659 deallocate(ratqs, pbl_tke,coefh,coefm)679 DEALLOCATE(treedrg) 680 DEALLOCATE(rain_fall, snow_fall, solsw, solswfdiff, sollw, radsol, swradcorr) 681 DEALLOCATE(zmea, zstd, zsig, zgam) 682 DEALLOCATE(zthe, zpic, zval) 683 DEALLOCATE(rugoro, t_ancien, q_ancien, clwcon, rnebcon) 684 DEALLOCATE(qs_ancien, ql_ancien) 685 DEALLOCATE(prw_ancien, prlw_ancien, prsw_ancien) 686 DEALLOCATE(qtc_cv,sigt_cv) 687 DEALLOCATE(u_ancien, v_ancien) 688 DEALLOCATE(tr_ancien) !RomP 689 DEALLOCATE(ratqs, pbl_tke,coefh,coefm) 660 690 !nrlmd< 661 deallocate(delta_tsurf)691 DEALLOCATE(delta_tsurf) 662 692 !>nrlmd 663 deallocate(zmax0, f0)664 deallocate(sig1, w01)665 deallocate(entr_therm, fm_therm)666 deallocate(detr_therm)667 deallocate(clwcon0th, rnebcon0th)693 DEALLOCATE(zmax0, f0) 694 DEALLOCATE(sig1, w01) 695 DEALLOCATE(entr_therm, fm_therm) 696 DEALLOCATE(detr_therm) 697 DEALLOCATE(clwcon0th, rnebcon0th) 668 698 ! radiation outputs 669 deallocate(swdnc0, swdn0, swdn)670 deallocate(swupc0, swup0, swup)671 deallocate(lwdnc0, lwdn0, lwdn)672 deallocate(lwupc0, lwup0, lwup)673 deallocate(SWdn200clr, SWdn200)674 deallocate(SWup200clr, SWup200)675 deallocate(LWdn200clr, LWdn200)676 deallocate(LWup200clr, LWup200)677 deallocate(LWdnTOA, LWdnTOAclr)699 DEALLOCATE(swdnc0, swdn0, swdn) 700 DEALLOCATE(swupc0, swup0, swup) 701 DEALLOCATE(lwdnc0, lwdn0, lwdn) 702 DEALLOCATE(lwupc0, lwup0, lwup) 703 DEALLOCATE(SWdn200clr, SWdn200) 704 DEALLOCATE(SWup200clr, SWup200) 705 DEALLOCATE(LWdn200clr, LWdn200) 706 DEALLOCATE(LWup200clr, LWup200) 707 DEALLOCATE(LWdnTOA, LWdnTOAclr) 678 708 ! pressure level 679 deallocate(tsumSTD)680 deallocate(usumSTD, vsumSTD)681 deallocate(wsumSTD, phisumSTD)682 deallocate(tnondef)683 deallocate(qsumSTD, rhsumSTD)684 deallocate(uvsumSTD)685 deallocate(vqsumSTD)686 deallocate(vTsumSTD)687 deallocate(wqsumSTD)688 deallocate(vphisumSTD)689 deallocate(wTsumSTD)690 deallocate(u2sumSTD)691 deallocate(v2sumSTD)692 deallocate(T2sumSTD)693 deallocate(O3sumSTD)694 deallocate(O3daysumSTD)709 DEALLOCATE(tsumSTD) 710 DEALLOCATE(usumSTD, vsumSTD) 711 DEALLOCATE(wsumSTD, phisumSTD) 712 DEALLOCATE(tnondef) 713 DEALLOCATE(qsumSTD, rhsumSTD) 714 DEALLOCATE(uvsumSTD) 715 DEALLOCATE(vqsumSTD) 716 DEALLOCATE(vTsumSTD) 717 DEALLOCATE(wqsumSTD) 718 DEALLOCATE(vphisumSTD) 719 DEALLOCATE(wTsumSTD) 720 DEALLOCATE(u2sumSTD) 721 DEALLOCATE(v2sumSTD) 722 DEALLOCATE(T2sumSTD) 723 DEALLOCATE(O3sumSTD) 724 DEALLOCATE(O3daysumSTD) 695 725 !IM beg 696 deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD)697 deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD)726 DEALLOCATE(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD) 727 DEALLOCATE(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD) 698 728 !IM end 699 deallocate(seed_old)700 deallocate(zuthe, zvthe)701 deallocate(alb_neig)702 deallocate(ema_cbmf)703 deallocate(ema_pcb, ema_pct)704 deallocate(Mipsh, Ma, qcondc)705 deallocate(wd, sigd)706 deallocate(cin, ALE, ALP)707 deallocate(ftd, fqd)708 deallocate(Ale_bl, Alp_bl)709 deallocate(ale_wake)710 deallocate(ale_bl_stat)711 deallocate(lalim_conv, wght_th)712 deallocate(wake_deltat, wake_deltaq)713 deallocate(wake_s, awake_dens, wake_dens)714 deallocate(wake_Cstar, wake_pe, wake_fip)729 DEALLOCATE(seed_old) 730 DEALLOCATE(zuthe, zvthe) 731 DEALLOCATE(alb_neig) 732 DEALLOCATE(ema_cbmf) 733 DEALLOCATE(ema_pcb, ema_pct) 734 DEALLOCATE(Mipsh, Ma, qcondc) 735 DEALLOCATE(wd, sigd) 736 DEALLOCATE(cin, ALE, ALP) 737 DEALLOCATE(ftd, fqd) 738 DEALLOCATE(Ale_bl, Alp_bl) 739 DEALLOCATE(ale_wake) 740 DEALLOCATE(ale_bl_stat) 741 DEALLOCATE(lalim_conv, wght_th) 742 DEALLOCATE(wake_deltat, wake_deltaq) 743 DEALLOCATE(wake_s, awake_dens, wake_dens) 744 DEALLOCATE(wake_Cstar, wake_pe, wake_fip) 715 745 !jyg< 716 deallocate(wake_delta_pbl_TKE)746 DEALLOCATE(wake_delta_pbl_TKE) 717 747 !>jyg 718 deallocate(pfrac_impa, pfrac_nucl)719 deallocate(pfrac_1nucl)720 deallocate(total_rain, nday_rain)721 deallocate(paire_ter)722 deallocate(albsol1, albsol2)748 DEALLOCATE(pfrac_impa, pfrac_nucl) 749 DEALLOCATE(pfrac_1nucl) 750 DEALLOCATE(total_rain, nday_rain) 751 DEALLOCATE(paire_ter) 752 DEALLOCATE(albsol1, albsol2) 723 753 !albedo SB >>> 724 deallocate(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con)754 DEALLOCATE(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con) 725 755 !albedo SB <<< 726 deallocate(wo)727 deallocate(clwcon0,rnebcon0)728 deallocate(heat, heat0)729 deallocate(cool, cool0)730 deallocate(heat_volc, cool_volc)731 deallocate(topsw, toplw)732 deallocate(sollwdown, sollwdownclr)733 deallocate(gustiness)734 deallocate(toplwdown, toplwdownclr)735 deallocate(topsw0,toplw0,solsw0,sollw0)736 deallocate(albpla)756 DEALLOCATE(wo) 757 DEALLOCATE(clwcon0,rnebcon0) 758 DEALLOCATE(heat, heat0) 759 DEALLOCATE(cool, cool0) 760 DEALLOCATE(heat_volc, cool_volc) 761 DEALLOCATE(topsw, toplw) 762 DEALLOCATE(sollwdown, sollwdownclr) 763 DEALLOCATE(gustiness) 764 DEALLOCATE(toplwdown, toplwdownclr) 765 DEALLOCATE(topsw0,toplw0,solsw0,sollw0) 766 DEALLOCATE(albpla) 737 767 !IM ajout variables CFMIP2/CMIP5 738 deallocate(heatp, coolp)739 deallocate(heat0p, cool0p)740 deallocate(radsolp, topswp, toplwp)741 deallocate(albplap)742 deallocate(solswp, sollwp)743 deallocate(sollwdownp)744 deallocate(topsw0p,toplw0p)745 deallocate(solsw0p,sollw0p)746 deallocate(lwdnc0p, lwdn0p, lwdnp)747 deallocate(lwupc0p, lwup0p, lwupp)748 deallocate(swdnc0p, swdn0p, swdnp)749 deallocate(swupc0p, swup0p, swupp)750 deallocate(cape)751 deallocate(pbase,bbase)752 deallocate(zqasc)753 deallocate(ibas_con, itop_con)754 deallocate(rain_con, snow_con)755 deallocate(rlonPOS)756 deallocate(newsst)757 deallocate(ustar,u10m, v10m,wstar)758 deallocate(topswad, solswad)759 deallocate(topswai, solswai)760 deallocate(tau_aero,piz_aero,cg_aero)761 deallocate(tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm)762 deallocate(tau_aero_lw_rrtm,piz_aero_lw_rrtm,cg_aero_lw_rrtm)763 deallocate(ccm)764 if (ok_gwd_rando) deallocate(du_gwd_rando)765 if (.not. ok_hines .and. ok_gwd_rando) deallocate(du_gwd_front)768 DEALLOCATE(heatp, coolp) 769 DEALLOCATE(heat0p, cool0p) 770 DEALLOCATE(radsolp, topswp, toplwp) 771 DEALLOCATE(albplap) 772 DEALLOCATE(solswp, solswfdiffp, sollwp) 773 DEALLOCATE(sollwdownp) 774 DEALLOCATE(topsw0p,toplw0p) 775 DEALLOCATE(solsw0p,sollw0p) 776 DEALLOCATE(lwdnc0p, lwdn0p, lwdnp) 777 DEALLOCATE(lwupc0p, lwup0p, lwupp) 778 DEALLOCATE(swdnc0p, swdn0p, swdnp) 779 DEALLOCATE(swupc0p, swup0p, swupp) 780 DEALLOCATE(cape) 781 DEALLOCATE(pbase,bbase) 782 DEALLOCATE(zqasc) 783 DEALLOCATE(ibas_con, itop_con) 784 DEALLOCATE(rain_con, snow_con) 785 DEALLOCATE(rlonPOS) 786 DEALLOCATE(newsst) 787 DEALLOCATE(ustar,u10m, v10m,wstar) 788 DEALLOCATE(topswad, solswad) 789 DEALLOCATE(topswai, solswai) 790 DEALLOCATE(tau_aero,piz_aero,cg_aero) 791 DEALLOCATE(tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm) 792 DEALLOCATE(tau_aero_lw_rrtm,piz_aero_lw_rrtm,cg_aero_lw_rrtm) 793 DEALLOCATE(ccm) 794 if (ok_gwd_rando) DEALLOCATE(du_gwd_rando) 795 if (.not. ok_hines .and. ok_gwd_rando) DEALLOCATE(du_gwd_front) 766 796 767 797 !!! nrlmd le 10/04/2012 768 deallocate(ale_bl_trig)798 DEALLOCATE(ale_bl_trig) 769 799 !!! fin nrlmd le 10/04/2012 800 801 if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, & 802 delta_sst) 803 770 804 is_initialized=.FALSE. 805 771 806 END SUBROUTINE phys_state_var_end 772 807 -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/physiq_mod.F90
-
Property
svn:keywords
changed from
Author Date Id Revision
toId
r3666 r3851 16 16 d_u, d_v, d_t, d_qx, d_ps) 17 17 18 ! For clarity, the "USE" section is now arranged in alphabetical order, 19 ! with a separate section for CPP keys 20 ! PLEASE try to follow this rule 21 22 USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando 23 USE aero_mod 24 USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, & 25 & fl_ebil, fl_cor_ebil 18 26 USE assert_m, only: assert 27 USE change_srf_frac_mod 28 USE conf_phys_m, only: conf_phys 29 USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad 30 USE CFMIP_point_locations ! IM stations CFMIP 31 USE cmp_seri_mod 32 USE dimphy 33 USE etat0_limit_unstruct_mod 34 USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 35 USE fonte_neige_mod, ONLY : fonte_neige_get_vars 36 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 19 37 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & 20 38 histwrite, ju2ymds, ymds2ju, getin 21 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 39 USE ioipsl_getin_p_mod, ONLY : getin_p 40 USE indice_sol_mod 41 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac 42 USE iophy 43 USE limit_read_mod, ONLY : init_limit_read 44 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured 45 USE mod_phys_lmdz_mpi_data, only: is_mpi_root 46 USE mod_phys_lmdz_para 47 USE netcdf95, only: nf95_close 48 USE netcdf, only: nf90_fill_real ! IM for NMC files 49 USE open_climoz_m, only: open_climoz ! ozone climatology from a file 50 USE ozonecm_m, only: ozonecm ! ozone of J.-F. Royer 51 USE pbl_surface_mod, ONLY : pbl_surface 52 USE phyaqua_mod, only: zenang_an 53 USE phystokenc_mod, ONLY: offline, phystokenc 22 54 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, & 23 55 year_cur, mth_cur,jD_cur, jH_cur, jD_ref, day_cur, hour 56 !! USE phys_local_var_mod, ONLY : a long list of variables 57 !! ==> see below, after "CPP Keys" section 58 USE phys_state_var_mod ! Variables sauvegardees de la physique 59 USE phys_output_mod 60 USE phys_output_ctrlout_mod 61 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 62 USE readaerosol_mod, ONLY : init_aero_fromfile 63 USE readaerosolstrato_m, ONLY : init_readaerosolstrato 64 USE radlwsw_m, only: radlwsw 65 USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz 66 USE regr_pr_time_av_m, only: regr_pr_time_av 67 USE surface_data, ONLY : type_ocean, ok_veget, landice_opt 68 USE time_phylmdz_mod, only: annee_ref, current_time, day_ini, day_ref, & 69 day_step_phy, itau_phy, pdtphys, raz_date, start_time, update_time 70 USE tracinca_mod, ONLY: config_inca 71 USE tropopause_m, ONLY: dyn_tropopause 72 USE vampir 73 USE VERTICAL_LAYERS_MOD, ONLY: aps,bps, ap, bp 24 74 USE write_field_phy 25 USE dimphy 26 USE infotrac_phy, ONLY: nqtot, nbtr, nqo, type_trac 27 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured 28 USE mod_phys_lmdz_para 29 USE iophy 30 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 31 USE phystokenc_mod, ONLY: offline, phystokenc 32 USE time_phylmdz_mod, only: raz_date, day_step_phy, update_time,current_time 33 USE vampir 34 USE pbl_surface_mod, ONLY : pbl_surface 35 USE change_srf_frac_mod 36 USE surface_data, ONLY : type_ocean, ok_veget, ok_snow 37 USE tropopause_m, ONLY: dyn_tropopause 75 76 !USE cmp_seri_mod 77 ! USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, & 78 ! & fl_ebil, fl_cor_ebil 79 80 !!!!!!!!!!!!!!!!!! "USE" section for CPP keys !!!!!!!!!!!!!!!!!!!!!!!! 81 ! 82 ! 38 83 #ifdef CPP_Dust 39 USE phytracr_spl_mod, ONLY: phytracr_spl 84 USE phytracr_spl_mod, ONLY: phytracr_spl, phytracr_spl_out_init 85 USE phys_output_write_spl_mod 86 #else 87 USE phytrac_mod, ONLY : phytrac_init, phytrac 88 USE phys_output_write_mod 40 89 #endif 90 91 92 #ifdef REPROBUS 93 USE CHEM_REP, ONLY : Init_chem_rep_xjour, & 94 d_q_rep,d_ql_rep,d_qi_rep,ptrop,ttrop, & 95 ztrop, gravit,itroprep, Z1,Z2,fac,B 96 #endif 97 98 99 #ifdef CPP_RRTM 100 USE YOERAD, ONLY : NRADLP 101 USE YOESW, ONLY : RSUN 102 #endif 103 104 41 105 #ifdef CPP_StratAer 42 106 USE strataer_mod, ONLY: strataer_init 43 107 #endif 44 USE phys_local_var_mod, ONLY: phys_local_var_init, phys_local_var_end, & 108 109 110 #ifdef CPP_XIOS 111 USE xios, ONLY: xios_update_calendar, xios_context_finalize, & 112 xios_get_field_attr, xios_field_is_active 113 USE wxios, ONLY: missing_val, missing_val_omp 114 #endif 115 #ifndef CPP_XIOS 116 USE paramLMDZ_phy_mod 117 #endif 118 ! 119 ! 120 !!!!!!!!!!!!!!!!!! END "USE" for CPP keys !!!!!!!!!!!!!!!!!!!!!! 121 122 USE phys_local_var_mod, ONLY: phys_local_var_init, phys_local_var_end, & 45 123 ! [Variables internes non sauvegardees de la physique] 46 124 ! Variables locales pour effectuer les appels en serie … … 119 197 cdragm, cdragh, & 120 198 zustar, zu10m, zv10m, rh2m, qsat2m, & 121 zq2m, zt2m, weak_inversion, & 122 zq2m_cor,zt2m_cor,zu10m_cor,zv10m_cor, & ! pour corriger d'un bug 123 zrh2m_cor,zqsat2m_cor, & 199 zq2m, zt2m, zn2mout, weak_inversion, & 124 200 zt2m_min_mon, zt2m_max_mon, & ! pour calcul_divers.h 125 201 t2m_min_mon, t2m_max_mon, & ! pour calcul_divers.h … … 195 271 ref_liq, ref_ice, theta, & 196 272 ref_liq_pi, ref_ice_pi, & 197 zphi, zx_rh, &273 zphi, zx_rh, zx_rhl, zx_rhi, & 198 274 pmfd, pmfu, & 199 275 ! … … 216 292 zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic 217 293 ! 218 USE phys_state_var_mod ! Variables sauvegardees de la physique 219 #ifdef CPP_Dust 220 USE phys_output_write_spl_mod 221 #else 222 USE phys_output_var_mod ! Variables pour les ecritures des sorties 223 #endif 224 225 USE phys_output_write_mod 226 USE fonte_neige_mod, ONLY : fonte_neige_get_vars 227 USE phys_output_mod 228 USE phys_output_ctrlout_mod 229 USE open_climoz_m, only: open_climoz ! ozone climatology from a file 230 USE regr_pr_time_av_m, only: regr_pr_time_av 231 USE netcdf95, only: nf95_close 232 !IM for NMC files 233 USE netcdf, only: nf90_fill_real 234 USE mod_phys_lmdz_mpi_data, only: is_mpi_root 235 USE aero_mod 236 USE ozonecm_m, only: ozonecm ! ozone of J.-F. Royer 237 USE conf_phys_m, only: conf_phys 238 USE radlwsw_m, only: radlwsw 239 USE phyaqua_mod, only: zenang_an 240 USE time_phylmdz_mod, only: day_step_phy, annee_ref, day_ref, itau_phy, & 241 start_time, pdtphys, day_ini 242 USE tracinca_mod, ONLY: config_inca 243 #ifdef CPP_XIOS 244 USE wxios, ONLY: missing_val, missing_val_omp 245 USE xios, ONLY: xios_get_field_attr, xios_field_is_active 246 #endif 247 #ifdef REPROBUS 248 USE CHEM_REP, ONLY : Init_chem_rep_xjour, & 249 d_q_rep,d_ql_rep,d_qi_rep,ptrop,ttrop, & 250 ztrop, gravit,itroprep, Z1,Z2,fac,B 251 #endif 252 USE indice_sol_mod 253 USE phytrac_mod, ONLY : phytrac_init, phytrac 254 USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad 255 256 #ifdef CPP_RRTM 257 USE YOERAD, ONLY : NRADLP 258 USE YOESW, ONLY : RSUN 259 #endif 260 USE ioipsl_getin_p_mod, ONLY : getin_p 261 262 #ifndef CPP_XIOS 263 USE paramLMDZ_phy_mod 264 #endif 265 266 USE cmp_seri_mod 267 USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, & 268 & fl_ebil, fl_cor_ebil 269 270 !IM stations CFMIP 271 USE CFMIP_point_locations 272 USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando 273 USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando 274 USE VERTICAL_LAYERS_MOD, ONLY: aps,bps, ap, bp 275 USE etat0_limit_unstruct_mod 276 #ifdef CPP_XIOS 277 USE xios, ONLY: xios_update_calendar, xios_context_finalize 278 #endif 279 USE limit_read_mod, ONLY : init_limit_read 280 USE regr_horiz_time_climoz_m, ONLY: regr_horiz_time_climoz 281 USE readaerosol_mod, ONLY : init_aero_fromfile 282 USE readaerosolstrato_m, ONLY : init_readaerosolstrato 294 283 295 284 296 IMPLICIT NONE … … 603 615 !$OMP THREADPRIVATE(iflag_alp_wk_cond) 604 616 605 INTEGER, SAVE :: iflag_bug_t2m_ipslcm61=1 !606 !$OMP THREADPRIVATE(iflag_bug_t2m_ipslcm61)607 INTEGER, SAVE :: iflag_bug_t2m_stab_ipslcm61=-1 !608 !$OMP THREADPRIVATE(iflag_bug_t2m_stab_ipslcm61)609 610 617 REAL t_w(klon,klev),q_w(klon,klev) ! temperature and moisture profiles in the wake region 611 618 REAL t_x(klon,klev),q_x(klon,klev) ! temperature and moisture profiles in the off-wake region … … 1315 1322 WRITE(lunout,*) 'debut physiq_mod tau_gl=',tau_gl 1316 1323 1317 iflag_bug_t2m_ipslcm61 = 11318 CALL getin_p('iflag_bug_t2m_ipslcm61', iflag_bug_t2m_ipslcm61)1319 iflag_bug_t2m_stab_ipslcm61 = -11320 CALL getin_p('iflag_bug_t2m_stab_ipslcm61', iflag_bug_t2m_stab_ipslcm61)1321 1322 1324 CALL getin_p('iflag_alp_wk_cond', iflag_alp_wk_cond) 1323 1325 CALL getin_p('random_notrig_max',random_notrig_max) … … 1347 1349 iflag_phytrac = 1 ! by default we do want to call phytrac 1348 1350 CALL getin_p('iflag_phytrac',iflag_phytrac) 1351 #ifdef CPP_Dust 1352 IF (iflag_phytrac.EQ.0) THEN 1353 WRITE(lunout,*) 'In order to run with SPLA, iflag_phytrac will be forced to 1' 1354 iflag_phytrac = 1 1355 ENDIF 1356 #endif 1349 1357 nvm_lmdz = 13 1350 1358 CALL getin_p('NVM',nvm_lmdz) … … 1515 1523 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1516 1524 CALL init_iophy_new(latitude_deg,longitude_deg) 1525 CALL create_etat0_limit_unstruct 1526 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) 1517 1527 1518 1528 !=================================================================== … … 1609 1619 #ifdef CPP_COSP 1610 1620 IF (ok_cosp) THEN 1611 DO k = 1, klev1612 DO i = 1, klon1613 phicosp(i,k) = pphi(i,k) + pphis(i)1614 ENDDO1615 ENDDO1621 ! DO k = 1, klev 1622 ! DO i = 1, klon 1623 ! phicosp(i,k) = pphi(i,k) + pphis(i) 1624 ! ENDDO 1625 ! ENDDO 1616 1626 CALL phys_cosp(itap,phys_tstep,freq_cosp, & 1617 1627 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & … … 1631 1641 #ifdef CPP_COSP2 1632 1642 IF (ok_cosp) THEN 1633 DO k = 1, klev1634 DO i = 1, klon1635 phicosp(i,k) = pphi(i,k) + pphis(i)1636 ENDDO1637 ENDDO1643 ! DO k = 1, klev 1644 ! DO i = 1, klon 1645 ! phicosp(i,k) = pphi(i,k) + pphis(i) 1646 ! ENDDO 1647 ! ENDDO 1638 1648 CALL phys_cosp2(itap,phys_tstep,freq_cosp, & 1639 1649 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & … … 1681 1691 1682 1692 CALL iniradia(klon,klev,paprs(1,1:klev+1)) 1683 ! Initialisation des champs dans phytrac qui sont utilisés par phys_output_write 1693 1694 ! Initialisation des champs dans phytrac* qui sont utilisés par phys_output_write* 1695 #ifdef CPP_Dust 1696 ! Quand on utilise SPLA, on force iflag_phytrac=1 1697 CALL phytracr_spl_out_init() 1698 CALL phys_output_write_spl(itap, pdtphys, paprs, pphis, & 1699 pplay, lmax_th, aerosol_couple, & 1700 ok_ade, ok_aie, ivap, ok_sync, & 1701 ptconv, read_climoz, clevSTD, & 1702 ptconvth, d_t, qx, d_qx, d_tr_dyn, zmasse, & 1703 flag_aerosol, flag_aerosol_strat, ok_cdnc) 1704 #else 1705 ! phys_output_write écrit des variables traceurs seulement si iflag_phytrac == 1 1706 ! donc seulement dans ce cas on doit appeler phytrac_init() 1684 1707 IF (iflag_phytrac == 1 ) THEN 1685 1708 CALL phytrac_init() 1686 ENDIF 1687 1709 ENDIF 1688 1710 CALL phys_output_write(itap, pdtphys, paprs, pphis, & 1689 1711 pplay, lmax_th, aerosol_couple, & … … 1692 1714 ptconvth, d_u, d_t, qx, d_qx, zmasse, & 1693 1715 flag_aerosol, flag_aerosol_strat, ok_cdnc) 1716 #endif 1717 1694 1718 1695 1719 #ifdef CPP_XIOS … … 1697 1721 #endif 1698 1722 IF(read_climoz>=1 .AND. create_etat0_limit) CALL regr_horiz_time_climoz(read_climoz,ok_daily_climoz) 1699 CALL create_etat0_limit_unstruct1700 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0)1701 1723 1702 1724 !jyg< … … 2514 2536 longitude_deg, latitude_deg, rugoro, zrmu0, & 2515 2537 zsig, sollwdown, pphi, cldt, & 2516 rain_fall, snow_fall, solsw, sol lw, &2538 rain_fall, snow_fall, solsw, solswfdiff, sollw, & 2517 2539 gustiness, & 2518 2540 t_seri, q_seri, u_seri, v_seri, & … … 2529 2551 !albedo SB <<< 2530 2552 albsol3_lic,runoff, snowhgt, qsnow, to_ice, sissnow, & 2531 zxtsol, zxfluxlat, zt2m, qsat2m, &2553 zxtsol, zxfluxlat, zt2m, qsat2m, zn2mout, & 2532 2554 d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_t_diss, & 2533 2555 !nrlmd< … … 2576 2598 !>jyg 2577 2599 ENDIF 2578 2579 !add limitation for t,q at and wind at 10m2580 if ( iflag_bug_t2m_ipslcm61 == 0 ) THEN2581 CALL borne_var_surf( klon,klev,nbsrf, &2582 iflag_bug_t2m_stab_ipslcm61, &2583 t_seri(:,1),q_seri(:,1),u_seri(:,1),v_seri(:,1), &2584 ftsol,zxqsurf,pctsrf,paprs, &2585 t2m, q2m, u10m, v10m, &2586 zt2m_cor, zq2m_cor, zu10m_cor, zv10m_cor, &2587 zrh2m_cor, zqsat2m_cor)2588 ELSE2589 zt2m_cor(:)=zt2m(:)2590 zq2m_cor(:)=zq2m(:)2591 zu10m_cor(:)=zu10m(:)2592 zv10m_cor(:)=zv10m(:)2593 zqsat2m_cor=999.9992594 ENDIF2595 2600 2596 2601 !--------------------------------------------------------------------- … … 3704 3709 ENDIF 3705 3710 zx_rh(i,k) = q_seri(i,k)/zx_qs 3711 IF (iflag_ice_thermo .GT. 0) THEN 3712 zx_rhl(i,k) = q_seri(i,k)/(qsatl(zx_t)/pplay(i,k)) 3713 zx_rhi(i,k) = q_seri(i,k)/(qsats(zx_t)/pplay(i,k)) 3714 ENDIF 3706 3715 zqsat(i,k)=zx_qs 3707 3716 ENDDO … … 4143 4152 heat,heat0,cool,cool0,albpla, & 4144 4153 heat_volc,cool_volc, & 4145 topsw,toplw,solsw,sol lw, &4154 topsw,toplw,solsw,solswfdiff,sollw, & 4146 4155 sollwdown, & 4147 4156 topsw0,toplw0,solsw0,sollw0, & … … 4230 4239 heatp,heat0p,coolp,cool0p,albplap, & 4231 4240 heat_volc,cool_volc, & 4232 topswp,toplwp,solswp,sol lwp, &4241 topswp,toplwp,solswp,solswfdiffp,sollwp, & 4233 4242 sollwdownp, & 4234 4243 topsw0p,toplw0p,solsw0p,sollw0p, & … … 4700 4709 #ifdef CPP_COSPV2 4701 4710 IF (itap.eq.1.or.MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN 4711 ! IF (MOD(itap,NINT(freq_cosp/phys_tstep)).EQ.0) THEN 4702 4712 4703 4713 IF (prt_level .GE.10) THEN 4704 4714 print*,'freq_cosp',freq_cosp 4705 4715 ENDIF 4716 DO k = 1, klev 4717 DO i = 1, klon 4718 phicosp(i,k) = pphi(i,k) + pphis(i) 4719 ENDDO 4720 ENDDO 4706 4721 mr_ozone=wo(:, :, 1) * dobson_u * 1e3 / zmasse 4707 4722 print*,'Dans physiq.F avant appel ' … … 4769 4784 ENDIF 4770 4785 4771 IF (iflag_phytrac == 1 ) THEN4772 4773 4786 #ifdef CPP_Dust 4774 CALL phytracr_spl ( debut,lafin , jD_cur,jH_cur,iflag_con, & ! I 4787 ! Avec SPLA, iflag_phytrac est forcé =1 4788 CALL phytracr_spl ( debut,lafin , jD_cur,jH_cur,iflag_con, & ! I 4775 4789 pdtphys,ftsol, & ! I 4776 4790 t,q_seri,paprs,pplay,RHcl, & ! I … … 4788 4802 4789 4803 #else 4790 4791 CALL phytrac ( &4804 IF (iflag_phytrac == 1 ) THEN 4805 CALL phytrac ( & 4792 4806 itap, days_elapsed+1, jH_cur, debut, & 4793 4807 lafin, phys_tstep, u, v, t, & … … 4826 4840 4827 4841 #endif 4842 ENDIF ! (iflag_phytrac=1) 4828 4843 4829 4844 #endif 4830 ENDIF ! (iflag_phytrac=1)4845 !ENDIF ! (iflag_phytrac=1) 4831 4846 4832 4847 IF (offline) THEN … … 5128 5143 CALL phys_output_write_spl(itap, pdtphys, paprs, pphis, & 5129 5144 pplay, lmax_th, aerosol_couple, & 5130 ok_ade, ok_aie, ivap, ok_sync, &5145 ok_ade, ok_aie, ivap, ok_sync, & 5131 5146 ptconv, read_climoz, clevSTD, & 5132 5147 ptconvth, d_t, qx, d_qx, d_tr_dyn, zmasse, & … … 5147 5162 #endif 5148 5163 5149 ! On remet des variables a .false. apres un premier appel5164 ! Pour XIOS : On remet des variables a .false. apres un premier appel 5150 5165 IF (debut) THEN 5151 5166 #ifdef CPP_XIOS -
Property
svn:keywords
changed from
-
LMDZ6/branches/LMDZ-tracers/libf/phylmd/radlwsw_m.F90
r3666 r3851 26 26 heat,heat0,cool,cool0,albpla,& 27 27 heat_volc, cool_volc,& 28 topsw,toplw,solsw,sol lw,&28 topsw,toplw,solsw,solswfdiff,sollw,& 29 29 sollwdown,& 30 30 topsw0,toplw0,solsw0,sollw0,& … … 117 117 ! toplw----output-R- ray. IR montant au sommet de l'atmosphere 118 118 ! solsw----output-R- flux solaire net a la surface 119 ! solswfdiff----output-R- fraction de rayonnement diffus pour le flux solaire descendant a la surface 119 120 ! sollw----output-R- ray. IR montant a la surface 120 121 ! solswad---output-R- ray. solaire net absorbe a la surface (aerosol dir) … … 188 189 REAL, INTENT(in) :: tsol(KLON) 189 190 REAL, INTENT(in) :: alb_dir(KLON,NSW),alb_dif(KLON,NSW) 190 real, intent(in) :: SFRWL(6)191 REAL, INTENT(in) :: SFRWL(6) 191 192 !albedo SB <<< 192 193 REAL, INTENT(in) :: t(KLON,KLEV), q(KLON,KLEV) … … 235 236 REAL, INTENT(out) :: heat_volc(KLON,KLEV), cool_volc(KLON,KLEV) !NL 236 237 REAL, INTENT(out) :: topsw(KLON), toplw(KLON) 237 REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON) 238 REAL, INTENT(out) :: solsw(KLON), sollw(KLON), albpla(KLON), solswfdiff(KLON) 238 239 REAL, INTENT(out) :: topsw0(KLON), toplw0(KLON), solsw0(KLON), sollw0(KLON) 239 240 REAL, INTENT(out) :: sollwdown(KLON) … … 286 287 REAL(KIND=8) PWV(kdlon,kflev), PQS(kdlon,kflev) 287 288 288 real(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone289 REAL(kind=8) POZON(kdlon, kflev, size(wo, 3)) ! mass fraction of ozone 289 290 ! "POZON(:, :, 1)" is for the average day-night field, 290 291 ! "POZON(:, :, 2)" is for daylight time. … … 302 303 REAL(KIND=8) zheat_volc(kdlon,kflev), zcool_volc(kdlon,kflev) !NL 303 304 REAL(KIND=8) ztopsw(kdlon), ztoplw(kdlon) 304 REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon) 305 REAL(KIND=8) zsolsw(kdlon), zsollw(kdlon), zalbpla(kdlon), zsolswfdiff(kdlon) 305 306 REAL(KIND=8) zsollwdown(kdlon) 306 307 REAL(KIND=8) ztopsw0(kdlon), ztoplw0(kdlon) … … 329 330 !MPL input supplementaires pour RECMWFL 330 331 ! flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) 331 332 REAL(KIND=8) GEMU(klon) 332 333 !MPL input RECMWFL: 333 334 ! Tableaux aux niveaux inverses pour respecter convention Arpege 334 335 335 REAL(KIND=8) ref_liq_i(klon,klev) ! cloud droplet radius present-day from newmicro (inverted) 336 REAL(KIND=8) ref_ice_i(klon,klev) ! ice crystal radius present-day from newmicro (inverted) 336 337 !--OB 337 338 338 REAL(KIND=8) ref_liq_pi_i(klon,klev) ! cloud droplet radius pre-industrial from newmicro (inverted) 339 REAL(KIND=8) ref_ice_pi_i(klon,klev) ! ice crystal radius pre-industrial from newmicro (inverted) 339 340 !--end OB 340 341 342 343 341 REAL(KIND=8) paprs_i(klon,klev+1) 342 REAL(KIND=8) pplay_i(klon,klev) 343 REAL(KIND=8) cldfra_i(klon,klev) 344 REAL(KIND=8) POZON_i(kdlon,kflev, size(wo, 3)) ! mass fraction of ozone 344 345 ! "POZON(:, :, 1)" is for the average day-night field, 345 346 ! "POZON(:, :, 2)" is for daylight time. 346 347 !!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 347 348 349 350 348 REAL(KIND=8) PAER_i(kdlon,kflev,6) 349 REAL(KIND=8) PDP_i(klon,klev) 350 REAL(KIND=8) t_i(klon,klev),q_i(klon,klev),qsat_i(klon,klev) 351 REAL(KIND=8) flwc_i(klon,klev),fiwc_i(klon,klev) 351 352 !MPL output RECMWFL: 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 353 REAL(KIND=8) ZEMTD (klon,klev+1),ZEMTD_i (klon,klev+1) 354 REAL(KIND=8) ZEMTU (klon,klev+1),ZEMTU_i (klon,klev+1) 355 REAL(KIND=8) ZTRSO (klon,klev+1),ZTRSO_i (klon,klev+1) 356 REAL(KIND=8) ZTH (klon,klev+1),ZTH_i (klon,klev+1) 357 REAL(KIND=8) ZCTRSO(klon,2) 358 REAL(KIND=8) ZCEMTR(klon,2) 359 REAL(KIND=8) ZTRSOD(klon) 360 REAL(KIND=8) ZLWFC (klon,2) 361 REAL(KIND=8) ZLWFT (klon,klev+1),ZLWFT_i (klon,klev+1) 362 REAL(KIND=8) ZSWFC (klon,2) 363 REAL(KIND=8) ZSWFT (klon,klev+1),ZSWFT_i (klon,klev+1) 364 REAL(KIND=8) ZFLUCDWN_i(klon,klev+1),ZFLUCUP_i(klon,klev+1) 365 REAL(KIND=8) PPIZA_TOT(klon,klev,NSW) 366 REAL(KIND=8) PCGA_TOT(klon,klev,NSW) 367 REAL(KIND=8) PTAU_TOT(klon,klev,NSW) 368 REAL(KIND=8) PPIZA_NAT(klon,klev,NSW) 369 REAL(KIND=8) PCGA_NAT(klon,klev,NSW) 370 REAL(KIND=8) PTAU_NAT(klon,klev,NSW) 370 371 #ifdef CPP_RRTM 371 372 372 REAL(KIND=8) PTAU_LW_TOT(klon,klev,NLW) 373 REAL(KIND=8) PTAU_LW_NAT(klon,klev,NLW) 373 374 #endif 374 375 376 377 375 REAL(KIND=8) PSFSWDIR(klon,NSW) 376 REAL(KIND=8) PSFSWDIF(klon,NSW) 377 REAL(KIND=8) PFSDNN(klon) 378 REAL(KIND=8) PFSDNV(klon) 378 379 !MPL On ne redefinit pas les tableaux ZFLUX,ZFLUC, 379 380 !MPL ZFSDWN,ZFCDWN,ZFSUP,ZFCUP car ils existent deja 380 381 !MPL sous les noms de ZFLDN,ZFLDN0,ZFLUP,ZFLUP0, 381 382 !MPL ZFSDN,ZFSDN0,ZFSUP,ZFSUP0 382 383 384 385 386 387 388 389 390 391 383 REAL(KIND=8) ZFLUX_i (klon,2,klev+1) 384 REAL(KIND=8) ZFLUC_i (klon,2,klev+1) 385 REAL(KIND=8) ZFSDWN_i (klon,klev+1) 386 REAL(KIND=8) ZFCDWN_i (klon,klev+1) 387 REAL(KIND=8) ZFCCDWN_i (klon,klev+1) 388 REAL(KIND=8) ZFSUP_i (klon,klev+1) 389 REAL(KIND=8) ZFCUP_i (klon,klev+1) 390 REAL(KIND=8) ZFCCUP_i (klon,klev+1) 391 REAL(KIND=8) ZFLCCDWN_i (klon,klev+1) 392 REAL(KIND=8) ZFLCCUP_i (klon,klev+1) 392 393 ! 3 lignes suivantes a activer pour CCMVAL (MPL 20100412) 393 394 ! REAL(KIND=8) RSUN(3,2) 394 395 ! REAL(KIND=8) SUN(3) 395 396 ! REAL(KIND=8) SUN_FRACT(2) 396 real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2397 REAL, PARAMETER:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 397 398 CHARACTER (LEN=80) :: abort_message 398 399 CHARACTER (LEN=80) :: modname='radlwsw_m' 399 400 400 call assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") 401 REAL zdir, zdif 402 403 CALL assert(size(wo, 1) == klon, size(wo, 2) == klev, "radlwsw wo") 401 404 ! initialisation 402 405 ist=1 … … 414 417 zsolsw0_aero(:,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4 415 418 416 417 ZTOPSWADAERO(:) = 0. !ym missing init 418 ZSOLSWADAERO(:) = 0. !ym missing init 419 ZTOPSWAD0AERO(:) = 0. !ym missing init 420 ZSOLSWAD0AERO(:) = 0. !ym missing init 421 ZTOPSWAIAERO(:) = 0. !ym missing init 422 ZSOLSWAIAERO(:) = 0. !ym missing init 423 ZTOPSWCF_AERO(:,:)= 0.!ym missing init 424 ZSOLSWCF_AERO(:,:) =0. !ym missing init 419 ZTOPSWADAERO(:) = 0. !ym missing init 420 ZSOLSWADAERO(:) = 0. !ym missing init 421 ZTOPSWAD0AERO(:) = 0. !ym missing init 422 ZSOLSWAD0AERO(:) = 0. !ym missing init 423 ZTOPSWAIAERO(:) = 0. !ym missing init 424 ZSOLSWAIAERO(:) = 0. !ym missing init 425 ZTOPSWCF_AERO(:,:)= 0.!ym missing init 426 ZSOLSWCF_AERO(:,:) =0. !ym missing init 425 427 426 428 ! … … 454 456 #ifdef REPROBUS 455 457 IF (iflag_rrtm==0) THEN 456 if(ok_SUNTIME) PSCT = solaireTIME/zdist/zdist458 IF (ok_SUNTIME) PSCT = solaireTIME/zdist/zdist 457 459 print*,'Constante solaire: ',PSCT*zdist*zdist 458 END 460 ENDIF 459 461 #endif 460 END 462 ENDIF 461 463 462 464 DO j = 1, nb_gr … … 541 543 CALL RAD_INTERACTIF(POZON,iof) 542 544 #endif 543 END IF 544 545 ENDIF 545 546 ! 546 547 DO k = 1, kflev+1 … … 568 569 ENDDO 569 570 ENDDO 570 571 571 ! 572 572 !===== iflag_rrtm ================================================ 573 573 ! 574 574 IF (iflag_rrtm == 0) THEN !!!! remettre 0 juste pour tester l'ancien rayt via rrtm 575 ! 575 576 !--- Mise a zero des tableaux output du rayonnement LW-AR4 ---------- 576 577 DO k = 1, kflev+1 … … 651 652 zsolswaiaero(i)=0. 652 653 ENDDO 654 655 !--fraction of diffuse radiation in surface SW downward radiation 656 !--not computed with old radiation scheme 657 zsolswfdiff(:) = -999.999 658 653 659 ! print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract 654 660 ! daylight ozone, if we have it, for short wave … … 676 682 DO i=1,kdlon 677 683 DO k=1,kflev+1 678 ! print *,'iof i k klon klev=',iof,i,k,klon,klev679 684 lwdn0 ( iof+i,k) = ZFLDN0 ( i,k) 680 685 lwdn ( iof+i,k) = ZFLDN ( i,k) … … 687 692 ENDDO 688 693 ENDDO 689 ! print*,'SW_AR4 ZFSDN0 1 , klev:',ZFSDN0(1:klon,1),ZFSDN0(1:klon,klev) 690 ! print*,'SW_AR4 swdn0 1 , klev:',swdn0(1:klon,1),swdn0(1:klon,klev) 691 ! print*,'SW_AR4 ZFSUP0 1 , klev:',ZFSUP0(1:klon,1),ZFSUP0(1:klon,klev) 692 ! print*,'SW_AR4 swup0 1 , klev:',swup0(1:klon,1),swup0(1:klon,klev) 693 ! print*,'SW_AR4 ZFSDN 1 , klev:',ZFSDN(1:klon,1) ,ZFSDN(1:klon,klev) 694 ! print*,'SW_AR4 ZFSUP 1 , klev:',ZFSUP(1:klon,1) ,ZFSUP(1:klon,klev) 694 ! 695 695 ELSE 696 696 #ifdef CPP_RRTM … … 700 700 DO k = 1, kflev+1 701 701 DO i = 1, kdlon 702 ZEMTD_i(i,k)=0.703 ZEMTU_i(i,k)=0.704 ZTRSO_i(i,k)=0.705 ZTH_i(i,k)=0.706 ZLWFT_i(i,k)=0.707 ZSWFT_i(i,k)=0.708 ZFLUX_i(i,1,k)=0.709 ZFLUX_i(i,2,k)=0.710 ZFLUC_i(i,1,k)=0.711 ZFLUC_i(i,2,k)=0.712 ZFSDWN_i(i,k)=0.713 ZFCDWN_i(i,k)=0.714 ZFCCDWN_i(i,k)=0.715 ZFSUP_i(i,k)=0.716 ZFCUP_i(i,k)=0.717 ZFCCUP_i(i,k)=0.718 ZFLCCDWN_i(i,k)=0.719 ZFLCCUP_i(i,k)=0.702 ZEMTD_i(i,k)=0. 703 ZEMTU_i(i,k)=0. 704 ZTRSO_i(i,k)=0. 705 ZTH_i(i,k)=0. 706 ZLWFT_i(i,k)=0. 707 ZSWFT_i(i,k)=0. 708 ZFLUX_i(i,1,k)=0. 709 ZFLUX_i(i,2,k)=0. 710 ZFLUC_i(i,1,k)=0. 711 ZFLUC_i(i,2,k)=0. 712 ZFSDWN_i(i,k)=0. 713 ZFCDWN_i(i,k)=0. 714 ZFCCDWN_i(i,k)=0. 715 ZFSUP_i(i,k)=0. 716 ZFCUP_i(i,k)=0. 717 ZFCCUP_i(i,k)=0. 718 ZFLCCDWN_i(i,k)=0. 719 ZFLCCUP_i(i,k)=0. 720 720 ENDDO 721 721 ENDDO … … 771 771 PFSDNV(i)=0. 772 772 DO kk = 1, NSW 773 PSFSWDIR(i,kk)=0.774 PSFSWDIF(i,kk)=0.773 PSFSWDIR(i,kk)=0. 774 PSFSWDIF(i,kk)=0. 775 775 ENDDO 776 776 ENDDO … … 779 779 ! On met les donnees dans l'ordre des niveaux arpege 780 780 paprs_i(:,1)=paprs(:,klev+1) 781 dok=1,klev781 DO k=1,klev 782 782 paprs_i(1:klon,k+1) =paprs(1:klon,klev+1-k) 783 783 pplay_i(1:klon,k) =pplay(1:klon,klev+1-k) … … 794 794 ref_liq_pi_i(1:klon,k) =ref_liq_pi(1:klon,klev+1-k) 795 795 ref_ice_pi_i(1:klon,k) =ref_ice_pi(1:klon,klev+1-k) 796 enddo797 dok=1,kflev796 ENDDO 797 DO k=1,kflev 798 798 POZON_i(1:klon,k,:)=POZON(1:klon,kflev+1-k,:) 799 799 !!! POZON_i(1:klon,k)=POZON(1:klon,k) !!! on laisse 1=sol et klev=top 800 800 ! print *,'Juste avant RECMWFL: k tsol temp',k,tsol,t(1,k) 801 801 !!!!!!! Modif MPL 6.01.09 avec RRTM, on passe de 5 a 6 802 doi=1,6802 DO i=1,6 803 803 PAER_i(1:klon,k,i)=PAER(1:klon,kflev+1-k,i) 804 enddo805 enddo804 ENDDO 805 ENDDO 806 806 ! print *,'RADLWSW: avant RECMWFL, RI0,rmu0=',solaire,rmu0 807 807 … … 832 832 ! s 'RECMWF ') 833 833 ! 834 if(lldebug) then834 IF (lldebug) THEN 835 835 CALL writefield_phy('paprs_i',paprs_i,klev+1) 836 836 CALL writefield_phy('pplay_i',pplay_i,klev) … … 846 846 CALL writefield_phy('palbd_new',PALBD_NEW,NSW) 847 847 CALL writefield_phy('palbp_new',PALBP_NEW,NSW) 848 endif848 ENDIF 849 849 850 850 ! Nouvel appel a RECMWF (celui du cy32t0) … … 876 876 877 877 ! print *,'RADLWSW: apres RECMWF' 878 if(lldebug) then878 IF (lldebug) THEN 879 879 CALL writefield_phy('zemtd_i',ZEMTD_i,klev+1) 880 880 CALL writefield_phy('zemtu_i',ZEMTU_i,klev+1) … … 901 901 CALL writefield_phy('zfcdwn_i',ZFCDWN_i,klev+1) 902 902 CALL writefield_phy('zfcup_i',ZFCUP_i,klev+1) 903 endif903 ENDIF 904 904 ! --------- output RECMWFL 905 905 ! ZEMTD (KPROMA,KLEV+1) ; TOTAL DOWNWARD LONGWAVE EMISSIVITY … … 952 952 ZFLDNC0(i,k+1)= ZFLCCDWN_i(i,k+1) 953 953 ZFLUPC0(i,k+1)= ZFLCCUP_i(i,k+1) 954 IF (ok_volcan) THEN954 IF (ok_volcan) THEN 955 955 ZSWADAERO(i,k+1)=ZSWADAERO(i,k+1)*fract(i) !--NL 956 956 ENDIF … … 992 992 ! On renseigne les champs LMDz, pour avoir la meme chose qu'en sortie de 993 993 ! LW_LMDAR4 et SW_LMDAR4 994 995 !--fraction of diffuse radiation in surface SW downward radiation 996 DO i = 1, kdlon 997 IF (fract(i).GT.0.0) THEN 998 zdir=SUM(PSFSWDIR(i,:)) 999 zdif=SUM(PSFSWDIF(i,:)) 1000 zsolswfdiff(i) = zdif/(zdir+zdif) 1001 ELSE !--night 1002 zsolswfdiff(i) = 1.0 1003 ENDIF 1004 ENDDO 1005 ! 994 1006 DO i = 1, kdlon 995 1007 zsolsw(i) = ZSWFT(i,1) … … 1009 1021 ztoplw0(i) = ZLWFT0_i(i,klev+1)*(-1) 1010 1022 ! 1011 1023 IF (fract(i) == 0.) THEN 1012 1024 !!!!! A REVOIR MPL (20090630) ca n a pas de sens quand fract=0 1013 1025 ! pas plus que dans le sw_AR4 … … 1030 1042 ! ZLWFT(klon,k),ZSWFT 1031 1043 1032 dok=1,kflev1033 doi=1,kdlon1044 DO k=1,kflev 1045 DO i=1,kdlon 1034 1046 zheat(i,k)=(ZSWFT(i,k+1)-ZSWFT(i,k))*RDAY*RG/RCPD/PDP(i,k) 1035 1047 zheat0(i,k)=(ZSWFT0_i(i,k+1)-ZSWFT0_i(i,k))*RDAY*RG/RCPD/PDP(i,k) 1036 1048 zcool(i,k)=(ZLWFT(i,k)-ZLWFT(i,k+1))*RDAY*RG/RCPD/PDP(i,k) 1037 1049 zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k) 1038 IF (ok_volcan) THEN1050 IF (ok_volcan) THEN 1039 1051 zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL 1040 1052 zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL … … 1043 1055 ! ZFLUCUP_i(i,k)=ZFLUC_i(i,1,k) 1044 1056 ! ZFLUCDWN_i(i,k)=ZFLUC_i(i,2,k) 1045 enddo1046 enddo1057 ENDDO 1058 ENDDO 1047 1059 #else 1048 1060 abort_message="You should compile with -rrtm if running with iflag_rrtm=1" … … 1056 1068 toplw(iof+i) = ztoplw(i) 1057 1069 solsw(iof+i) = zsolsw(i) 1070 solswfdiff(iof+i) = zsolswfdiff(i) 1058 1071 sollw(iof+i) = zsollw(i) 1059 1072 sollwdown(iof+i) = zsollwdown(i) -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/suphel.F90
r3447 r3851 131 131 rcvv = rcpv - rv 132 132 rkappa = rd/rcpd 133 eps_w = rmv / rmd 133 134 retv = rv/rd - 1. 134 135 WRITE (UNIT=6, FMT='('' *** Thermodynamic, gas ***'')') -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/surf_landice_mod.F90
r3102 r3851 25 25 26 26 USE dimphy 27 USE surface_data, ONLY : type_ocean, calice, calsno, ok_snow27 USE surface_data, ONLY : type_ocean, calice, calsno, landice_opt, n_dtis 28 28 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic 29 29 USE cpl_mod, ONLY : cpl_send_landice_fields … … 36 36 USE surf_sisvat_mod, ONLY : surf_sisvat 37 37 #endif 38 39 #ifdef CPP_INLANDSIS 40 USE surf_inlandsis_mod, ONLY : surf_inlandsis 41 #endif 42 38 43 USE indice_sol_mod 39 44 … … 86 91 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1 ! new albedo in visible SW interval 87 92 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2 ! new albedo in near IR interval 88 REAL, DIMENSION(6), INTENT(IN) ::SFRWL89 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif93 REAL, DIMENSION(6), INTENT(IN) :: SFRWL 94 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif 90 95 !albedo SB <<< 91 96 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat … … 108 113 REAL, DIMENSION(klon) :: zfra, alb_neig 109 114 REAL, DIMENSION(klon) :: radsol 110 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 111 INTEGER :: i,j 115 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay, ustar 116 INTEGER :: i,j,nt 112 117 113 118 REAL, DIMENSION(klon) :: emis_new !Emissivity 114 119 REAL, DIMENSION(klon) :: swdown,lwdown 115 120 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection 116 REAL, DIMENSION(klon) :: bl_height, wind_velo !height boundary layer, wind spd121 REAL, DIMENSION(klon) :: zsl_height, wind_velo !surface layer height, wind spd 117 122 REAL, DIMENSION(klon) :: dens_air, snow_cont_air !air density; snow content air 118 123 REAL, DIMENSION(klon) :: alb_soil !albedo of underlying ice 119 124 REAL, DIMENSION(klon) :: pexner !Exner potential 120 125 REAL :: pref 121 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi 126 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modif 127 REAL :: dtis ! subtimestep 128 LOGICAL :: debut_is, lafin_is ! debut and lafin for inlandsis 122 129 123 130 CHARACTER (len = 20) :: modname = 'surf_landice' … … 139 146 LOGICAL, SAVE :: firstcall = .TRUE. 140 147 !$OMP THREADPRIVATE(firstcall) 141 !FC 142 143 148 149 150 !FC firtscall initializations 151 !****************************************************************************************** 144 152 IF (firstcall) THEN 145 153 alb_vis_sno_lic=0.77 … … 149 157 CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic) 150 158 PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic 159 160 ! z0m=1.e-3 161 ! z0h = z0m 151 162 firstcall=.false. 152 163 ENDIF 153 ! 164 !****************************************************************************************** 165 154 166 ! Initialize output variables 155 167 alb3(:) = 999999. … … 166 178 167 179 !**************************************************************************************** 168 ! ok_snow = TRUE : prepare and call SISVAT snow model 169 ! ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ... 170 ! 171 !**************************************************************************************** 172 IF (ok_snow) THEN 180 ! landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ... 181 ! landice_opt = 1 : prepare and call SISVAT snow model 182 ! landice_opt = 2 : prepare and call INLANDSIS snow model 183 !**************************************************************************************** 184 185 186 IF (landice_opt .EQ. 1) THEN 187 188 !**************************************************************************************** 189 ! CALL to SISVAT interface 190 !**************************************************************************************** 191 173 192 #ifdef CPP_SISVAT 174 193 ! Prepare for calling SISVAT … … 192 211 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 193 212 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 194 bl_height(i) = pphi1(i)/RG213 zsl_height(i) = pphi1(i)/RG 195 214 END DO 196 215 197 !**************************************************************************************** 198 ! CALL to SISVAT interface 199 ! 200 !**************************************************************************************** 216 201 217 ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs 202 218 DO i = 1, knon … … 209 225 rmu0, swdown, lwdown, pexner, ps, p1lay, & 210 226 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 211 bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &227 zsl_height, wind_velo, temp_air, dens_air, spechum, tsurf, & 212 228 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 213 229 radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, & … … 232 248 flux_u1, flux_v1) 233 249 #else 234 abort_message='Pb de coherence: ok_snow = .true.mais CPP_SISVAT = .false.'250 abort_message='Pb de coherence: landice_opt = 1 mais CPP_SISVAT = .false.' 235 251 CALL abort_physic(modname,abort_message,1) 236 252 #endif 237 ELSE ! ok_snow=FALSE 253 254 !**************************************************************************************** 255 ! CALL to INLANDSIS interface 256 !**************************************************************************************** 257 258 ELSE IF (landice_opt .EQ. 2) THEN 259 #ifdef CPP_INLANDSIS 260 261 debut_is=debut 262 lafin_is=.false. 263 ! Suppose zero surface speed 264 u0(:) = 0.0 265 v0(:) = 0.0 266 267 268 CALL calcul_flux_wind(knon, dtime, & 269 u0, v0, u1, v1, gustiness, cdragm, & 270 AcoefU, AcoefV, BcoefU, BcoefV, & 271 p1lay, temp_air, & 272 flux_u1, flux_v1) 273 274 275 ! Set constants and compute some input for SISVAT 276 ! = 1000 hPa 277 ! and calculate incoming flux for SW and LW interval: swdown, lwdown 278 swdown(:) = 0.0 279 lwdown(:) = 0.0 280 snow_adv(:) = 0. ! no snow blown in for now 281 snow_cont_air(:) = 0. 282 alb_soil(:) = 0.4 ! before albedo(:) but here it is the ice albedo that we have to set 283 ustar(:) = 0. 284 pref = 100000. 285 DO i = 1, knon 286 swdown(i) = swnet(i)/(1-albedo(i)) 287 lwdown(i) = lwdownm(i) 288 wind_velo(i) = u1(i)**2 + v1(i)**2 289 wind_velo(i) = wind_velo(i)**0.5 290 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 291 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 292 zsl_height(i) = pphi1(i)/RG 293 tsoil0(i,:) = tsoil(i,:) 294 ustar(i)= (cdragm(i)*(wind_velo(i)**2))**0.5 295 END DO 296 297 298 ! Subtimestepping 299 300 dtis=dtime/n_dtis 301 302 DO nt=1,n_dtis 303 304 IF (lafin .and. nt.eq.n_dtis) THEN 305 lafin_is=.true. 306 END IF 307 308 !PRINT*,'RENTRE DANS INLANDSIS','itime',itime,'dtime',dtime,'dtis',dtis 309 CALL surf_inlandsis(knon, rlon, rlat, knindex, itime, dtis, debut_is, lafin_is, & 310 rmu0, swdown, lwdown, albedo, pexner, ps, p1lay, & 311 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 312 zsl_height, wind_velo, ustar, temp_air, dens_air, spechum, tsurf, & 313 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 314 radsol, qsol, tsoil0, snow, zfra, snowhgt, qsnow, to_ice,sissnow, agesno, & 315 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragm, cdragh, & 316 run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, & 317 tsurf_new, alb1, alb2, alb3, & 318 emis_new, z0m, z0h, qsurf) 319 320 debut_is=.false. 321 322 END DO 323 324 325 #else 326 abort_message='Pb de coherence: landice_opt = 2 mais CPP_INLANDSIS = .false.' 327 CALL abort_physic(modname,abort_message,1) 328 #endif 329 330 331 332 ELSE 238 333 239 334 !**************************************************************************************** … … 241 336 ! 242 337 !**************************************************************************************** 338 339 ! EV: use calbeta 340 CALL calbeta(dtime, is_lic, knon, snow, qsol, beta, cal, dif_grnd) 341 342 343 ! use soil model and recalculate properly cal 243 344 IF (soil_model) THEN 244 345 CALL soil(dtime, is_lic, knon, snow, tsurf, tsoil, soilcap, soilflux) … … 255 356 ! 256 357 !**************************************************************************************** 257 beta(:) = 1.0258 dif_grnd(:) = 0.0358 ! beta(:) = 1.0 359 ! dif_grnd(:) = 0.0 259 360 260 361 ! Suppose zero surface speed … … 281 382 ! 282 383 !**************************************************************************************** 283 CALL fonte_neige( 384 CALL fonte_neige(knon, is_lic, knindex, dtime, & 284 385 tsurf, precip_rain, precip_snow, & 285 386 snow, qsol, tsurf_new, evap) … … 291 392 !**************************************************************************************** 292 393 CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 394 293 395 WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. 294 396 zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0))) … … 303 405 !IM: KstaTER0.77 & LMD_ARMIP6 304 406 305 ! Attantion: alb1 and alb2 are the same!407 ! Attantion: alb1 and alb2 are not the same! 306 408 alb1(1:knon) = alb_vis_sno_lic 307 409 alb2(1:knon) = alb_nir_sno_lic … … 316 418 z0m = SQRT(z0m**2+rugoro**2) 317 419 318 END IF ! ok_snow 420 421 422 423 424 425 END IF ! landice_opt 319 426 320 427 … … 333 440 334 441 !**************************************************************************************** 335 snow_o=0. 336 zfra_o = 0. 337 DO j = 1, knon 338 i = knindex(j) 339 snow_o(i) = snow(j) 340 zfra_o(i) = zfra(j) 341 ENDDO 342 442 ! Etienne: comment these lines because of duplication just below 443 ! snow_o=0. 444 ! zfra_o = 0. 445 ! DO j = 1, knon 446 ! i = knindex(j) 447 ! snow_o(i) = snow(j) 448 ! zfra_o(i) = zfra(j) 449 ! ENDDO 450 ! 343 451 !**************************************************************************************** 344 452 snow_o=0. -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/surf_ocean_mod.F90
r3395 r3851 20 20 z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & 21 21 tsurf_new, dflux_s, dflux_l, lmt_bils, & 22 flux_u1, flux_v1) 22 flux_u1, flux_v1, delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, tkt, tks, & 23 taur, sss) 23 24 24 25 use albedo, only: alboc, alboc_cd 26 use bulk_flux_m, only: bulk_flux 25 27 USE dimphy, ONLY: klon, zmasq 26 28 USE surface_data, ONLY : type_ocean … … 30 32 USE indice_sol_mod, ONLY : nbsrf, is_oce 31 33 USE limit_read_mod 34 use config_ocean_skin_m, only: activate_ocean_skin 32 35 ! 33 36 ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, … … 50 53 REAL, DIMENSION(klon), INTENT(IN) :: lwnet ! net longwave radiation at surface 51 54 REAL, DIMENSION(klon), INTENT(IN) :: alb1 ! albedo in visible SW interval 52 REAL, DIMENSION(klon), INTENT(IN) :: windsp 55 REAL, DIMENSION(klon), INTENT(IN) :: windsp ! wind at 10 m, in m s-1 53 56 REAL, DIMENSION(klon), INTENT(IN) :: rmu0 54 57 REAL, DIMENSION(klon), INTENT(IN) :: fder 55 REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in58 REAL, INTENT(IN):: tsurf_in(klon) ! defined only for subscripts 1:knon 56 59 REAL, DIMENSION(klon), INTENT(IN) :: p1lay,z1lay ! pression (Pa) et altitude (m) du premier niveau 57 60 REAL, DIMENSION(klon), INTENT(IN) :: cdragh … … 73 76 REAL, DIMENSION(klon), INTENT(inOUT):: z0h 74 77 78 REAL, intent(inout):: delta_sst(:) ! (knon) 79 ! Ocean-air interface temperature minus bulk SST, in K. Defined 80 ! only if activate_ocean_skin >= 1. 81 82 real, intent(inout):: delta_sal(:) ! (knon) 83 ! Ocean-air interface salinity minus bulk salinity, in ppt. Defined 84 ! only if activate_ocean_skin >= 1. 85 86 REAL, intent(inout):: ds_ns(:) ! (knon) 87 ! "delta salinity near surface". Salinity variation in the 88 ! near-surface turbulent layer. That is subskin salinity minus 89 ! foundation salinity. In ppt. 90 91 REAL, intent(inout):: dt_ns(:) ! (knon) 92 ! "delta temperature near surface". Temperature variation in the 93 ! near-surface turbulent layer. That is subskin temperature 94 ! minus foundation temperature. (Can be negative.) In K. 95 75 96 ! Output variables 76 !************************************************************************** ****97 !************************************************************************** 77 98 REAL, DIMENSION(klon), INTENT(OUT) :: z0m 78 99 !albedo SB >>> … … 83 104 !albedo SB <<< 84 105 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat 85 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new106 REAL, INTENT(OUT):: tsurf_new(klon) ! sea surface temperature, in K 86 107 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 87 108 REAL, DIMENSION(klon), INTENT(OUT) :: lmt_bils 88 109 REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 89 110 111 REAL, intent(out):: dter(:) ! (knon) 112 ! Temperature variation in the diffusive microlayer, that is 113 ! ocean-air interface temperature minus subskin temperature. In 114 ! K. 115 116 REAL, intent(out):: dser(:) ! (knon) 117 ! Salinity variation in the diffusive microlayer, that is 118 ! ocean-air interface salinity minus subskin salinity. In ppt. 119 120 REAL, intent(out):: tkt(:) ! (knon) 121 ! épaisseur (m) de la couche de diffusion thermique (microlayer) 122 ! cool skin thickness 123 124 REAL, intent(out):: tks(:) ! (knon) 125 ! épaisseur (m) de la couche de diffusion de masse (microlayer) 126 127 REAL, intent(out):: taur(:) ! (knon) 128 ! momentum flux due to rain, in Pa 129 130 real, intent(out):: sss(:) ! (klon) 131 ! Bulk salinity of the surface layer of the ocean, in ppt. (Only 132 ! defined for subscripts 1:knon, but we have to declare it with 133 ! size klon because of the coupling machinery.) 134 90 135 ! Local variables 91 !************************************************************************* *****136 !************************************************************************* 92 137 INTEGER :: i, k 93 138 REAL :: tmp … … 97 142 REAL, DIMENSION(klon) :: cdragq ! Cdrag pour l'evaporation 98 143 CHARACTER(len=20),PARAMETER :: modname="surf_ocean" 99 100 ! End definition 101 !****************************************************************************** 144 real rhoa(knon) ! density of moist air (kg / m3) 145 REAL sens_prec_liq(knon) 146 147 REAL t_int(knon) ! ocean-air interface temperature, in K 148 real s_int(knon) ! ocean-air interface salinity, in ppt 149 150 !************************************************************************** 102 151 103 152 … … 126 175 ENDIF 127 176 128 177 rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) 129 178 !****************************************************************************** 130 179 ! Switch according to type of ocean (couple, slab or forced) … … 139 188 AcoefH, AcoefQ, BcoefH, BcoefQ, & 140 189 AcoefU, AcoefV, BcoefU, BcoefV, & 141 ps, u1, v1, gustiness, &190 ps, u1, v1, gustiness, tsurf_in, & 142 191 radsol, snow, agesno, & 143 192 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 144 tsurf_new, dflux_s, dflux_l) 193 tsurf_new, dflux_s, dflux_l, sens_prec_liq, sss, delta_sal, rhoa, & 194 delta_sst) 145 195 146 196 CASE('slab') … … 162 212 AcoefH, AcoefQ, BcoefH, BcoefQ, & 163 213 AcoefU, AcoefV, BcoefU, BcoefV, & 164 ps, u1, v1, gustiness, &214 ps, u1, v1, gustiness, tsurf_in, & 165 215 radsol, snow, agesno, & 166 216 qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 167 tsurf_new, dflux_s, dflux_l )217 tsurf_new, dflux_s, dflux_l, sens_prec_liq, rhoa) 168 218 END SELECT 169 219 … … 268 318 CALL abort_physic(modname,'version non prevue',1) 269 319 ENDIF 270 ! 271 !****************************************************************************** 320 321 if (activate_ocean_skin >= 1) then 322 if (type_ocean /= 'couple') sss(:knon) = 35. 323 call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, & 324 u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = sss(:knon), & 325 rain = precip_rain(:knon) + precip_snow(:knon), & 326 hf = - fluxsens(:knon), hlb = - fluxlat(:knon), & 327 rnl = - lwnet(:knon), & 328 tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, & 329 xlv = [(rlvtt, i = 1, knon)], rf = - sens_prec_liq, dtime = dtime, & 330 rns = swnet(:knon)) 331 delta_sst = t_int - tsurf_new(:knon) 332 delta_sal = s_int - sss(:knon) 333 if (activate_ocean_skin >= 2) tsurf_new(:knon) = t_int 334 end if 335 272 336 END SUBROUTINE surf_ocean 273 !**************************************************************************** **337 !**************************************************************************** 274 338 ! 275 339 END MODULE surf_ocean_mod -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/surf_seaice_mod.F90
r3102 r3851 37 37 INCLUDE "dimsoil.h" 38 38 INCLUDE "clesphys.h" 39 40 INCLUDE "YOMCST.h" 41 ! for rd and retv 39 42 40 43 ! Input arguments … … 87 90 REAL, DIMENSION(klon) :: alb1_new,alb2_new 88 91 !albedo SB <<< 89 ! 92 93 real rhoa(knon) ! density of moist air (kg / m3) 94 90 95 ! End definitions 91 96 !**************************************************************************************** … … 98 103 radsol(:) = 0.0 99 104 radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) 105 106 rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) 100 107 101 108 !**************************************************************************************** … … 116 123 radsol, snow, qsurf, & 117 124 alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 118 tsurf_new, dflux_s, dflux_l )125 tsurf_new, dflux_s, dflux_l, rhoa) 119 126 120 127 ELSE IF (type_ocean == 'slab'.AND.version_ocean=='sicINT') THEN … … 138 145 radsol, snow, qsol, agesno, tsoil, & 139 146 qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & 140 tsurf_new, dflux_s, dflux_l )147 tsurf_new, dflux_s, dflux_l, rhoa) 141 148 142 149 END IF -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/surface_data.F90
r3327 r3851 15 15 !$OMP THREADPRIVATE(type_veget) 16 16 17 LOGICAL, SAVE :: ok_snow ! true for coupling to snow model SISVAT18 !$OMP THREADPRIVATE(ok_snow)19 20 17 CHARACTER(len=6), SAVE :: type_ocean ! force/slab/couple 21 18 !$OMP THREADPRIVATE(type_ocean) … … 30 27 !$OMP THREADPRIVATE(t_coupl) 31 28 29 ! FOR INLANDSIS: 30 !=============== 31 32 INTEGER, SAVE :: landice_opt ! 1 for coupling with SISVAT, 2 for coupling with INLANDSIS 33 !$OMP THREADPRIVATE(landice_opt) 34 35 INTEGER, SAVE :: iflag_tsurf_inlandsis ! 0 SISVAT method, 1 LMDZ method 36 !$OMP THREADPRIVATE(iflag_tsurf_inlandsis) 37 38 INTEGER, SAVE :: iflag_albzenith ! dependency of albedo to zenith angle 39 !$OMP THREADPRIVATE(iflag_albzenith) 40 41 INTEGER, SAVE :: n_dtis ! number of subtimesteps for INLANDSIS 42 !$OMP THREADPRIVATE(n_dtis) 43 44 ! with or without snow module/ blowing snow, ascii outfile 45 LOGICAL, SAVE :: SnoMod,BloMod,ok_outfor 46 !$OMP THREADPRIVATE(SnoMod,BloMod,ok_outfor) 47 32 48 END MODULE surface_data -
LMDZ6/branches/LMDZ-tracers/libf/phylmd/yamada4.F90
r3531 r3851 6 6 USE dimphy 7 7 USE ioipsl_getin_p_mod, ONLY : getin_p 8 8 USE phys_local_var_mod, only: tke_dissip 9 9 10 IMPLICIT NONE 10 11 include "iniprint.h" … … 56 57 ! iflag_pbl=11 -> the model starts with NP from start files created by ce0l 57 58 ! -> the model can run with longer time-steps. 58 ! 2016/11/30 (EV etienne.vignon@ univ-grenoble-alpes.fr)59 ! 2016/11/30 (EV etienne.vignon@lmd.ipsl.fr) 59 60 ! On met tke (=q2/2) en entr??e plut??t que q2 60 61 ! On corrige l'update de la tke 61 ! 62 ! 2020/10/01 (EV) 63 ! On ajoute la dissipation de la TKE en diagnostique de sortie 64 ! 62 65 ! Inpout/Output : 63 66 !============== … … 121 124 REAL,SAVE :: viscom,viscoh 122 125 !$OMP THREADPRIVATE( hboville,viscom,viscoh) 123 INTEGER ig, k126 INTEGER ig, jg, k 124 127 REAL ri, zrif, zalpha, zsm, zsn 125 128 REAL rif(klon, klev+1), sm(klon, klev+1), alpha(klon, klev) … … 186 189 viscom=1.46E-5 187 190 viscoh=2.06E-5 191 !lmixmin=1.0E-3 188 192 lmixmin=0. 189 193 yamada4_num=5 … … 416 420 ELSE IF (iflag_pbl>=10) THEN 417 421 422 shear(:,:)=0. 423 buoy(:,:)=0. 424 dissip(:,:)=0. 425 km(:,:)=0. 426 418 427 IF (yamada4_num>=1) THEN 419 428 … … 424 433 shear(ig,k)=km(ig, k)*m2(ig, k) 425 434 buoy(ig,k)=km(ig, k)*m2(ig, k)*(-1.*rif(ig,k)) 426 dissip(ig,k)=((sqrt(q2(ig,k)))**3)/(b1*l(ig,k)) 435 ! dissip(ig,k)=min(max(((sqrt(q2(ig,k)))**3)/(b1*l(ig,k)),1.E-12),1.E4) 436 dissip(ig,k)=((sqrt(q2(ig,k)))**3)/(b1*l(ig,k)) 427 437 ENDDO 428 438 ENDDO 429 439 430 440 IF (yamada4_num==1) THEN ! Schema du MAR tel quel 431 441 DO k = 2, klev - 1 … … 478 488 ENDDO 479 489 ENDDO 490 491 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 492 !! Attention, yamada4_num=5 est inexacte car néglige les termes de flottabilité 493 !! en conditions instables 494 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 480 495 ELSE IF (yamada4_num==5) THEN ! version modifiee avec integration exacte pour la dissipation 481 496 DO k = 2, klev - 1 … … 507 522 DO k = 2, klev - 1 508 523 DO ig=1,ngrid 524 !tkeprov=q2(ig,k)/ydeux 525 !tkeprov=tkeprov+max(buoy(ig,k)+shear(ig,k),0.)*dt 526 !disseff=dissip(ig,k)-min(0.,buoy(ig,k)+shear(ig,k)) 527 !tkeexp=exp(-dt*disseff/tkeprov) 528 !tkeprov= tkeprov*tkeexp 529 !q2(ig,k)=tkeprov*ydeux 530 ! En cas stable, on traite la flotabilite comme la 531 ! dissipation, en supposant que dissipeff/TKE est constant. 532 ! Puis on prend la solution exacte 533 ! 534 ! With drag and dissipation from high vegetation (EV & FC, 05/10/2020) 535 winds(ig,k)=sqrt(u(ig,k)**2+v(ig,k)**2) 509 536 tkeprov=q2(ig,k)/ydeux 510 tkeprov=tkeprov+max(buoy(ig,k)+shear(ig,k) ,0.)*dt511 disseff=dissip(ig,k)-min(0.,buoy(ig,k)+shear(ig,k) )537 tkeprov=tkeprov+max(buoy(ig,k)+shear(ig,k)+drgpro(ig,k)*(winds(ig,k))**3,0.)*dt 538 disseff=dissip(ig,k)-min(0.,buoy(ig,k)+shear(ig,k)+drgpro(ig,k)*(winds(ig,k))**3) + drgpro(ig,k)*tkeprov 512 539 tkeexp=exp(-dt*disseff/tkeprov) 513 540 tkeprov= tkeprov*tkeexp 514 541 q2(ig,k)=tkeprov*ydeux 515 ! En cas stable, on traite la flotabilite comme la 516 ! dissipation, en supposant que buoy/q2^3 est constant. 517 ! Puis on prend la solution exacte 542 518 543 ENDDO 519 544 ENDDO … … 725 750 726 751 !============================================================================ 752 ! Diagnostique de la dissipation 753 !============================================================================ 754 755 ! Diagnostics 756 tke_dissip(1:ngrid,:,nsrf)=0. 757 ! DO k=2,klev 758 ! DO ig=1,ngrid 759 ! jg=ni(ig) 760 ! tke_dissip(jg,k,nsrf)=dissip(ig,k) 761 ! ENDDO 762 ! ENDDO 763 764 !============================================================================= 727 765 728 766 RETURN … … 1017 1055 !===================================================================== 1018 1056 1019 1057 l1(1:ngrid,:)=0. 1020 1058 IF (iflag_pbl==8 .OR. iflag_pbl==10) THEN 1021 1059 … … 1135 1173 1136 1174 1137 DO k= 2,klev1175 DO k=1,klev+1 1138 1176 DO ig=1,ngrid 1139 1177 lmix(ig,k)=MAX(MAX(l1(ig,k), l2(ig,k)),lmixmin) -
LMDZ6/branches/LMDZ-tracers/makegcm
r3491 r3851 42 42 set cospv2=false 43 43 set sisvat=false 44 set inlandsis=false 44 45 45 46 set FC_LINUX=gfortran … … 518 519 case -sisvat 519 520 set sisvat="$2" ; shift ; shift ; goto top 521 case -inlandsis 522 set inlandsis="$2" ; shift ; shift ; goto top 523 520 524 521 525 case -filtre … … 621 625 endif 622 626 627 if ( "$inlandsis" == 'true' ) then 628 set cppflags="$cppflags -DCPP_INLANDSIS" 629 endif 630 631 623 632 if ( "$physique" == 'nophys' ) then 624 633 set phys="L_PHY= LIBPHY=" -
LMDZ6/branches/LMDZ-tracers/makelmdz
r3574 r3851 28 28 cospv2=false 29 29 sisvat=false 30 inlandsis=false 30 31 rrtm=false 31 32 rrtm=false … … 86 87 ######################################################################## 87 88 88 CPP_KEY=" "89 CPP_KEY="IN_LMDZ" 89 90 INCLUDE='-I$(LIBF)/grid -I$(LIBF)/misc -I$(LIBF)/filtrez -I. ' 90 91 LIB="" … … 122 123 [-cospv2 true/false] : compile with/without cospv2 package (default: false) 123 124 [-sisvat true/false] : compile with/without sisvat package (default: false) 125 [-inlandsis true/false] : compile with/without inlandsis package (default: false) 124 126 [-rrtm true/false] : compile with/without rrtm package (default: false) 125 127 [-dust true/false] : compile with/without the dust package from Boucher et al. (default: false) … … 192 194 "-sisvat") 193 195 sisvat="$2" ; shift ; shift ;; 194 196 197 "-inlandsis") 198 inlandsis="$2" ; shift ; shift ;; 199 195 200 "-rrtm") 196 201 rrtm="$2" ; shift ; shift ;; … … 519 524 fi 520 525 526 527 if [[ "$inlandsis" == "true" ]] 528 then 529 CPP_KEY="$CPP_KEY CPP_INLANDSIS" 530 src_dirs="$src_dirs phy${physique}/inlandsis" 531 fi 532 533 521 534 if [[ "$rrtm" == "true" ]] 522 535 then … … 536 549 src_dirs="$src_dirs phy${physique}/StratAer" 537 550 fi 551 552 #add new ocean skin modelisation to source dir by default 553 554 src_dirs="$src_dirs phy${physique}/Ocean_skin" 538 555 539 556 -
LMDZ6/branches/LMDZ-tracers/makelmdz_fcm
r3647 r3851 24 24 veget=false 25 25 sisvat=false 26 inlandsis=false 26 27 rrtm=false 27 28 dust=false … … 64 65 ######################################################################## 65 66 66 CPP_KEY=" "67 CPP_KEY="IN_LMDZ" 67 68 INCLUDE="" 68 69 LIB="" … … 99 100 [-cospv2 true/false] : compile with/without cospv2 package (default: false) 100 101 [-sisvat true/false] : compile with/without sisvat package (default: false) 102 [-inlandsis true/false] : compile with/without inlandsis package (default: false) 101 103 [-rrtm true/false] : compile with/without rrtm package (default: false) 102 104 [-dust true/false] : compile with/without the dust package by Boucher and co (default: false) … … 151 153 "-sisvat") 152 154 sisvat="$2" ; shift ; shift ;; 155 156 "-inlandsis") 157 inlandsis="$2" ; shift ; shift ;; 153 158 154 159 "-rrtm") … … 415 420 fi 416 421 422 if [[ "$inlandsis" == "true" ]] 423 then 424 CPP_KEY="$CPP_KEY CPP_INLANDSIS" 425 INLANDSIS_PATH="$LIBFGCM/%PHYS/inlandsis" 426 fi 427 428 417 429 if [[ "$rrtm" == "true" ]] 418 430 then … … 629 641 then 630 642 SUFF_NAME=${SUFF_NAME}_orch 643 fi 644 645 if [[ $dust == "true" ]] 646 then 647 SUFF_NAME=${SUFF_NAME}_spla 631 648 fi 632 649 … … 681 698 echo "%STRATAER $STRATAER_PATH" >> $config_fcm 682 699 echo "%SISVAT $SISVAT_PATH" >> $config_fcm 700 echo "%INLANDSIS $INLANDSIS_PATH" >> $config_fcm 683 701 echo "%COSP $COSP_PATH" >> $config_fcm 684 702 echo "%CPP_KEY $CPP_KEY" >> $config_fcm
Note: See TracChangeset
for help on using the changeset viewer.