@@ -1062,6 +1062,7 @@ subroutine med_phases_history_write_comp_aux(gcomp, compid, auxcomp, rc)
1062
1062
logical :: enable_auxfile
1063
1063
character (CL) :: time_units ! units of time variable
1064
1064
integer :: nx,ny ! global grid size
1065
+ integer :: ntile ! number of tiles for tiled domain eg CSG
1065
1066
logical :: write_now ! if true, write time sample to file
1066
1067
real (r8 ) :: time_val ! time coordinate output
1067
1068
real (r8 ) :: time_bnds(2 ) ! time bounds output
@@ -1268,6 +1269,7 @@ subroutine med_phases_history_write_comp_aux(gcomp, compid, auxcomp, rc)
1268
1269
! Set shorthand variables
1269
1270
nx = is_local% wrap% nx(compid)
1270
1271
ny = is_local% wrap% ny(compid)
1272
+ ntile = is_local% wrap% ntile(compid)
1271
1273
1272
1274
! Increment number of time samples on file
1273
1275
auxcomp% files(nf)% nt = auxcomp% files(nf)% nt + 1
@@ -1303,7 +1305,7 @@ subroutine med_phases_history_write_comp_aux(gcomp, compid, auxcomp, rc)
1303
1305
call med_io_write(auxcomp% files(nf)% io_file, is_local% wrap% FBimp(compid,compid), &
1304
1306
whead(1 ), wdata(1 ), nx, ny, nt= auxcomp% files(nf)% nt, &
1305
1307
pre= trim (compname(compid))// ' Imp' , flds= auxcomp% files(nf)% flds, &
1306
- use_float= .true. , rc= rc)
1308
+ use_float= .true. , ntile = ntile, rc= rc)
1307
1309
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1308
1310
1309
1311
! end definition phase
@@ -1318,14 +1320,14 @@ subroutine med_phases_history_write_comp_aux(gcomp, compid, auxcomp, rc)
1318
1320
if (auxcomp% files(nf)% doavg) then
1319
1321
call med_io_write(auxcomp% files(nf)% io_file, auxcomp% files(nf)% FBaccum, whead(2 ), wdata(2 ), nx, ny, &
1320
1322
nt= auxcomp% files(nf)% nt, pre= trim (compname(compid))// ' Imp' , flds= auxcomp% files(nf)% flds, &
1321
- use_float= .true. ,rc= rc)
1323
+ use_float= .true. , ntile = ntile, rc= rc)
1322
1324
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1323
1325
call med_methods_FB_reset(auxcomp% files(nf)% FBaccum, value= czero, rc= rc)
1324
1326
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1325
1327
else
1326
1328
call med_io_write(auxcomp% files(nf)% io_file, is_local% wrap% FBimp(compid,compid), whead(2 ), wdata(2 ), nx, ny, &
1327
1329
nt= auxcomp% files(nf)% nt, pre= trim (compname(compid))// ' Imp' , flds= auxcomp% files(nf)% flds, &
1328
- use_float= .true. ,rc= rc)
1330
+ use_float= .true. , ntile = ntile, rc= rc)
1329
1331
if (ChkErr(rc,__LINE__,u_FILE_u)) return
1330
1332
end if
1331
1333
0 commit comments