Changeset 2114 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Sep 5, 2014, 5:42:24 PM (10 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/clesphys.h
r2110 r2114 12 12 LOGICAL cycle_diurne,soil_model,new_oliq,ok_orodr,ok_orolf 13 13 LOGICAL ok_limitvrai 14 LOGICAL ok_all_xml 14 15 INTEGER nbapp_rad, iflag_con,iflag_ener_conserv 15 16 REAL co2_ppm, co2_ppm0, solaire … … 115 116 & , iflag_rrtm, ok_strato,ok_hines & 116 117 & , iflag_ice_thermo, ok_gwd_rando, NSW & 117 & , ok_conserv_q 118 & , ok_conserv_q, ok_all_xml 118 119 119 120 save /clesphys/ -
LMDZ5/trunk/libf/phylmd/conf_phys_m.F90
r2110 r2114 86 86 logical,SAVE :: ok_snow_omp 87 87 logical,SAVE :: ok_newmicro_omp 88 logical,SAVE :: ok_all_xml_omp 88 89 logical,SAVE :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp 89 90 logical,SAVE :: ok_LES_omp … … 243 244 CALL abort_gcm('conf_phys','t_coupl = 0.',1) 244 245 END IF 246 247 ! 248 !Config Key = ok_all_xml 249 !Config Desc = utiliser les xml pourles définitions des champs pour xios 250 !Config Def = .false. 251 !Config Help = 252 ! 253 ok_all_xml_omp = .false. 254 call getin('ok_all_xml', ok_all_xml_omp) 255 ! 245 256 246 257 ! … … 1849 1860 ! Martin 1850 1861 1862 ok_all_xml = ok_all_xml_omp 1851 1863 ok_newmicro = ok_newmicro_omp 1852 1864 ok_journe = ok_journe_omp … … 1978 1990 write(lunout,*)' Config veget = ', ok_veget,type_veget 1979 1991 write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow 1992 write(lunout,*)' Config xml pour XIOS : ok_all_xml = ', ok_all_xml 1980 1993 write(lunout,*)' Sortie journaliere = ', ok_journe 1981 1994 write(lunout,*)' Sortie haute frequence = ', ok_hf -
LMDZ5/trunk/libf/phylmd/iophy.F90
r2097 r2114 204 204 IMPLICIT NONE 205 205 include 'dimensions.h' 206 include 'clesphys.h' 206 207 207 208 character*(*), INTENT(IN) :: name … … 227 228 IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN 228 229 ! ug Création du fichier 230 IF (.not. ok_all_xml) THEN 229 231 CALL wxios_add_file(name, ffreq, lev) 232 ENDIF 230 233 END IF 231 234 #endif … … 603 606 604 607 #ifdef CPP_XIOS 605 IF ( var%flag(iff)<=lev_files(iff) ) THEN 606 CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), & 607 var%description, var%unit, var%flag(iff), typeecrit) 608 IF (prt_level >= 10) THEN 609 WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', & 610 trim(var%name),iff 608 IF (.not. ok_all_xml) THEN 609 IF ( var%flag(iff)<=lev_files(iff) ) THEN 610 CALL wxios_add_field_to_file(var%name, 2, iff, phys_out_filenames(iff), & 611 var%description, var%unit, var%flag(iff), typeecrit) 612 IF (prt_level >= 10) THEN 613 WRITE(lunout,*) 'histdef2d: call wxios_add_field_to_file var%name iff: ', & 614 trim(var%name),iff 615 ENDIF 611 616 ENDIF 612 617 ENDIF … … 688 693 689 694 #ifdef CPP_XIOS 690 IF ( var%flag(iff)<=lev_files(iff) ) THEN 691 CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), & 692 var%description, var%unit, var%flag(iff), typeecrit) 693 IF (prt_level >= 10) THEN 694 WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', & 695 trim(var%name),iff 696 ENDIF 697 ENDIF 695 IF (.not. ok_all_xml) THEN 696 IF ( var%flag(iff)<=lev_files(iff) ) THEN 697 CALL wxios_add_field_to_file(var%name, 3, iff, phys_out_filenames(iff), & 698 var%description, var%unit, var%flag(iff), typeecrit) 699 IF (prt_level >= 10) THEN 700 WRITE(lunout,*) 'histdef3d: call wxios_add_field_to_file var%name iff: ', & 701 trim(var%name),iff 702 ENDIF 703 ENDIF 704 ENDIF 698 705 #endif 699 706 #ifndef CPP_IOIPSL_NO_OUTPUT … … 890 897 INCLUDE 'dimensions.h' 891 898 INCLUDE 'iniprint.h' 899 include 'clesphys.h' 892 900 893 901 TYPE(ctrl_out), INTENT(IN) :: var … … 922 930 !$OMP MASTER 923 931 !Si phase de définition.... on définit 932 IF (.not. ok_all_xml) THEN 933 if (prt_level >= 10) then 934 write(lunout,*)"histwrite2d_phy: .not.vars_defined ; time to define ", & 935 trim(var%name) 936 endif 924 937 DO iff=iff_beg, iff_end 925 938 IF (clef_files(iff)) THEN … … 927 940 ENDIF 928 941 ENDDO 942 ENDIF 929 943 !$OMP END MASTER 930 944 ELSE … … 944 958 ! La boucle sur les fichiers: 945 959 firstx=.true. 946 DO iff=iff_beg, iff_end 960 961 IF (ok_all_xml) THEN 962 #ifdef CPP_XIOS 963 if (prt_level >= 10) then 964 write(lunout,*)'Dans iophy histwrite2D,var%name ',& 965 trim(var%name) 966 endif 967 CALL xios_send_field(var%name, Field2d) 968 if (prt_level >= 10) then 969 write(lunout,*)'Dans iophy histwrite2D,var%name apres xios_send ',& 970 trim(var%name) 971 endif 972 #else 973 CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 974 #endif 975 ELSE 976 DO iff=iff_beg, iff_end 947 977 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN 948 978 … … 1001 1031 deallocate(fieldok) 1002 1032 ENDIF !levfiles 1003 ENDDO ! of DO iff=iff_beg, iff_end 1033 ENDDO ! of DO iff=iff_beg, iff_end 1034 ENDIF 1004 1035 !$OMP END MASTER 1005 1036 ENDIF ! vars_defined … … 1026 1057 INCLUDE 'dimensions.h' 1027 1058 INCLUDE 'iniprint.h' 1059 include 'clesphys.h' 1028 1060 1029 1061 TYPE(ctrl_out), INTENT(IN) :: var … … 1078 1110 ! BOUCLE SUR LES FICHIERS 1079 1111 firstx=.true. 1112 1113 IF (ok_all_xml) THEN 1114 #ifdef CPP_XIOS 1115 if (prt_level >= 10) then 1116 write(lunout,*)'Dans iophy histwrite3D,var%name ',& 1117 trim(var%name) 1118 endif 1119 CALL xios_send_field(var%name, Field3d) 1120 #else 1121 CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1) 1122 #endif 1123 ELSE 1124 1125 1080 1126 DO iff=iff_beg, iff_end 1081 1127 IF (var%flag(iff) <= lev_files(iff) .AND. clef_files(iff)) THEN … … 1136 1182 ENDIF 1137 1183 ENDDO 1184 ENDIF 1138 1185 !$OMP END MASTER 1139 1186 ENDIF ! vars_defined -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r2110 r2114 236 236 type_ecri_files(:)=type_ecri(:) 237 237 238 ! if (ok_all_xml) phys_out_filelevels = 999 239 238 240 WRITE(lunout,*)'phys_out_lonmin=',phys_out_lonmin 239 241 WRITE(lunout,*)'phys_out_lonmax=',phys_out_lonmax … … 305 307 zoutm(iff) = ecrit_files(iff) ! Frequence ou l on ecrit en seconde 306 308 307 IF (clef_files(iff)) THEN308 309 309 310 #ifdef CPP_XIOS 310 311 !!! Ouverture de chaque fichier XIOS !!!!!!!!!!! 311 if (prt_level >= 10) then 312 print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff)) 313 endif 314 CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 312 IF (.not. ok_all_xml) then 313 if (prt_level >= 10) then 314 print*,'phys_output_open: call wxios_add_file with phys_out_filenames(iff)=',trim(phys_out_filenames(iff)) 315 endif 316 CALL wxios_add_file(phys_out_filenames(iff),chtimestep(iff),lev_files(iff)) 317 ENDIF 315 318 316 319 !!! Declaration des axes verticaux de chaque fichier: … … 334 337 #endif 335 338 339 IF (clef_files(iff)) THEN 336 340 !!!!!!!!!!!!!!!!! Traitement dans le cas ou l'on veut stocker sur un domaine limite !! 337 341 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 404 408 #endif 405 409 410 ENDIF ! clef_files 411 406 412 !CR: ajout d'une variable eau 407 413 ! IF (nqtot>=3) THEN 414 408 415 IF (nqtot>=nqo+1) THEN 409 416 ! DO iq=3,nqtot … … 413 420 tname(iiq),'Tracer '//ttext(iiq), "-", & 414 421 (/ '', '', '', '', '', '', '', '', '' /)) 415 416 o_dtr_vdf(iq-nqo) = ctrl_out((/ 5, 7, 7, 7, 10, 10, 11, 11, 11 /), & 422 o_dtr_vdf(iq-nqo) = ctrl_out((/ 4, 7, 7, 7, 10, 10, 11, 11, 11 /), & 417 423 'd'//trim(tname(iq))//'_vdf', & 418 424 'Tendance tracer '//ttext(iiq), "-" , & … … 491 497 ENDIF 492 498 493 ENDIF ! clef_files494 499 495 500 ENDDO ! iff -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r2103 r2114 240 240 USE phys_cal_mod, only : mth_len 241 241 242 242 243 IMPLICIT NONE 244 243 245 244 246 INCLUDE "temps.h" … … 1293 1295 ENDDO !nfiles 1294 1296 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1295 ! IF (nqtot.GE.3) THEN 1296 ! DO iq=3,nqtot 1297 IF (nqtot.GE.nqo+1) THEN 1297 IF (nqtot.GE.nqo+1) THEN 1298 1298 DO iq=nqo+1,nqtot 1299 1299 1300 CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq)) 1300 1301 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo))
Note: See TracChangeset
for help on using the changeset viewer.