source: trunk/LMDZ.VENUS/libf/phyvenus/write_histins.h @ 3567

Last change on this file since 3567 was 2560, checked in by slebonnois, 3 years ago

SL: Implementation of SW computation based on generic model. Switch between this new SW module or old module that reads R. Haus tables implemented with a key (solarchoice)

File size: 6.5 KB
Line 
1!
2! $Header: /home/cvsroot/LMDZ4/libf/phylmd/write_histins.h,v 1.1.1.1 2004/05/19 12:53:09 lmdzadmin Exp $
3!
4      IF (ok_instan) THEN
5
6         itau_w = itau_phy + itap
7
8c-------------------------------------------------------
9      IF(lev_histins.GE.1) THEN
10
11ccccccccccccc 2D fields, basics
12
13      call histwrite_phy(nid_ins,.false.,"phis",itau_w,pphis)
14c      call histwrite_phy(nid_ins,.false.,"aire",itau_w,cell_area)
15      cell_area_out(:)=cell_area(:)
16      if (is_north_pole_phy) cell_area_out(1)=cell_area(1)/nbp_lon
17      if (is_south_pole_phy) cell_area_out(klon)=cell_area(klon)/nbp_lon
18      call histwrite_phy(nid_ins,.false.,"aire",itau_w,cell_area_out)
19
20      call histwrite_phy(nid_ins,.false.,"tsol",itau_w,ftsol)
21      call histwrite_phy(nid_ins,.false.,"psol",itau_w,paprs(:,1))
22c     call histwrite_phy(nid_ins,.false.,"ue",itau_w,ue)
23c VENUS: regardee a l' envers!!!!!!!!!!!!!!!
24c     call histwrite_phy(nid_ins,.false.,"ve",itau_w,-1.*ve)
25c     call histwrite_phy(nid_ins,.false.,"cdragh",itau_w,cdragh)
26c     call histwrite_phy(nid_ins,.false.,"cdragm",itau_w,cdragm)
27
28      ENDIF !lev_histins.GE.1
29
30c-------------------------------------------------------
31      IF(lev_histins.GE.2) THEN
32
33ccccccccccccc 3D fields, basics
34
35      call histwrite_phy(nid_ins,.false.,"temp",itau_w,t_seri)
36      call histwrite_phy(nid_ins,.false.,"pres",itau_w,pplay)
37      call histwrite_phy(nid_ins,.false.,"geop",itau_w,zphi)
38      call histwrite_phy(nid_ins,.false.,"vitu",itau_w,u_seri)
39c VENUS: regardee a l' envers !!!!!!!!!!!!!!!
40      call histwrite_phy(nid_ins,.false.,"vitv",itau_w,-1.*v_seri)
41      call histwrite_phy(nid_ins,.false.,"vitw",itau_w,omega)
42c en (m/s)/s     
43      call histwrite_phy(nid_ins,.false.,"dudyn",itau_w,d_u_dyn)
44c en (m/s)/s     
45      call histwrite_phy(nid_ins,.false.,"duvdf",itau_w,d_u_vdf)
46c     call histwrite_phy(nid_ins,.false.,"mang",itau_w,mang)
47c     call histwrite_phy(nid_ins,.false.,"Kz",itau_w,ycoefh)
48c     call histwrite_phy(nid_ins,.false.,"mmean",itau_w,mmean)
49c     call histwrite_phy(nid_ins,.false.,"rho",itau_w,rho)
50
51c plusieurs traceurs  !!!outputs in [vmr]
52       IF (iflag_trac.eq.1) THEN
53         DO iq=1,nqmax
54       call histwrite_phy(nid_ins,.false.,tname(iq),itau_w,qx(:,:,iq)*
55     &                    mmean(:,:)/M_tr(iq))
56         ENDDO
57       ENDIF
58
59       IF (callthermos .and. ok_chem) THEN
60       call histwrite_phy(nid_ins,.false.,"d_qmoldifCO2",itau_w,
61     .                 d_q_moldif(:,:,i_co2))
62       call histwrite_phy(nid_ins,.false.,"d_qmoldifO3p",itau_w,
63     .                  d_q_moldif(:,:,i_o))
64       call histwrite_phy(nid_ins,.false.,"d_qmoldifN2",itau_w,
65     .                  d_q_moldif(:,:,i_n2))
66       ENDIF
67     
68       call histwrite_phy(nid_ins,.false.,"tops",itau_w,topsw)
69     
70       IF (ok_cloud.and.(cl_scheme.eq.1)) THEN
71       
72       IF (nb_mode.GE.1) THEN
73      call histwrite_phy(nid_ins,.false.,"NBRTOTm1",itau_w,
74     & NBRTOT(:,:,1))
75     
76c      call histwrite_phy(nid_ins,.false.,"R_MEDIANm1",itau_w,
77c     & R_MEDIAN(:,:,1))
78     
79c      call histwrite_phy(nid_ins,.false.,"STDDEVm1",itau_w,
80c     & STDDEV(:,:,1))
81       
82       IF (nb_mode.GE.2) THEN
83      call histwrite_phy(nid_ins,.false.,"NBRTOTm2",itau_w,
84     & NBRTOT(:,:,2))
85     
86c      call histwrite_phy(nid_ins,.false.,"R_MEDIANm2",itau_w,
87c     & R_MEDIAN(:,:,2)) 
88     
89c      call histwrite_phy(nid_ins,.false.,"STDDEVm2",itau_w,
90c     & STDDEV(:,:,2))
91         
92       IF (nb_mode.GE.3) THEN
93      call histwrite_phy(nid_ins,.false.,"NBRTOTm3",itau_w,
94     & NBRTOT(:,:,3))
95     
96c      call histwrite_phy(nid_ins,.false.,"R_MEDIANm3",itau_w,
97c     & R_MEDIAN(:,:,3))
98     
99c      call histwrite_phy(nid_ins,.false.,"STDDEVm3",itau_w,
100c     & STDDEV(:,:,3))
101
102       ENDIF
103       ENDIF
104       ENDIF
105             
106c     call histwrite_phy(nid_ins,.false.,"WH2SO4",itau_w,WH2SO4)
107     
108c     call histwrite_phy(nid_ins,.false.,"rho_droplet",itau_w,
109c    & rho_droplet)
110                ENDIF
111
112       IF (ok_sedim.and.(cl_scheme.eq.1)) THEN
113     
114      call histwrite_phy(nid_ins,.false.,"d_tr_sed_H2SO4",itau_w,
115     & d_tr_sed(:,:,1))     
116      call histwrite_phy(nid_ins,.false.,"d_tr_sed_H2O",itau_w,
117     & d_tr_sed(:,:,2))
118     
119      call histwrite_phy(nid_ins,.false.,"F_sedim",itau_w,Fsedim)
120                ENDIF             
121
122      ENDIF !lev_histins.GE.2
123
124c-------------------------------------------------------
125      IF(lev_histins.GE.3) THEN
126
127cccccccccccccccccc  Radiative transfer
128
129c 2D
130
131      call histwrite_phy(nid_ins,.false.,"topl",itau_w,toplw)
132      call histwrite_phy(nid_ins,.false.,"sols",itau_w,solsw)
133      call histwrite_phy(nid_ins,.false.,"soll",itau_w,sollw)
134
135c 3D
136
137      call histwrite_phy(nid_ins,.false.,"SWnet",itau_w,swnet)
138      call histwrite_phy(nid_ins,.false.,"LWnet",itau_w,lwnet)
139c     call histwrite_phy(nid_ins,.false.,"fluxvdf",itau_w,fluxt)
140c     call histwrite_phy(nid_ins,.false.,"fluxdyn",itau_w,flux_dyn)
141c     call histwrite_phy(nid_ins,.false.,"fluxajs",itau_w,flux_ajs)
142c     call histwrite_phy(nid_ins,.false.,"fluxec",itau_w,flux_ec)
143
144      ENDIF !lev_histins.GE.3
145
146c-------------------------------------------------------
147      IF(lev_histins.GE.4) THEN
148
149c en K/s     
150      call histwrite_phy(nid_ins,.false.,"dtdyn",itau_w,d_t_dyn)
151c en K/s     
152c     call histwrite_phy(nid_ins,.false.,"dtphy",itau_w,d_t)
153c en K/s     
154      call histwrite_phy(nid_ins,.false.,"dtvdf",itau_w,d_t_vdf)
155c en K/s     
156      call histwrite_phy(nid_ins,.false.,"dtajs",itau_w,d_t_ajs)
157c K/day ==> K/s
158      call histwrite_phy(nid_ins,.false.,"dtswr",itau_w,heat/RDAY)
159c K/day ==> K/s     
160      call histwrite_phy(nid_ins,.false.,"dtlwr",itau_w,-1.*cool/RDAY)
161c en K/s     
162c     call histwrite_phy(nid_ins,.false.,"dtec",itau_w,d_t_ec)
163c en (m/s)/s     
164      call histwrite_phy(nid_ins,.false.,"duajs",itau_w,d_u_ajs)
165c en (m/s)/s     
166      call histwrite_phy(nid_ins,.false.,"dugwo",itau_w,d_u_oro)
167c en (m/s)/s     
168      call histwrite_phy(nid_ins,.false.,"dugwno",itau_w,d_u_hin)
169c en (m/s)/s     
170c VENUS: regardee a l envers!!!!!!!!!!!!!!!
171c     call histwrite_phy(nid_ins,.false.,"dvvdf",itau_w,-1.*d_v_vdf)
172
173      ENDIF !lev_histins.GE.4
174
175c-------------------------------------------------------
176      IF(lev_histins.GE.5) THEN
177
178c     call histwrite_phy(nid_ins,.false.,"taux_",itau_w,fluxu)
179c     call histwrite_phy(nid_ins,.false.,"tauy_",itau_w,fluxv)
180c     call histwrite_phy(nid_ins,.false.,"cdrm",itau_w,cdragm)
181c     call histwrite_phy(nid_ins,.false.,"cdrh",itau_w,cdragh)
182
183      ENDIF !lev_histins.GE.5
184c-------------------------------------------------------
185
186      if (ok_sync) then
187        call histsync(nid_ins)
188      endif
189
190      ENDIF
Note: See TracBrowser for help on using the repository browser.