Changeset 4619 for LMDZ6/trunk/libf/phylmd
- Timestamp:
- Jul 10, 2023, 1:40:39 AM (12 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r4593 r4619 389 389 USE iophy, ONLY: set_itau_iophy, histwrite_phy 390 390 USE netcdf, ONLY: nf90_fill_real 391 392 #ifdef CPP_XIOS393 391 ! ug Pour les sorties XIOS 394 USE xios, ONLY: xios_update_calendar 395 USE wxios, ONLY: wxios_closedef, missing_val 396 #endif 392 USE lmdz_xios, ONLY: xios_update_calendar, using_xios 393 USE wxios, ONLY: wxios_closedef, missing_val_xios => missing_val 397 394 USE phys_cal_mod, ONLY : mth_len 398 395 … … 438 435 INTEGER, DIMENSION(iim*jjmp1*klev) :: ndex3d 439 436 REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 440 ! REAL, PARAMETER :: missing_val=nf90_fill_real441 #ifndef CPP_XIOS442 437 REAL :: missing_val 443 #endif444 438 REAL, PARAMETER :: un_jour=86400. 439 440 IF (using_xios) THEN 441 missing_val=missing_val_xios 442 ELSE 443 missing_val=nf90_fill_real 444 ENDIF 445 445 446 446 ! On calcul le nouveau tau: … … 460 460 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage: 461 461 DO iinit=1, iinitend 462 #ifdef CPP_XIOS 463 !$OMP MASTER 464 IF (vars_defined) THEN 465 IF (prt_level >= 10) THEN 466 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 467 ENDIF 468 ! CALL xios_update_calendar(itau_w) 469 CALL xios_update_calendar(itap) 470 ENDIF 471 !$OMP END MASTER 472 !$OMP BARRIER 473 #endif 462 IF (using_xios) THEN 463 !$OMP MASTER 464 IF (vars_defined) THEN 465 IF (prt_level >= 10) THEN 466 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 467 ENDIF 468 ! CALL xios_update_calendar(itau_w) 469 CALL xios_update_calendar(itap) 470 ENDIF 471 !$OMP END MASTER 472 !$OMP BARRIER 473 ENDIF !using_xios 474 474 475 ! On procède à l'écriture ou à la définition des nombreuses variables: 475 476 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 828 829 829 830 #ifdef CPP_IOIPSL 830 #ifndef CPP_XIOS 831 IF (.NOT.ok_all_xml) THEN832 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:833 ! Champs interpolles sur des niveaux de pression834 missing_val=missing_val_nf90835 DO iff=1, nfiles836 ll=0837 DO k=1, nlevSTD838 bb2=clevSTD(k)839 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &840 bb2.EQ."500".OR.bb2.EQ."200".OR. &841 bb2.EQ."100".OR. &842 bb2.EQ."50".OR.bb2.EQ."10") THEN 843 844 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!845 ll=ll+1846 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff)847 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff)848 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff)849 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff)850 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff)851 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 852 853 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR.854 855 ENDDO856 ENDIF 831 IF (.NOT. using_xios) THEN 832 IF (.NOT.ok_all_xml) THEN 833 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 834 ! Champs interpolles sur des niveaux de pression 835 DO iff=1, nfiles 836 ll=0 837 DO k=1, nlevSTD 838 bb2=clevSTD(k) 839 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 840 bb2.EQ."500".OR.bb2.EQ."200".OR. & 841 bb2.EQ."100".OR. & 842 bb2.EQ."50".OR.bb2.EQ."10") THEN 843 844 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 845 ll=ll+1 846 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff) 847 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff) 848 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff) 849 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff) 850 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff) 851 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 852 853 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 854 ENDDO 855 ENDDO 856 ENDIF 857 ENDIF !.NOT.using_xios 857 858 #endif 858 #endif 859 860 #ifdef CPP_XIOS 861 IF (ok_all_xml) THEN 862 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 863 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 859 860 IF (using_xios) THEN 861 IF (ok_all_xml) THEN 862 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 863 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 864 864 ll=0 865 865 DO k=1, nlevSTD … … 878 878 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 879 879 ENDDO 880 ENDIF881 #endif 880 ENDIF 881 ENDIF !using_xios 882 882 IF (vars_defined) THEN 883 883 DO i=1, klon … … 1471 1471 !!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!! 1472 1472 #ifdef CPP_IOIPSL 1473 #ifndef CPP_XIOS 1474 IF (.NOT. ok_all_xml) THEN1475 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:1476 ! Champs interpolles sur des niveaux de pression1477 missing_val=missing_val_nf901473 1474 IF (.NOT. using_xios) THEN 1475 IF (.NOT.ok_all_xml) THEN 1476 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 1477 ! Champs interpolles sur des niveaux de pression 1478 1478 DO iff=7, nfiles-1 !--here we deal with files 7,8 and 9 1479 1479 … … 1539 1539 CALL histwrite_phy(o_TxT,T2sumSTD(:,:,iff-6),iff) 1540 1540 ENDDO !nfiles 1541 ENDIF 1541 1542 ENDIF 1542 1543 #endif 1543 #endif 1544 #ifdef CPP_XIOS 1544 1545 IF (using_xios) THEN 1545 1546 IF (ok_all_xml) THEN 1546 1547 ! DO iff=7, nfiles … … 1607 1608 CALL histwrite_phy(o_TxT,T2STD(:,:)) 1608 1609 ! ENDDO !nfiles 1609 ENDIF1610 #endif 1610 ENDIF 1611 ENDIF !using_xios 1611 1612 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1612 1613 itr = 0 … … 1651 1652 ENDDO ! iff 1652 1653 #endif 1653 #ifdef CPP_XIOS1654 1654 !On finalise l'initialisation: 1655 CALL wxios_closedef() 1656 #endif 1655 IF (using_xios) CALL wxios_closedef() 1657 1656 1658 1657 !$OMP END MASTER -
LMDZ6/trunk/libf/phylmd/cosp/cosp_output_mod.F90
r3308 r4619 235 235 USE time_phylmdz_mod, ONLY: day_ref, annee_ref, day_ini, start_time, itau_phy 236 236 USE print_control_mod, ONLY: lunout 237 238 #ifdef CPP_XIOS 239 ! ug Pour les sorties XIOS 240 USE wxios 241 #endif 237 ! ug Pour les sorties XIOS 238 USE wxios 242 239 243 240 IMPLICIT NONE … … 263 260 !!! Variables d'entree 264 261 265 #ifdef CPP_XIOS 266 ! ug Variables utilisées pour récupérer le calendrier pour xios 267 INTEGER :: x_an, x_mois, x_jour 268 REAL :: x_heure 269 INTEGER :: ini_an, ini_mois, ini_jour 270 REAL :: ini_heure 271 #endif 262 ! ug Variables utilisées pour récupérer le calendrier pour xios 263 INTEGER :: x_an, x_mois, x_jour 264 REAL :: x_heure 265 INTEGER :: ini_an, ini_mois, ini_jour 266 REAL :: ini_heure 272 267 273 268 WRITE(lunout,*) 'Debut cosp_output_mod.F90' … … 316 311 CALL ymds2ju(annee_ref, 1, day_ini, start_time, zjulian_start) 317 312 318 #ifdef CPP_XIOS 313 IF (using_xios) THEN 319 314 320 ! recuperer la valeur indefine Xios321 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value)322 ! Cosp_fill_value=missing_val323 Cosp_fill_value=0.324 print*,'Cosp_fill_value=',Cosp_fill_value325 ! if (use_vgrid) then326 ! print*,'vgrid%Nlvgrid, vgrid%z = ',vgrid%Nlvgrid, vgrid%z327 CALL wxios_add_vaxis("height", vgrid%Nlvgrid, vgrid%z)328 print*,'wxios_add_vaxis '329 ! else330 ! WRITE(lunout,*) 'wxios_add_vaxis "presnivs", vgrid%Nlvgrid ',vgrid%Nlvgrid331 ! CALL wxios_add_vaxis("presnivs", vgrid%Nlvgrid, presnivs)332 ! endif333 WRITE(lunout,*) 'wxios_add_vaxis height_mlev, Nlevlmdz ',Nlevlmdz334 CALL wxios_add_vaxis("height_mlev", Nlevlmdz, vgrid%mz)335 WRITE(lunout,*) 'wxios_add_vaxis sza, PARASOL_NREFL ',PARASOL_NREFL336 CALL wxios_add_vaxis("sza", PARASOL_NREFL, PARASOL_SZA)337 WRITE(lunout,*) 'wxios_add_vaxis pressure2 ',7338 CALL wxios_add_vaxis("pressure2", 7, ISCCP_PC)339 WRITE(lunout,*) 'wxios_add_vaxis column ',Ncolumns340 CALL wxios_add_vaxis("column", Ncolumns, column_ax)341 342 ! AI nov 2015343 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP)344 CALL wxios_add_vaxis("cth", MISR_N_CTH, MISR_CTH)345 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax)346 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax)347 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters)348 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters)349 print*,'reffICE_binCenters=',reffICE_binCenters350 CALL wxios_add_vaxis("tau", 7, ISCCP_TAU)351 352 #endif 315 ! recuperer la valeur indefine Xios 316 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value) 317 ! Cosp_fill_value=missing_val 318 Cosp_fill_value=0. 319 print*,'Cosp_fill_value=',Cosp_fill_value 320 ! if (use_vgrid) then 321 ! print*,'vgrid%Nlvgrid, vgrid%z = ',vgrid%Nlvgrid, vgrid%z 322 CALL wxios_add_vaxis("height", vgrid%Nlvgrid, vgrid%z) 323 print*,'wxios_add_vaxis ' 324 ! else 325 ! WRITE(lunout,*) 'wxios_add_vaxis "presnivs", vgrid%Nlvgrid ',vgrid%Nlvgrid 326 ! CALL wxios_add_vaxis("presnivs", vgrid%Nlvgrid, presnivs) 327 ! endif 328 WRITE(lunout,*) 'wxios_add_vaxis height_mlev, Nlevlmdz ',Nlevlmdz 329 CALL wxios_add_vaxis("height_mlev", Nlevlmdz, vgrid%mz) 330 WRITE(lunout,*) 'wxios_add_vaxis sza, PARASOL_NREFL ',PARASOL_NREFL 331 CALL wxios_add_vaxis("sza", PARASOL_NREFL, PARASOL_SZA) 332 WRITE(lunout,*) 'wxios_add_vaxis pressure2 ',7 333 CALL wxios_add_vaxis("pressure2", 7, ISCCP_PC) 334 WRITE(lunout,*) 'wxios_add_vaxis column ',Ncolumns 335 CALL wxios_add_vaxis("column", Ncolumns, column_ax) 336 337 ! AI nov 2015 338 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP) 339 CALL wxios_add_vaxis("cth", MISR_N_CTH, MISR_CTH) 340 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax) 341 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax) 342 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters) 343 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters) 344 print*,'reffICE_binCenters=',reffICE_binCenters 345 CALL wxios_add_vaxis("tau", 7, ISCCP_TAU) 346 347 ENDIF 353 348 354 349 zdtimemoy_cosp = freq_COSP ! Frequence ou l on moyenne … … 363 358 ! nhoricosp(iff),cosp_nidfiles(iff) 364 359 365 #ifdef CPP_XIOS 366 IF (.not. ok_all_xml) then367 WRITE(lunout,*) 'wxios_add_file ',cosp_outfilenames(iff)368 CALL wxios_add_file(cosp_outfilenames(iff),chfreq(iff),10)369 ENDIF370 #endif 360 IF (using_xios) THEN 361 IF (.not. ok_all_xml) then 362 WRITE(lunout,*) 'wxios_add_file ',cosp_outfilenames(iff) 363 CALL wxios_add_file(cosp_outfilenames(iff),chfreq(iff),10) 364 ENDIF 365 ENDIF 371 366 372 367 #ifndef CPP_IOIPSL_NO_OUTPUT -
LMDZ6/trunk/libf/phylmd/cosp/cosp_output_write_mod.F90
r3308 r4619 26 26 USE time_phylmdz_mod, ONLY: itau_phy, start_time, day_step_phy 27 27 USE print_control_mod, ONLY: lunout,prt_level 28 29 #ifdef CPP_XIOS30 28 USE wxios, only: wxios_closedef 31 USE xios, only: xios_update_calendar, xios_field_is_active 32 #endif 29 USE lmdz_xios, only: xios_update_calendar, xios_field_is_active, using_xios 33 30 IMPLICIT NONE 34 31 !!! Variables d'entree … … 58 55 real, dimension(Npoints,MISR_N_CTH,7) :: tmp_fi4da_misr 59 56 60 #ifdef CPP_XIOS 61 missing_val=missing_cosp62 #else 63 missing_val=0.64 #endif 57 IF (using_xios) THEN 58 missing_val=missing_cosp 59 ELSE 60 missing_val=0. 61 ENDIF 65 62 66 63 Nlevout = vgrid%Nlvgrid … … 90 87 ! endif 91 88 92 !! #ifdef CPP_XIOS89 !!IF (using_xios) THEN 93 90 ! !$OMP MASTER 94 91 !IF (cosp_varsdefined) THEN … … 101 98 ! !$OMP END MASTER 102 99 ! !$OMP BARRIER 103 !! #endif100 !!ENDIF 104 101 105 102 !!!! Sorties Calipso … … 163 160 if (cfg%Lproftemp) CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO 164 161 165 #ifdef CPP_XIOS 166 do icl=1,SR_BINS 167 tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:) 168 enddo 169 ! if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 170 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL) 171 if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 172 #else 173 if (cfg%LcfadLidarsr532) then 162 IF (using_xios) THEN 174 163 do icl=1,SR_BINS 175 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl)164 tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:) 176 165 enddo 177 endif 178 if (cfg%LprofSR) then 179 do icl=1,Ncolumns !TIBO 180 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 181 enddo !TIBO 182 endif 183 #endif 166 ! if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 167 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL) 168 if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 169 ELSE 170 if (cfg%LcfadLidarsr532) then 171 do icl=1,SR_BINS 172 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 173 enddo 174 endif 175 if (cfg%LprofSR) then 176 do icl=1,Ncolumns !TIBO 177 CALL histwrite3d_cosp(o_profSR,stlidar%profSR(:,icl,:),nvert,icl) !TIBO 178 enddo !TIBO 179 endif 180 ENDIF 181 184 182 if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 185 183 … … 201 199 endif 202 200 203 #ifdef CPP_XIOS 204 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot)205 #else 206 if (cfg%Latb532) then207 do icl=1,Ncolumns208 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl)209 enddo210 endif211 #endif 201 IF (using_xios) THEN 202 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 203 ELSE 204 if (cfg%Latb532) then 205 do icl=1,Ncolumns 206 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 207 enddo 208 endif 209 ENDIF 212 210 213 211 if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) … … 219 217 220 218 where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val 221 #ifdef CPP_XIOS 222 do icl=1,DBZE_BINS223 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:)224 enddo225 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot)226 !if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze)227 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR)228 #else 229 if (cfg%Ldbze94) then230 do icl=1,Ncolumns231 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl)232 enddo233 endif234 if (cfg%LcfadDbze94) then235 do icl=1,DBZE_BINS236 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl)237 enddo238 endif239 #endif 219 IF (using_xios) THEN 220 do icl=1,DBZE_BINS 221 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:) 222 enddo 223 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 224 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 225 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 226 ELSE 227 if (cfg%Ldbze94) then 228 do icl=1,Ncolumns 229 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl) 230 enddo 231 endif 232 if (cfg%LcfadDbze94) then 233 do icl=1,DBZE_BINS 234 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 235 enddo 236 endif 237 ENDIF 240 238 endif 241 239 ! endif pour radar … … 264 262 265 263 CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 266 #ifdef CPP_XIOS 267 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)268 #else 269 if (cfg%Lclisccp) then270 do icl=1,7271 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl)272 enddo273 endif274 #endif 264 IF (using_xios) THEN 265 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp) 266 ELSE 267 if (cfg%Lclisccp) then 268 do icl=1,7 269 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 270 enddo 271 endif 272 ENDIF 275 273 276 274 if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) … … 288 286 where(misr%fq_MISR == R_UNDEF) misr%fq_MISR = missing_val 289 287 290 #ifdef CPP_XIOS 291 do icl=1,MISR_N_CTH292 tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl)293 enddo294 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR)295 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr)296 #else 297 if (cfg%LclMISR) then298 do icl=1,7299 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl)300 enddo301 endif302 #endif 288 IF (using_xios) THEN 289 do icl=1,MISR_N_CTH 290 tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl) 291 enddo 292 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 293 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr) 294 ELSE 295 if (cfg%LclMISR) then 296 do icl=1,7 297 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 298 enddo 299 endif 300 ENDIF 303 301 endif 304 302 ! endif pour Misr … … 365 363 modis%Optical_Thickness_vs_Cloud_Top_Pressure = missing_val 366 364 367 #ifdef CPP_XIOS 368 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure)369 #else 370 if (cfg%Lclmodis) then371 do icl=1,7372 CALL histwrite3d_cosp(o_clmodis, &373 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl)374 enddo375 endif376 #endif 365 IF (using_xios) THEN 366 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 367 ELSE 368 if (cfg%Lclmodis) then 369 do icl=1,7 370 CALL histwrite3d_cosp(o_clmodis, & 371 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 372 enddo 373 endif 374 ENDIF 377 375 378 376 where(modis%Optical_Thickness_vs_ReffIce == R_UNDEF) & … … 382 380 modis%Optical_Thickness_vs_ReffLiq = missing_val 383 381 384 #ifdef CPP_XIOS 385 if (cfg%Lcrimodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce)386 if (cfg%Lcrlmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq)387 #else 388 if (cfg%Lcrimodis) then389 do icl=1,7390 CALL histwrite3d_cosp(o_crimodis, &391 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl)392 enddo393 endif394 if (cfg%Lcrlmodis) then395 do icl=1,7396 CALL histwrite3d_cosp(o_crlmodis, &397 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl)398 enddo399 endif400 #endif 382 IF (using_xios) THEN 383 if (cfg%Lcrimodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 384 if (cfg%Lcrlmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 385 ELSE 386 if (cfg%Lcrimodis) then 387 do icl=1,7 388 CALL histwrite3d_cosp(o_crimodis, & 389 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 390 enddo 391 endif 392 if (cfg%Lcrlmodis) then 393 do icl=1,7 394 CALL histwrite3d_cosp(o_crlmodis, & 395 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 396 enddo 397 endif 398 ENDIF 401 399 endif !modis 402 400 … … 410 408 ENDDO ! iff 411 409 #endif 412 ! Fermeture dans phys_output_write413 !#ifdef CPP_XIOS414 !On finalise l'initialisation:415 !CALL wxios_closedef()416 !#endif417 410 418 411 !$OMP END MASTER … … 451 444 USE mod_grid_phy_lmdz, ONLY: nbp_lon 452 445 USE print_control_mod, ONLY: lunout,prt_level 453 #ifdef CPP_XIOS 454 USE wxios 455 #endif 446 USE wxios 456 447 457 448 IMPLICIT NONE … … 485 476 ENDIF 486 477 487 #ifdef CPP_XIOS 488 IF (.not. ok_all_xml) then489 IF ( var%cles(iff) ) THEN490 if (prt_level >= 10) then491 492 endif493 CALL wxios_add_field_to_file(var%name, 2, cosp_nidfiles(iff), cosp_outfilenames(iff), &478 IF (using_xios) THEN 479 IF (.not. ok_all_xml) then 480 IF ( var%cles(iff) ) THEN 481 if (prt_level >= 10) then 482 WRITE(lunout,*)'Appel wxios_add_field_to_file var%name =',var%name 483 endif 484 CALL wxios_add_field_to_file(var%name, 2, cosp_nidfiles(iff), cosp_outfilenames(iff), & 494 485 var%description, var%unit, 1, typeecrit) 495 ENDIF496 ENDIF497 #endif 486 ENDIF 487 ENDIF 488 ENDIF 498 489 499 490 #ifndef CPP_IOIPSL_NO_OUTPUT … … 514 505 USE mod_grid_phy_lmdz, ONLY: nbp_lon 515 506 USE print_control_mod, ONLY: lunout,prt_level 516 517 #ifdef CPP_XIOS 518 USE wxios 519 #endif 520 507 USE wxios 521 508 522 509 IMPLICIT NONE … … 591 578 ENDIF 592 579 593 #ifdef CPP_XIOS 580 IF (using_xios) THEN 594 581 IF (.not. ok_all_xml) then 595 582 IF ( var%cles(iff) ) THEN … … 601 588 ENDIF 602 589 ENDIF 603 #endif 590 ENDIF 604 591 605 592 #ifndef CPP_IOIPSL_NO_OUTPUT … … 621 608 USE mod_grid_phy_lmdz, ONLY: nbp_lon 622 609 USE print_control_mod, ONLY: lunout,prt_level 623 624 #ifdef CPP_XIOS 625 USE xios, only: xios_send_field 626 #endif 610 USE lmdz_xios, only: xios_send_field, using_xios 627 611 628 612 IMPLICIT NONE … … 672 656 CALL histwrite(cosp_nidfiles(iff),var%name,itau_iocosp,Field2d,nbp_lon*jj_nb,index2d) 673 657 #endif 674 675 #ifdef CPP_XIOS 658 deallocate(index2d) 659 IF (using_xios) THEN 676 660 IF (.not. ok_all_xml) then 677 661 if (firstx) then … … 683 667 endif 684 668 ENDIF 685 #endif 686 669 ENDIF 670 ENDIF 687 671 ENDDO 688 672 689 #ifdef CPP_XIOS 673 IF (using_xios) THEN 690 674 IF (ok_all_xml) THEN 691 675 if (prt_level >= 1) then … … 694 678 CALL xios_send_field(var%name, Field2d) 695 679 ENDIF 696 #endif 680 ENDIF 697 681 698 682 !$OMP END MASTER … … 710 694 USE mod_grid_phy_lmdz, ONLY: nbp_lon 711 695 USE print_control_mod, ONLY: lunout,prt_level 712 713 #ifdef CPP_XIOS 714 USE xios, only: xios_send_field 715 #endif 716 696 USE lmdz_xios, only: xios_send_field, using_xios 717 697 718 698 IMPLICIT NONE … … 776 756 #endif 777 757 778 #ifdef CPP_XIOS 758 IF (using_xios) THEN 779 759 IF (.not. ok_all_xml) then 780 760 IF (firstx) THEN … … 784 764 ENDIF 785 765 ENDIF 786 #endif 766 ENDIF 787 767 deallocate(index3d) 788 768 ENDIF 789 769 ENDDO 790 #ifdef CPP_XIOS 770 771 IF (using_xios) THEN 791 772 IF (ok_all_xml) THEN 792 773 CALL xios_send_field(nom, Field3d(:,:,1:nlev)) 793 774 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 794 775 ENDIF 795 #endif 776 ENDIF 796 777 797 778 !$OMP END MASTER … … 809 790 USE mod_grid_phy_lmdz, ONLY: nbp_lon 810 791 USE print_control_mod, ONLY: lunout,prt_level 811 812 #ifdef CPP_XIOS 813 USE xios, only: xios_send_field 814 #endif 815 792 USE lmdz_xios, only: xios_send_field, using_xios 816 793 817 794 IMPLICIT NONE … … 842 819 CALL grid1Dto2D_mpi(buffer_omp,field4d) 843 820 844 #ifdef CPP_XIOS 821 IF (using_xios) THEN 845 822 ! IF (ok_all_xml) THEN 846 823 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 847 824 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 848 825 ! ENDIF 849 #endif 826 ENDIF 850 827 851 828 !$OMP END MASTER -
LMDZ6/trunk/libf/phylmd/cosp/cosp_read_otputkeys.F90
r3377 r4619 226 226 227 227 SUBROUTINE READ_COSP_OUTPUT_NL(itap,cosp_nl,cfg) 228 229 #ifdef CPP_XIOS 230 USE xios, ONLY: xios_field_is_active 231 #endif 228 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 232 229 implicit none 233 230 character(len=*),intent(in) :: cosp_nl … … 746 743 USE MOD_COSP_CONSTANTS 747 744 USE MOD_COSP_TYPES 748 #ifdef CPP_XIOS 749 USE xios, ONLY: xios_field_is_active 750 #endif 745 USE lmdz_xios, ONLY: xios_field_is_active,using_xios 751 746 implicit none 752 747 type(cosp_config),intent(out) :: cfg 753 748 integer :: i 754 755 #ifdef CPP_XIOS756 749 757 750 logical :: Lradar_sim,Llidar_sim,Lisccp_sim,Lmodis_sim,Lmisr_sim,Lrttov_sim, Lstats, & … … 776 769 character(len=32) :: out_list(N_OUT_LIST) 777 770 778 do i=1,N_OUT_LIST 779 cfg%out_list(i)='' 780 enddo 771 IF (using_xios) THEN 772 773 do i=1,N_OUT_LIST 774 cfg%out_list(i)='' 775 enddo 781 776 782 777 LcfadDbze94 = .false. … … 1232 1227 cfg%Lrttov_sim = Lrttov_sim 1233 1228 1234 #endif 1229 ENDIF ! using_xios 1235 1230 1236 1231 END SUBROUTINE read_xiosfieldactive -
LMDZ6/trunk/libf/phylmd/cosp/mod_cosp.F90
r4593 r4619 23 23 ! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 25 INCLUDE"cosp_defs.h"25 #include "cosp_defs.h" 26 26 MODULE MOD_COSP 27 27 USE MOD_COSP_TYPES -
LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_constants.F90
r4593 r4619 33 33 ! 34 34 35 INCLUDE "cosp_defs.h"35 #INCLUDE "cosp_defs.h" 36 36 MODULE MOD_COSP_CONSTANTS 37 37 IMPLICIT NONE -
LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_simulator.F90
r4593 r4619 31 31 ! 32 32 33 INCLUDE"cosp_defs.h"33 #include "cosp_defs.h" 34 34 MODULE MOD_COSP_SIMULATOR 35 35 USE MOD_COSP_CONSTANTS, ONLY: I_RADAR, I_LIDAR, I_ISCCP, I_MISR, I_MODIS, & -
LMDZ6/trunk/libf/phylmd/cosp/mod_cosp_stats.F90
r4593 r4619 36 36 ! 37 37 ! 38 INCLUDE"cosp_defs.h"38 #include "cosp_defs.h" 39 39 MODULE MOD_COSP_STATS 40 40 USE MOD_COSP_CONSTANTS -
LMDZ6/trunk/libf/phylmd/cosp/phys_cosp.F90
r4593 r4619 73 73 74 74 !! AI rajouter 75 INCLUDE"cosp_defs.h"75 #include "cosp_defs.h" 76 76 USE MOD_COSP_CONSTANTS 77 77 USE MOD_COSP_TYPES … … 84 84 use cosp_output_write_mod 85 85 ! use MOD_COSP_Modis_Simulator, only : cosp_modis 86 #ifdef CPP_XIOS 87 USE xios, ONLY: xios_field_is_active 88 #endif 86 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 89 87 use cosp_read_otputkeys 90 88 … … 183 181 184 182 ! Clefs Outputs initialisation 185 #ifdef CPP_XIOS 186 call cosp_outputkeys_init(cfg) 187 #else 188 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 189 #endif 183 IF (using_xios) THEN 184 call cosp_outputkeys_init(cfg) 185 ELSE 186 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 187 ENDIF 188 190 189 !!! call cosp_outputkeys_test(cfg) 191 190 print*,' Cles des differents simulateurs cosp a itap :',itap … … 203 202 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 204 203 if ((itap.gt.1).and.(first_write))then 205 #ifdef CPP_XIOS 206 call read_xiosfieldactive(cfg)207 #endif 204 205 IF (using_xios) call read_xiosfieldactive(cfg) 206 208 207 first_write=.false. 209 208 -
LMDZ6/trunk/libf/phylmd/cosp2/cosp_interface_v1p4.F90
r4593 r4619 30 30 ! May 2015 - D. Swales - Original version 31 31 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 32 INCLUDE"cosp_defs.h"32 #include "cosp_defs.h" 33 33 MODULE MOD_COSP_INTERFACE_v1p4 34 34 use COSP_KINDS, only: wp,dp -
LMDZ6/trunk/libf/phylmd/cosp2/cosp_output_mod.F90
r3435 r4619 246 246 USE time_phylmdz_mod, ONLY: day_ref, annee_ref, day_ini, start_time, itau_phy 247 247 USE print_control_mod, ONLY: lunout 248 249 #ifdef CPP_XIOS250 248 ! ug Pour les sorties XIOS 251 USE wxios 252 #endif 249 USE wxios 253 250 254 251 IMPLICIT NONE … … 275 272 !!! Variables d'entree 276 273 277 #ifdef CPP_XIOS 278 ! ug Variables utilisées pour récupérer le calendrier pour xios 279 INTEGER :: x_an, x_mois, x_jour 280 REAL :: x_heure 281 INTEGER :: ini_an, ini_mois, ini_jour 282 REAL :: ini_heure 283 #endif 274 ! ug Variables utilisées pour récupérer le calendrier pour xios 275 INTEGER :: x_an, x_mois, x_jour 276 REAL :: x_heure 277 INTEGER :: ini_an, ini_mois, ini_jour 278 REAL :: ini_heure 284 279 285 280 WRITE(lunout,*) 'Debut cosp_output_mod.F90' … … 328 323 CALL ymds2ju(annee_ref, 1, day_ini, start_time, zjulian_start) 329 324 330 #ifdef CPP_XIOS 331 332 ! recuperer la valeur indefine Xios333 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value)334 ! Cosp_fill_value=missing_val335 336 337 338 CALL wxios_add_vaxis("height", vgrid%Nlvgrid, vgrid%z)339 print*,'wxios_add_vaxis vgrid%Nlvgrid, vgrid%z',vgrid%Nlvgrid,vgrid%z340 341 WRITE(lunout,*) 'wxios_add_vaxis height_mlev, Nlevlmdz vgrid%mz ', &325 IF (using_xios) THEN 326 327 ! recuperer la valeur indefine Xios 328 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value) 329 ! Cosp_fill_value=missing_val 330 Cosp_fill_value=0. 331 print*,'Cosp_fill_value=',Cosp_fill_value 332 333 CALL wxios_add_vaxis("height", vgrid%Nlvgrid, vgrid%z) 334 print*,'wxios_add_vaxis vgrid%Nlvgrid, vgrid%z',vgrid%Nlvgrid,vgrid%z 335 336 WRITE(lunout,*) 'wxios_add_vaxis height_mlev, Nlevlmdz vgrid%mz ', & 342 337 Nlevlmdz,vgrid%mz 343 CALL wxios_add_vaxis("height_mlev", Nlevlmdz, vgrid%mz)344 345 WRITE(lunout,*) 'wxios_add_vaxis sza, PARASOL_NREFL ', &346 PARASOL_NREFL, PARASOL_SZA347 CALL wxios_add_vaxis("sza", PARASOL_NREFL, PARASOL_SZA)348 349 WRITE(lunout,*) 'wxios_add_vaxis pressure2 ',7,pres_binCenters350 CALL wxios_add_vaxis("pressure2", 7, pres_binCenters)351 352 WRITE(lunout,*) 'wxios_add_vaxis column ',Ncolumns,column_ax353 CALL wxios_add_vaxis("column", Ncolumns, column_ax)354 355 WRITE(lunout,*) 'wxios_add_vaxis temp LIDAR_NTEMP, LIDAR_PHASE_TEMP ', &338 CALL wxios_add_vaxis("height_mlev", Nlevlmdz, vgrid%mz) 339 340 WRITE(lunout,*) 'wxios_add_vaxis sza, PARASOL_NREFL ', & 341 PARASOL_NREFL, PARASOL_SZA 342 CALL wxios_add_vaxis("sza", PARASOL_NREFL, PARASOL_SZA) 343 344 WRITE(lunout,*) 'wxios_add_vaxis pressure2 ',7,pres_binCenters 345 CALL wxios_add_vaxis("pressure2", 7, pres_binCenters) 346 347 WRITE(lunout,*) 'wxios_add_vaxis column ',Ncolumns,column_ax 348 CALL wxios_add_vaxis("column", Ncolumns, column_ax) 349 350 WRITE(lunout,*) 'wxios_add_vaxis temp LIDAR_NTEMP, LIDAR_PHASE_TEMP ', & 356 351 LIDAR_NTEMP, LIDAR_PHASE_TEMP 357 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP)358 359 WRITE(lunout,*) 'wxios_add_vaxis cth16 numMISRHgtBins, misr_histHgtCenters ', &360 numMISRHgtBins, misr_histHgtCenters361 CALL wxios_add_vaxis("cth16", numMISRHgtBins, misr_histHgtCenters)362 363 WRITE(lunout,*) 'wxios_add_vaxis dbze DBZE_BINS, dbze_ax ', &364 DBZE_BINS, dbze_ax365 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax)366 367 WRITE(lunout,*) 'wxios_add_vaxis scatratio SR_BINS, sratio_ax', &368 SR_BINS, sratio_ax369 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax)370 371 WRITE(lunout,*) 'wxios_add_vaxis ReffIce numMODISReffIceBins, &372 reffICE_binCenters',numMODISReffIceBins, reffICE_binCenters373 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters)374 375 WRITE(lunout,*) 'wxios_add_vaxis ReffLiq numMODISReffLiqBins, &352 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP) 353 354 WRITE(lunout,*) 'wxios_add_vaxis cth16 numMISRHgtBins, misr_histHgtCenters ', & 355 numMISRHgtBins, misr_histHgtCenters 356 CALL wxios_add_vaxis("cth16", numMISRHgtBins, misr_histHgtCenters) 357 358 WRITE(lunout,*) 'wxios_add_vaxis dbze DBZE_BINS, dbze_ax ', & 359 DBZE_BINS, dbze_ax 360 CALL wxios_add_vaxis("dbze", DBZE_BINS, dbze_ax) 361 362 WRITE(lunout,*) 'wxios_add_vaxis scatratio SR_BINS, sratio_ax', & 363 SR_BINS, sratio_ax 364 CALL wxios_add_vaxis("scatratio", SR_BINS, sratio_ax) 365 366 WRITE(lunout,*) 'wxios_add_vaxis ReffIce numMODISReffIceBins, & 367 reffICE_binCenters',numMODISReffIceBins, reffICE_binCenters 368 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters) 369 370 WRITE(lunout,*) 'wxios_add_vaxis ReffLiq numMODISReffLiqBins, & 376 371 reffLIQ_binCenters', numMODISReffLiqBins, reffLIQ_binCenters 377 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters)378 379 WRITE(lunout,*) 'wxios_add_vaxis 7, tau_binCenters', &380 7, tau_binCenters381 CALL wxios_add_vaxis("tau", 7, tau_binCenters)382 383 #endif 384 372 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters) 373 374 WRITE(lunout,*) 'wxios_add_vaxis 7, tau_binCenters', & 375 7, tau_binCenters 376 CALL wxios_add_vaxis("tau", 7, tau_binCenters) 377 378 ENDIF 379 385 380 zdtimemoy_cosp = freq_COSP ! Frequence ou l on moyenne 386 381 … … 394 389 ! nhoricosp(iff),cosp_nidfiles(iff) 395 390 396 #ifdef CPP_XIOS 397 IF (.not. ok_all_xml) then 398 WRITE(lunout,*) 'wxios_add_file ',cosp_outfilenames(iff) 399 CALL wxios_add_file(cosp_outfilenames(iff),chfreq(iff),10) 391 IF(using_xios) THEN 392 IF (.not. ok_all_xml) then 393 WRITE(lunout,*) 'wxios_add_file ',cosp_outfilenames(iff) 394 CALL wxios_add_file(cosp_outfilenames(iff),chfreq(iff),10) 395 ENDIF 400 396 ENDIF 401 #endif402 397 403 398 #ifndef CPP_IOIPSL_NO_OUTPUT -
LMDZ6/trunk/libf/phylmd/cosp2/cosp_output_write_mod.F90
r3398 r4619 36 36 USE time_phylmdz_mod, ONLY: itau_phy, start_time, day_step_phy 37 37 USE print_control_mod, ONLY: lunout,prt_level 38 39 #ifdef CPP_XIOS40 38 USE wxios, only: wxios_closedef 41 USE xios, only: xios_update_calendar, xios_field_is_active 42 #endif 39 USE lmdz_xios, only: xios_update_calendar, xios_field_is_active, using_xios 43 40 IMPLICIT NONE 44 41 !!! Variables d'entree … … 68 65 real, dimension(Npoints,numMISRHgtBins,7) :: tmp_fi4da_misr 69 66 70 #ifdef CPP_XIOS 71 missing_val=missing_cosp72 #else 73 missing_val=0.74 #endif 67 IF (using_xios) THEN 68 missing_val=missing_cosp 69 ELSE 70 missing_val=0. 71 ENDIF 75 72 76 73 Nlevout = vgrid%Nlvgrid … … 100 97 ! endif 101 98 102 !! #ifdef CPP_XIOS99 !! IF (using_xios) THEN 103 100 ! !$OMP MASTER 104 101 !IF (cosp_varsdefined) THEN … … 111 108 ! !$OMP END MASTER 112 109 ! !$OMP BARRIER 113 !! #endif110 !! ENDIF 114 111 115 112 !!!! Sorties Calipso … … 173 170 ! if (cfg%Lproftemp) CALL histwrite3d_cosp(o_proftemp,stlidar%proftemp,nvert) !TIBO 174 171 175 #ifdef CPP_XIOS 176 do icl=1,SR_BINS 172 IF (using_xios) THEN 173 174 do icl=1,SR_BINS 177 175 tmp_fi4da_cfadL(:,:,icl)=stlidar%cfad_sr(:,icl,:) 178 enddo176 enddo 179 177 ! if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr) 180 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL)178 if (cfg%LcfadLidarsr532) CALL histwrite4d_cosp(o_cfad_lidarsr532,tmp_fi4da_cfadL) 181 179 ! if (cfg%LprofSR) CALL histwrite4d_cosp(o_profSR,stlidar%profSR) !TIBO 182 #else 183 if (cfg%LcfadLidarsr532) then184 do icl=1,SR_BINS180 ELSE 181 if (cfg%LcfadLidarsr532) then 182 do icl=1,SR_BINS 185 183 CALL histwrite3d_cosp(o_cfad_lidarsr532,stlidar%cfad_sr(:,icl,:),nvert,icl) 186 enddo187 endif184 enddo 185 endif 188 186 ! if (cfg%LprofSR) then 189 187 ! do icl=1,Ncolumns !TIBO … … 191 189 ! enddo !TIBO 192 190 ! endif 193 #endif 191 ENDIF 192 194 193 if (cfg%LparasolRefl) CALL histwrite3d_cosp(o_parasol_refl,stlidar%parasolrefl,nvertp) 195 194 … … 211 210 endif 212 211 213 #ifdef CPP_XIOS 214 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 215 #else 216 if (cfg%Latb532) then 217 do icl=1,Ncolumns 212 IF (using_xios) THEN 213 214 if (cfg%Latb532) CALL histwrite4d_cosp(o_atb532,sglidar%beta_tot) 215 ELSE 216 if (cfg%Latb532) then 217 do icl=1,Ncolumns 218 218 CALL histwrite3d_cosp(o_atb532,sglidar%beta_tot(:,icl,:),nvertmcosp,icl) 219 enddo220 endif221 #endif 219 enddo 220 endif 221 ENDIF 222 222 223 223 if (cfg%LlidarBetaMol532) CALL histwrite3d_cosp(o_beta_mol532,sglidar%beta_mol,nvertmcosp) … … 229 229 230 230 where(stradar%cfad_ze == R_UNDEF) stradar%cfad_ze = missing_val 231 #ifdef CPP_XIOS 232 do icl=1,DBZE_BINS 233 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:) 234 enddo 235 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 236 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 237 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 238 #else 239 if (cfg%Ldbze94) then 240 do icl=1,Ncolumns 241 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl) 231 IF (using_xios) THEN 232 do icl=1,DBZE_BINS 233 tmp_fi4da_cfadR(:,:,icl)=stradar%cfad_ze(:,icl,:) 242 234 enddo 243 endif 244 if (cfg%LcfadDbze94) then 245 do icl=1,DBZE_BINS 246 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 247 enddo 248 endif 249 #endif 235 if (cfg%Ldbze94) CALL histwrite4d_cosp(o_dbze94,sgradar%Ze_tot) 236 ! if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,stradar%cfad_ze) 237 if (cfg%LcfadDbze94) CALL histwrite4d_cosp(o_cfadDbze94,tmp_fi4da_cfadR) 238 ELSE 239 if (cfg%Ldbze94) then 240 do icl=1,Ncolumns 241 CALL histwrite3d_cosp(o_dbze94,sgradar%Ze_tot(:,icl,:),nvert,icl) 242 enddo 243 endif 244 if (cfg%LcfadDbze94) then 245 do icl=1,DBZE_BINS 246 CALL histwrite3d_cosp(o_cfadDbze94,stradar%cfad_ze(:,icl,:),nvert,icl) 247 enddo 248 endif 249 ENDIF 250 250 endif 251 251 ! endif pour radar … … 273 273 where(isccp%boxptop == R_UNDEF) isccp%boxptop = missing_val 274 274 275 276 #ifdef CPP_XIOS 277 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp)278 #else 279 if (cfg%Lclisccp) then280 do icl=1,7281 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl)282 enddo283 endif284 #endif 275 CALL histwrite2d_cosp(o_sunlit,gbx%sunlit) 276 IF (using_xios) THEN 277 if (cfg%Lclisccp) CALL histwrite4d_cosp(o_clisccp2,isccp%fq_isccp) 278 ELSE 279 if (cfg%Lclisccp) then 280 do icl=1,7 281 CALL histwrite3d_cosp(o_clisccp2,isccp%fq_isccp(:,icl,:),nvertisccp,icl) 282 enddo 283 endif 284 ENDIF 285 285 286 286 if (cfg%Lboxtauisccp) CALL histwrite3d_cosp(o_boxtauisccp,isccp%boxtau,nvertcol) … … 298 298 where(misr%fq_MISR == R_UNDEF) misr%fq_MISR = missing_val 299 299 300 #ifdef CPP_XIOS 301 do icl=1,numMISRHgtBins300 IF (using_xios) THEN 301 do icl=1,numMISRHgtBins 302 302 tmp_fi4da_misr(:,icl,:)=misr%fq_MISR(:,:,icl) 303 enddo303 enddo 304 304 ! if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,misr%fq_MISR) 305 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr)306 #else 307 if (cfg%LclMISR) then308 do icl=1,7309 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl)310 enddo311 endif312 #endif 305 if (cfg%LclMISR) CALL histwrite4d_cosp(o_clMISR,tmp_fi4da_misr) 306 ELSE 307 if (cfg%LclMISR) then 308 do icl=1,7 309 CALL histwrite3d_cosp(o_clMISR,misr%fq_MISR(:,icl,:),nvertmisr,icl) 310 enddo 311 endif 312 ENDIF 313 313 endif 314 314 ! endif pour Misr … … 375 375 modis%Optical_Thickness_vs_Cloud_Top_Pressure = missing_val 376 376 377 #ifdef CPP_XIOS 378 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure)379 #else 380 if (cfg%Lclmodis) then381 do icl=1,7382 CALL histwrite3d_cosp(o_clmodis, &383 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl)384 enddo385 endif386 #endif 377 IF (using_xios) THEN 378 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_clmodis,modis%Optical_Thickness_vs_Cloud_Top_Pressure) 379 ELSE 380 if (cfg%Lclmodis) then 381 do icl=1,7 382 CALL histwrite3d_cosp(o_clmodis, & 383 modis%Optical_Thickness_vs_Cloud_Top_Pressure(:,icl,:),nvertisccp,icl) 384 enddo 385 endif 386 ENDIF 387 387 388 388 where(modis%Optical_Thickness_vs_ReffIce == R_UNDEF) & … … 392 392 modis%Optical_Thickness_vs_ReffLiq = missing_val 393 393 394 #ifdef CPP_XIOS 395 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce)396 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq)397 #else 398 if (cfg%Lclmodis) then399 do icl=1,7400 CALL histwrite3d_cosp(o_crimodis, &401 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl)402 enddo403 endif404 if (cfg%Lclmodis) then405 do icl=1,7406 CALL histwrite3d_cosp(o_crlmodis, &407 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl)408 enddo409 endif410 #endif 394 IF (using_xios) THEN 395 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crimodis,modis%Optical_Thickness_vs_ReffIce) 396 if (cfg%Lclmodis) CALL histwrite4d_cosp(o_crlmodis,modis%Optical_Thickness_vs_ReffLiq) 397 ELSE 398 if (cfg%Lclmodis) then 399 do icl=1,7 400 CALL histwrite3d_cosp(o_crimodis, & 401 modis%Optical_Thickness_vs_ReffIce(:,icl,:),nvertReffIce,icl) 402 enddo 403 endif 404 if (cfg%Lclmodis) then 405 do icl=1,7 406 CALL histwrite3d_cosp(o_crlmodis, & 407 modis%Optical_Thickness_vs_ReffLiq(:,icl,:),nvertReffLiq,icl) 408 enddo 409 endif 410 ENDIF !using_xios 411 411 endif !modis 412 412 … … 421 421 #endif 422 422 ! Fermeture dans phys_output_write 423 ! #ifdef CPP_XIOS423 ! IF (using_xios) THEN 424 424 !On finalise l'initialisation: 425 425 !CALL wxios_closedef() 426 ! #endif426 ! ELSE 427 427 428 428 !$OMP END MASTER … … 461 461 USE mod_grid_phy_lmdz, ONLY: nbp_lon 462 462 USE print_control_mod, ONLY: lunout,prt_level 463 #ifdef CPP_XIOS 464 USE wxios 465 #endif 463 USE wxios 466 464 467 465 IMPLICIT NONE … … 495 493 ENDIF 496 494 497 #ifdef CPP_XIOS 495 IF (using_xios) THEN 498 496 IF (.not. ok_all_xml) then 499 497 IF ( var%cles(iff) ) THEN … … 505 503 ENDIF 506 504 ENDIF 507 #endif 505 ENDIF 508 506 509 507 #ifndef CPP_IOIPSL_NO_OUTPUT … … 524 522 USE mod_grid_phy_lmdz, ONLY: nbp_lon 525 523 USE print_control_mod, ONLY: lunout,prt_level 526 527 #ifdef CPP_XIOS 528 USE wxios 529 #endif 530 524 USE wxios 531 525 532 526 IMPLICIT NONE … … 601 595 ENDIF 602 596 603 #ifdef CPP_XIOS 597 IF (using_xios) THEN 604 598 IF (.not. ok_all_xml) then 605 599 IF ( var%cles(iff) ) THEN … … 611 605 ENDIF 612 606 ENDIF 613 #endif 607 ENDIF 614 608 615 609 #ifndef CPP_IOIPSL_NO_OUTPUT … … 631 625 USE mod_grid_phy_lmdz, ONLY: nbp_lon 632 626 USE print_control_mod, ONLY: lunout,prt_level 633 634 #ifdef CPP_XIOS 635 USE xios, only: xios_send_field 636 #endif 627 USE lmdz_xios, only: xios_send_field, using_xios 637 628 638 629 IMPLICIT NONE … … 677 668 firstx=.true. 678 669 DO iff=1, 3 679 670 IF (var%cles(iff) .AND. cosp_outfilekeys(iff)) THEN 680 671 ALLOCATE(index2d(nbp_lon*jj_nb)) 681 672 #ifndef CPP_IOIPSL_NO_OUTPUT … … 683 674 #endif 684 675 deallocate(index2d) 685 #ifdef CPP_XIOS 676 IF (using_xios) THEN 686 677 IF (.not. ok_all_xml) then 687 678 if (firstx) then … … 693 684 endif 694 685 ENDIF 695 #endif 696 686 ENDIF 687 ENDIF 697 688 ENDDO 698 689 699 #ifdef CPP_XIOS 690 IF (using_xios) THEN 700 691 IF (ok_all_xml) THEN 701 692 if (prt_level >= 1) then … … 704 695 CALL xios_send_field(var%name, Field2d) 705 696 ENDIF 706 #endif 697 ENDIF 707 698 708 699 !$OMP END MASTER … … 720 711 USE mod_grid_phy_lmdz, ONLY: nbp_lon 721 712 USE print_control_mod, ONLY: lunout,prt_level 722 723 #ifdef CPP_XIOS 724 USE xios, only: xios_send_field 725 #endif 726 713 USE lmdz_xios, only: xios_send_field, using_xios 727 714 728 715 IMPLICIT NONE … … 786 773 #endif 787 774 788 #ifdef CPP_XIOS 775 IF (using_xios) THEN 789 776 IF (.not. ok_all_xml) then 790 777 IF (firstx) THEN … … 794 781 ENDIF 795 782 ENDIF 796 #endif 783 ENDIF 797 784 deallocate(index3d) 798 785 ENDIF 799 786 ENDDO 800 #ifdef CPP_XIOS 801 IF (ok_all_xml) THEN 802 CALL xios_send_field(nom, Field3d(:,:,1:nlev)) 803 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 787 788 IF (using_xios) THEN 789 IF (ok_all_xml) THEN 790 CALL xios_send_field(nom, Field3d(:,:,1:nlev)) 791 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 792 ENDIF 804 793 ENDIF 805 #endif806 794 807 795 !$OMP END MASTER … … 819 807 USE mod_grid_phy_lmdz, ONLY: nbp_lon 820 808 USE print_control_mod, ONLY: lunout,prt_level 821 822 #ifdef CPP_XIOS 823 USE xios, only: xios_send_field 824 #endif 825 809 USE lmdz_xios, only: xios_send_field, using_xios 826 810 827 811 IMPLICIT NONE … … 852 836 CALL grid1Dto2D_mpi(buffer_omp,field4d) 853 837 854 #ifdef CPP_XIOS 838 IF (using_xios) THEN 855 839 ! IF (ok_all_xml) THEN 856 840 CALL xios_send_field(var%name, Field4d(:,:,1:nlev,1:nlev2)) 857 841 IF (prt_level >= 1) WRITE(lunout,*)'xios_send_field ',var%name 858 842 ! ENDIF 859 #endif 843 ENDIF 860 844 861 845 !$OMP END MASTER -
LMDZ6/trunk/libf/phylmd/cosp2/cosp_read_otputkeys.F90
r3396 r4619 228 228 229 229 SUBROUTINE READ_COSP_OUTPUT_NL(itap,cosp_nl,cfg) 230 231 #ifdef CPP_XIOS 232 USE xios, ONLY: xios_field_is_active 233 #endif 230 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 234 231 implicit none 235 232 character(len=*),intent(in) :: cosp_nl … … 755 752 ! USE MOD_COSP_CONSTANTS 756 753 ! USE MOD_COSP_TYPES 757 #ifdef CPP_XIOS 758 USE xios, ONLY: xios_field_is_active 759 #endif 754 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 760 755 implicit none 761 756 type(cosp_config),intent(out) :: cfg 762 757 integer :: i 763 764 #ifdef CPP_XIOS765 758 766 759 logical :: Lradar_sim,Llidar_sim,Lparasol_sim,Lisccp_sim,Lmodis_sim,Lmisr_sim,Lrttov_sim, Lstats, & … … 784 777 785 778 character(len=32) :: out_list(78) 779 780 IF (using_xios) THEN 786 781 787 782 do i=1,78 … … 1249 1244 endif 1250 1245 1251 #endif 1246 ENDIF !using_xios 1252 1247 1253 1248 END SUBROUTINE read_xiosfieldactive -
LMDZ6/trunk/libf/phylmd/cosp2/phys_cosp2.F90
r4593 r4619 83 83 use cosp_output_mod 84 84 use cosp_output_write_mod 85 USE lmdz_xios, ONLY : using_xios 85 86 ! use MOD_COSP_Modis_Simulator, only : cosp_modis 86 87 ! use mod_cosp_config, only : vgrid_zl,vgrid_zu,vgrid_z … … 245 246 246 247 ! Clefs Outputs initialisation 247 #ifdef CPP_XIOS 248 IF (using_xios) THEN 248 249 call cosp_outputkeys_init(cfg) 249 #else 250 ELSE 250 251 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 251 #endif 252 ENDIF 252 253 253 254 print*,' Cles des differents simulateurs cosp a itap :',itap … … 265 266 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 266 267 if ((itap.gt.1).and.(first_write))then 267 #ifdef CPP_XIOS 268 call read_xiosfieldactive(cfg) 269 #endif 268 269 IF (using_xios) call read_xiosfieldactive(cfg) 270 270 first_write=.false. 271 271 -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_interface.F90
r3723 r4619 67 67 use ioipsl 68 68 use iophy 69 use lmdz_xios, ONLY : using_xios 69 70 use lmdz_cosp_output_mod 70 71 use lmdz_cosp_output_write_mod … … 262 263 263 264 ! Clefs Outputs initialisation 264 #ifdef CPP_XIOS 265 call cosp_outputkeys_init(cfg)266 #else 265 IF (using_xios) THEN 266 call cosp_outputkeys_init(cfg) 267 ELSE 267 268 call read_cosp_output_nl(itap,cosp_output_nl,cfg) 268 #endif 269 ENDIF 269 270 270 271 print*,' Cles des differents simulateurs cosp a itap :',itap … … 278 279 endif 279 280 280 #ifdef CPP_XIOS 281 print*,'On passe par ifdef CPP_XIOS' 282 #else 283 if (cosp_init_flag .eq. 0) then 284 285 ! Initialize the distributional parameters for hydrometeors in radar simulator. 286 ! In COSPv1.4, this was declared in cosp_defs.f. 287 if (cloudsat_micro_scheme == 'MMF_v3.5_two_moment') then 288 ldouble = .true. 289 lsingle = .false. 281 IF (using_xios) THEN 282 print*,'On passe par using_xios' 283 ELSE 284 if (cosp_init_flag .eq. 0) then 285 286 ! Initialize the distributional parameters for hydrometeors in radar simulator. 287 ! In COSPv1.4, this was declared in cosp_defs.f. 288 if (cloudsat_micro_scheme == 'MMF_v3.5_two_moment') then 289 ldouble = .true. 290 lsingle = .false. 291 endif 292 call hydro_class_init(lsingle,ldouble,sd) 293 call quickbeam_optics_init() 294 295 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag 296 call COSP_INIT(cfg%Lisccp, cfg%Lmodis, cfg%Lmisr, cfg%Lcloudsat, cfg%Lcalipso, & 297 cfg%LgrLidar532, cfg%Latlid, cfg%Lparasol, cfg%Lrttov, & 298 cloudsat_radar_freq, cloudsat_k2, cloudsat_use_gas_abs, & 299 cloudsat_do_ray, isccp_topheight, isccp_topheight_direction, & 300 surface_radar, rcfg_cloudsat, use_vgrid_in, csat_vgrid_in, & 301 niv_sorties, Nlevels, cloudsat_micro_scheme) 302 cosp_init_flag = 1 303 print*,' just after call COSP_INIT, cosp_init_flag =', cosp_init_flag 290 304 endif 291 call hydro_class_init(lsingle,ldouble,sd) 292 call quickbeam_optics_init() 293 294 print*,' just before call COSP_INIT, cosp_init_flag =', cosp_init_flag 295 call COSP_INIT(cfg%Lisccp, cfg%Lmodis, cfg%Lmisr, cfg%Lcloudsat, cfg%Lcalipso, & 296 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 302 print*,' just after call COSP_INIT, cosp_init_flag =', cosp_init_flag 303 endif 304 #endif 305 ENDIF 305 306 306 307 print*,'Fin lecture Namelists, debut_cosp =',debut_cosp … … 311 312 !!! Ici on modifie les cles logiques pour les outputs selon les champs actives dans les .xml 312 313 if ((itap.ge.1).and.(first_write))then 313 #ifdef CPP_XIOS 314 call read_xiosfieldactive(cfg) 315 #endif 314 IF (using_xios) call read_xiosfieldactive(cfg) 316 315 first_write=.false. 317 316 -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_output_mod.F90
r3491 r4619 326 326 USE time_phylmdz_mod, ONLY: day_ref, annee_ref, day_ini, start_time, itau_phy 327 327 USE print_control_mod, ONLY: lunout 328 329 #ifdef CPP_XIOS 330 ! ug Pour les sorties XIOS 331 USE wxios 332 #endif 328 ! ug Pour les sorties XIOS 329 USE wxios 333 330 334 331 IMPLICIT NONE … … 350 347 !!! Variables d'entree 351 348 352 #ifdef CPP_XIOS 353 ! ug Variables utilisées pour récupérer le calendrier pour xios 354 INTEGER :: x_an, x_mois, x_jour 355 REAL :: x_heure 356 INTEGER :: ini_an, ini_mois, ini_jour 357 REAL :: ini_heure 358 #endif 349 ! ug Variables utilisées pour récupérer le calendrier pour xios 350 INTEGER :: x_an, x_mois, x_jour 351 REAL :: x_heure 352 INTEGER :: ini_an, ini_mois, ini_jour 353 REAL :: ini_heure 359 354 360 355 WRITE(lunout,*) 'Debut lmdz_cosp_output_mod.F90' … … 401 396 CALL ymds2ju(annee_ref, 1, day_ini, start_time, zjulian_start) 402 397 403 #ifdef CPP_XIOS 398 IF (using_xios) THEN 399 404 400 405 ! recuperer la valeur indefine Xios406 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value)407 ! Cosp_fill_value=missing_val401 ! recuperer la valeur indefine Xios 402 ! CALL xios_get_field_attr("clcalipso",default_value=Cosp_fill_value) 403 ! Cosp_fill_value=missing_val 408 404 Cosp_fill_value=0. 409 405 print*,'Cosp_fill_value=',Cosp_fill_value … … 426 422 CALL wxios_add_vaxis("column", Ncolumns, column_ax) 427 423 428 WRITE(lunout,*) 'wxios_add_vaxis temp LIDAR_NTEMP, LIDAR_PHASE_TEMP ', &429 LIDAR_NTEMP, LIDAR_PHASE_TEMP430 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP)431 432 WRITE(lunout,*) 'wxios_add_vaxis cth16 numMISRHgtBins, misr_histHgtCenters ', &424 WRITE(lunout,*) 'wxios_add_vaxis temp LIDAR_NTEMP, LIDAR_PHASE_TEMP ', & 425 LIDAR_NTEMP, LIDAR_PHASE_TEMP 426 CALL wxios_add_vaxis("temp", LIDAR_NTEMP, LIDAR_PHASE_TEMP) 427 428 WRITE(lunout,*) 'wxios_add_vaxis cth16 numMISRHgtBins, misr_histHgtCenters ', & 433 429 numMISRHgtBins, misr_histHgtCenters 434 CALL wxios_add_vaxis("cth", numMISRHgtBins, misr_histHgtCenters)435 436 WRITE(lunout,*) 'wxios_add_vaxis dbze CLOUDSAT_DBZE_BINS, cloudsat_binCenters ', &430 CALL wxios_add_vaxis("cth", numMISRHgtBins, misr_histHgtCenters) 431 432 WRITE(lunout,*) 'wxios_add_vaxis dbze CLOUDSAT_DBZE_BINS, cloudsat_binCenters ', & 437 433 CLOUDSAT_DBZE_BINS, cloudsat_binCenters 438 CALL wxios_add_vaxis("dbze", CLOUDSAT_DBZE_BINS, cloudsat_binCenters)439 440 WRITE(lunout,*) 'wxios_add_vaxis scatratio SR_BINS, calipso_binCenters', &434 CALL wxios_add_vaxis("dbze", CLOUDSAT_DBZE_BINS, cloudsat_binCenters) 435 436 WRITE(lunout,*) 'wxios_add_vaxis scatratio SR_BINS, calipso_binCenters', & 441 437 SR_BINS, calipso_binCenters 442 CALL wxios_add_vaxis("scatratio", SR_BINS, calipso_binCenters)443 444 WRITE(lunout,*) 'wxios_add_vaxis ReffIce numMODISReffIceBins, &438 CALL wxios_add_vaxis("scatratio", SR_BINS, calipso_binCenters) 439 440 WRITE(lunout,*) 'wxios_add_vaxis ReffIce numMODISReffIceBins, & 445 441 reffICE_binCenters',numMODISReffIceBins, reffICE_binCenters 446 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters)447 448 WRITE(lunout,*) 'wxios_add_vaxis ReffLiq numMODISReffLiqBins, &442 CALL wxios_add_vaxis("ReffIce", numMODISReffIceBins, reffICE_binCenters) 443 444 WRITE(lunout,*) 'wxios_add_vaxis ReffLiq numMODISReffLiqBins, & 449 445 reffLIQ_binCenters', numMODISReffLiqBins, reffLIQ_binCenters 450 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters)451 452 WRITE(lunout,*) 'wxios_add_vaxis 7, tau_binCenters', &446 CALL wxios_add_vaxis("ReffLiq", numMODISReffLiqBins, reffLIQ_binCenters) 447 448 WRITE(lunout,*) 'wxios_add_vaxis 7, tau_binCenters', & 453 449 7, tau_binCenters 454 CALL wxios_add_vaxis("tau", 7, tau_binCenters)455 456 #endif 450 CALL wxios_add_vaxis("tau", 7, tau_binCenters) 451 452 ENDIF 457 453 458 454 zdtimemoy_cosp = freq_COSP ! Frequence ou l on moyenne … … 467 463 ! nhoricosp(iff),cosp_nidfiles(iff) 468 464 469 #ifdef CPP_XIOS 465 IF (using_xios) THEN 470 466 IF (.not. ok_all_xml) then 471 467 WRITE(lunout,*) 'wxios_add_file ',cosp_outfilenames(iff) 472 468 CALL wxios_add_file(cosp_outfilenames(iff),chfreq(iff),10) 473 469 ENDIF 474 #endif 470 ENDIF 475 471 476 472 #ifndef CPP_IOIPSL_NO_OUTPUT -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_output_write_mod.F90
r3731 r4619 42 42 43 43 USE wxios, only: wxios_closedef 44 USE xios, only: xios_update_calendar, xios_field_is_active44 USE lmdz_xios, only: xios_update_calendar, xios_field_is_active 45 45 IMPLICIT NONE 46 46 !!! Variables d'entree … … 807 807 USE print_control_mod, ONLY: lunout,prt_level 808 808 809 USE xios, only: xios_send_field809 USE lmdz_xios, only: xios_send_field 810 810 811 811 IMPLICIT NONE … … 889 889 USE print_control_mod, ONLY: lunout,prt_level 890 890 891 USE xios, only: xios_send_field891 USE lmdz_xios, only: xios_send_field 892 892 893 893 … … 980 980 USE print_control_mod, ONLY: lunout,prt_level 981 981 982 USE xios, only: xios_send_field982 USE lmdz_xios, only: xios_send_field 983 983 984 984 -
LMDZ6/trunk/libf/phylmd/cospv2/lmdz_cosp_read_outputkeys.F90
r3491 r4619 422 422 423 423 SUBROUTINE READ_COSP_OUTPUT_NL(itap,cosp_nl,cfg) 424 425 #ifdef CPP_XIOS 426 USE xios, ONLY: xios_field_is_active 427 #endif 424 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 428 425 implicit none 429 426 character(len=*),intent(in) :: cosp_nl … … 1020 1017 1021 1018 SUBROUTINE read_xiosfieldactive(cfg) 1022 1023 #ifdef CPP_XIOS 1024 USE xios, ONLY: xios_field_is_active 1025 #endif 1019 USE lmdz_xios, ONLY: xios_field_is_active, using_xios 1026 1020 implicit none 1027 1021 type(cosp_config),intent(inout) :: cfg 1028 1022 integer :: i 1029 1030 #ifdef CPP_XIOS1031 1023 1032 1024 !COSPv2 local variables … … 1067 1059 1068 1060 character(len=32) :: out_list(107) 1061 1062 IF (using_xios) THEN 1069 1063 1070 1064 do i=1,107 … … 1717 1711 endif 1718 1712 1719 #endif 1713 ENDIF !using_xios 1720 1714 1721 1715 END SUBROUTINE read_xiosfieldactive -
LMDZ6/trunk/libf/phylmd/create_etat0_limit_unstruct.F90
r4600 r4619 10 10 11 11 SUBROUTINE init_etat0_limit_unstruct 12 #ifdef CPP_XIOS 13 USE xios, ONLY: xios_set_axis_attr, xios_set_fieldgroup_attr, & 12 USE lmdz_xios, ONLY: xios_set_axis_attr, xios_set_fieldgroup_attr, & 14 13 xios_set_filegroup_attr, xios_set_file_attr 15 14 USE mod_phys_lmdz_para, ONLY: is_omp_master … … 49 48 ENDIF 50 49 51 #endif52 50 END SUBROUTINE init_etat0_limit_unstruct 53 51 54 52 SUBROUTINE create_etat0_limit_unstruct 55 #ifdef CPP_XIOS56 53 USE mod_grid_phy_lmdz, ONLY: grid_type, unstructured 57 54 USE create_etat0_unstruct_mod, ONLY: create_etat0_unstruct … … 62 59 USE ioipsl_getin_p_mod, ONLY: getin_p 63 60 USE dimphy, ONLY: klon 64 USE xios, ONLY: xios_context_finalize, xios_set_current_context, &61 USE lmdz_xios, ONLY: xios_context_finalize, xios_set_current_context, & 65 62 xios_finalize 66 63 USE print_control_mod, ONLY: lunout … … 109 106 ENDIF 110 107 111 #endif112 108 END SUBROUTINE create_etat0_limit_unstruct 113 109 -
LMDZ6/trunk/libf/phylmd/create_etat0_unstruct.F90
r4595 r4619 9 9 10 10 SUBROUTINE init_create_etat0_unstruct 11 #ifdef CPP_XIOS 12 USE xios 11 USE lmdz_xios 13 12 USE netcdf 14 13 USE mod_phys_lmdz_para … … 39 38 ENDIF 40 39 41 #endif42 43 40 END SUBROUTINE init_create_etat0_unstruct 44 41 … … 46 43 SUBROUTINE create_etat0_unstruct 47 44 USE dimphy 48 #ifdef CPP_XIOS 49 USE xios 45 USE lmdz_xios 50 46 USE infotrac_phy 51 47 USE fonte_neige_mod … … 269 265 CALL phyredem( "startphy.nc" ) 270 266 271 #endif272 267 END SUBROUTINE create_etat0_unstruct 273 268 -
LMDZ6/trunk/libf/phylmd/create_limit_unstruct.F90
r4361 r4619 10 10 SUBROUTINE create_limit_unstruct 11 11 USE dimphy 12 #ifdef CPP_XIOS 13 USE xios 12 USE lmdz_xios 14 13 USE ioipsl, ONLY : ioget_year_len 15 14 USE time_phylmdz_mod, ONLY : annee_ref … … 175 174 CALL xios_send_field("rug_limout", rugos_year_mpi) 176 175 ENDIF 177 #endif178 176 END SUBROUTINE create_limit_unstruct 179 177 -
LMDZ6/trunk/libf/phylmd/iophy.F90
r4260 r4619 16 16 !$OMP THREADPRIVATE(itau_iophy) 17 17 18 #ifdef CPP_XIOS19 18 INTERFACE histwrite_phy 20 19 MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy,histwrite2d_phy_old,histwrite3d_phy_old,histwrite2d_xios,histwrite3d_xios,histwrite0d_xios 21 20 END INTERFACE 22 #else23 INTERFACE histwrite_phy24 MODULE PROCEDURE histwrite2d_phy,histwrite3d_phy,histwrite2d_phy_old,histwrite3d_phy_old25 END INTERFACE26 #endif27 21 28 22 INTERFACE histbeg_phy_all … … 52 46 USE ioipsl, ONLY: flio_dom_set 53 47 #endif 54 #ifdef CPP_XIOS 55 use wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_context_init 56 #endif 48 use wxios, ONLY: wxios_domain_param, wxios_domain_param_unstructured, wxios_context_init, using_xios 57 49 IMPLICIT NONE 58 50 REAL,DIMENSION(klon),INTENT(IN) :: rlon … … 72 64 INTEGER :: data_ibegin, data_iend 73 65 74 #ifdef CPP_XIOS 75 CALL wxios_context_init 76 #endif 66 if (using_xios) CALL wxios_context_init 77 67 78 68 79 69 IF (grid_type==unstructured) THEN 80 70 81 #ifdef CPP_XIOS82 71 CALL wxios_domain_param_unstructured("dom_glo") 83 #endif84 72 85 73 ELSE … … 140 128 'APPLE',phys_domain_id) 141 129 #endif 142 #ifdef CPP_XIOS 130 IF (using_xios) THEN 143 131 ! Set values for the mask: 144 132 IF (mpi_rank == 0) THEN … … 163 151 164 152 ! Initialize the XIOS domain coreesponding to this process: 165 #endif 153 ENDIF 166 154 !$OMP END MASTER 167 155 168 #ifdef CPP_XIOS 169 CALL wxios_domain_param("dom_glo") 170 #endif 156 IF (using_xios) CALL wxios_domain_param("dom_glo") 171 157 172 158 ENDIF … … 227 213 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 228 214 USE ioipsl, ONLY: histbeg 229 #ifdef CPP_XIOS 230 USE wxios, ONLY: wxios_add_file 231 #endif 215 USE wxios, ONLY: wxios_add_file, using_xios 232 216 IMPLICIT NONE 233 217 INCLUDE 'clesphys.h' … … 251 235 ENDIF 252 236 253 #ifdef CPP_XIOS 254 ! ug OMP en chantier... 255 IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN 256 ! ug Création du fichier 257 IF (.not. ok_all_xml) THEN 258 CALL wxios_add_file(name, ffreq, lev) 237 IF (using_xios) THEN 238 ! ug OMP en chantier... 239 IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN 240 ! ug Création du fichier 241 IF (.not. ok_all_xml) THEN 242 CALL wxios_add_file(name, ffreq, lev) 243 ENDIF 259 244 ENDIF 260 245 ENDIF 261 #endif262 246 !$OMP END MASTER 263 247 … … 608 592 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 609 593 USE aero_mod, ONLY : naero_tot, name_aero_tau 610 #ifdef CPP_XIOS 611 USE wxios, ONLY: wxios_add_field_to_file 612 #endif 594 USE wxios, ONLY: wxios_add_field_to_file, using_xios 613 595 USE print_control_mod, ONLY: prt_level,lunout 614 596 IMPLICIT NONE … … 650 632 IF(.NOT.clef_stations(iff)) THEN 651 633 652 #ifdef CPP_XIOS 653 IF (.not. ok_all_xml) THEN 654 IF ( var%flag(iff)<=lev_files(iff) ) THEN 655 CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), & 656 var%description, var%unit, var%flag(iff), typeecrit) 657 IF (prt_level >= 10) THEN 658 WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', & 659 trim(var%name),iff 634 IF (using_xios) THEN 635 IF (.not. ok_all_xml) THEN 636 IF ( var%flag(iff)<=lev_files(iff) ) THEN 637 CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), & 638 var%description, var%unit, var%flag(iff), typeecrit) 639 IF (prt_level >= 10) THEN 640 WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', & 641 trim(var%name),iff 642 ENDIF 660 643 ENDIF 661 644 ENDIF 662 645 ENDIF 663 #endif664 646 #ifndef CPP_IOIPSL_NO_OUTPUT 665 647 … … 725 707 USE print_control_mod, ONLY: prt_level,lunout 726 708 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat 727 #ifdef CPP_XIOS 728 USE wxios, ONLY: wxios_add_field_to_file 729 #endif 709 USE wxios, ONLY: wxios_add_field_to_file, using_xios 730 710 USE print_control_mod, ONLY: prt_level,lunout 731 711 IMPLICIT NONE … … 766 746 IF(.NOT.clef_stations(iff)) THEN 767 747 768 #ifdef CPP_XIOS 769 IF (.not. ok_all_xml) THEN 770 IF ( var%flag(iff)<=lev_files(iff) ) THEN 771 CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), & 772 var%description, var%unit, var%flag(iff), typeecrit) 773 IF (prt_level >= 10) THEN 774 WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', & 775 trim(var%name),iff 776 ENDIF 777 ENDIF 778 ENDIF 779 #endif 748 IF (using_xios) THEN 749 750 IF (.not. ok_all_xml) THEN 751 IF ( var%flag(iff)<=lev_files(iff) ) THEN 752 CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), & 753 var%description, var%unit, var%flag(iff), typeecrit) 754 IF (prt_level >= 10) THEN 755 WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', & 756 trim(var%name),iff 757 ENDIF 758 ENDIF 759 ENDIF 760 ENDIF 780 761 #ifndef CPP_IOIPSL_NO_OUTPUT 781 762 … … 974 955 USE print_control_mod, ONLY: prt_level,lunout 975 956 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat 976 #ifdef CPP_XIOS 977 USE xios, ONLY: xios_send_field, xios_field_is_active 978 #endif 957 USE lmdz_xios, ONLY: xios_send_field, xios_field_is_active, using_xios 979 958 USE print_control_mod, ONLY: lunout, prt_level 980 959 … … 1036 1015 1037 1016 ELSE 1038 #ifdef CPP_XIOS 1039 IF (ok_all_xml) THEN1040 !$omp barrier1041 !$omp master1042 is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.)1043 !$omp end master1044 !$omp barrier1045 IF(.not. is_active) RETURN1046 ENDIF1047 #endif 1017 IF (using_xios) THEN 1018 IF (ok_all_xml) THEN 1019 !$omp barrier 1020 !$omp master 1021 is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.) 1022 !$omp end master 1023 !$omp barrier 1024 IF(.not. is_active) RETURN 1025 ENDIF 1026 ENDIF 1048 1027 1049 1028 !Et sinon on.... écrit … … 1068 1047 1069 1048 IF (ok_all_xml) THEN 1070 #ifdef CPP_XIOS 1049 IF (using_xios) THEN 1071 1050 IF (prt_level >= 10) THEN 1072 1051 write(lunout,*)'Dans iophy histwrite2D,var%name ', trim(var%name) … … 1091 1070 trim(var%name) 1092 1071 ENDIF 1093 #else 1094 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)1095 #endif 1072 ELSE 1073 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 1074 ENDIF 1096 1075 ELSE 1097 1076 DO iff=iff_beg, iff_end 1098 1077 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 1099 1078 1100 #ifdef CPP_XIOS 1101 IF (firstx) THEN 1102 IF (prt_level >= 10) THEN 1103 write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',& 1104 iff,trim(var%name) 1105 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field" 1106 ENDIF 1107 IF (grid_type==regular_lonlat) THEN 1108 IF (SIZE(field) == klon) then 1109 CALL xios_send_field(var%name, Field2d) 1110 ELSE 1079 IF (using_xios) THEN 1080 IF (firstx) THEN 1081 IF (prt_level >= 10) THEN 1082 write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',& 1083 iff,trim(var%name) 1084 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field" 1085 ENDIF 1086 IF (grid_type==regular_lonlat) THEN 1087 IF (SIZE(field) == klon) then 1088 CALL xios_send_field(var%name, Field2d) 1089 ELSE 1090 CALL xios_send_field(var%name, field) 1091 ENDIF 1092 ELSE IF (grid_type==unstructured) THEN 1093 IF (SIZE(field) == klon) then 1094 CALL xios_send_field(var%name, buffer_omp) 1095 ELSE 1111 1096 CALL xios_send_field(var%name, field) 1112 ENDIF 1113 ELSE IF (grid_type==unstructured) THEN 1114 IF (SIZE(field) == klon) then 1115 CALL xios_send_field(var%name, buffer_omp) 1116 ELSE 1117 CALL xios_send_field(var%name, field) 1118 ENDIF 1119 ENDIF 1120 1121 firstx=.false. 1122 ENDIF 1123 #endif 1097 ENDIF 1098 ENDIF 1099 1100 firstx=.false. 1101 ENDIF 1102 ENDIF 1124 1103 1125 1104 IF (.NOT.clef_stations(iff)) THEN … … 1129 1108 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,nbp_lon*jj_nb,index2d) 1130 1109 #endif 1131 ! #ifdef CPP_XIOS1110 ! IF (using_xios) THEN 1132 1111 ! IF (iff == iff_beg) THEN 1133 1112 ! IF (prt_level >= 10) THEN … … 1136 1115 ! CALL xios_send_field(var%name, Field2d) 1137 1116 ! ENDIF 1138 ! #endif1117 ! ENDIF 1139 1118 ELSE 1140 1119 ALLOCATE(fieldok(npstn)) … … 1188 1167 nid_files, swaerofree_diag 1189 1168 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, regular_lonlat, unstructured 1190 #ifdef CPP_XIOS 1191 USE xios, ONLY: xios_send_field, xios_field_is_active 1192 #endif 1169 USE lmdz_xios, ONLY: xios_send_field, xios_field_is_active, using_xios 1193 1170 USE print_control_mod, ONLY: prt_level,lunout 1194 1171 … … 1236 1213 CALL bcast_omp(swaerofree_diag) 1237 1214 ELSE 1238 #ifdef CPP_XIOS 1239 IF (ok_all_xml) THEN1240 !$omp barrier1241 !$omp master1242 is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.)1243 !$omp end master1244 !$omp barrier1245 IF(.not. is_active) RETURN1246 ENDIF1247 #endif 1215 IF (using_xios) THEN 1216 IF (ok_all_xml) THEN 1217 !$omp barrier 1218 !$omp master 1219 is_active = xios_field_is_active(var%name, at_current_timestep_arg=.false.) 1220 !$omp end master 1221 !$omp barrier 1222 IF(.not. is_active) RETURN 1223 ENDIF 1224 ENDIF 1248 1225 1249 1226 !Et sinon on.... écrit … … 1273 1250 1274 1251 IF (ok_all_xml) THEN 1275 #ifdef CPP_XIOS 1252 IF (using_xios) THEN 1276 1253 IF (prt_level >= 10) THEN 1277 1254 write(lunout,*)'Dans iophy histwrite3D,var%name ',& … … 1292 1269 ENDIF 1293 1270 1294 #else 1271 ELSE 1295 1272 CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 1296 #endif 1273 ENDIF 1297 1274 ELSE 1298 1275 1299 1276 DO iff=iff_beg, iff_end 1300 1277 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 1301 #ifdef CPP_XIOS 1278 IF (using_xios) THEN 1302 1279 IF (firstx) THEN 1303 1280 IF (prt_level >= 10) THEN … … 1324 1301 firstx=.false. 1325 1302 ENDIF 1326 #endif 1327 IF (.NOT.clef_stations(iff)) THEN 1328 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1329 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1303 ENDIF 1304 1305 IF (.NOT.clef_stations(iff)) THEN 1306 ALLOCATE(index3d(nbp_lon*jj_nb*nlev)) 1307 ALLOCATE(fieldok(nbp_lon*jj_nb,nlev)) 1330 1308 1331 1309 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1333 1311 #endif 1334 1312 1335 ! #ifdef CPP_XIOS1313 ! IF (using_xios) THEN 1336 1314 ! IF (iff == 1) THEN 1337 1315 ! CALL xios_send_field(var%name, Field3d(:,:,1:klev)) 1338 1316 ! ENDIF 1339 ! #endif1317 ! ENDIF 1340 1318 ! 1341 1319 ELSE … … 1378 1356 1379 1357 ! VERSION DES HISTWRITE DEDIEES AU TOUT-XIOS-XML DEJA UTILISEE DANS PHYDEV 1380 #ifdef CPP_XIOS1381 1358 SUBROUTINE histwrite2d_xios(field_name,field) 1382 1359 … … 1386 1363 jj_nb, klon_mpi, is_master 1387 1364 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured 1388 USE xios, ONLY: xios_send_field1365 USE lmdz_xios, ONLY: xios_send_field 1389 1366 USE print_control_mod, ONLY: prt_level,lunout 1390 1367 … … 1468 1445 is_sequential, klon_mpi_begin, klon_mpi_end, & 1469 1446 jj_nb, klon_mpi, is_master 1470 USE xios, ONLY: xios_send_field1447 USE lmdz_xios, ONLY: xios_send_field 1471 1448 USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat, grid_type, unstructured 1472 1449 USE print_control_mod, ONLY: prt_level,lunout … … 1551 1528 END SUBROUTINE histwrite3d_xios 1552 1529 1553 #ifdef CPP_XIOS1554 1530 SUBROUTINE histwrite0d_xios(field_name, field) 1555 USE xios, ONLY: xios_send_field1531 USE lmdz_xios, ONLY: xios_send_field 1556 1532 USE mod_phys_lmdz_para, ONLY: is_master 1557 1533 USE print_control_mod, ONLY: prt_level,lunout … … 1568 1544 1569 1545 END SUBROUTINE histwrite0d_xios 1570 #endif 1571 1572 #endif 1546 1573 1547 END MODULE iophy -
LMDZ6/trunk/libf/phylmd/limit_read_mod.F90
r3435 r4619 36 36 USE surface_data 37 37 USE mod_phys_lmdz_para 38 #ifdef CPP_XIOS 39 USE XIOS 40 #endif 38 USE lmdz_xios 39 41 40 IMPLICIT NONE 42 41 INTEGER, INTENT(IN) :: first_day … … 45 44 IF ( type_ocean /= 'couple') THEN 46 45 IF (grid_type==unstructured) THEN 47 #ifdef CPP_XIOS48 46 IF (is_omp_master) CALL xios_set_file_attr("limit_read",enabled=.TRUE.,record_offset=first_day) 49 #endif50 47 ENDIF 51 48 ENDIF … … 172 169 USE phys_cal_mod, ONLY : calend, year_len 173 170 USE print_control_mod, ONLY: lunout, prt_level 174 #ifdef CPP_XIOS 175 USE XIOS, ONLY: xios_recv_field 176 #endif 171 USE lmdz_xios, ONLY: xios_recv_field, using_xios 177 172 178 173 IMPLICIT NONE … … 297 292 IF (grid_type==unstructured) THEN 298 293 299 #ifdef CPP_XIOS300 294 IF ( type_ocean /= 'couple') THEN 301 295 … … 331 325 CALL Scatter_omp(rug_mpi, rugos) 332 326 END IF 333 #endif334 335 327 336 328 ELSE ! grid_type==regular -
LMDZ6/trunk/libf/phylmd/moy_undefSTD.F90
r3435 r4619 8 8 USE phys_state_var_mod 9 9 #endif 10 #ifdef CPP_XIOS 11 USE wxios, ONLY: missing_val 12 #endif 10 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 13 11 14 12 USE phys_cal_mod, ONLY: mth_len 15 13 IMPLICIT NONE 16 14 include "clesphys.h" 17 #ifndef CPP_XIOS18 15 REAL :: missing_val 19 #endif20 16 21 17 ! ==================================================================== … … 59 55 60 56 ! missing_val = nf90_fill_real 61 #ifndef CPP_XIOS 62 missing_val=missing_val_nf90 63 #endif 57 IF (using_xios) THEN 58 missing_val = missing_val_xios 59 ELSE 60 missing_val=missing_val_nf90 61 ENDIF 64 62 65 63 DO n = 1, nout -
LMDZ6/trunk/libf/phylmd/oasis.F90
r4596 r4619 117 117 USE surface_data, ONLY : version_ocean 118 118 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 119 #ifdef CPP_XIOS120 119 USE wxios, ONLY : wxios_context_init 121 USE xios 122 #endif 120 USE lmdz_xios 123 121 USE print_control_mod, ONLY: lunout 124 122 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, grid_type, unstructured, regular_lonlat … … 393 391 ! End definition 394 392 !************************************************************************************ 395 #ifdef CPP_XIOS 396 CALL xios_oasis_enddef()397 #endif 393 394 IF (using_xios) CALL xios_oasis_enddef() 395 398 396 CALL prism_enddef_proto(ierror) 399 397 IF (ierror .NE. PRISM_Ok) THEN … … 404 402 ENDIF 405 403 406 #ifdef CPP_XIOS 407 ! CALL wxios_context_init() 408 #endif 409 410 !$OMP END MASTER 404 S!$OMP END MASTER 411 405 412 406 END SUBROUTINE inicma -
LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
r4569 r4619 319 319 use phys_output_var_mod, only: tkt, tks, taur, sss 320 320 use blowing_snow_ini_mod, only : zeta_bs 321 #ifdef CPP_XIOS 322 USE wxios, ONLY: missing_val 323 #else 324 use netcdf, only: missing_val => nf90_fill_real 325 #endif 321 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 322 USE netcdf, only: missing_val_netcdf => nf90_fill_real 326 323 327 324 … … 899 896 ! compression of delta_sst, delta_sal, ds_ns, dt_ns, dter, dser, 900 897 ! dt_ds, tkt, tks, taur, sss on ocean points 901 898 REAL :: missing_val 902 899 !**************************************************************************************** 903 900 ! End of declarations 904 901 !**************************************************************************************** 902 IF (using_xios) THEN 903 missing_val=missing_val_xios 904 ELSE 905 missing_val=missing_val_netcdf 906 ENDIF 905 907 906 908 IF (prt_level >=10) print *,' -> pbl_surface, itap ',itap -
LMDZ6/trunk/libf/phylmd/phyaqua_mod.F90
r4523 r4619 514 514 USE mod_phys_lmdz_para, ONLY: is_omp_master, klon_mpi 515 515 USE mod_phys_lmdz_transfert_para, ONLY: gather_omp 516 #ifdef CPP_XIOS 517 USE xios 518 #endif 516 USE lmdz_xios 519 517 IMPLICIT NONE 520 518 … … 536 534 ! on the whole physics grid 537 535 538 #ifdef CPP_XIOS 539 PRINT *, 'writelim: Ecriture du fichier limit'540 541 CALL gather_omp(phy_foce, phy_mpi)542 IF (is_omp_master) CALL xios_send_field('foce_limout',phy_mpi)543 544 CALL gather_omp(phy_fsic, phy_mpi)545 IF (is_omp_master) CALL xios_send_field('fsic_limout',phy_mpi)536 IF (using_xios) THEN 537 PRINT *, 'writelim: Ecriture du fichier limit' 538 539 CALL gather_omp(phy_foce, phy_mpi) 540 IF (is_omp_master) CALL xios_send_field('foce_limout',phy_mpi) 541 542 CALL gather_omp(phy_fsic, phy_mpi) 543 IF (is_omp_master) CALL xios_send_field('fsic_limout',phy_mpi) 546 544 547 CALL gather_omp(phy_fter, phy_mpi)548 IF (is_omp_master) CALL xios_send_field('fter_limout',phy_mpi)545 CALL gather_omp(phy_fter, phy_mpi) 546 IF (is_omp_master) CALL xios_send_field('fter_limout',phy_mpi) 549 547 550 CALL gather_omp(phy_flic, phy_mpi)551 IF (is_omp_master) CALL xios_send_field('flic_limout',phy_mpi)552 553 CALL gather_omp(phy_sst, phy_mpi)554 IF (is_omp_master) CALL xios_send_field('sst_limout',phy_mpi)555 556 CALL gather_omp(phy_bil, phy_mpi)557 IF (is_omp_master) CALL xios_send_field('bils_limout',phy_mpi)558 559 CALL gather_omp(phy_alb, phy_mpi)560 IF (is_omp_master) CALL xios_send_field('alb_limout',phy_mpi)561 562 CALL gather_omp(phy_rug, phy_mpi)563 IF (is_omp_master) CALL xios_send_field('rug_limout',phy_mpi)564 #endif 548 CALL gather_omp(phy_flic, phy_mpi) 549 IF (is_omp_master) CALL xios_send_field('flic_limout',phy_mpi) 550 551 CALL gather_omp(phy_sst, phy_mpi) 552 IF (is_omp_master) CALL xios_send_field('sst_limout',phy_mpi) 553 554 CALL gather_omp(phy_bil, phy_mpi) 555 IF (is_omp_master) CALL xios_send_field('bils_limout',phy_mpi) 556 557 CALL gather_omp(phy_alb, phy_mpi) 558 IF (is_omp_master) CALL xios_send_field('alb_limout',phy_mpi) 559 560 CALL gather_omp(phy_rug, phy_mpi) 561 IF (is_omp_master) CALL xios_send_field('rug_limout',phy_mpi) 562 ENDIF 565 563 END SUBROUTINE writelim_unstruct 566 564 -
LMDZ6/trunk/libf/phylmd/phyetat0_mod.F90
r4613 r4619 39 39 USE ocean_slab_mod, ONLY: nslay, tslab, seaice, tice, ocean_slab_init 40 40 USE time_phylmdz_mod, ONLY: init_iteration, pdtphys, itau_phy 41 #ifdef CPP_XIOS 42 USE wxios, ONLY: missing_val 43 #else 44 use netcdf, only: missing_val => nf90_fill_real 45 #endif 41 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 42 use netcdf, only: missing_val_netcdf => nf90_fill_real 46 43 use config_ocean_skin_m, only: activate_ocean_skin 47 44 … … 92 89 REAL :: lon_startphy(klon), lat_startphy(klon) 93 90 CHARACTER(LEN=maxlen) :: tname, t(2) 94 91 REAL :: missing_val 92 93 IF (using_xios) THEN 94 missing_val=missing_val_xios 95 ELSE 96 missing_val=missing_val_netcdf 97 ENDIF 98 95 99 ! FH1D 96 100 ! real iolat(jjm+1) -
LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r4593 r4619 2065 2065 2066 2066 #ifdef CPP_Dust 2067 INCLUDE "Dust/spla_output_dat.h"2067 INCLUDE 'spla_output_dat.h' 2068 2068 #endif 2069 2069 -
LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
r4228 r4619 47 47 USE vertical_layers_mod, ONLY: ap,bp,preff,presnivs, aps, bps, pseudoalt, presinter 48 48 USE time_phylmdz_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref 49 #ifdef CPP_XIOS50 49 ! ug Pour les sorties XIOS 51 50 USE wxios 52 #endif53 51 54 52 IMPLICIT NONE … … 129 127 REAL, DIMENSION(klev+1) :: lev_index 130 128 131 #ifdef CPP_XIOS132 129 ! ug Variables utilis\'ees pour r\'ecup\'erer le calendrier pour xios 133 130 INTEGER :: x_an, x_mois, x_jour … … 135 132 INTEGER :: ini_an, ini_mois, ini_jour 136 133 REAL :: ini_heure 137 #endif 134 138 135 INTEGER :: ISW 139 136 REAL, DIMENSION(NSW) :: wl1_sun, wl2_sun !wavelength bounds (in um) for SW … … 290 287 ENDIF 291 288 292 #ifdef CPP_XIOS 293 ! ug R\'eglage du calendrier xios294 !Temps julian => an, mois, jour, heure295 CALL ju2ymds(zjulian, x_an, x_mois, x_jour, x_heure)296 CALL ju2ymds(zjulian_start, ini_an, ini_mois, ini_jour, ini_heure)297 CALL wxios_set_cal(dtime, calend, x_an, x_mois, x_jour, x_heure, ini_an, &298 ini_mois, ini_jour, ini_heure )299 #endif 289 IF (using_xios) THEN 290 ! ug R\'eglage du calendrier xios 291 !Temps julian => an, mois, jour, heure 292 CALL ju2ymds(zjulian, x_an, x_mois, x_jour, x_heure) 293 CALL ju2ymds(zjulian_start, ini_an, ini_mois, ini_jour, ini_heure) 294 CALL wxios_set_cal(dtime, calend, x_an, x_mois, x_jour, x_heure, ini_an, & 295 ini_mois, ini_jour, ini_heure ) 296 ENDIF 300 297 301 298 !!!!!!!!!!!!!!!!!!!!!!! Boucle sur les fichiers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 330 327 331 328 332 #ifdef CPP_XIOS 333 !!! Ouverture de chaque fichier XIOS !!!!!!!!!!! 334 IF (.not. ok_all_xml) THEN 329 IF (using_xios) THEN 330 !!! Ouverture de chaque fichier XIOS !!!!!!!!!!! 331 IF (.not. ok_all_xml) THEN 332 IF (prt_level >= 10) THEN 333 print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff)) 334 ENDIF 335 CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 336 ENDIF 337 338 !!! Declaration des axes verticaux de chaque fichier: 335 339 IF (prt_level >= 10) THEN 336 print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff))340 print*,'phys_output_open: Declare vertical axes for each file' 337 341 ENDIF 338 CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 339 ENDIF 340 341 !!! Declaration des axes verticaux de chaque fichier: 342 IF (prt_level >= 10) THEN 343 print*,'phys_output_open: Declare vertical axes for each file' 344 ENDIF 345 346 IF (iff.LE.6.OR.iff.EQ.10) THEN 347 CALL wxios_add_vaxis("presnivs", & 348 levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff))) 349 CALL wxios_add_vaxis("presinter", & 350 klev + 1, presinter(1:klev+1)) 351 CALL wxios_add_vaxis("Ahyb", & 352 levmax(iff) - levmin(iff) + 1, aps(levmin(iff):levmax(iff)), positif='down', & 353 bnds=Ahyb_bounds(levmin(iff):levmax(iff),:)) 354 CALL wxios_add_vaxis("Bhyb", & 355 levmax(iff) - levmin(iff) + 1, bps(levmin(iff):levmax(iff)), positif='down', & 356 bnds=Bhyb_bounds(levmin(iff):levmax(iff),:)) 357 CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, & 358 lev_index(levmin(iff):levmax(iff))) 359 CALL wxios_add_vaxis("klevp1", klev+1, & 360 lev_index(1:klev+1)) 361 CALL wxios_add_vaxis("bnds", 2, (/1.,2./)) 362 363 CALL wxios_add_vaxis("Alt", & 364 levmax(iff) - levmin(iff) + 1, pseudoalt) 365 366 ! wl1_sun/wl2_sun: minimum/maximum bound of wavelength (in um) 367 SELECT CASE(NSW) 368 CASE(6) 369 wl1_sun(1:6) = [0.180, 0.250, 0.440, 0.690, 1.190, 2.380] 370 wl2_sun(1:6) = [0.250, 0.440, 0.690, 1.190, 2.380, 4.000] 371 CASE(2) 372 wl1_sun(1:2) = [0.250, 0.690] 373 wl2_sun(1:2) = [0.690, 4.000] 374 END SELECT 375 376 DO ISW=1, NSW 377 wn1_sun(ISW)=1.e+6/wl1_sun(ISW) 378 wn2_sun(ISW)=1.e+6/wl2_sun(ISW) 379 spbnds_sun(ISW,1)=wn2_sun(ISW) 380 spbnds_sun(ISW,2)=wn1_sun(ISW) 381 spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2 382 ENDDO 342 343 IF (iff.LE.6.OR.iff.EQ.10) THEN 344 CALL wxios_add_vaxis("presnivs", & 345 levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff))) 346 CALL wxios_add_vaxis("presinter", & 347 klev + 1, presinter(1:klev+1)) 348 CALL wxios_add_vaxis("Ahyb", & 349 levmax(iff) - levmin(iff) + 1, aps(levmin(iff):levmax(iff)), positif='down', & 350 bnds=Ahyb_bounds(levmin(iff):levmax(iff),:)) 351 CALL wxios_add_vaxis("Bhyb", & 352 levmax(iff) - levmin(iff) + 1, bps(levmin(iff):levmax(iff)), positif='down', & 353 bnds=Bhyb_bounds(levmin(iff):levmax(iff),:)) 354 CALL wxios_add_vaxis("klev", levmax(iff) - levmin(iff) + 1, & 355 lev_index(levmin(iff):levmax(iff))) 356 CALL wxios_add_vaxis("klevp1", klev+1, & 357 lev_index(1:klev+1)) 358 CALL wxios_add_vaxis("bnds", 2, (/1.,2./)) 359 360 CALL wxios_add_vaxis("Alt", & 361 levmax(iff) - levmin(iff) + 1, pseudoalt) 362 363 ! wl1_sun/wl2_sun: minimum/maximum bound of wavelength (in um) 364 SELECT CASE(NSW) 365 CASE(6) 366 wl1_sun(1:6) = [0.180, 0.250, 0.440, 0.690, 1.190, 2.380] 367 wl2_sun(1:6) = [0.250, 0.440, 0.690, 1.190, 2.380, 4.000] 368 CASE(2) 369 wl1_sun(1:2) = [0.250, 0.690] 370 wl2_sun(1:2) = [0.690, 4.000] 371 END SELECT 372 373 DO ISW=1, NSW 374 wn1_sun(ISW)=1.e+6/wl1_sun(ISW) 375 wn2_sun(ISW)=1.e+6/wl2_sun(ISW) 376 spbnds_sun(ISW,1)=wn2_sun(ISW) 377 spbnds_sun(ISW,2)=wn1_sun(ISW) 378 spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2 379 ENDDO 383 380 ! 384 381 !!! ajout axe vertical spectband : solar band number 385 CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down')386 ELSE387 ! NMC files388 CALL wxios_add_vaxis("plev", &389 levmax(iff) - levmin(iff) + 1, rlevSTD(levmin(iff):levmax(iff)))390 ENDIF391 #endif382 CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down') 383 ELSE 384 ! NMC files 385 CALL wxios_add_vaxis("plev", & 386 levmax(iff) - levmin(iff) + 1, rlevSTD(levmin(iff):levmax(iff))) 387 ENDIF 388 ENDIF !using_xios 392 389 393 390 IF (clef_files(iff)) THEN -
LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
r4608 r4619 420 420 USE netcdf, ONLY: nf90_fill_real 421 421 USE print_control_mod, ONLY: prt_level,lunout 422 423 424 #ifdef CPP_XIOS425 422 ! ug Pour les sorties XIOS 426 USE xios 427 USE wxios, ONLY: wxios_closedef, missing_val, wxios_set_context 428 #endif 423 USE lmdz_xios 424 USE wxios, ONLY: wxios_closedef, missing_val_xios=>missing_val, wxios_set_context 429 425 USE phys_cal_mod, ONLY : mth_len 430 426 … … 484 480 !$OMP THREADPRIVATE(kmax_100m) 485 481 REAL :: x 486 #ifndef CPP_XIOS487 482 REAL :: missing_val 488 #endif489 483 REAL, PARAMETER :: un_jour=86400. 490 484 CHARACTER(len=12) :: nvar … … 513 507 ! ENDIF 514 508 515 #ifdef CPP_XIOS 516 CALL wxios_set_context 517 #endif 518 519 #ifndef CPP_XIOS 520 missing_val=missing_val_nf90521 #endif 509 IF (using_xios) CALL wxios_set_context 510 511 IF (using_xios) THEN 512 missing_val=missing_val_xios 513 ELSE 514 missing_val=missing_val_nf90 515 ENDIF 522 516 523 517 IF (.NOT.vars_defined) THEN … … 554 548 DO iinit=1, iinitend 555 549 ! print *,'IFF iinit=', iinit, iinitend 556 #ifdef CPP_XIOS 557 !$OMP MASTER 558 IF (vars_defined) THEN 559 IF (prt_level >= 10) then 560 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 561 ENDIF 562 ! CALL xios_update_calendar(itau_w) 563 CALL xios_update_calendar(itap) 564 ENDIF 565 !$OMP END MASTER 566 !$OMP BARRIER 567 #endif 550 IF (using_xios) THEN 551 !$OMP MASTER 552 IF (vars_defined) THEN 553 IF (prt_level >= 10) then 554 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 555 ENDIF 556 ! CALL xios_update_calendar(itau_w) 557 CALL xios_update_calendar(itap) 558 ENDIF 559 !$OMP END MASTER 560 !$OMP BARRIER 561 ENDIF 562 568 563 ! On procède à l'écriture ou à la définition des nombreuses variables: 569 564 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 588 583 CALL histwrite_phy(o_contfracOR, pctsrf(:,is_ter)) 589 584 ! 590 #ifdef CPP_XIOS 591 CALL histwrite_phy("R_ecc",R_ecc) 592 CALL histwrite_phy("R_peri",R_peri) 593 CALL histwrite_phy("R_incl",R_incl) 594 CALL histwrite_phy("solaire",solaire) 595 CALL histwrite_phy(o_Ahyb, ap) 596 CALL histwrite_phy(o_Bhyb, bp) 597 CALL histwrite_phy(o_Ahyb_bounds, Ahyb_bounds) 598 CALL histwrite_phy(o_Bhyb_bounds, Bhyb_bounds) 599 CALL histwrite_phy(o_Ahyb_mid, aps) 600 CALL histwrite_phy(o_Bhyb_mid, bps) 601 CALL histwrite_phy(o_Ahyb_mid_bounds, Ahyb_mid_bounds) 602 CALL histwrite_phy(o_Bhyb_mid_bounds, Bhyb_mid_bounds) 603 CALL histwrite_phy(o_longitude, longitude_deg) 604 CALL histwrite_phy(o_latitude, latitude_deg) 585 IF (using_xios) THEN 586 587 CALL histwrite_phy("R_ecc",R_ecc) 588 CALL histwrite_phy("R_peri",R_peri) 589 CALL histwrite_phy("R_incl",R_incl) 590 CALL histwrite_phy("solaire",solaire) 591 CALL histwrite_phy(o_Ahyb, ap) 592 CALL histwrite_phy(o_Bhyb, bp) 593 CALL histwrite_phy(o_Ahyb_bounds, Ahyb_bounds) 594 CALL histwrite_phy(o_Bhyb_bounds, Bhyb_bounds) 595 CALL histwrite_phy(o_Ahyb_mid, aps) 596 CALL histwrite_phy(o_Bhyb_mid, bps) 597 CALL histwrite_phy(o_Ahyb_mid_bounds, Ahyb_mid_bounds) 598 CALL histwrite_phy(o_Bhyb_mid_bounds, Bhyb_mid_bounds) 599 CALL histwrite_phy(o_longitude, longitude_deg) 600 CALL histwrite_phy(o_latitude, latitude_deg) 605 601 ! 606 602 #ifdef CPP_RRTM 607 IF (iflag_rrtm.EQ.1) THEN608 DO ISW=1, NSW609 WRITE(ch1,'(i1)') ISW610 ! zx_tmp_0d=RSUN(ISW)611 ! CALL histwrite_phy("rsun"//ch1,zx_tmp_0d)612 CALL histwrite_phy("rsun"//ch1,RSUN(ISW))613 ENDDO614 ENDIF603 IF (iflag_rrtm.EQ.1) THEN 604 DO ISW=1, NSW 605 WRITE(ch1,'(i1)') ISW 606 ! zx_tmp_0d=RSUN(ISW) 607 ! CALL histwrite_phy("rsun"//ch1,zx_tmp_0d) 608 CALL histwrite_phy("rsun"//ch1,RSUN(ISW)) 609 ENDDO 610 ENDIF 615 611 #endif 616 612 ! 617 CALL histwrite_phy("co2_ppm",co2_ppm)618 CALL histwrite_phy("CH4_ppb",CH4_ppb)619 CALL histwrite_phy("N2O_ppb",N2O_ppb)620 CALL histwrite_phy("CFC11_ppt",CFC11_ppt)621 CALL histwrite_phy("CFC12_ppt",CFC12_ppt)613 CALL histwrite_phy("co2_ppm",co2_ppm) 614 CALL histwrite_phy("CH4_ppb",CH4_ppb) 615 CALL histwrite_phy("N2O_ppb",N2O_ppb) 616 CALL histwrite_phy("CFC11_ppt",CFC11_ppt) 617 CALL histwrite_phy("CFC12_ppt",CFC12_ppt) 622 618 ! 623 #endif 619 ENDIF !using_xios 624 620 625 621 !!! Champs 2D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 884 880 885 881 ! offline 886 #ifdef CPP_XIOS 887 IF (offline) THEN888 889 coefh_stok(:,1) = cdragh(:)890 coefh_stok(:,2:klev) = coefh(:,2:klev, is_ave)882 IF (using_xios) THEN 883 IF (offline) THEN 884 885 coefh_stok(:,1) = cdragh(:) 886 coefh_stok(:,2:klev) = coefh(:,2:klev, is_ave) 891 887 892 CALL histwrite_phy('upwd_stok', upwd)893 CALL histwrite_phy('t_stok', t)894 CALL histwrite_phy('fm_th_stok', fm_therm(:,1:klev))895 CALL histwrite_phy('en_th_stok', entr_therm)896 CALL histwrite_phy('da_stok',da )897 CALL histwrite_phy('mp_stok',mp )898 CALL histwrite_phy('dnwd_stok', dnwd)899 CALL histwrite_phy('wght_stok', wght_cvfd)900 CALL histwrite_phy('coefh_stok', coefh_stok)901 CALL histwrite_phy('yu1_stok', u1)902 CALL histwrite_phy('yv1_stok', v1)903 904 DO k=1,klev905 IF (k<10) THEN906 WRITE(nvar,'(i1)') k907 ELSE IF (k<100) THEN908 WRITE(nvar,'(i2)') k909 ELSE910 WRITE(nvar,'(i3)') k911 END IF912 nvar='phi_lev'//trim(nvar)913 CALL histwrite_phy(nvar,phi(:,:,k))914 END DO888 CALL histwrite_phy('upwd_stok', upwd) 889 CALL histwrite_phy('t_stok', t) 890 CALL histwrite_phy('fm_th_stok', fm_therm(:,1:klev)) 891 CALL histwrite_phy('en_th_stok', entr_therm) 892 CALL histwrite_phy('da_stok',da ) 893 CALL histwrite_phy('mp_stok',mp ) 894 CALL histwrite_phy('dnwd_stok', dnwd) 895 CALL histwrite_phy('wght_stok', wght_cvfd) 896 CALL histwrite_phy('coefh_stok', coefh_stok) 897 CALL histwrite_phy('yu1_stok', u1) 898 CALL histwrite_phy('yv1_stok', v1) 899 900 DO k=1,klev 901 IF (k<10) THEN 902 WRITE(nvar,'(i1)') k 903 ELSE IF (k<100) THEN 904 WRITE(nvar,'(i2)') k 905 ELSE 906 WRITE(nvar,'(i3)') k 907 END IF 908 nvar='phi_lev'//trim(nvar) 909 CALL histwrite_phy(nvar,phi(:,:,k)) 910 END DO 915 911 916 ENDIF917 #endif 912 ENDIF 913 ENDIF 918 914 919 915 … … 1291 1287 1292 1288 #ifdef CPP_IOIPSL 1293 #ifndef CPP_XIOS 1294 IF (.NOT.ok_all_xml) THEN 1295 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 1296 ! Champs interpolles sur des niveaux de pression 1297 DO iff=1, nfiles 1298 ll=0 1299 DO k=1, nlevSTD 1300 bb2=clevSTD(k) 1301 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 1289 IF (.NOT. using_xios) THEN 1290 IF (.NOT.ok_all_xml) THEN 1291 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 1292 ! Champs interpolles sur des niveaux de pression 1293 DO iff=1, nfiles 1294 ll=0 1295 DO k=1, nlevSTD 1296 bb2=clevSTD(k) 1297 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 1298 bb2.EQ."500".OR.bb2.EQ."200".OR. & 1299 bb2.EQ."100".OR. & 1300 bb2.EQ."50".OR.bb2.EQ."10") THEN 1301 1302 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1303 ll=ll+1 1304 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff) 1305 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff) 1306 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff) 1307 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff) 1308 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff) 1309 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 1310 1311 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 1312 ENDDO 1313 ENDDO 1314 ENDIF 1315 ENDIF 1316 #endif 1317 1318 IF (using_xios) THEN 1319 IF (ok_all_xml) THEN 1320 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 1321 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1322 ll=0 1323 DO k=1, nlevSTD 1324 bb2=clevSTD(k) 1325 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 1302 1326 bb2.EQ."500".OR.bb2.EQ."200".OR. & 1303 1327 bb2.EQ."100".OR. & 1304 1328 bb2.EQ."50".OR.bb2.EQ."10") THEN 1305 1306 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1307 ll=ll+1 1308 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff) 1309 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff) 1310 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff) 1311 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff) 1312 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff) 1313 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 1314 1315 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 1316 ENDDO 1317 ENDDO 1318 ENDIF 1319 #endif 1320 #endif 1321 #ifdef CPP_XIOS 1322 IF (ok_all_xml) THEN 1323 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 1324 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1325 ll=0 1326 DO k=1, nlevSTD 1327 bb2=clevSTD(k) 1328 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 1329 bb2.EQ."500".OR.bb2.EQ."200".OR. & 1330 bb2.EQ."100".OR. & 1331 bb2.EQ."50".OR.bb2.EQ."10") THEN 1332 ll=ll+1 1333 CALL histwrite_phy(o_uSTDlevs(ll),ulevSTD(:,k)) 1334 CALL histwrite_phy(o_vSTDlevs(ll),vlevSTD(:,k)) 1335 CALL histwrite_phy(o_wSTDlevs(ll),wlevSTD(:,k)) 1336 CALL histwrite_phy(o_zSTDlevs(ll),philevSTD(:,k)) 1337 CALL histwrite_phy(o_qSTDlevs(ll),qlevSTD(:,k)) 1338 CALL histwrite_phy(o_tSTDlevs(ll),tlevSTD(:,k)) 1339 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 1340 ENDDO 1341 ENDIF 1342 #endif 1329 ll=ll+1 1330 CALL histwrite_phy(o_uSTDlevs(ll),ulevSTD(:,k)) 1331 CALL histwrite_phy(o_vSTDlevs(ll),vlevSTD(:,k)) 1332 CALL histwrite_phy(o_wSTDlevs(ll),wlevSTD(:,k)) 1333 CALL histwrite_phy(o_zSTDlevs(ll),philevSTD(:,k)) 1334 CALL histwrite_phy(o_qSTDlevs(ll),qlevSTD(:,k)) 1335 CALL histwrite_phy(o_tSTDlevs(ll),tlevSTD(:,k)) 1336 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 1337 ENDDO 1338 ENDIF 1339 ENDIF 1340 1343 1341 IF (vars_defined) THEN 1344 1342 DO i=1, klon … … 1789 1787 ENDIF 1790 1788 1791 #ifdef CPP_XIOS 1789 IF (using_xios) THEN 1792 1790 !solbnd begin 1793 1791 #ifdef CPP_RRTM 1794 IF (iflag_rrtm.EQ.1) THEN1795 IF (vars_defined) THEN1796 DO ISW=1, NSW1797 zx_tmp_fi3dsp(:,ISW) = swdn(:,klevp1)*swradcorr(:)*RSUN(ISW)1798 ENDDO1799 CALL histwrite_phy(o_solbnd, zx_tmp_fi3dsp)1800 ENDIF1801 ENDIF1792 IF (iflag_rrtm.EQ.1) THEN 1793 IF (vars_defined) THEN 1794 DO ISW=1, NSW 1795 zx_tmp_fi3dsp(:,ISW) = swdn(:,klevp1)*swradcorr(:)*RSUN(ISW) 1796 ENDDO 1797 CALL histwrite_phy(o_solbnd, zx_tmp_fi3dsp) 1798 ENDIF 1799 ENDIF 1802 1800 #endif 1803 1801 !solbnd end 1804 #endif 1802 ENDIF 1805 1803 #endif 1806 1804 … … 2379 2377 !!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!! 2380 2378 #ifdef CPP_IOIPSL 2381 #ifndef CPP_XIOS 2382 IF (.NOT.ok_all_xml) THEN 2383 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 2384 ! Champs interpolles sur des niveaux de pression 2385 DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9 2386 2387 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff) 2388 CALL histwrite_phy(o_ta,twriteSTD(:,:,iff-6),iff) 2389 CALL histwrite_phy(o_zg,phiwriteSTD(:,:,iff-6),iff) 2390 CALL histwrite_phy(o_hus,qwriteSTD(:,:,iff-6),iff) 2391 CALL histwrite_phy(o_hur,rhwriteSTD(:,:,iff-6),iff) 2392 CALL histwrite_phy(o_ua,uwriteSTD(:,:,iff-6),iff) 2393 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 2394 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 2395 IF (vars_defined) THEN 2396 DO k=1, nlevSTD 2397 DO i=1, klon 2398 IF (tnondef(i,k,iff-6).NE.missing_val) THEN 2399 IF (freq_outNMC(iff-6).LT.0) THEN 2400 freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 2401 ELSE 2402 freq_moyNMC(iff-6)=freq_outNMC(iff-6)/freq_calNMC(iff-6) 2403 ENDIF 2404 zx_tmp_fi3d_STD(i,k) = (100.*tnondef(i,k,iff-6))/freq_moyNMC(iff-6) 2405 ELSE 2406 zx_tmp_fi3d_STD(i,k) = missing_val 2407 ENDIF 2408 ENDDO 2409 ENDDO 2410 ENDIF 2411 CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff) 2412 IF (vars_defined) THEN 2413 DO k=1, nlevSTD 2414 DO i=1, klon 2415 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN 2416 zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 2417 ELSE 2418 zx_tmp_fi3d_STD(i,k) = missing_val 2419 ENDIF 2420 ENDDO 2421 ENDDO !k=1, nlevSTD 2422 ENDIF 2423 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff) 2424 IF (read_climoz == 2) THEN 2379 IF (.NOT. using_xios) THEN 2380 IF (.NOT.ok_all_xml) THEN 2381 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 2382 ! Champs interpolles sur des niveaux de pression 2383 DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9 2384 2385 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff) 2386 CALL histwrite_phy(o_ta,twriteSTD(:,:,iff-6),iff) 2387 CALL histwrite_phy(o_zg,phiwriteSTD(:,:,iff-6),iff) 2388 CALL histwrite_phy(o_hus,qwriteSTD(:,:,iff-6),iff) 2389 CALL histwrite_phy(o_hur,rhwriteSTD(:,:,iff-6),iff) 2390 CALL histwrite_phy(o_ua,uwriteSTD(:,:,iff-6),iff) 2391 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 2392 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 2425 2393 IF (vars_defined) THEN 2426 DO k=1, nlevSTD 2394 DO k=1, nlevSTD 2395 DO i=1, klon 2396 IF (tnondef(i,k,iff-6).NE.missing_val) THEN 2397 IF (freq_outNMC(iff-6).LT.0) THEN 2398 freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 2399 ELSE 2400 freq_moyNMC(iff-6)=freq_outNMC(iff-6)/freq_calNMC(iff-6) 2401 ENDIF 2402 zx_tmp_fi3d_STD(i,k) = (100.*tnondef(i,k,iff-6))/freq_moyNMC(iff-6) 2403 ELSE 2404 zx_tmp_fi3d_STD(i,k) = missing_val 2405 ENDIF 2406 ENDDO 2407 ENDDO 2408 ENDIF 2409 CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff) 2410 IF (vars_defined) THEN 2411 DO k=1, nlevSTD 2412 DO i=1, klon 2413 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN 2414 zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 2415 ELSE 2416 zx_tmp_fi3d_STD(i,k) = missing_val 2417 ENDIF 2418 ENDDO 2419 ENDDO !k=1, nlevSTD 2420 ENDIF 2421 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff) 2422 IF (read_climoz == 2) THEN 2423 IF (vars_defined) THEN 2424 DO k=1, nlevSTD 2427 2425 DO i=1, klon 2428 2426 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN … … 2432 2430 ENDIF 2433 2431 ENDDO 2434 ENDDO !k=1, nlevSTD 2432 ENDDO !k=1, nlevSTD 2433 ENDIF 2434 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD,iff) 2435 2435 ENDIF 2436 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD,iff) 2437 endif 2438 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff) 2439 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff) 2440 CALL histwrite_phy(o_vxT,vTsumSTD(:,:,iff-6),iff) 2441 CALL histwrite_phy(o_wxq,wqsumSTD(:,:,iff-6),iff) 2442 CALL histwrite_phy(o_vxphi,vphisumSTD(:,:,iff-6),iff) 2443 CALL histwrite_phy(o_wxT,wTsumSTD(:,:,iff-6),iff) 2444 CALL histwrite_phy(o_uxu,u2sumSTD(:,:,iff-6),iff) 2445 CALL histwrite_phy(o_vxv,v2sumSTD(:,:,iff-6),iff) 2446 CALL histwrite_phy(o_TxT,T2sumSTD(:,:,iff-6),iff) 2447 ENDDO !nfiles 2448 ENDIF 2436 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff) 2437 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff) 2438 CALL histwrite_phy(o_vxT,vTsumSTD(:,:,iff-6),iff) 2439 CALL histwrite_phy(o_wxq,wqsumSTD(:,:,iff-6),iff) 2440 CALL histwrite_phy(o_vxphi,vphisumSTD(:,:,iff-6),iff) 2441 CALL histwrite_phy(o_wxT,wTsumSTD(:,:,iff-6),iff) 2442 CALL histwrite_phy(o_uxu,u2sumSTD(:,:,iff-6),iff) 2443 CALL histwrite_phy(o_vxv,v2sumSTD(:,:,iff-6),iff) 2444 CALL histwrite_phy(o_TxT,T2sumSTD(:,:,iff-6),iff) 2445 ENDDO !nfiles 2446 ENDIF 2447 ENDIF !.NOT. using_xios 2449 2448 #endif 2450 #endif 2451 #ifdef CPP_XIOS 2452 IF (ok_all_xml) THEN2453 ! DO iff=7, nfiles2449 2450 IF (using_xios) THEN 2451 IF (ok_all_xml) THEN 2452 ! DO iff=7, nfiles 2454 2453 2455 2454 ! CALL histwrite_phy(o_tnondef,tnondef(:,:,3)) … … 2514 2513 CALL histwrite_phy(o_TxT,T2STD(:,:)) 2515 2514 ! ENDDO !nfiles 2516 ENDIF2517 #endif 2515 ENDIF 2516 ENDIF !using_xios 2518 2517 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2519 2518 IF (iflag_phytrac == 1 ) then … … 2698 2697 ENDDO ! iff 2699 2698 #endif 2700 #ifdef CPP_XIOS2701 2699 !On finalise l'initialisation: 2702 CALL wxios_closedef()2703 #endif 2700 IF (using_xios) CALL wxios_closedef() 2701 2704 2702 !$OMP END MASTER 2705 2703 !$OMP BARRIER -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4613 r4619 76 76 USE vampir 77 77 USE write_field_phy 78 #ifdef CPP_XIOS79 78 USE wxios, ONLY: g_ctx, wxios_set_context 80 #endif81 79 USE lscp_mod, ONLY : lscp 82 80 USE lmdz_wake_ini, ONLY : wake_ini … … 134 132 #endif 135 133 136 137 #ifdef CPP_XIOS 138 USE xios, ONLY: xios_update_calendar, xios_context_finalize 139 USE xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context 140 USE xios, ONLY: xios_set_current_context 141 USE wxios, ONLY: missing_val, missing_val_omp 142 #endif 134 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize 135 USE lmdz_xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context 136 USE lmdz_xios, ONLY: xios_set_current_context 137 USE wxios, ONLY: missing_val, using_xios 138 143 139 #ifndef CPP_XIOS 144 140 USE paramLMDZ_phy_mod … … 520 516 REAL dtadd(klon,klev) 521 517 522 #ifndef CPP_XIOS523 REAL, SAVE :: missing_val=nf90_fill_real524 #endif525 518 !! Variables moved to phys_local_var_mod 526 519 !! ! Variables pour le transport convectif … … 1276 1269 CALL update_time(pdtphys) 1277 1270 phys_tstep=NINT(pdtphys) 1278 #ifdef CPP_XIOS 1279 ! switch to XIOS LMDZ physics context 1280 IF (.NOT. debut .AND. is_omp_master) THEN 1281 CALL wxios_set_context() 1282 CALL xios_update_calendar(itap+1) 1283 ENDIF 1284 #endif 1271 IF (.NOT. using_xios) missing_val=nf90_fill_real 1272 1273 IF (using_xios) THEN 1274 ! switch to XIOS LMDZ physics context 1275 IF (.NOT. debut .AND. is_omp_master) THEN 1276 CALL wxios_set_context() 1277 CALL xios_update_calendar(itap+1) 1278 ENDIF 1279 ENDIF 1285 1280 1286 1281 !====================================================================== … … 1841 1836 1842 1837 1843 #ifdef CPP_XIOS 1844 IF (is_omp_master) CALL xios_update_calendar(1) 1845 #endif 1838 IF (using_xios) THEN 1839 IF (is_omp_master) CALL xios_update_calendar(1) 1840 ENDIF 1841 1846 1842 IF(read_climoz>=1 .AND. create_etat0_limit) CALL regr_horiz_time_climoz(read_climoz,ok_daily_climoz) 1847 1843 CALL create_etat0_limit_unstruct … … 2022 2018 !============================================================= 2023 2019 2024 #ifdef CPP_XIOS 2025 ! Get "missing_val" value from XML files (from temperature variable) 2026 !$OMP MASTER 2027 CALL xios_get_field_attr("temp",default_value=missing_val_omp) 2028 !$OMP END MASTER 2029 !$OMP BARRIER 2030 missing_val=missing_val_omp 2031 #endif 2032 2033 #ifdef CPP_XIOS 2034 ! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only 2035 ! initialised at that moment 2036 ! Get "missing_val" value from XML files (from temperature variable) 2037 !$OMP MASTER 2038 CALL xios_get_field_attr("temp",default_value=missing_val_omp) 2039 !$OMP END MASTER 2040 !$OMP BARRIER 2041 missing_val=missing_val_omp 2020 IF (using_xios) THEN 2021 ! Get "missing_val" value from XML files (from temperature variable) 2022 IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val) 2023 CALL bcast_omp(missing_val) 2024 ENDIF 2025 2026 IF (using_xios) THEN 2027 ! Need to put this initialisation after phyetat0 as in the coupled model the XIOS context is only 2028 ! initialised at that moment 2029 ! Get "missing_val" value from XML files (from temperature variable) 2030 IF (is_omp_master) CALL xios_get_field_attr("temp",default_value=missing_val) 2031 CALL bcast_omp(missing_val) 2042 2032 ! 2043 2033 ! Now we activate some double radiation call flags only if some 2044 2034 ! diagnostics are requested, otherwise there is no point in doing this 2045 IF (is_master) THEN2046 !--setting up swaero_diag to TRUE in XIOS case2047 IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. &2048 xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. &2049 xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR. &2050 (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. &2051 xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0")))) &2052 !!!--for now these fields are not in the XML files so they are omitted2053 !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) &2054 swaero_diag=.TRUE.2035 IF (is_master) THEN 2036 !--setting up swaero_diag to TRUE in XIOS case 2037 IF (xios_field_is_active("topswad").OR.xios_field_is_active("topswad0").OR. & 2038 xios_field_is_active("solswad").OR.xios_field_is_active("solswad0").OR. & 2039 xios_field_is_active("topswai").OR.xios_field_is_active("solswai").OR. & 2040 (iflag_rrtm==1.AND.(xios_field_is_active("toplwad").OR.xios_field_is_active("toplwad0").OR. & 2041 xios_field_is_active("sollwad").OR.xios_field_is_active("sollwad0")))) & 2042 !!!--for now these fields are not in the XML files so they are omitted 2043 !!! xios_field_is_active("toplwai").OR.xios_field_is_active("sollwai") !))) & 2044 swaero_diag=.TRUE. 2055 2045 2056 !--setting up swaerofree_diag to TRUE in XIOS case2057 IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. &2058 xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR. &2059 xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. &2060 xios_field_is_active("LWupTOAcleanclr")) &2061 swaerofree_diag=.TRUE.2046 !--setting up swaerofree_diag to TRUE in XIOS case 2047 IF (xios_field_is_active("SWdnSFCcleanclr").OR.xios_field_is_active("SWupSFCcleanclr").OR. & 2048 xios_field_is_active("SWupTOAcleanclr").OR.xios_field_is_active("rsucsaf").OR. & 2049 xios_field_is_active("rsdcsaf") .OR. xios_field_is_active("LWdnSFCcleanclr").OR. & 2050 xios_field_is_active("LWupTOAcleanclr")) & 2051 swaerofree_diag=.TRUE. 2062 2052 2063 !--setting up dryaod_diag to TRUE in XIOS case2064 DO naero = 1, naero_tot-12065 IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.2066 ENDDO2067 !2068 !--setting up ok_4xCO2atm to TRUE in XIOS case2069 IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &2070 xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &2071 xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &2072 xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &2073 xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &2074 xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &2075 ok_4xCO2atm=.TRUE.2076 ENDIF2077 !$OMP BARRIER2078 CALL bcast(swaero_diag)2079 CALL bcast(swaerofree_diag)2080 CALL bcast(dryaod_diag)2081 CALL bcast(ok_4xCO2atm)2082 #endif 2053 !--setting up dryaod_diag to TRUE in XIOS case 2054 DO naero = 1, naero_tot-1 2055 IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE. 2056 ENDDO 2057 ! 2058 !--setting up ok_4xCO2atm to TRUE in XIOS case 2059 IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. & 2060 xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. & 2061 xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. & 2062 xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. & 2063 xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. & 2064 xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) & 2065 ok_4xCO2atm=.TRUE. 2066 ENDIF 2067 !$OMP BARRIER 2068 CALL bcast(swaero_diag) 2069 CALL bcast(swaerofree_diag) 2070 CALL bcast(dryaod_diag) 2071 CALL bcast(ok_4xCO2atm) 2072 ENDIF !using_xios 2083 2073 ! 2084 2074 CALL printflag( tabcntr0,radpas,ok_journe, & … … 4509 4499 cool = cool + betalwoff * (cool0 - cool) 4510 4500 4511 #ifndef CPP_XIOS 4512 !4513 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un4514 !IM des taux doit etre different du taux actuel4515 !IM Par defaut on a les taux perturbes egaux aux taux actuels4516 !4517 IF (RCO2_per.NE.RCO2_act.OR. &4518 RCH4_per.NE.RCH4_act.OR. &4519 RN2O_per.NE.RN2O_act.OR. &4520 RCFC11_per.NE.RCFC11_act.OR. &4521 RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE.4522 #endif 4501 IF (.NOT. using_xios) THEN 4502 ! 4503 !IM 2eme calcul radiatif pour le cas perturbe ou au moins un 4504 !IM des taux doit etre different du taux actuel 4505 !IM Par defaut on a les taux perturbes egaux aux taux actuels 4506 ! 4507 IF (RCO2_per.NE.RCO2_act.OR. & 4508 RCH4_per.NE.RCH4_act.OR. & 4509 RN2O_per.NE.RN2O_act.OR. & 4510 RCFC11_per.NE.RCFC11_act.OR. & 4511 RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE. 4512 ENDIF 4523 4513 ! 4524 4514 IF (ok_4xCO2atm) THEN … … 5558 5548 5559 5549 #ifndef CPP_XIOS 5560 CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync)5550 CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync) 5561 5551 #endif 5562 5552 … … 5604 5594 5605 5595 ENDIF 5606 #ifdef CPP_XIOS 5607 IF (is_omp_master) CALL xios_context_finalize 5596 5597 IF (using_xios) THEN 5598 IF (is_omp_master) CALL xios_context_finalize 5608 5599 5609 5600 #ifdef INCA 5610 if (type_trac == 'inca') then5611 IF (is_omp_master .and. grid_type==unstructured) THEN5612 CALL finalize_inca5613 ENDIF5614 endif5601 if (type_trac == 'inca') then 5602 IF (is_omp_master .and. grid_type==unstructured) THEN 5603 CALL finalize_inca 5604 ENDIF 5605 endif 5615 5606 #endif 5616 5617 #endif 5607 ENDIF 5618 5608 WRITE(lunout,*) ' physiq fin, nombre de steps ou cvpas = 1 : ', Ncvpaseq1 5619 5609 ENDIF -
LMDZ6/trunk/libf/phylmd/plevel.F90
r2346 r4619 12 12 USE phys_state_var_mod, ONLY: missing_val_nf90 13 13 #endif 14 #ifdef CPP_XIOS 15 USE wxios, ONLY: missing_val 16 #endif 14 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 17 15 IMPLICIT NONE 18 16 … … 60 58 61 59 ! REAL missing_val 62 #ifndef CPP_XIOS63 60 REAL :: missing_val 64 #endif65 61 66 62 ! missing_val = nf90_fill_real 67 68 #ifndef CPP_XIOS 69 missing_val=missing_val_nf90 70 #endif 63 IF (using_xios) THEN 64 missing_val = missing_val_xios 65 ELSE 66 missing_val=missing_val_nf90 67 ENDIF 71 68 72 69 IF (first) THEN -
LMDZ6/trunk/libf/phylmd/plevel_new.F90
r2346 r4619 13 13 USE phys_state_var_mod, ONLY: missing_val_nf90 14 14 #endif 15 #ifdef CPP_XIOS 16 USE wxios, ONLY: missing_val 17 #endif 15 USE wxios, ONLY: missing_val_xios=>missing_val, using_xios 18 16 19 17 IMPLICIT NONE … … 62 60 INTEGER i, k 63 61 64 ! REAL missing_val65 #ifndef CPP_XIOS66 62 REAL :: missing_val 67 #endif68 63 69 ! missing_val = nf90_fill_real 70 71 #ifndef CPP_XIOS 72 73 #endif 64 IF (using_xios) THEN 65 missing_val=missing_val_xios 66 ELSE 67 missing_val=missing_val_nf90 68 ENDIF 74 69 75 70 IF (first) THEN -
LMDZ6/trunk/libf/phylmd/readaerosol_mod.F90
r4103 r4619 173 173 174 174 175 175 SUBROUTINE init_aero_fromfile(flag_aerosol) 176 176 USE netcdf 177 177 USE mod_phys_lmdz_para 178 178 USE mod_grid_phy_lmdz, ONLY: grid_type, unstructured 179 #ifdef CPP_XIOS 180 USE xios 181 #endif 179 USE lmdz_xios 182 180 IMPLICIT NONE 183 181 INTEGER, INTENT(IN) :: flag_aerosol 184 #ifdef CPP_XIOS185 182 REAL,ALLOCATABLE :: lat_src(:) 186 183 REAL,ALLOCATABLE :: lon_src(:) … … 191 188 REAL :: null_array(0) 192 189 193 IF (flag_aerosol>0 .AND. grid_type==unstructured) THEN 190 IF (using_xios) THEN 191 IF (flag_aerosol>0 .AND. grid_type==unstructured) THEN 194 192 195 IF (is_omp_root) THEN193 IF (is_omp_root) THEN 196 194 197 IF (is_mpi_root) THEN195 IF (is_mpi_root) THEN 198 196 199 IF (nf90_open(TRIM(file_aerosol), NF90_NOWRITE, ncid) /= NF90_NOERR) THEN 200 CALL check_err( nf90_open(TRIM(file_so4), NF90_NOWRITE, ncid), "pb open "//trim(file_so4) ) 197 IF (nf90_open(TRIM(file_aerosol), NF90_NOWRITE, ncid) /= NF90_NOERR) THEN 198 CALL check_err( nf90_open(TRIM(file_so4), NF90_NOWRITE, ncid), "pb open "//trim(file_so4) ) 199 ENDIF 200 201 ! Read and test longitudes 202 CALL check_err( nf90_inq_dimid(ncid, "lon", dimID),"pb inq dim lon") 203 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lon_src),"pb inq dim lon") 204 CALL check_err( nf90_inq_varid(ncid, 'lon', varid),"pb inq lon" ) 205 ALLOCATE(lon_src(nbp_lon_src)) 206 CALL check_err( nf90_get_var(ncid, varid, lon_src(:)),"pb get lon" ) 207 208 ! Read and test latitudes 209 CALL check_err( nf90_inq_dimid(ncid, "lat", dimID),"pb inq dim lat") 210 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lat_src),"pb inq dim lat") 211 CALL check_err( nf90_inq_varid(ncid, 'lat', varid),"pb inq lat" ) 212 ALLOCATE(lat_src(nbp_lat_src)) 213 CALL check_err( nf90_get_var(ncid, varid, lat_src(:)),"pb get lat" ) 214 IF (nf90_inq_dimid(ncid, 'lev', dimid) /= NF90_NOERR) THEN 215 IF (nf90_inq_dimid(ncid, 'presnivs', dimid)/= NF90_NOERR) THEN 216 CALL check_err(nf90_inq_dimid(ncid, 'PRESNIVS', dimid),'dimension lev,PRESNIVS or presnivs not in file') 217 ENDIF 218 ENDIF 219 CALL check_err( nf90_inquire_dimension(ncid, dimid, len = klev_src),"pb inq dim for PRESNIVS or lev" ) 220 CALL check_err( nf90_close(ncid),"pb in close" ) 201 221 ENDIF 202 222 203 ! Read and test longitudes 204 CALL check_err( nf90_inq_dimid(ncid, "lon", dimID),"pb inq dim lon") 205 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lon_src),"pb inq dim lon") 206 CALL check_err( nf90_inq_varid(ncid, 'lon', varid),"pb inq lon" ) 207 ALLOCATE(lon_src(nbp_lon_src)) 208 CALL check_err( nf90_get_var(ncid, varid, lon_src(:)),"pb get lon" ) 209 210 ! Read and test latitudes 211 CALL check_err( nf90_inq_dimid(ncid, "lat", dimID),"pb inq dim lat") 212 CALL check_err( nf90_inquire_dimension(ncid, dimID, len = nbp_lat_src),"pb inq dim lat") 213 CALL check_err( nf90_inq_varid(ncid, 'lat', varid),"pb inq lat" ) 214 ALLOCATE(lat_src(nbp_lat_src)) 215 CALL check_err( nf90_get_var(ncid, varid, lat_src(:)),"pb get lat" ) 216 IF (nf90_inq_dimid(ncid, 'lev', dimid) /= NF90_NOERR) THEN 217 IF (nf90_inq_dimid(ncid, 'presnivs', dimid)/= NF90_NOERR) THEN 218 CALL check_err(nf90_inq_dimid(ncid, 'PRESNIVS', dimid),'dimension lev,PRESNIVS or presnivs not in file') 219 ENDIF 223 CALL bcast_mpi(nbp_lat_src) 224 CALL bcast_mpi(nbp_lon_src) 225 CALL bcast_mpi(klev_src) 226 227 IF (is_mpi_root ) THEN 228 CALL xios_set_domain_attr("domain_aerosol",nj_glo=nbp_lat_src, nj=nbp_lat_src, jbegin=0, latvalue_1d=lat_src) 229 CALL xios_set_domain_attr("domain_aerosol",ni_glo=nbp_lon_src, ni=nbp_lon_src, ibegin=0, lonvalue_1d=lon_src) 230 ELSE 231 CALL xios_set_domain_attr("domain_aerosol",nj_glo=nbp_lat_src, nj=0, jbegin=0, latvalue_1d=null_array ) 232 CALL xios_set_domain_attr("domain_aerosol",ni_glo=nbp_lon_src, ni=0, ibegin=0, lonvalue_1d=null_array) 220 233 ENDIF 221 CALL check_err( nf90_inquire_dimension(ncid, dimid, len = klev_src),"pb inq dim for PRESNIVS or lev" ) 222 CALL check_err( nf90_close(ncid),"pb in close" ) 234 CALL xios_set_axis_attr("axis_aerosol",n_glo=klev_src) 235 CALL xios_set_fieldgroup_attr("aerosols", enabled=.TRUE.) 236 223 237 ENDIF 224 225 CALL bcast_mpi(nbp_lat_src)226 CALL bcast_mpi(nbp_lon_src)227 CALL bcast_mpi(klev_src)228 229 IF (is_mpi_root ) THEN230 CALL xios_set_domain_attr("domain_aerosol",nj_glo=nbp_lat_src, nj=nbp_lat_src, jbegin=0, latvalue_1d=lat_src)231 CALL xios_set_domain_attr("domain_aerosol",ni_glo=nbp_lon_src, ni=nbp_lon_src, ibegin=0, lonvalue_1d=lon_src)232 ELSE233 CALL xios_set_domain_attr("domain_aerosol",nj_glo=nbp_lat_src, nj=0, jbegin=0, latvalue_1d=null_array )234 CALL xios_set_domain_attr("domain_aerosol",ni_glo=nbp_lon_src, ni=0, ibegin=0, lonvalue_1d=null_array)235 ENDIF236 CALL xios_set_axis_attr("axis_aerosol",n_glo=klev_src)237 CALL xios_set_fieldgroup_attr("aerosols", enabled=.TRUE.)238 239 ENDIF240 238 241 ENDIF242 #endif243 239 ENDIF 240 ENDIF !using_xios 241 END SUBROUTINE init_aero_fromfile 244 242 245 243 … … 271 269 USE iophy, ONLY : io_lon, io_lat 272 270 USE print_control_mod, ONLY: lunout 273 #ifdef CPP_XIOS 274 USE xios 275 #endif 271 USE lmdz_xios 276 272 IMPLICIT NONE 277 273 … … 685 681 686 682 IF (grid_type==unstructured) THEN 687 #ifdef CPP_XIOS688 683 IF (is_omp_master) THEN 689 684 CALL xios_send_field(TRIM(varname)//"_in",varyear) … … 702 697 CALL scatter_omp(psurf_interp,psurf_out) 703 698 first=.FALSE. 704 #endif705 699 ELSE 706 700 ! Scatter global field to local domain at local process -
LMDZ6/trunk/libf/phylmd/readaerosolstrato.F90
r4489 r4619 16 16 USE dimphy 17 17 USE print_control_mod, ONLY: prt_level,lunout 18 #ifdef CPP_XIOS 19 USE xios 20 #endif 18 USE lmdz_xios 21 19 implicit none 22 20 … … 148 146 149 147 IF (grid_type==unstructured) THEN 150 #ifdef CPP_XIOS151 148 IF (is_omp_master) THEN 152 149 CALL xios_send_field("taustrat_in",tauaerstrat_mois) … … 157 154 ENDIF 158 155 CALL scatter_omp(tau_aer_strat_mpi,tau_aer_strat) 159 #endif160 156 ELSE 161 157 !--scatter on all proc -
LMDZ6/trunk/libf/phylmd/readaerosolstrato_m.F90
r4489 r4619 23 23 24 24 25 SUBROUTINE init_readaerosolstrato1 26 #ifdef CPP_XIOS 25 SUBROUTINE init_readaerosolstrato1 27 26 USE netcdf 28 27 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 29 28 nf95_inq_varid, nf95_open 30 29 USE mod_phys_lmdz_para 31 USE xios30 USE lmdz_xios 32 31 ! USE YOERAD, ONLY : NLW 33 32 IMPLICIT NONE … … 38 37 INTEGER :: ncid_in, varid 39 38 39 IF (using_xios) THEN 40 40 IF (is_omp_master) THEN 41 41 IF (is_mpi_root) THEN … … 63 63 ENDIF 64 64 65 #endif 66 65 ENDIF 66 END SUBROUTINE init_readaerosolstrato1 67 67 68 SUBROUTINE init_readaerosolstrato2 69 #ifdef CPP_XIOS 68 SUBROUTINE init_readaerosolstrato2 70 69 USE netcdf 71 70 USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, & 72 71 nf95_inq_varid, nf95_open 73 72 USE mod_phys_lmdz_para 74 USE xios73 USE lmdz_xios 75 74 ! USE YOERAD, ONLY : NLW 76 75 IMPLICIT NONE … … 80 79 REAL :: null_array(0) 81 80 INTEGER :: ncid_in, varid 82 81 82 IF (using_xios) THEN 83 83 IF (is_omp_master) THEN 84 84 IF (is_mpi_root) THEN … … 131 131 132 132 ENDIF 133 #endif134 133 ENDIF 134 END SUBROUTINE init_readaerosolstrato2 135 135 136 136 -
LMDZ6/trunk/libf/phylmd/regr_horiz_time_climoz_m.F90
r4489 r4619 66 66 USE regular_lonlat_mod, ONLY: boundslon_reg, boundslat_reg, south, west, east 67 67 USE slopes_m, ONLY: slopes 68 #ifdef CPP_XIOS 69 USE xios 70 #endif 68 USE lmdz_xios 71 69 USE mod_phys_lmdz_para, ONLY: is_mpi_root, is_master, is_omp_master, gather, gather_mpi, bcast_mpi, klon_mpi 72 70 USE geometry_mod, ONLY : latitude_deg, ind_cell_glo … … 240 238 CALL bcast_mpi(ntim_ou) 241 239 242 #ifdef CPP_XIOS243 240 IF (is_mpi_root) THEN 244 241 CALL xios_set_domain_attr("domain_climoz",nj_glo=nlat_in, nj=nlat_in, jbegin=0, latvalue_1d=lat_in/deg2rad) … … 262 259 CALL xios_set_field_attr("tro3_out", enabled=.TRUE.) 263 260 CALL xios_set_field_attr("tro3_out", enabled=.TRUE.) 264 #endif265 261 266 262 IF (first) THEN … … 415 411 !============================================================================= 416 412 IF (grid_type==unstructured) THEN 417 #ifdef CPP_XIOS418 413 nlat_ou=klon_mpi 419 414 … … 428 423 CALL xios_send_field("tro3_in",o3_in3bis(:,:,:,:,:)) 429 424 CALL xios_recv_field("tro3_out",o3_regr_lonlat(1,:,:,:,:)) 430 #endif431 425 ELSE 432 426 … … 462 456 nlat_ou=nbp_lat 463 457 IF (grid_type==unstructured) THEN 464 #ifdef CPP_XIOS465 458 CALL xios_send_field('o3_out',o3_out3) 466 459 ndims=3 467 460 ALLOCATE(o3_out3_glo(nlat_ou, nlev_in, ntim_ou, read_climoz)) 468 461 CALL gather_mpi(o3_out3(1,:,:,:,:), o3_out3_glo) 469 #endif470 462 ENDIF 471 463 … … 508 500 509 501 IF (grid_type==unstructured) THEN 510 #ifdef CPP_XIOS511 502 nlat_ou=klon_mpi 512 503 … … 522 513 IF(.NOT.lprev) o3_regr_lat(:,:, 0, :) = o3_regr_lat(:,:,12,:) 523 514 IF(.NOT.lnext) o3_regr_lat(:,:,13, :) = o3_regr_lat(:,:, 1,:) 524 #endif525 515 526 516 ELSE -
LMDZ6/trunk/libf/phylmd/rrtm/readaerosolstrato1_rrtm.F90
r4489 r4619 18 18 USE YOERAD, ONLY : NLW 19 19 USE YOMCST 20 #ifdef CPP_XIOS 21 USE xios 22 #endif 20 USE lmdz_xios 23 21 24 22 IMPLICIT NONE … … 167 165 168 166 IF (grid_type==unstructured) THEN 169 #ifdef CPP_XIOS170 167 IF (is_omp_master) THEN 171 168 ALLOCATE(tauaerstrat_mpi(klon_mpi,klev)) … … 176 173 ENDIF 177 174 CALL scatter_omp(tauaerstrat_mpi,tau_aer_strat) 178 #endif179 175 ELSE 180 176 CALL scatter(tauaerstrat_mois_glo,tau_aer_strat) -
LMDZ6/trunk/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90
r4489 r4619 19 19 USE YOERAD, ONLY : NLW 20 20 USE YOMCST 21 #ifdef CPP_XIOS 22 USE xios 23 #endif 21 USE lmdz_xios 24 22 25 23 IMPLICIT NONE … … 282 280 283 281 IF (grid_type==unstructured) THEN 284 285 #ifdef CPP_XIOS286 282 287 283 IF (is_omp_master) THEN … … 310 306 CALL scatter_omp(cgaerstrat_mpi,cg_aer_strat) 311 307 CALL scatter_omp(taulwaerstrat_mpi,taulw_aer_strat) 312 #endif313 308 ELSE 314 309 -
LMDZ6/trunk/libf/phylmd/undefSTD.F90
r4593 r4619 8 8 USE phys_state_var_mod 9 9 #endif 10 #ifdef CPP_XIOS 11 USE wxios, ONLY: missing_val 12 #endif 10 USE wxios, ONLY: missing_val_xios => missing_val, using_xios 13 11 14 12 IMPLICIT NONE 15 13 include "clesphys.h" 16 #ifndef CPP_XIOS17 14 REAL :: missing_val 18 #endif19 15 20 16 ! ==================================================================== … … 59 55 60 56 ! missing_val = nf90_fill_real 61 #ifndef CPP_XIOS 57 IF (using_xios) THEN 58 missing_val=missing_val_xios 59 ELSE 62 60 missing_val=missing_val_nf90 63 #endif 61 ENDIF 64 62 65 63 DO n = 1, nout
Note: See TracChangeset
for help on using the changeset viewer.