Changeset 3247 for LMDZ6/trunk/libf/phylmd/cosp
- Timestamp:
- Mar 12, 2018, 9:52:27 AM (7 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd/cosp
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/cosp/cosp_output_mod.F90
r3241 r3247 255 255 real :: zjulian,zjulian_start 256 256 real,dimension(Ncolumns) :: column_ax 257 real,dimension(2,SR_BINS) :: sratio_bounds258 real,dimension(SR_BINS) :: sratio_ax259 257 real,dimension(DBZE_BINS) :: dbze_ax 260 258 CHARACTER(LEN=20), DIMENSION(3) :: chfreq = (/ '1day', '1d ', '3h ' /) 259 real,parameter,dimension(SR_BINS) :: sratio_ax = (/0.005, & 260 0.605,2.09,4.,6., & 261 8.5,12.5,17.5,22.5,27.5,35.,45.,55.,70.,50040./) 261 262 262 263 !!! Variables d'entree … … 283 284 enddo 284 285 285 286 sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper287 ! limits from lmd_ipsl_stats.f90288 sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)289 sratio_bounds(1,1) = 0.0290 sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR,291 ! ! 2009. However, it is not consistent292 ! with the upper limit in293 ! lmd_ipsl_stats.f90, which is294 ! LIDAR_UNDEF-1=998.999295 sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0296 297 286 cosp_outfilenames(1) = 'histmthCOSP' 298 287 cosp_outfilenames(2) = 'histdayCOSP' -
LMDZ6/trunk/libf/phylmd/cosp/cosp_output_write_mod.F90
r3241 r3247 118 118 119 119 ! print*,'Appel histwrite2d_cosp' 120 CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1))121 CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3))122 CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2))123 CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4))124 CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert)125 CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp)126 127 CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1))128 CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1))129 CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1))130 CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1))131 CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert)132 CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp)133 134 CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2))135 CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2))136 CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2))137 CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2))138 CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert)139 CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp)140 141 CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3))142 CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3))143 CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3))144 CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3))145 CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert)146 CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp)147 148 CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1)) !OPAQ149 CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2)) !OPAQ150 CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3)) !OPAQ151 152 CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert) !OPAQ153 CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert) !OPAQ154 CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ155 CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ156 157 CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO158 159 #ifdef CPP_XIOS 160 CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr)161 CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO120 if (cfg%Lcllcalipso) CALL histwrite2d_cosp(o_cllcalipso,stlidar%cldlayer(:,1)) 121 if (cfg%Lclhcalipso) CALL histwrite2d_cosp(o_clhcalipso,stlidar%cldlayer(:,3)) 122 if (cfg%Lclmcalipso) CALL histwrite2d_cosp(o_clmcalipso,stlidar%cldlayer(:,2)) 123 if (cfg%Lcltcalipso) CALL histwrite2d_cosp(o_cltcalipso,stlidar%cldlayer(:,4)) 124 if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso,stlidar%lidarcld,nvert) 125 if (cfg%Lclcalipsotmp) CALL histwrite3d_cosp(o_clcalipsotmp,stlidar%lidarcldtmp(:,:,1),nverttemp) 126 127 if (cfg%Lcllcalipsoice) CALL histwrite2d_cosp(o_cllcalipsoice,stlidar%cldlayerphase(:,1,1)) 128 if (cfg%Lclhcalipsoice) CALL histwrite2d_cosp(o_clhcalipsoice,stlidar%cldlayerphase(:,3,1)) 129 if (cfg%Lclmcalipsoice) CALL histwrite2d_cosp(o_clmcalipsoice,stlidar%cldlayerphase(:,2,1)) 130 if (cfg%Lcltcalipsoice) CALL histwrite2d_cosp(o_cltcalipsoice,stlidar%cldlayerphase(:,4,1)) 131 if (cfg%Lclcalipsoice) CALL histwrite3d_cosp(o_clcalipsoice,stlidar%lidarcldphase(:,:,1),nvert) 132 if (cfg%Lclcalipsotmpice) CALL histwrite3d_cosp(o_clcalipsotmpice,stlidar%lidarcldtmp(:,:,2),nverttemp) 133 134 if (cfg%Lcllcalipsoliq) CALL histwrite2d_cosp(o_cllcalipsoliq,stlidar%cldlayerphase(:,1,2)) 135 if (cfg%Lclhcalipsoliq) CALL histwrite2d_cosp(o_clhcalipsoliq,stlidar%cldlayerphase(:,3,2)) 136 if (cfg%Lclmcalipsoliq) CALL histwrite2d_cosp(o_clmcalipsoliq,stlidar%cldlayerphase(:,2,2)) 137 if (cfg%Lcltcalipsoliq) CALL histwrite2d_cosp(o_cltcalipsoliq,stlidar%cldlayerphase(:,4,2)) 138 if (cfg%Lclcalipsoliq) CALL histwrite3d_cosp(o_clcalipsoliq,stlidar%lidarcldphase(:,:,2),nvert) 139 if (cfg%Lclcalipsotmpliq) CALL histwrite3d_cosp(o_clcalipsotmpliq,stlidar%lidarcldtmp(:,:,3),nverttemp) 140 141 if (cfg%Lcllcalipsoun) CALL histwrite2d_cosp(o_cllcalipsoun,stlidar%cldlayerphase(:,1,3)) 142 if (cfg%Lclhcalipsoun) CALL histwrite2d_cosp(o_clhcalipsoun,stlidar%cldlayerphase(:,3,3)) 143 if (cfg%Lclmcalipsoun) CALL histwrite2d_cosp(o_clmcalipsoun,stlidar%cldlayerphase(:,2,3)) 144 if (cfg%Lcltcalipsoun) CALL histwrite2d_cosp(o_cltcalipsoun,stlidar%cldlayerphase(:,4,3)) 145 if (cfg%Lclcalipsoun) CALL histwrite3d_cosp(o_clcalipsoun,stlidar%lidarcldphase(:,:,3),nvert) 146 if (cfg%Lclcalipsotmpun) CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp) 147 148 if (cfg%Lclopaquecalipso) CALL histwrite2d_cosp(o_clopaquecalipso,stlidar%cldtype(:,1)) !OPAQ 149 if (cfg%Lclthincalipso) CALL histwrite2d_cosp(o_clthincalipso,stlidar%cldtype(:,2)) !OPAQ 150 if (cfg%Lclzopaquecalipso) CALL histwrite2d_cosp(o_clzopaquecalipso,stlidar%cldtype(:,3)) !OPAQ 151 152 if (cfg%Lclcalipsoopaque) CALL histwrite3d_cosp(o_clcalipsoopaque,stlidar%lidarcldtype(:,:,1),nvert) !OPAQ 153 if (cfg%Lclcalipsothin) CALL histwrite3d_cosp(o_clcalipsothin,stlidar%lidarcldtype(:,:,2),nvert) !OPAQ 154 if (cfg%Lclcalipsozopaque) CALL histwrite3d_cosp(o_clcalipsozopaque,stlidar%lidarcldtype(:,:,3),nvert) !OPAQ 155 if (cfg%Lclcalipsoopacity) CALL histwrite3d_cosp(o_clcalipsoopacity,stlidar%lidarcldtype(:,:,4),nvert) !OPAQ 156 157 if (cfg%Lproftemp) CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO 158 159 #ifdef CPP_XIOS 160 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 161 if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 162 162 #else 163 do icl=1,SR_BINS 164 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 165 enddo 166 do icl=1,Ncolumns !TIBO 167 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 168 enddo !TIBO 169 #endif 170 CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 171 172 do k=1,PARASOL_NREFL 173 do ip=1, Npoints 174 if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then 175 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ & 176 stlidar%cldlayer(ip,4) 177 Ncref(ip,k) = 1. 178 else 179 parasolcrefl(ip,k)=missing_val 180 Ncref(ip,k) = 0. 181 endif 163 if (cfg%LcfadLidarsr532) then 164 do icl=1,SR_BINS 165 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 166 enddo 167 endif 168 if (cfg%LprofSR) then 169 do icl=1,Ncolumns !TIBO 170 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 171 enddo !TIBO 172 endif 173 #endif 174 if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 175 176 if (cfg%LparasolRefl) then 177 do k=1,PARASOL_NREFL 178 do ip=1, Npoints 179 if (stlidar%cldlayer(ip,4).gt.0.01.and.stlidar%parasolrefl(ip,k).ne.missing_val) then 180 parasolcrefl(ip,k)=(stlidar%parasolrefl(ip,k)-0.03*(1.-stlidar%cldlayer(ip,4)))/ & 181 stlidar%cldlayer(ip,4) 182 Ncref(ip,k) = 1. 183 else 184 parasolcrefl(ip,k)=missing_val 185 Ncref(ip,k) = 0. 186 endif 187 enddo 182 188 enddo 183 184 enddo 185 CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp) 186 CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp) 187 188 #ifdef CPP_XIOS 189 CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 189 CALL histwrite3d_cosp(o_Ncrefl,Ncref,nvertp) 190 CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp) 191 endif 192 193 #ifdef CPP_XIOS 194 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 190 195 #else 191 do icl=1,Ncolumns 192 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 193 enddo 194 #endif 195 196 CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) 196 if (cfg%Latb532) then 197 do icl=1,Ncolumns 198 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 199 enddo 200 endif 201 #endif 202 203 if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) 204 197 205 endif !Lidar 198 206 … … 202 210 where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val 203 211 #ifdef CPP_XIOS 204 CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot)205 CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze)212 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 213 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 206 214 #else 207 do icl=1,Ncolumns 208 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvertmcosp,icl) 209 enddo 210 do icl=1,DBZE_BINS 215 if (cfg%Ldbze94) then 216 do icl=1,Ncolumns 217 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl) 218 enddo 219 endif 220 if (cfg%LcfadDbze94) then 221 do icl=1,DBZE_BINS 211 222 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 212 enddo 223 enddo 224 endif 213 225 #endif 214 226 endif 227 ! endif pour radar 215 228 216 229 !!! Sorties combinees Cloudsat et Calipso … … 218 231 where(stradar%lidar_only_freq_cloud == R_UNDEF) & 219 232 stradar%lidar_only_freq_cloud = missing_val 220 CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert)233 if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert) 221 234 where(stradar%radar_lidar_tcc == R_UNDEF) & 222 235 stradar%radar_lidar_tcc = missing_val 223 CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc)236 if (cfg%Lcltlidarradar) CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc) 224 237 endif 225 238 … … 238 251 CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 239 252 #ifdef CPP_XIOS 240 CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)253 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp) 241 254 #else 242 do icl=1,7 243 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 244 enddo 245 #endif 246 CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) 247 CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol) 248 CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea) 249 CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop) 250 CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld) 251 CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld) 252 CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb) 253 CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr) 255 if (cfg%Lclisccp) then 256 do icl=1,7 257 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 258 enddo 259 endif 260 #endif 261 262 if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) 263 if (cfg%Lboxptopisccp) CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol) 264 if (cfg%Lcltisccp) CALL histwrite2d_cosp(o_tclisccp,isccp%totalcldarea) 265 if (cfg%Lpctisccp) CALL histwrite2d_cosp(o_ctpisccp,isccp%meanptop) 266 if (cfg%Ltauisccp) CALL histwrite2d_cosp(o_tauisccp,isccp%meantaucld) 267 if (cfg%Lalbisccp) CALL histwrite2d_cosp(o_albisccp,isccp%meanalbedocld) 268 if (cfg%Lmeantbisccp) CALL histwrite2d_cosp(o_meantbisccp,isccp%meantb) 269 if (cfg%Lmeantbclrisccp) CALL histwrite2d_cosp(o_meantbclrisccp,isccp%meantbclr) 254 270 endif ! Isccp 255 271 … … 259 275 260 276 #ifdef CPP_XIOS 261 CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR)277 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 262 278 #else 263 do icl=1,7 279 if (cfg%LclMISR) then 280 do icl=1,7 264 281 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 265 enddo 282 enddo 283 endif 266 284 #endif 267 285 endif 286 ! endif pour Misr 268 287 269 288 !!! Modis simulator … … 298 317 modis%Ice_Water_Path_Mean = missing_val 299 318 300 319 where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) & 301 320 modis%Optical_Thickness_Total_LogMean = missing_val 302 321 303 322 where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) & 304 323 modis%Optical_Thickness_Water_LogMean = missing_val 305 324 306 325 where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) & 307 326 modis%Optical_Thickness_Ice_LogMean = missing_val 308 327 309 CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean)310 CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean)311 CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean)312 CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean)313 CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean)314 CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean)315 CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean)316 CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean)317 CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean)318 CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean)319 CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean)320 CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean)321 CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean)322 CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean)323 CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean)324 CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean)325 CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean)328 if (cfg%Lcllmodis) CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean) 329 if (cfg%Lclhmodis) CALL histwrite2d_cosp(o_clhmodis,modis%Cloud_Fraction_High_Mean) 330 if (cfg%Lclmmodis) CALL histwrite2d_cosp(o_clmmodis,modis%Cloud_Fraction_Mid_Mean) 331 if (cfg%Lcltmodis) CALL histwrite2d_cosp(o_cltmodis,modis%Cloud_Fraction_Total_Mean) 332 if (cfg%Lclwmodis) CALL histwrite2d_cosp(o_clwmodis,modis%Cloud_Fraction_Water_Mean) 333 if (cfg%Lclimodis) CALL histwrite2d_cosp(o_climodis,modis%Cloud_Fraction_Ice_Mean) 334 if (cfg%Ltautmodis) CALL histwrite2d_cosp(o_tautmodis,modis%Optical_Thickness_Total_Mean) 335 if (cfg%Ltauwmodis) CALL histwrite2d_cosp(o_tauwmodis,modis%Optical_Thickness_Water_Mean) 336 if (cfg%Ltauimodis) CALL histwrite2d_cosp(o_tauimodis,modis%Optical_Thickness_Ice_Mean) 337 if (cfg%Ltautlogmodis) CALL histwrite2d_cosp(o_tautlogmodis,modis%Optical_Thickness_Total_LogMean) 338 if (cfg%Ltauwlogmodis) CALL histwrite2d_cosp(o_tauwlogmodis,modis%Optical_Thickness_Water_LogMean) 339 if (cfg%Ltauilogmodis) CALL histwrite2d_cosp(o_tauilogmodis,modis%Optical_Thickness_Ice_LogMean) 340 if (cfg%Lreffclwmodis) CALL histwrite2d_cosp(o_reffclwmodis,modis%Cloud_Particle_Size_Water_Mean) 341 if (cfg%Lreffclimodis) CALL histwrite2d_cosp(o_reffclimodis,modis%Cloud_Particle_Size_Ice_Mean) 342 if (cfg%Lpctmodis) CALL histwrite2d_cosp(o_pctmodis,modis%Cloud_Top_Pressure_Total_Mean) 343 if (cfg%Llwpmodis) CALL histwrite2d_cosp(o_lwpmodis,modis%Liquid_Water_Path_Mean) 344 if (cfg%Liwpmodis) CALL histwrite2d_cosp(o_iwpmodis,modis%Ice_Water_Path_Mean) 326 345 327 346 where(modis%Optical_Thickness_vs_Cloud_Top_Pressure == R_UNDEF) & … … 329 348 330 349 #ifdef CPP_XIOS 331 CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure)350 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 332 351 #else 352 if (cfg%Lclmodis) then 333 353 do icl=1,7 334 354 CALL histwrite3d_cosp(o_clmodis, & 335 355 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 336 356 enddo 357 endif 337 358 #endif 338 359 … … 344 365 345 366 #ifdef CPP_XIOS 346 347 367 if (cfg%Lcrimodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 368 if (cfg%Lcrlmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 348 369 #else 370 if (cfg%Lcrimodis) then 349 371 do icl=1,7 350 CALL histwrite3d_cosp(o_crimodis, & 351 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 352 CALL histwrite3d_cosp(o_crlmodis, & 353 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 372 CALL histwrite3d_cosp(o_crimodis, & 373 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 354 374 enddo 355 #endif 356 endif 375 endif 376 if (cfg%Lcrlmodis) then 377 do icl=1,7 378 CALL histwrite3d_cosp(o_crlmodis, & 379 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 380 enddo 381 endif 382 #endif 383 endif !modis 357 384 358 385 IF(.NOT.cosp_varsdefined) THEN … … 798 825 799 826 #ifdef CPP_XIOS 800 IF (ok_all_xml) THEN827 ! IF (ok_all_xml) THEN 801 828 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 802 829 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 803 ENDIF830 ! ENDIF 804 831 #endif 805 832 -
LMDZ6/trunk/libf/phylmd/cosp/phys_cosp.F90
r3233 r3247 87 87 USE xios, ONLY: xios_field_is_active 88 88 #endif 89 use cosp_read_otputkeys 89 90 90 91 IMPLICIT NONE … … 142 143 !$OMP THREADPRIVATE(first_write) 143 144 144 logical, save :: ok_readxiosactive_cosp=.false.145 !$OMP THREADPRIVATE(ok_readxiosactive_cosp)146 145 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Input variables from LMDZ-GCM 147 146 integer :: overlaplmdz ! overlap type: 1=max, 2=rand, 3=max/rand ! cosp input (output lmdz) … … 159 158 double precision,dimension(2) :: d_time_bnds 160 159 160 real,dimension(2,SR_BINS) :: sratio_bounds 161 real,dimension(SR_BINS) :: sratio_ax 162 161 163 namelist/COSP_INPUT/overlap,isccp_topheight,isccp_topheight_direction, & 162 164 npoints_it,ncolumns,use_vgrid,nlr,csat_vgrid, & … … 168 170 169 171 !---------------- End of declaration of variables -------------- 170 171 172 172 173 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ … … 181 182 CALL read_cosp_input 182 183 183 ! Clefs Outputs 184 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 184 ! Clefs Outputs initialisation 185 call cosp_outputkeys_init(cfg) 186 !!! call cosp_outputkeys_test(cfg) 187 print*,' Cles des differents simulateurs cosp a itap :',itap 188 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', & 189 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, & 190 cfg%Lrttov_sim,cfg%Lstats 185 191 186 192 if (overlaplmdz.ne.overlap) then … … 189 195 print*,'Fin lecture Namelists, debut_cosp =',debut_cosp 190 196 191 print*,' Cles des differents simulateurs cosp 1er appel Cosp :'192 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim', &193 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim,cfg%Lrttov_sim194 195 197 endif ! debut_cosp 196 198 197 !!! Ici on modifie les cles logiques selon les champs actives dans les .xml 199 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 200 if ((itap.gt.1).and.(first_write))then 198 201 #ifdef CPP_XIOS 199 if (ok_readxiosactive_cosp) then 200 if ((itap.gt.1).and.(first_write))then 201 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 202 first_write=.false. 202 call read_xiosfieldactive(cfg) 203 #else 204 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 205 #endif 206 first_write=.false. 207 208 print*,' Cles des differents simulateurs cosp a itap :',itap 209 print*,'Lradar_sim,Llidar_sim,Lisccp_sim,Lmisr_sim,Lmodis_sim,Lrttov_sim,Lstats', & 210 cfg%Lradar_sim,cfg%Llidar_sim,cfg%Lisccp_sim,cfg%Lmisr_sim,cfg%Lmodis_sim, & 211 cfg%Lrttov_sim,cfg%Lstats 203 212 endif 204 endif205 #endif206 207 213 208 214 time_bnds(1) = dtime-dtime/2. … … 212 218 d_dtime=dtime 213 219 214 215 ! print*,'Debut phys_cosp itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf ', &216 ! itap,dtime,freq_cosp,ecrit_mth,ecrit_day,ecrit_hf217 220 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 218 221 ! Allocate memory for gridbox type … … 221 224 ! print *, 'Allocating memory for gridbox type...' 222 225 223 !! AI224 ! call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, &225 ! Npoints,Nlevels,Ncolumns,N_HYDRO,Nprmts_max_hydro,Naero,Nprmts_max_aero,Npoints_it, &226 ! lidar_ice_type,isccp_topheight,isccp_topheight_direction,overlap,emsfc_lw, &227 ! use_precipitation_fluxes,use_reff, &228 ! Platform,Satellite,Instrument,Nchannels,ZenAng, &229 ! channels(1:Nchannels),surfem(1:Nchannels),co2,ch4,n2o,co,gbx)230 226 ! Surafce emissivity 231 227 emsfc_lw = 1. … … 347 343 348 344 !+++++++++++++ Open output files and define output files axis !+++++++++++++ 349 345 if (debut_cosp) then 350 346 351 347 !$OMP MASTER 352 print *, ' Open outpts files and define axis'348 ! print *, ' Open outpts files and define axis' 353 349 call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, & 354 350 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, & … … 357 353 !$OMP BARRIER 358 354 debut_cosp=.false. 359 endif ! debut_cosp 355 ! endif ! debut_cosp 356 else 360 357 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 361 358 ! Call simulator … … 370 367 !#endif 371 368 !! 372 373 369 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 374 370 … … 379 375 cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, & 380 376 isccp, misr, modis) 381 377 endif !debut_cosp 382 378 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 383 379 ! Deallocate memory in derived types 384 380 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 385 !print *, 'Deallocating memory...'381 print *, 'Deallocating memory...' 386 382 call free_cosp_gridbox(gbx) 387 383 call free_cosp_subgrid(sgx)
Note: See TracChangeset
for help on using the changeset viewer.