Changeset 2096 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Jul 21, 2014, 11:24:10 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/1DUTILS.h
r2046 r2096 822 822 INTEGER np,ierr 823 823 REAL pi,x 824 REAL :: scaleheight=8.825 824 826 825 !----------------------------------------------------------------------- … … 925 924 PRINT *, ap 926 925 927 print*,'scaleheight=',scaleheight 928 DO l = 1, llm 929 dpres(l) = bp(l) - bp(l+1) 930 presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff ) 931 write(*, *)'PRESNIVS(', l, ')=', presnivs(l), ' Z ~ ', & 932 log(preff/presnivs(l))*scaleheight & 933 , ' DZ ~ ', scaleheight*log((ap(l)+bp(l)*preff)/ & 934 max(ap(l+1)+bp(l+1)*preff, 1.e-10)) 935 ENDDO 936 926 DO l = 1, llm 927 dpres(l) = bp(l) - bp(l+1) 928 presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff ) 929 ENDDO 937 930 938 931 PRINT *,' PRESNIVS ' … … 2108 2101 elseif(4000 < zlay(k) .and. zlay(k) < 9000) then 2109 2102 q_rico(k)=1.8 + (0 - 1.8) / & 2110 & ( 10000 - 4000) * (zlay(k) - 4000)2103 & (9000 - 4000) * (zlay(k) - 4000) 2111 2104 else 2112 2105 q_rico(k)=0.0 … … 3516 3509 return 3517 3510 end subroutine read_fire 3511 !===================================================================== 3512 ! Reads CIRC input files 3513 3514 SUBROUTINE read_circ(nlev_circ,cf,lwp,iwp,reliq,reice,t,z,p,pm,h2o,o3,sza) 3515 3516 parameter (ncm_1=49180) 3517 #include "YOMCST.h" 3518 3519 real albsfc(ncm_1), albsfc_w(ncm_1) 3520 real cf(nlev_circ), icefra(nlev_circ), deice(nlev_circ), & 3521 reliq(nlev_circ), reice(nlev_circ), lwp(nlev_circ), iwp(nlev_circ) 3522 real t(nlev_circ+1), z(nlev_circ+1), dz(nlev_circ), p(nlev_circ+1) 3523 real aer_beta(nlev_circ), waer(nlev_circ), gaer(nlev_circ) 3524 real pm(nlev_circ), tm(nlev_circ), h2o(nlev_circ), o3(nlev_circ) 3525 real co2(nlev_circ), n2o(nlev_circ), co(nlev_circ), ch4(nlev_circ), & 3526 o2(nlev_circ), ccl4(nlev_circ), f11(nlev_circ), f12(nlev_circ) 3527 ! za= zenital angle 3528 ! sza= cosinus angle zenital 3529 real wavn(ncm_1), ssf(ncm_1),za,sza 3530 integer nlev 3531 3532 3533 ! Open the files 3534 3535 open (11, file='Tsfc_sza_nlev_case.txt', status='old') 3536 open (12, file='level_input_case.txt', status='old') 3537 open (13, file='layer_input_case.txt', status='old') 3538 open (14, file='aerosol_input_case.txt', status='old') 3539 open (15, file='cloud_input_case.txt', status='old') 3540 open (16, file='sfcalbedo_input_case.txt', status='old') 3541 3542 ! Read scalar information 3543 do iskip=1,5 3544 read (11, *) 3545 enddo 3546 read (11, '(i8)') nlev 3547 read (11, '(f10.2)') tsfc 3548 read (11, '(f10.2)') za 3549 read (11, '(f10.4)') sw_dn_toa 3550 sza=cos(za/180.*RPI) 3551 print *,'nlev,tsfc,sza,sw_dn_toa,RPI',nlev,tsfc,sza,sw_dn_toa,RPI 3552 close(11) 3553 3554 ! Read level information 3555 read (12, *) 3556 do il=1,nlev 3557 read (12, 302) ilev, z(il), p(il), t(il) 3558 z(il)=z(il)*1000. ! z donne en km 3559 p(il)=p(il)*100. ! p donne en mb 3560 enddo 3561 302 format (i8, f8.3, 2f9.2) 3562 close(12) 3563 3564 ! Read layer information (midpoint values) 3565 do iskip=1,3 3566 read (13, *) 3567 enddo 3568 do il=1,nlev-1 3569 read (13, 303) ilev,pm(il),tm(il),h2o(il),co2(il),o3(il), & 3570 n2o(il),co(il),ch4(il),o2(il),ccl4(il), & 3571 f11(il),f12(il) 3572 pm(il)=pm(il)*100. 3573 enddo 3574 303 format (i8, 2f9.2, 10(2x,e13.7)) 3575 close(13) 3576 3577 ! Read aerosol layer information 3578 do iskip=1,3 3579 read (14, *) 3580 enddo 3581 read (14, '(f10.2)') aer_alpha 3582 read (14, *) 3583 read (14, *) 3584 do il=1,nlev-1 3585 read (14, 304) ilev, aer_beta(il), waer(il), gaer(il) 3586 enddo 3587 304 format (i8, f9.5, 2f8.3) 3588 close(14) 3589 3590 ! Read cloud information 3591 do iskip=1,3 3592 read (15, *) 3593 enddo 3594 do il=1,nlev-1 3595 read (15, 305) ilev, cf(il), lwp(il), iwp(il), reliq(il), reice(il) 3596 lwp(il)=lwp(il)/1000. ! lwp donne en g/kg 3597 iwp(il)=iwp(il)/1000. ! iwp donne en g/kg 3598 reliq(il)=reliq(il)/1000000. ! reliq donne en microns 3599 reice(il)=reice(il)/1000000. ! reice donne en microns 3600 enddo 3601 305 format (i8, f8.3, 4f9.2) 3602 close(15) 3603 3604 ! Read surface albedo (weighted & unweighted) and spectral solar irradiance 3605 do iskip=1,6 3606 read (16, *) 3607 enddo 3608 do icm_1=1,ncm_1 3609 read (16, 306) wavn(icm_1), albsfc(icm_1), albsfc_w(icm_1), ssf(icm_1) 3610 enddo 3611 306 format(f10.1, 2f12.5, f14.8) 3612 close(16) 3613 3614 return 3615 end subroutine read_circ 3616 !===================================================================== 3617 ! Reads RTMIP input files 3618 3619 SUBROUTINE read_rtmip(nlev_rtmip,play,plev,t,h2o,o3) 3620 3621 #include "YOMCST.h" 3622 3623 real t(nlev_rtmip), pt(nlev_rtmip),pb(nlev_rtmip),h2o(nlev_rtmip), o3(nlev_rtmip) 3624 real temp(nlev_rtmip), play(nlev_rtmip),ovap(nlev_rtmip), oz(nlev_rtmip),plev(nlev_rtmip+1) 3625 integer nlev 3626 3627 3628 ! Open the files 3629 3630 open (11, file='low_resolution_profile.txt', status='old') 3631 3632 ! Read level information 3633 read (11, *) 3634 do il=1,nlev_rtmip 3635 read (11, 302) pt(il), pb(il), t(il),h2o(il),o3(il) 3636 enddo 3637 do il=1,nlev_rtmip 3638 play(il)=pt(nlev_rtmip-il+1)*100. ! p donne en mb 3639 temp(il)=t(nlev_rtmip-il+1) 3640 ovap(il)=h2o(nlev_rtmip-il+1) 3641 oz(il)=o3(nlev_rtmip-il+1) 3642 enddo 3643 do il=1,39 3644 plev(il)=play(il)+(play(il+1)-play(il))/2. 3645 print *,'il p t ovap oz=',il,plev(il),temp(il),ovap(il),oz(il) 3646 enddo 3647 plev(41)=101300. 3648 302 format (e16.10,3x,e16.10,3x,e16.10,3x,e12.6,3x,e12.6) 3649 close(12) 3650 3651 return 3652 end subroutine read_rtmip 3653 !===================================================================== 3654
Note: See TracChangeset
for help on using the changeset viewer.