Changeset 4619 for LMDZ6/trunk/libf/phylmd/cospv2
- Timestamp:
- Jul 10, 2023, 1:40:39 AM (19 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd/cospv2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.