source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histhfCOSP.h @ 1928

Last change on this file since 1928 was 1928, checked in by idelkadi, 10 years ago
  • Correction du bug dans l'interface avec la physique : On ne veut pas que la distinction entre les nuages convectifs et stratiformes soit prise en compte dans les calculs Cosp. Dans l'interface avec la physique, sont passees en entree pour Cosp, les quantites totales (stratiforme + convective) du contenus en eau et d'autres variables. La fraction nuageuse convective calculee dans la physique est passee en entree pour Cosp dans la version buggee. Elle est remise a 0 dans cette version corrigee.
  • Mise a jour pour ISCCP : la fraction d'ensoleillement calculee par LMDZ est passee en argument pour Isccp
  • Rajouts d'autre variables diagnostiques : sunlit (=0 si nuit et =1 si jour) parasol_crefl (reflectance integree)
File size: 5.2 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_hf_cosp,lCOSP,"cllcalipso", &
13     itau_wcosp,stlidar%cldlayer(:,1))
14         endif
15         if (cfg%Lclhcalipso) then
16          CALL histwrite_phy(nid_hf_cosp,lCOSP,"clhcalipso", &
17     itau_wcosp,stlidar%cldlayer(:,3))
18         endif
19         if (cfg%Lclmcalipso) then
20          CALL histwrite_phy(nid_hf_cosp,lCOSP,"clmcalipso", &
21     itau_wcosp,stlidar%cldlayer(:,2))
22         endif
23         if (cfg%Lcltcalipso) then
24          CALL histwrite_phy(nid_hf_cosp,lCOSP,"cltcalipso", &
25     itau_wcosp,stlidar%cldlayer(:,4)) 
26         endif
27         if (cfg%Lclcalipso) then
28          CALL histwrite_phy(nid_hf_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_hf_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_hf_cosp,lCOSP,"parasol_refl", &
39     itau_wcosp,stlidar%parasolrefl)
40           CALL histwrite_phy(nid_hf_cosp,lCOSP,"parasol_crefl", &
41     itau_wcosp,parasolcrefl)
42           CALL histwrite_phy(nid_hf_cosp,lCOSP,"Ncrefl", &
43     itau_wcosp,Ncref)
44         endif
45         if (cfg%Latb532) then
46           do ii=1,Ncolumns
47            CALL histwrite_phy(nid_hf_cosp,lCOSP,"atb532_"//chcol(ii), &
48     itau_wcosp,sglidar%beta_tot(:,ii,:))
49           enddo
50         endif
51         if (cfg%Lbeta_mol532) then
52           CALL histwrite_phy(nid_hf_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
98          CALL histwrite_phy(nid_hf_cosp,lCOSP,"sunlit", &
99                        itau_wcosp,gbx%sunlit)
100          if (cfg%Lclisccp2) then
101            do ii=1,7
102              CALL histwrite_phy(nid_hf_cosp,lCOSP, &
103     "clisccp2_"//chcol(ii),itau_wcosp,isccp%fq_isccp(:,ii,:))
104            enddo
105          endif
106          if (cfg%Lboxtauisccp) then
107             CALL histwrite_phy(nid_hf_cosp,lCOSP,"boxtauisccp", &
108     itau_wcosp,isccp%boxtau)
109          endif
110          if (cfg%Lboxptopisccp) then
111             CALL histwrite_phy(nid_hf_cosp,lCOSP,"boxptopisccp", &
112     itau_wcosp,isccp%boxptop)
113          endif
114          if (cfg%Ltclisccp) then
115             CALL histwrite_phy(nid_hf_cosp,lCOSP,"tclisccp", &
116     itau_wcosp,isccp%totalcldarea)
117          endif
118          if (cfg%Lctpisccp) then
119             CALL histwrite_phy(nid_hf_cosp,lCOSP,"ctpisccp", &
120     itau_wcosp,isccp%meanptop)
121
122          endif
123          if (cfg%Ltauisccp) then
124             CALL histwrite_phy(nid_hf_cosp,lCOSP,"tauisccp", &
125     itau_wcosp,isccp%meantaucld)
126          endif
127          if (cfg%Lalbisccp) then
128             CALL histwrite_phy(nid_hf_cosp,lCOSP,"albisccp", &
129     itau_wcosp,isccp%meanalbedocld)
130          endif
131          if (cfg%Lmeantbisccp) then
132             CALL histwrite_phy(nid_hf_cosp,lCOSP,"meantbisccp", &
133     itau_wcosp,isccp%meantb)
134          endif
135          if (cfg%Lmeantbclrisccp) then
136             CALL histwrite_phy(nid_hf_cosp,lCOSP,"meantbclrisccp", &
137     itau_wcosp,isccp%meantbclr)
138          endif
139        endif ! Isccp
140
141!       if (ok_sync) then
142!$OMP MASTER
143        call histsync(nid_hf_cosp)
144!$OMP END MASTER     
145!       endif
146
147      ENDIF ! if freq_COSP
Note: See TracBrowser for help on using the repository browser.