Changeset 2839 for LMDZ5/branches/testing/libf/phylmd/cosp
- Timestamp:
- Mar 30, 2017, 4:16:38 PM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2786,2788-2790,2792-2814,2816-2838
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_mod.F90
r2720 r2839 20 20 INTEGER, DIMENSION(3), SAVE :: nhoricosp,nvert,nvertmcosp,nvertcol,nvertbze, & 21 21 nvertsratio,nvertisccp,nvertp,nverttemp,nvertmisr, & 22 nvertReffIce,nvertReffLiq 22 nvertReffIce,nvertReffLiq,nverttau 23 23 REAL, DIMENSION(3), SAVE :: zoutm_cosp 24 24 !$OMP THREADPRIVATE(nhoricosp, nvert,nvertmcosp,nvertcol,nvertsratio,nvertbze,nvertisccp,nvertp,zoutm_cosp,nverttemp,nvertmisr) 25 !$OMP THREADPRIVATE(nvertReffIce,nvertReffLiq )25 !$OMP THREADPRIVATE(nvertReffIce,nvertReffLiq,nverttau) 26 26 REAL, SAVE :: zdtimemoy_cosp 27 27 !$OMP THREADPRIVATE(zdtimemoy_cosp) … … 207 207 SUBROUTINE cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, & 208 208 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, & 209 ecrit_mth, ecrit_day, ecrit_hf, use_vgrid, vgrid) 210 209 ecrit_mth, ecrit_day, ecrit_hf, use_vgrid, vgrid, stlidar) 211 210 212 211 USE iophy … … 229 228 logical :: ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, use_vgrid, ok_all_xml 230 229 type(cosp_vgrid) :: vgrid ! Information on vertical grid of stats 230 type(cosp_lidarstats) :: stlidar ! Summary statistics from lidar simulator 231 231 232 232 !!! Variables locales … … 236 236 real,dimension(2,SR_BINS) :: sratio_bounds 237 237 real,dimension(SR_BINS) :: sratio_ax 238 real,dimension(DBZE_BINS) :: dbze_ax 238 239 CHARACTER(LEN=20), DIMENSION(3) :: chfreq = (/ '1day', '1d ', '3h ' /) 239 240 … … 257 258 enddo 258 259 259 ! do ii=1,DBZE_BINS 260 ! dbze_ax(i) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(ii - 0.5) 261 ! enddo 262 263 ! sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper 260 do i=1,DBZE_BINS 261 dbze_ax(i) = CFAD_ZE_MIN + CFAD_ZE_WIDTH*(i - 0.5) 262 enddo 263 264 265 sratio_bounds(2,:)=stlidar%srbval(:) ! srbval contains the upper 264 266 ! limits from lmd_ipsl_stats.f90 265 !sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1)266 !sratio_bounds(1,1) = 0.0267 !sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR,267 sratio_bounds(1,2:SR_BINS) = stlidar%srbval(1:SR_BINS-1) 268 sratio_bounds(1,1) = 0.0 269 sratio_bounds(2,SR_BINS) = 1.e5 ! This matches with Chepfer et al., JGR, 268 270 ! ! 2009. However, it is not consistent 269 271 ! with the upper limit in 270 272 ! lmd_ipsl_stats.f90, which is 271 273 ! LIDAR_UNDEF-1=998.999 272 !sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0274 sratio_ax(:) = (sratio_bounds(1,:)+sratio_bounds(2,:))/2.0 273 275 274 276 cosp_outfilenames(1) = 'histmthCOSP' … … 331 333 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP) 332 334 CALL wxios_add_vaxis("cth16", MISR_N_CTH, MISR_CTH) 333 !CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax)334 !CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax)335 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax) 336 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax) 335 337 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters) 336 338 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters) 339 print*,'reffICE_binCenters=',reffICE_binCenters 340 CALL wxios_add_vaxis("tau", 7, ISCCP_TAU) 337 341 338 342 #endif … … 384 388 nvertReffLiq(iff)) 385 389 386 !CALL histvert(cosp_nidfiles(iff),"dbze","equivalent_reflectivity_factor","dBZ",DBZE_BINS,dbze_ax,nvertbze(iff))390 CALL histvert(cosp_nidfiles(iff),"dbze","equivalent_reflectivity_factor","dBZ",DBZE_BINS,dbze_ax,nvertbze(iff)) 387 391 388 ! CALL histvert(cosp_nidfiles(iff),"scatratio","backscattering_ratio","1",SR_BINS,sratio_ax,nvertsratio(iff)) 392 CALL histvert(cosp_nidfiles(iff),"scatratio","backscattering_ratio","1",SR_BINS,sratio_ax,nvertsratio(iff)) 393 394 CALL histvert(cosp_nidfiles(iff),"tau","cloud optical depth","1",7,ISCCP_TAU,nverttau(iff)) 389 395 390 396 !!! Valeur indefinie en cas IOIPSL -
LMDZ5/branches/testing/libf/phylmd/cosp/cosp_output_write_mod.F90
r2787 r2839 17 17 CONTAINS 18 18 19 SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, &19 SUBROUTINE cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, missing_cosp, & 20 20 cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, & 21 21 isccp, misr, modis) … … 32 32 !!! Variables d'entree 33 33 integer :: itap, Nlevlmdz, Ncolumns, Npoints 34 real :: freq_COSP, dtime 34 real :: freq_COSP, dtime, missing_val, missing_cosp 35 35 type(cosp_config) :: cfg ! Control outputs 36 36 type(cosp_gridbox) :: gbx ! Gridbox information. Input for COSP … … 49 49 integer :: itau_wcosp 50 50 real, dimension(Npoints,PARASOL_NREFL) :: parasolcrefl, Ncref 51 52 53 #ifdef CPP_XIOS 54 missing_val=missing_cosp 55 #else 56 missing_val=0. 57 #endif 51 58 52 59 Nlevout = vgrid%Nlvgrid … … 95 102 do ip = 1,Npoints 96 103 if(stlidar%lidarcld(ip,k).eq.R_UNDEF)then 97 stlidar%lidarcld(ip,k)= Cosp_fill_value104 stlidar%lidarcld(ip,k)=missing_val 98 105 endif 99 106 enddo … … 102 109 do ip = 1,Npoints 103 110 if(stlidar%cfad_sr(ip,ii,k).eq.R_UNDEF)then 104 stlidar%cfad_sr(ip,ii,k)= Cosp_fill_value111 stlidar%cfad_sr(ip,ii,k)=missing_val 105 112 endif 106 113 enddo … … 111 118 do k = 1,Nlevlmdz 112 119 if(sglidar%beta_mol(ip,k).eq.R_UNDEF)then 113 sglidar%beta_mol(ip,k)= Cosp_fill_value120 sglidar%beta_mol(ip,k)=missing_val 114 121 endif 115 122 116 123 do ii= 1,Ncolumns 117 124 if(sglidar%beta_tot(ip,ii,k).eq.R_UNDEF)then 118 sglidar%beta_tot(ip,ii,k)= Cosp_fill_value125 sglidar%beta_tot(ip,ii,k)=missing_val 119 126 endif 120 127 enddo … … 126 133 do ip = 1,Npoints 127 134 if(stlidar%cldlayer(ip,k).eq.R_UNDEF)then 128 stlidar%cldlayer(ip,k)=Cosp_fill_value135 stlidar%cldlayer(ip,k)=missing_val 129 136 endif 130 137 enddo … … 133 140 ! AI 11 / 2015 134 141 135 where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = 0.0136 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = 0.0137 where(stlidar%cldlayerphase == R_UNDEF) stlidar%cldlayerphase = 0.0138 where(stlidar%lidarcldphase == R_UNDEF) stlidar%lidarcldphase = 0.0139 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = 0.0142 where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = missing_val 143 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val 144 where(stlidar%cldlayerphase == R_UNDEF) stlidar%cldlayerphase = missing_val 145 where(stlidar%lidarcldphase == R_UNDEF) stlidar%lidarcldphase = missing_val 146 where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val 140 147 141 148 … … 169 176 CALL histwrite3d_cosp(o_clcalipsotmpun,stlidar%lidarcldtmp(:,:,4),nverttemp) 170 177 178 #ifdef CPP_XIOS 179 CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 180 #else 171 181 do icl=1,SR_BINS 172 182 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 173 183 enddo 174 175 CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 184 CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 185 #endif 176 186 177 187 do k=1,PARASOL_NREFL … … 182 192 Ncref(ip,k) = 1. 183 193 else 184 parasolcrefl(ip,k)= 0.194 parasolcrefl(ip,k)=missing_val 185 195 Ncref(ip,k) = 0. 186 196 endif … … 190 200 CALL histwrite3d_cosp(o_parasol_crefl,parasolcrefl,nvertp) 191 201 202 #ifdef CPP_XIOS 203 CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 204 #else 192 205 do icl=1,Ncolumns 193 206 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 194 207 enddo 208 #endif 209 195 210 CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) 196 211 endif !Lidar 197 212 198 213 if (cfg%Lradar_sim) then 214 215 #ifdef CPP_XIOS 216 CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 217 CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 218 #else 199 219 do icl=1,Ncolumns 200 220 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvertmcosp,icl) … … 203 223 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 204 224 enddo 225 #endif 205 226 endif 206 227 207 228 if (cfg%Llidar_sim .and. cfg%Lradar_sim) then 208 229 where(stradar%lidar_only_freq_cloud == R_UNDEF) & 209 stradar%lidar_only_freq_cloud = 0.0230 stradar%lidar_only_freq_cloud = missing_val 210 231 CALL histwrite3d_cosp(o_clcalipso2,stradar%lidar_only_freq_cloud,nvert) 211 232 where(stradar%radar_lidar_tcc == R_UNDEF) & 212 stradar%radar_lidar_tcc = 0.0233 stradar%radar_lidar_tcc = missing_val 213 234 CALL histwrite2d_cosp(o_cltlidarradar,stradar%radar_lidar_tcc) 214 235 endif … … 219 240 do ip = 1,Npoints 220 241 if(isccp%totalcldarea(ip).eq.R_UNDEF)then 221 isccp%totalcldarea(ip)= Cosp_fill_value242 isccp%totalcldarea(ip)=missing_val 222 243 endif 223 244 if(isccp%meanptop(ip).eq.R_UNDEF)then 224 isccp%meanptop(ip)= Cosp_fill_value245 isccp%meanptop(ip)=missing_val 225 246 endif 226 247 if(isccp%meantaucld(ip).eq.R_UNDEF)then 227 isccp%meantaucld(ip)= Cosp_fill_value248 isccp%meantaucld(ip)=missing_val 228 249 endif 229 250 if(isccp%meanalbedocld(ip).eq.R_UNDEF)then 230 isccp%meanalbedocld(ip)=Cosp_fill_value251 isccp%meanalbedocld(ip)=missing_val 231 252 endif 232 253 if(isccp%meantb(ip).eq.R_UNDEF)then 233 isccp%meantb(ip)=Cosp_fill_value254 isccp%meantb(ip)=missing_val 234 255 endif 235 256 if(isccp%meantbclr(ip).eq.R_UNDEF)then 236 isccp%meantbclr(ip)=Cosp_fill_value257 isccp%meantbclr(ip)=missing_val 237 258 endif 238 259 … … 240 261 do ii=1,7 241 262 if(isccp%fq_isccp(ip,ii,k).eq.R_UNDEF)then 242 isccp%fq_isccp(ip,ii,k)= Cosp_fill_value263 isccp%fq_isccp(ip,ii,k)=missing_val 243 264 endif 244 265 enddo … … 247 268 do ii=1,Ncolumns 248 269 if(isccp%boxtau(ip,ii).eq.R_UNDEF)then 249 isccp%boxtau(ip,ii)= Cosp_fill_value270 isccp%boxtau(ip,ii)=missing_val 250 271 endif 251 272 enddo … … 253 274 do ii=1,Ncolumns 254 275 if(isccp%boxptop(ip,ii).eq.R_UNDEF)then 255 isccp%boxptop(ip,ii)=Cosp_fill_value276 isccp%boxptop(ip,ii)=missing_val 256 277 endif 257 278 enddo … … 259 280 260 281 CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 282 #ifdef CPP_XIOS 283 CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp) 284 #else 261 285 do icl=1,7 262 286 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 263 287 enddo 288 #endif 264 289 CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) 265 290 CALL histwrite3d_cosp(o_boxptopisccp,isccp%boxptop,nvertcol) … … 278 303 do k=1,MISR_N_CTH 279 304 if(misr%fq_MISR(ip,ii,k).eq.R_UNDEF)then 280 misr%fq_MISR(ip,ii,k)=Cosp_fill_value305 misr%fq_MISR(ip,ii,k)=missing_val 281 306 endif 282 307 enddo … … 284 309 enddo 285 310 311 #ifdef CPP_XIOS 312 CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 313 #else 286 314 do icl=1,7 287 315 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 288 316 enddo 317 #endif 289 318 endif 290 319 … … 294 323 do ip=1,Npoints 295 324 if(modis%Cloud_Fraction_Low_Mean(ip).eq.R_UNDEF)then 296 modis%Cloud_Fraction_Low_Mean(ip)=Cosp_fill_value325 modis%Cloud_Fraction_Low_Mean(ip)=missing_val 297 326 endif 298 327 if(modis%Cloud_Fraction_High_Mean(ip).eq.R_UNDEF)then 299 modis%Cloud_Fraction_High_Mean(ip)= Cosp_fill_value328 modis%Cloud_Fraction_High_Mean(ip)=missing_val 300 329 endif 301 330 if(modis%Cloud_Fraction_Mid_Mean(ip).eq.R_UNDEF)then 302 modis%Cloud_Fraction_Mid_Mean(ip)= Cosp_fill_value331 modis%Cloud_Fraction_Mid_Mean(ip)=missing_val 303 332 endif 304 333 if(modis%Cloud_Fraction_Total_Mean(ip).eq.R_UNDEF)then 305 modis%Cloud_Fraction_Total_Mean(ip)= Cosp_fill_value334 modis%Cloud_Fraction_Total_Mean(ip)=missing_val 306 335 endif 307 336 if(modis%Cloud_Fraction_Water_Mean(ip).eq.R_UNDEF)then 308 modis%Cloud_Fraction_Water_Mean(ip)= Cosp_fill_value337 modis%Cloud_Fraction_Water_Mean(ip)=missing_val 309 338 endif 310 339 if(modis%Cloud_Fraction_Ice_Mean(ip).eq.R_UNDEF)then 311 modis%Cloud_Fraction_Ice_Mean(ip)= Cosp_fill_value340 modis%Cloud_Fraction_Ice_Mean(ip)=missing_val 312 341 endif 313 342 if(modis%Optical_Thickness_Total_Mean(ip).eq.R_UNDEF)then 314 modis%Optical_Thickness_Total_Mean(ip)= Cosp_fill_value343 modis%Optical_Thickness_Total_Mean(ip)=missing_val 315 344 endif 316 345 if(modis%Optical_Thickness_Water_Mean(ip).eq.R_UNDEF)then 317 modis%Optical_Thickness_Water_Mean(ip)= Cosp_fill_value346 modis%Optical_Thickness_Water_Mean(ip)=missing_val 318 347 endif 319 348 if(modis%Optical_Thickness_Ice_Mean(ip).eq.R_UNDEF)then 320 modis%Optical_Thickness_Ice_Mean(ip)= Cosp_fill_value349 modis%Optical_Thickness_Ice_Mean(ip)=missing_val 321 350 endif 322 351 if(modis%Cloud_Particle_Size_Water_Mean(ip).eq.R_UNDEF)then 323 modis%Cloud_Particle_Size_Water_Mean(ip)= Cosp_fill_value352 modis%Cloud_Particle_Size_Water_Mean(ip)=missing_val 324 353 endif 325 354 if(modis%Cloud_Particle_Size_Ice_Mean(ip).eq.R_UNDEF)then 326 modis%Cloud_Particle_Size_Ice_Mean(ip)= Cosp_fill_value355 modis%Cloud_Particle_Size_Ice_Mean(ip)=missing_val 327 356 endif 328 357 if(modis%Cloud_Top_Pressure_Total_Mean(ip).eq.R_UNDEF)then 329 modis%Cloud_Top_Pressure_Total_Mean(ip)= Cosp_fill_value358 modis%Cloud_Top_Pressure_Total_Mean(ip)=missing_val 330 359 endif 331 360 if(modis%Liquid_Water_Path_Mean(ip).eq.R_UNDEF)then 332 modis%Liquid_Water_Path_Mean(ip)= Cosp_fill_value361 modis%Liquid_Water_Path_Mean(ip)=missing_val 333 362 endif 334 363 if(modis%Ice_Water_Path_Mean(ip).eq.R_UNDEF)then 335 modis%Ice_Water_Path_Mean(ip)= Cosp_fill_value364 modis%Ice_Water_Path_Mean(ip)=missing_val 336 365 endif 337 366 338 367 enddo 368 369 where(modis%Optical_Thickness_Total_LogMean == R_UNDEF) & 370 modis%Optical_Thickness_Total_LogMean = missing_val 371 372 373 where(modis%Optical_Thickness_Water_LogMean == R_UNDEF) & 374 modis%Optical_Thickness_Water_LogMean = missing_val 375 376 where(modis%Optical_Thickness_Ice_LogMean == R_UNDEF) & 377 modis%Optical_Thickness_Ice_LogMean = missing_val 339 378 340 379 CALL histwrite2d_cosp(o_cllmodis,modis%Cloud_Fraction_Low_Mean) … … 360 399 do k=1,7 361 400 if(modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k).eq.R_UNDEF)then 362 modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)= 0.401 modis%Optical_Thickness_vs_Cloud_Top_Pressure(ip,ii,k)=missing_val 363 402 endif 364 403 enddo … … 366 405 enddo 367 406 407 #ifdef CPP_XIOS 408 CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 409 #else 368 410 do icl=1,7 369 411 CALL histwrite3d_cosp(o_clmodis, & 370 412 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 371 413 enddo 414 #endif 372 415 373 416 where(modis%Optical_Thickness_vs_ReffIce == R_UNDEF) & 374 modis%Optical_Thickness_vs_ReffIce = Cosp_fill_value417 modis%Optical_Thickness_vs_ReffIce = missing_val 375 418 376 419 where(modis%Optical_Thickness_vs_ReffLiq == R_UNDEF) & 377 modis%Optical_Thickness_vs_ReffLiq = Cosp_fill_value 378 420 modis%Optical_Thickness_vs_ReffLiq = missing_val 421 422 #ifdef CPP_XIOS 423 ! print*,'dimension de crimodis=',size(modis%Optical_Thickness_vs_ReffIce,2),& 424 ! size(modis%Optical_Thickness_vs_ReffIce,3) 425 CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 426 CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 427 #else 379 428 do icl=1,7 380 429 CALL histwrite3d_cosp(o_crimodis, & … … 383 432 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 384 433 enddo 434 #endif 385 435 endif 386 436 … … 784 834 END SUBROUTINE histwrite3d_cosp 785 835 836 ! ug NOUVELLE VERSION DES WRITE AVEC LA BOUCLE DO RENTREE 837 ! AI sept 2013 838 SUBROUTINE histwrite4d_cosp(var, field) 839 USE dimphy 840 USE mod_phys_lmdz_para 841 USE ioipsl 842 use iophy 843 USE mod_grid_phy_lmdz, ONLY: nbp_lon 844 USE print_control_mod, ONLY: lunout,prt_level 845 846 #ifdef CPP_XIOS 847 USE xios, only: xios_send_field 848 #endif 849 850 851 IMPLICIT NONE 852 INCLUDE 'clesphys.h' 853 854 TYPE(ctrl_outcosp), INTENT(IN) :: var 855 REAL, DIMENSION(:,:,:), INTENT(IN) :: field ! --> field(klon,:) 856 857 INTEGER :: iff, k 858 859 REAL,DIMENSION(klon_mpi,SIZE(field,2),SIZE(field,3)) :: buffer_omp 860 REAL :: field4d(nbp_lon,jj_nb,SIZE(field,2),SIZE(field,3)) 861 INTEGER :: ip, n, nlev, nlev2 862 INTEGER, ALLOCATABLE, DIMENSION(:) :: index4d 863 CHARACTER(LEN=20) :: nomi, nom 864 865 IF (prt_level >= 9) write(lunout,*)'Begin histrwrite4d ',var%name 866 867 IF(cosp_varsdefined) THEN 868 !Et sinon on.... écrit 869 IF (SIZE(field,1)/=klon) & 870 CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1) 871 872 nlev=SIZE(field,2) 873 nlev2=SIZE(field,3) 874 CALL Gather_omp(field,buffer_omp) 875 !$OMP MASTER 876 CALL grid1Dto2D_mpi(buffer_omp,field4d) 877 878 #ifdef CPP_XIOS 879 IF (ok_all_xml) THEN 880 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 881 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 882 ENDIF 883 #endif 884 885 !$OMP END MASTER 886 ENDIF ! vars_defined 887 IF (prt_level >= 9) write(lunout,*)'End histrwrite4d_cosp ',nom 888 END SUBROUTINE histwrite4d_cosp 889 786 890 SUBROUTINE conf_cospoutputs(nam_var,cles_var) 787 891 !!! Lecture des noms et cles de sortie des variables dans config.def -
LMDZ5/branches/testing/libf/phylmd/cosp/modis_simulator.F90
r2720 r2839 532 532 533 533 ! ######################################################################################## 534 ! Normalize pixel counts to fraction. The first three cloud fractions have been set to -1 535 ! in cloud-free areas, so set those places to 0. 536 ! ######################################################################################## 537 Cloud_Fraction_High_Mean(1:nPoints) = Cloud_Fraction_High_Mean(1:nPoints) /nSubcols 538 Cloud_Fraction_Mid_Mean(1:nPoints) = Cloud_Fraction_Mid_Mean(1:nPoints) /nSubcols 539 Cloud_Fraction_Low_Mean(1:nPoints) = Cloud_Fraction_Low_Mean(1:nPoints) /nSubcols 540 534 ! Normalize pixel counts to fraction. 535 ! ######################################################################################## 536 Cloud_Fraction_High_Mean(1:nPoints) = Cloud_Fraction_High_Mean(1:nPoints) /nSubcols 537 Cloud_Fraction_Mid_Mean(1:nPoints) = Cloud_Fraction_Mid_Mean(1:nPoints) /nSubcols 538 Cloud_Fraction_Low_Mean(1:nPoints) = Cloud_Fraction_Low_Mean(1:nPoints) /nSubcols 539 Cloud_Fraction_Total_Mean(1:nPoints) = Cloud_Fraction_Total_Mean(1:nPoints) /nSubcols 540 Cloud_Fraction_Ice_Mean(1:nPoints) = Cloud_Fraction_Ice_Mean(1:nPoints) /nSubcols 541 Cloud_Fraction_Water_Mean(1:nPoints) = Cloud_Fraction_Water_Mean(1:nPoints) /nSubcols 542 541 543 ! ######################################################################################## 542 544 ! Set clear-scenes to undefined -
LMDZ5/branches/testing/libf/phylmd/cosp/phys_cosp.F90
r2594 r2839 7 7 subroutine phys_cosp( itap,dtime,freq_cosp, & 8 8 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & 9 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, &9 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, missing_val, & 10 10 Nptslmdz,Nlevlmdz,lon,lat, presnivs,overlaplmdz,sunlit, & 11 11 ref_liq,ref_ice,fracTerLic,u_wind,v_wind,phis,phi,ph,p,skt,t, & … … 130 130 ! Declaration necessaires pour les sorties IOIPSL 131 131 integer :: ii 132 real :: ecrit_day,ecrit_hf,ecrit_mth 132 real :: ecrit_day,ecrit_hf,ecrit_mth, missing_val 133 133 logical :: ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, ok_all_xml 134 134 … … 192 192 ! Allocate memory for gridbox type 193 193 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 194 print *, 'Allocating memory for gridbox type...' 194 ! AI mars 2017 195 ! print *, 'Allocating memory for gridbox type...' 196 195 197 !! AI 196 198 ! call construct_cosp_gridbox(dble(itap),radar_freq,surface_radar,use_mie_tables,use_gas_abs,do_ray,melt_lay,k2, & … … 215 217 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 216 218 217 print *, 'Populating input structure...'219 ! print *, 'Populating input structure...' 218 220 gbx%longitude = lon 219 221 gbx%latitude = lat … … 299 301 ! Define new vertical grid 300 302 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 301 print *, 'Defining new vertical grid...'303 ! print *, 'Defining new vertical grid...' 302 304 call construct_cosp_vgrid(gbx,Nlr,use_vgrid,csat_vgrid,vgrid) 303 305 … … 305 307 ! Allocate memory for other types 306 308 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 307 print *, 'Allocating memory for other types...'309 ! print *, 'Allocating memory for other types...' 308 310 call construct_cosp_subgrid(Npoints, Ncolumns, Nlevels, sgx) 309 311 call construct_cosp_sgradar(cfg,Npoints,Ncolumns,Nlevels,N_HYDRO,sgradar) … … 325 327 call cosp_output_open(Nlevlmdz, Ncolumns, presnivs, dtime, freq_cosp, & 326 328 ok_mensuelCOSP, ok_journeCOSP, ok_hfCOSP, ok_all_xml, & 327 ecrit_mth, ecrit_day, ecrit_hf, use_vgrid, vgrid )329 ecrit_mth, ecrit_day, ecrit_hf, use_vgrid, vgrid, stlidar) 328 330 !$OMP END MASTER 329 331 !$OMP BARRIER … … 333 335 ! Call simulator 334 336 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 335 print *, 'Calling simulator...'337 ! print *, 'Calling simulator...' 336 338 !! AI 337 339 ! call cosp(overlap,Ncolumns,cfg,vgrid,gbx,sgx,sgradar,sglidar,isccp,misr,stradar,stlidar) … … 347 349 !!!!!!!!!!!!!!!!!! Ecreture des sorties Cosp !!!!!!!!!!!!!!r!!!!!!:!!!!! 348 350 349 print *, 'Calling write output'350 call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, &351 ! print *, 'Calling write output' 352 call cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, missing_val, & 351 353 cfg, gbx, vgrid, sglidar, sgradar, stlidar, stradar, & 352 354 isccp, misr, modis) … … 355 357 ! Deallocate memory in derived types 356 358 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 357 print *, 'Deallocating memory...'359 ! print *, 'Deallocating memory...' 358 360 call free_cosp_gridbox(gbx) 359 361 call free_cosp_subgrid(sgx)
Note: See TracChangeset
for help on using the changeset viewer.