Changeset 3508 for trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
- Timestamp:
- Nov 8, 2024, 10:57:36 AM (13 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.PLUTO/libf/phypluto/physiq_mod.F90
r3506 r3508 100 100 use wxios, only: wxios_context_init, xios_context_finalize 101 101 #endif 102 use write_output_mod, only: write_output 102 103 103 104 implicit none … … 1038 1039 inertia_min=minval(inertiedat(ig,:)) 1039 1040 inertia_max=maxval(inertiedat(ig,:)) 1040 print*, "inertia min max" , inertia_min, inertia_max1041 1041 ! diurnal and annual skin depth 1042 1042 diurnal_skin=(inertia_min/volcapa)*sqrt(daysec/pi) … … 2334 2334 call wstats(ngrid,trim(noms(iq))//'_col',trim(noms(iq))//'_col', & 2335 2335 'kg m^-2',2,qcol(1,iq) ) 2336 call wstats(ngrid,trim(noms(iq))//'_reff',trim(noms(iq))//'_reff',&2337 'm',3,reffrad(1,1,iq))2336 ! call wstats(ngrid,trim(noms(iq))//'_reff',trim(noms(iq))//'_reff',& 2337 ! 'm',3,reffrad(1,1,iq)) ! bug (2): Subscript #3 of the array REFFRAD has value 2 which is greater than the upper bound of 1 2338 2338 end do 2339 2339 … … 2357 2357 !------------------------------------------------------------------------------ 2358 2358 2359 call writediagfi(ngrid,"Ls","solar longitude","deg",0,zls*180./pi) 2360 call writediagfi(ngrid,"Lss","sub solar longitude","deg",0,zlss*180./pi) 2361 call writediagfi(ngrid,"RA","right ascension","deg",0,right_ascen*180./pi) 2362 call writediagfi(ngrid,"Declin","solar declination","deg",0,declin*180./pi) 2363 call writediagfi(ngrid,"tsurf","Surface temperature","K",2,tsurf) 2364 call writediagfi(ngrid,"ps","Surface pressure","Pa",2,ps) 2365 call writediagfi(ngrid,"emis","Emissivity","",2,emis) 2366 2367 !! Pluto outputs 2368 call writediagfi(ngrid,"dist_star","dist_star","AU",0,dist_star) 2359 call write_output("Ls","solar longitude","deg",zls*180./pi) 2360 ! call write_output("Lss","sub solar longitude","deg",zlss*180./pi) 2361 call write_output("RA","right ascension","deg",right_ascen*180./pi) 2362 call write_output("Declin","solar declination","deg",declin*180./pi) 2363 call write_output("dist_star","dist_star","AU",dist_star) 2364 2365 call write_output("tsurf","Surface temperature","K",tsurf) 2366 call write_output("ps","Surface pressure","Pa",ps) 2367 call write_output("emis","Emissivity","",emis) 2369 2368 2370 2369 if (fast) then 2371 call write diagfi(ngrid,"globave","surf press","Pa",0,globave)2372 call write diagfi(ngrid,"fluxrad","fluxrad","W m-2",2,fluxrad)2373 call write diagfi(ngrid,"fluxgrd","fluxgrd","W m-2",2,fluxgrd)2374 call write diagfi(ngrid,"capcal","capcal","W.s m-2 K-1",2,capcal)2375 ! call write diagfi(ngrid,"dplanck","dplanck","W.s m-2 K-1",2,dplanck)2376 call write diagfi(ngrid,"tsoil","tsoil","K",3,tsoil)2370 call write_output("globave","surf press","Pa",globave) 2371 call write_output("fluxrad","fluxrad","W m-2",fluxrad) 2372 call write_output("fluxgrd","fluxgrd","W m-2",fluxgrd) 2373 call write_output("capcal","capcal","W.s m-2 K-1",capcal) 2374 ! call write_output("dplanck","dplanck","W.s m-2 K-1",dplanck) 2375 call write_output("tsoil","tsoil","K",tsoil) 2377 2376 else 2378 2377 if (check_physics_outputs) then 2379 2378 ! Check the validity of updated fields at the end of the physics step 2380 call check_physics_fields("HERE physiq:", zt, zu, zv, pplev, zq) 2381 endif 2382 2383 call writediagfi(ngrid,"temp","temperature","K",3,zt) 2384 call writediagfi(ngrid,"teta","potential temperature","K",3,zh) 2385 call writediagfi(ngrid,"u","Zonal wind","m.s-1",3,zu) 2386 call writediagfi(ngrid,"v","Meridional wind","m.s-1",3,zv) 2387 call writediagfi(ngrid,"w","Vertical wind","m.s-1",3,pw) 2388 call writediagfi(ngrid,"p","Pressure","Pa",3,pplay) 2379 call check_physics_fields("physiq:", zt, zu, zv, pplev, zq) 2380 endif 2381 2382 call write_output("zzlay","Midlayer altitude", "m",zzlay(:,:)) 2383 call write_output("zzlev","Interlayer altitude", "m",zzlev(:,1:nlayer)) 2384 !call write_output('pphi','Geopotential',' ',pphi) 2385 2386 call write_output("temperature","temperature","K",zt) 2387 call write_output("teta","potential temperature","K",zh) 2388 call write_output("u","Zonal wind","m.s-1",zu) 2389 call write_output("v","Meridional wind","m.s-1",zv) 2390 call write_output("w","Vertical wind","m.s-1",pw) 2391 call write_output("p","Pressure","Pa",pplay) 2389 2392 endif 2390 2391 ! Subsurface temperatures2392 ! call writediagsoil(ngrid,"tsurf","Surface temperature","K",2,tsurf)2393 ! call writediagsoil(ngrid,"temp","temperature","K",3,tsoil)2394 2393 2395 2394 ! Total energy balance diagnostics 2396 2395 if(callrad)then 2397 2398 call writediagfi(ngrid,"ALB","Surface albedo"," ",2,albedo_equivalent) 2399 call writediagfi(ngrid,"ALB_1st","First Band Surface albedo"," ",2,albedo(:,1)) 2400 call writediagfi(ngrid,"ISR","incoming stellar rad.","W m-2",2,fluxtop_dn) 2401 call writediagfi(ngrid,"ASR","absorbed stellar rad.","W m-2",2,fluxabs_sw) 2402 call writediagfi(ngrid,"OLR","outgoing longwave rad.","W m-2",2,fluxtop_lw) 2403 call writediagfi(ngrid,"shad","rings"," ", 2, fract) 2404 2405 ! call writediagfi(ngrid,"fluxsurfsw","sw surface flux.","W m-2",2,fluxsurf_sw) 2406 ! call writediagfi(ngrid,"fluxsurflw","lw back radiation.","W m-2",2,fluxsurf_lw) 2407 2408 call writediagfi(ngrid,"GND","heat flux from ground","W m-2",2,fluxgrd) 2409 ! endif 2410 2411 call writediagfi(ngrid,"DYN","dynamical heat input","W m-2",2,fluxdyn) 2412 2396 call write_output("ALB","Surface albedo"," ",albedo_equivalent) 2397 call write_output("ASR","absorbed stellar rad.","W m-2",fluxabs_sw) 2398 call write_output("ISR","incoming stellar rad.","W m-2",fluxtop_dn) 2399 call write_output("OLR","outgoing longwave rad.","W m-2",fluxtop_lw) 2400 call write_output("GND","heat flux from ground","W m-2",fluxgrd) 2401 call write_output("DYN","dynamical heat input","W m-2",fluxdyn) 2413 2402 endif ! end of 'callrad' 2414 2403 2415 2404 if(enertest) then 2416 2405 if (calldifv) then 2417 2418 call writediagfi(ngrid,"q2","turbulent kinetic energy","J.kg^-1",3,q2) 2419 call writediagfi(ngrid,"sensibFlux","sensible heat flux","w.m^-2",2,sensibFlux) 2420 2421 ! call writediagfi(ngrid,"dEzdiff","turbulent diffusion heating (-sensible flux)","w.m^-2",3,dEzdiff) 2422 ! call writediagfi(ngrid,"dEdiff","integrated turbulent diffusion heating (-sensible flux)","w.m^-2",2,dEdiff) 2423 ! call writediagfi(ngrid,"dEdiffs","In TurbDiff (correc rad+latent heat) surf nrj change","w.m^-2",2,dEdiffs) 2424 2406 call write_output("q2","turbulent kinetic energy","J.kg^-1",q2) 2407 call write_output("sensibFlux","sensible heat flux","w.m^-2",sensibFlux) 2425 2408 endif 2426 2409 2427 2410 if (corrk) then 2428 call write diagfi(ngrid,"dEzradsw","radiative heating","w.m^-2",3,dEzradsw)2429 call write diagfi(ngrid,"dEzradlw","radiative heating","w.m^-2",3,dEzradlw)2411 call write_output("dEzradsw","radiative heating","w.m^-2",dEzradsw) 2412 call write_output("dEzradlw","radiative heating","w.m^-2",dEzradlw) 2430 2413 endif 2431 2414 2432 2415 if (generic_condensation) then 2433 call write diagfi(ngrid,"genericconddE","heat from generic condensation","W m-2",2,genericconddE)2434 call write diagfi(ngrid,"dt_generic_condensation","heating from generic condensation","K s-1",3,dt_generic_condensation)2416 call write_output("genericconddE","heat from generic condensation","W m-2",genericconddE) 2417 call write_output("dt_generic_condensation","heating from generic condensation","K s-1",dt_generic_condensation) 2435 2418 endif 2436 2419 … … 2442 2425 do nw=1,L_NSPECTV 2443 2426 write(str2,'(i2.2)') nw 2444 call write diagfi(ngrid,'dtauv'//str2,'Layer optical thickness attenuation in VI band '//str2,'',1,int_dtauv(:,nlayer:1:-1,nw))2427 call write_output('dtauv'//str2,'Layer optical thickness attenuation in VI band '//str2,'',int_dtauv(:,nlayer:1:-1,nw)) 2445 2428 enddo 2446 2429 do nw=1,L_NSPECTI 2447 2430 write(str2,'(i2.2)') nw 2448 call write diagfi(ngrid,'dtaui'//str2,'Layer optical thickness attenuation in IR band '//str2,'',1,int_dtaui(:,nlayer:1:-1,nw))2431 call write_output('dtaui'//str2,'Layer optical thickness attenuation in IR band '//str2,'',int_dtaui(:,nlayer:1:-1,nw)) 2449 2432 enddo 2450 2433 endif 2451 2434 2452 2435 ! Temporary inclusions for heating diagnostics. 2453 call write diagfi(ngrid,"zdtsw","SW heating","T s-1",3,zdtsw)2454 call write diagfi(ngrid,"zdtlw","LW heating","T s-1",3,zdtlw)2455 call write diagfi(ngrid,"dtrad","radiative heating","K s-1",3,dtrad)2456 call write diagfi(ngrid,"zdtdyn","Dyn. heating","T s-1",3,zdtdyn)2436 call write_output("zdtsw","SW heating","T s-1",zdtsw) 2437 call write_output("zdtlw","LW heating","T s-1",zdtlw) 2438 call write_output("dtrad","radiative heating","K s-1",dtrad) 2439 call write_output("zdtdyn","Dyn. heating","T s-1",zdtdyn) 2457 2440 2458 2441 ! For Debugging. 2459 !call writediagfi(ngrid,'rnat','Terrain type',' ',2,real(rnat)) 2460 !call writediagfi(ngrid,'pphi','Geopotential',' ',3,pphi) 2442 !call write_output('rnat','Terrain type',' ',real(rnat)) 2461 2443 2462 2444 ! Output tracers. 2463 2445 if (tracer) then 2464 ! call write diagfi(ngrid,"zdtc","tendancy T cond N2","K",3,zdtc)2446 ! call write_output("zdtc","tendancy T cond N2","K",zdtc) 2465 2447 2466 2448 do iq=1,nq 2467 call writediagfi(ngrid,noms(iq),noms(iq),'kg/kg',3,zq(1,1,iq)) 2468 ! call writediagfi(ngrid,trim(noms(iq))//'_surf',trim(noms(iq))//'_surf', & 2469 ! 'kg m^-2',2,qsurf_hist(1,iq) ) 2470 call writediagfi(ngrid,trim(noms(iq))//'_col',trim(noms(iq))//'_col', & 2471 'kg m^-2',2,qcol(1,iq) ) 2472 call writediagfi(ngrid,trim(noms(iq))//'_surf',trim(noms(iq))//'_surf', & 2473 'kg m^-2',2,qsurf(1,iq) ) 2474 2475 if(generic_condensation)then 2476 call writediagfi(ngrid,"rneb_generic","GCS cloud fraction (generic condensation)"," ",3,rneb_generic) 2477 call writediagfi(ngrid,"CLF","GCS cloud fraction"," ",3,cloudfrac) 2478 call writediagfi(ngrid,"RH_generic","GCS relative humidity"," ",3,RH_generic) 2479 endif 2480 ! call writediagfi(ngrid,"tau_col","Total aerosol optical depth","[]",2,tau_col) 2449 call write_output(noms(iq),noms(iq),'kg/kg',zq(:,:,iq)) 2450 ! call write_output(trim(noms(iq))//'_surf',trim(noms(iq))//'_surf', & 2451 ! 'kg m^-2',qsurf_hist(1,iq) ) 2452 call write_output(trim(noms(iq))//'_col',trim(noms(iq))//'_col', & 2453 'kg m^-2',qcol(:,iq) ) 2454 call write_output(trim(noms(iq))//'_surf',trim(noms(iq))//'_surf', & 2455 'kg m^-2',qsurf(:,iq) ) 2481 2456 enddo ! end of 'nq' loop 2482 2457 2483 2458 !Pluto specific 2484 call write diagfi(ngrid,'n2_iceflux','n2_iceflux',"kg m^-2 s^-1",2,flusurf(1,igcm_n2) )2459 call write_output('n2_iceflux','n2_iceflux',"kg m^-2 s^-1",flusurf(1,igcm_n2) ) 2485 2460 if (haze_radproffix)then 2486 call write diagfi(ngrid,'haze_reff','haze_reff','m',3,reffrad(1,1,1))2461 call write_output('haze_reff','haze_reff','m',reffrad(1,1,1)) 2487 2462 end if 2488 2463 if (methane) then 2489 ! call write diagfi(ngrid,"rice_ch4","ch4 ice mass mean radius","m",3,rice_ch4)2490 ! call write diagfi(ngrid,"zq1temp_ch4"," "," ",2,zq1temp_ch4)2491 ! call write diagfi(ngrid,"qsat_ch4"," "," ",2,qsat_ch4)2492 ! call write diagfi(ngrid,"qsat_ch4_l1"," "," ",2,qsat_ch4_l1)2493 2494 call write diagfi(ngrid,'ch4_iceflux','ch4_iceflux',&2495 "kg m^-2 s^-1", 2,flusurf(1,igcm_ch4_ice) )2496 call write diagfi(ngrid,"vmr_ch4","vmr_ch4","%",2,vmr_ch4)2464 ! call write_output("rice_ch4","ch4 ice mass mean radius","m",rice_ch4) 2465 ! call write_output("zq1temp_ch4"," "," ",zq1temp_ch4) 2466 ! call write_output("qsat_ch4"," "," ",qsat_ch4) 2467 ! call write_output("qsat_ch4_l1"," "," ",qsat_ch4_l1) 2468 2469 call write_output('ch4_iceflux','ch4_iceflux',& 2470 "kg m^-2 s^-1",flusurf(1,igcm_ch4_ice) ) 2471 call write_output("vmr_ch4","vmr_ch4","%",vmr_ch4) 2497 2472 if (.not.fast) then 2498 call write diagfi(ngrid,"zrho_ch4","zrho_ch4","kg.m-3",3,zrho_ch4(:,:))2473 call write_output("zrho_ch4","zrho_ch4","kg.m-3",zrho_ch4(:,:)) 2499 2474 endif 2500 2475 2501 2476 ! Tendancies 2502 call write diagfi(ngrid,"zdqcn2_ch4","zdq condn2 ch4","",&2503 3,zdqc(:,:,igcm_ch4_gas))2504 call write diagfi(ngrid,"zdqdif_ch4","zdqdif ch4","",&2505 3,zdqdif(:,:,igcm_ch4_gas))2506 call write diagfi(ngrid,"zdqsdif_ch4_ice","zdqsdif ch4","",&2507 2,zdqsdif(:,igcm_ch4_ice))2508 call write diagfi(ngrid,"zdqadj_ch4","zdqadj ch4","",&2509 3,zdqadj(:,:,igcm_ch4_gas))2477 call write_output("zdqcn2_ch4","zdq condn2 ch4","",& 2478 zdqc(:,:,igcm_ch4_gas)) 2479 call write_output("zdqdif_ch4","zdqdif ch4","",& 2480 zdqdif(:,:,igcm_ch4_gas)) 2481 call write_output("zdqsdif_ch4_ice","zdqsdif ch4","",& 2482 zdqsdif(:,igcm_ch4_ice)) 2483 call write_output("zdqadj_ch4","zdqadj ch4","",& 2484 zdqadj(:,:,igcm_ch4_gas)) 2510 2485 if (sedimentation) then 2511 call write diagfi(ngrid,"zdqsed_ch4","zdqsed ch4","",&2512 3,zdqsed(:,:,igcm_ch4_gas))2513 call write diagfi(ngrid,"zdqssed_ch4","zdqssed ch4","",&2514 2,zdqssed(:,igcm_ch4_gas))2486 call write_output("zdqsed_ch4","zdqsed ch4","",& 2487 zdqsed(:,:,igcm_ch4_gas)) 2488 call write_output("zdqssed_ch4","zdqssed ch4","",& 2489 zdqssed(:,igcm_ch4_gas)) 2515 2490 endif 2516 2491 if (metcloud.and.(.not.fast)) then 2517 call write diagfi(ngrid,"zdtch4cloud","ch4 cloud","T s-1",&2518 3,zdtch4cloud)2519 call write diagfi(ngrid,"zdqch4cloud","ch4 cloud","T s-1",&2520 3,zdqch4cloud(1,1,igcm_ch4_gas))2492 call write_output("zdtch4cloud","ch4 cloud","T s-1",& 2493 zdtch4cloud) 2494 call write_output("zdqch4cloud","ch4 cloud","T s-1",& 2495 zdqch4cloud(1,1,igcm_ch4_gas)) 2521 2496 endif 2522 2497 … … 2524 2499 2525 2500 if (carbox) then 2526 ! call write diagfi(ngrid,"zdtcocloud","tendancy T cocloud","K",3,zdtcocloud)2527 call write diagfi(ngrid,'co_iceflux','co_iceflux',&2528 "kg m^-2 s^-1", 2,flusurf(1,igcm_co_ice) )2529 call write diagfi(ngrid,"vmr_co","vmr_co","%",2,vmr_co)2501 ! call write_output("zdtcocloud","tendancy T cocloud","K",zdtcocloud) 2502 call write_output('co_iceflux','co_iceflux',& 2503 "kg m^-2 s^-1",flusurf(1,igcm_co_ice) ) 2504 call write_output("vmr_co","vmr_co","%",vmr_co) 2530 2505 if (.not.fast) THEN 2531 call write diagfi(ngrid,"zrho_co","zrho_co","kg.m-3",3,zrho_co(:,:))2506 call write_output("zrho_co","zrho_co","kg.m-3",zrho_co(:,:)) 2532 2507 endif 2533 2508 endif 2534 2509 2535 2510 if (haze) then 2536 ! call write diagfi(ngrid,"zrho_haze","zrho_haze","kg.m-3",3,zrho_haze(:,:))2537 call write diagfi(ngrid,"zdqrho_photprec","zdqrho_photprec",&2538 "kg.m-3.s-1", 3,zdqrho_photprec(:,:))2539 call write diagfi(ngrid,"zdqphot_prec","zdqphot_prec","",&2540 3,zdqphot_prec(:,:))2541 call write diagfi(ngrid,"zdqhaze_ch4","zdqhaze_ch4","",&2542 3,zdqhaze(:,:,igcm_ch4_gas))2543 call write diagfi(ngrid,"zdqhaze_prec","zdqhaze_prec","",&2544 3,zdqhaze(:,:,igcm_prec_haze))2511 ! call write_output("zrho_haze","zrho_haze","kg.m-3",zrho_haze(:,:)) 2512 call write_output("zdqrho_photprec","zdqrho_photprec",& 2513 "kg.m-3.s-1",zdqrho_photprec(:,:)) 2514 call write_output("zdqphot_prec","zdqphot_prec","",& 2515 zdqphot_prec(:,:)) 2516 call write_output("zdqhaze_ch4","zdqhaze_ch4","",& 2517 zdqhaze(:,:,igcm_ch4_gas)) 2518 call write_output("zdqhaze_prec","zdqhaze_prec","",& 2519 zdqhaze(:,:,igcm_prec_haze)) 2545 2520 if (igcm_haze.ne.0) then 2546 call write diagfi(ngrid,"zdqhaze_haze","zdqhaze_haze","",&2547 3,zdqhaze(:,:,igcm_haze))2521 call write_output("zdqhaze_haze","zdqhaze_haze","",& 2522 zdqhaze(:,:,igcm_haze)) 2548 2523 if (sedimentation) then 2549 call write diagfi(ngrid,"zdqssed_haze","zdqssed haze",&2550 "kg/m2/s", 2,zdqssed(:,igcm_haze))2524 call write_output("zdqssed_haze","zdqssed haze",& 2525 "kg/m2/s",zdqssed(:,igcm_haze)) 2551 2526 endif 2552 2527 endif 2553 call write diagfi(ngrid,"zdqphot_ch4","zdqphot_ch4","",&2554 3,zdqphot_ch4(:,:))2555 call write diagfi(ngrid,"zdqconv_prec","zdqconv_prec","",&2556 3,zdqconv_prec(:,:))2557 ! call write diagfi(ngrid,"zdqhaze_col","zdqhaze col","kg/m2/s",2558 ! & 2,zdqhaze_col(:))2528 call write_output("zdqphot_ch4","zdqphot_ch4","",& 2529 zdqphot_ch4(:,:)) 2530 call write_output("zdqconv_prec","zdqconv_prec","",& 2531 zdqconv_prec(:,:)) 2532 ! call write_output("zdqhaze_col","zdqhaze col","kg/m2/s", 2533 ! & zdqhaze_col(:)) 2559 2534 endif 2560 2535 2561 2536 if (aerohaze) then 2562 call write diagfi(ngrid,"tau_col",&2563 "Total aerosol optical depth","opacity", 2,tau_col)2537 call write_output("tau_col",& 2538 "Total aerosol optical depth","opacity",tau_col) 2564 2539 endif 2565 2540
Note: See TracChangeset
for help on using the changeset viewer.