Changeset 2542 for LMDZ5/branches
- Timestamp:
- Jun 6, 2016, 4:04:57 PM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 deleted
- 58 edited
- 9 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2489-2527,2529-2532,2534-2541
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/DefLists/config.def_LMDZ5_AGCM
r2160 r2542 81 81 ### If aerosol offline : type of coupled aerosol =0 (pas d aerosol) =1 (sulphate only default) =2 => bc only =3 => pom only =4 => seasalt only =5 => dust only =6 => all aerosol 82 82 flag_aerosol=6 83 # Use stratospheric aerosols ( default no)84 flag_aerosol_strat= n83 # Use stratospheric aerosols (0, 1, 2 - default 0) 84 flag_aerosol_strat=0 85 85 ### bl95_b0 = Parameter in CDNC-maer link (Boucher&Lohmann 1995) 86 86 bl95_b0=1.7 -
LMDZ5/branches/testing/DefLists/context_lmdz.xml
r2435 r2542 1 1 <!-- Context LMDZ --> 2 <context id="LMDZ" calendar_type="D360" start_date="1980-01-01 00:00:00"> 2 <context id="LMDZ"> 3 <!-- <calendar type="D360" start_date="1980-01-01 00:00:00" /> --> 3 4 4 5 <!-- Define available variables --> … … 27 28 28 29 <!-- Need to define a grid? Do it here --> 29 <grid_definition>30 <!-- <grid_definition> 30 31 <grid_group id="vertical" axis_ref="presnivs" /> 31 </grid_ definition>32 </grid_> --> 32 33 33 34 <!-- Define groups of vertical axes --> -
LMDZ5/branches/testing/DefLists/field_def_lmdz.xml
r2488 r2542 64 64 <field id="precip" long_name="Precip Totale liq+sol" unit="kg/(s*m2)" /> 65 65 <field id="plul" long_name="Large-scale Precip." unit="kg/(s*m2)" /> 66 <field id="plun" long_name="Numerical Precip." unit="kg/(s*m2)" /> 66 67 <field id="pluc" long_name="Convective Precip." unit="kg/(s*m2)" /> 67 68 <field id="snow" long_name="Snow fall" unit="kg/(s*m2)" /> … … 124 125 <field id="fqcalving" long_name="Ice Calving" unit="kg/m2/s" /> 125 126 <field id="fqfonte" long_name="Land ice melt" unit="kg/m2/s" /> 127 <field id="runofflic" long_name="Land ice melt to ocean" unit="kg/m2/s" /> 126 128 <field id="taux" long_name="Zonal wind stress" unit="Pa" /> 127 129 <field id="tauy" long_name="Meridional wind stress" unit="Pa" /> … … 195 197 <field id="wbeff" long_name="Conv. updraft velocity at LFC (inf100)" unit="m/s" /> 196 198 <field id="prw" long_name="Precipitable water" unit="kg/m2" /> 199 <field id="prlw" long_name="Precipitable liquid water" unit="kg/m2" /> 200 <field id="prsw" long_name="Precipitable solid water" unit="kg/m2" /> 197 201 <field id="s_pblh" long_name="Boundary Layer Height" unit="m" /> 198 202 <field id="s_pblt" long_name="t at Boundary Layer Height" unit="K" /> … … 375 379 <field id="z0h_oce" long_name="roughness length, enthalpy oce" unit="m" /> 376 380 <field id="z0h_sic" long_name="roughness length, enthalpy sic" unit="m" /> 381 <field id="sens_rain_oce" long_name="Sensible heat flux associated withliquid prec. over ocean" unit="W/m2" /> 382 <field id="sens_rain_sic" long_name="Sensible heat flux associated with liquid prec. over seaice" unit="W/m2" /> 383 <field id="sens_snow_oce" long_name="Sensible heat flux associated with solid prec. over ocean" unit="W/m2" /> 384 <field id="sens_snow_sic" long_name="Sensible heat flux associated with solid prec. over seaice" unit="W/m2" /> 385 <field id="lat_rain_oce" long_name="Latent heat flux associated with liquid prec. over ocean" unit="W/m2" /> 386 <field id="lat_rain_sic" long_name="Latent heat flux associated with liquid prec. over seaice" unit="W/m2" /> 387 <field id="lat_snow_oce" long_name="Latent heat flux associated with solid prec. over ocean" unit="W/m2" /> 388 <field id="lat_snow_sic" long_name="Latent heat flux associated with solid prec. over seaice" unit="W/m2" /> 377 389 <field id="alb1" long_name="Surface VIS albedo" unit="-" /> 378 390 <field id="alb2" long_name="Surface Near IR albedo" unit="-" /> … … 392 404 <field id="rlutcs4co2" long_name="TOA Out CS LW in 4xCO2 atmosphere" unit="W/m2" /> 393 405 <field id="dqphy2d" long_name="Physics dQ" unit="(kg/m2)/s" /> 406 <field id="dqlphy2d" long_name="Physics dQL" unit="(kg/m2)/s" /> 407 <field id="dqsphy2d" long_name="Physics dQS" unit="(kg/m2)/s" /> 394 408 <field id="dqdyn2d" long_name="Dynamics dQ" unit="(kg/m2)/s" /> 409 <field id="dqldyn2d" long_name="Dynamics dQL" unit="(kg/m2)/s" /> 410 <field id="dqsdyn2d" long_name="Dynamics dQS" unit="(kg/m2)/s" /> 395 411 <field id="dqcon2d" long_name="Convection dQ" unit="(kg/m2)/s" /> 396 412 <field id="dqwak2d" long_name="Wake dQ" unit="(kg/m2)/s" /> … … 456 472 <field id="dtphy" long_name="Physics dT" unit="K/s" /> 457 473 <field id="dqphy" long_name="Physics dQ" unit="(kg/kg)/s" /> 474 <field id="dqlphy" long_name="Physics dQL" unit="(kg/kg)/s" /> 475 <field id="dqsphy" long_name="Physics dQS" unit="(kg/kg)/s" /> 458 476 <field id="pr_con_l" long_name="Convective precipitation lic" unit="-" /> 459 477 <field id="pr_con_i" long_name="Convective precipitation ice" unit="-" /> … … 475 493 <field id="dtdyn" long_name="Dynamics dT" unit="K/s" /> 476 494 <field id="dqdyn" long_name="Dynamics dQ" unit="(kg/kg)/s" /> 495 <field id="dqldyn" long_name="Dynamics dQL" unit="(kg/kg)/s" /> 496 <field id="dqsdyn" long_name="Dynamics dQS" unit="(kg/kg)/s" /> 477 497 <field id="dudyn" long_name="Dynamics dU" unit="m/s2" /> 478 498 <field id="dvdyn" long_name="Dynamics dV" unit="m/s2" /> … … 569 589 <field id="rsdcs4co2" long_name="Downwelling CS SW 4xCO2 atmosphere" unit="W/m2" /> 570 590 <field id="rldcs4co2" long_name="Downwelling CS LW 4xCO2 atmosphere" unit="W/m2" /> 591 <field id="stratomask" long_name="Stratospheric fraction" unit="-" /> 571 592 </field_group> 572 593 … … 584 605 <field id="tro3_daylight" long_name="Daylight ozone mole fraction" unit="1e-9" /> 585 606 <field id="uv" long_name="uv" unit="m2/s2" /> 586 <!-- a field called "vq" is already defined... 587 <field id="vq" long_name="vq" unit="m/s * (kg/kg)" /> --> 607 <field id="vxq" long_name="vxq" unit="m/s * (kg/kg)" /> 588 608 <field id="vT" long_name="vT" unit="mK/s" /> 589 609 <field id="wq" long_name="wq" unit="(Pa/s)*(kg/kg)" /> -
LMDZ5/branches/testing/DefLists/file_def_histLES_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="5" /> 61 61 <field field_ref="plul" level="10" /> 62 <field field_ref="plun" level="10" /> 62 63 <field field_ref="pluc" level="5" /> 63 64 <field field_ref="snow" level="5" /> … … 111 112 <field field_ref="fqcalving" level="10" /> 112 113 <field field_ref="fqfonte" level="10" /> 114 <field field_ref="runofflic" level="10" /> 113 115 <field field_ref="taux" level="10" /> 114 116 <field field_ref="tauy" level="10" /> … … 182 184 <field field_ref="wbeff" level="10" /> 183 185 <field field_ref="prw" level="10" /> 186 <field field_ref="prlw" level="10" /> 187 <field field_ref="prsw" level="10" /> 184 188 <field field_ref="s_pblh" level="10" /> 185 189 <field field_ref="s_pblt" level="10" /> … … 383 387 <field field_ref="rlutcs4co2" level="10" /> 384 388 <field field_ref="dqphy2d" level="10" /> 389 <field field_ref="dqlphy2d" level="10" /> 390 <field field_ref="dqsphy2d" level="10" /> 385 391 <field field_ref="dqdyn2d" level="10" /> 392 <field field_ref="dqldyn2d" level="10" /> 393 <field field_ref="dqsdyn2d" level="10" /> 386 394 <field field_ref="dqcon2d" level="10" /> 387 395 <field field_ref="dqwak2d" level="10" /> … … 433 441 <field field_ref="dtphy" level="10" /> 434 442 <field field_ref="dqphy" level="10" /> 443 <field field_ref="dqlphy" level="10" /> 444 <field field_ref="dqsphy" level="10" /> 435 445 <field field_ref="pr_con_l" level="10" /> 436 446 <field field_ref="pr_con_i" level="10" /> … … 452 462 <field field_ref="dtdyn" level="10" /> 453 463 <field field_ref="dqdyn" level="10" /> 464 <field field_ref="dqldyn" level="10" /> 465 <field field_ref="dqsdyn" level="10" /> 454 466 <field field_ref="dudyn" level="10" /> 455 467 <field field_ref="dvdyn" level="10" /> -
LMDZ5/branches/testing/DefLists/file_def_histday_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="1" /> 61 61 <field field_ref="plul" level="1" /> 62 <field field_ref="plun" level="1" /> 62 63 <field field_ref="pluc" level="1" /> 63 64 <field field_ref="snow" level="1" /> … … 111 112 <field field_ref="fqcalving" level="10" /> 112 113 <field field_ref="fqfonte" level="10" /> 114 <field field_ref="runofflic" level="10" /> 113 115 <field field_ref="taux" level="10" /> 114 116 <field field_ref="tauy" level="10" /> … … 182 184 <field field_ref="wbeff" level="10" /> 183 185 <field field_ref="prw" level="1" /> 186 <field field_ref="prlw" level="1" /> 187 <field field_ref="prsw" level="1" /> 184 188 <field field_ref="s_pblh" level="10" /> 185 189 <field field_ref="s_pblt" level="10" /> … … 383 387 <field field_ref="rlutcs4co2" level="10" /> 384 388 <field field_ref="dqphy2d" level="10" /> 389 <field field_ref="dqlphy2d" level="10" /> 390 <field field_ref="dqsphy2d" level="10" /> 385 391 <field field_ref="dqdyn2d" level="10" /> 392 <field field_ref="dqldyn2d" level="10" /> 393 <field field_ref="dqsdyn2d" level="10" /> 386 394 <field field_ref="dqcon2d" level="10" /> 387 395 <field field_ref="dqwak2d" level="10" /> … … 433 441 <field field_ref="dtphy" level="10" /> 434 442 <field field_ref="dqphy" level="10" /> 443 <field field_ref="dqlphy" level="10" /> 444 <field field_ref="dqsphy" level="10" /> 435 445 <field field_ref="pr_con_l" level="10" /> 436 446 <field field_ref="pr_con_i" level="10" /> … … 452 462 <field field_ref="dtdyn" level="10" /> 453 463 <field field_ref="dqdyn" level="10" /> 464 <field field_ref="dqldyn" level="10" /> 465 <field field_ref="dqsdyn" level="10" /> 454 466 <field field_ref="dudyn" level="10" /> 455 467 <field field_ref="dvdyn" level="10" /> -
LMDZ5/branches/testing/DefLists/file_def_histhf_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="10" /> 61 61 <field field_ref="plul" level="10" /> 62 <field field_ref="plun" level="10" /> 62 63 <field field_ref="pluc" level="10" /> 63 64 <field field_ref="snow" level="10" /> … … 111 112 <field field_ref="fqcalving" level="10" /> 112 113 <field field_ref="fqfonte" level="10" /> 114 <field field_ref="runofflic" level="10" /> 113 115 <field field_ref="taux" level="10" /> 114 116 <field field_ref="tauy" level="10" /> … … 182 184 <field field_ref="wbeff" level="10" /> 183 185 <field field_ref="prw" level="10" /> 186 <field field_ref="prlw" level="10" /> 187 <field field_ref="prsw" level="10" /> 184 188 <field field_ref="s_pblh" level="10" /> 185 189 <field field_ref="s_pblt" level="10" /> … … 383 387 <field field_ref="rlutcs4co2" level="10" /> 384 388 <field field_ref="dqphy2d" level="10" /> 389 <field field_ref="dqlphy2d" level="10" /> 390 <field field_ref="dqsphy2d" level="10" /> 385 391 <field field_ref="dqdyn2d" level="10" /> 392 <field field_ref="dqldyn2d" level="10" /> 393 <field field_ref="dqsdyn2d" level="10" /> 386 394 <field field_ref="dqcon2d" level="10" /> 387 395 <field field_ref="dqwak2d" level="10" /> … … 433 441 <field field_ref="dtphy" level="10" /> 434 442 <field field_ref="dqphy" level="10" /> 443 <field field_ref="dqlphy" level="10" /> 444 <field field_ref="dqsphy" level="10" /> 435 445 <field field_ref="pr_con_l" level="10" /> 436 446 <field field_ref="pr_con_i" level="10" /> … … 452 462 <field field_ref="dtdyn" level="10" /> 453 463 <field field_ref="dqdyn" level="10" /> 464 <field field_ref="dqldyn" level="10" /> 465 <field field_ref="dqsdyn" level="10" /> 454 466 <field field_ref="dudyn" level="10" /> 455 467 <field field_ref="dvdyn" level="10" /> -
LMDZ5/branches/testing/DefLists/file_def_histins_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="1" /> 61 61 <field field_ref="plul" level="1" /> 62 <field field_ref="plun" level="1" /> 62 63 <field field_ref="pluc" level="1" /> 63 64 <field field_ref="snow" level="10" /> … … 111 112 <field field_ref="fqcalving" level="10" /> 112 113 <field field_ref="fqfonte" level="10" /> 114 <field field_ref="runofflic" level="10" /> 113 115 <field field_ref="taux" level="10" /> 114 116 <field field_ref="tauy" level="10" /> … … 182 184 <field field_ref="wbeff" level="10" /> 183 185 <field field_ref="prw" level="10" /> 186 <field field_ref="prlw" level="10" /> 187 <field field_ref="prsw" level="10" /> 184 188 <field field_ref="s_pblh" level="10" /> 185 189 <field field_ref="s_pblt" level="10" /> … … 383 387 <field field_ref="rlutcs4co2" level="10" /> 384 388 <field field_ref="dqphy2d" level="10" /> 389 <field field_ref="dqlphy2d" level="10" /> 390 <field field_ref="dqsphy2d" level="10" /> 385 391 <field field_ref="dqdyn2d" level="10" /> 392 <field field_ref="dqldyn2d" level="10" /> 393 <field field_ref="dqsdyn2d" level="10" /> 386 394 <field field_ref="dqcon2d" level="10" /> 387 395 <field field_ref="dqwak2d" level="10" /> … … 433 441 <field field_ref="dtphy" level="10" /> 434 442 <field field_ref="dqphy" level="10" /> 443 <field field_ref="dqlphy" level="10" /> 444 <field field_ref="dqsphy" level="10" /> 435 445 <field field_ref="pr_con_l" level="10" /> 436 446 <field field_ref="pr_con_i" level="10" /> … … 452 462 <field field_ref="dtdyn" level="10" /> 453 463 <field field_ref="dqdyn" level="10" /> 464 <field field_ref="dqldyn" level="10" /> 465 <field field_ref="dqsdyn" level="10" /> 454 466 <field field_ref="dudyn" level="10" /> 455 467 <field field_ref="dvdyn" level="10" /> -
LMDZ5/branches/testing/DefLists/file_def_histmth_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="1" /> 61 61 <field field_ref="plul" level="1" /> 62 <field field_ref="plun" level="1" /> 62 63 <field field_ref="pluc" level="1" /> 63 64 <field field_ref="snow" level="1" /> … … 111 112 <field field_ref="fqcalving" level="1" /> 112 113 <field field_ref="fqfonte" level="1" /> 114 <field field_ref="runofflic" level="1" /> 113 115 <field field_ref="taux" level="1" /> 114 116 <field field_ref="tauy" level="1" /> … … 182 184 <field field_ref="wbeff" level="1" /> 183 185 <field field_ref="prw" level="1" /> 186 <field field_ref="prlw" level="1" /> 187 <field field_ref="prsw" level="1" /> 184 188 <field field_ref="s_pblh" level="1" /> 185 189 <field field_ref="s_pblt" level="1" /> … … 383 387 <field field_ref="rlutcs4co2" level="5" /> 384 388 <field field_ref="dqphy2d" level="2" /> 389 <field field_ref="dqlphy2d" level="2" /> 390 <field field_ref="dqsphy2d" level="2" /> 385 391 <field field_ref="dqdyn2d" level="4" /> 392 <field field_ref="dqldyn2d" level="4" /> 393 <field field_ref="dqsdyn2d" level="4" /> 386 394 <field field_ref="dqcon2d" level="4" /> 387 395 <field field_ref="dqwak2d" level="4" /> … … 433 441 <field field_ref="dtphy" level="2" /> 434 442 <field field_ref="dqphy" level="2" /> 443 <field field_ref="dqlphy" level="2" /> 444 <field field_ref="dqsphy" level="2" /> 435 445 <field field_ref="pr_con_l" level="2" /> 436 446 <field field_ref="pr_con_i" level="2" /> … … 452 462 <field field_ref="dtdyn" level="4" /> 453 463 <field field_ref="dqdyn" level="4" /> 464 <field field_ref="dqldyn" level="4" /> 465 <field field_ref="dqsdyn" level="4" /> 454 466 <field field_ref="dudyn" level="4" /> 455 467 <field field_ref="dvdyn" level="4" /> -
LMDZ5/branches/testing/DefLists/file_def_histstn_lmdz.xml
r2488 r2542 60 60 <field field_ref="precip" level="10" /> 61 61 <field field_ref="plul" level="10" /> 62 <field field_ref="plun" level="10" /> 62 63 <field field_ref="pluc" level="10" /> 63 64 <field field_ref="snow" level="10" /> … … 111 112 <field field_ref="fqcalving" level="10" /> 112 113 <field field_ref="fqfonte" level="10" /> 114 <field field_ref="runofflic" level="10" /> 113 115 <field field_ref="taux" level="10" /> 114 116 <field field_ref="tauy" level="10" /> … … 182 184 <field field_ref="wbeff" level="10" /> 183 185 <field field_ref="prw" level="10" /> 186 <field field_ref="prlw" level="10" /> 187 <field field_ref="prsw" level="10" /> 184 188 <field field_ref="s_pblh" level="10" /> 185 189 <field field_ref="s_pblt" level="10" /> … … 383 387 <field field_ref="rlutcs4co2" level="10" /> 384 388 <field field_ref="dqphy2d" level="10" /> 389 <field field_ref="dqlphy2d" level="10" /> 390 <field field_ref="dqsphy2d" level="10" /> 385 391 <field field_ref="dqdyn2d" level="10" /> 392 <field field_ref="dqldyn2d" level="10" /> 393 <field field_ref="dqsdyn2d" level="10" /> 386 394 <field field_ref="dqcon2d" level="10" /> 387 395 <field field_ref="dqwak2d" level="10" /> … … 433 441 <field field_ref="dtphy" level="10" /> 434 442 <field field_ref="dqphy" level="10" /> 443 <field field_ref="dqlphy" level="10" /> 444 <field field_ref="dqsphy" level="10" /> 435 445 <field field_ref="pr_con_l" level="10" /> 436 446 <field field_ref="pr_con_i" level="10" /> … … 452 462 <field field_ref="dtdyn" level="10" /> 453 463 <field field_ref="dqdyn" level="10" /> 464 <field field_ref="dqldyn" level="10" /> 465 <field field_ref="dqsdyn" level="10" /> 454 466 <field field_ref="dudyn" level="10" /> 455 467 <field field_ref="dvdyn" level="10" /> -
LMDZ5/branches/testing/DefLists/iodef.xml
r2056 r2542 10 10 11 11 <variable_group id="parameters" > 12 <variable id="using_server" type="bool ean">true</variable>12 <variable id="using_server" type="bool">true</variable> 13 13 <variable id="info_level" type="int">0</variable> 14 14 </variable_group> -
LMDZ5/branches/testing/DefLists/physiq.def_L79_NPv5.4
r2471 r2542 185 185 iflag_cloudth_vert=1 186 186 187 ### Convection 188 #altitude, in hPa, above LCL at which buoybase is computed, def = original: -40 189 dpbase=-40. 190 #altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0 191 pbcrit=150.0 192 #altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0 193 ptcrit=500.0 194 #reference fractional area of precipitating downdraughts, def = original: 0.01 195 sigdz=0.01 196 #unsaturated fraction of precipitating downdraughts, def = original: 0.15 197 spfac=0.15 198 #relaxation time of cloud base mass flux, def = original: 8000 199 tau=8000. 200 #flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1 201 flag_wb=1 202 #parameter used in the computation of wb, def = 6. 203 wbmax=6. 204 # 205 ok_convstop=.False. 206 # 207 tau_stop=15000. 208 # 209 ok_intermittent=.False. 210 #shedding coefficient (used when iflag_mix_adiab=1) 211 coef_peel=0.25 212 # 213 ### Clouds 214 #Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1 215 flag_epKEorig=1 216 #max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1 217 elcrit=0.0003 218 #temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1 219 tlcrit=-55.0 220 221 ### Wakes 222 #coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33 223 stark=0.33 224 #lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25 225 alpk=0.25 226 #wake density = number of wake centers per m2, def: 8.E-12 227 wdens_ref=8.E-12 228 #multiplicative factor of the damping by gravity waves, def: 4. 229 coefgw=4. -
LMDZ5/branches/testing/DefLists/physiq.def_L79_NPv5.5
r2488 r2542 190 190 #Bergeron 191 191 iflag_bergeron=1 192 193 194 ### Convection 195 #altitude, in hPa, above LCL at which buoybase is computed, def = original: -40 196 dpbase=-40. 197 #altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0 198 pbcrit=150.0 199 #altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0 200 ptcrit=500.0 201 #reference fractional area of precipitating downdraughts, def = original: 0.01 202 sigdz=0.01 203 #unsaturated fraction of precipitating downdraughts, def = original: 0.15 204 spfac=0.15 205 #relaxation time of cloud base mass flux, def = original: 8000 206 tau=8000. 207 #flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1 208 flag_wb=1 209 #parameter used in the computation of wb, def = 6. 210 wbmax=6. 211 # 212 ok_convstop=.False. 213 # 214 tau_stop=15000. 215 # 216 ok_intermittent=.False. 217 #shedding coefficient (used when iflag_mix_adiab=1) 218 coef_peel=0.25 219 # 220 ### Clouds 221 #Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1 222 flag_epKEorig=1 223 #max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1 224 elcrit=0.0003 225 #temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1 226 tlcrit=-55.0 227 228 ### Wakes 229 #coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33 230 stark=0.33 231 #lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25 232 alpk=0.25 233 #wake density = number of wake centers per m2, def: 8.E-12 234 wdens_ref=8.E-12 235 #multiplicative factor of the damping by gravity waves, def: 4. 236 coefgw=4. -
LMDZ5/branches/testing/DefLists/physiq.def_NPv5.4
r2471 r2542 185 185 iflag_cloudth_vert=1 186 186 187 ### Convection: le fichier convection.def 188 #altitude, in hPa, above LCL at which buoybase is computed, def = original: -40 189 dpbase=-40. 190 #altitude, in hPa, above LCL below which Ep=0, def = original: 150, used only if flag_epKEorig=0 191 pbcrit=150.0 192 #altitude, in hPa, above LCL above which Ep=Epmax, def = original: 500, used only if flag_epKEorig=0 193 ptcrit=500.0 194 #reference fractional area of precipitating downdraughts, def = original: 0.01 195 sigdz=0.01 196 #unsaturated fraction of precipitating downdraughts, def = original: 0.15 197 spfac=0.15 198 #relaxation time of cloud base mass flux, def = original: 8000 199 tau=8000. 200 #flag for wb (= vert velocity at LFC); 0->wb=wbmax, 1->wb=f(plfc) bounded, 2->wb=f(plfc) linear, def = 1 201 flag_wb=1 202 #parameter used in the computation of wb, def = 6. 203 wbmax=6. 204 # 205 ok_convstop=.False. 206 # 207 tau_stop=15000. 208 # 209 ok_intermittent=.False. 210 #shedding coefficient (used when iflag_mix_adiab=1) 211 coef_peel=0.25 212 # 213 ### Clouds 214 #Conversion cld water->precip: Ep=f(pressure) if 0; Ep=f(temperature) if 1, def=1 215 flag_epKEorig=1 216 #max condensed water concentration in kg/kg, def=0.0003, original: 0.0011, used only if flag_epKEorig=1 217 elcrit=0.0003 218 #temperature in degre Celsius, at which Ep=Epmax, def=-55., original: -55, used only if flag_epKEorig=1 219 tlcrit=-55.0 220 221 ### Wakes 222 #coefficient in Wape->C_star formula: C_star=stark*sqrt(2*Wape), def: 0.33 223 stark=0.33 224 #lifting efficiency of wakes; Alp=Alpk*Fip, Fip=power provided by wakes, def: 0.25 225 alpk=0.25 226 #wake density = number of wake centers per m2, def: 8.E-12 227 wdens_ref=8.E-12 228 #multiplicative factor of the damping by gravity waves, def: 4. 229 coefgw=4. -
LMDZ5/branches/testing/DefLists/traceur.def
r1910 r2542 1 4 1 6 2 2 14 14 H2Ov 3 3 10 10 H2Ol 4 10 10 H2Oi 5 10 10 Aga 4 6 10 10 RN 5 7 10 10 PB -
LMDZ5/branches/testing/libf/dynphy_lonlat/grid_atob_m.f90
r2533 r2542 29 29 ! Local variables: 30 30 CHARACTER(LEN=256) :: modname="fine2coarse" 31 INTEGER :: mi, ni, ii, ji, mo, no, io, jo, nr(2), m1, n1, m2, n2, mx, my, nn 32 LOGICAL :: li, lo 33 REAL :: inc 31 INTEGER :: mi, ni, ii, ji, mo, no, io, jo, nr(2), m1,m2, n1,n2, mx,my, nn, i,j 32 LOGICAL :: li, lo, first=.TRUE. 33 REAL :: inc, cpa, spa, crlo(SIZE(x_i)) 34 REAL, SAVE :: pi, hpi 34 35 INTEGER, DIMENSION(SIZE(x_o),SIZE(y_o)) :: num_tot 35 36 LOGICAL, DIMENSION(SIZE(x_o),SIZE(y_o)) :: found, mask 36 REAL, DIMENSION(SIZE(x_ o),SIZE(y_o)) :: dist37 REAL, DIMENSION(SIZE(x_i),SIZE(y_i)) :: dist 37 38 REAL, DIMENSION(SIZE(x_o)) :: a, b 38 39 REAL, DIMENSION(SIZE(y_o)) :: c, d 39 40 REAL, PARAMETER :: thresh=1.E-5 40 41 !------------------------------------------------------------------------------- 42 IF(first) THEN; pi=4.0*ATAN(1.0); hpi=pi/2.0; first=.FALSE.; END IF 41 43 mi=SIZE(x_i); ni=SIZE(y_i); mo=SIZE(x_o); no=SIZE(y_o) 42 44 m1=m1; m2=mo; mx=mo; IF(PRESENT(msk)) mx=SIZE(msk,1) … … 91 93 IF(found(io,jo)) CYCLE 92 94 ! IF(prt_level>=1) PRINT*, "Problem: point out of domain (i,j)=", io,jo 93 CALL dist_sphe(x_o(io),y_o(jo),x_i,y_i,dist(:,:)) 95 crlo(:)=COS(x_o(io)-x_i(:)) !--- COS of points 1 and 2 angle 96 cpa=COS(y_o(jo)); spa=SIN(y_o(jo)) 97 DO j=1,ni; dist(:,j)=ACOS(spa*SIN(y_i(j))+cpa*COS(y_i(j))*crlo(:)); END DO 94 98 nr=MINLOC(dist(:,:))!; IF(prt_level>=1) PRINT*, "Solution: ", nr 95 99 inc=1.0; IF(li) inc=d_i(nr(1),nr(2)) … … 252 256 !------------------------------------------------------------------------------- 253 257 254 255 !-------------------------------------------------------------------------------256 !257 SUBROUTINE dist_sphe(rf_lon,rf_lat,rlon,rlat,distance)258 !259 !-------------------------------------------------------------------------------260 ! Author: Laurent Li (december 30th 1996).261 ! Purpose: Compute min. distance (along big circle) between 2 points in radians.262 !-------------------------------------------------------------------------------263 IMPLICIT NONE264 !-------------------------------------------------------------------------------265 ! Arguments:266 REAL, INTENT(IN) :: rf_lon, rf_lat !--- Reference point coordinates (radians)267 REAL, INTENT(IN) :: rlon(:), rlat(:)!--- Points longitudes/latitudes (radians)268 REAL, INTENT(OUT):: distance(SIZE(rlon),SIZE(rlat)) !--- Distance (radians)269 !-------------------------------------------------------------------------------270 ! Local variables:271 LOGICAL, SAVE :: first=.TRUE.272 REAL, SAVE :: pi, hpi273 REAL :: pa, pb, cpa, spa, crlo(SIZE(rlon))274 INTEGER :: i, j275 !-------------------------------------------------------------------------------276 IF(first) THEN; pi=4.0*ATAN(1.0); hpi=pi/2.0; first=.FALSE.; END IF277 crlo(:)=COS(rf_lon-rlon(:)) !--- COS of points 1 and 2 angle278 pa=hpi-rf_lat !--- North Pole - Point 1 distance279 cpa=COS(pa); spa=SIN(pa)280 DO j=1,SIZE(rlat)281 pb=hpi-rlat(j) !--- North Pole - Point 2 distance282 distance(:,j)=ACOS(cpa*COS(pb)+spa*SIN(pb)*crlo(:))283 END DO284 285 END SUBROUTINE dist_sphe286 !287 !-------------------------------------------------------------------------------288 289 258 END MODULE grid_atob_m 290 259 ! -
LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
r2471 r2542 111 111 LOGICAL :: ok_ade, ok_aie, ok_cdnc, aerosol_couple 112 112 INTEGER :: flag_aerosol 113 LOGICAL:: flag_aerosol_strat113 INTEGER :: flag_aerosol_strat 114 114 LOGICAL :: new_aod 115 115 REAL :: bl95_b0, bl95_b1 -
LMDZ5/branches/testing/libf/dynphy_lonlat/phylmd/limit_netcdf.F90
r2435 r2542 60 60 ! * 11/2009: L. Guez (ozone day & night climatos, see etat0_netcdf.F90) 61 61 ! * 12/2009: D. Cugnet (f77->f90, calendars, files from coupled runs) 62 ! * 04/2016: D. Cugnet (12/14 recs SST/SIC files: cyclic/interannual runs) 62 63 !------------------------------------------------------------------------------- 63 64 #ifndef CPP_1D … … 339 340 INTEGER :: ndays_in ! number of days 340 341 !--- misc 341 INTEGER :: i, j, k, l 342 INTEGER :: i, j, k, l, ll ! loop counters 342 343 REAL, ALLOCATABLE :: work(:,:) ! used for extrapolation 343 CHARACTER(LEN= 25) :: title! for messages344 CHARACTER(LEN=128):: title, mess ! for messages 344 345 LOGICAL :: extrp ! flag for extrapolation 345 346 REAL :: chmin, chmax … … 392 393 !--- Time (variable is not needed - it is rebuilt - but calendar is) 393 394 CALL ncerr(NF90_INQUIRE_DIMENSION(ncid, dids(3), name=dnam, len=lmdep), fnam) 394 ALLOCATE(timeyear( lmdep))395 ALLOCATE(timeyear(MAX(lmdep,14))) 395 396 CALL ncerr(NF90_INQ_VARID(ncid, dnam, varid), fnam) 396 397 cal_in=' ' … … 405 406 CALL msg(5,'var, calendar, dim: '//TRIM(dnam)//' '//TRIM(cal_in), lmdep) 406 407 407 !--- CONSTRUCTING THE INPUT TIME VECTOR FOR INTERPOLATION -------------------- 408 !--- Determining input file number of days, depending on calendar 408 !--- Determining input file number of days, depending on calendar 409 409 ndays_in=year_len(anneeref, cal_in) 410 410 411 !--- Time vector reconstruction (time vector from file is not trusted) 412 !--- If input records are not monthly, time sampling has to be constant ! 413 timeyear=mid_months(anneeref, cal_in, lmdep) 414 IF (lmdep /= 12) WRITE(lunout,*) 'Note : les fichiers de ', TRIM(mode), & 415 ' ne comportent pas 12, mais ', lmdep, ' enregistrements.' 411 !--- Rebuilding input time vector (field from input file might be unreliable) 412 IF(lmdep==12) THEN 413 timeyear=mid_month(anneeref, cal_in, ndays_in) 414 CALL msg(0,'Monthly periodic input file (perpetual run).') 415 ELSE IF(lmdep==14) THEN 416 timeyear=mid_month(anneeref, cal_in, ndays_in) 417 CALL msg(0,'Monthly 14-records input file (interannual run).') 418 ELSE IF(lmdep==ndays_in) THEN 419 timeyear=[(REAL(k)-0.5,k=1,ndays_in)] 420 CALL msg(0,'Daily input file (no time interpolation).') 421 ELSE 422 WRITE(mess,'(a,i3,a,i3,a)')'Mismatching input file: found',lmdep, & 423 ' records, 12/14/',ndays_in,' (periodic/interannual/daily) needed' 424 CALL abort_physic('mid_months',TRIM(mess),1) 425 END IF 416 426 417 427 !--- GETTING THE FIELD AND INTERPOLATING IT ---------------------------------- 418 ALLOCATE(champ(imdep, jmdep), champtime(iim, jjp1, lmdep))428 ALLOCATE(champ(imdep, jmdep), champtime(iim, jjp1, MAX(lmdep,14))) 419 429 IF(extrp) ALLOCATE(work(imdep, jmdep)) 420 430 CALL msg(5,'') … … 436 446 WHERE(NINT(mask)/=1) champint=0.001 437 447 END IF 438 champtime(:, :, l)=champint 448 !--- Special case for periodic input file: index shifted 449 ll = l; IF(lmdep==12) ll = l + 1 450 champtime(:, :, ll)=champint 439 451 END DO 452 IF(lmdep==12) THEN 453 champtime(:,:, 1)=champtime(:,:,13) 454 champtime(:,:,14)=champtime(:,:, 2) 455 END IF 440 456 CALL ncerr(NF90_CLOSE(ncid), fnam) 441 457 … … 444 460 445 461 !--- TIME INTERPOLATION ------------------------------------------------------ 446 IF(prt_level>5) THEN 447 WRITE(lunout, *) 448 WRITE(lunout, *)'INTERPOLATION TEMPORELLE.' 449 WRITE(lunout, *)' Vecteur temps en entree: ', timeyear 450 WRITE(lunout, *)' Vecteur temps en sortie de 0 a ', ndays 451 END IF 452 453 ALLOCATE(yder(lmdep), champan(iip1, jjp1, ndays)) 454 skip = .false. 455 n_extrap = 0 456 DO j=1, jjp1 457 DO i=1, iim 458 yder = pchsp_95(timeyear, champtime(i, j, :), ibeg=2, iend=2, & 459 vc_beg=0., vc_end=0.) 460 CALL pchfe_95(timeyear, champtime(i, j, :), yder, skip, & 461 arth(0., real(ndays_in) / ndays, ndays), champan(i, j, :), ierr) 462 if (ierr < 0) stop 1 463 n_extrap = n_extrap + ierr 464 END DO 465 END DO 466 if (n_extrap /= 0) then 467 WRITE(lunout,*) "get_2Dfield pchfe_95: n_extrap = ", n_extrap 468 end if 462 IF(prt_level>0) THEN 463 IF(ndays/=ndays_in) THEN 464 WRITE(lunout, *) 465 WRITE(lunout,*)'DIFFERENTES LONGEURS D ANNEES:' 466 WRITE(lunout,*)' Dans le fichier d entree: ',ndays_in 467 WRITE(lunout,*)' Dans le fichier de sortie: ',ndays 468 END IF 469 IF(lmdep==ndays_in) THEN 470 WRITE(lunout, *) 471 WRITE(lunout, *)'PAS D INTERPOLATION TEMPORELLE.' 472 WRITE(lunout, *)' Fichier journalier en entree.' 473 ELSE 474 WRITE(lunout, *)'INTERPOLATION TEMPORELLE.' 475 WRITE(lunout, *)' Vecteur temps en entree: ', timeyear 476 WRITE(lunout, *)' Vecteur temps en sortie de 0 a ', ndays-1 477 END IF 478 END IF 479 ALLOCATE(yder(MAX(lmdep,14)), champan(iip1, jjp1, ndays)) 480 IF(lmdep==ndays_in) THEN 481 champan(1:iim,:,:)=champtime 482 ELSE 483 skip = .false. 484 n_extrap = 0 485 DO j=1, jjp1 486 DO i=1, iim 487 yder = pchsp_95(timeyear, champtime(i, j, :), ibeg=2, iend=2, & 488 vc_beg=0., vc_end=0.) 489 CALL pchfe_95(timeyear, champtime(i, j, :), yder, skip, & 490 arth(0., real(ndays_in) / ndays, ndays), champan(i, j, :), ierr) 491 if (ierr < 0) stop 1 492 n_extrap = n_extrap + ierr 493 END DO 494 END DO 495 IF(n_extrap /= 0) WRITE(lunout,*) "get_2Dfield pchfe_95: n_extrap = ", n_extrap 496 END IF 469 497 champan(iip1, :, :)=champan(1, :, :) 470 498 DEALLOCATE(yder, champtime, timeyear) … … 752 780 !------------------------------------------------------------------------------- 753 781 ! 754 FUNCTION mid_month s(y,cal_in,nm)782 FUNCTION mid_month(y,cal_in,ndays_out) 755 783 ! 756 784 !------------------------------------------------------------------------------- … … 758 786 !------------------------------------------------------------------------------- 759 787 ! Arguments: 760 INTEGER, INTENT(IN) :: y! year761 CHARACTER(LEN=*), INTENT(IN) :: cal_in! calendar762 INTEGER, INTENT(IN) :: nm ! months/yearnumber763 REAL, DIMENSION(nm) :: mid_months ! mid-monthtimes788 INTEGER, INTENT(IN) :: y ! year 789 CHARACTER(LEN=*), INTENT(IN) :: cal_in ! calendar 790 INTEGER, INTENT(IN) :: ndays_out ! days number 791 REAL, DIMENSION(14) :: mid_month ! mid-bins times 764 792 !------------------------------------------------------------------------------- 765 793 ! Local variables: 766 CHARACTER(LEN=99) :: mess ! error message 767 CHARACTER(LEN=20) :: cal_out ! calendar (for outputs) 768 INTEGER, DIMENSION(nm) :: mnth ! months lengths (days) 769 INTEGER :: m ! months counter 770 INTEGER :: nd ! number of days 771 !------------------------------------------------------------------------------- 772 nd=year_len(y,cal_in) 773 774 IF(nm==12) THEN 775 776 !--- Getting the input calendar to reset at the end of the function 777 CALL ioget_calendar(cal_out) 778 779 !--- Unlocking calendar and setting it to wanted one 780 CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_in)) 781 782 !--- Getting the length of each month 783 DO m=1,nm; mnth(m)=ioget_mon_len(y,m); END DO 794 CHARACTER(LEN=99) :: mess ! error message 795 CHARACTER(LEN=20) :: cal_out ! output calendar 796 INTEGER, DIMENSION(14) :: tlen ! months lengths (days) 797 INTEGER :: m ! months counter 798 INTEGER :: nd ! number of days 799 !------------------------------------------------------------------------------- 800 !--- Save the input calendar to reset it at the end of the function 801 CALL ioget_calendar(cal_out) 802 803 !--- Unlock calendar and set it to "cal_in" 804 CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_in)) 805 806 !--- Get the length of each month 807 tlen(1 )=ioget_mon_len(y-1,12) 808 DO m=1,12; tlen(m+1)=ioget_mon_len(y,m); END DO 809 tlen(14)=ioget_mon_len(y+1, 1) 810 811 !--- Mid-bins times 812 mid_month(1)=-0.5*REAL(tlen(1)) 813 DO m=2,14; mid_month(m)=mid_month(m-1)+0.5*REAL(tlen(m-1)+tlen(m)); END DO 784 814 785 815 !--- Back to original calendar 786 CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_out)) 787 788 ELSE IF(MODULO(nd,nm)/=0) THEN 789 WRITE(mess,'(a,i3,a,i3,a)')'Unconsistent calendar: ',nd,' days/year, but ',& 790 nm,' months/year. Months number should divide days number.' 791 CALL abort_physic('mid_months',TRIM(mess),1) 792 793 ELSE 794 mnth=[(m,m=1,nm,nd/nm)] 795 END IF 796 797 !--- Mid-months times 798 mid_months(1)=0.5*REAL(mnth(1)) 799 DO k=2,nm 800 mid_months(k)=mid_months(k-1)+0.5*REAL(mnth(k-1)+mnth(k)) 801 END DO 802 803 END FUNCTION mid_months 816 CALL lock_calendar(.FALSE.); CALL ioconf_calendar(TRIM(cal_out)) 817 818 END FUNCTION mid_month 804 819 ! 805 820 !------------------------------------------------------------------------------- … … 863 878 ! 864 879 !******************************************************************************* 880 -
LMDZ5/branches/testing/libf/misc/wxios.F90
r2408 r2542 1 ! $Id : wxios.F90$1 ! $Id$ 2 2 #ifdef CPP_XIOS 3 3 MODULE wxios … … 33 33 SUBROUTINE reformadate(odate, ndate) 34 34 CHARACTER(len=*), INTENT(IN) :: odate 35 #ifdef XIOS1 35 36 CHARACTER(len=100), INTENT(OUT) :: ndate 37 #else 38 TYPE(xios_duration) :: ndate 39 #endif 36 40 37 41 INTEGER :: i = 0 … … 48 52 i = INDEX(odate, "day") 49 53 IF (i > 0) THEN 54 #ifdef XIOS1 50 55 ndate = odate(1:i-1)//"d" 56 #else 57 read(odate(1:i-1),*) ndate%day 58 #endif 51 59 END IF 52 60 53 61 i = INDEX(odate, "hr") 54 62 IF (i > 0) THEN 63 #ifdef XIOS1 55 64 ndate = odate(1:i-1)//"h" 65 #else 66 read(odate(1:i-1),*) ndate%hour 67 #endif 56 68 END IF 57 69 58 70 i = INDEX(odate, "mth") 59 71 IF (i > 0) THEN 72 #ifdef XIOS1 60 73 ndate = odate(1:i-1)//"mo" 74 #else 75 read(odate(1:i-1),*) ndate%month 76 #endif 61 77 END IF 62 78 … … 99 115 100 116 SUBROUTINE wxios_init(xios_ctx_name, locom, outcom, type_ocean) 101 IMPLICIT NONE102 I NCLUDE 'iniprint.h'117 USE print_control_mod, ONLY : prt_level, lunout 118 IMPLICIT NONE 103 119 104 120 CHARACTER(len=*), INTENT(IN) :: xios_ctx_name … … 140 156 141 157 SUBROUTINE wxios_context_init() 142 IMPLICIT NONE 143 INCLUDE 'iniprint.h' 158 USE print_control_mod, ONLY : prt_level, lunout 159 ! USE mod_phys_lmdz_mpi_data, ONLY : COMM_LMDZ_PHY 160 IMPLICIT NONE 144 161 145 162 TYPE(xios_context) :: xios_ctx 146 163 164 !$OMP MASTER 147 165 !Initialisation du contexte: 148 166 CALL xios_context_initialize(g_ctx_name, g_comm) … … 157 175 !Une première analyse des héritages: 158 176 CALL xios_solve_inheritance() 177 !$OMP END MASTER 159 178 END SUBROUTINE wxios_context_init 160 179 … … 164 183 165 184 SUBROUTINE wxios_set_cal(pasdetemps, calendrier, annee, mois, jour, heure, ini_an, ini_mois, ini_jour, ini_heure) 166 IMPLICIT NONE167 I NCLUDE 'iniprint.h'185 USE print_control_mod, ONLY : prt_level, lunout 186 IMPLICIT NONE 168 187 169 188 !Paramètres: … … 178 197 179 198 !Variables pour xios: 199 #ifdef XIOS1 180 200 TYPE(xios_time) :: mdtime 201 #else 202 TYPE(xios_duration) :: mdtime 203 #endif 181 204 !REAL(kind = 8) :: year=0, month=0, day=0, hour=0, minute=0, second=0 182 205 206 #ifdef XIOS1 183 207 mdtime = xios_time(0, 0, 0, 0, 0, pasdetemps) 208 #else 209 mdtime%second=pasdetemps 210 #endif 184 211 185 212 !Réglage du calendrier: 213 #ifdef XIOS1 186 214 SELECT CASE (calendrier) 187 215 CASE('earth_360d') … … 198 226 CALL abort_gcm('Gcm:Xios',abort_message,1) 199 227 END SELECT 228 #else 229 SELECT CASE (calendrier) 230 CASE('earth_360d') 231 CALL xios_define_calendar("D360") 232 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 360 jours/an' 233 CASE('earth_365d') 234 CALL xios_define_calendar("NoLeap") 235 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier terrestre a 365 jours/an' 236 CASE('gregorian') 237 CALL xios_define_calendar("Gregorian") 238 IF (prt_level >= 10) WRITE(lunout,*) 'wxios_set_cal: Calendrier gregorien' 239 CASE DEFAULT 240 abort_message = 'wxios_set_cal: Mauvais choix de calendrier' 241 CALL abort_gcm('Gcm:Xios',abort_message,1) 242 END SELECT 243 #endif 200 244 201 245 !Formatage de la date d'origine: 202 WRITE(date, "(i4.4,'-',i2.2,'-',i2.2,' ',i2.2,':00:00')") annee, mois, jour, int(heure) 246 WRITE(date, "(i4.4,'-',i2.2,'-',i2.2,' ',i2.2,':00:00')") annee, mois, jour, int(heure) 203 247 204 248 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Time origin: ", date 205 249 #ifdef XIOS1 206 250 CALL xios_set_context_attr_hdl(g_ctx, time_origin = date) 251 #else 252 CALL xios_set_time_origin(xios_date(annee,mois,jour,int(heure),0,0)) 253 #endif 207 254 208 255 !Formatage de la date de debut: … … 212 259 IF (prt_level >= 10) WRITE(lunout,*) "wxios_set_cal: Start date: ", date 213 260 261 #ifdef XIOS1 214 262 CALL xios_set_context_attr_hdl(g_ctx, start_date = date) 263 #else 264 CALL xios_set_start_date(xios_date(ini_an,ini_mois,ini_jour,int(ini_heure),0,0)) 265 #endif 215 266 216 267 !Et enfin,le pas de temps: … … 221 272 SUBROUTINE wxios_set_timestep(ts) 222 273 REAL, INTENT(IN) :: ts 274 #ifdef XIOS1 223 275 TYPE(xios_time) :: mdtime 224 276 225 277 mdtime = xios_time(0, 0, 0, 0, 0, ts) 278 #else 279 TYPE(xios_duration) :: mdtime 280 281 mdtime%timestep = ts 282 #endif 226 283 227 284 CALL xios_set_timestep(mdtime) … … 237 294 238 295 239 IMPLICIT NONE240 I NCLUDE 'iniprint.h'296 USE print_control_mod, ONLY : prt_level, lunout 297 IMPLICIT NONE 241 298 242 299 CHARACTER(len=*),INTENT(IN) :: dom_id ! domain identifier … … 277 334 278 335 !On parametrise le domaine: 336 #ifdef XIOS1 279 337 CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin, ni=ni) 280 338 CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin, nj=nj, data_dim=2) 281 339 CALL xios_set_domain_attr_hdl(dom, lonvalue=io_lon(ibegin:iend), latvalue=io_lat(jbegin:jend)) 282 340 #else 341 CALL xios_set_domain_attr_hdl(dom, ni_glo=ni_glo, ibegin=ibegin-1, ni=ni, type="rectilinear") 342 CALL xios_set_domain_attr_hdl(dom, nj_glo=nj_glo, jbegin=jbegin-1, nj=nj, data_dim=2) 343 CALL xios_set_domain_attr_hdl(dom, lonvalue_1d=io_lon(ibegin:iend), latvalue_1d=io_lat(jbegin:jend)) 344 #endif 283 345 IF (.NOT.is_sequential) THEN 284 346 mask(:,:)=.TRUE. … … 291 353 WRITE(lunout,*) "wxios_domain_param: mpirank=",mpi_rank," mask(:,nj)=",mask(:,nj) 292 354 ENDIF 355 #ifdef XIOS1 293 356 CALL xios_set_domain_attr_hdl(dom, mask=mask) 357 #else 358 CALL xios_set_domain_attr_hdl(dom, mask_2d=mask) 359 #endif 294 360 END IF 295 361 … … 307 373 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 308 374 SUBROUTINE wxios_add_vaxis(axis_id, axis_size, axis_value) 309 IMPLICIT NONE310 I NCLUDE 'iniprint.h'375 USE print_control_mod, ONLY : prt_level, lunout 376 IMPLICIT NONE 311 377 312 378 CHARACTER (len=*), INTENT(IN) :: axis_id … … 335 401 336 402 ! Ehouarn: New way to declare axis, without axis_group: 403 #ifdef XIOS1 337 404 CALL xios_set_axis_attr(trim(axis_id),size=axis_size,value=axis_value) 338 405 #else 406 CALL xios_set_axis_attr(trim(axis_id),n_glo=axis_size,value=axis_value) 407 #endif 339 408 !Vérification: 340 409 IF (xios_is_valid_axis(TRIM(ADJUSTL(axis_id)))) THEN … … 351 420 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 352 421 SUBROUTINE wxios_add_file(fname, ffreq, flvl) 353 IMPLICIT NONE354 I NCLUDE 'iniprint.h'422 USE print_control_mod, ONLY : prt_level, lunout 423 IMPLICIT NONE 355 424 356 425 CHARACTER(len=*), INTENT(IN) :: fname … … 360 429 TYPE(xios_file) :: x_file 361 430 TYPE(xios_filegroup) :: x_fg 431 #ifdef XIOS1 362 432 CHARACTER(len=100) :: nffreq 433 #else 434 TYPE(xios_duration) :: nffreq 435 #endif 363 436 364 437 !On regarde si le fichier n'est pas défini par XML: … … 372 445 373 446 !On configure: 447 #ifdef XIOS1 374 448 CALL xios_set_file_attr_hdl(x_file, name="X"//fname,& 375 449 output_freq=TRIM(ADJUSTL(nffreq)), output_level=flvl, enabled=.TRUE.) 376 450 #else 451 CALL xios_set_file_attr_hdl(x_file, name="X"//fname,& 452 output_freq=nffreq, output_level=flvl, enabled=.TRUE.) 453 #endif 454 377 455 IF (xios_is_valid_file("X"//fname)) THEN 378 456 IF (prt_level >= 10) THEN 379 457 WRITE(lunout,*) "wxios_add_file: New file: ", "X"//fname 458 #ifdef XIOS1 380 459 WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 460 #else 461 WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl 462 #endif 381 463 ENDIF 382 464 ELSE 383 465 WRITE(lunout,*) "wxios_add_file: Error, invalid file: ", "X"//trim(fname) 466 #ifdef XIOS1 384 467 WRITE(lunout,*) "wxios_add_file: output_freq=",TRIM(ADJUSTL(nffreq)),"; output_lvl=",flvl 468 #else 469 WRITE(lunout,*) "wxios_add_file: output_freq=",nffreq,"; output_lvl=",flvl 470 #endif 385 471 END IF 386 472 ELSE … … 435 521 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 436 522 SUBROUTINE wxios_add_field_to_file(fieldname, fdim, fid, fname, fieldlongname, fieldunit, field_level, op, nam_axvert) 437 IMPLICIT NONE438 I NCLUDE 'iniprint.h'523 USE print_control_mod, ONLY : prt_level, lunout 524 IMPLICIT NONE 439 525 440 526 CHARACTER(len=*), INTENT(IN) :: fieldname … … 452 538 TYPE(xios_field) :: field 453 539 TYPE(xios_fieldgroup) :: fieldgroup 540 #ifndef XIOS1 541 TYPE(xios_duration) :: freq_op 542 #endif 454 543 LOGICAL :: bool=.FALSE. 455 544 INTEGER :: lvl =0 … … 510 599 511 600 !L'operation, sa frequence: 601 #ifdef XIOS1 512 602 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op="1ts", prec=4) 603 #else 604 freq_op%timestep=1 605 CALL xios_set_field_attr_hdl(field, field_ref=fieldname, operation=TRIM(ADJUSTL(operation)), freq_op=freq_op, prec=4) 606 #endif 513 607 514 608 -
LMDZ5/branches/testing/libf/phylmd/calcratqs.F90
r2258 r2542 1 1 SUBROUTINE calcratqs(klon,klev,prt_level,lunout, & 2 2 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 3 ratqsbas,ratqshaut,tau_ratqs,fact_cldcon, & 3 ratqsbas,ratqshaut,ratqsp0,ratqsdp, & 4 tau_ratqs,fact_cldcon, & 4 5 ptconv,ptconvth,clwcon0th, rnebcon0th, & 5 6 paprs,pplay,q_seri,zqsat,fm_therm, & … … 21 22 integer,intent(in) :: iflag_con,iflag_cld_th,iflag_ratqs 22 23 real,intent(in) :: pdtphys,ratqsbas,ratqshaut,fact_cldcon,tau_ratqs 24 real,intent(in) :: ratqsp0, ratqsdp 23 25 real, dimension(klon,klev+1),intent(in) :: paprs 24 26 real, dimension(klon,klev),intent(in) :: pplay,q_seri,zqsat,fm_therm … … 125 127 do k=1,klev 126 128 ratqss(:,k)=ratqsbas+0.5*(ratqshaut-ratqsbas) & 127 *( tanh( (50000.-pplay(:,k))/20000.) + 1.) 129 ! *( tanh( (50000.-pplay(:,k))/20000.) + 1.) 130 *( tanh( (ratqsp0-pplay(:,k))/ratqsdp) + 1.) 128 131 enddo 129 132 -
LMDZ5/branches/testing/libf/phylmd/calcul_fluxs_mod.F90
-
Property
svn:keywords
changed from
Author Date Id Revision
toId
r2298 r2542 1 ! 2 ! $Id$ 1 3 ! 2 4 MODULE calcul_fluxs_mod … … 9 11 radsol, dif_grnd, t1lay, q1lay, u1lay, v1lay, gustiness, & 10 12 fqsat, petAcoef, peqAcoef, petBcoef, peqBcoef, & 11 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 13 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 14 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 15 12 16 13 17 USE dimphy, ONLY : klon … … 49 53 ! dflux_s derivee du flux de chaleur sensible / Ts 50 54 ! dflux_l derivee du flux de chaleur latente / Ts 51 ! 55 ! sens_prec_liq flux sensible lié aux echanges de precipitations liquides 56 ! sens_prec_sol precipitations solides 57 ! lat_prec_liq flux latent lié aux echanges de precipitations liquides 58 ! lat_prec_sol precipitations solides 52 59 53 60 INCLUDE "YOETHF.h" … … 77 84 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new, evap, fluxsens, fluxlat 78 85 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 86 REAL, DIMENSION(klon), OPTIONAL :: sens_prec_liq, sens_prec_sol 87 REAL, DIMENSION(klon), OPTIONAL :: lat_prec_liq, lat_prec_sol 79 88 80 89 ! Variables locales … … 130 139 dflux_s = 0. 131 140 dflux_l = 0. 141 if (PRESENT(sens_prec_liq)) sens_prec_liq = 0. 142 if (PRESENT(sens_prec_sol)) sens_prec_sol = 0. 143 if (PRESENT(lat_prec_liq)) lat_prec_liq = 0. 144 if (PRESENT(lat_prec_sol)) lat_prec_sol = 0. 132 145 ! 133 146 ! zx_qs = qsat en kg/kg … … 243 256 !!$ & run_off(i) = run_off(i) + max(qsol(i) - max_eau_sol, 0.0) 244 257 !!$ qsol(i) = min(qsol(i), max_eau_sol) 258 ! 259 ! calcul de l'enthalpie des precipitations liquides et solides 260 ! 261 ! if (PRESENT(enth_prec_liq)) & 262 ! enth_prec_liq(i) = rcw * (t1lay(i) - tsurf(i)) * & 263 ! precip_rain(i) 264 ! if (PRESENT(enth_prec_sol)) & 265 ! enth_prec_sol(i) = rcs * (t1lay(i) - tsurf(i)) * & 266 ! precip_snow(i) 267 ! On calcule par rapport a T=0 268 if (PRESENT(sens_prec_liq)) & 269 sens_prec_liq(i) = rcw * (t1lay(i) - RTT) * & 270 precip_rain(i) 271 if (PRESENT(sens_prec_sol)) & 272 sens_prec_sol(i) = rcs * (t1lay(i) - RTT) * & 273 precip_snow(i) 274 if (PRESENT(lat_prec_liq)) & 275 lat_prec_liq(i) = precip_rain(i) * (RLVTT - RLVTT) 276 if (PRESENT(lat_prec_sol)) & 277 lat_prec_sol(i) = precip_snow(i) * (RLSTT - RLVTT) 245 278 ENDDO 279 280 281 ! if (PRESENT(sens_prec_liq)) & 282 ! WRITE(*,*)' calculs_fluxs sens_prec_liq (min, max)', & 283 ! MINVAL(sens_prec_liq(1:knon)), MAXVAL(sens_prec_liq(1:knon)) 284 ! if (PRESENT(sens_prec_sol)) & 285 ! WRITE(*,*)' calculs_fluxs sens_prec_sol (min, max)', & 286 ! MINVAL(sens_prec_sol(1:knon)), MAXVAL(sens_prec_sol(1:knon)) 287 246 288 ! 247 289 !**************************************************************************************** -
Property
svn:keywords
changed from
-
LMDZ5/branches/testing/libf/phylmd/clesphys.h
r2298 r2542 15 15 INTEGER nbapp_rad, iflag_con,iflag_ener_conserv 16 16 REAL co2_ppm, co2_ppm0, solaire 17 LOGICAL ok_suntime_rrtm 17 18 REAL(kind=8) RCO2, RCH4, RN2O, RCFC11, RCFC12 18 19 REAL(kind=8) RCO2_act, RCH4_act, RN2O_act, RCFC11_act, RCFC12_act … … 110 111 & , top_height & 111 112 & , cycle_diurne, soil_model, new_oliq & 112 & , ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad, iflag_con&113 & , ok_orodr, ok_orolf, ok_limitvrai, nbapp_rad, iflag_con & 113 114 & , iflag_ener_conserv & 114 115 & , ok_4xCO2atm & 116 & , ok_suntime_rrtm & 115 117 & , overlap & 116 118 & , ok_kzmin & … … 129 131 save /clesphys/ 130 132 !$OMP THREADPRIVATE(/clesphys/) 131 -
LMDZ5/branches/testing/libf/phylmd/conf_phys_m.F90
r2488 r2542 76 76 LOGICAL :: ok_ade, ok_aie, ok_cdnc, aerosol_couple 77 77 INTEGER :: flag_aerosol 78 LOGICAL:: flag_aerosol_strat78 INTEGER :: flag_aerosol_strat 79 79 LOGICAL :: new_aod 80 80 REAL :: bl95_b0, bl95_b1 … … 94 94 LOGICAL,SAVE :: ok_ade_omp, ok_aie_omp, ok_cdnc_omp, aerosol_couple_omp 95 95 INTEGER, SAVE :: flag_aerosol_omp 96 LOGICAL, SAVE :: flag_aerosol_strat_omp96 INTEGER, SAVE :: flag_aerosol_strat_omp 97 97 LOGICAL, SAVE :: new_aod_omp 98 98 REAL,SAVE :: bl95_b0_omp, bl95_b1_omp … … 148 148 149 149 REAL,SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp 150 LOGICAL,SAVE :: ok_suntime_rrtm_omp 150 151 REAL,SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp 151 152 REAL,SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp … … 385 386 ! 386 387 !Config Key = flag_aerosol_strat 387 !Config Desc = use stratospheric aerosols T/F 388 !Config Def = false 388 !Config Desc = use stratospheric aerosols 0, 1, 2 389 ! - 0 = no stratospheric aerosols 390 ! - 1 = stratospheric aerosols scaled from 550 nm AOD 391 ! - 2 = stratospheric aerosol properties from CMIP6 392 !Config Def = 0 389 393 !Config Help = Used in physiq.F 390 394 ! 391 395 ! 392 flag_aerosol_strat_omp = .false.396 flag_aerosol_strat_omp = 0 393 397 CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp) 394 398 … … 514 518 solaire_omp = 1365. 515 519 call getin('solaire', solaire_omp) 520 ! 521 !Config Key = ok_sun_time 522 !Config Desc = oui ou non variabilite solaire 523 !Config Def = .false. 524 !Config Help = 525 ! 526 ! 527 !valeur AMIP II 528 ok_suntime_rrtm_omp = .false. 529 call getin('ok_suntime_rrtm',ok_suntime_rrtm_omp) 516 530 ! 517 531 !Config Key = co2_ppm … … 1967 1981 R_incl = R_incl_omp 1968 1982 solaire = solaire_omp 1983 ok_suntime_rrtm = ok_suntime_rrtm_omp 1969 1984 co2_ppm = co2_ppm_omp 1970 1985 RCO2 = RCO2_omp … … 2281 2296 write(lunout,*)' Inclinaison =',R_incl 2282 2297 write(lunout,*)' Constante solaire =',solaire 2298 write(lunout,*)' ok_suntime_rrtm =',ok_suntime_rrtm 2283 2299 write(lunout,*)' co2_ppm =',co2_ppm 2284 2300 write(lunout,*)' RCO2_act = ',RCO2_act -
LMDZ5/branches/testing/libf/phylmd/cpl_mod.F90
r2435 r2542 52 52 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_windsp 53 53 !$OMP THREADPRIVATE(cpl_windsp) 54 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_sens_rain, cpl_sens_snow 55 !$OMP THREADPRIVATE(cpl_sens_rain, cpl_sens_snow) 54 56 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_taumod 55 57 !$OMP THREADPRIVATE(cpl_taumod) … … 90 92 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_windsp2D 91 93 !$OMP THREADPRIVATE(cpl_windsp2D) 94 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: cpl_sens_rain2D, cpl_sens_snow2D 95 !$OMP THREADPRIVATE(cpl_sens_rain2D, cpl_sens_snow2D) 92 96 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: cpl_atm_co22D 93 97 !$OMP THREADPRIVATE(cpl_atm_co22D) … … 168 172 ALLOCATE(cpl_windsp(klon,2), stat = error) 169 173 sum_error = sum_error + error 170 ALLOCATE(cpl_taumod(klon,2), stat = error) 174 ALLOCATE(cpl_sens_rain(klon,2), stat = error) 175 sum_error = sum_error + error 176 ALLOCATE(cpl_sens_snow(klon,2), stat = error) 171 177 sum_error = sum_error + error 172 178 ALLOCATE(cpl_rriv2D(nbp_lon,jj_nb), stat=error) … … 531 537 SUBROUTINE cpl_send_ocean_fields(itime, knon, knindex, & 532 538 swdown, lwdown, fluxlat, fluxsens, & 533 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp) 539 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,& 540 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 534 541 ! 535 542 ! This subroutine cumulates some fields for each time-step during a coupling … … 552 559 REAL, DIMENSION(klon), INTENT(IN) :: evap, tsurf, fder, albsol 553 560 REAL, DIMENSION(klon), INTENT(IN) :: taux, tauy, windsp 561 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol 562 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 554 563 555 564 ! Local variables … … 583 592 cpl_tauy(1:knon,cpl_index) = 0.0 584 593 cpl_windsp(1:knon,cpl_index) = 0.0 594 cpl_sens_rain(1:knon,cpl_index) = 0.0 595 cpl_sens_snow(1:knon,cpl_index) = 0.0 585 596 cpl_taumod(1:knon,cpl_index) = 0.0 586 597 IF (carbon_cycle_cpl) cpl_atm_co2(1:knon,cpl_index) = 0.0 … … 614 625 cpl_windsp(ig,cpl_index) = cpl_windsp(ig,cpl_index) + & 615 626 windsp(ig) / REAL(nexca) 627 cpl_sens_rain(ig,cpl_index) = cpl_sens_rain(ig,cpl_index) + & 628 sens_prec_liq(ig) / REAL(nexca) 629 cpl_sens_snow(ig,cpl_index) = cpl_sens_snow(ig,cpl_index) + & 630 sens_prec_sol(ig) / REAL(nexca) 616 631 cpl_taumod(ig,cpl_index) = cpl_taumod(ig,cpl_index) + & 617 632 SQRT ( taux(ig)*taux(ig)+tauy(ig)*tauy(ig) ) / REAL (nexca) … … 654 669 sum_error = sum_error + error 655 670 ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error) 671 sum_error = sum_error + error 672 ALLOCATE(cpl_sens_rain2D(nbp_lon,jj_nb,2), stat=error) 673 sum_error = sum_error + error 674 ALLOCATE(cpl_sens_snow2D(nbp_lon,jj_nb,2), stat=error) 656 675 sum_error = sum_error + error 657 676 ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error) … … 706 725 knon, knindex) 707 726 727 CALL gath2cpl(cpl_sens_rain(:,cpl_index), cpl_sens_rain2D(:,:,cpl_index), & 728 knon, knindex) 729 730 CALL gath2cpl(cpl_sens_snow(:,cpl_index), cpl_sens_snow2D(:,:,cpl_index), & 731 knon, knindex) 732 708 733 CALL gath2cpl(cpl_taumod(:,cpl_index), cpl_taumod2D(:,:,cpl_index), & 709 734 knon, knindex) … … 722 747 pctsrf, lafin, rlon, rlat, & 723 748 swdown, lwdown, fluxlat, fluxsens, & 724 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy) 749 precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy,& 750 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 725 751 ! 726 752 ! This subroutine cumulates some fields for each time-step during a coupling … … 746 772 REAL, DIMENSION(klon), INTENT(IN) :: albsol, taux, tauy 747 773 REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf 774 REAL, DIMENSION(klon), INTENT(IN) :: sens_prec_liq, sens_prec_sol 775 REAL, DIMENSION(klon), INTENT(IN) :: lat_prec_liq, lat_prec_sol 748 776 LOGICAL, INTENT(IN) :: lafin 749 777 … … 778 806 cpl_taux(1:knon,cpl_index) = 0.0 779 807 cpl_tauy(1:knon,cpl_index) = 0.0 808 cpl_sens_rain(1:knon,cpl_index) = 0.0 809 cpl_sens_snow(1:knon,cpl_index) = 0.0 780 810 cpl_taumod(1:knon,cpl_index) = 0.0 781 811 ENDIF … … 806 836 cpl_tauy(ig,cpl_index) = cpl_tauy(ig,cpl_index) + & 807 837 tauy(ig) / REAL(nexca) 838 cpl_sens_rain(ig,cpl_index) = cpl_sens_rain(ig,cpl_index) + & 839 sens_prec_liq(ig) / REAL(nexca) 840 cpl_sens_snow(ig,cpl_index) = cpl_sens_snow(ig,cpl_index) + & 841 sens_prec_sol(ig) / REAL(nexca) 808 842 cpl_taumod(ig,cpl_index) = cpl_taumod(ig,cpl_index) + & 809 843 SQRT ( taux(ig)*taux(ig)+tauy(ig)*tauy(ig) ) / REAL(nexca) … … 839 873 sum_error = sum_error + error 840 874 ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error) 875 sum_error = sum_error + error 876 ALLOCATE(cpl_sens_rain2D(nbp_lon,jj_nb,2), stat=error) 877 sum_error = sum_error + error 878 ALLOCATE(cpl_sens_snow2D(nbp_lon,jj_nb,2), stat=error) 841 879 sum_error = sum_error + error 842 880 ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error) … … 889 927 890 928 CALL gath2cpl(cpl_tauy(:,cpl_index), cpl_tauy2D(:,:,cpl_index), & 929 knon, knindex) 930 931 CALL gath2cpl(cpl_sens_rain(:,cpl_index), cpl_sens_rain2D(:,:,cpl_index), & 932 knon, knindex) 933 934 CALL gath2cpl(cpl_sens_snow(:,cpl_index), cpl_sens_snow2D(:,:,cpl_index), & 891 935 knon, knindex) 892 936 … … 1078 1122 tab_flds(:,:,ids_nsfice) = cpl_nsol2D(:,:,2) 1079 1123 tab_flds(:,:,ids_dflxdt) = cpl_fder2D(:,:,2) 1124 tab_flds(:,:,ids_qraioc) = cpl_sens_rain2D(:,:,1) 1125 tab_flds(:,:,ids_qsnooc) = cpl_sens_snow2D(:,:,1) 1126 tab_flds(:,:,ids_qraiic) = cpl_sens_rain2D(:,:,2) 1127 tab_flds(:,:,ids_qsnoic) = cpl_sens_snow2D(:,:,2) 1080 1128 1081 1129 IF (version_ocean=='nemo') THEN … … 1279 1327 DEALLOCATE(cpl_taux2D, cpl_tauy2D, cpl_windsp2D, cpl_taumod2D, stat=error ) 1280 1328 sum_error = sum_error + error 1329 DEALLOCATE(cpl_sens_rain2D, cpl_sens_snow2D, stat=error) 1330 sum_error = sum_error + error 1331 1281 1332 1282 1333 IF (carbon_cycle_cpl) THEN -
LMDZ5/branches/testing/libf/phylmd/cv30_routines.F90
r2488 r2542 407 407 408 408 DO i = 1, len !convect3 409 icb1(i) = max(icb(i), 2) !convect3 410 icb1(i) = min(icb(i), nl) !convect3 409 icb1(i) = min(max(icb(i), 2), nl) 411 410 ! if icb is below LCL, start loop at ICB+1: 412 411 ! (icbs est le premier niveau au-dessus du LCL) -
LMDZ5/branches/testing/libf/phylmd/cv3_routines.F90
r2488 r2542 105 105 ok_intermittent=.False. 106 106 CALL getin_p('ok_intermittent',ok_intermittent) 107 ok_optim_yield=.False. 108 CALL getin_p('ok_optim_yield',ok_optim_yield) 107 109 coef_peel=0.25 108 110 CALL getin_p('coef_peel',coef_peel) … … 126 128 WRITE (*, *) 'tau_stop=', tau_stop 127 129 WRITE (*, *) 'ok_intermittent=', ok_intermittent 130 WRITE (*, *) 'ok_optim_yield =', ok_optim_yield 128 131 WRITE (*, *) 'coef_peel=', coef_peel 129 132 … … 580 583 581 584 DO i = 1, len !convect3 582 icb1(i) = max(icb(i), 2) !convect3 583 icb1(i) = min(icb(i), nl) !convect3 585 icb1(i) = min(max(icb(i), 2), nl) 584 586 ! if icb is below LCL, start loop at ICB+1: 585 587 ! (icbs est le premier niveau au-dessus du LCL) … … 2605 2607 ! 2606 2608 2607 d6 = bfac*wdtrain(il) - 100.*sigd(il)*bfac*(ph(il,i)-ph(il,i+1))*evap(il, i) 2608 e6 = bfac*wdtrain(il) 2609 f6 = -100.*sigd(il)*bfac*(ph(il,i)-ph(il,i+1))*evap(il, i) 2610 2609 !jyg< 2610 d6 = prec(il,i)-prec(il,i+1) 2611 2612 !! d6 = bfac*wdtrain(il) - 100.*sigd(il)*bfac*(ph(il,i)-ph(il,i+1))*evap(il, i) 2613 !! e6 = bfac*wdtrain(il) 2614 !! f6 = -100.*sigd(il)*bfac*(ph(il,i)-ph(il,i+1))*evap(il, i) 2615 !>jyg 2611 2616 !CR:tmax_fonte_cv: T for which ice is totally melted (used to be 275.15) 2612 2617 thaw = (t(il,i)-273.15)/(tmax_fonte_cv-273.15) 2613 2618 thaw = min(max(thaw,0.0), 1.0) 2619 !jyg< 2614 2620 water(il, i) = water(il, i+1) + (1-fraci(il,i))*d6 2615 water(il, i) = max(water(il,i), 0.) 2616 ice(il, i) = ice(il, i+1) + fraci(il, i)*d6 2617 ice(il, i) = max(ice(il,i), 0.) 2621 ice(il, i) = ice(il, i+1) + fraci(il, i)*d6 2622 water(il, i) = min(prec(il,i), max(water(il,i), 0.)) 2623 ice(il, i) = min(prec(il,i), max(ice(il,i), 0.)) 2624 2625 !! water(il, i) = water(il, i+1) + (1-fraci(il,i))*d6 2626 !! water(il, i) = max(water(il,i), 0.) 2627 !! ice(il, i) = ice(il, i+1) + fraci(il, i)*d6 2628 !! ice(il, i) = max(ice(il,i), 0.) 2629 !>jyg 2618 2630 fondue(il, i) = ice(il, i)*thaw 2619 2631 water(il, i) = water(il, i) + fondue(il, i) … … 2967 2979 ! 2968 2980 !local variables: 2969 INTEGER i, k, il, n, j, num12970 REAL rat, delti2971 REAL ax, bx, cx, dx, ex2972 REAL cpinv, rdcp, dpinv2973 REAL awat(nloc)2974 REAL lvcp(nloc, na), lfcp(nloc, na) ! , mke(nloc, na)! unused . jyg2975 REAL am(nloc), work(nloc), ad(nloc), amp1(nloc)2981 INTEGER :: i, k, il, n, j, num1 2982 REAL :: rat, delti 2983 REAL :: ax, bx, cx, dx, ex 2984 REAL :: cpinv, rdcp, dpinv 2985 REAL, DIMENSION (nloc) :: awat 2986 REAL, DIMENSION (nloc, nd) :: lvcp, lfcp ! , mke ! unused . jyg 2987 REAL, DIMENSION (nloc) :: am, work, ad, amp1 2976 2988 !! real up1(nloc), dn1(nloc) 2977 REAL up1(nloc, nd, nd), dn1(nloc, nd, nd) 2978 REAL asum(nloc), bsum(nloc), csum(nloc), dsum(nloc) 2979 REAL esum(nloc), fsum(nloc), gsum(nloc), hsum(nloc) 2980 REAL th_wake(nloc, nd) 2981 REAL alpha_qpos(nloc), alpha_qpos1(nloc) 2982 REAL qcond(nloc, nd), nqcond(nloc, nd), wa(nloc, nd) ! cld 2983 REAL siga(nloc, nd), sax(nloc, nd), mac(nloc, nd) ! cld 2984 REAL sument(nloc), sigment(nloc,nd), qtment(nloc,nd) ! cld 2985 REAL qnk(nloc) 2989 REAL, DIMENSION (nloc, nd, nd) :: up1, dn1 2990 !jyg< 2991 REAL, DIMENSION (nloc, nd) :: up_to, up_from 2992 REAL, DIMENSION (nloc, nd) :: dn_to, dn_from 2993 !>jyg 2994 REAL, DIMENSION (nloc) :: asum, bsum, csum, dsum 2995 REAL, DIMENSION (nloc) :: esum, fsum, gsum, hsum 2996 REAL, DIMENSION (nloc, nd) :: th_wake 2997 REAL, DIMENSION (nloc) :: alpha_qpos, alpha_qpos1 2998 REAL, DIMENSION (nloc, nd) :: qcond, nqcond, wa ! cld 2999 REAL, DIMENSION (nloc, nd) :: siga, sax, mac ! cld 3000 REAL, DIMENSION (nloc) :: sument 3001 REAL, DIMENSION (nloc, nd) :: sigment, qtment ! cld 3002 REAL, DIMENSION (nloc) :: qnk 2986 3003 REAL sumdq !jyg 2987 3004 ! … … 3223 3240 ! print*,'cv3_yield apres ft' 3224 3241 3242 !jyg< 3243 !----------------------------------------------------------- 3244 IF (ok_optim_yield) THEN !| 3245 !----------------------------------------------------------- 3246 ! 3247 !*** *** 3248 !*** Compute convective mass fluxes upwd and dnwd *** 3249 3250 upwd(:,:) = 0. 3251 up_to(:,:) = 0. 3252 up_from(:,:) = 0. 3253 dnwd(:,:) = 0. 3254 dn_to(:,:) = 0. 3255 dn_from(:,:) = 0. 3256 ! 3257 ! ================================================= 3258 ! upward fluxes | 3259 ! ------------------------------------------------ 3260 DO i = 2, nl 3261 DO il = 1, ncum 3262 IF (i<=inb(il)) THEN 3263 up_to(il,i) = m(il,i) 3264 ENDIF 3265 ENDDO 3266 DO j = 1, i-1 3267 DO il = 1, ncum 3268 IF (i<=inb(il)) THEN 3269 up_to(il,i) = up_to(il,i) + ment(il,j,i) 3270 ENDIF 3271 ENDDO 3272 ENDDO 3273 ENDDO 3274 ! 3275 DO i = 1, nl 3276 DO il = 1, ncum 3277 IF (i<=inb(il)) THEN 3278 up_from(il,i) = cbmf(il)*wghti(il,i) 3279 ENDIF 3280 ENDDO 3281 ENDDO 3282 !!DO i = 2, nl 3283 !! DO j = i+1, nl !! Permuter les boucles i et j 3284 DO j = 3, nl 3285 DO i = 2, j-1 3286 DO il = 1, ncum 3287 IF (j<=inb(il)) THEN 3288 up_from(il,i) = up_from(il,i) + ment(il,i,j) 3289 ENDIF 3290 ENDDO 3291 ENDDO 3292 ENDDO 3293 ! 3294 ! The difference between upwd(il,i) and upwd(il,i-1) is due to updrafts ending in layer 3295 !(i-1) (theses drafts cross interface (i-1) but not interface(i)) and to updrafts starting 3296 !from layer (i-1) (theses drafts cross interface (i) but not interface(i-1)): 3297 ! 3298 DO i = 2, nlp 3299 DO il = 1, ncum 3300 upwd(il,i) = max(0., upwd(il,i-1) - up_to(il,i-1) + up_from(il,i-1)) 3301 ENDDO 3302 ENDDO 3303 ! 3304 ! ================================================= 3305 ! downward fluxes | 3306 ! ------------------------------------------------ 3307 DO i = 1, nl 3308 DO j = i+1, nl 3309 DO il = 1, ncum 3310 IF (j<=inb(il)) THEN 3311 dn_to(il,i) = dn_to(il,i) + ment(il,j,i) 3312 ENDIF 3313 ENDDO 3314 ENDDO 3315 ENDDO 3316 ! 3317 !!DO i = 2, nl 3318 !! DO j = 1, i-1 !! Permuter les boucles i et j 3319 DO j = 1, nl 3320 DO i = j+1, nl 3321 DO il = 1, ncum 3322 IF (i<=inb(il)) THEN 3323 dn_from(il,i) = dn_from(il,i) + ment(il,i,j) 3324 ENDIF 3325 ENDDO 3326 ENDDO 3327 ENDDO 3328 ! 3329 ! The difference between dnwd(il,i) and dnwd(il,i+1) is due to downdrafts ending in layer 3330 !(i) (theses drafts cross interface (i+1) but not interface(i)) and to downdrafts 3331 !starting from layer (i) (theses drafts cross interface (i) but not interface(i+1)): 3332 ! 3333 DO i = nl-1, 1, -1 3334 DO il = 1, ncum 3335 dnwd(il,i) = max(0., dnwd(il,i+1) - dn_to(il,i) + dn_from(il,i)) 3336 ENDDO 3337 ENDDO 3338 ! ================================================= 3339 ! 3340 !----------------------------------------------------------- 3341 ENDIF !(ok_optim_yield) !| 3342 !----------------------------------------------------------- 3343 !>jyg 3344 3225 3345 ! *** calculate tendencies of potential temperature and mixing ratio *** 3226 3346 ! *** at levels above the lowest level *** … … 3230 3350 3231 3351 3232 DO i = 2, nl + 1 ! newvecto: mettre nl au lieu nl+1? 3352 !jyg< 3353 !! DO i = 2, nl + 1 ! newvecto: mettre nl au lieu nl+1? 3354 DO i = 2, nl 3355 !>jyg 3233 3356 3234 3357 num1 = 0 … … 3238 3361 IF (num1<=0) GO TO 500 3239 3362 3363 ! 3240 3364 !jyg< 3241 !! CALL zilch(amp1, ncum) 3242 !! CALL zilch(ad, ncum) 3365 !----------------------------------------------------------- 3366 IF (ok_optim_yield) THEN !| 3367 !----------------------------------------------------------- 3368 DO il = 1, ncum 3369 amp1(il) = upwd(il,i+1) 3370 ad(il) = dnwd(il,i) 3371 ENDDO 3372 !----------------------------------------------------------- 3373 ELSE !(ok_optim_yield) !| 3374 !----------------------------------------------------------- 3375 !>jyg 3243 3376 DO il = 1,ncum 3244 3377 amp1(il) = 0. 3245 3378 ad(il) = 0. 3246 3379 ENDDO 3247 !>jyg3248 3380 3249 3381 DO k = 1, nl + 1 … … 3262 3394 END DO 3263 3395 3264 DO k = 1, i 3265 DO j = i + 1, nl + 1 3396 DO j = i + 1, nl + 1 3397 DO k = 1, i 3398 !yor! reverted j and k loops 3399 DO il = 1, ncum 3400 !yor! IF (i<=inb(il) .AND. j<=(inb(il)+1)) THEN ! the second condition implies the first ! 3401 IF (j<=(inb(il)+1)) THEN 3402 amp1(il) = amp1(il) + ment(il, k, j) 3403 END IF 3404 END DO 3405 END DO 3406 END DO 3407 3408 DO k = 1, i - 1 3409 !jyg< 3410 !! DO j = i, nl + 1 ! newvecto: nl au lieu nl+1? 3411 DO j = i, nl 3412 !>jyg 3266 3413 DO il = 1, ncum 3267 IF (i<=inb(il) .AND. j<=(inb(il)+1)) THEN 3268 amp1(il) = amp1(il) + ment(il, k, j) 3269 END IF 3270 END DO 3271 END DO 3272 END DO 3273 3274 DO k = 1, i - 1 3275 DO j = i, nl + 1 ! newvecto: nl au lieu nl+1? 3276 DO il = 1, ncum 3277 IF (i<=inb(il) .AND. j<=inb(il)) THEN 3414 !yor! IF (i<=inb(il) .AND. j<=inb(il)) THEN ! the second condition implies the 1st ! 3415 IF (j<=inb(il)) THEN 3278 3416 ad(il) = ad(il) + ment(il, j, k) 3279 3417 END IF … … 3281 3419 END DO 3282 3420 END DO 3421 ! 3422 !----------------------------------------------------------- 3423 ENDIF !(ok_optim_yield) !| 3424 !----------------------------------------------------------- 3425 ! 3426 !! print *,'yield, i, amp1, ad', i, amp1(1), ad(1) 3283 3427 3284 3428 DO il = 1, ncum … … 3428 3572 !AC! enddo 3429 3573 3430 DO k = i, nl + 1 3574 !jyg< 3575 !! DO k = i, nl + 1 3576 DO k = i, nl 3577 !>jyg 3431 3578 3432 3579 IF (iflag_mix/=0) THEN … … 3731 3878 END DO 3732 3879 END DO 3880 !jyg< 3881 !----------------------------------------------------------- 3882 IF (ok_optim_yield) THEN !| 3883 !----------------------------------------------------------- 3733 3884 DO i = 1, nl 3734 DO j = 1, nl 3885 DO il = 1, ncum 3886 IF (iflag(il)<=1) THEN 3887 upwd(il, i) = upwd(il, i)/alpha_qpos(il) 3888 dnwd(il, i) = dnwd(il, i)/alpha_qpos(il) 3889 END IF 3890 END DO 3891 END DO 3892 !----------------------------------------------------------- 3893 ENDIF !(ok_optim_yield) !| 3894 !----------------------------------------------------------- 3895 !>jyg 3896 DO j = 1, nl !yor! inverted i and j loops 3897 DO i = 1, nl 3735 3898 DO il = 1, ncum 3736 3899 IF (iflag(il)<=1) THEN … … 3766 3929 DO i = 1, nl 3767 3930 DO il = 1, ncum 3768 upwd(il, i) = 0.03769 dnwd(il, i) = 0.03770 END DO3771 END DO3772 3773 DO i = 1, nl3774 DO il = 1, ncum3775 3931 dnwd0(il, i) = -mp(il, i) 3776 3932 END DO … … 3785 3941 3786 3942 3943 !jyg< 3944 !----------------------------------------------------------- 3945 IF (.NOT.ok_optim_yield) THEN !| 3946 !----------------------------------------------------------- 3787 3947 DO i = 1, nl 3788 3948 DO il = 1, ncum 3789 IF (i>=icb(il) .AND. i<=inb(il)) THEN 3790 upwd(il, i) = 0.0 3791 dnwd(il, i) = 0.0 3792 END IF 3793 END DO 3794 END DO 3949 upwd(il, i) = 0.0 3950 dnwd(il, i) = 0.0 3951 END DO 3952 END DO 3953 3954 !! DO i = 1, nl ! useless; jyg 3955 !! DO il = 1, ncum ! useless; jyg 3956 !! IF (i>=icb(il) .AND. i<=inb(il)) THEN ! useless; jyg 3957 !! upwd(il, i) = 0.0 ! useless; jyg 3958 !! dnwd(il, i) = 0.0 ! useless; jyg 3959 !! END IF ! useless; jyg 3960 !! END DO ! useless; jyg 3961 !! END DO ! useless; jyg 3795 3962 3796 3963 DO i = 1, nl … … 3803 3970 END DO 3804 3971 3972 !yor! commented original 3973 ! DO i = 1, nl 3974 ! DO k = i, nl 3975 ! DO n = 1, i - 1 3976 ! DO il = 1, ncum 3977 ! IF (i>=icb(il) .AND. i<=inb(il) .AND. k<=inb(il)) THEN 3978 ! up1(il, k, i) = up1(il, k, i) + ment(il, n, k) 3979 ! dn1(il, k, i) = dn1(il, k, i) - ment(il, k, n) 3980 ! END IF 3981 ! END DO 3982 ! END DO 3983 ! END DO 3984 ! END DO 3985 !yor! replaced with 3805 3986 DO i = 1, nl 3806 3987 DO k = i, nl 3807 3988 DO n = 1, i - 1 3808 3989 DO il = 1, ncum 3809 IF (i>=icb(il) .AND. i<=inb(il) .AND. k<=inb(il)) THEN 3810 up1(il, k, i) = up1(il, k, i) + ment(il, n, k) 3811 dn1(il, k, i) = dn1(il, k, i) - ment(il, k, n) 3990 IF (i>=icb(il) .AND. k<=inb(il)) THEN ! yor ! as i always <= k 3991 up1(il, k, i) = up1(il, k, i) + ment(il, n, k) 3812 3992 END IF 3813 3993 END DO … … 3815 3995 END DO 3816 3996 END DO 3997 DO i = 1, nl 3998 DO n = 1, i - 1 3999 DO k = i, nl 4000 DO il = 1, ncum 4001 IF (i>=icb(il) .AND. k<=inb(il)) THEN ! yor ! i always <= k 4002 dn1(il, k, i) = dn1(il, k, i) - ment(il, k, n) 4003 END IF 4004 END DO 4005 END DO 4006 END DO 4007 END DO 4008 !yor! end replace 3817 4009 3818 4010 DO i = 1, nl … … 3865 4057 !!!! 3866 4058 !!!! ENDDO 4059 !----------------------------------------------------------- 4060 ENDIF !(.NOT.ok_optim_yield) !| 4061 !----------------------------------------------------------- 4062 !>jyg 3867 4063 3868 4064 ! ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc -
LMDZ5/branches/testing/libf/phylmd/cv3p1_closure.F90
r2488 r2542 113 113 IF (prt_level>=20) PRINT *, 'cv3p1_param nloc ncum nd icb inb nl', nloc, & 114 114 ncum, nd, icb(nloc), inb(nloc), nl 115 DO k = 1, n l115 DO k = 1, nd !jyg: initialization up to nd 116 116 DO il = 1, ncum 117 117 m(il, k) = 0.0 … … 120 120 121 121 !CR: initializations for erosion of adiabatic ascent 122 DO k = 1,n l122 DO k = 1,nd !jyg: initialization up to nd 123 123 DO il = 1, ncum 124 124 mad(il,k)=0. … … 628 628 629 629 !Verification sum(me)=sum(m) 630 DO k = 1,n l+1630 DO k = 1,nd !jyg: initialization up to nd 631 631 DO il = 1, ncum 632 632 md(il,k)=0. -
LMDZ5/branches/testing/libf/phylmd/cv3p2_closure.F90
r2488 r2542 126 126 DO k = 1, nl 127 127 DO il = 1, ncum 128 m(il, k) = 0.0129 128 rhodp(il,k) = 0.007*p(il, k)*(ph(il,k)-ph(il,k+1))/tv(il, k) 130 129 END DO 131 130 END DO 132 131 133 !CR : initializations for erosion of adiabatic ascent134 DO k = 1,n l132 !CR+jyg: initializations (up to nd) for erosion of adiabatic ascent and of m and wlim 133 DO k = 1,nd 135 134 DO il = 1, ncum 136 135 mad(il,k)=0. … … 138 137 betalim(il,k)=1. 139 138 wlim(il,k)=0. 139 m(il, k) = 0.0 140 140 ENDDO 141 141 ENDDO … … 711 711 712 712 !Verification sum(me)=sum(m) 713 DO k = 1,n l+1713 DO k = 1,nd 714 714 DO il = 1, ncum 715 715 md(il,k)=0. -
LMDZ5/branches/testing/libf/phylmd/cv3param.h
r2488 r2542 7 7 !------------------------------------------------------------ 8 8 9 logical ok_optim_yield 9 10 logical ok_convstop 10 11 logical ok_intermittent … … 36 37 ,flag_wb & 37 38 ,noff, minorig, nl, nlp, nlm & 38 ,ok_convstop, ok_intermittent 39 ,ok_convstop, ok_intermittent & 40 ,ok_optim_yield 39 41 !$OMP THREADPRIVATE(/cv3param/) 40 42 -
LMDZ5/branches/testing/libf/phylmd/fisrtilp.F90
r2488 r2542 21 21 ! Objet: condensation et precipitation stratiforme. 22 22 ! schema de nuage 23 ! Fusion de fisrt (physique sursaturation, P. LeVan K. Laval) 24 ! et ilp (il pleut, L. Li) 25 ! Principales parties: 26 ! P1> Evaporation de la precipitation (qui vient du niveau k+1) 27 ! P2> Formation du nuage (en k) 28 ! P3> Formation de la precipitation (en k) 23 29 !====================================================================== 24 30 !====================================================================== … … 28 34 29 35 ! 30 ! Arguments:36 ! Principaux inputs: 31 37 ! 32 38 REAL dtime ! intervalle du temps (s) … … 35 41 REAL t(klon,klev) ! temperature (K) 36 42 REAL q(klon,klev) ! humidite specifique (kg/kg) 43 ! 44 ! Principaux outputs: 45 ! 37 46 REAL d_t(klon,klev) ! incrementation de la temperature (K) 38 47 REAL d_q(klon,klev) ! incrementation de la vapeur d'eau … … 46 55 REAL prfl(klon,klev+1) ! flux d'eau precipitante aux interfaces (kg/m2/s) 47 56 REAL psfl(klon,klev+1) ! flux d'eau precipitante aux interfaces (kg/m2/s) 57 ! 58 ! Autres arguments 59 ! 48 60 REAL ztv(klon,klev) 49 61 REAL zqta(klon,klev),fraca(klon,klev) … … 155 167 ! Pour la conversion eau-neige 156 168 REAL zlh_solid(klon), zm_solid 157 !IM158 !ym INTEGER klevm1159 169 !--------------------------------------------------------------- 160 170 ! 161 171 ! Fonctions en ligne: 162 172 ! 163 REAL fallvs,fallvc ! vitesse de chute pour crystaux de glace 173 REAL fallvs,fallvc ! Vitesse de chute pour cristaux de glace 174 ! (Heymsfield & Donner, 1990) 164 175 REAL zzz 165 176 include "YOETHF.h" … … 278 289 zfrac_lessi = 0. 279 290 280 !AA ----------------------------------------------------------291 !AA================================================================== 281 292 ! 282 293 ncoreczq=0 283 ! Boucle verticale (du haut vers le bas) 284 ! 285 !IM : klevm1 286 !ym klevm1=klev-1 294 ! BOUCLE VERTICALE (DU HAUT VERS LE BAS) 295 ! 287 296 DO k = klev, 1, -1 288 297 ! 289 !AA---------------------------------------------------------- 290 ! 298 !AA=============================================================== 299 ! 300 ! Initialisation temperature et vapeur 291 301 DO i = 1, klon 292 302 zt(i)=t(i,k) … … 312 322 ENDDO 313 323 ENDIF 314 ! 315 ! 316 ! Calculer l'evaporation de la precipitation 317 ! 318 319 320 ! Calculer l'evaporation de la precipitation 321 ! 322 323 324 ! ---------------------------------------------------------------- 325 ! P1> Debut evaporation de la precipitation 326 ! ---------------------------------------------------------------- 324 327 IF (evap_prec) THEN 325 328 DO i = 1, klon … … 328 331 IF (zrfl(i)+zifl(i).GT.0.) THEN 329 332 !>AJ 333 ! Calcul du qsat 330 334 IF (thermcep) THEN 331 335 zdelta=MAX(0.,SIGN(1.,RTT-zt(i))) … … 350 354 IF (zrfl(i)+zifl(i).GT.0.) THEN 351 355 !>AJ 356 ! Evap max pour ne pas saturer la fraction sous le nuage 352 357 zqev = MAX (0.0, (zqs(i)-zq(i))*zneb(i) ) 358 ! Calcul de l'evaporation du flux de precip herite 359 ! d'au-dessus 353 360 zqevt = coef_eva * (1.0-zq(i)/zqs(i)) * SQRT(zrfl(i)) & 354 361 * (paprs(i,k)-paprs(i,k+1))/pplay(i,k)*zt(i)*RD/RG 355 362 zqevt = MAX(0.0,MIN(zqevt,zrfl(i))) & 356 363 * RG*dtime/(paprs(i,k)-paprs(i,k+1)) 364 ! Seuil pour ne pas saturer la fraction sous le nuage 357 365 zqev = MIN (zqev, zqevt) 366 ! Nouveau flux de precip 358 367 zrfln(i) = zrfl(i) - zqev*(paprs(i,k)-paprs(i,k+1)) & 359 368 /RG/dtime 360 361 ! pour la glace, on ré-évapore toute la précip dans la 362 ! couche du dessous 363 ! la glace venant de la couche du dessus est simplement 364 ! dans la couche du dessous. 365 369 ! Aucun flux liquide pour T < t_coup 366 370 IF (zt(i) .LT. t_coup.and.reevap_ice) zrfln(i)=0. 367 371 ! Nouvelle vapeur 368 372 zq(i) = zq(i) - (zrfln(i)-zrfl(i)) & 369 373 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime 374 ! Nouvelle temperature (chaleur latente) 370 375 zt(i) = zt(i) + (zrfln(i)-zrfl(i)) & 371 376 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime & … … 384 389 !>AJ 385 390 !JAM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 386 ! Modification de l'évaporation avec la glace 387 ! Différentiation entre précipitation liquide et solide 388 ! On suppose que coef_evai=2*coef_eva 391 ! Modification de l'evaporation avec la glace 392 ! Differentiation entre precipitation liquide et solide 389 393 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 390 394 395 ! Evap max pour ne pas saturer la fraction sous le nuage 391 396 zqev0 = MAX (0.0, (zqs(i)-zq(i))*zneb(i) ) 392 397 ! zqev0 = MAX (0.0, zqs(i)-zq(i) ) 393 398 394 399 !JAM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 395 ! On diff érencie qsat pour l'eau et la glace400 ! On differencie qsat pour l'eau et la glace 396 401 ! Si zdelta=1. --> glace 397 402 ! Si zdelta=0. --> eau liquide 398 403 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 399 404 405 ! Calcul du qsat par rapport a l'eau liquide 400 406 qsl= R2ES*FOEEW(zt(i),0.)/pplay(i,k) 401 407 qsl= MIN(0.5,qsl) … … 403 409 qsl= qsl*zcor 404 410 411 ! Calcul de l'evaporation du flux de precip herite 412 ! d'au-dessus 413 ! Formulation en racine du flux de precip 414 ! (Klemp & Wilhelmson, 1978; Sundqvist, 1988) 405 415 zqevt = 1.*coef_eva*(1.0-zq(i)/qsl)*SQRT(zrfl(i)) & 406 416 *(paprs(i,k)-paprs(i,k+1))/pplay(i,k)*zt(i)*RD/RG … … 408 418 *RG*dtime/(paprs(i,k)-paprs(i,k+1)) 409 419 420 421 ! Calcul du qsat par rapport a la glace 410 422 qsi= R2ES*FOEEW(zt(i),1.)/pplay(i,k) 411 423 qsi= MIN(0.5,qsi) … … 413 425 qsi= qsi*zcor 414 426 427 ! Calcul de la sublimation du flux de precip solide herite 428 ! d'au-dessus 415 429 zqevti = 1.*coef_eva*(1.0-zq(i)/qsi)*SQRT(zifl(i)) & 416 430 *(paprs(i,k)-paprs(i,k+1))/pplay(i,k)*zt(i)*RD/RG … … 420 434 421 435 !JAM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 422 ! Vérification sur l'évaporation 436 ! Verification sur l'evaporation 437 ! On s'assure qu'on ne sature pas 438 ! la fraction sous le nuage sinon on 439 ! repartit zqev0 en gardant la proportion 440 ! liquide / glace 423 441 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 424 442 … … 436 454 ENDIF 437 455 ENDIF 438 456 ! Nouveaux flux de precip liquide et solide 439 457 zrfln(i) = Max(0.,zrfl(i) - zqev*(paprs(i,k)-paprs(i,k+1)) & 440 458 /RG/dtime) 441 459 zifln(i) = Max(0.,zifl(i) - zqevi*(paprs(i,k)-paprs(i,k+1)) & 442 460 /RG/dtime) 443 444 ! Pour la glace, on révapore toute la précip dans la couche du dessous 445 ! la glace venant de la couche du dessus est simplement dans la couche 446 ! du dessous. 447 448 ! IF (zt(i) .LT. t_coup.and.reevap_ice) zrfln(i)=0. 449 ! print*,zrfl(i),zrfln(i),zqevt,zqevti,RLMLT,'fluxdeprecip' 461 462 ! Mise a jour de la vapeur, temperature et flux de precip 450 463 zq(i) = zq(i) - (zrfln(i)+zifln(i)-zrfl(i)-zifl(i)) & 451 464 * (RG/(paprs(i,k)-paprs(i,k+1)))*dtime … … 466 479 zmelt = ((zt(i)-273.15)/(ztfondue-273.15)) ! jyg 467 480 zmelt = MIN(MAX(zmelt,0.),1.) 481 ! Fusion de la glace 468 482 zrfl(i)=zrfl(i)+zmelt*zifl(i) 469 483 zifl(i)=zifl(i)*(1.-zmelt) 470 484 ! print*,zt(i),'octavio1' 485 ! Chaleur latente de fusion 471 486 zt(i)=zt(i)-zifl(i)*zmelt*(RG*dtime)/(paprs(i,k)-paprs(i,k+1)) & 472 487 *RLMLT/RCPD/(1.0+RVTMP2*zq(i)) … … 481 496 ENDIF ! (.NOT. ice_thermo) 482 497 498 ! ---------------------------------------------------------------- 499 ! Fin evaporation de la precipitation 500 ! ---------------------------------------------------------------- 483 501 ENDIF ! (evap_prec) 484 502 ! … … 518 536 ! endif 519 537 538 ! ---------------------------------------------------------------- 539 ! P2> Formation du nuage 540 ! ---------------------------------------------------------------- 520 541 IF (cpartiel) THEN 521 542 … … 534 555 if (iflag_pdf.eq.0) then 535 556 557 ! version creneau de (Li, 1998) 536 558 do i=1,klon 537 559 zdelq = min(ratqs(i,k),0.99) * zq(i) … … 575 597 end if 576 598 577 !CR: variation de qsat avec T en pr ésence de glace ou non599 !CR: variation de qsat avec T en presence de glace ou non 578 600 !initialisations 579 601 do i=1,klon … … 587 609 !Boucle iterative: ATTENTION, l'option -1 n'est plus activable ici 588 610 if (iflag_fisrtilp_qsat.ge.0) then 611 ! Iteration pour condensation avec variation de qsat(T) 612 ! ----------------------------------------------------- 589 613 do iter=1,iflag_fisrtilp_qsat+1 590 614 … … 599 623 if (iflag_t_glace.eq.0) then 600 624 zdelta = MAX(0.,SIGN(1.,t_glace_min_old-Tbef(i))) 601 else if (iflag_t_glace. eq.1) then625 else if (iflag_t_glace.ge.1) then 602 626 zdelta = MAX(0.,SIGN(1.,t_glace_min-Tbef(i))) 603 627 endif 604 628 endif 629 ! Calcul des PDF lognormales 605 630 zcvm5 = R5LES*RLVTT*(1.-zdelta) + R5IES*RLSTT*zdelta 606 631 zcvm5 = zcvm5 /RCPD/(1.0+RVTMP2*zq(i)) … … 647 672 648 673 else 649 650 !calcul de la fraction de glace 651 !CR: on utilise la nouvelle fonction de JBM pour l ancien calcul 652 ! zfice(i) = icefrac_lsc(Tbef(i), t_glace_min, & 653 ! t_glace_max, exposant_glace) 654 ! zfice(i) = 1.0 - (Tbef(i)-ztglace) / (RTT-ztglace) 655 ! zfice(i) = MIN(MAX(zfice(i),0.0),1.0) 656 ! zfice(i) = zfice(i)**nexpo 657 if (iflag_t_glace.eq.1) then 674 ! Iteration pour convergence avec qsat(T) 675 if (iflag_t_glace.ge.1) then 658 676 CALL icefrac_lsc(klon,zt(:),pplay(:,k)/paprs(:,1),zfice(:)) 659 677 endif … … 669 687 endif 670 688 671 if (iflag_t_glace. eq.1) then689 if (iflag_t_glace.ge.1) then 672 690 dzfice(i)= exposant_glace * zfice(i)**(exposant_glace-1) / (t_glace_min - t_glace_max) 673 691 endif … … 699 717 700 718 701 enddo 719 enddo ! iter=1,iflag_fisrtilp_qsat+1 720 ! Fin d'iteration pour condensation avec variation de qsat(T) 721 ! ----------------------------------------------------------- 702 722 endif 703 723 … … 707 727 708 728 ! if (iflag_fisrtilp_qsat.eq.-1) then 709 !CR: ATTENTION option fausse mais a existe: pour la re-activer, prendre iflag_fisrtilp_qsat=0 et activer les lignes suivantes: 729 !------------------------------------------ 730 !CR: ATTENTION option fausse mais a existe: 731 ! pour la re-activer, prendre iflag_fisrtilp_qsat=0 et 732 ! activer les lignes suivantes: 710 733 IF (1.eq.0) THEN 711 734 DO i=1,klon … … 724 747 rhcl(i,k)=(zqs(i)+zq(i)-zdelq)/2./zqs(i) 725 748 ENDIF 726 ENDDO 727 ENDIF 749 ENDDO 750 ENDIF 751 !------------------------------------------ 728 752 729 753 ! ELSE 730 754 755 ! Calcul de l'eau in-cloud (zqn), 756 ! moyenne dans la maille (zcond), 757 ! fraction nuageuse (rneb) et 758 ! humidite relative ciel-clair (rhcl) 731 759 DO i=1,klon 732 760 IF (rneb(i,k) .LE. 0.0) THEN … … 749 777 ! ENDIF 750 778 751 ! do i=1,klon 752 ! IF (rneb(i,k) .LE. 0.0) zqn(i) = 0.0 753 ! IF (rneb(i,k) .GE. 1.0) zqn(i) = zq(i) 754 ! rneb(i,k) = MAX(0.0,MIN(1.0,rneb(i,k))) 755 !c zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k)/(1.+zdqs(i)) 756 !c On ne divise pas par 1+zdqs pour forcer a avoir l'eau predite par 757 !c la convection. 758 !c ATTENTION !!! Il va falloir verifier tout ca. 759 ! zcond(i) = MAX(0.0,zqn(i)-zqs(i))*rneb(i,k) 760 !c print*,'ZDQS ',zdqs(i) 761 !c--Olivier 762 ! rhcl(i,k)=(zqs(i)+zq(i)-zdelq)/2./zqs(i) 763 ! IF (rneb(i,k) .LE. 0.0) rhcl(i,k)=zq(i)/zqs(i) 764 ! IF (rneb(i,k) .GE. 1.0) rhcl(i,k)=1.0 765 !c--fin 766 ! ENDDO 767 ELSE 779 ELSE ! de IF (cpartiel) 780 ! Cas "tout ou rien" 768 781 DO i = 1, klon 769 782 IF (zq(i).GT.zqs(i)) THEN … … 775 788 ENDDO 776 789 ENDIF 777 ! 790 ! ---------------------------------------------------------------- 791 ! Fin de formation du nuage 792 ! ---------------------------------------------------------------- 793 ! 794 ! Mise a jour vapeur d'eau 778 795 DO i = 1, klon 779 796 zq(i) = zq(i) - zcond(i) … … 781 798 ENDDO 782 799 !AJ< 800 ! Chaleur latente apres formation nuage 801 ! ------------------------------------- 783 802 IF (.NOT. ice_thermo) THEN 784 803 if (iflag_fisrtilp_qsat.lt.1) then … … 792 811 endif 793 812 ELSE 794 if (iflag_t_glace. eq.1) then813 if (iflag_t_glace.ge.1) then 795 814 CALL icefrac_lsc(klon,zt(:),pplay(:,k)/paprs(:,1),zfice(:)) 796 815 endif … … 825 844 ENDIF 826 845 !>AJ 846 ! ---------------------------------------------------------------- 847 ! P3> Formation des precipitations 848 ! ---------------------------------------------------------------- 827 849 ! 828 850 ! Partager l'eau condensee en precipitation et eau liquide nuageuse 829 851 ! 852 853 ! Initialisation de zoliq (eau condensee moyenne dans la maille) 830 854 DO i = 1, klon 831 855 IF (rneb(i,k).GT.0.0) THEN … … 858 882 ENDIF 859 883 ENDIF 884 885 ! Calcul de radliq (eau condensee pour le rayonnement) 886 ! Iteration pour realiser une moyenne de l'eau nuageuse lors de la precip 887 ! Remarque: ce n'est donc pas l'eau restante en fin de precip mais une 888 ! eau moyenne restante dans le nuage sur la duree du pas de temps qui est 889 ! transmise au rayonnement; 890 ! ---------------------------------------------------------------- 860 891 DO i = 1, klon 861 892 IF (rneb(i,k).GT.0.0) THEN … … 878 909 ztot = 0.0 879 910 ELSE 880 ! quantite d'eau a eliminer: zchau 881 ! meme chose pour la glace: zfroi 911 ! quantite d'eau a eliminer: zchau (Sundqvist, 1978) 912 ! meme chose pour la glace: zfroi (Zender & Kiehl, 1997) 882 913 if (ptconv(i,k)) then 883 914 zcl =cld_lc_con … … 916 947 ENDDO ! i = 1,klon 917 948 ENDDO ! n = 1,ninter 949 ! ---------------------------------------------------------------- 918 950 ! 919 951 IF (.NOT. ice_thermo) THEN … … 1028 1060 ELSE 1029 1061 ! JAM************************************************* 1030 ! Revoir partie ci-dessous: àquoi servent psfl et prfl?1062 ! Revoir partie ci-dessous: a quoi servent psfl et prfl? 1031 1063 ! ***************************************************** 1032 1064 … … 1040 1072 ENDDO 1041 1073 ENDIF 1074 ! ---------------------------------------------------------------- 1075 ! Fin de formation des precipitations 1076 ! ---------------------------------------------------------------- 1042 1077 ! 1043 1078 ! … … 1110 1145 ENDDO 1111 1146 ! 1112 !AA ----------------------------------------------------------1113 ! FIN DE BOUCLE SUR K1147 !AA=============================================================== 1148 ! FIN DE LA BOUCLE VERTICALE 1114 1149 end DO 1115 1150 ! 1116 !AA -----------------------------------------------------------1151 !AA================================================================== 1117 1152 ! 1118 1153 ! Pluie ou neige au sol selon la temperature de la 1ere couche -
LMDZ5/branches/testing/libf/phylmd/fonte_neige_mod.F90
r2408 r2542 313 313 ! 314 314 SUBROUTINE fonte_neige_get_vars(pctsrf, fqcalving_out, & 315 fqfonte_out, ffonte_out) 316 315 fqfonte_out, ffonte_out, run_off_lic_out) 317 316 318 317 … … 330 329 REAL, DIMENSION(klon), INTENT(OUT) :: fqfonte_out 331 330 REAL, DIMENSION(klon), INTENT(OUT) :: ffonte_out 331 REAL, DIMENSION(klon), INTENT(OUT) :: run_off_lic_out 332 332 333 333 INTEGER :: nisurf … … 343 343 fqcalving_out(:) = fqcalving_out(:) + fqcalving_global(:,nisurf)*pctsrf(:,nisurf) 344 344 ENDDO 345 run_off_lic_out(:)=run_off_lic(:) 345 346 346 347 END SUBROUTINE fonte_neige_get_vars … … 349 350 ! 350 351 END MODULE fonte_neige_mod 351 352 353 -
LMDZ5/branches/testing/libf/phylmd/icefrac_lsc_mod.F90
r2160 r2542 14 14 ! Doutriaux-Boucher & Quaas 2004, section 2.2.) 15 15 ! 16 ! (JBM 3/14 8/14 )16 ! (JBM 3/14 8/14 5/16) 17 17 18 USE print_control_mod, ONLY: lunout, prt_level 18 19 INCLUDE "nuage.h" 19 20 … … 33 34 34 35 DO ip=1,np 35 www=(max(sig(ip)-sig0,0.))/(1.-sig0) ! w=1 at the surface and 0 for sig < sig0 36 IF (iflag_t_glace.EQ.1) THEN 37 ! Transition to ice close to surface for T<Tmax 38 ! w=1 at the surface and 0 for sig < sig0 39 www=(max(sig(ip)-sig0,0.))/(1.-sig0) 40 ELSEIF (iflag_t_glace.GE.2) THEN 41 ! No convertion to ice close to surface 42 www = 0. 43 ENDIF 36 44 tmin_tmp=www*t_glace_max+(1.-www)*t_glace_min 37 45 icefrac_tmp= 1.0 - (temp(ip)-tmin_tmp) / (t_glace_max-tmin_tmp) -
LMDZ5/branches/testing/libf/phylmd/iophy.F90
r2435 r2542 633 633 ENDIF 634 634 635 ! Set swaero_diag=true if at least one of the concerned variables are defined 636 IF (var%name=='topswad' .OR. var%name=='topswai' .OR. var%name=='solswad' .OR. var%name=='solswai' ) THEN 635 ! Set swaero_diag=true if at least one of the concerned variables are 636 ! defined 637 !--OB 30/05/2016 use wider set of variables 638 IF ( var%name=='topswad' .OR. var%name=='topswad0' .OR. var%name=='solswad' .OR. var%name=='solswad0' .OR. & 639 var%name=='topswai' .OR. var%name=='solswai' .OR. ( iflag_rrtm==1 .AND. ( & 640 var%name=='toplwad' .OR. var%name=='toplwad0' .OR. var%name=='sollwad' .OR. var%name=='sollwad0' .OR. & 641 var%name=='toplwai' .OR. var%name=='sollwai' ) ) ) THEN 637 642 IF ( var%flag(iff)<=lev_files(iff) ) THEN 638 643 swaero_diag=.TRUE. -
LMDZ5/branches/testing/libf/phylmd/limit_slab.F90
r2408 r2542 42 42 lmt_pas = NINT(86400./dtime) 43 43 44 ! Initialize saved variables 45 IF (.NOT. ALLOCATED(bils_save)) THEN 46 ALLOCATE(bils_save(klon), diff_sst_save(klon), diff_siv_save(klon), stat=ierr) 47 IF (ierr /= 0) CALL abort_physic('limit_slab', 'pb in allocation',1) 48 END IF 49 44 50 ! F. Codron 5/14: add defaults for bils, diff_sst (0) 45 51 IF (MOD(itime-1, lmt_pas) == 0) THEN ! time to read 46 52 !$OMP MASTER ! Only master thread 47 53 IF (is_mpi_root) THEN ! Only master processus 48 54 print*,'in limit_slab time to read, itime=',itime … … 53 59 ierr = NF90_OPEN ('limit_slab.nc', NF90_NOWRITE, nid) 54 60 IF (ierr /= NF90_NOERR) THEN 61 PRINT *,'LIMIT_SLAB file not found' 55 62 read_bils=.FALSE. 56 63 read_sst=.FALSE. … … 112 119 ierr = NF90_CLOSE(nid) 113 120 IF (ierr /= NF90_NOERR) CALL abort_physic(modname,'Pb when closing file', 1) 114 END IF ! Read File 121 END IF ! Read File 115 122 IF (read_sst) THEN 116 123 ! Calculate difference in temperature between this day and one ahead … … 128 135 129 136 !$OMP END MASTER 137 !$OMP BARRIER 130 138 131 IF (.NOT. ALLOCATED(bils_save)) THEN 132 ALLOCATE(bils_save(klon), diff_sst_save(klon), diff_siv_save(klon), stat=ierr) 133 IF (ierr /= 0) CALL abort_physic('limit_slab', 'pb in allocation',1) 134 END IF 135 139 ! Send fields to all processes 136 140 ! Give default values if needed 141 CALL bcast(read_bils) 142 CALL bcast(read_sst) 143 CALL bcast(read_siv) 144 PRINT *,'limit_slab sst',read_sst,'siv',read_siv,'qflux',read_bils 137 145 IF (read_bils) THEN 138 146 CALL Scatter(bils_glo, bils_save) … … 156 164 diff_sst(:) = diff_sst_save(:) 157 165 diff_siv(:) = diff_siv_save(:) 166 ! For Debug purpose 167 ! PRINT *,'limit_slab sst',MINVAL(diff_sst(:)),MAXVAL(diff_sst(:)) 168 ! PRINT *,'limit_slab siv',MINVAL(diff_siv(:)),MAXVAL(diff_siv(:)) 169 ! PRINT *,'limit_slab bils',MINVAL(lmt_bils(:)),MAXVAL(lmt_bils(:)) 158 170 159 160 171 END SUBROUTINE limit_slab -
LMDZ5/branches/testing/libf/phylmd/oasis.F90
r2435 r2542 55 55 INTEGER, PARAMETER :: ids_atmco2 = 24 56 56 INTEGER, PARAMETER :: ids_taumod = 25 57 INTEGER, PARAMETER :: maxsend = 25 ! Maximum number of fields to send 57 INTEGER, PARAMETER :: ids_qraioc = 26 58 INTEGER, PARAMETER :: ids_qsnooc = 27 59 INTEGER, PARAMETER :: ids_qraiic = 28 60 INTEGER, PARAMETER :: ids_qsnoic = 29 61 INTEGER, PARAMETER :: maxsend = 29 ! Maximum number of fields to send 58 62 59 63 ! Id for fields received from ocean … … 177 181 infosend(ids_atmco2)%action = .TRUE. ; infosend(ids_atmco2)%name = 'COATMCO2' 178 182 ENDIF 183 infosend(ids_qraioc)%action = .TRUE. ; infosend(ids_qraioc)%name = 'COQRAIOC' 184 infosend(ids_qsnooc)%action = .TRUE. ; infosend(ids_qsnooc)%name = 'COQSNOOC' 185 infosend(ids_qraiic)%action = .TRUE. ; infosend(ids_qraiic)%name = 'COQRAIIC' 186 infosend(ids_qsnoic)%action = .TRUE. ; infosend(ids_qsnoic)%name = 'COQSNOIC' 179 187 180 188 ELSE IF (version_ocean=='opa8') THEN -
LMDZ5/branches/testing/libf/phylmd/ocean_cpl_mod.F90
-
Property
svn:keywords
changed from
Author Date Id Revision
toId
r2298 r2542 1 ! 2 ! $Id$ 1 3 ! 2 4 MODULE ocean_cpl_mod … … 10 12 11 13 PUBLIC :: ocean_cpl_init, ocean_cpl_noice, ocean_cpl_ice 14 12 15 13 16 !**************************************************************************************** … … 63 66 USE calcul_fluxs_mod 64 67 USE indice_sol_mod 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 65 70 66 71 INCLUDE "YOMCST.h" … … 99 104 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 100 105 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 106 101 107 102 108 ! Local variables 103 109 !**************************************************************************************** 104 INTEGER :: i 110 INTEGER :: i, j 105 111 INTEGER, DIMENSION(1) :: iloc 106 112 REAL, DIMENSION(klon) :: cal, beta, dif_grnd … … 110 116 REAL, DIMENSION(klon) :: u1_lay, v1_lay 111 117 LOGICAL :: check=.FALSE. 118 REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol 119 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 112 120 113 121 ! End definitions … … 130 138 dif_grnd = 0. 131 139 agesno(:) = 0. 140 sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. 141 132 142 133 143 DO i = 1, knon … … 141 151 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 142 152 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 143 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 153 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 154 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 155 do j = 1, knon 156 i = knindex(j) 157 sens_prec_liq_o(i,1) = sens_prec_liq(j) 158 sens_prec_sol_o(i,1) = sens_prec_sol(j) 159 lat_prec_liq_o(i,1) = lat_prec_liq(j) 160 lat_prec_sol_o(i,1) = lat_prec_sol(j) 161 enddo 162 163 144 164 145 165 ! - Flux calculation at first modele level for U and V … … 171 191 CALL cpl_send_ocean_fields(itime, knon, knindex, & 172 192 swnet, lwnet, fluxlat, fluxsens, & 173 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp) 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) 174 195 175 196 … … 199 220 USE calcul_fluxs_mod 200 221 USE indice_sol_mod 222 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 201 223 202 224 INCLUDE "YOMCST.h" … … 237 259 REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new 238 260 REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l 261 239 262 240 263 ! Local variables 241 264 !**************************************************************************************** 242 INTEGER :: i 265 INTEGER :: i, j 243 266 INTEGER, DIMENSION(1) :: iloc 244 267 LOGICAL :: check=.FALSE. … … 249 272 REAL, DIMENSION(klon) :: u0, v0 250 273 REAL, DIMENSION(klon) :: u1_lay, v1_lay 274 REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol 275 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 251 276 252 277 ! End definitions … … 254 279 255 280 IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon 281 282 sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. 256 283 257 284 !**************************************************************************************** … … 285 312 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 286 313 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 287 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 314 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 315 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 316 do j = 1, knon 317 i = knindex(j) 318 sens_prec_liq_o(i,2) = sens_prec_liq(j) 319 sens_prec_sol_o(i,2) = sens_prec_sol(j) 320 lat_prec_liq_o(i,2) = lat_prec_liq(j) 321 lat_prec_sol_o(i,2) = lat_prec_sol(j) 322 enddo 288 323 289 324 … … 317 352 pctsrf, lafin, rlon, rlat, & 318 353 swnet, lwnet, fluxlat, fluxsens, & 319 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1) 354 precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1,& 355 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 356 320 357 321 358 -
Property
svn:keywords
changed from
-
LMDZ5/branches/testing/libf/phylmd/ocean_forced_mod.F90
-
Property
svn:keywords
changed from
Author Date Id Revision
toId
r2298 r2542 1 ! 2 ! $Id$ 1 3 ! 2 4 MODULE ocean_forced_mod … … 32 34 USE mod_grid_phy_lmdz 33 35 USE indice_sol_mod 36 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 37 34 38 INCLUDE "YOMCST.h" 35 39 INCLUDE "clesphys.h" … … 66 70 ! Local variables 67 71 !**************************************************************************************** 68 INTEGER :: i 72 INTEGER :: i, j 69 73 REAL, DIMENSION(klon) :: cal, beta, dif_grnd 70 74 REAL, DIMENSION(klon) :: alb_neig, tsurf_lim, zx_sl … … 72 76 REAL, DIMENSION(klon) :: u1_lay, v1_lay 73 77 LOGICAL :: check=.FALSE. 78 REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol 79 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 74 80 75 81 !**************************************************************************************** … … 103 109 alb_neig(:) = 0. 104 110 agesno(:) = 0. 111 sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. 112 105 113 ! Suppose zero surface speed 106 114 u0(:)=0.0 … … 115 123 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 116 124 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 117 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 125 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 126 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 127 128 do j = 1, knon 129 i = knindex(j) 130 sens_prec_liq_o(i,1) = sens_prec_liq(j) 131 sens_prec_sol_o(i,1) = sens_prec_sol(j) 132 lat_prec_liq_o(i,1) = lat_prec_liq(j) 133 lat_prec_sol_o(i,1) = lat_prec_sol(j) 134 enddo 135 118 136 119 137 ! - Flux calculation at first modele level for U and V … … 148 166 USE fonte_neige_mod, ONLY : fonte_neige 149 167 USE indice_sol_mod 168 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 150 169 151 170 ! INCLUDE "indicesol.h" … … 189 208 !**************************************************************************************** 190 209 LOGICAL :: check=.FALSE. 191 INTEGER :: i 210 INTEGER :: i, j 192 211 REAL :: zfra 193 212 REAL, PARAMETER :: t_grnd=271.35 … … 197 216 REAL, DIMENSION(klon) :: u0, v0 198 217 REAL, DIMENSION(klon) :: u1_lay, v1_lay 218 REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol 219 REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol 220 199 221 200 222 !**************************************************************************************** … … 208 230 ! dflux_s, dflux_l and qsurf 209 231 !**************************************************************************************** 232 210 233 tsurf_tmp(:) = tsurf_in(:) 211 234 … … 227 250 228 251 beta = 1.0 252 sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. 253 229 254 ! Suppose zero surface speed 230 255 u0(:)=0.0 … … 237 262 radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & 238 263 f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & 239 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) 264 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 265 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) 266 do j = 1, knon 267 i = knindex(j) 268 sens_prec_liq_o(i,2) = sens_prec_liq(j) 269 sens_prec_sol_o(i,2) = sens_prec_sol(j) 270 lat_prec_liq_o(i,2) = lat_prec_liq(j) 271 lat_prec_sol_o(i,2) = lat_prec_sol(j) 272 enddo 240 273 241 274 ! - Flux calculation at first modele level for U and V -
Property
svn:keywords
changed from
-
LMDZ5/branches/testing/libf/phylmd/phyetat0.F90
r2435 r2542 12 12 qsol, fevap, z0m, z0h, agesno, & 13 13 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & 14 falb_dir, falb_dif, &15 ftsol, pbl_tke, pctsrf, q_ancien, radpas, radsol, rain_fall, ratqs, &14 falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, & 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 17 solsw, 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 wake_s, zgam, & 20 zmax0, zmea, zpic, zsig, & 19 wake_s, zgam, zmax0, zmea, zpic, zsig, & 21 20 zstd, zthe, zval, ale_bl, ale_bl_trig, alp_bl 22 21 USE geometry_mod, ONLY : longitude_deg, latitude_deg … … 324 323 ancien_ok=ancien_ok.AND.phyetat0_get(klev,t_ancien,"TANCIEN","TANCIEN",0.) 325 324 ancien_ok=ancien_ok.AND.phyetat0_get(klev,q_ancien,"QANCIEN","QANCIEN",0.) 325 ancien_ok=ancien_ok.AND.phyetat0_get(klev,ql_ancien,"QLANCIEN","QLANCIEN",0.) 326 ancien_ok=ancien_ok.AND.phyetat0_get(klev,qs_ancien,"QSANCIEN","QSANCIEN",0.) 326 327 ancien_ok=ancien_ok.AND.phyetat0_get(klev,u_ancien,"UANCIEN","UANCIEN",0.) 327 328 ancien_ok=ancien_ok.AND.phyetat0_get(klev,v_ancien,"VANCIEN","VANCIEN",0.) 329 ancien_ok=ancien_ok.AND.phyetat0_get(1,prw_ancien,"PRWANCIEN","PRWANCIEN",0.) 330 ancien_ok=ancien_ok.AND.phyetat0_get(1,prlw_ancien,"PRLWANCIEN","PRLWANCIEN",0.) 331 ancien_ok=ancien_ok.AND.phyetat0_get(1,prsw_ancien,"PRSWANCIEN","PRSWANCIEN",0.) 332 333 ! Ehouarn: addtional tests to check if t_ancien, q_ancien contain 334 ! dummy values (as is the case when generated by ce0l, 335 ! or by iniaqua) 336 if ( (maxval(q_ancien).eq.minval(q_ancien)) .or. & 337 (maxval(ql_ancien).eq.minval(ql_ancien)) .or. & 338 (maxval(qs_ancien).eq.minval(qs_ancien)) .or. & 339 (maxval(prw_ancien).eq.minval(prw_ancien)) .or. & 340 (maxval(prlw_ancien).eq.minval(prlw_ancien)) .or. & 341 (maxval(prsw_ancien).eq.minval(prsw_ancien)) .or. & 342 (maxval(t_ancien).eq.minval(t_ancien)) ) then 343 ancien_ok=.false. 344 endif 328 345 329 346 found=phyetat0_get(klev,clwcon,"CLWCON","CLWCON",0.) -
LMDZ5/branches/testing/libf/phylmd/phyredem.F90
r2408 r2542 9 9 USE fonte_neige_mod, ONLY : fonte_neige_final 10 10 USE pbl_surface_mod, ONLY : pbl_surface_final 11 USE phys_state_var_mod, ONLY: radpas, zmasq, pctsrf, ftsol, falb_dir, &11 USE phys_state_var_mod, ONLY: radpas, zmasq, pctsrf, ftsol, falb_dir, & 12 12 falb_dif, qsol, fevap, radsol, solsw, sollw, & 13 sollwdown, rain_fall, snow_fall, z0m, z0h, & 14 agesno, zmea, zstd, zsig, zgam, zthe, zpic, & 15 zval, rugoro, t_ancien, q_ancien, u_ancien, & 16 v_ancien, clwcon, rnebcon, ratqs, pbl_tke, & 17 wake_delta_pbl_tke, zmax0, f0, sig1, w01, & 18 wake_deltat, wake_deltaq, wake_s, wake_cstar, & 19 wake_pe, wake_fip, fm_therm, entr_therm, & 20 detr_therm, Ale_bl, Ale_bl_trig, Alp_bl, & 13 sollwdown, rain_fall, snow_fall, z0m, z0h, & 14 agesno, zmea, zstd, zsig, zgam, zthe, zpic, & 15 zval, rugoro, t_ancien, q_ancien, & 16 prw_ancien, prlw_ancien, prsw_ancien, & 17 ql_ancien, qs_ancien, u_ancien, & 18 v_ancien, clwcon, rnebcon, ratqs, pbl_tke, & 19 wake_delta_pbl_tke, zmax0, f0, sig1, w01, & 20 wake_deltat, wake_deltaq, wake_s, wake_cstar,& 21 wake_pe, wake_fip, fm_therm, entr_therm, & 22 detr_therm, Ale_bl, Ale_bl_trig, Alp_bl, & 21 23 du_gwd_rando, du_gwd_front 22 24 USE geometry_mod, ONLY : longitude_deg, latitude_deg … … 201 203 CALL put_field("QANCIEN", "QANCIEN", q_ancien) 202 204 203 CALL put_field("UANCIEN", "", u_ancien) 204 205 CALL put_field("VANCIEN", "", v_ancien) 205 CALL put_field("QLANCIEN", "QLANCIEN", ql_ancien) 206 207 CALL put_field("QSANCIEN", "QSANCIEN", qs_ancien) 208 209 CALL put_field("PRWANCIEN", "PRWANCIEN", prw_ancien) 210 211 CALL put_field("PRLWANCIEN", "PRLWANCIEN", prlw_ancien) 212 213 CALL put_field("PRSWANCIEN", "PRSWANCIEN", prsw_ancien) 214 215 CALL put_field("UANCIEN", "UANCIEN", u_ancien) 216 217 CALL put_field("VANCIEN", "VANCIEN", v_ancien) 206 218 207 219 CALL put_field("CLWCON", "Eau liquide convective", clwcon) -
LMDZ5/branches/testing/libf/phylmd/phys_cal_mod.F90
r2435 r2542 15 15 INTEGER,SAVE :: year_len ! number of days in the current year 16 16 !$OMP THREADPRIVATE(year_len) 17 REAL,SAVE :: hour 17 REAL,SAVE :: hour ! seconds elapsed (in the current day) since midnight 18 18 !$OMP THREADPRIVATE(hour) 19 19 REAL,SAVE :: jD_1jan -
LMDZ5/branches/testing/libf/phylmd/phys_local_var_mod.F90
r2488 r2542 21 21 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:) 22 22 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) 23 REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:) 24 !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn) 25 REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:) 26 !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d) 23 27 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:) 24 28 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) … … 133 137 !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0) 134 138 ! 139 REAL, SAVE, ALLOCATABLE :: stratomask(:,:) 140 !$OMP THREADPRIVATE(stratomask) 135 141 REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:) 136 142 !$OMP THREADPRIVATE(tausum_aero) … … 255 261 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt 256 262 !$OMP THREADPRIVATE(JrNt) 257 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw 258 !$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw )263 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, fder, plcl, plfc, prw, prlw, prsw 264 !$OMP THREADPRIVATE(dthmin, evap, fder, plcl, plfc, prw, prlw, prsw) 259 265 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m 260 266 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m) … … 277 283 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte 278 284 !$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte) 279 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc 280 !$OMP THREADPRIVATE(zxqsurf, rain_lsc) 285 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic 286 !$OMP THREADPRIVATE(zxrunofflic) 287 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num 288 !$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num) 281 289 ! 282 290 !jyg+nrlmd< … … 401 409 allocate(tr_seri(klon,klev,nbtr)) 402 410 allocate(d_t_dyn(klon,klev),d_q_dyn(klon,klev)) 411 allocate(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev)) 412 allocate(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon)) 403 413 allocate(d_u_dyn(klon,klev),d_v_dyn(klon,klev)) 404 414 allocate(d_tr_dyn(klon,klev,nbtr)) !RomP … … 455 465 ! allocate(tausum_aero(klon,nwave,naero_spc)) 456 466 ! allocate(tau3d_aero(klon,klev,nwave,naero_spc)) 467 allocate(stratomask(klon,klev)) 457 468 !--correction mini bug OB 458 469 allocate(tausum_aero(klon,nwave,naero_tot)) … … 521 532 ALLOCATE(JrNt(klon)) 522 533 ALLOCATE(dthmin(klon), evap(klon), fder(klon), plcl(klon), plfc(klon)) 523 ALLOCATE(prw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon))534 ALLOCATE(prw(klon), prlw(klon), prsw(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon)) 524 535 ALLOCATE(s_lcl(klon)) 525 536 ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon)) … … 534 545 ALLOCATE(zxfqcalving(klon), zxfluxlat(klon)) 535 546 ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon)) 547 ALLOCATE(zxrunofflic(klon)) 536 548 ALLOCATE(rain_lsc(klon)) 549 ALLOCATE(rain_num(klon)) 537 550 ! 538 551 ALLOCATE(sens_x(klon), sens_w(klon)) … … 615 628 deallocate(tr_seri) 616 629 deallocate(d_t_dyn,d_q_dyn) 630 deallocate(d_ql_dyn,d_qs_dyn) 631 deallocate(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d) 617 632 deallocate(d_u_dyn,d_v_dyn) 618 633 deallocate(d_tr_dyn) !RomP … … 658 673 deallocate(topsw0_aero,solsw0_aero) 659 674 deallocate(topswcf_aero,solswcf_aero) 675 deallocate(stratomask) 660 676 deallocate(tausum_aero) 661 677 deallocate(tau3d_aero) … … 725 741 DEALLOCATE(cldljn, cldmjn, cldhjn, cldtjn, JrNt) 726 742 DEALLOCATE(dthmin, evap, fder, plcl, plfc) 727 DEALLOCATE(prw, zustar, zu10m, zv10m, rh2m, s_lcl)743 DEALLOCATE(prw, prlw, prsw, zustar, zu10m, zv10m, rh2m, s_lcl) 728 744 DEALLOCATE(s_pblh, s_pblt, s_therm) 729 745 ! … … 736 752 DEALLOCATE(uq, ve, vq, zxffonte) 737 753 DEALLOCATE(zxfqcalving, zxfluxlat) 754 DEALLOCATE(zxrunofflic) 738 755 DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf) 739 756 DEALLOCATE(rain_lsc) 757 DEALLOCATE(rain_num) 740 758 ! 741 759 DEALLOCATE(sens_x, sens_w) -
LMDZ5/branches/testing/libf/phylmd/phys_output_ctrlout_mod.F90
r2488 r2542 154 154 TYPE(ctrl_out), SAVE :: o_plul = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), & 155 155 'plul', 'Large-scale Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /)) 156 TYPE(ctrl_out), SAVE :: o_plun = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11 /), & 157 'plun', 'Numerical Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /)) 156 158 TYPE(ctrl_out), SAVE :: o_pluc = ctrl_out((/ 1, 1, 1, 10, 5, 10, 11, 11, 11 /), & 157 159 'pluc', 'Convective Precip.', 'kg/(s*m2)', (/ ('', i=1, 9) /)) … … 160 162 TYPE(ctrl_out), SAVE :: o_evap = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), & 161 163 'evap', 'Evaporat', 'kg/(s*m2)', (/ ('', i=1, 9) /)) 164 165 TYPE(ctrl_out), SAVE :: o_sens_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 166 'sens_rain_oce', 'Sensible heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /)) 167 TYPE(ctrl_out), SAVE :: o_sens_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 168 'sens_rain_sic', 'Sensible heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /)) 169 TYPE(ctrl_out), SAVE :: o_sens_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 170 'sens_snow_oce', 'Sensible heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /)) 171 TYPE(ctrl_out), SAVE :: o_sens_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 172 'sens_snow_sic', 'Sensible heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /)) 173 TYPE(ctrl_out), SAVE :: o_lat_prec_liq_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 174 'lat_rain_oce', 'Latent heat flux of liquid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /)) 175 TYPE(ctrl_out), SAVE :: o_lat_prec_liq_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 176 'lat_rain_sic', 'Latent heat flux of liquid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /)) 177 TYPE(ctrl_out), SAVE :: o_lat_prec_sol_oce = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 178 'lat_snow_oce', 'Latent heat flux of solid prec. over ocean', 'W/m2', (/ ('', i=1, 9) /)) 179 TYPE(ctrl_out), SAVE :: o_lat_prec_sol_sic = ctrl_out((/ 5, 5, 10, 10, 5, 10, 11, 11, 11 /), & 180 'lat_snow_sic', 'Latent heat flux of solid prec. over seaice', 'W/m2', (/ ('', i=1, 9) /)) 181 162 182 163 183 TYPE(ctrl_out), SAVE, DIMENSION(4) :: o_evap_srf = (/ & … … 271 291 TYPE(ctrl_out), SAVE :: o_fqfonte = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 272 292 'fqfonte', 'Land ice melt', 'kg/m2/s', (/ ('', i=1, 9) /)) 293 TYPE(ctrl_out), SAVE :: o_runofflic = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 294 'runofflic', 'Land ice melt to ocean', 'kg/m2/s', (/ ('', i=1, 9) /)) 273 295 TYPE(ctrl_out), SAVE :: o_taux = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 274 296 'taux', 'Zonal wind stress', 'Pa', (/ ('', i=1, 9) /)) … … 449 471 TYPE(ctrl_out), SAVE :: o_prw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), & 450 472 'prw', 'Precipitable water', 'kg/m2', (/ ('', i=1, 9) /)) 473 TYPE(ctrl_out), SAVE :: o_prlw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), & 474 'prlw', 'Precipitable liquid water', 'kg/m2', (/ ('', i=1, 9) /)) 475 TYPE(ctrl_out), SAVE :: o_prsw = ctrl_out((/ 1, 1, 10, 10, 10, 10, 11, 11, 11 /), & 476 'prsw', 'Precipitable solid water', 'kg/m2', (/ ('', i=1, 9) /)) 451 477 TYPE(ctrl_out), SAVE :: o_s_pblh = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 452 478 's_pblh', 'Boundary Layer Height', 'm', (/ ('', i=1, 9) /)) … … 842 868 ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /),'OD550_'//name_aero_tau(14), & 843 869 "Aerosol Optical depth at 550 nm "//name_aero_tau(14),"14", (/ ('', i=1, 9) /)) /) 844 845 846 847 870 ! 848 871 TYPE(ctrl_out), SAVE :: o_tausumaero_lw = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), & … … 992 1015 TYPE(ctrl_out), SAVE :: o_dqphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 993 1016 'dqphy2d', 'Physics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /)) 1017 TYPE(ctrl_out), SAVE :: o_dqlphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1018 'dqlphy', 'Physics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /)) 1019 TYPE(ctrl_out), SAVE :: o_dqlphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1020 'dqlphy2d', 'Physics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /)) 1021 TYPE(ctrl_out), SAVE :: o_dqsphy = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1022 'dqsphy', 'Physics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /)) 1023 TYPE(ctrl_out), SAVE :: o_dqsphy2d = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1024 'dqsphy2d', 'Physics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /)) 994 1025 TYPE(ctrl_out), SAVE :: o_pr_con_l = ctrl_out((/ 2, 10, 10, 10, 10, 10, 11, 11, 11 /), & 995 1026 'pr_con_l', 'Convective precipitation lic', ' ', (/ ('', i=1, 9) /)) … … 1016 1047 TYPE(ctrl_out), SAVE :: o_lcc3dstra = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), & 1017 1048 'lcc3dstra', 'Stratiform cloud liquid fraction', '1', (/ ('', i=1, 9) /)) 1049 TYPE(ctrl_out), SAVE :: o_stratomask = ctrl_out((/ 2, 6, 10, 10, 10, 10, 11, 11, 11 /), & 1050 'stratomask', 'Stratospheric fraction', '1', (/ ('', i=1, 9) /)) 1018 1051 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1019 1052 … … 1071 1104 TYPE(ctrl_out), SAVE :: o_dqdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1072 1105 'dqdyn2d', 'Dynamics dQ', '(kg/m2)/s', (/ ('', i=1, 9) /)) 1106 TYPE(ctrl_out), SAVE :: o_dqldyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1107 'dqldyn', 'Dynamics dQL', '(kg/kg)/s', (/ ('', i=1, 9) /)) 1108 TYPE(ctrl_out), SAVE :: o_dqldyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1109 'dqldyn2d', 'Dynamics dQL', '(kg/m2)/s', (/ ('', i=1, 9) /)) 1110 TYPE(ctrl_out), SAVE :: o_dqsdyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1111 'dqsdyn', 'Dynamics dQS', '(kg/kg)/s', (/ ('', i=1, 9) /)) 1112 TYPE(ctrl_out), SAVE :: o_dqsdyn2d = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1113 'dqsdyn2d', 'Dynamics dQS', '(kg/m2)/s', (/ ('', i=1, 9) /)) 1073 1114 TYPE(ctrl_out), SAVE :: o_dudyn = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1074 1115 'dudyn', 'Dynamics dU', 'm/s2', (/ ('', i=1, 9) /)) … … 1402 1443 "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /)) 1403 1444 TYPE(ctrl_out), SAVE :: o_vxq = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), & 1404 'v q', 'vq', 'm/s * (kg/kg)', (/ "inst(X)", "inst(X)", "inst(X)", &1445 'vxq', 'vxq', 'm/s * (kg/kg)', (/ "inst(X)", "inst(X)", "inst(X)", & 1405 1446 "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)", "inst(X)" /)) 1406 1447 TYPE(ctrl_out), SAVE :: o_vxT = ctrl_out((/ 11, 11, 11, 11, 11, 11, 6, 6, 6 /), & -
LMDZ5/branches/testing/libf/phylmd/phys_output_mod.F90
r2408 r2542 81 81 INTEGER :: nlevSTD, radpas 82 82 LOGICAL :: ok_mensuel, ok_journe, ok_hf, ok_instan 83 LOGICAL :: ok_LES,ok_ade,ok_aie,flag_aerosol_strat 83 LOGICAL :: ok_LES,ok_ade,ok_aie 84 INTEGER :: flag_aerosol_strat 84 85 LOGICAL :: new_aod, aerosol_couple 85 86 INTEGER, INTENT(IN):: read_climoz ! read ozone climatology … … 255 256 idayref = day_ref 256 257 IF (klon_glo==1) THEN 257 CALL ymds2ju(annee_ref, 1, idayref, hour, zjulian) !jyg 258 ! current_time (used to compute hour) is updated at the begining of 259 ! the physics; to set the correct outputs "initial time" we thus 260 ! have to use (hour-dtphys). 261 CALL ymds2ju(annee_ref, 1, idayref, hour-pdtphys, zjulian) 262 print *,'phys_output_mod: annee,iday,hour,zjulian=',annee_ref,idayref, hour, zjulian 258 263 ELSE 259 264 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) -
LMDZ5/branches/testing/libf/phylmd/phys_output_var_mod.F90
r2408 r2542 47 47 48 48 ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics 49 LOGICAL, SAVE :: swaero_diag=.FALSE. 49 !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call 50 !-- and corrected back to TRUE based on output requests 51 LOGICAL, SAVE :: swaero_diag=.TRUE. 50 52 !$OMP THREADPRIVATE(swaero_diag) 51 53 … … 74 76 END TYPE ctrl_out 75 77 78 REAL, SAVE, ALLOCATABLE :: sens_prec_liq_o(:,:), sens_prec_sol_o(:,:) 79 REAL, SAVE, ALLOCATABLE :: lat_prec_liq_o(:,:), lat_prec_sol_o(:,:) 80 !$OMP THREADPRIVATE(sens_prec_liq_o, sens_prec_sol_o,lat_prec_liq_o,lat_prec_sol_o) 81 76 82 CONTAINS 77 83 … … 88 94 allocate(snow_o(klon), zfra_o(klon)) 89 95 allocate(itau_con(klon)) 96 allocate(sens_prec_liq_o(klon,2)) 97 allocate(sens_prec_sol_o(klon,2)) 98 allocate(lat_prec_liq_o(klon,2)) 99 allocate(lat_prec_sol_o(klon,2)) 100 sens_prec_liq_o = 0.0 ; sens_prec_sol_o = 0.0 101 lat_prec_liq_o = 0.0 ; lat_prec_sol_o = 0.0 102 90 103 allocate (bils_ec(klon),bils_ech(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon)) 91 104 -
LMDZ5/branches/testing/libf/phylmd/phys_output_write_mod.F90
r2488 r2542 17 17 SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, & 18 18 pplay, lmax_th, aerosol_couple, & 19 ok_ade, ok_aie, ivap, new_aod, ok_sync, &19 ok_ade, ok_aie, ivap, iliq, isol, new_aod, ok_sync, & 20 20 ptconv, read_climoz, clevSTD, ptconvth, & 21 21 d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc) … … 36 36 o_wind10m, o_wind10max, o_gusts, o_sicf, & 37 37 o_psol, o_mass, o_qsurf, o_qsol, & 38 o_precip, o_ndayrain, o_plul, o_pluc, &38 o_precip, o_ndayrain, o_plul, o_pluc, o_plun, & 39 39 o_snow, o_msnow, o_fsnow, o_evap, o_ep,o_epmax_diag, & ! epmax_cape 40 40 o_tops, o_tops0, o_topl, o_topl0, & … … 50 50 o_bils_ec,o_bils_ech, o_bils_tke, o_bils_kinetic, & 51 51 o_bils_latent, o_bils_enthalp, o_sens, & 52 o_fder, o_ffonte, o_fqcalving, o_fqfonte, &52 o_fder, o_ffonte, o_fqcalving, o_fqfonte, o_runofflic, & 53 53 o_taux, o_tauy, o_snowsrf, o_qsnow, & 54 54 o_snowhgt, o_toice, o_sissnow, o_runoff, & … … 67 67 o_wbeff, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, & 68 68 o_dnwd, o_dnwd0, o_ftime_con, o_mc, & 69 o_prw, o_ s_pblh, o_s_pblt, o_s_lcl, &69 o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, & 70 70 o_s_therm, o_uSTDlevs, o_vSTDlevs, & 71 71 o_wSTDlevs, o_zSTDlevs, o_qSTDlevs, & … … 112 112 o_swtoacf_zero, o_swsrfcf_zero, & 113 113 o_topswai, o_solswai, o_scdnc, & 114 o_cldncl, o_reffclws, o_reffclwc, &114 o_cldncl, o_reffclws, o_reffclwc, o_stratomask,& 115 115 o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, & 116 116 o_lcc3dstra, o_reffclwtop, o_ec550aer, & … … 120 120 o_zfull, o_zhalf, o_rneb, o_rnebjn, o_rnebcon, & 121 121 o_rnebls, o_rhum, o_ozone, o_ozone_light, & 122 o_dtphy, o_dqphy, o_dqphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, & 122 o_dtphy, o_dqphy, o_dqphy2d, o_dqlphy, o_dqlphy2d, & 123 o_dqsphy, o_dqsphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, & 123 124 o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, & 124 125 o_tke_max, o_kz, o_kz_max, o_clwcon, & 125 o_dtdyn, o_dqdyn, o_dqdyn2d, o_dudyn, o_dvdyn, & 126 o_dtdyn, o_dqdyn, o_dqdyn2d, o_dqldyn, o_dqldyn2d, & 127 o_dqsdyn, o_dqsdyn2d, o_dudyn, o_dvdyn, & 126 128 o_dtcon, o_tntc, o_ducon, o_dvcon, & 127 129 o_dqcon, o_dqcon2d, o_tnhusc, o_tnhusc, o_dtlsc, & … … 161 163 o_dtr_sat, o_dtr_uscav, o_trac_cum, o_du_gwd_rando, o_dv_gwd_rando, & 162 164 o_ustr_gwd_hines,o_vstr_gwd_hines,o_ustr_gwd_rando,o_vstr_gwd_rando, & 163 o_ustr_gwd_front,o_vstr_gwd_front 165 o_ustr_gwd_front,o_vstr_gwd_front, & 166 o_sens_prec_liq_oce, o_sens_prec_liq_sic, & 167 o_sens_prec_sol_oce, o_sens_prec_sol_sic, & 168 o_lat_prec_liq_oce, o_lat_prec_liq_sic, & 169 o_lat_prec_sol_oce, o_lat_prec_sol_sic 164 170 165 171 USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, & … … 193 199 t2m_min_mon, t2m_max_mon, evap, & 194 200 zu10m, zv10m, zq2m, zustar, zxqsurf, & 195 rain_lsc, snow_lsc, bils, sens, fder, &196 zxffonte, zxfqcalving, zxfqfonte, fluxu, &201 rain_lsc, rain_num, snow_lsc, bils, sens, fder, & 202 zxffonte, zxfqcalving, zxfqfonte, zxrunofflic, fluxu, & 197 203 fluxv, zxsnow, qsnow, snowhgt, to_ice, & 198 204 sissnow, runoff, albsol3_lic, evap_pot, & … … 201 207 cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, & 202 208 cldtjn, cldq, flwp, fiwp, ue, ve, uq, vq, & 203 plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, &209 plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, prlw, prsw, & 204 210 s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, & 205 211 vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, & … … 228 234 toplwad_aero, toplwad0_aero, sollwad_aero, & 229 235 sollwad0_aero, toplwai_aero, sollwai_aero, & 230 scdnc, cldncl, reffclws, reffclwc, cldnvi, &236 scdnc, cldncl, reffclws, reffclwc, cldnvi, stratomask,& 231 237 lcc, lcc3d, lcc3dcon, lcc3dstra, reffclwtop, & 232 238 ec550aer, flwc, fiwc, t_seri, theta, q_seri, & 233 !jyg<234 !! ql_seri, zphi, u_seri, v_seri, omega, cldfra, &235 239 ql_seri, tr_seri, & 236 240 zphi, u_seri, v_seri, omega, cldfra, & 237 !>jyg 238 rneb, rnebjn, zx_rh, d_t_dyn, d_q_dyn, & 241 rneb, rnebjn, zx_rh, d_t_dyn, & 242 d_q_dyn, d_ql_dyn, d_qs_dyn, & 243 d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, & 239 244 d_u_dyn, d_v_dyn, d_t_con, d_t_ajsb, d_t_ajs, & 240 245 d_u_ajs, d_v_ajs, & … … 256 261 itau_con, nfiles, clef_files, nid_files, & 257 262 zustr_gwd_hines, zvstr_gwd_hines,zustr_gwd_rando, zvstr_gwd_rando, & 258 zustr_gwd_front, zvstr_gwd_front 263 zustr_gwd_front, zvstr_gwd_front, & 264 sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 265 266 259 267 USE ocean_slab_mod, only: tslab, slab_bils, slab_bilg, tice, seaice 260 268 USE pbl_surface_mod, only: snow … … 288 296 289 297 ! Input 290 INTEGER :: itap, ivap, read_climoz298 INTEGER :: itap, ivap, iliq, isol, read_climoz 291 299 INTEGER, DIMENSION(klon) :: lmax_th 292 300 LOGICAL :: aerosol_couple, ok_sync … … 301 309 REAL, DIMENSION(klon,klev,nqtot) :: qx, d_qx 302 310 REAL, DIMENSION(klon, klev) :: zmasse 303 LOGICAL:: flag_aerosol_strat311 INTEGER :: flag_aerosol_strat 304 312 INTEGER :: flag_aerosol 305 313 LOGICAL :: ok_cdnc … … 440 448 ENDIF 441 449 CALL histwrite_phy(o_plul, zx_tmp_fi2d) 450 CALL histwrite_phy(o_plun, rain_num) 442 451 443 452 IF (vars_defined) THEN … … 545 554 CALL histwrite_phy(o_fqcalving, zxfqcalving) 546 555 CALL histwrite_phy(o_fqfonte, zxfqfonte) 556 CALL histwrite_phy(o_runofflic, zxrunofflic) 547 557 IF (vars_defined) THEN 548 558 zx_tmp_fi2d=0. … … 618 628 619 629 ENDDO 630 631 IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_liq_o(1 : klon, 1) 632 CALL histwrite_phy(o_sens_prec_liq_oce, zx_tmp_fi2d) 633 IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_liq_o(1 : klon, 2) 634 CALL histwrite_phy(o_sens_prec_liq_sic, zx_tmp_fi2d) 635 IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_sol_o(1 : klon, 1) 636 CALL histwrite_phy(o_sens_prec_sol_oce, zx_tmp_fi2d) 637 IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_sol_o(1 : klon, 2) 638 CALL histwrite_phy(o_sens_prec_sol_sic, zx_tmp_fi2d) 639 640 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lat_prec_liq_o(1 : klon, 1) 641 CALL histwrite_phy(o_lat_prec_liq_oce, zx_tmp_fi2d) 642 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lat_prec_liq_o(1 : klon, 2) 643 CALL histwrite_phy(o_lat_prec_liq_sic, zx_tmp_fi2d) 644 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lat_prec_sol_o(1 : klon, 1) 645 CALL histwrite_phy(o_lat_prec_sol_oce, zx_tmp_fi2d) 646 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lat_prec_sol_o(1 : klon, 2) 647 CALL histwrite_phy(o_lat_prec_sol_sic, zx_tmp_fi2d) 648 620 649 DO nsrf=1,nbsrf+1 621 650 CALL histwrite_phy(o_wstar(nsrf), wstar(1 : klon, nsrf)) … … 671 700 ENDIF !iflag_con .GE. 3 672 701 CALL histwrite_phy(o_prw, prw) 702 CALL histwrite_phy(o_prlw, prlw) 703 CALL histwrite_phy(o_prsw, prsw) 673 704 CALL histwrite_phy(o_s_pblh, s_pblh) 674 705 CALL histwrite_phy(o_s_pblt, s_pblt) … … 938 969 !--STRAT AER 939 970 ENDIF 940 IF (flag_aerosol.GT.0.OR.flag_aerosol_strat ) THEN971 IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN 941 972 ! DO naero = 1, naero_spc 942 973 !--correction mini bug OB … … 946 977 END DO 947 978 ENDIF 948 IF (flag_aerosol_strat ) THEN979 IF (flag_aerosol_strat.GT.0) THEN 949 980 CALL histwrite_phy(o_tausumaero_lw, & 950 981 tausum_aero(:,6,id_STRAT_phy) ) … … 1032 1063 CALL histwrite_phy(o_zfull,zphi/RG) 1033 1064 1065 IF (flag_aerosol_strat.EQ.2) THEN 1066 CALL histwrite_phy(o_stratomask, stratomask) 1067 ENDIF 1068 1034 1069 IF (vars_defined) THEN 1035 1070 zx_tmp_fi3d(:,1)= pphis(:)/RG … … 1064 1099 1065 1100 CALL histwrite_phy(o_dtphy, d_t) 1101 1066 1102 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap)) 1067 1103 CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d) 1068 1104 CALL histwrite_phy(o_dqphy2d, zx_tmp_fi2d) 1105 1106 CALL histwrite_phy(o_dqlphy, d_qx(:,:,iliq)) 1107 CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d) 1108 CALL histwrite_phy(o_dqlphy2d, zx_tmp_fi2d) 1109 1110 IF (nqo.EQ.3) THEN 1111 CALL histwrite_phy(o_dqsphy, d_qx(:,:,isol)) 1112 CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d) 1113 CALL histwrite_phy(o_dqsphy2d, zx_tmp_fi2d) 1114 ELSE 1115 zx_tmp_fi3d=0.0 1116 CALL histwrite_phy(o_dqsphy, zx_tmp_fi3d) 1117 zx_tmp_fi2d=0.0 1118 CALL histwrite_phy(o_dqsphy2d, zx_tmp_fi2d) 1119 ENDIF 1120 1069 1121 DO nsrf=1, nbsrf 1070 1122 IF (vars_defined) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf) … … 1103 1155 CALL histwrite_phy(o_clwcon, clwcon0) 1104 1156 CALL histwrite_phy(o_dtdyn, d_t_dyn) 1157 1105 1158 CALL histwrite_phy(o_dqdyn, d_q_dyn) 1106 CALL water_int(klon,klev,d_q_dyn,zmasse,zx_tmp_fi2d) 1107 CALL histwrite_phy(o_dqdyn2d,zx_tmp_fi2d) 1159 1160 CALL histwrite_phy(o_dqdyn2d,d_q_dyn2d) 1161 1162 CALL histwrite_phy(o_dqldyn, d_ql_dyn) 1163 1164 CALL histwrite_phy(o_dqldyn2d, d_ql_dyn2d) 1165 1166 CALL histwrite_phy(o_dqsdyn, d_qs_dyn) 1167 1168 CALL histwrite_phy(o_dqsdyn2d, d_qs_dyn2d) 1169 1108 1170 CALL histwrite_phy(o_dudyn, d_u_dyn) 1109 1171 CALL histwrite_phy(o_dvdyn, d_v_dyn) -
LMDZ5/branches/testing/libf/phylmd/phys_state_var_mod.F90
r2435 r2542 64 64 REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:) 65 65 !$OMP THREADPRIVATE(t_ancien, q_ancien) 66 REAL, ALLOCATABLE, SAVE :: ql_ancien(:,:), qs_ancien(:,:) 67 !$OMP THREADPRIVATE(ql_ancien, qs_ancien) 68 REAL, ALLOCATABLE, SAVE :: prw_ancien(:), prlw_ancien(:), prsw_ancien(:) 69 !$OMP THREADPRIVATE(prw_ancien, prlw_ancien, prsw_ancien) 66 70 REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:) 67 71 !$OMP THREADPRIVATE(u_ancien, v_ancien) … … 441 445 ALLOCATE(rugoro(klon)) 442 446 ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev)) 447 ALLOCATE(ql_ancien(klon,klev), qs_ancien(klon,klev)) 448 ALLOCATE(prw_ancien(klon), prlw_ancien(klon), prsw_ancien(klon)) 443 449 ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev)) 444 450 !!! Rom P >>> … … 601 607 deallocate(zthe, zpic, zval) 602 608 deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon) 609 deallocate(qs_ancien, ql_ancien) 610 deallocate(prw_ancien, prlw_ancien, prsw_ancien) 603 611 deallocate(qtc_cv,sigt_cv) 604 deallocate( u_ancien, v_ancien)605 deallocate( 612 deallocate(u_ancien, v_ancien) 613 deallocate(tr_ancien) !RomP 606 614 deallocate(ratqs, pbl_tke,coefh,coefm) 607 615 !nrlmd< -
LMDZ5/branches/testing/libf/phylmd/physiq_mod.F90
r2488 r2542 68 68 69 69 #ifdef CPP_RRTM 70 USE YOERAD , ONLY : NRADLP 70 USE YOERAD, ONLY : NRADLP 71 USE YOESW, ONLY : RSUN 71 72 #endif 72 73 USE ioipsl_getin_p_mod, ONLY : getin_p … … 115 116 !! d_t_dyn-input-R-tendance dynamique pour "t" (K/s) 116 117 !! d_q_dyn-input-R-tendance dynamique pour "q" (kg/kg/s) 118 !! d_ql_dyn-input-R-tendance dynamique pour "ql" (kg/kg/s) 119 !! d_qs_dyn-input-R-tendance dynamique pour "qs" (kg/kg/s) 117 120 !! flxmass_w -input-R- flux de masse verticale 118 121 !! d_u-----output-R-tendance physique de "u" (m/s/s) … … 366 369 real, save :: ale_bl_prescr=0. 367 370 368 real, save :: ale_max=1000.369 real, save :: alp_max=2.370 371 371 real, save :: wake_s_min_lsp=0.1 372 372 373 373 !$OMP THREADPRIVATE(alp_bl_prescr,ale_bl_prescr) 374 !$OMP THREADPRIVATE(ale_max,alp_max)375 374 !$OMP THREADPRIVATE(wake_s_min_lsp) 376 375 … … 436 435 LOGICAL,SAVE :: ok_adjwk=.FALSE. 437 436 !$OMP THREADPRIVATE(ok_adjwk) 438 REAL, dimension(klon) :: www439 437 REAL, SAVE :: alp_offset 440 438 !$OMP THREADPRIVATE(alp_offset) … … 681 679 save ratqsbas,ratqshaut,tau_ratqs 682 680 !$OMP THREADPRIVATE(ratqsbas,ratqshaut,tau_ratqs) 681 REAL, SAVE :: ratqsp0=50000., ratqsdp=20000. 682 !$OMP THREADPRIVATE(ratqsp0, ratqsdp) 683 683 684 684 ! Parametres lies au nouveau schema de nuages (SB, PDF) … … 835 835 ! 836 836 !--STRAT AEROSOL 837 LOGICAL, SAVE :: flag_aerosol_strat837 INTEGER, SAVE :: flag_aerosol_strat 838 838 !$OMP THREADPRIVATE(flag_aerosol_strat) 839 839 !c-fin STRAT AEROSOL … … 1041 1041 forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg 1042 1042 1043 1044 1045 1043 modname = 'physiq' 1046 1044 !IM … … 1055 1053 CALL getin_p('random_notrig_max',random_notrig_max) 1056 1054 CALL getin_p('ok_adjwk',ok_adjwk) 1055 CALL getin_p('ratqsp0',ratqsp0) 1056 CALL getin_p('ratqsdp',ratqsdp) 1057 1057 ENDIF 1058 1058 … … 1597 1597 !--store initial water burden 1598 1598 qql1(:)=0.0 1599 DO i = 1, klon 1600 DO k = 1, klev 1601 qql1(i)=qql1(i)+(q_seri(i,k)+ql_seri(i,k))*zmasse(i,k) 1602 ENDDO 1599 DO k = 1, klev 1600 qql1(:)=qql1(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k))*zmasse(:,k) 1603 1601 ENDDO 1604 1602 ENDIF … … 1654 1652 ! 1655 1653 IF (ancien_ok) THEN 1656 DO k = 1, klev 1657 DO i = 1, klon 1658 d_u_dyn(i,k) = (u_seri(i,k)-u_ancien(i,k))/dtime 1659 d_v_dyn(i,k) = (v_seri(i,k)-v_ancien(i,k))/dtime 1660 d_t_dyn(i,k) = (t_seri(i,k)-t_ancien(i,k))/dtime 1661 d_q_dyn(i,k) = (q_seri(i,k)-q_ancien(i,k))/dtime 1662 ENDDO 1663 ENDDO 1654 ! 1655 d_u_dyn(:,:) = (u_seri(:,:)-u_ancien(:,:))/dtime 1656 d_v_dyn(:,:) = (v_seri(:,:)-v_ancien(:,:))/dtime 1657 d_t_dyn(:,:) = (t_seri(:,:)-t_ancien(:,:))/dtime 1658 d_q_dyn(:,:) = (q_seri(:,:)-q_ancien(:,:))/dtime 1659 d_ql_dyn(:,:) = (ql_seri(:,:)-ql_ancien(:,:))/dtime 1660 d_qs_dyn(:,:) = (qs_seri(:,:)-qs_ancien(:,:))/dtime 1661 CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d) 1662 d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/dtime 1663 CALL water_int(klon,klev,ql_seri,zmasse,zx_tmp_fi2d) 1664 d_ql_dyn2d(:)=(zx_tmp_fi2d(:)-prlw_ancien(:))/dtime 1665 CALL water_int(klon,klev,qs_seri,zmasse,zx_tmp_fi2d) 1666 d_qs_dyn2d(:)=(zx_tmp_fi2d(:)-prsw_ancien(:))/dtime 1664 1667 ! !! RomP >>> td dyn traceur 1665 !! IF (nqtot.GE.3) THEN ! jyg 1666 !! DO iq = 3, nqtot ! jyg 1667 IF (nqtot.GE.nqo+1) THEN ! jyg 1668 IF (nqtot.GT.nqo) THEN ! jyg 1668 1669 DO iq = nqo+1, nqtot ! jyg 1669 DO k = 1, klev 1670 DO i = 1, klon 1671 !! d_tr_dyn(i,k,iq-2)= & ! jyg 1672 !! (tr_seri(i,k,iq-2)-tr_ancien(i,k,iq-2))/dtime ! jyg 1673 d_tr_dyn(i,k,iq-nqo)= & ! jyg 1674 (tr_seri(i,k,iq-nqo)-tr_ancien(i,k,iq-nqo))/dtime ! jyg 1675 ! iiq=niadv(iq) 1676 ! print*,i,k," d_tr_dyn",d_tr_dyn(i,k,iq-nqo),"tra:",iq,& 1677 ! tname(iiq) 1678 ENDDO 1679 ENDDO 1670 d_tr_dyn(:,:,iq-nqo)=(tr_seri(:,:,iq-nqo)-tr_ancien(:,:,iq-nqo))/dtime ! jyg 1680 1671 ENDDO 1681 1672 ENDIF 1682 1673 ! !! RomP <<< 1683 1674 ELSE 1684 DO k = 1, klev 1685 DO i = 1, klon 1686 d_u_dyn(i,k) = 0.0 1687 d_v_dyn(i,k) = 0.0 1688 d_t_dyn(i,k) = 0.0 1689 d_q_dyn(i,k) = 0.0 1690 ENDDO 1691 ENDDO 1675 d_u_dyn(:,:) = 0.0 1676 d_v_dyn(:,:) = 0.0 1677 d_t_dyn(:,:) = 0.0 1678 d_q_dyn(:,:) = 0.0 1679 d_ql_dyn(:,:) = 0.0 1680 d_qs_dyn(:,:) = 0.0 1681 d_q_dyn2d(:) = 0.0 1682 d_ql_dyn2d(:) = 0.0 1683 d_qs_dyn2d(:) = 0.0 1692 1684 ! !! RomP >>> td dyn traceur 1693 !! IF (nqtot.GE.3) THEN ! jyg 1694 !! DO iq = 3, nqtot ! jyg 1695 IF (nqtot.GE.nqo+1) THEN ! jyg 1696 DO iq = nqo+1, nqtot ! jyg 1697 DO k = 1, klev 1698 DO i = 1, klon 1699 !! d_tr_dyn(i,k,iq-2)= 0.0 ! jyg 1700 d_tr_dyn(i,k,iq-nqo)= 0.0 ! jyg 1701 ENDDO 1702 ENDDO 1685 IF (nqtot.GT.nqo) THEN ! jyg 1686 DO iq = nqo+1, nqtot ! jyg 1687 d_tr_dyn(:,:,iq-nqo)= 0.0 ! jyg 1703 1688 ENDDO 1704 1689 ENDIF … … 2303 2288 !>jyg 2304 2289 ! 2305 2306 ! Calcul de l'energie disponible ALE (J/kg) et de la puissance 2307 ! disponible ALP (W/m2) pour le soulevement des particules dans 2308 ! le modele convectif 2309 ! 2310 do i = 1,klon 2311 ALE(i) = 0. 2312 ALP(i) = 0. 2313 enddo 2314 ! 2315 !calcul de ale_wake et alp_wake 2316 if (iflag_wake>=1) then 2317 if (itap .le. it_wape_prescr) then 2318 do i = 1,klon 2319 ale_wake(i) = wape_prescr 2320 alp_wake(i) = fip_prescr 2321 enddo 2322 else 2323 do i = 1,klon 2324 !jyg ALE=WAPE au lieu de ALE = 1/2 Cstar**2 2325 !cc ale_wake(i) = 0.5*wake_cstar(i)**2 2326 ale_wake(i) = wake_pe(i) 2327 alp_wake(i) = wake_fip(i) 2328 enddo 2329 endif 2330 else 2331 do i = 1,klon 2332 ale_wake(i) = 0. 2333 alp_wake(i) = 0. 2334 enddo 2335 endif 2336 !combinaison avec ale et alp de couche limite: constantes si pas 2337 !de couplage, valeurs calculees dans le thermique sinon 2338 if (iflag_coupl.eq.0) then 2339 if (debut.and.prt_level.gt.9) & 2340 WRITE(lunout,*)'ALE et ALP imposes' 2341 do i = 1,klon 2342 !on ne couple que ale 2343 ! ALE(i) = max(ale_wake(i),Ale_bl(i)) 2344 ALE(i) = max(ale_wake(i),ale_bl_prescr) 2345 !on ne couple que alp 2346 ! ALP(i) = alp_wake(i) + Alp_bl(i) 2347 ALP(i) = alp_wake(i) + alp_bl_prescr 2348 enddo 2349 else 2350 IF(prt_level>9)WRITE(lunout,*)'ALE et ALP couples au thermique' 2351 ! do i = 1,klon 2352 ! ALE(i) = max(ale_wake(i),Ale_bl(i)) 2353 ! avant ALP(i) = alp_wake(i) + Alp_bl(i) 2354 ! ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb 2355 ! write(20,*)'ALE',ALE(i),Ale_bl(i),ale_wake(i) 2356 ! write(21,*)'ALP',ALP(i),Alp_bl(i),alp_wake(i) 2357 ! enddo 2358 2359 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2360 ! Modif FH 2010/04/27. Sans doute temporaire. 2361 ! Deux options pour le alp_offset : constant si >?? 0 ou 2362 ! proportionnel ??a w si <0 2363 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2364 ! Estimation d'une vitesse verticale effective pour ALP 2365 if (1==0) THEN 2366 www(1:klon)=0. 2367 do k=2,klev-1 2368 do i=1,klon 2369 www(i)=max(www(i),-omega(i,k)*RD*t_seri(i,k) & 2370 /(RG*paprs(i,k)) *zw2(i,k)*zw2(i,k)) 2371 ! if (paprs(i,k)>pbase(i)) then 2372 ! calcul approche de la vitesse verticale en m/s 2373 ! www(i)=max(www(i),-omega(i,k)*RD*temp(i,k)/(RG*paprs(i,k)) 2374 ! endif 2375 ! Le 0.1 est en gros H / ps = 1e5 / 1e4 2376 enddo 2377 enddo 2378 do i=1,klon 2379 if (www(i)>0. .and. ale_bl(i)>0. ) www(i)=www(i)/ale_bl(i) 2380 enddo 2381 ENDIF 2382 2383 2384 do i = 1,klon 2385 ALE(i) = max(ale_wake(i),Ale_bl(i)) 2386 !cc nrlmd le 10/04/2012----------Stochastic triggering------------ 2387 if (iflag_trig_bl.ge.1) then 2388 ALE(i) = max(ale_wake(i),Ale_bl_trig(i)) 2389 endif 2390 !cc fin nrlmd le 10/04/2012 2391 if (alp_offset>=0.) then 2392 ALP(i) = alp_wake(i) + Alp_bl(i) + alp_offset ! modif sb 2393 else 2394 abort_message ='Ne pas passer la car www non calcule' 2395 CALL abort_physic (modname,abort_message,1) 2396 2397 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2398 ! _ _ 2399 ! Ajout d'une composante 3 * A * w w'2 a w'3 avec 2400 ! w=www : w max sous pbase ou A est la fraction 2401 ! couverte par les ascendances w' on utilise le fait 2402 ! que A * w'3 = ALP et donc A * w'2 ~ ALP / sqrt(ALE) 2403 ! (on ajoute 0.1 pour les singularites) 2404 ALP(i)=alp_wake(i)*(1.+3.*www(i)/( sqrt(ale_wake(i))+0.1) ) & 2405 +alp_bl(i) *(1.+3.*www(i)/( sqrt(ale_bl(i)) +0.1) ) 2406 ! ALP(i)=alp_wake(i)+Alp_bl(i)+alp_offset*min(omega(i,6),0.) 2407 ! if (alp(i)<0.) then 2408 ! print*,'ALP ',alp(i),alp_wake(i) & 2409 ! ,Alp_bl(i),alp_offset*min(omega(i,6),0.) 2410 ! endif 2411 endif 2412 enddo 2413 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2414 2415 endif 2416 do i=1,klon 2417 if (alp(i)>alp_max) then 2418 IF(prt_level>9)WRITE(lunout,*) & 2419 'WARNING SUPER ALP (seuil=',alp_max, & 2420 '): i, alp, alp_wake,ale',i,alp(i),alp_wake(i),ale(i) 2421 alp(i)=alp_max 2422 endif 2423 if (ale(i)>ale_max) then 2424 IF(prt_level>9)WRITE(lunout,*) & 2425 'WARNING SUPER ALE (seuil=',ale_max, & 2426 '): i, alp, alp_wake,ale',i,ale(i),ale_wake(i),alp(i) 2427 ale(i)=ale_max 2428 endif 2429 enddo 2430 2431 !fin calcul ale et alp 2432 !======================================================================= 2433 2434 2290 !jyg< 2291 CALL alpale( debut, itap, dtime, paprs, omega, t_seri, & 2292 alp_offset, it_wape_prescr, wape_prescr, fip_prescr, & 2293 ale_bl_prescr, alp_bl_prescr, & 2294 wake_pe, wake_fip, & 2295 Ale_bl, Ale_bl_trig, Alp_bl, & 2296 Ale, Alp ) 2297 !>jyg 2298 ! 2435 2299 ! sb, oct02: 2436 2300 ! Schema de convection modularise et vectorise: … … 2910 2774 ENDIF 2911 2775 !>jyg 2912 2913 !cc nrlmd le 10/04/2012 2914 !-----------Stochastic triggering----------- 2915 if (iflag_trig_bl.ge.1) then 2916 ! 2917 IF (prt_level .GE. 10) THEN 2918 print *,'cin, ale_bl_stat, alp_bl_stat ', & 2919 cin, ale_bl_stat, alp_bl_stat 2920 ENDIF 2921 2922 2923 !----Initialisations 2924 do i=1,klon 2925 proba_notrig(i)=1. 2926 random_notrig(i)=1e6*ale_bl_stat(i)-int(1e6*ale_bl_stat(i)) 2927 if ( random_notrig(i) > random_notrig_max ) random_notrig(i)=0. 2928 if ( ale_bl_trig(i) .lt. abs(cin(i))+1.e-10 ) then 2929 tau_trig(i)=tau_trig_shallow 2930 else 2931 tau_trig(i)=tau_trig_deep 2932 endif 2933 enddo 2934 ! 2935 IF (prt_level .GE. 10) THEN 2936 print *,'random_notrig, tau_trig ', & 2937 random_notrig, tau_trig 2938 print *,'s_trig,s2,n2 ', & 2939 s_trig,s2,n2 2940 ENDIF 2941 2942 !Option pour re-activer l'ancien calcul de Ale_bl (iflag_trig_bl=2) 2943 IF (iflag_trig_bl.eq.1) then 2944 2945 !----Tirage al\'eatoire et calcul de ale_bl_trig 2946 do i=1,klon 2947 if ( (ale_bl_stat(i) .gt. abs(cin(i))+1.e-10) ) then 2948 proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** & 2949 (n2(i)*dtime/tau_trig(i)) 2950 ! print *, 'proba_notrig(i) ',proba_notrig(i) 2951 if (random_notrig(i) .ge. proba_notrig(i)) then 2952 ale_bl_trig(i)=ale_bl_stat(i) 2953 else 2954 ale_bl_trig(i)=0. 2955 endif 2956 else 2957 proba_notrig(i)=1. 2958 random_notrig(i)=0. 2959 ale_bl_trig(i)=0. 2960 endif 2961 enddo 2962 2963 ELSE IF (iflag_trig_bl.ge.2) then 2964 2965 do i=1,klon 2966 if ( (Ale_bl(i) .gt. abs(cin(i))+1.e-10) ) then 2967 proba_notrig(i)=(1.-exp(-s_trig/s2(i)))** & 2968 (n2(i)*dtime/tau_trig(i)) 2969 ! print *, 'proba_notrig(i) ',proba_notrig(i) 2970 if (random_notrig(i) .ge. proba_notrig(i)) then 2971 ale_bl_trig(i)=Ale_bl(i) 2972 else 2973 ale_bl_trig(i)=0. 2974 endif 2975 else 2976 proba_notrig(i)=1. 2977 random_notrig(i)=0. 2978 ale_bl_trig(i)=0. 2979 endif 2980 enddo 2981 2982 ENDIF 2983 2984 ! 2985 IF (prt_level .GE. 10) THEN 2986 print *,'proba_notrig, ale_bl_trig ', & 2987 proba_notrig, ale_bl_trig 2988 ENDIF 2989 2990 endif !(iflag_trig_bl) 2991 2992 !-----------Statistical closure----------- 2993 if (iflag_clos_bl.eq.1) then 2994 2995 do i=1,klon 2996 !CR: alp probabiliste 2997 if (ale_bl_trig(i).gt.0.) then 2998 alp_bl(i)=alp_bl(i)/(1.-min(proba_notrig(i),0.999)) 2999 endif 3000 enddo 3001 3002 else if (iflag_clos_bl.eq.2) then 3003 3004 !CR: alp calculee dans thermcell_main 3005 do i=1,klon 3006 alp_bl(i)=alp_bl_stat(i) 3007 enddo 3008 3009 else 3010 3011 alp_bl_stat(:)=0. 3012 3013 endif !(iflag_clos_bl) 3014 3015 IF (prt_level .GE. 10) THEN 3016 print *,'ale_bl_trig, alp_bl_stat ',ale_bl_trig, alp_bl_stat 3017 ENDIF 3018 3019 !cc fin nrlmd le 10/04/2012 3020 3021 ! ------------------------------------------------------------------ 3022 ! Transport de la TKE par les panaches thermiques. 3023 ! FH : 2010/02/01 3024 ! if (iflag_pbl.eq.10) then 3025 ! call thermcell_dtke(klon,klev,nbsrf,pdtphys,fm_therm,entr_therm, 3026 ! s rg,paprs,pbl_tke) 3027 ! endif 3028 ! ------------------------------------------------------------------- 3029 !IM/FH: 2011/02/23 3030 ! Couplage Thermiques/Emanuel seulement si T<0 3031 if (iflag_coupl==2) then 3032 IF (prt_level .GE. 10) THEN 3033 print*,'Couplage Thermiques/Emanuel seulement si T<0' 3034 ENDIF 3035 do i=1,klon 3036 if (t_seri(i,lmax_th(i))>273.) then 3037 Ale_bl(i)=0. 3038 endif 3039 enddo 3040 endif 2776 !jyg< 2777 ! 2778 CALL alpale_th( dtime, lmax_th, t_seri, & 2779 cin, s2, n2, & 2780 ale_bl_trig, ale_bl_stat, ale_bl, & 2781 alp_bl, alp_bl_stat ) 3041 2782 3042 2783 do i=1,klon … … 3114 2855 CALL calcratqs(klon,klev,prt_level,lunout, & 3115 2856 iflag_ratqs,iflag_con,iflag_cld_th,pdtphys, & 3116 ratqsbas,ratqshaut,tau_ratqs,fact_cldcon, & 2857 ratqsbas,ratqshaut,ratqsp0, ratqsdp, & 2858 tau_ratqs,fact_cldcon, & 3117 2859 ptconv,ptconvth,clwcon0th, rnebcon0th, & 3118 2860 paprs,pplay,q_seri,zqsat,fm_therm, & … … 3301 3043 ENDIF 3302 3044 3303 CALL aeropt_lw_rrtm 3045 !--call LW optical properties for tropospheric aerosols 3046 !--only works for INCA aerosol (aerosol_couple = TRUE) 3047 CALL aeropt_lw_rrtm(aerosol_couple,paprs,tr_seri) 3304 3048 ! 3305 3049 #else … … 3327 3071 !--STRAT AEROSOL 3328 3072 !--updates tausum_aero,tau_aero,piz_aero,cg_aero 3329 IF (flag_aerosol_strat ) THEN3073 IF (flag_aerosol_strat.GT.0) THEN 3330 3074 IF (prt_level .GE.10) THEN 3331 3075 PRINT *,'appel a readaerosolstrat', mth_cur 3332 3076 ENDIF 3333 3077 IF (iflag_rrtm.EQ.0) THEN 3078 IF (flag_aerosol_strat.EQ.1) THEN 3334 3079 CALL readaerosolstrato(debut) 3080 ELSE 3081 abort_message='flag_aerosol_strat must equal 1 for rrtm=0' 3082 call abort_physic(modname,abort_message,1) 3083 ENDIF 3335 3084 ELSE 3336 3085 #ifdef CPP_RRTM 3337 CALL readaerosolstrato_rrtm(debut) 3086 IF (flag_aerosol_strat.EQ.1) THEN 3087 CALL readaerosolstrato1_rrtm(debut) 3088 ELSEIF (flag_aerosol_strat.EQ.2) THEN 3089 CALL stratosphere_mask(t_seri, pplay, latitude_deg) 3090 CALL readaerosolstrato2_rrtm(debut) 3091 ELSE 3092 abort_message='flag_aerosol_strat must equal 1 or 2 for rrtm=1' 3093 call abort_physic(modname,abort_message,1) 3094 ENDIF 3338 3095 #else 3339 3340 3096 abort_message='You should compile with -rrtm if running ' & 3341 3097 // 'with iflag_rrtm=1' … … 3345 3101 ENDIF 3346 3102 !--fin STRAT AEROSOL 3347 3348 3103 3349 3104 ! On prend la somme des fractions nuageuses et des contenus en eau … … 3673 3428 !albedo SB <<< 3674 3429 3430 !--if ok_suntime_rrtm we use ancillay data for RSUN 3431 !--previous values are therefore overwritten 3432 !--this is needed for CMIP6 runs 3433 !--and only possible for new radiation scheme 3434 IF (iflag_rrtm.EQ.1.AND.ok_suntime_rrtm) THEN 3435 #ifdef CPP_RRTM 3436 CALL read_rsun_rrtm(debut) 3437 #endif 3438 ENDIF 3675 3439 3676 3440 if (mydebug) then … … 3726 3490 print *,' ->radlwsw, number 1 ' 3727 3491 ENDIF 3492 3728 3493 ! 3729 3494 CALL radlwsw & … … 3735 3500 t_seri,q_seri,wo, & 3736 3501 cldfrarad, cldemirad, cldtaurad, & 3737 ok_ade.OR.flag_aerosol_strat , ok_aie, flag_aerosol, &3502 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, & 3738 3503 flag_aerosol_strat, & 3739 3504 tau_aero, piz_aero, cg_aero, & … … 3764 3529 ZSWFT0_i, ZFSDN0, ZFSUP0) 3765 3530 3531 !--OB 30/05/2016 3532 !--here we return swaero_diag to FALSE 3533 !--and histdef will switch it back to TRUE if necessary 3534 !--this is necessary to get the right swaero at first step 3535 IF (debut) swaero_diag = .FALSE. 3766 3536 ! 3767 3537 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un … … 3792 3562 t_seri,q_seri,wo, & 3793 3563 cldfra, cldemi, cldtau, & 3794 ok_ade.OR.flag_aerosol_strat , ok_aie, flag_aerosol, &3564 ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, flag_aerosol, & 3795 3565 flag_aerosol_strat, & 3796 3566 tau_aero, piz_aero, cg_aero, & … … 4297 4067 CALL diag_slp(klon,t_seri,paprs,pplay,pphis,ptstar,pt0,slp) 4298 4068 ! 4299 !cc prw = eau precipitable 4300 DO i = 1, klon 4301 prw(i) = 0. 4302 DO k = 1, klev 4303 prw(i) = prw(i) + & 4304 q_seri(i,k)*(paprs(i,k)-paprs(i,k+1))/RG 4305 ENDDO 4069 !cc prw = eau precipitable 4070 ! prlw = colonne eau liquide 4071 ! prlw = colonne eau solide 4072 prw(:) = 0. 4073 prlw(:) = 0. 4074 prsw(:) = 0. 4075 DO k = 1, klev 4076 prw(:) = prw(:) + q_seri(:,k)*zmasse(:,k) 4077 prlw(:) = prlw(:) + ql_seri(:,k)*zmasse(:,k) 4078 prsw(:) = prsw(:) + qs_seri(:,k)*zmasse(:,k) 4306 4079 ENDDO 4307 4080 ! … … 4377 4150 ! 4378 4151 4152 !--OB mass fixer 4153 !--profile is corrected to force mass conservation of water 4154 IF (mass_fixer) THEN 4155 qql2(:)=0.0 4156 DO k = 1, klev 4157 qql2(:)=qql2(:)+(q_seri(:,k)+ql_seri(:,k)+qs_seri(:,k))*zmasse(:,k) 4158 ENDDO 4159 DO i = 1, klon 4160 !--compute ratio of what q+ql should be with conservation to what it is 4161 corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i))*pdtphys)/qql2(i) 4162 DO k = 1, klev 4163 q_seri(i,k) =q_seri(i,k)*corrqql 4164 ql_seri(i,k)=ql_seri(i,k)*corrqql 4165 ENDDO 4166 ENDDO 4167 ENDIF 4168 !--fin mass fixer 4169 4379 4170 ! Sauvegarder les valeurs de t et q a la fin de la physique: 4380 4171 ! 4381 DO k = 1, klev4382 DO i = 1, klon4383 u_ancien(i,k) = u_seri(i,k)4384 v_ancien(i,k) = v_seri(i,k)4385 t_ancien(i,k) = t_seri(i,k)4386 q_ancien(i,k) = q_seri(i,k)4387 ENDDO4388 ENDDO4389 4172 u_ancien(:,:) = u_seri(:,:) 4173 v_ancien(:,:) = v_seri(:,:) 4174 t_ancien(:,:) = t_seri(:,:) 4175 q_ancien(:,:) = q_seri(:,:) 4176 ql_ancien(:,:) = ql_seri(:,:) 4177 qs_ancien(:,:) = qs_seri(:,:) 4178 CALL water_int(klon,klev,q_ancien,zmasse,prw_ancien) 4179 CALL water_int(klon,klev,ql_ancien,zmasse,prlw_ancien) 4180 CALL water_int(klon,klev,qs_ancien,zmasse,prsw_ancien) 4390 4181 ! !! RomP >>> 4391 4182 !CR: nb de traceurs eau: nqo 4392 ! IF (nqtot.GE.3) THEN 4393 IF (nqtot.GE.(nqo+1)) THEN 4394 ! DO iq = 3, nqtot 4183 IF (nqtot.GT.nqo) THEN 4395 4184 DO iq = nqo+1, nqtot 4396 DO k = 1, klev 4397 DO i = 1, klon 4398 ! tr_ancien(i,k,iq-2) = tr_seri(i,k,iq-2) 4399 tr_ancien(i,k,iq-nqo) = tr_seri(i,k,iq-nqo) 4400 ENDDO 4401 ENDDO 4185 tr_ancien(:,:,iq-nqo) = tr_seri(:,:,iq-nqo) 4402 4186 ENDDO 4403 4187 ENDIF … … 4483 4267 ! Get some variables from module fonte_neige_mod 4484 4268 CALL fonte_neige_get_vars(pctsrf, & 4485 zxfqcalving, zxfqfonte, zxffonte) 4486 4487 4269 zxfqcalving, zxfqfonte, zxffonte, zxrunofflic) 4488 4270 4489 4271 … … 4521 4303 CALL phys_output_write(itap, pdtphys, paprs, pphis, & 4522 4304 pplay, lmax_th, aerosol_couple, & 4523 ok_ade, ok_aie, ivap, new_aod, ok_sync, &4524 ptconv, read_climoz, clevSTD,&4305 ok_ade, ok_aie, ivap, iliq, isol, new_aod, & 4306 ok_sync, ptconv, read_climoz, clevSTD, & 4525 4307 ptconvth, d_t, qx, d_qx, zmasse, & 4526 4308 flag_aerosol, flag_aerosol_strat, ok_cdnc) … … 4544 4326 CALL abort_physic (modname,abort_message,1) 4545 4327 ENDIF 4546 4547 !--OB mass fixer4548 !--profile is corrected to force mass conservation of water4549 IF (mass_fixer) THEN4550 qql2(:)=0.04551 DO i = 1, klon4552 DO k = 1, klev4553 qql2(i)=qql2(i)+(q_seri(i,k)+ql_seri(i,k))*zmasse(i,k)4554 ENDDO4555 ENDDO4556 DO i = 1, klon4557 !--compute ratio of what q+ql should be with conservation to what it is4558 corrqql=(qql1(i)+(evap(i)-rain_fall(i)-snow_fall(i))*pdtphys)/qql2(i)4559 DO k = 1, klev4560 q_seri(i,k) =q_seri(i,k)*corrqql4561 ql_seri(i,k)=ql_seri(i,k)*corrqql4562 ENDDO4563 ENDDO4564 ENDIF4565 !--fin mass fixer4566 4328 4567 4329 ! 22.03.04 END -
LMDZ5/branches/testing/libf/phylmd/radlwsw_m.F90
r2435 r2542 101 101 ! ok_aie---input-L- apply the Aerosol Indirect Effect or not? 102 102 ! flag_aerosol-input-I- aerosol flag from 0 to 6 103 ! flag_aerosol_strat-input-I- use stratospheric aerosols flag ( T/F)103 ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (0, 1, 2) 104 104 ! tau_ae, piz_ae, cg_ae-input-R- aerosol optical properties (calculated in aeropt.F) 105 105 ! cldtaupi-input-R- epaisseur optique des nuages dans le visible … … 190 190 LOGICAL :: lldebug 191 191 INTEGER, INTENT(in) :: flag_aerosol ! takes value 0 (no aerosol) or 1 to 6 (aerosols) 192 LOGICAL, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols192 INTEGER, INTENT(in) :: flag_aerosol_strat ! use stratospheric aerosols 193 193 REAL, INTENT(in) :: cldfra(KLON,KLEV), cldemi(KLON,KLEV), cldtaupd(KLON,KLEV) 194 194 REAL, INTENT(in) :: tau_aero(KLON,KLEV,naero_grp,2) ! aerosol optical properties (see aeropt.F) -
LMDZ5/branches/testing/libf/phylmd/readaerosol_interp.F90
r2408 r2542 313 313 ! the second half of the month 314 314 im2=im+1 315 day 2= month_mid(im+1)316 day 1= month_mid(im2+1)315 day1 = month_mid(im+1) 316 day2 = month_mid(im2+1) 317 317 IF (im2 > 12) THEN 318 318 ! the month is december, the following thus january … … 330 330 ! the second half of the month 331 331 im2=im+1 332 day 2= month_mid(im)333 day 1= month_mid(im2)332 day1 = month_mid(im) 333 day2 = month_mid(im2) 334 334 END IF 335 335 ELSE -
LMDZ5/branches/testing/libf/phylmd/readaerosolstrato.F90
r2408 r2542 9 9 grid2dto1d_glo 10 10 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 11 USE mod_phys_lmdz_omp_data, ONLY : is_omp_root 11 12 USE mod_phys_lmdz_para 12 13 USE phys_state_var_mod … … 64 65 IF (debut.OR.mth_cur.NE.mth_pre) THEN 65 66 66 IF (is_mpi_root) THEN 67 !--only root reads 68 IF (is_mpi_root.AND.is_omp_root) THEN 67 69 68 70 IF (nbands.NE.2) THEN … … 128 130 CALL grid2dTo1d_glo(tauaerstrat_mois,tauaerstrat_mois_glo) 129 131 130 ENDIF !--is_mpi_root 132 ENDIF !--is_mpi_root and is_omp_root 133 134 !$OMP BARRIER 131 135 132 136 !--scatter on all proc … … 136 140 mth_pre=mth_cur 137 141 ! 138 IF (is_mpi_root ) THEN142 IF (is_mpi_root.AND.is_omp_root) THEN 139 143 ! 140 144 DEALLOCATE(tauaerstrat) … … 142 146 DEALLOCATE(tauaerstrat_mois_glo) 143 147 ! 144 ENDIF !-is_mpi_root 148 ENDIF !-is_mpi_root and is_omp_root 149 150 !$OMP BARRIER 145 151 146 152 ENDIF !--debut ou nouveau mois -
LMDZ5/branches/testing/libf/phylmd/rrtm/aeropt_lw_rrtm.F90
r2258 r2542 1 1 ! 2 2 ! aeropt_lw_rrtm.F90 2014-05-13 C. Kleinschmitt 3 ! 2016-05-03 O. Boucher 3 4 ! 5 ! This routine feeds aerosol LW properties to RRTM 6 ! we only consider absorption (not scattering) 4 7 5 SUBROUTINE AEROPT_LW_RRTM 8 SUBROUTINE AEROPT_LW_RRTM(aerosol_couple,paprs,tr_seri) 6 9 10 USE dimphy 11 USE aero_mod 12 USE infotrac_phy 7 13 USE phys_state_var_mod, ONLY : tau_aero_lw_rrtm 14 USE YOERAD, ONLY : NLW 8 15 9 16 IMPLICIT NONE 10 17 11 tau_aero_lw_rrtm(:,:,:,:) = 1.e-15 18 INCLUDE "YOMCST.h" 19 INCLUDE "clesphys.h" 20 ! 21 ! Input arguments: 22 ! 23 LOGICAL, INTENT(IN) :: aerosol_couple 24 REAL, DIMENSION(klon,klev+1), INTENT(in) :: paprs 25 REAL, DIMENSION(klon,klev,nbtr), INTENT(in) :: tr_seri 26 ! 27 REAL, DIMENSION(klon,klev) :: zdp, mass_temp 28 ! 29 ! 30 INTEGER inu, i, k 31 INTEGER :: id_ASBCM, id_ASPOMM, id_ASSO4M, id_ASMSAM, id_CSSO4M, id_CSMSAM, id_SSSSM 32 INTEGER :: id_CSSSM, id_ASSSM, id_CIDUSTM, id_AIBCM, id_AIPOMM, id_ASNO3M, id_CSNO3M, id_CINO3M 12 33 34 ! 35 !--absorption coefficient for CIDUST 36 REAL:: alpha_abs_CIDUST_16bands(nbands_lw_rrtm) !--unit m2/g 37 DATA alpha_abs_CIDUST_16bands / & 38 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & 39 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / 40 ! 41 IF (NLW.NE.nbands_lw_rrtm) THEN 42 print *,'Erreur NLW doit etre egal a 16 pour cette routine' 43 stop 44 ENDIF 45 ! 46 IF (aerosol_couple) THEN 47 ! 48 do i=1,nbtr 49 select case(trim(solsym(i))) 50 case ("ASBCM") 51 id_ASBCM = i 52 case ("ASPOMM") 53 id_ASPOMM = i 54 case ("ASSO4M") 55 id_ASSO4M = i 56 case ("ASMSAM") 57 id_ASMSAM = i 58 case ("CSSO4M") 59 id_CSSO4M = i 60 case ("CSMSAM") 61 id_CSMSAM = i 62 case ("SSSSM") 63 id_SSSSM = i 64 case ("CSSSM") 65 id_CSSSM = i 66 case ("ASSSM") 67 id_ASSSM = i 68 case ("CIDUSTM") 69 id_CIDUSTM = i 70 case ("AIBCM") 71 id_AIBCM = i 72 case ("AIPOMM") 73 id_AIPOMM = i 74 case ("ASNO3M") 75 id_ASNO3M = i 76 case ("CSNO3M") 77 id_CSNO3M = i 78 case ("CINO3M") 79 id_CINO3M = i 80 end select 81 enddo 82 ! 83 DO k=1, klev 84 zdp(:,k) = (paprs(:,k)-paprs(:,k+1))/RG !--kg/m2 85 ENDDO 86 ! 87 !--for now only consider dust 88 mass_temp(:,:)=tr_seri(:,:,id_CIDUSTM) !--kg/kg 89 ! 90 DO inu=1,NLW 91 ! 92 !--total aerosol 93 tau_aero_lw_rrtm(:,:,2,inu) = mass_temp(:,:)*zdp(:,:)*1000.*alpha_abs_CIDUST_16bands(inu) 94 !--no aerosol at all 95 tau_aero_lw_rrtm(:,:,1,inu) = 0.0 96 ! 97 ENDDO 98 ! 99 !--avoid very small values 100 tau_aero_lw_rrtm = MAX(tau_aero_lw_rrtm,1.e-15) 101 ! 102 ELSE !--not aerosol_couple 103 ! 104 !--no LW effects if not coupled to INCA 105 tau_aero_lw_rrtm = 1.e-15 106 ENDIF 107 ! 13 108 END SUBROUTINE AEROPT_LW_RRTM -
LMDZ5/branches/testing/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90
r2408 r2542 19 19 load_tmp1,load_tmp2,load_tmp3,load_tmp4,load_tmp5,load_tmp6,load_tmp7 20 20 21 USE infotrac 21 USE infotrac_phy 22 22 23 23 IMPLICIT NONE -
LMDZ5/branches/testing/libf/phylmd/rrtm/recmwf_aero.F90
r2160 r2542 161 161 IMPLICIT NONE 162 162 INCLUDE "clesphys.h" 163 164 163 165 164 INTEGER(KIND=JPIM),INTENT(IN) :: KPROMA … … 306 305 ! not ok_ade and not ok_aie = 1 to proceed 307 306 ! therefore the cases have the following corresponding switches 308 ! 1 = not ok_ade or not ok_aie309 ! 2 = ok_aie310 ! 3 = ok_ade 307 ! 1 = not ok_ade and not ok_aie OR not ok_ade and ok_aie and swaero_diag OR ok_ade and not ok_aie and swaero_diag 308 ! 2 = not ok_ade and ok_aie OR ok_aie and ok_ade and swaero_diag 309 ! 3 = ok_ade and not ok_aie OR ok_aie and ok_ade and swaero_diag 311 310 ! 4 = ok_ade and ok_aie 312 311 ! 5 = no aerosol feedback wanted or no aerosol at all … … 445 444 IF (flag_aerosol .GT. 0 .OR. flag_aerosol_strat) THEN 446 445 447 IF ( .not. ok_ade .or. .not. ok_aie ) THEN 446 !--Case 1 447 IF ( ( .not. ok_ade .AND. .not. ok_aie ) .OR. & 448 & ( .not. ok_ade .AND. ok_aie .AND. swaero_diag ) .OR. & 449 & ( ok_ade .AND. .not. ok_aie .AND. swaero_diag ) ) THEN 448 450 449 451 ! natural aerosols for direct and indirect effect … … 483 485 ENDIF 484 486 485 IF (ok_aie) THEN 487 !--Case 2 488 IF ( ( .not. ok_ade .AND. ok_aie ) .OR. & 489 & ( ok_ade .AND. ok_aie .AND. swaero_diag ) ) THEN 486 490 487 491 ! natural aerosols for direct indirect effect … … 521 525 ENDIF ! ok_aie 522 526 523 IF (ok_ade) THEN 527 !--Case 3 528 IF ( ( ok_ade .AND. .not. ok_aie ) .OR. & 529 & ( ok_ade .AND. ok_aie .AND. swaero_diag ) ) THEN 524 530 525 531 ! direct effect of total aerosol activated … … 559 565 ENDIF !-end ok_ade 560 566 567 !--Case 4 561 568 IF (ok_ade .and. ok_aie) THEN 562 569 -
LMDZ5/branches/testing/libf/phylmd/surf_ocean_mod.F90
r2471 r2542 1 ! 2 ! $Id$ 1 3 ! 2 4 MODULE surf_ocean_mod -
LMDZ5/branches/testing/libf/phylmd/surface_data.F90
-
Property
svn:keywords
changed from
Author Date Id Revision
toId
r2220 r2542 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 MODULE surface_data -
Property
svn:keywords
changed from
-
LMDZ5/branches/testing/libf/phylmd/sw_aeroAR4.F90
r2408 r2542 139 139 140 140 LOGICAL ok_ade, ok_aie ! use aerosol forcings or not? 141 LOGICALflag_aerosol_strat ! use stratospehric aerosols141 INTEGER flag_aerosol_strat ! use stratospehric aerosols 142 142 INTEGER flag_aerosol ! global flag for aerosol 0 (no aerosol) or 1-5 (aerosols) 143 143 REAL(KIND=8) tauaero(kdlon,kflev,naero_grp,2) ! aerosol optical properties … … 309 309 ENDIF ! swaero_diag .or. .not. AEROSOLFEEDBACK_ACTIVE 310 310 311 IF (flag_aerosol .GT. 0 .OR. flag_aerosol_strat) THEN311 IF (flag_aerosol.GT.0 .OR. flag_aerosol_strat.GT.0) THEN 312 312 313 313 IF (ok_ade.and.swaero_diag .or. .not. ok_ade) THEN … … 500 500 ENDIF ! ok_aie 501 501 502 ENDIF !--if flag_aerosol GT 0 OR flag_aerosol_strat 502 ENDIF !--if flag_aerosol GT 0 OR flag_aerosol_strat GT 0 503 503 504 504 itapsw = 0 … … 506 506 itapsw = itapsw + 1 507 507 508 IF ( AEROSOLFEEDBACK_ACTIVE .AND. (flag_aerosol .GT. 0 .OR. flag_aerosol_strat) ) THEN508 IF ( AEROSOLFEEDBACK_ACTIVE .AND. (flag_aerosol.GT.0 .OR. flag_aerosol_strat.GT.0) ) THEN 509 509 IF ( ok_ade .and. ok_aie ) THEN 510 510 ZFSUP(:,:) = ZFSUP_AERO(:,:,4) -
LMDZ5/branches/testing/libf/phylmd/wake.F90
r2488 r2542 625 625 z(i) = 1. 626 626 dz(i) = 1. 627 sum_thvu(i) = thu(i, 1)*(1.+eps *qu(i,1))*dz(i)627 sum_thvu(i) = thu(i, 1)*(1.+epsim1*qu(i,1))*dz(i) 628 628 sum_dth(i) = 0. 629 629 END DO … … 637 637 sum_tu(i) = sum_tu(i) + tu(i, k)*dz(i) 638 638 sum_qu(i) = sum_qu(i) + qu(i, k)*dz(i) 639 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+eps *qu(i,k))*dz(i)639 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+epsim1*qu(i,k))*dz(i) 640 640 sum_dth(i) = sum_dth(i) + dth(i, k)*dz(i) 641 641 sum_dq(i) = sum_dq(i) + deltaqw(i, k)*dz(i) … … 671 671 av_dqdwn(i) = sum_dqdwn(i)/hw0(i) 672 672 673 wape(i) = -rg*hw0(i)*(av_dth(i)+eps *(av_thu(i)*av_dq(i)+av_dth(i)*av_qu(i &673 wape(i) = -rg*hw0(i)*(av_dth(i)+epsim1*(av_thu(i)*av_dq(i)+av_dth(i)*av_qu(i & 674 674 )+av_dth(i)*av_dq(i)))/av_thvu(i) 675 675 END DO … … 1398 1398 z(i) = 1. 1399 1399 dz(i) = 1. 1400 sum_thvu(i) = thu(i, 1)*(1.+eps *qu(i,1))*dz(i)1400 sum_thvu(i) = thu(i, 1)*(1.+epsim1*qu(i,1))*dz(i) 1401 1401 sum_dth(i) = 0. 1402 1402 END IF … … 1412 1412 sum_tu(i) = sum_tu(i) + tu(i, k)*dz(i) 1413 1413 sum_qu(i) = sum_qu(i) + qu(i, k)*dz(i) 1414 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+eps *qu(i,k))*dz(i)1414 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+epsim1*qu(i,k))*dz(i) 1415 1415 sum_dth(i) = sum_dth(i) + dth(i, k)*dz(i) 1416 1416 sum_dq(i) = sum_dq(i) + deltaqw(i, k)*dz(i) … … 1449 1449 av_dqdwn(i) = sum_dqdwn(i)/hw0(i) 1450 1450 1451 wape(i) = -rg*hw0(i)*(av_dth(i)+eps *(av_thu(i)*av_dq(i)+av_dth(i)* &1451 wape(i) = -rg*hw0(i)*(av_dth(i)+epsim1*(av_thu(i)*av_dq(i)+av_dth(i)* & 1452 1452 av_qu(i)+av_dth(i)*av_dq(i)))/av_thvu(i) 1453 1453 END IF … … 1578 1578 z(i) = 1. 1579 1579 dz(i) = 1. 1580 sum_thvu(i) = thu(i, 1)*(1.+eps *qu(i,1))*dz(i)1580 sum_thvu(i) = thu(i, 1)*(1.+epsim1*qu(i,1))*dz(i) 1581 1581 sum_dth(i) = 0. 1582 1582 END IF … … 1594 1594 sum_tu(i) = sum_tu(i) + tu(i, k)*dz(i) 1595 1595 sum_qu(i) = sum_qu(i) + qu(i, k)*dz(i) 1596 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+eps *qu(i,k))*dz(i)1596 sum_thvu(i) = sum_thvu(i) + thu(i, k)*(1.+epsim1*qu(i,k))*dz(i) 1597 1597 sum_dth(i) = sum_dth(i) + dth(i, k)*dz(i) 1598 1598 sum_dq(i) = sum_dq(i) + deltaqw(i, k)*dz(i) … … 1632 1632 av_dqdwn(i) = sum_dqdwn(i)/hw0(i) 1633 1633 1634 wape2(i) = -rg*hw0(i)*(av_dth(i)+eps *(av_thu(i)*av_dq(i)+av_dth(i)* &1634 wape2(i) = -rg*hw0(i)*(av_dth(i)+epsim1*(av_thu(i)*av_dq(i)+av_dth(i)* & 1635 1635 av_qu(i)+av_dth(i)*av_dq(i)))/av_thvu(i) 1636 1636 END IF -
LMDZ5/branches/testing/libf/phylmd/water_int.F90
r2488 r2542 5 5 ! OB (obolmd@lmd.jussieu.fr) 6 6 !============================================================= 7 8 USE phys_local_var_mod, ONLY : d_u_vdf,d_v_vdf,d_t_vdf,d_u_ajs,d_v_ajs,d_t_ajs,d_u_con,d_v_con,d_t_con,d_t_diss9 USE phys_local_var_mod, ONLY : d_t_eva,d_t_lsc,d_q_eva,d_q_lsc10 USE phys_output_var_mod, ONLY : bils_ec,bils_ech,bils_tke,bils_kinetic,bils_enthalp,bils_latent,bils_diss11 7 12 8 IMPLICIT none
Note: See TracChangeset
for help on using the changeset viewer.