Changeset 3237 for trunk/LMDZ.PLUTO/libf/phypluto
- Timestamp:
- Feb 27, 2024, 12:04:22 PM (9 months ago)
- Location:
- trunk/LMDZ.PLUTO/libf/phypluto
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/callkeys_mod.F90
r3195 r3237 37 37 logical,save :: sedimentation 38 38 logical,save :: generic_condensation 39 !$OMP THREADPRIVATE(varactive,varfixed,sedimentation,generic_condensation ,generic_rain)39 !$OMP THREADPRIVATE(varactive,varfixed,sedimentation,generic_condensation) 40 40 logical,save :: aeron2, aeroh2o, aeroh2so4, aeroback2lay 41 41 !$OMP THREADPRIVATE(aeron2, aeroh2o, aeroh2so4, aeroback2lay) … … 191 191 real,save :: rad_haze 192 192 !$OMP THREADPRIVATE(rad_haze) 193 logical,save :: UseVdifcPlutold 194 !$OMP THREADPRIVATE(UseVdifcPlutold) 193 195 194 196 logical,save :: global1d -
trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90
r3228 r3237 183 183 if (is_master) write(*,*) trim(rname)//": fast = ",fast 184 184 185 if (is_master) write(*,*) trim(rname)//"Run with Triton orbit ?" 186 triton=.false. ! default value 187 call getin_p("triton",triton) 188 if (is_master) write(*,*) trim(rname)//" triton = ",triton 189 convergeps=.false. ! default value 190 call getin_p("convergeps",convergeps) 191 if (is_master) write(*,*) trim(rname)//" convergeps = ",convergeps 192 193 if (is_master) write(*,*) trim(rname)//"KBO runs (eris, makemake) ?" 194 kbo=.false. ! default value 195 call getin_p("kbo",kbo) 196 if (is_master) write(*,*) trim(rname)//" kbo = ",kbo 197 198 if (is_master) write(*,*) trim(rname)//"Specific paleo run ?" 199 paleo=.false. ! default value 200 call getin_p("paleo",paleo) 201 if (is_master) write(*,*) trim(rname)//" paleo = ",paleo 202 203 if (is_master) write(*,*) trim(rname)//"paleoclimate step (Earth years) " 204 paleoyears=10000. ! default value 205 call getin_p("paleoyears",paleoyears) 206 if (is_master) write(*,*) trim(rname)//" paleoyears = ",paleoyears 207 185 208 if (is_master) write(*,*) trim(rname)//& 186 209 ": No seasonal cycle: initial day to lock the run during restart" … … 279 302 call getin_p("UseTurbDiff",UseTurbDiff) 280 303 if (is_master) write(*,*) trim(rname)//": UseTurbDiff = ",UseTurbDiff 304 305 if (is_master) write(*,*) trim(rname)//": use vdifc from old Pluto ?" 306 UseVdifcPlutold=.true. ! default value 307 call getin_p("UseVdifcPlutold",UseVdifcPlutold) 308 if (is_master) write(*,*) trim(rname)//": UseVdifcPlutold = ",UseVdifcPlutold 281 309 282 310 if (is_master) write(*,*) trim(rname)//": call convective adjustment ?" -
trunk/LMDZ.PLUTO/libf/phypluto/initracer.F90
r3195 r3237 421 421 lw_ch4=586700. 422 422 lw_n2=2.5e5 423 write(*,*) "lw_n2 = ", lw_n2 423 424 424 425 if (haze) then -
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3232 r3237 32 32 USE comgeomfi_h, only: totarea, totarea_planet 33 33 USE tracer_h, only: noms, mmol, radius, rho_q, qext, & 34 igcm_n2,& 34 igcm_n2,igcm_ch4_gas,igcm_ch4_ice,igcm_haze,& 35 igcm_co_gas,igcm_co_ice,igcm_prec_haze,lw_n2,& 35 36 alpha_lift, alpha_devil, qextrhor, & 36 37 nesp, is_chim, is_condensable,constants_epsi_generic … … 45 46 use comcstfi_mod, only: pi, g, rcp, r, rad, mugaz, cpp 46 47 use time_phylmdz_mod, only: daysec 47 use callkeys_mod, only: fast,albedo_spectral_mode, calladj, calldifv, &48 use callkeys_mod, only: albedo_spectral_mode, calladj, calldifv, & 48 49 callrad, callsoil, nosurf, & 49 50 aerohaze, corrk, diagdtau,& … … 51 52 icetstep, intheat, iradia, kastprof, & 52 53 lwrite, mass_redistrib, meanOLR, & 54 fast,fasthaze,haze,metcloud,monoxcloud,& 53 55 n2cond,nearn2cond, noseason_day, & 56 fast, carbox, methane, UseVdifcPlutold, & 57 aerohaze, haze_proffix, triton, paleo, & 54 58 season, sedimentation,generic_condensation, & 55 aerohaze, haze_proffix, &56 59 specOLR, & 57 60 startphy_file, testradtimes, & … … 64 67 use callcorrk_mod, only: callcorrk 65 68 use vdifc_mod, only: vdifc 69 use vdifc_pluto_mod, only: vdifc_pluto 66 70 use turbdiff_mod, only: turbdiff 67 71 use turb_mod, only : q2,sensibFlux,turb_resolved … … 115 119 ! II.a Option 1 : Call correlated-k radiative transfer scheme. 116 120 ! II.b Option 2 : Call Newtonian cooling scheme. 117 ! II. cOption 3 : Atmosphere has no radiative effect.121 ! II.! Option 3 : Atmosphere has no radiative effect. 118 122 ! 119 123 ! III. Vertical diffusion (turbulent mixing) : … … 250 254 !$OMP THREADPRIVATE(day_ini,icount) 251 255 256 REAL,save :: acond,bcond 257 REAL, save :: tcond1p4Pa 258 DATA tcond1p4Pa/38/ 259 260 252 261 ! Local variables : 253 262 ! ----------------- … … 270 279 real zzlay(ngrid,nlayer) ! Altitude at the middle of the atmospheric layers. 271 280 real zzlev(ngrid,nlayer+1) ! Altitude at the atmospheric layer boundaries. 281 272 282 273 283 ! VARIABLES for the thermal plume model (AF24: deleted) … … 351 361 REAL flym_sol(ngrid) ! Incident Solar flux Lyman alpha ph.m-2.s-1 352 362 REAL flym_ipm(ngrid) ! Incident IPM (Interplanetary) flux Lyman alpha ph.m-2.s-1 363 REAL zfluxuv ! Lyman alpha flux at 1AU 353 364 354 365 … … 376 387 real zflubid(ngrid) 377 388 real zplanck(ngrid),zpopsk(ngrid,nlayer) 389 REAL zdum1(ngrid,nlayer) 390 REAL zdum2(ngrid,nlayer) 378 391 real ztim1,ztim2,ztim3, z1,z2 379 392 real ztime_fin … … 721 734 end if 722 735 723 call orbite(zls,dist_star,declin,right_ascen) 736 737 ! Get Lyman alpha flux at specific Ls 738 if (haze) then 739 call lymalpha(zls,zfluxuv) 740 print*, 'Haze lyman-alpha zls,zfluxuv=',zls,zfluxuv 741 end if 742 743 744 IF (triton) then 745 CALL orbitetriton(zls,zday,dist_star,declin) 746 ELSE 747 call orbite(zls,dist_star,declin,right_ascen) 748 ENDIF 749 724 750 725 751 if (diurnal) then … … 768 794 ! w = F / (rho*area) and rho = P/(r*T) 769 795 ! But first linearly interpolate mass flux to mid-layers 770 if (.not.fast) then 796 if (.not.fast) then 771 797 do l=1,nlayer-1 772 798 pw(1:ngrid,l)=0.5*(flxw(1:ngrid,l)+flxw(1:ngrid,l+1)) … … 810 836 endif 811 837 838 ! AF24: TODO insert surfprop for pluto & triton around here 839 812 840 if (callrad) then 813 841 if( mod(icount-1,iradia).eq.0.or.lastcall) then … … 910 938 else 911 939 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 912 ! II. cAtmosphere has no radiative effect940 ! II.! Atmosphere has no radiative effect 913 941 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 914 942 fluxtop_dn(1:ngrid) = fract(1:ngrid)*mu0(1:ngrid)*Fat1AU/dist_star**2 … … 988 1016 taux,tauy) 989 1017 990 else 1018 else if (UseVdifcPlutold) then 1019 zflubid(1:ngrid)=fluxrad(1:ngrid)+fluxgrd(1:ngrid) 1020 1021 ! Calling vdif (Martian version WITH N2 condensation) 1022 CALL vdifc_pluto(ngrid,nlayer,nq,zpopsk, & 1023 ptimestep,capcal,lwrite, & 1024 pplay,pplev,zzlay,zzlev,z0, & 1025 pu,pv,zh,pq,pt,tsurf,emis,qsurf, & 1026 zdum1,zdum2,zdh,pdq,pdt,zflubid, & 1027 zdudif,zdvdif,zdhdif,zdtsdif,q2, & 1028 zdqdif,zdqsdif,qsat_ch4,qsat_ch4_l1) !,zq1temp_ch4,qsat_ch4) 1029 1030 pdv(1:ngrid,1:nlayer)=pdv(1:ngrid,1:nlayer)+zdvdif(1:ngrid,1:nlayer) 1031 pdu(1:ngrid,1:nlayer)=pdu(1:ngrid,1:nlayer)+zdudif(1:ngrid,1:nlayer) 1032 pdt(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)+zdhdif(1:ngrid,1:nlayer)*zpopsk(1:ngrid,1:nlayer) 1033 1034 zdtdif(1:ngrid,1:nlayer)=zdhdif(1:ngrid,1:nlayer)*zpopsk(1:ngrid,1:nlayer) ! for diagnostic only 1035 zdtsurf(1:ngrid)=zdtsurf(1:ngrid)+zdtsdif(1:ngrid) 1036 1037 bcond=1./tcond1p4Pa 1038 acond=r/lw_n2 1039 1040 if (tracer) then 1041 pdq(1:ngrid,1:nlayer,1:nq)=pdq(1:ngrid,1:nlayer,1:nq)+ zdqdif(1:ngrid,1:nlayer,1:nq) 1042 dqsurf(1:ngrid,1:nq)=dqsurf(1:ngrid,1:nq) + zdqsdif(1:ngrid,1:nq) 1043 end if ! of if (tracer) 1044 1045 !------------------------------------------------------------------ 1046 ! test methane conservation 1047 ! if(methane)then 1048 ! call testconserv(ngrid,nlayer,nq,igcm_ch4_gas,igcm_ch4_ice, 1049 ! & ptimestep,pplev,zdqdif,zdqsdif,'CH4',' vdifc ') 1050 ! endif ! methane 1051 !------------------------------------------------------------------ 1052 ! test CO conservation 1053 ! if(carbox)then 1054 ! call testconserv(ngrid,nlayer,nq,igcm_co_gas,igcm_co_ice, 1055 ! & ptimestep,pplev,zdqdif,zdqsdif,'CO ',' vdifc ') 1056 ! endif ! carbox 1057 !------------------------------------------------------------------ 1058 1059 else ! if (UseVdifcPlutold) 991 1060 992 1061 zdh(1:ngrid,1:nlayer)=pdt(1:ngrid,1:nlayer)/zpopsk(1:ngrid,1:nlayer) … … 1167 1236 if (tracer) then 1168 1237 1169 ! --------------------- 1170 ! VI.1. Water and ice !AF24: removed 1171 ! --------------------- 1172 ! ------------------------- 1173 ! VI.2. Photochemistry !AF24: removed 1174 ! ------------------------- 1238 1239 1240 ! 7a. Methane, CO, and ice 1241 ! --------------------------------------- 1242 ! Methane ice condensation in the atmosphere 1243 ! ---------------------------------------- 1244 zdqch4cloud(:,:,:)=0. 1245 if ((methane).and.(metcloud).and.(.not.fast)) THEN 1246 call ch4cloud(ngrid,nlayer,naerkind,ptimestep, & 1247 pplev,pplay,pdpsrf,zzlev,zzlay, pt,pdt, & 1248 pq,pdq,zdqch4cloud,zdqsch4cloud,zdtch4cloud, & 1249 nq,rice_ch4) 1250 1251 DO l=1,nlayer 1252 DO ig=1,ngrid 1253 pdq(ig,l,igcm_ch4_gas)=pdq(ig,l,igcm_ch4_gas)+ & 1254 zdqch4cloud(ig,l,igcm_ch4_gas) 1255 pdq(ig,l,igcm_ch4_ice)=pdq(ig,l,igcm_ch4_ice)+ & 1256 zdqch4cloud(ig,l,igcm_ch4_ice) 1257 ENDDO 1258 ENDDO 1259 1260 ! Increment methane ice surface tracer tendency 1261 DO ig=1,ngrid 1262 dqsurf(ig,igcm_ch4_ice)=dqsurf(ig,igcm_ch4_ice)+ & 1263 zdqsch4cloud(ig,igcm_ch4_ice) 1264 ENDDO 1265 1266 ! update temperature tendancy 1267 DO ig=1,ngrid 1268 DO l=1,nlayer 1269 pdt(ig,l)=pdt(ig,l)+zdtch4cloud(ig,l) 1270 ENDDO 1271 ENDDO 1272 else 1273 rice_ch4(:,:)=0 ! initialization needed for callsedim 1274 end if 1275 1276 ! --------------------------------------- 1277 ! CO ice condensation in the atmosphere 1278 ! ---------------------------------------- 1279 zdqcocloud(:,:,:)=0. 1280 IF ((carbox).and.(monoxcloud).and.(.not.fast)) THEN 1281 call cocloud(ngrid,nlayer,naerkind,ptimestep, & 1282 pplev,pplay,pdpsrf,zzlev,zzlay, pt,pdt, & 1283 pq,pdq,zdqcocloud,zdqscocloud,zdtcocloud, & 1284 nq,rice_co,qsurf(1,igcm_n2),dqsurf(1,igcm_n2)) 1285 1286 DO l=1,nlayer 1287 DO ig=1,ngrid 1288 pdq(ig,l,igcm_co_gas)=pdq(ig,l,igcm_co_gas)+ & 1289 zdqcocloud(ig,l,igcm_co_gas) 1290 pdq(ig,l,igcm_co_ice)=pdq(ig,l,igcm_co_ice)+ & 1291 zdqcocloud(ig,l,igcm_co_ice) 1292 ENDDO 1293 ENDDO 1294 1295 ! Increment CO ice surface tracer tendency 1296 DO ig=1,ngrid 1297 dqsurf(ig,igcm_co_ice)=dqsurf(ig,igcm_co_ice)+ & 1298 zdqscocloud(ig,igcm_co_ice) 1299 ENDDO 1300 1301 ! update temperature tendancy 1302 DO ig=1,ngrid 1303 DO l=1,nlayer 1304 pdt(ig,l)=pdt(ig,l)+zdtcocloud(ig,l) 1305 ENDDO 1306 ENDDO 1307 ELSE 1308 rice_co(:,:)=0 ! initialization needed for callsedim 1309 END IF ! of IF (carbox) 1310 1311 !------------------------------------------------------------------ 1312 ! test methane conservation 1313 ! if(methane)then 1314 ! call testconserv(ngrid,nlayer,nq,igcm_ch4_gas,igcm_ch4_ice, 1315 ! & ptimestep,pplev,zdqch4cloud,zdqsch4cloud,'CH4','ch4clou') 1316 ! endif ! methane 1317 !------------------------------------------------------------------ 1318 ! test CO conservation 1319 ! if(carbox)then 1320 ! call testconserv(ngrid,nlayer,nq,igcm_co_gas,igcm_co_ice, 1321 ! & ptimestep,pplev,zdqcocloud,zdqscocloud,'CO ','cocloud') 1322 ! endif ! carbox 1323 !------------------------------------------------------------------ 1324 1325 ! 7b. Haze particle production 1326 ! ------------------- 1327 IF (haze) THEN 1328 1329 zdqphot_prec(:,:)=0. 1330 zdqphot_ch4(:,:)=0. 1331 ! Forcing to a fixed haze profile if haze_proffix 1332 if (haze_proffix.and.i_haze.gt.0.) then 1333 call haze_prof(ngrid,nlayer,zzlay,pplay,pt, & 1334 reffrad,profmmr) 1335 zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_haze)) & 1336 /ptimestep 1337 else 1338 call hazecloud(ngrid,nlayer,nq,ptimestep, & 1339 pplay,pplev,pq,pdq,dist_star,mu0,zfluxuv,zdqhaze, & 1340 zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin) 1341 endif 1342 1343 DO iq=1, nq ! should be updated 1344 DO l=1,nlayer 1345 DO ig=1,ngrid 1346 pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqhaze(ig,l,iq) 1347 ENDDO 1348 ENDDO 1349 ENDDO 1350 1351 ENDIF 1352 1353 IF (fast.and.fasthaze) THEN 1354 call prodhaze(ngrid,nlayer,nq,ptimestep,pplev,pq,pdq,dist_star, & 1355 mu0,declin,zdqprodhaze,zdqsprodhaze,gradflux,fluxbot, & 1356 fluxlym_sol_bot,fluxlym_ipm_bot,flym_sol,flym_ipm) 1357 1358 DO ig=1,ngrid 1359 pdq(ig,1,igcm_ch4_gas)=pdq(ig,1,igcm_ch4_gas)+ & 1360 zdqprodhaze(ig,igcm_ch4_gas) 1361 pdq(ig,1,igcm_prec_haze)=pdq(ig,1,igcm_prec_haze)+ & 1362 zdqprodhaze(ig,igcm_prec_haze) 1363 pdq(ig,1,igcm_haze)=abs(pdq(ig,1,igcm_haze)+ & 1364 zdqprodhaze(ig,igcm_haze)) 1365 qsurf(ig,igcm_haze)= qsurf(ig,igcm_haze)+ & 1366 zdqsprodhaze(ig)*ptimestep 1367 ENDDO 1368 1369 ENDIF 1370 1371 1372 1175 1373 ! ------------------------- 1176 1374 ! VI.3. Aerosol particles … … 1476 1674 enddo 1477 1675 1478 if (aerohaze) then1479 ! Generalised for arbitrary aerosols now. By LK1480 reffcol(1:ngrid,1:naerkind)=0.01481 ! call n2_reffrad(ngrid,nlayer,nq,zq,reffrad(1,1,iaero_haze))1482 if (haze_proffix.and.i_haze.gt.0.) then1483 call haze_prof(ngrid,nlayer,zzlay,pplay,pt, &1484 reffrad,profmmr)1485 zdqhaze(:,:,i_haze)=(profmmr(:,:)-pq(:,:,igcm_n2)) & ! AF: TODO: replace by igcm_haze?1486 /ptimestep1487 else1488 !! AF: TODO import from pluto.old?1489 ! call hazecloud(ngrid,nlayer,nq,ptimestep,&1490 ! pplay,pplev,pq,pdq,dist_sol,mu0,zfluxuv,zdqhaze,&1491 ! zdqphot_prec,zdqphot_ch4,zdqconv_prec,declin)1492 endif1493 1494 DO iq=1, nq ! should be updated1495 DO l=1,nlayer1496 DO ig=1,ngrid1497 pdq(ig,l,iq)=pdq(ig,l,iq)+ zdqhaze(ig,l,iq)1498 ENDDO1499 ENDDO1500 ENDDO1501 endif ! end of aerohaze1502 1676 endif ! end of 'tracer' 1503 1677 -
trunk/LMDZ.PLUTO/libf/phypluto/tracer_h.F90
r3195 r3237 87 87 integer,save :: igcm_eddy5e8 88 88 89 !$OMP THREADPRIVATE(igcm_co_gas,igcm_n2,igcm_ar,igcm_ch4_gas,igcm_ar_n2, &igcm_ch4_ice,igcm_co_ice,igcm_prec_haze,igcm_haze,igcm_haze10,igcm_haze30,igcm_haze50,igcm_haze100,igcm_eddy1e6,igcm_eddy1e7,igcm_eddy5e7,igcm_eddy1e8,igcm_eddy5e8)89 !$OMP THREADPRIVATE(igcm_co_gas,igcm_n2,igcm_ar,igcm_ch4_gas,igcm_ar_n2,igcm_ch4_ice,igcm_co_ice,igcm_prec_haze,igcm_haze,igcm_haze10,igcm_haze30,igcm_haze50,igcm_haze100,igcm_eddy1e6,igcm_eddy1e7,igcm_eddy5e7,igcm_eddy1e8,igcm_eddy5e8) 90 90 91 91 end module tracer_h
Note: See TracChangeset
for help on using the changeset viewer.