1 | MODULE output_physiqex_mod |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,cf,zqr,zqs,zqg,ptke,theta) |
---|
8 | |
---|
9 | USE dimphy, ONLY: klon,klev |
---|
10 | USE iophy, ONLY: histbeg_phy,histwrite_phy |
---|
11 | USE ioipsl, ONLY: histvert,histdef,histend,histsync |
---|
12 | USE lmdz_phys_para, ONLY: jj_nb |
---|
13 | USE lmdz_ioipsl_getin_p, ONLY: getin_p |
---|
14 | USE lmdz_grid_phy, ONLY: nbp_lon,nbp_lat |
---|
15 | USE iophy, ONLY: init_iophy_new |
---|
16 | USE lmdz_geometry, ONLY: latitude_deg, longitude_deg |
---|
17 | USE infotrac_phy, ONLY: nqtot |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | IMPLICIT NONE |
---|
22 | logical, INTENT(IN) :: debut |
---|
23 | REAL, INTENT(IN) :: pdtphys,zjulian |
---|
24 | REAL,INTENT(IN) :: presnivs(klev) ! pseudo-pressure (Pa) of mid-layers |
---|
25 | REAL,INTENT(IN) :: u(klon,klev) ! eastward zonal wind (m/s) |
---|
26 | REAL,INTENT(IN) :: v(klon,klev) ! northward meridional wind (m/s) |
---|
27 | REAL,INTENT(IN) :: t(klon,klev) ! temperature (K) |
---|
28 | REAL,INTENT(IN) :: theta(klon,klev) ! temperature (K) |
---|
29 | REAL,INTENT(IN) :: paprs(klon,klev+1) ! interlayer pressure (Pa) |
---|
30 | REAL,INTENT(IN) :: qx(klon,klev,nqtot) !tracers |
---|
31 | REAL,INTENT(IN) :: cf(klon,klev) !cloud fraction |
---|
32 | REAL,INTENT(IN) :: zqr(klon,klev) !rain specifiq content |
---|
33 | REAL,INTENT(IN) :: zqs(klon,klev) !snow specifiq content |
---|
34 | REAL,INTENT(IN) :: zqg(klon,klev) !graupel specifiq content |
---|
35 | REAL,INTENT(IN) :: ptke(klon,klev) !tke |
---|
36 | |
---|
37 | REAL :: t_ops ! frequency of the IOIPSL operations (eg average over...) |
---|
38 | REAL :: t_wrt ! frequency of the IOIPSL outputs |
---|
39 | INTEGER :: zvertid ! vertical coordinate ID |
---|
40 | REAL :: dtime |
---|
41 | |
---|
42 | INTEGER,save :: iwrite_phys=1 ! output every iwrite_phys physics step |
---|
43 | !$OMP THREADPRIVATE(iwrite_phys) |
---|
44 | INTEGER :: nhori ! horizontal coordinate ID |
---|
45 | INTEGER,save :: nid_hist ! output file ID |
---|
46 | !$OMP THREADPRIVATE(nid_hist) |
---|
47 | INTEGER, save :: itau=0 |
---|
48 | !$OMP THREADPRIVATE(itau) |
---|
49 | |
---|
50 | INTEGER, save :: ioex=1 |
---|
51 | |
---|
52 | |
---|
53 | PRINT*,'nnnnnnn ',nid_hist,debut,itau |
---|
54 | |
---|
55 | IF(debut)THEN |
---|
56 | CALL getin_p("iwrite_phys",iwrite_phys) |
---|
57 | |
---|
58 | !$OMP MASTER |
---|
59 | CALL iophys_ini(pdtphys) |
---|
60 | !$OMP END MASTER |
---|
61 | !$OMP BARRIER |
---|
62 | |
---|
63 | END IF |
---|
64 | |
---|
65 | |
---|
66 | itau=itau+1 |
---|
67 | |
---|
68 | IF (modulo(itau,iwrite_phys)==0) THEN |
---|
69 | CALL iophys_ecrit('temp',klev,'Temperature','K',t) |
---|
70 | CALL iophys_ecrit('u',klev,'zonal wind','m/s',u) |
---|
71 | CALL iophys_ecrit('v',klev,'meridinal wind','m/s',v) |
---|
72 | CALL iophys_ecrit('ps',1,'Surface pressure','Pa',paprs(:,1)) |
---|
73 | CALL iophys_ecrit('qv',klev,'Water vapor specifiq content', 'kg/kg', qx(:,:,1)) |
---|
74 | CALL iophys_ecrit('qc',klev,'Cloud liquid water specifiq content', 'kg/kg', qx(:,:,2)) |
---|
75 | CALL iophys_ecrit('qi',klev,'Cloud solid water specifiq content', 'kg/kg', qx(:,:,3)) |
---|
76 | CALL iophys_ecrit('CF',klev,'Cloud fraction', '0-1', cf) |
---|
77 | CALL iophys_ecrit('qr',klev,'Rain specifiq content', 'kg/kg', zqr) |
---|
78 | CALL iophys_ecrit('qs',klev,'Snow specifiq content', 'kg/kg', zqs) |
---|
79 | CALL iophys_ecrit('qg',klev,'Graupel specifiq content', 'kg/kg', zqg) |
---|
80 | CALL iophys_ecrit('TKE',klev,'TKE', 'm2/s2', ptke) |
---|
81 | CALL iophys_ecrit('theta',klev,'Temperature potentielle', 'K', theta) |
---|
82 | END IF |
---|
83 | |
---|
84 | |
---|
85 | END SUBROUTINE output_physiqex |
---|
86 | END MODULE output_physiqex_mod |
---|