Changeset 3723 for LMDZ6/trunk/libf/phylmd
- Timestamp:
- Jun 18, 2020, 10:44:07 AM (4 years ago)
- Location:
- LMDZ6/trunk/libf/phylmd/cospv2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/cospv2/cosp_config.F90
r3491 r3723 63 63 N_HYDRO = 9 ! Number of hydrometeor classes used by quickbeam radar simulator. 64 64 65 ! Mode debug ou prod (AI 0302018) 66 logical :: ok_debug_cosp = .true. 65 67 ! #################################################################################### 66 68 ! Joint histogram bin-boundaries -
LMDZ6/trunk/libf/phylmd/cospv2/cosp_utils.F90
r3491 r3723 56 56 integer :: i,j,k 57 57 real(wp) :: sigma,one_over_xip1,xi,rho0,rho,lambda_x,gamma_4_3_2,delta 58 59 real(wp) :: seuil 60 61 if (ok_debug_cosp) then 62 seuil=1.e-15 63 else 64 seuil=0.0 65 endif 66 67 58 68 59 69 mxratio = 0.0 … … 75 85 mxratio(i,j,k)=mxratio(i,j,k)/rho 76 86 ! Compute effective radius 77 if ((reff(i,j,k) <= 0._wp).and.(flux(i,k) /= 0._wp)) then 87 ! if ((reff(i,j,k) <= 0._wp).and.(flux(i,k) /= 0._wp)) then 88 if ((reff(i,j,k) <= 0._wp).and.(flux(i,k) > seuil)) then 78 89 lambda_x = (a_x*c_x*((rho0/rho)**g_x)*n_ax*gamma1/flux(i,k))**(1._wp/delta) 79 90 reff(i,j,k) = gamma_4_3_2/lambda_x -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_interface.F90
r3654 r3723 74 74 75 75 !!! Modules faisant partie du code source de COSPv2 76 use cosp_kinds, 77 use MOD_COSP_CONFIG, 78 79 use mod_quickbeam_optics, 80 81 use quickbeam, 82 use mod_cosp, 83 84 76 use cosp_kinds, only: wp 77 use MOD_COSP_CONFIG, only: N_HYDRO,RTTOV_MAX_CHANNELS, & 78 niv_sorties, vgrid_z_in 79 use mod_quickbeam_optics, only: size_distribution,hydro_class_init, & 80 quickbeam_optics_init 81 use quickbeam, only: radar_cfg 82 use mod_cosp, only: cosp_init,cosp_optical_inputs, & 83 cosp_column_inputs,cosp_outputs, & 84 cosp_simulator 85 85 86 86 … … 198 198 199 199 ! Parametres qui sont lus a partir du fichier "cosp_input_nl.txt" 200 namelist/COSP_INPUT/overlap, isccp_topheight, isccp_topheight_direction, 201 npoints_it, ncolumns, use_vgrid_in, csat_vgrid_in, 202 cloudsat_radar_freq, surface_radar, use_mie_tables, 203 cloudsat_use_gas_abs, cloudsat_do_ray, melt_lay, cloudsat_k2, 204 cloudsat_micro_scheme, lidar_ice_type, use_precipitation_fluxes, 200 namelist/COSP_INPUT/overlap, isccp_topheight, isccp_topheight_direction, & 201 npoints_it, ncolumns, use_vgrid_in, csat_vgrid_in, & 202 cloudsat_radar_freq, surface_radar, use_mie_tables, & 203 cloudsat_use_gas_abs, cloudsat_do_ray, melt_lay, cloudsat_k2, & 204 cloudsat_micro_scheme, lidar_ice_type, use_precipitation_fluxes, & 205 205 rttov_platform, rttov_satellite, rttov_Instrument, rttov_Nchannels, & 206 206 rttov_Channels, rttov_Surfem, rttov_ZenAng, co2, ch4, n2o, co … … 215 215 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 216 216 217 218 217 print*,'Entree lmdz_cosp_interface' !phys_cosp2' 218 if (debut_cosp) then 219 219 NPoints=Nptslmdz 220 220 Nlevels=Nlevlmdz … … 261 261 print*,'ok read cosp_input_nl' 262 262 263 264 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%265 !266 ! 2) Initialisation de COSPv2267 !268 ! Il y a 2 options possibles pour ecrire les sorties : XIOS ou sorties standard269 !270 ! Si le modele a ete compile AVEC l'option xios, le programme passe par les271 ! bouts de code delimites par "#ifdef CPP_XIOS" et "#else". Dans ce cas,272 ! l'initialisation de COSP se fait au deuxieme appel de cette interface.273 !274 ! Si le modele a ete compile SANS l'option xios, le programme passe par les275 ! bouts de code delimites par "#else" et "#endif". Dans ce cas,276 ! l'initialisation de COSP se fait au premier appel de cette interface.277 !278 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%279 280 263 ! Clefs Outputs initialisation 281 264 #ifdef CPP_XIOS … … 286 269 287 270 print*,' Cles des differents simulateurs cosp a itap :',itap 288 print*,'cfg%Lcloudsat, cfg%Lcalipso, cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, &271 print*,'cfg%Lcloudsat, cfg%Lcalipso, cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, & 289 272 cfg%Lisccp, cfg%Lmisr, cfg%Lmodis, cfg%Lrttov', & 290 273 cfg%Lcloudsat, cfg%Lcalipso, cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, & 291 274 cfg%Lisccp, cfg%Lmisr, cfg%Lmodis, cfg%Lrttov 292 275 293 276 if (overlaplmdz.ne.overlap) then … … 309 292 call quickbeam_optics_init() 310 293 311 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag294 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag 312 295 call COSP_INIT(cfg%Lisccp, cfg%Lmodis, cfg%Lmisr, cfg%Lcloudsat, cfg%Lcalipso, & 313 314 315 316 317 318 cosp_init_flag = 1296 cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, cfg%Lrttov, & 297 cloudsat_radar_freq, cloudsat_k2, cloudsat_use_gas_abs, & 298 cloudsat_do_ray, isccp_topheight, isccp_topheight_direction, & 299 surface_radar, rcfg_cloudsat, use_vgrid_in, csat_vgrid_in, & 300 niv_sorties, Nlevels, cloudsat_micro_scheme) 301 cosp_init_flag = 1 319 302 print*,' just after call COSP_INIT, cosp_init_flag =', cosp_init_flag 320 303 endif 321 304 #endif 322 305 323 306 print*,'Fin lecture Namelists, debut_cosp =',debut_cosp 324 307 325 308 endif ! debut_cosp … … 327 310 328 311 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 329 if ((itap.g t.1).and.(first_write))then312 if ((itap.ge.1).and.(first_write))then 330 313 #ifdef CPP_XIOS 331 314 call read_xiosfieldactive(cfg) … … 344 327 call quickbeam_optics_init() 345 328 346 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag329 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag 347 330 call COSP_INIT(cfg%Lisccp, cfg%Lmodis, cfg%Lmisr, cfg%Lcloudsat, cfg%Lcalipso, & 348 349 350 351 352 353 cosp_init_flag = 1331 cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, cfg%Lrttov, & 332 cloudsat_radar_freq, cloudsat_k2, cloudsat_use_gas_abs, & 333 cloudsat_do_ray, isccp_topheight, isccp_topheight_direction, & 334 surface_radar, rcfg_cloudsat, use_vgrid_in, csat_vgrid_in, & 335 niv_sorties, Nlevels, cloudsat_micro_scheme) 336 cosp_init_flag = 1 354 337 print*,' just after call COSP_INIT, cosp_init_flag =', cosp_init_flag 355 338 endif ! cosp_init_flag … … 573 556 print *, 'Calling write output' 574 557 call lmdz_cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, & 575 558 missing_val, cfg, niv_sorties, cospOUT) 576 559 577 560 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90
r3491 r3723 30 30 31 31 SUBROUTINE lmdz_cosp_output_write(Nlevlmdz, Npoints, Ncolumns, itap, dtime, freq_COSP, missing_cosp, & 32 32 cfg, Nlvgrid, cospOUT) 33 33 34 34 … … 41 41 use mod_cosp, only: cosp_outputs 42 42 43 #ifdef CPP_XIOS44 43 USE wxios, only: wxios_closedef 45 44 USE xios, only: xios_update_calendar, xios_field_is_active 46 #endif47 45 IMPLICIT NONE 48 46 !!! Variables d'entree … … 62 60 ! Variables locals intermidiaires pour inverser les axes des champs 4D 63 61 ! Compatibilite avec sorties CMIP 64 real, dimension(Npoints,Nl evout,SR_BINS) :: tmp_fi4da_cfadL, tmp_fi4da_cfadLgr, tmp_fi4da_cfadLatlid65 real, dimension(Npoints,Nl evout,CLOUDSAT_DBZE_BINS) :: tmp_fi4da_cfadR62 real, dimension(Npoints,Nlvgrid,SR_BINS) :: tmp_fi4da_cfadL, tmp_fi4da_cfadLgr, tmp_fi4da_cfadLatlid 63 real, dimension(Npoints,Nlvgrid,CLOUDSAT_DBZE_BINS) :: tmp_fi4da_cfadR 66 64 real, dimension(Npoints,numMISRHgtBins,7) :: tmp_fi4da_misr 67 65 68 #ifdef CPP_XIOS69 66 missing_val=missing_cosp 70 #else71 missing_val=0.72 #endif73 67 74 68 Nlevout = Nlvgrid … … 90 84 ok_sync = .TRUE. 91 85 92 !DO iinit=1, iinitend93 ! AI sept 2014 cette boucle supprimee94 ! On n'ecrit pas quand itap=1 (cosp)95 96 ! if (prt_level >= 10) then97 ! WRITE(lunout,*)'DO iinit=1, iinitend ',iinitend98 ! endif99 100 !!#ifdef CPP_XIOS101 ! !$OMP MASTER102 !IF (cosp_varsdefined) THEN103 ! if (prt_level >= 10) then104 ! WRITE(lunout,*)'Apell xios_update_calendar cosp_varsdefined iinitend ', &105 ! cosp_varsdefined,iinitend106 ! endif107 ! CALL xios_update_calendar(itau_wcosp)108 !ENDIF109 ! !$OMP END MASTER110 ! !$OMP BARRIER111 !!#endif112 113 86 !!!! Sorties Calipso 114 87 if (cfg%Lcalipso) then 115 !!! AI 02 2018116 ! Traitement missing_val117 !!! where(stlidar%lidarcld == R_UNDEF) stlidar%lidarcld = missing_val118 !!! where(sglidar%beta_mol == R_UNDEF) sglidar%beta_mol = missing_val119 !!! where(sglidar%beta_tot == R_UNDEF) sglidar%beta_tot = missing_val120 !!! where(stlidar%cldlayer == R_UNDEF) stlidar%cldlayer = missing_val121 ! where(stlidar%cldtype == R_UNDEF) stlidar%cldtype = missing_val !OPAQ122 !!! where(stlidar%cfad_sr == R_UNDEF) stlidar%cfad_sr = missing_val123 ! AI 11 / 2015124 !!! where(stlidar%parasolrefl == R_UNDEF) stlidar%parasolrefl = missing_val125 !!! where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val126 !!! where(stlidar%cldlayerphase == R_UNDEF) stlidar%cldlayerphase = missing_val127 !!! where(stlidar%lidarcldphase == R_UNDEF) stlidar%lidarcldphase = missing_val128 ! where(stlidar%lidarcldtype == R_UNDEF) stlidar%lidarcldtype = missing_val !OPAQ129 !!! where(stlidar%lidarcldtmp == R_UNDEF) stlidar%lidarcldtmp = missing_val130 131 !!! missing values pour toutes les valeurs R_UNDEF des variables de CALIPSO132 ! where(cospOUT%calipso_betaperp_tot == R_UNDEF) cospOUT%calipso_betaperp_tot = missing_val133 where(cospOUT%calipso_beta_tot == R_UNDEF) cospOUT%calipso_beta_tot = missing_val134 where(cospOUT%calipso_tau_tot == R_UNDEF) cospOUT%calipso_tau_tot = missing_val135 where(cospOUT%calipso_lidarcldphase == R_UNDEF) cospOUT%calipso_lidarcldphase = missing_val136 where(cospOUT%calipso_lidarcldtype == R_UNDEF) cospOUT%calipso_lidarcldtype = missing_val137 where(cospOUT%calipso_cldlayerphase == R_UNDEF) cospOUT%calipso_cldlayerphase = missing_val138 where(cospOUT%calipso_lidarcldtmp == R_UNDEF) cospOUT%calipso_lidarcldtmp = missing_val139 where(cospOUT%calipso_cfad_sr == R_UNDEF) cospOUT%calipso_cfad_sr = missing_val140 where(cospOUT%calipso_lidarcld == R_UNDEF) cospOUT%calipso_lidarcld = missing_val141 where(cospOUT%calipso_cldlayer == R_UNDEF) cospOUT%calipso_cldlayer = missing_val142 where(cospOUT%calipso_cldtype == R_UNDEF) cospOUT%calipso_cldtype = missing_val143 where(cospOUT%calipso_cldtypetemp == R_UNDEF) cospOUT%calipso_cldtypetemp = missing_val144 where(cospOUT%calipso_cldtypemeanz == R_UNDEF) cospOUT%calipso_cldtypemeanz = missing_val145 where(cospOUT%calipso_cldtypemeanzse == R_UNDEF) cospOUT%calipso_cldtypemeanzse = missing_val146 where(cospOUT%calipso_beta_mol == R_UNDEF) cospOUT%calipso_beta_mol = missing_val147 where(cospOUT%calipso_temp_tot == R_UNDEF) cospOUT%calipso_temp_tot = missing_val148 where(cospOUT%calipso_cldthinemis == R_UNDEF) cospOUT%calipso_cldthinemis = missing_val149 where(cospOUT%calipso_srbval == R_UNDEF) cospOUT%calipso_srbval = missing_val150 151 88 152 89 ! print*,'Appel histwrite2d_cosp' 153 if (cfg%Lcllcalipso) CALL histwrite2d_cosp(o_cllcalipso,cospOUT%calipso_cldlayer(:,1)) 154 if (cfg%Lclhcalipso) CALL histwrite2d_cosp(o_clhcalipso,cospOUT%calipso_cldlayer(:,3)) 155 if (cfg%Lclmcalipso) CALL histwrite2d_cosp(o_clmcalipso,cospOUT%calipso_cldlayer(:,2)) 156 if (cfg%Lcltcalipso) CALL histwrite2d_cosp(o_cltcalipso,cospOUT%calipso_cldlayer(:,4)) 157 if (cfg%Lclcalipso) CALL histwrite3d_cosp(o_clcalipso,cospOUT%calipso_lidarcld,nvert) 158 if (cfg%Lclcalipsotmp) CALL histwrite3d_cosp(o_clcalipsotmp,cospOUT%calipso_lidarcldtmp(:,:,1),nverttemp) 159 160 if (cfg%Lcllcalipsoice) CALL histwrite2d_cosp(o_cllcalipsoice,cospOUT%calipso_cldlayerphase(:,1,1)) 161 if (cfg%Lclhcalipsoice) CALL histwrite2d_cosp(o_clhcalipsoice,cospOUT%calipso_cldlayerphase(:,3,1)) 162 if (cfg%Lclmcalipsoice) CALL histwrite2d_cosp(o_clmcalipsoice,cospOUT%calipso_cldlayerphase(:,2,1)) 163 if (cfg%Lcltcalipsoice) CALL histwrite2d_cosp(o_cltcalipsoice,cospOUT%calipso_cldlayerphase(:,4,1)) 164 if (cfg%Lclcalipsoice) CALL histwrite3d_cosp(o_clcalipsoice,cospOUT%calipso_lidarcldphase(:,:,1),nvert) 165 if (cfg%Lclcalipsotmpice) CALL histwrite3d_cosp(o_clcalipsotmpice,cospOUT%calipso_lidarcldtmp(:,:,2),nverttemp) 166 167 if (cfg%Lcllcalipsoliq) CALL histwrite2d_cosp(o_cllcalipsoliq,cospOUT%calipso_cldlayerphase(:,1,2)) 168 if (cfg%Lclhcalipsoliq) CALL histwrite2d_cosp(o_clhcalipsoliq,cospOUT%calipso_cldlayerphase(:,3,2)) 169 if (cfg%Lclmcalipsoliq) CALL histwrite2d_cosp(o_clmcalipsoliq,cospOUT%calipso_cldlayerphase(:,2,2)) 170 if (cfg%Lcltcalipsoliq) CALL histwrite2d_cosp(o_cltcalipsoliq,cospOUT%calipso_cldlayerphase(:,4,2)) 171 if (cfg%Lclcalipsoliq) CALL histwrite3d_cosp(o_clcalipsoliq,cospOUT%calipso_lidarcldphase(:,:,2),nvert) 172 if (cfg%Lclcalipsotmpliq) CALL histwrite3d_cosp(o_clcalipsotmpliq,cospOUT%calipso_lidarcldtmp(:,:,3),nverttemp) 173 174 if (cfg%Lcllcalipsoun) CALL histwrite2d_cosp(o_cllcalipsoun,cospOUT%calipso_cldlayerphase(:,1,3)) 175 if (cfg%Lclhcalipsoun) CALL histwrite2d_cosp(o_clhcalipsoun,cospOUT%calipso_cldlayerphase(:,3,3)) 176 if (cfg%Lclmcalipsoun) CALL histwrite2d_cosp(o_clmcalipsoun,cospOUT%calipso_cldlayerphase(:,2,3)) 177 if (cfg%Lcltcalipsoun) CALL histwrite2d_cosp(o_cltcalipsoun,cospOUT%calipso_cldlayerphase(:,4,3)) 178 if (cfg%Lclcalipsoun) CALL histwrite3d_cosp(o_clcalipsoun,cospOUT%calipso_lidarcldphase(:,:,3),nvert) 179 if (cfg%Lclcalipsotmpun) CALL histwrite3d_cosp(o_clcalipsotmpun,cospOUT%calipso_lidarcldtmp(:,:,4),nverttemp) 180 181 if (cfg%Lclopaquecalipso) CALL histwrite2d_cosp(o_clopaquecalipso,cospOUT%calipso_cldtype(:,1)) 182 if (cfg%Lclthincalipso) CALL histwrite2d_cosp(o_clthincalipso,cospOUT%calipso_cldtype(:,2)) 183 if (cfg%Lclzopaquecalipso) CALL histwrite2d_cosp(o_clzopaquecalipso,cospOUT%calipso_cldtype(:,3)) 184 if (cfg%Lclcalipsoopaque) CALL histwrite3d_cosp(o_clcalipsoopaque,cospOUT%calipso_lidarcldtype(:,:,1),nvert) 185 if (cfg%Lclcalipsothin) CALL histwrite3d_cosp(o_clcalipsothin,cospOUT%calipso_lidarcldtype(:,:,2),nvert) 186 if (cfg%Lclcalipsozopaque) CALL histwrite3d_cosp(o_clcalipsozopaque,cospOUT%calipso_lidarcldtype(:,:,3),nvert) 187 if (cfg%Lclcalipsoopacity) CALL histwrite3d_cosp(o_clcalipsoopacity,cospOUT%calipso_lidarcldtype(:,:,4),nvert) 188 189 if (cfg%Lclopaquetemp) CALL histwrite2d_cosp(o_clopaquetemp,cospOUT%calipso_cldtypetemp(:,1)) 190 if (cfg%Lclthintemp) CALL histwrite2d_cosp(o_clthintemp,cospOUT%calipso_cldtypetemp(:,2)) 191 if (cfg%Lclzopaquetemp) CALL histwrite2d_cosp(o_clzopaquetemp,cospOUT%calipso_cldtypetemp(:,3)) 192 if (cfg%Lclopaquemeanz) CALL histwrite2d_cosp(o_clopaquemeanz,cospOUT%calipso_cldtypemeanz(:,1)) 193 if (cfg%Lclthinmeanz) CALL histwrite2d_cosp(o_clthinmeanz,cospOUT%calipso_cldtypemeanz(:,2)) 194 if (cfg%Lclthinemis) CALL histwrite2d_cosp(o_clthinemis,cospOUT%calipso_cldthinemis) 195 if (cfg%Lclopaquemeanzse) CALL histwrite2d_cosp(o_clopaquemeanzse,cospOUT%calipso_cldtypemeanzse(:,1)) 196 if (cfg%Lclthinmeanzse) CALL histwrite2d_cosp(o_clthinmeanzse,cospOUT%calipso_cldtypemeanzse(:,2)) 197 if (cfg%Lclzopaquecalipsose) CALL histwrite2d_cosp(o_clzopaquecalipsose,cospOUT%calipso_cldtypemeanzse(:,3)) 198 199 200 #ifdef CPP_XIOS 201 do icl=1,SR_BINS 202 tmp_fi4da_cfadL(:,:,icl)=cospOUT%calipso_cfad_sr(:,icl,:) 203 enddo 90 if (cfg%Lcllcalipso) then 91 where(cospOUT%calipso_cldlayer(:,1) == R_UNDEF) cospOUT%calipso_cldlayer(:,1) = missing_val 92 CALL histwrite2d_cosp(o_cllcalipso,cospOUT%calipso_cldlayer(:,1)) 93 endif 94 if (cfg%Lclhcalipso) then 95 where(cospOUT%calipso_cldlayer(:,3) == R_UNDEF) cospOUT%calipso_cldlayer(:,3) = missing_val 96 CALL histwrite2d_cosp(o_clhcalipso,cospOUT%calipso_cldlayer(:,3)) 97 endif 98 if (cfg%Lclmcalipso) then 99 where(cospOUT%calipso_cldlayer(:,2) == R_UNDEF) cospOUT%calipso_cldlayer(:,2) = missing_val 100 CALL histwrite2d_cosp(o_clmcalipso,cospOUT%calipso_cldlayer(:,2)) 101 endif 102 if (cfg%Lcltcalipso) then 103 where(cospOUT%calipso_cldlayer(:,4) == R_UNDEF) cospOUT%calipso_cldlayer(:,4) = missing_val 104 CALL histwrite2d_cosp(o_cltcalipso,cospOUT%calipso_cldlayer(:,4)) 105 endif 106 if (cfg%Lclcalipso) then 107 where(cospOUT%calipso_lidarcld == R_UNDEF) cospOUT%calipso_lidarcld = missing_val 108 CALL histwrite3d_cosp(o_clcalipso,cospOUT%calipso_lidarcld,nvert) 109 endif 110 if (cfg%Lclcalipsotmp) then 111 where(cospOUT%calipso_lidarcldtmp(:,:,1) == R_UNDEF) cospOUT%calipso_lidarcldtmp(:,:,1) = missing_val 112 CALL histwrite3d_cosp(o_clcalipsotmp,cospOUT%calipso_lidarcldtmp(:,:,1),nverttemp) 113 endif 114 115 if (cfg%Lcllcalipsoice) then 116 where(cospOUT%calipso_cldlayerphase(:,1,1) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,1,1) = missing_val 117 CALL histwrite2d_cosp(o_cllcalipsoice,cospOUT%calipso_cldlayerphase(:,1,1)) 118 endif 119 if (cfg%Lclhcalipsoice) then 120 where(cospOUT%calipso_cldlayerphase(:,3,1) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,3,1) = missing_val 121 CALL histwrite2d_cosp(o_clhcalipsoice,cospOUT%calipso_cldlayerphase(:,3,1)) 122 endif 123 if (cfg%Lclmcalipsoice) then 124 where(cospOUT%calipso_cldlayerphase(:,2,1) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,2,1) = missing_val 125 CALL histwrite2d_cosp(o_clmcalipsoice,cospOUT%calipso_cldlayerphase(:,2,1)) 126 endif 127 if (cfg%Lcltcalipsoice) then 128 where(cospOUT%calipso_cldlayerphase(:,4,1) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,4,1) = missing_val 129 CALL histwrite2d_cosp(o_cltcalipsoice,cospOUT%calipso_cldlayerphase(:,4,1)) 130 endif 131 if (cfg%Lclcalipsoice) then 132 where(cospOUT%calipso_lidarcldphase(:,:,1) == R_UNDEF) cospOUT%calipso_lidarcldphase(:,:,1) = missing_val 133 CALL histwrite3d_cosp(o_clcalipsoice,cospOUT%calipso_lidarcldphase(:,:,1),nvert) 134 endif 135 if (cfg%Lclcalipsotmpice) then 136 where(cospOUT%calipso_lidarcldtmp(:,:,2) == R_UNDEF) cospOUT%calipso_lidarcldtmp(:,:,2) = missing_val 137 CALL histwrite3d_cosp(o_clcalipsotmpice,cospOUT%calipso_lidarcldtmp(:,:,2),nverttemp) 138 endif 139 140 if (cfg%Lcllcalipsoliq) then 141 where(cospOUT%calipso_cldlayerphase(:,1,2) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,1,2) = missing_val 142 CALL histwrite2d_cosp(o_cllcalipsoliq,cospOUT%calipso_cldlayerphase(:,1,2)) 143 endif 144 if (cfg%Lclhcalipsoliq) then 145 where(cospOUT%calipso_cldlayerphase(:,3,2) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,3,2) = missing_val 146 CALL histwrite2d_cosp(o_clhcalipsoliq,cospOUT%calipso_cldlayerphase(:,3,2)) 147 endif 148 if (cfg%Lclmcalipsoliq) then 149 where(cospOUT%calipso_cldlayerphase(:,2,2) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,2,2) = missing_val 150 CALL histwrite2d_cosp(o_clmcalipsoliq,cospOUT%calipso_cldlayerphase(:,2,2)) 151 endif 152 if (cfg%Lcltcalipsoliq) then 153 where(cospOUT%calipso_cldlayerphase(:,4,2) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,4,2) = missing_val 154 CALL histwrite2d_cosp(o_cltcalipsoliq,cospOUT%calipso_cldlayerphase(:,4,2)) 155 endif 156 if (cfg%Lclcalipsoliq) then 157 where(cospOUT%calipso_lidarcldphase(:,:,2) == R_UNDEF) cospOUT%calipso_lidarcldphase(:,:,2) = missing_val 158 CALL histwrite3d_cosp(o_clcalipsoliq,cospOUT%calipso_lidarcldphase(:,:,2),nvert) 159 endif 160 if (cfg%Lclcalipsotmpliq) then 161 where(cospOUT%calipso_lidarcldtmp(:,:,3) == R_UNDEF) cospOUT%calipso_lidarcldtmp(:,:,3) = missing_val 162 CALL histwrite3d_cosp(o_clcalipsotmpliq,cospOUT%calipso_lidarcldtmp(:,:,3),nverttemp) 163 endif 164 if (cfg%Lcllcalipsoun) then 165 where(cospOUT%calipso_cldlayerphase(:,1,3) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,1,3) = missing_val 166 CALL histwrite2d_cosp(o_cllcalipsoun,cospOUT%calipso_cldlayerphase(:,1,3)) 167 endif 168 if (cfg%Lclhcalipsoun) then 169 where(cospOUT%calipso_cldlayerphase(:,3,3) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,3,3) = missing_val 170 CALL histwrite2d_cosp(o_clhcalipsoun,cospOUT%calipso_cldlayerphase(:,3,3)) 171 endif 172 if (cfg%Lclmcalipsoun) then 173 where(cospOUT%calipso_cldlayerphase(:,2,3) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,2,3) = missing_val 174 CALL histwrite2d_cosp(o_clmcalipsoun,cospOUT%calipso_cldlayerphase(:,2,3)) 175 endif 176 if (cfg%Lcltcalipsoun) then 177 where(cospOUT%calipso_cldlayerphase(:,4,3) == R_UNDEF) cospOUT%calipso_cldlayerphase(:,4,3) = missing_val 178 CALL histwrite2d_cosp(o_cltcalipsoun,cospOUT%calipso_cldlayerphase(:,4,3)) 179 endif 180 if (cfg%Lclcalipsoun) then 181 where(cospOUT%calipso_lidarcldphase(:,:,3) == R_UNDEF) cospOUT%calipso_lidarcldphase(:,:,3) = missing_val 182 CALL histwrite3d_cosp(o_clcalipsoun,cospOUT%calipso_lidarcldphase(:,:,3),nvert) 183 endif 184 if (cfg%Lclcalipsotmpun) then 185 where(cospOUT%calipso_lidarcldtmp(:,:,4) == R_UNDEF) cospOUT%calipso_lidarcldtmp(:,:,4) = missing_val 186 CALL histwrite3d_cosp(o_clcalipsotmpun,cospOUT%calipso_lidarcldtmp(:,:,4),nverttemp) 187 endif 188 189 if (cfg%Lclopaquecalipso) then 190 where(cospOUT%calipso_cldtype(:,1) == R_UNDEF) cospOUT%calipso_cldtype(:,1) = missing_val 191 CALL histwrite2d_cosp(o_clopaquecalipso,cospOUT%calipso_cldtype(:,1)) 192 endif 193 if (cfg%Lclthincalipso) then 194 where(cospOUT%calipso_cldtype(:,2) == R_UNDEF) cospOUT%calipso_cldtype(:,2) = missing_val 195 CALL histwrite2d_cosp(o_clthincalipso,cospOUT%calipso_cldtype(:,2)) 196 endif 197 if (cfg%Lclzopaquecalipso) then 198 where(cospOUT%calipso_cldtype(:,3) == R_UNDEF) cospOUT%calipso_cldtype(:,3) = missing_val 199 CALL histwrite2d_cosp(o_clzopaquecalipso,cospOUT%calipso_cldtype(:,3)) 200 endif 201 if (cfg%Lclcalipsoopaque) then 202 where(cospOUT%calipso_lidarcldtype(:,:,1) == R_UNDEF) cospOUT%calipso_lidarcldtype(:,:,1) = missing_val 203 CALL histwrite3d_cosp(o_clcalipsoopaque,cospOUT%calipso_lidarcldtype(:,:,1),nvert) 204 endif 205 if (cfg%Lclcalipsothin) then 206 where(cospOUT%calipso_lidarcldtype(:,:,2) == R_UNDEF) cospOUT%calipso_lidarcldtype(:,:,2) = missing_val 207 CALL histwrite3d_cosp(o_clcalipsothin,cospOUT%calipso_lidarcldtype(:,:,2),nvert) 208 endif 209 if (cfg%Lclcalipsozopaque) then 210 where(cospOUT%calipso_lidarcldtype(:,:,3) == R_UNDEF) cospOUT%calipso_lidarcldtype(:,:,3) = missing_val 211 CALL histwrite3d_cosp(o_clcalipsozopaque,cospOUT%calipso_lidarcldtype(:,:,3),nvert) 212 endif 213 if (cfg%Lclcalipsoopacity) then 214 where(cospOUT%calipso_lidarcldtype(:,:,4) == R_UNDEF) cospOUT%calipso_lidarcldtype(:,:,4) = missing_val 215 CALL histwrite3d_cosp(o_clcalipsoopacity,cospOUT%calipso_lidarcldtype(:,:,4),nvert) 216 endif 217 218 if (cfg%Lclopaquetemp) then 219 where(cospOUT%calipso_cldtypetemp(:,1) == R_UNDEF) cospOUT%calipso_cldtypetemp(:,1) = missing_val 220 CALL histwrite2d_cosp(o_clopaquetemp,cospOUT%calipso_cldtypetemp(:,1)) 221 endif 222 if (cfg%Lclthintemp) then 223 where(cospOUT%calipso_cldtypetemp(:,2) == R_UNDEF) cospOUT%calipso_cldtypetemp(:,2) = missing_val 224 CALL histwrite2d_cosp(o_clthintemp,cospOUT%calipso_cldtypetemp(:,2)) 225 endif 226 if (cfg%Lclzopaquetemp) then 227 where(cospOUT%calipso_cldtypetemp(:,3) == R_UNDEF) cospOUT%calipso_cldtypetemp(:,3) = missing_val 228 CALL histwrite2d_cosp(o_clzopaquetemp,cospOUT%calipso_cldtypetemp(:,3)) 229 endif 230 if (cfg%Lclopaquemeanz) then 231 where(cospOUT%calipso_cldtypemeanz(:,1) == R_UNDEF) cospOUT%calipso_cldtypemeanz(:,1) = missing_val 232 CALL histwrite2d_cosp(o_clopaquemeanz,cospOUT%calipso_cldtypemeanz(:,1)) 233 endif 234 if (cfg%Lclthinmeanz) then 235 where(cospOUT%calipso_cldtypemeanz(:,2) == R_UNDEF) cospOUT%calipso_cldtypemeanz(:,2) = missing_val 236 CALL histwrite2d_cosp(o_clthinmeanz,cospOUT%calipso_cldtypemeanz(:,2)) 237 endif 238 if (cfg%Lclthinemis) then 239 where(cospOUT%calipso_cldthinemis == R_UNDEF) cospOUT%calipso_cldthinemis = missing_val 240 CALL histwrite2d_cosp(o_clthinemis,cospOUT%calipso_cldthinemis) 241 endif 242 if (cfg%Lclopaquemeanzse) then 243 where(cospOUT%calipso_cldtypemeanzse(:,1) == R_UNDEF) cospOUT%calipso_cldtypemeanzse(:,1) = missing_val 244 CALL histwrite2d_cosp(o_clopaquemeanzse,cospOUT%calipso_cldtypemeanzse(:,1)) 245 endif 246 if (cfg%Lclthinmeanzse) then 247 where(cospOUT%calipso_cldtypemeanzse(:,2) == R_UNDEF) cospOUT%calipso_cldtypemeanzse(:,2) = missing_val 248 CALL histwrite2d_cosp(o_clthinmeanzse,cospOUT%calipso_cldtypemeanzse(:,2)) 249 endif 250 if (cfg%Lclzopaquecalipsose) then 251 where(cospOUT%calipso_cldtypemeanzse(:,3) == R_UNDEF) cospOUT%calipso_cldtypemeanzse(:,3) = missing_val 252 CALL histwrite2d_cosp(o_clzopaquecalipsose,cospOUT%calipso_cldtypemeanzse(:,3)) 253 endif 254 255 256 if (cfg%LcfadLidarsr532) then 257 where(cospOUT%calipso_cfad_sr == R_UNDEF) cospOUT%calipso_cfad_sr = missing_val 258 259 do icl=1,SR_BINS 260 do k=1,Nlvgrid 261 do ip=1,Npoints 262 tmp_fi4da_cfadL(ip,k,icl)=cospOUT%calipso_cfad_sr(ip,icl,k) 263 enddo 264 enddo 265 enddo 204 266 ! if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 205 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfadLidarsr532,tmp_fi4da_cfadL) !!! "_" enleve 206 #else 207 if (cfg%LcfadLidarsr532) then 208 do icl=1,SR_BINS 209 CALL histwrite3d_cosp(o_cfadLidarsr532,cospOUT%calipso_cfad_sr(:,icl,:),nvert,icl) !!! "_" enleve 210 enddo 211 endif 212 #endif 213 214 #ifdef CPP_XIOS 215 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,cospOUT%calipso_beta_tot) 216 #else 267 CALL histwrite4d_cosp(o_cfadLidarsr532,tmp_fi4da_cfadL) !!! "_" enleve 268 endif 269 217 270 if (cfg%Latb532) then 218 do icl=1,Ncolumns219 CALL histwrite3d_cosp(o_atb532,cospOUT%calipso_beta_tot(:,icl,:),nvertmcosp,icl)220 enddo221 endif222 #endif 223 224 if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_lidarBetaMol532,cospOUT%calipso_beta_mol,nvertmcosp)271 where(cospOUT%calipso_beta_tot == R_UNDEF) cospOUT%calipso_beta_tot = missing_val 272 CALL histwrite4d_cosp(o_atb532,cospOUT%calipso_beta_tot) 273 endif 274 if (cfg%LlidarBetaMol532) then 275 where(cospOUT%calipso_tau_tot == R_UNDEF) cospOUT%calipso_tau_tot = missing_val 276 CALL histwrite3d_cosp(o_lidarBetaMol532,cospOUT%calipso_beta_mol,nvertmcosp) 277 endif 225 278 226 279 endif !Calipso … … 245 298 if (cfg%LlidarBetaMol532gr) CALL histwrite3d_cosp(o_lidarBetaMol532gr,cospOUT%grLidar532_beta_mol,nvertmcosp) 246 299 247 #ifdef CPP_XIOS248 300 do icl=1,SR_BINS 249 tmp_fi4da_cfadLgr(:,:,icl)=cospOUT%grLidar532_cfad_sr(:,icl,:) 301 do k=1,Nlvgrid 302 do ip=1,Npoints 303 tmp_fi4da_cfadLgr(ip,k,icl)=cospOUT%grLidar532_cfad_sr(ip,icl,k) 304 enddo 305 enddo 250 306 enddo 251 307 if (cfg%LcfadLidarsr532gr) CALL histwrite4d_cosp(o_cfadLidarsr532gr,tmp_fi4da_cfadLgr) 252 #else 253 if (cfg%LcfadLidarsr532gr) then 254 do icl=1,SR_BINS 255 CALL histwrite3d_cosp(o_cfadLidarsr532gr,cospOUT%grLidar532_cfad_sr(:,icl,:),nvert,icl) 256 enddo 257 endif 258 #endif 259 260 #ifdef CPP_XIOS 308 261 309 if (cfg%Latb532gr) CALL histwrite4d_cosp(o_atb532gr,cospOUT%grLidar532_beta_tot) 262 #else263 if (cfg%Latb532gr) then264 do icl=1,Ncolumns265 CALL histwrite3d_cosp(o_atb532gr,cospOUT%grLidar532_beta_tot(:,icl,:),nvertmcosp,icl)266 enddo267 endif268 #endif269 310 270 311 endif ! Ground Lidar 532 nm … … 289 330 if (cfg%LlidarBetaMol355) CALL histwrite3d_cosp(o_lidarBetaMol355,cospOUT%atlid_beta_mol,nvertmcosp) 290 331 291 #ifdef CPP_XIOS292 332 do icl=1,SR_BINS 293 tmp_fi4da_cfadLatlid(:,:,icl)=cospOUT%atlid_cfad_sr(:,icl,:) 333 do k=1,Nlvgrid 334 do ip=1,Npoints 335 tmp_fi4da_cfadLatlid(ip,k,icl)=cospOUT%atlid_cfad_sr(ip,icl,k) 336 enddo 337 enddo 294 338 enddo 295 339 if (cfg%LcfadLidarsr355) CALL histwrite4d_cosp(o_cfadlidarsr355,tmp_fi4da_cfadLatlid) 296 #else 297 if (cfg%LcfadLidarsr355) then 298 do icl=1,SR_BINS 299 CALL histwrite3d_cosp(o_cfadlidarsr355,cospOUT%atlid_cfad_sr(:,icl,:),nvert,icl) 300 enddo 301 endif 302 #endif 303 304 #ifdef CPP_XIOS 340 305 341 if (cfg%Latb355) CALL histwrite4d_cosp(o_atb355,cospOUT%atlid_beta_tot) 306 #else307 if (cfg%Latb355) then308 do icl=1,Ncolumns309 CALL histwrite3d_cosp(o_atb355,cospOUT%atlid_beta_tot(:,icl,:),nvertmcosp,icl)310 enddo311 endif312 #endif313 342 314 343 endif ! Atlid … … 322 351 CALL histwrite3d_cosp(o_parasolGrid_refl,cospOUT%parasolGrid_refl,nvertp) 323 352 324 #ifdef CPP_XIOS325 353 CALL histwrite4d_cosp(o_parasolPix_refl,cospOUT%parasolPix_refl) 326 #else327 do icl=1,Ncolumns328 CALL histwrite3d_cosp(o_parasolPix_refl,cospOUT%parasolPix_refl(:,icl,:),nvertp,icl)329 enddo330 #endif331 354 332 355 endif ! LparasolRefl … … 371 394 if (cfg%Lradarpia) CALL histwrite2d_cosp(o_radarpia,cospOUT%cloudsat_pia) 372 395 373 #ifdef CPP_XIOS374 396 do icl=1,CLOUDSAT_DBZE_BINS 375 tmp_fi4da_cfadR(:,:,icl)=cospOUT%cloudsat_cfad_ze(:,icl,:) 397 do k=1,Nlvgrid 398 do ip=1,Npoints 399 tmp_fi4da_cfadR(ip,k,icl)=cospOUT%cloudsat_cfad_ze(ip,icl,k) 400 enddo 401 enddo 376 402 enddo 377 403 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,cospOUT%cloudsat_Ze_tot) 378 404 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 379 405 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 380 #else381 if (cfg%Ldbze94) then382 do icl=1,Ncolumns383 CALL histwrite3d_cosp(o_dbze94,cospOUT%cloudsat_Ze_tot(:,icl,:),nvert,icl)384 enddo385 endif386 if (cfg%LcfadDbze94) then387 do icl=1,CLOUDSAT_DBZE_BINS388 CALL histwrite3d_cosp(o_cfadDbze94,cospOUT%cloudsat_cfad_ze(:,icl,:),nvert,icl)389 enddo390 endif391 #endif392 406 endif 393 407 ! endif pour CloudSat … … 425 439 426 440 ! CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 427 #ifdef CPP_XIOS428 441 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp,cospOUT%isccp_fq) 429 #else430 if (cfg%Lclisccp) then431 do icl=1,7432 CALL histwrite3d_cosp(o_clisccp,cospOUT%isccp_fq(:,icl,:),nvertisccp,icl)433 enddo434 endif435 #endif436 442 437 443 if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,cospOUT%isccp_boxtau,nvertcol) … … 456 462 where(cospOUT%misr_cldarea == R_UNDEF) cospOUT%misr_cldarea = missing_val 457 463 458 #ifdef CPP_XIOS459 464 do icl=1,numMISRHgtBins 460 tmp_fi4da_misr(:,icl,:)=cospOUT%misr_fq(:,:,icl) 465 do k=1,Nlvgrid 466 do ip=1,Npoints 467 tmp_fi4da_misr(ip,icl,k)=cospOUT%misr_fq(ip,k,icl) 468 enddo 469 enddo 461 470 enddo 462 471 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 463 472 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr) 464 473 CALL histwrite4d_cosp(o_misr_fq,tmp_fi4da_misr) 465 #else466 do icl=1,7467 CALL histwrite3d_cosp(o_misr_fq,cospOUT%misr_fq(:,icl,:),nvertmisr,icl)468 enddo469 #endif470 474 471 475 CALL histwrite2d_cosp(o_misr_meanztop,cospOUT%misr_meanztop) … … 540 544 cospOUT%modis_Optical_thickness_vs_ReffLIQ = missing_val 541 545 542 #ifdef CPP_XIOS543 546 CALL histwrite4d_cosp(o_modis_ot_vs_ctp,cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure) 544 547 CALL histwrite4d_cosp(o_modis_ot_vs_reffice,cospOUT%modis_Optical_Thickness_vs_ReffICE) 545 548 CALL histwrite4d_cosp(o_modis_ot_vs_reffliq,cospOUT%modis_Optical_thickness_vs_ReffLIQ) 546 #else 547 do icl=1,7 548 CALL histwrite3d_cosp(o_modis_ot_vs_ctp, & 549 cospOUT%modis_Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 550 CALL histwrite3d_cosp(o_modis_ot_vs_reffice, & 551 cospOUT%modis_Optical_Thickness_vs_ReffICE(:,icl,:),nvertReffIce,icl) 552 CALL histwrite3d_cosp(o_modis_ot_vs_reffliq, & 553 cospOUT%modis_Optical_thickness_vs_ReffLIQ(:,icl,:),nvertReffLiq,icl) 554 enddo 555 #endif 556 557 !#ifdef CPP_XIOS 558 ! if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 559 ! if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 560 !#else 561 ! if (cfg%Lclmodis) then 562 ! do icl=1,7 563 ! CALL histwrite3d_cosp(o_crimodis, & 564 ! modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 565 ! enddo 566 ! endif 567 ! if (cfg%Lclmodis) then 568 ! do icl=1,7 569 ! CALL histwrite3d_cosp(o_crlmodis, & 570 ! modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 571 ! enddo 572 ! endif 573 !#endif 549 574 550 endif ! Lclmodis 575 551 … … 579 555 IF(.NOT.cosp_varsdefined) THEN 580 556 !$OMP MASTER 581 #ifndef CPP_IOIPSL_NO_OUTPUT582 DO iff=1,3583 IF (cosp_outfilekeys(iff)) THEN584 CALL histend(cosp_nidfiles(iff))585 ENDIF ! cosp_outfilekeys586 ENDDO ! iff587 #endif588 557 ! Fermeture dans phys_output_write 589 !#ifdef CPP_XIOS558 !#ifdef 1 590 559 !On finalise l'initialisation: 591 560 !CALL wxios_closedef() … … 599 568 IF(cosp_varsdefined) THEN 600 569 ! On synchronise les fichiers pour IOIPSL 601 #ifndef CPP_IOIPSL_NO_OUTPUT602 !$OMP MASTER603 DO iff=1,3604 IF (ok_sync .AND. cosp_outfilekeys(iff)) THEN605 CALL histsync(cosp_nidfiles(iff))606 ENDIF607 END DO608 !$OMP END MASTER609 #endif610 570 ENDIF !cosp_varsdefined 611 571 … … 628 588 USE mod_grid_phy_lmdz, ONLY: nbp_lon 629 589 USE print_control_mod, ONLY: lunout,prt_level 630 #ifdef CPP_XIOS631 590 USE wxios 632 #endif633 591 634 592 IMPLICIT NONE … … 662 620 ENDIF 663 621 664 #ifdef CPP_XIOS665 622 IF (.not. ok_all_xml) then 666 623 IF ( var%cles(iff) ) THEN … … 672 629 ENDIF 673 630 ENDIF 674 #endif 675 676 #ifndef CPP_IOIPSL_NO_OUTPUT 677 IF ( var%cles(iff) ) THEN 678 CALL histdef (cosp_nidfiles(iff), var%name, var%description, var%unit, & 679 nbp_lon,jj_nb,nhoricosp(iff), 1,1,1, -99, 32, & 680 typeecrit, zstophym,zoutm_cosp(iff)) 681 ENDIF 682 #endif 631 683 632 684 633 END SUBROUTINE histdef2d_cosp … … 693 642 USE print_control_mod, ONLY: lunout,prt_level 694 643 695 #ifdef CPP_XIOS696 644 USE wxios 697 #endif698 645 699 646 … … 769 716 ENDIF 770 717 771 #ifdef CPP_XIOS772 718 IF (.not. ok_all_xml) then 773 719 IF ( var%cles(iff) ) THEN … … 779 725 ENDIF 780 726 ENDIF 781 #endif 782 783 #ifndef CPP_IOIPSL_NO_OUTPUT 784 IF ( var%cles(iff) ) THEN 785 CALL histdef (cosp_nidfiles(iff), nom, var%description, var%unit, & 786 nbp_lon, jj_nb, nhoricosp(iff), klevs, 1, & 787 klevs, nvertsave, 32, typeecrit, & 788 zstophym, zoutm_cosp(iff)) 789 ENDIF 790 #endif 727 791 728 792 729 END SUBROUTINE histdef3d_cosp … … 801 738 USE print_control_mod, ONLY: lunout,prt_level 802 739 803 #ifdef CPP_XIOS804 740 USE xios, only: xios_send_field 805 #endif806 741 807 742 IMPLICIT NONE … … 826 761 IF(.NOT.cosp_varsdefined) THEN 827 762 !$OMP MASTER 763 print*,'var, cosp_varsdefined dans cosp_varsdefined ',var%name, cosp_varsdefined 828 764 !Si phase de définition.... on définit 829 765 CALL conf_cospoutputs(var%name,var%cles) … … 848 784 IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN 849 785 ALLOCATE(index2d(nbp_lon*jj_nb)) 850 #ifndef CPP_IOIPSL_NO_OUTPUT851 CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,nbp_lon*jj_nb,index2d)852 #endif853 786 deallocate(index2d) 854 #ifdef CPP_XIOS855 787 IF (.not. ok_all_xml) then 856 788 if (firstx) then … … 862 794 endif 863 795 ENDIF 864 #endif865 796 ENDIF 866 797 ENDDO 867 798 868 #ifdef CPP_XIOS869 799 IF (ok_all_xml) THEN 870 800 if (prt_level >= 1) then … … 873 803 CALL xios_send_field(var%name, Field2d) 874 804 ENDIF 875 #endif876 805 877 806 !$OMP END MASTER … … 891 820 USE print_control_mod, ONLY: lunout,prt_level 892 821 893 #ifdef CPP_XIOS894 822 USE xios, only: xios_send_field 895 #endif896 823 897 824 … … 952 879 IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN 953 880 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 954 #ifndef CPP_IOIPSL_NO_OUTPUT 955 CALL histwrite(cosp_nidfiles(iff),nom,itau_iocosp,Field3d,nbp_lon*jj_nb*nlev,index3d) 956 #endif 957 958 #ifdef CPP_XIOS 881 959 882 IF (.not. ok_all_xml) then 960 883 IF (firstx) THEN … … 964 887 ENDIF 965 888 ENDIF 966 #endif967 889 deallocate(index3d) 968 890 ENDIF 969 891 ENDDO 970 #ifdef CPP_XIOS971 892 IF (ok_all_xml) THEN 972 893 CALL xios_send_field(nom, Field3d(:,:,1:nlev)) 973 894 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 974 895 ENDIF 975 #endif976 896 977 897 !$OMP END MASTER … … 991 911 USE print_control_mod, ONLY: lunout,prt_level 992 912 993 #ifdef CPP_XIOS994 913 USE xios, only: xios_send_field 995 #endif996 914 997 915 … … 1023 941 CALL grid1Dto2D_mpi(buffer_omp,field4d) 1024 942 1025 #ifdef CPP_XIOS1026 943 ! IF (ok_all_xml) THEN 1027 944 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 1028 945 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 1029 946 ! ENDIF 1030 #endif1031 947 1032 948 !$OMP END MASTER
Note: See TracChangeset
for help on using the changeset viewer.