Changeset 2002 for LMDZ5/trunk/libf
- Timestamp:
- Apr 4, 2014, 2:39:54 PM (11 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/bibio/wxios.F90
r2001 r2002 292 292 ! Pour déclarer un axe vertical !!!!!!!!!!!!!!! 293 293 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 294 SUBROUTINE wxios_add_vaxis(axis group_id, axis_file, axis_size, axis_value)295 IMPLICIT NONE 296 INCLUDE 'iniprint.h' 297 298 CHARACTER (len=*), INTENT(IN) :: axis group_id, axis_file294 SUBROUTINE wxios_add_vaxis(axis_id, axis_size, axis_value) 295 IMPLICIT NONE 296 INCLUDE 'iniprint.h' 297 298 CHARACTER (len=*), INTENT(IN) :: axis_id 299 299 INTEGER, INTENT(IN) :: axis_size 300 300 REAL, DIMENSION(axis_size), INTENT(IN) :: axis_value 301 301 302 TYPE(xios_axisgroup) :: axgroup303 TYPE(xios_axis) :: ax304 CHARACTER(len=50) :: axis_id305 306 IF (len_trim(axisgroup_id).gt.len(axis_id)) THEN307 WRITE(lunout,*) "wxios_add_vaxis: error, size of axis_id too small!!"308 WRITE(lunout,*) " increase it to at least ",len_trim(axisgroup_id)309 CALL abort_gcm("wxios_add_vaxis","len(axis_id) too small",1)310 ENDIF311 axis_id=trim(axisgroup_id)302 ! TYPE(xios_axisgroup) :: axgroup 303 ! TYPE(xios_axis) :: ax 304 ! CHARACTER(len=50) :: axis_id 305 306 ! IF (len_trim(axisgroup_id).gt.len(axis_id)) THEN 307 ! WRITE(lunout,*) "wxios_add_vaxis: error, size of axis_id too small!!" 308 ! WRITE(lunout,*) " increase it to at least ",len_trim(axisgroup_id) 309 ! CALL abort_gcm("wxios_add_vaxis","len(axis_id) too small",1) 310 ! ENDIF 311 ! axis_id=trim(axisgroup_id) 312 312 313 313 !On récupère le groupe d'axes qui va bien: 314 CALL xios_get_axisgroup_handle(axisgroup_id, axgroup)314 !CALL xios_get_axisgroup_handle(axisgroup_id, axgroup) 315 315 316 316 !On ajoute l'axe correspondant à ce fichier: 317 CALL xios_add_axis(axgroup, ax, TRIM(ADJUSTL(axis_id)))317 !CALL xios_add_axis(axgroup, ax, TRIM(ADJUSTL(axis_id))) 318 318 319 319 !Et on le parametrise: 320 CALL xios_set_axis_attr_hdl(ax, size=axis_size, value=axis_value) 320 !CALL xios_set_axis_attr_hdl(ax, size=axis_size, value=axis_value) 321 322 ! Ehouarn: New way to declare axis, without axis_group: 323 CALL xios_set_axis_attr(trim(axis_id),size=axis_size,value=axis_value) 321 324 322 325 !Vérification: … … 515 518 !Sinon on se contente de l'activer: 516 519 CALL xios_set_field_attr(fieldname, enabled=.TRUE.) 520 !NB: This will override an enable=.false. set by a user in the xml file; 521 ! then the only way to not output the field is by changing its 522 ! output level 517 523 ENDIF 518 524 519 525 END SUBROUTINE wxios_add_field_to_file 520 526 521 SUBROUTINE wxios_update_calendar(ito)522 INTEGER, INTENT(IN) :: ito523 CALL xios_update_calendar(ito)524 END SUBROUTINE wxios_update_calendar525 526 SUBROUTINE wxios_write_2D(fieldname, fdata)527 CHARACTER(len=*), INTENT(IN) :: fieldname528 REAL, DIMENSION(:,:), INTENT(IN) :: fdata529 530 CALL xios_send_field(fieldname, fdata)531 END SUBROUTINE wxios_write_2D532 533 SUBROUTINE wxios_write_3D(fieldname, fdata)534 CHARACTER(len=*), INTENT(IN) :: fieldname535 REAL, DIMENSION(:,:,:), INTENT(IN) :: fdata536 537 CALL xios_send_field(fieldname, fdata)538 END SUBROUTINE wxios_write_3D527 ! SUBROUTINE wxios_update_calendar(ito) 528 ! INTEGER, INTENT(IN) :: ito 529 ! CALL xios_update_calendar(ito) 530 ! END SUBROUTINE wxios_update_calendar 531 ! 532 ! SUBROUTINE wxios_write_2D(fieldname, fdata) 533 ! CHARACTER(len=*), INTENT(IN) :: fieldname 534 ! REAL, DIMENSION(:,:), INTENT(IN) :: fdata 535 ! 536 ! CALL xios_send_field(fieldname, fdata) 537 ! END SUBROUTINE wxios_write_2D 538 539 ! SUBROUTINE wxios_write_3D(fieldname, fdata) 540 ! CHARACTER(len=*), INTENT(IN) :: fieldname 541 ! REAL, DIMENSION(:,:,:), INTENT(IN) :: fdata 542 ! 543 ! CALL xios_send_field(fieldname, fdata) 544 ! END SUBROUTINE wxios_write_3D 539 545 540 546 SUBROUTINE wxios_closedef() -
LMDZ5/trunk/libf/phydev/iophy.F90
r1907 r2002 340 340 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, & 341 341 jj_nb, klon_mpi 342 USE wxios, only: wxios_write_2D342 USE xios, only: xios_send_field 343 343 344 344 … … 361 361 CALL grid1Dto2D_mpi(buffer_omp,Field2d) 362 362 363 CALL wxios_write_2D(field_name, Field2d)363 CALL xios_send_field(field_name, Field2d) 364 364 !$OMP END MASTER 365 365 … … 376 376 USE mod_phys_lmdz_para, only: gather_omp, grid1Dto2D_mpi, & 377 377 jj_nb, klon_mpi 378 USE wxios, only: wxios_write_3D378 USE xios, only: xios_send_field 379 379 380 380 … … 401 401 CALL grid1Dto2D_mpi(buffer_omp,field3d) 402 402 403 CALL wxios_write_3D(field_name, Field3d(:,:,1:klev))403 CALL xios_send_field(field_name, Field3d(:,:,1:nlev)) 404 404 !$OMP END MASTER 405 405 -
LMDZ5/trunk/libf/phydev/physiq.F90
r1907 r2002 21 21 22 22 #ifdef CPP_XIOS 23 USE xios, ONLY: xios_update_calendar 23 24 USE wxios, only: wxios_add_vaxis, wxios_set_timestep, wxios_closedef, & 24 wxios_update_calendar,histwrite_phy25 histwrite_phy 25 26 #endif 26 27 … … 137 138 #ifdef CPP_XIOS 138 139 !XIOS 139 ! Déclaration de l'axe vertical du fichier: 140 CALL wxios_add_vaxis("presnivs", "histins", klev, presnivs) 141 142 !Déclaration du pas de temps: 140 ! Declare available vertical axes to be used in output files: 141 !CALL wxios_add_vaxis("presnivs", "dummy-not-used", klev, presnivs) 142 CALL wxios_add_vaxis("presnivs", klev, presnivs) 143 144 ! Declare time step length (in s): 143 145 CALL wxios_set_timestep(dtime) 144 146 145 !Finali sation du contexte:147 !Finalize the context: 146 148 CALL wxios_closedef() 147 149 #endif … … 187 189 !$OMP MASTER 188 190 !Increment XIOS time 189 CALL wxios_update_calendar(itau)191 CALL xios_update_calendar(itau) 190 192 !$OMP END MASTER 191 193 !$OMP BARRIER 192 194 193 !Send fields to XIOS: 195 !Send fields to XIOS: (NB these fields must also be defined as 196 ! <field id="..." /> in iodef.xml to be correctly used 194 197 CALL histwrite_phy("temperature",t) 198 CALL histwrite_phy("temp_newton",temp_newton) 195 199 CALL histwrite_phy("u",u) 196 200 CALL histwrite_phy("v",v) -
LMDZ5/trunk/libf/phylmd/iophy.F90
r2001 r2002 883 883 nid_files 884 884 #ifdef CPP_XIOS 885 USE wxios, only: wxios_write_2D885 USE xios, only: xios_send_field 886 886 #endif 887 887 … … 952 952 write(lunout,*)'Dans iophy histwrite2D,iff,var%name ',& 953 953 iff,trim(var%name) 954 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call wxios_write_2D"954 write(lunout,*)"histwrite2d_phy:.NOT.clef_stations(iff)and iff==iff_beg, call xios_send_field" 955 955 endif 956 CALL wxios_write_2D(var%name, Field2d)956 CALL xios_send_field(var%name, Field2d) 957 957 firstx=.false. 958 958 ENDIF … … 968 968 ! IF (iff == iff_beg) THEN 969 969 ! if (prt_level >= 10) then 970 ! write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, call wxios_write_2D"970 ! write(lunout,*)"histwrite2d_phy: .NOT.clef_stations(iff) and iff==iff_beg, call xios_send_field" 971 971 ! endif 972 ! CALL wxios_write_2D(var%name, Field2d)972 ! CALL xios_send_field(var%name, Field2d) 973 973 ! ENDIF 974 974 !#endif … … 1019 1019 nid_files 1020 1020 #ifdef CPP_XIOS 1021 USE wxios, only: wxios_write_3D1021 USE xios, only: xios_send_field 1022 1022 #endif 1023 1023 … … 1085 1085 write(lunout,*)'Dans iophy, histwrite3D iff nlev klev firstx', & 1086 1086 iff,nlev,klev, firstx 1087 write(lunout,*)'histwrite3d_phy: call wxios_write_3Dfor ', &1087 write(lunout,*)'histwrite3d_phy: call xios_send_field for ', & 1088 1088 trim(var%name), ' with iim jjm nlevx = ', & 1089 1089 iim,jj_nb,nlevx 1090 1090 endif 1091 CALL wxios_write_3D(var%name, Field3d(:,:,1:nlevx))1091 CALL xios_send_field(var%name, Field3d(:,:,1:nlevx)) 1092 1092 firstx=.false. 1093 1093 ENDIF … … 1103 1103 !#ifdef CPP_XIOS 1104 1104 ! IF (iff == 1) THEN 1105 ! CALL wxios_write_3D(var%name, Field3d(:,:,1:klev))1105 ! CALL xios_send_field(var%name, Field3d(:,:,1:klev)) 1106 1106 ! ENDIF 1107 1107 !#endif … … 1149 1149 is_sequential, klon_mpi_begin, klon_mpi_end, & 1150 1150 jj_nb, klon_mpi 1151 USE wxios, only: wxios_write_2D1151 USE xios, only: xios_send_field 1152 1152 1153 1153 … … 1184 1184 1185 1185 1186 CALL wxios_write_2D(field_name, Field2d)1186 CALL xios_send_field(field_name, Field2d) 1187 1187 1188 1188 ELSE … … 1220 1220 is_sequential, klon_mpi_begin, klon_mpi_end, & 1221 1221 jj_nb, klon_mpi 1222 USE wxios, only: wxios_write_3D1222 USE xios, only: xios_send_field 1223 1223 1224 1224 … … 1254 1254 ALLOCATE(index3d(iim*jj_nb*nlev)) 1255 1255 ALLOCATE(fieldok(iim*jj_nb,nlev)) 1256 CALL wxios_write_3D(field_name, Field3d(:,:,1:nlev))1256 CALL xios_send_field(field_name, Field3d(:,:,1:nlev)) 1257 1257 1258 1258 ELSE -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r2001 r2002 316 316 endif 317 317 if (iff.le.6) then 318 CALL wxios_add_vaxis("presnivs", phys_out_filenames(iff),&318 CALL wxios_add_vaxis("presnivs", & 319 319 levmax(iff) - levmin(iff) + 1, presnivs(levmin(iff):levmax(iff))) 320 CALL wxios_add_vaxis("Ahyb", phys_out_filenames(iff),&320 CALL wxios_add_vaxis("Ahyb", & 321 321 levmax(iff) - levmin(iff) + 1, Ahyb) 322 CALL wxios_add_vaxis("Bhyb", phys_out_filenames(iff),&322 CALL wxios_add_vaxis("Bhyb", & 323 323 levmax(iff) - levmin(iff) + 1, Bhyb) 324 CALL wxios_add_vaxis("Alt", phys_out_filenames(iff),&324 CALL wxios_add_vaxis("Alt", & 325 325 levmax(iff) - levmin(iff) + 1, Alt) 326 326 else 327 327 ! NMC files 328 CALL wxios_add_vaxis("plev", phys_out_filenames(iff),&328 CALL wxios_add_vaxis("plev", & 329 329 levmax(iff) - levmin(iff) + 1, rlevSTD(levmin(iff):levmax(iff))) 330 330 endif -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r1971 r2002 230 230 #ifdef CPP_XIOS 231 231 ! ug Pour les sorties XIOS 232 USE wxios, only: wxios_update_calendar, wxios_closedef 232 USE xios, ONLY: xios_update_calendar 233 USE wxios, only: wxios_closedef 233 234 #endif 234 235 USE phys_cal_mod, only : mth_len … … 292 293 IF (vars_defined) THEN 293 294 if (prt_level >= 10) then 294 write(lunout,*)"phys_output_write: call wxios_update_calendar, itau_w=",itau_w295 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 295 296 endif 296 CALL wxios_update_calendar(itau_w)297 CALL xios_update_calendar(itau_w) 297 298 END IF 298 299 !$OMP END MASTER
Note: See TracChangeset
for help on using the changeset viewer.