source: LMDZ4/branches/LMDZ4_AR5/libf/cosp/write_histmthCOSP.h @ 2787

Last change on this file since 2787 was 1928, checked in by idelkadi, 11 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
RevLine 
[1262]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
[1535]12          CALL histwrite_phy(nid_mth_cosp,lCOSP,"cllcalipso",itau_wcosp, &
13     stlidar%cldlayer(:,1))
[1262]14         endif
15         if (cfg%Lclhcalipso) then
[1535]16          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clhcalipso",itau_wcosp, &
17     stlidar%cldlayer(:,3))
[1262]18         endif
19         if (cfg%Lclmcalipso) then
[1535]20          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clmcalipso",itau_wcosp, &
21     stlidar%cldlayer(:,2))
[1262]22         endif
23         if (cfg%Lcltcalipso) then
[1535]24          CALL histwrite_phy(nid_mth_cosp,lCOSP,"cltcalipso",itau_wcosp, &
25     stlidar%cldlayer(:,4)) 
[1262]26         endif
27         if (cfg%Lclcalipso) then
[1535]28          CALL histwrite_phy(nid_mth_cosp,lCOSP,"clcalipso",itau_wcosp, &
29     stlidar%lidarcld)
[1262]30         endif
31         if (cfg%Lcfad_lidarsr532) then
32           do ii=1,SR_BINS
[1535]33            CALL histwrite_phy(nid_mth_cosp,lCOSP, &
34     "cfad_lidarsr532_"//chcol(ii),itau_wcosp,stlidar%cfad_sr(:,ii,:))
[1262]35           enddo
36         endif
37         if (cfg%Lparasol_refl) then
[1535]38           CALL histwrite_phy(nid_mth_cosp,lCOSP,"parasol_refl", &
39     itau_wcosp,stlidar%parasolrefl)
[1928]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)
[1262]44         endif
45         if (cfg%Latb532) then
46           do ii=1,Ncolumns
[1535]47            CALL histwrite_phy(nid_mth_cosp,lCOSP, &
48     "atb532_"//chcol(ii),itau_wcosp,sglidar%beta_tot(:,ii,:))
[1262]49           enddo
50         endif
51         if (cfg%Lbeta_mol532) then
[1535]52           CALL histwrite_phy(nid_mth_cosp,lCOSP,"beta_mol532", &
53     itau_wcosp,sglidar%beta_mol)
[1262]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
[1928]97       CALL histwrite_phy(nid_mth_cosp,lCOSP,"sunlit",itau_wcosp,gbx%sunlit)
[1262]98          if (cfg%Lclisccp2) then
99            do ii=1,7
[1535]100              CALL histwrite_phy(nid_mth_cosp,lCOSP,"clisccp2_"//chcol(ii), &
101     itau_wcosp,isccp%fq_isccp(:,ii,:))
[1262]102            enddo
103          endif
104          if (cfg%Lboxtauisccp) then
[1535]105             CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxtauisccp", &
106     itau_wcosp,isccp%boxtau)
[1262]107          endif
108          if (cfg%Lboxptopisccp) then
[1535]109             CALL histwrite_phy(nid_mth_cosp,lCOSP,"boxptopisccp", &
110     itau_wcosp,isccp%boxptop)
[1262]111          endif
112          if (cfg%Ltclisccp) then
[1535]113             CALL histwrite_phy(nid_mth_cosp,lCOSP,"tclisccp", &
114     itau_wcosp,isccp%totalcldarea)
[1262]115          endif
116          if (cfg%Lctpisccp) then
[1535]117             CALL histwrite_phy(nid_mth_cosp,lCOSP,"ctpisccp", &
118     itau_wcosp,isccp%meanptop)
[1262]119          endif
120          if (cfg%Ltauisccp) then
[1535]121             CALL histwrite_phy(nid_mth_cosp,lCOSP,"tauisccp", &
122     itau_wcosp,isccp%meantaucld)
[1262]123          endif
124          if (cfg%Lalbisccp) then
[1535]125             CALL histwrite_phy(nid_mth_cosp,lCOSP,"albisccp", &
126     itau_wcosp,isccp%meanalbedocld)
[1262]127          endif
128          if (cfg%Lmeantbisccp) then
[1535]129             CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbisccp", &
130     itau_wcosp,isccp%meantb)
[1262]131          endif
132          if (cfg%Lmeantbclrisccp) then
[1535]133             CALL histwrite_phy(nid_mth_cosp,lCOSP,"meantbclrisccp", &
134     itau_wcosp,isccp%meantbclr)
[1262]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
Note: See TracBrowser for help on using the repository browser.