Changeset 1825 for LMDZ5/trunk/libf
- Timestamp:
- Aug 2, 2013, 4:36:53 PM (11 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3d/abort_gcm.F
r1425 r1825 12 12 USE ioipsl_getincom 13 13 #endif 14 15 #ifdef CPP_XIOS 16 ! ug Pour les sorties XIOS 17 USE wxios 18 #endif 19 14 20 #include "iniprint.h" 15 21 … … 27 33 28 34 write(lunout,*) 'in abort_gcm' 35 36 #ifdef CPP_XIOS 37 !Fermeture propre de XIOS 38 CALL wxios_close() 39 #endif 40 29 41 #ifdef CPP_IOIPSL 30 42 call histclo -
LMDZ5/trunk/libf/dyn3d/gcm.F
r1785 r1825 11 11 ! if not using IOIPSL, we still need to use (a local version of) getin 12 12 USE ioipsl_getincom 13 #endif 14 15 16 #ifdef CPP_XIOS 17 ! ug Pour les sorties XIOS 18 USE wxios 13 19 #endif 14 20 … … 179 185 ! CALL defrun( 99, .TRUE. , clesphy0 ) 180 186 !#endif 187 188 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 189 ! Initialisation de XIOS 190 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 191 192 #ifdef CPP_XIOS 193 CALL wxios_init("LMDZ") 194 #endif 195 181 196 182 197 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
LMDZ5/trunk/libf/dyn3dpar/gcm.F
r1823 r1825 8 8 #ifdef CPP_IOIPSL 9 9 USE IOIPSL 10 #endif 11 12 13 #ifdef CPP_XIOS 14 ! ug Pour les sorties XIOS 15 USE wxios 10 16 #endif 11 17 … … 212 218 call InitComgeomphy 213 219 c$OMP END PARALLEL 220 #endif 221 222 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 223 ! Initialisation de XIOS 224 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 225 226 #ifdef CPP_XIOS 227 CALL wxios_init("LMDZ") 214 228 #endif 215 229 -
LMDZ5/trunk/libf/dyn3dpar/leapfrog_p.F
r1823 r1825 22 22 USE control_mod 23 23 24 #ifdef CPP_XIOS 25 ! ug Pour les sorties XIOS 26 USE wxios 27 #endif 24 28 IMPLICIT NONE 25 29 … … 1369 1373 1370 1374 c$OMP MASTER 1375 1376 #ifdef CPP_XIOS 1377 !Fermeture propre de XIOS 1378 CALL wxios_close() 1379 #endif 1371 1380 call fin_getparam 1372 1381 call finalize_parallel -
LMDZ5/trunk/libf/phylmd/iophy.F90
r1821 r1825 5 5 6 6 USE phys_output_var_mod 7 8 #ifdef CPP_XIOS 9 USE wxios 10 #endif 7 11 8 12 ! abd REAL,private,allocatable,DIMENSION(:),save :: io_lat … … 22 26 23 27 INTERFACE histbeg_phy_all 24 MODULE PROCEDURE histbeg_phy,histbeg_phy _points28 MODULE PROCEDURE histbeg_phy,histbeg_phyxios,histbeg_phy_points 25 29 END INTERFACE 26 30 … … 40 44 USE mod_grid_phy_lmdz 41 45 USE ioipsl 46 42 47 IMPLICIT NONE 43 48 INCLUDE 'dimensions.h' … … 89 94 CALL flio_dom_set(mpi_size,mpi_rank,ddid,dsg,dsl,dpf,dpl,dhs,dhe, & 90 95 'APPLE',phys_domain_id) 91 96 #ifdef CPP_XIOS 97 !On initialise le domaine xios, maintenant que tout est connu: 98 CALL wxios_domain_param("dom_glo", is_sequential, iim, jjm+1, io_lat, io_lon) 99 #endif 92 100 !$OMP END MASTER 93 101 … … 135 143 136 144 end SUBROUTINE init_iophy 145 146 SUBROUTINE histbeg_phyxios(name,itau0,zjulian,dtime,ffreq,lev,nhori,nid_day) 147 USE dimphy 148 USE mod_phys_lmdz_para 149 use ioipsl 150 use write_field 151 IMPLICIT NONE 152 include 'dimensions.h' 153 154 character*(*), INTENT(IN) :: name 155 integer, INTENT(IN) :: itau0 156 REAL,INTENT(IN) :: zjulian 157 REAL,INTENT(IN) :: dtime 158 character(LEN=*), INTENT(IN) :: ffreq 159 INTEGER,INTENT(IN) :: lev 160 integer,intent(out) :: nhori 161 integer,intent(out) :: nid_day 162 163 !$OMP MASTER 164 if (is_sequential) then 165 call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 166 1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day) 167 else 168 call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), & 169 1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 170 endif 171 172 #ifdef CPP_XIOS 173 ! ug OMP en chantier... 174 IF((.NOT. is_using_mpi) .OR. is_mpi_root) THEN 175 ! ug Création du fichier 176 CALL wxios_add_file(name, ffreq, lev) 177 END IF 178 #endif 179 !$OMP END MASTER 180 181 END SUBROUTINE histbeg_phyxios 137 182 138 183 SUBROUTINE histbeg_phy(name,itau0,zjulian,dtime,nhori,nid_day) … … 159 204 1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id) 160 205 endif 206 161 207 !$OMP END MASTER 162 208 163 209 END SUBROUTINE histbeg_phy 210 164 211 165 212 SUBROUTINE histbeg_phy_points(rlon,rlat,pim,tabij,ipt,jpt, & … … 487 534 488 535 IF(.NOT.clef_stations(iff)) THEN 536 #ifdef CPP_XIOS 537 CALL wxios_add_field_to_file(var%name, 2, nid_files(iff), phys_out_filenames(iff), & 538 var%description, var%unit, var%flag(iff), typeecrit) 539 #endif 540 489 541 IF ( var%flag(iff)<=lev_files(iff) ) THEN 490 542 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & … … 550 602 551 603 IF(.NOT.clef_stations(iff)) THEN 604 #ifdef CPP_XIOS 605 CALL wxios_add_field_to_file(var%name, 3, nid_files(iff), phys_out_filenames(iff), & 606 var%description, var%unit, var%flag(iff), typeecrit) 607 #endif 608 552 609 IF ( var%flag(iff)<=lev_files(iff) ) THEN 553 610 CALL histdef (nid_files(iff), var%name, var%description, var%unit, & … … 734 791 735 792 #ifdef CPP_XIOS 736 ! USE WXIOS 793 USE wxios 737 794 #endif 795 738 796 739 797 IMPLICIT NONE … … 794 852 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,iim*jj_nb,index2d) 795 853 #ifdef CPP_XIOS 796 ! IF (iff .EQ. 1) THEN797 !CALL wxios_write_2D(var%name, Field2d)798 !ENDIF854 IF (iff == iff_beg) THEN 855 CALL wxios_write_2D(var%name, Field2d) 856 ENDIF 799 857 #endif 800 858 ELSE … … 887 945 ALLOCATE(fieldok(iim*jj_nb,nlev)) 888 946 CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d,iim*jj_nb*nlev,index3d) 947 889 948 #ifdef CPP_XIOS 890 ! IF (iff .EQ.1) THEN891 !CALL wxios_write_3D(var%name, Field3d(:,:,1:klev))892 !ENDIF949 IF (iff == 1) THEN 950 CALL wxios_write_3D(var%name, Field3d(:,:,1:klev)) 951 ENDIF 893 952 #endif 894 953 -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r1821 r1825 42 42 USE aero_mod, only : naero_spc,name_aero 43 43 USE phys_output_ctrlout_mod 44 45 #ifdef CPP_XIOS 46 ! ug Pour les sorties XIOS 47 USE wxios 48 #endif 44 49 45 50 IMPLICIT NONE … … 98 103 CHARACTER(LEN=3) :: ctetaSTD(nbteta) 99 104 REAL, DIMENSION(nfiles) :: ecrit_files 100 CHARACTER(LEN=20), DIMENSION(nfiles) :: phys_out_filenames101 105 INTEGER, DIMENSION(iim*jjmp1) :: ndex2d 102 106 INTEGER, DIMENSION(iim*jjmp1*klev) :: ndex3d … … 117 121 REAL, DIMENSION(nfiles), SAVE :: phys_out_latmin = (/ -90., -90., -90., -90., -90., -90. /) 118 122 REAL, DIMENSION(nfiles), SAVE :: phys_out_latmax = (/ 90., 90., 90., 90., 90., 90. /) 123 124 #ifdef CPP_XIOS 125 ! ug Variables utilisées pour récupérer le calendrier pour xios 126 INTEGER :: x_an, x_mois, x_jour 127 REAL :: x_heure 128 #endif 119 129 120 130 WRITE(lunout,*) 'Debut phys_output_mod.F90' … … 209 219 WRITE(lunout,*)'phys_out_filelevels=',lev_files 210 220 221 #ifdef CPP_XIOS 222 ! ug Réglage du calendrier xios 223 !Temps julian => an, mois, jour, heure 224 CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian) 225 CALL ju2ymds(zjulian, x_an, x_mois, x_jour, x_heure) 226 CALL wxios_set_cal(dtime, calend, x_an, x_mois, x_jour, x_heure) 227 #endif 228 211 229 !!!!!!!!!!!!!!!!!!!!!!! Boucle sur les fichiers !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 212 230 ! Appel de histbeg et histvert pour creer le fichier et les niveaux verticaux !! … … 257 275 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 258 276 IF (phys_out_regfkey(iff)) then 259 260 277 imin_ins=1 261 278 imax_ins=iim … … 297 314 itau_phy,zjulian,dtime,nhorim(iff),nid_files(iff)) 298 315 else 299 CALL histbeg_phy(phys_out_filenames(iff),itau_phy,zjulian,dtime,nhorim(iff),nid_files(iff)) 316 CALL histbeg_phy_all(phys_out_filenames(iff),itau_phy,zjulian,& 317 dtime,chtimestep(iff),lev_files(iff),nhorim(iff),nid_files(iff)) 300 318 endif 301 319 … … 329 347 ! 1,preff,nvertp0(iff)) 330 348 349 #ifdef CPP_XIOS 350 ! ug déclaration des axes verticaux de chaque fichier: 351 CALL wxios_add_vaxis("presnivs", nid_files(iff), levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff))) 352 CALL wxios_add_vaxis("Ahyb", nid_files(iff), levmax(iff) - levmin(iff) + 1, Ahyb) 353 CALL wxios_add_vaxis("Bhyb", nid_files(iff), levmax(iff) - levmin(iff) + 1, Bhyb) 354 CALL wxios_add_vaxis("Ahyb", nid_files(iff), levmax(iff) - levmin(iff) + 1, Alt) 355 #endif 331 356 332 357 IF (nqtot>=3) THEN -
LMDZ5/trunk/libf/phylmd/phys_output_var_mod.F90
r1807 r1825 41 41 CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: type_ecri_files, phys_out_filetypes 42 42 !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes) 43 CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: phys_out_filenames 44 !$OMP THREADPRIVATE(phys_out_filenames) 43 45 44 46 ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r1821 r1825 39 39 USE write_field_phy 40 40 USE iophy 41 USE mod_phys_lmdz_para 42 43 #ifdef CPP_XIOS 44 ! ug Pour les sorties XIOS 45 USE wxios 46 USE xios 47 #endif 41 48 42 49 IMPLICIT NONE … … 80 87 ! On le donne à iophy pour que les histwrite y aient accès: 81 88 CALL set_itau_iophy(itau_w) 89 90 ! ug OMP en chantier... 91 !IF(is_using_mpi .AND. .NOT. is_mpi_root) THEN 92 ! vars_defined=.TRUE. 93 !END IF 94 82 95 IF(.NOT.vars_defined) THEN 83 96 iinitend = 2 … … 88 101 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage: 89 102 DO iinit=1, iinitend 103 #ifdef CPP_XIOS 104 IF (vars_defined) THEN 105 CALL wxios_update_calendar(itau_w) 106 END IF 107 #endif 90 108 ! On procède à l'écriture ou à la définition des nombreuses variables: 91 109 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 993 1011 ENDIF ! clef_files 994 1012 ENDDO ! iff 1013 #ifdef CPP_XIOS 1014 !On finalise l'initialisation: 1015 CALL wxios_closedef() 1016 #endif 995 1017 !$OMP END MASTER 996 1018 !$OMP BARRIER
Note: See TracChangeset
for help on using the changeset viewer.