1 | ! Ecriture des fichiers de sorties COSP |
---|
2 | ! Sorties journalierres |
---|
3 | ! Abderrahmane Idelkadi Septembre 2009 |
---|
4 | |
---|
5 | IF (MOD(itap,NINT(freq_COSP/dtime)).EQ.0) THEN |
---|
6 | |
---|
7 | itau_wcosp = itau_phy + itap |
---|
8 | |
---|
9 | ! Sorties LIDAR |
---|
10 | if (cfg%Llidar_sim) then |
---|
11 | if (cfg%Lcllcalipso) then |
---|
12 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"cllcalipso",itau_wcosp, & |
---|
13 | stlidar%cldlayer(:,1)) |
---|
14 | endif |
---|
15 | if (cfg%Lclhcalipso) then |
---|
16 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"clhcalipso",itau_wcosp, & |
---|
17 | stlidar%cldlayer(:,3)) |
---|
18 | endif |
---|
19 | if (cfg%Lclmcalipso) then |
---|
20 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"clmcalipso",itau_wcosp, & |
---|
21 | stlidar%cldlayer(:,2)) |
---|
22 | endif |
---|
23 | if (cfg%Lcltcalipso) then |
---|
24 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"cltcalipso",itau_wcosp, & |
---|
25 | stlidar%cldlayer(:,4)) |
---|
26 | endif |
---|
27 | if (cfg%Lclcalipso) then |
---|
28 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"clcalipso",itau_wcosp, & |
---|
29 | stlidar%lidarcld) |
---|
30 | endif |
---|
31 | if (cfg%Lcfad_lidarsr532) then |
---|
32 | do ii=1,SR_BINS |
---|
33 | CALL histwrite_phy(nid_mth_cosp,lCOSP, & |
---|
34 | "cfad_lidarsr532_"//chcol(ii),itau_wcosp,stlidar%cfad_sr(:,ii,:)) |
---|
35 | enddo |
---|
36 | endif |
---|
37 | if (cfg%Lparasol_refl) then |
---|
38 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"parasol_refl", & |
---|
39 | itau_wcosp,stlidar%parasolrefl) |
---|
40 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"parasol_crefl", & |
---|
41 | itau_wcosp,parasolcrefl) |
---|
42 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"Ncrefl", & |
---|
43 | itau_wcosp,Ncref) |
---|
44 | endif |
---|
45 | if (cfg%Latb532) then |
---|
46 | do ii=1,Ncolumns |
---|
47 | CALL histwrite_phy(nid_mth_cosp,lCOSP, & |
---|
48 | "atb532_"//chcol(ii),itau_wcosp,sglidar%beta_tot(:,ii,:)) |
---|
49 | enddo |
---|
50 | endif |
---|
51 | if (cfg%Lbeta_mol532) then |
---|
52 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"beta_mol532", & |
---|
53 | itau_wcosp,sglidar%beta_mol) |
---|
54 | endif |
---|
55 | endif ! Lidar |
---|
56 | |
---|
57 | ! Sorties RADAR |
---|
58 | !Attention A FAIRE |
---|
59 | ! if (cfg%Lradar_sim) then |
---|
60 | ! print*,'Ecriture sorties Radar' |
---|
61 | ! if (cfg%Lcfad_dbze94) then |
---|
62 | ! print*,'Ecriture de cfad_dbze94.nc ' |
---|
63 | ! A revoir l axe vertical Nlvgrid |
---|
64 | ! do ii=1,DBZE_BINS |
---|
65 | ! dbze_ax(ii) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5) |
---|
66 | ! enddo |
---|
67 | ! call write_netcdf4d('cfad_dbze94.nc',use_vgrid,nlon,nlat,Nlevout,DBZE_BINS, & |
---|
68 | ! x,y,out_levs,dbze_ax,i,ndays,time,stradar%cfad_ze) |
---|
69 | ! endif |
---|
70 | ! if (cfg%Lclcalipso2) then |
---|
71 | ! call write_netcdf3d('clcalipso2.nc',use_vgrid,'clcalipso2', & |
---|
72 | ! nlon,nlat,Nlevout,x,y,out_levs,i,ndays,time,stradar%lidar_only_freq_cloud) |
---|
73 | ! endif |
---|
74 | ! if (cfg%Ldbze94) then |
---|
75 | ! do ii=1,Ncolumns |
---|
76 | ! xcol(ii)=float(i) |
---|
77 | ! enddo |
---|
78 | ! call write_netcdf4d('dbze94.nc',use_vgrid,nlon,nlat,Nlevout,Ncolumns, & |
---|
79 | ! x,y,out_levs,xcol,i,ndays,time,sgradar%Ze_tot) |
---|
80 | ! endif |
---|
81 | ! if (cfg%Lcltlidarradar) then |
---|
82 | ! call write_netcdf2d('cltlidarradar.nc','cltlidarradar', & |
---|
83 | ! nlon,nlat,x,y,i,ndays,time,stradar%radar_lidar_tcc) |
---|
84 | ! endif |
---|
85 | ! endif ! Radar |
---|
86 | |
---|
87 | ! Sorties MISR |
---|
88 | !Attention A FAIRE |
---|
89 | ! if (cfg%Lmisr_sim) then |
---|
90 | ! print*,'Ecriture sorties Misr' |
---|
91 | ! call write_netcdf4d('clMISR.nc',use_vgrid,nlon,nlat,MISR_N_CTH,7, & |
---|
92 | ! x,y,MISR_CTH,ISCCP_TAU,i,ndays,time,misr%fq_MISR) |
---|
93 | ! endif |
---|
94 | |
---|
95 | ! Sorties ISCCP |
---|
96 | if (cfg%Lisccp_sim) then |
---|
97 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"sunlit",itau_wcosp,gbx%sunlit) |
---|
98 | if (cfg%Lclisccp2) then |
---|
99 | do ii=1,7 |
---|
100 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"clisccp2_"//chcol(ii), & |
---|
101 | itau_wcosp,isccp%fq_isccp(:,ii,:)) |
---|
102 | enddo |
---|
103 | endif |
---|
104 | if (cfg%Lboxtauisccp) then |
---|
105 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxtauisccp", & |
---|
106 | itau_wcosp,isccp%boxtau) |
---|
107 | endif |
---|
108 | if (cfg%Lboxptopisccp) then |
---|
109 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxptopisccp", & |
---|
110 | itau_wcosp,isccp%boxptop) |
---|
111 | endif |
---|
112 | if (cfg%Ltclisccp) then |
---|
113 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"tclisccp", & |
---|
114 | itau_wcosp,isccp%totalcldarea) |
---|
115 | endif |
---|
116 | if (cfg%Lctpisccp) then |
---|
117 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"ctpisccp", & |
---|
118 | itau_wcosp,isccp%meanptop) |
---|
119 | endif |
---|
120 | if (cfg%Ltauisccp) then |
---|
121 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"tauisccp", & |
---|
122 | itau_wcosp,isccp%meantaucld) |
---|
123 | endif |
---|
124 | if (cfg%Lalbisccp) then |
---|
125 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"albisccp", & |
---|
126 | itau_wcosp,isccp%meanalbedocld) |
---|
127 | endif |
---|
128 | if (cfg%Lmeantbisccp) then |
---|
129 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbisccp", & |
---|
130 | itau_wcosp,isccp%meantb) |
---|
131 | endif |
---|
132 | if (cfg%Lmeantbclrisccp) then |
---|
133 | CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbclrisccp", & |
---|
134 | itau_wcosp,isccp%meantbclr) |
---|
135 | endif |
---|
136 | endif ! Isccp |
---|
137 | |
---|
138 | ! if (ok_sync) then |
---|
139 | !$OMP MASTER |
---|
140 | call histsync(nid_mth_cosp) |
---|
141 | !$OMP END MASTER |
---|
142 | ! endif |
---|
143 | |
---|
144 | ENDIF ! if freq_COSP |
---|