source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histdayCOSP.h @ 1535

Last change on this file since 1535 was 1535, checked in by musat, 13 years ago

Ajout flag LOGICAL lCOSP necessaire pour sortir un fichier stations
IM

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