diff --git a/atmos_cubed_sphere b/atmos_cubed_sphere index 49f15ecbb..52bf918c1 160000 --- a/atmos_cubed_sphere +++ b/atmos_cubed_sphere @@ -1 +1 @@ -Subproject commit 49f15ecbbc16405025fae8d672dced19c2073d9e +Subproject commit 52bf918c194b7d906776447c6324bc75558133db diff --git a/io/fv3atm_clm_lake_io.F90 b/io/fv3atm_clm_lake_io.F90 index 80c7bb586..c930e1df9 100644 --- a/io/fv3atm_clm_lake_io.F90 +++ b/io/fv3atm_clm_lake_io.F90 @@ -12,7 +12,7 @@ module fv3atm_clm_lake_io use block_control_mod, only: block_control_type use fms2_io_mod, only: FmsNetcdfDomainFile_t, register_axis, & register_restart_field, write_data, & - register_variable_attribute, register_field + register_variable_attribute, register_field, get_dimension_size use fv3atm_common_io, only: create_2d_field_and_add_to_bundle, & create_3d_field_and_add_to_bundle @@ -370,81 +370,89 @@ subroutine clm_lake_register_fields(clm_lake, Sfc_restart) class(clm_lake_data_type) :: clm_lake type(FmsNetcdfDomainFile_t) :: Sfc_restart + integer :: xaxis_1_chunk, yaxis_1_chunk + integer :: chunksizes2d(3), chunksizes3d(4) + + call get_dimension_size(Sfc_restart, 'xaxis_1', xaxis_1_chunk) + call get_dimension_size(Sfc_restart, 'yaxis_1', yaxis_1_chunk) + chunksizes2d = (/xaxis_1_chunk, yaxis_1_chunk, 1/) + chunksizes3d = (/xaxis_1_chunk, yaxis_1_chunk, 1, 1/) + ! Register 2D fields call register_restart_field(Sfc_restart, 'T_snow', clm_lake%T_snow, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'T_ice', clm_lake%T_ice, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_snl2d', clm_lake%lake_snl2d, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_h2osno2d', clm_lake%lake_h2osno2d, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_tsfc', clm_lake%lake_tsfc, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_savedtke12d', clm_lake%lake_savedtke12d, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_sndpth2d', clm_lake%lake_sndpth2d, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'clm_lakedepth', clm_lake%clm_lakedepth, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'clm_lake_initialized', clm_lake%clm_lake_initialized, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) ! Register 3D fields call register_restart_field(Sfc_restart, 'lake_z3d', clm_lake%lake_z3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart, 'lake_dz3d', clm_lake%lake_dz3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_soil_watsat3d', clm_lake%lake_soil_watsat3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_csol3d', clm_lake%lake_csol3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_soil_tkmg3d', clm_lake%lake_soil_tkmg3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_soil_tkdry3d', clm_lake%lake_soil_tkdry3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_soil_tksatu3d', clm_lake%lake_soil_tksatu3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_snow_z3d', clm_lake%lake_snow_z3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_snow_dz3d', clm_lake%lake_snow_dz3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_snow_zi3d', clm_lake%lake_snow_zi3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil_clm_lake ', 'Time '/), is_optional=.true.) + 'levsnowsoil_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_h2osoi_vol3d', clm_lake%lake_h2osoi_vol3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_h2osoi_liq3d', clm_lake%lake_h2osoi_liq3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_h2osoi_ice3d', clm_lake%lake_h2osoi_ice3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_t_soisno3d', clm_lake%lake_t_soisno3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsnowsoil1_clm_lake', 'Time '/), is_optional=.true.) + 'levsnowsoil1_clm_lake', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_t_lake3d', clm_lake%lake_t_lake3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_icefrac3d', clm_lake%lake_icefrac3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levlake_clm_lake ', 'Time '/), is_optional=.true.) + 'levlake_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_clay3d', clm_lake%lake_clay3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsoil_clm_lake ', 'Time '/), is_optional=.true.) + 'levsoil_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) call register_restart_field(Sfc_restart,'lake_sand3d', clm_lake%lake_sand3d, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & - 'levsoil_clm_lake ', 'Time '/), is_optional=.true.) + 'levsoil_clm_lake ', 'Time '/), chunksizes=chunksizes3d, is_optional=.true.) end subroutine clm_lake_register_fields !>@ This is clm_lake%bundle_fields, and it is only used in the diff --git a/io/fv3atm_restart_io.F90 b/io/fv3atm_restart_io.F90 index 487722601..1edb985a8 100644 --- a/io/fv3atm_restart_io.F90 +++ b/io/fv3atm_restart_io.F90 @@ -14,7 +14,7 @@ module fv3atm_restart_io_mod register_axis, register_restart_field, & register_variable_attribute, register_field, & read_restart, write_restart, write_data, & - get_global_io_domain_indices + get_global_io_domain_indices, get_dimension_size use mpp_domains_mod, only: domain2d use fv3atm_common_io, only: create_2d_field_and_add_to_bundle, & create_3d_field_and_add_to_bundle, copy_from_gfs_data @@ -891,6 +891,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta character(7) :: indir='RESTART' character(72) :: infile logical :: amiopen, allocated_something + integer :: xaxis_1_chunk, yaxis_1_chunk type(phy_data_type) :: phy type(FmsNetcdfDomainFile_t) :: Phy_restart @@ -917,6 +918,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta call get_global_io_domain_indices(Phy_restart, 'xaxis_1', is, ie, indices=buffer) call write_data(Phy_restart, "xaxis_1", buffer) deallocate(buffer) + call get_dimension_size(Phy_restart, 'xaxis_1', xaxis_1_chunk) call register_axis(Phy_restart, 'yaxis_1', 'Y') call register_field(Phy_restart, 'yaxis_1', 'double', (/'yaxis_1'/)) @@ -924,6 +926,7 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta call get_global_io_domain_indices(Phy_restart, 'yaxis_1', is, ie, indices=buffer) call write_data(Phy_restart, "yaxis_1", buffer) deallocate(buffer) + call get_dimension_size(Phy_restart, 'yaxis_1', yaxis_1_chunk) call register_axis(Phy_restart, 'zaxis_1', phy%npz) call register_field(Phy_restart, 'zaxis_1', 'double', (/'zaxis_1'/)) @@ -946,12 +949,12 @@ subroutine phys_restart_write (GFS_Restart, Atm_block, Model, fv_domain, timesta do num = 1,phy%nvar2d var2_p => phy%var2(:,:,num) call register_restart_field(Phy_restart, trim(GFS_Restart%name2d(num)), var2_p, dimensions=(/'xaxis_1','yaxis_1','Time '/),& - &is_optional=.true.) + & chunksizes=(/xaxis_1_chunk,yaxis_1_chunk,1/), is_optional=.true.) enddo do num = 1,phy%nvar3d var3_p => phy%var3(:,:,:,num) call register_restart_field(Phy_restart, trim(GFS_Restart%name3d(num)), var3_p, dimensions=(/'xaxis_1','yaxis_1','zaxis_1','Time '/),& - &is_optional=.true.) + & chunksizes=(/xaxis_1_chunk,yaxis_1_chunk,1,1/), is_optional=.true.) enddo nullify(var2_p) nullify(var3_p) diff --git a/io/fv3atm_rrfs_sd_io.F90 b/io/fv3atm_rrfs_sd_io.F90 index c6dc44e34..16410c8be 100644 --- a/io/fv3atm_rrfs_sd_io.F90 +++ b/io/fv3atm_rrfs_sd_io.F90 @@ -6,7 +6,8 @@ module fv3atm_rrfs_sd_io use block_control_mod, only: block_control_type use fms2_io_mod, only: FmsNetcdfDomainFile_t, write_data, & register_axis, register_restart_field, & - register_variable_attribute, register_field + register_variable_attribute, register_field, & + get_dimension_size use GFS_typedefs, only: GFS_sfcprop_type, GFS_control_type, kind_phys use fv3atm_common_io, only: get_nx_ny_from_atm, create_2d_field_and_add_to_bundle, & create_3d_field_and_add_to_bundle @@ -193,23 +194,31 @@ subroutine rrfs_sd_state_register_fields(data,Sfc_restart) class(rrfs_sd_state_type) :: data type(FmsNetcdfDomainFile_t) :: Sfc_restart + integer :: xaxis_1_chunk, yaxis_1_chunk + integer :: chunksizes2d(3), chunksizes3d(4) + + call get_dimension_size(Sfc_restart, 'xaxis_1', xaxis_1_chunk) + call get_dimension_size(Sfc_restart, 'yaxis_1', yaxis_1_chunk) + chunksizes2d = (/xaxis_1_chunk, yaxis_1_chunk, 1/) + chunksizes3d = (/xaxis_1_chunk, yaxis_1_chunk, 1, 1/) + ! Register 2D fields call register_restart_field(Sfc_restart, 'emdust', data%emdust, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'emseas', data%emseas, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'emanoc', data%emanoc, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'fhist', data%fhist, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) call register_restart_field(Sfc_restart, 'coef_bb_dc', data%coef_bb_dc, & - dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), is_optional=.true.) + dimensions=(/'xaxis_1', 'yaxis_1', 'Time '/), chunksizes=chunksizes2d, is_optional=.true.) ! Register 3D field call register_restart_field(Sfc_restart, 'fire_in', data%fire_in, & dimensions=(/'xaxis_1 ', 'yaxis_1 ', & 'fire_aux_data_levels', 'Time '/), & - is_optional=.true.) + chunksizes=chunksizes3d, is_optional=.true.) end subroutine rrfs_sd_state_register_fields ! -------------------------------------------------------------------- diff --git a/io/fv3atm_sfc_io.F90 b/io/fv3atm_sfc_io.F90 index 6cd007761..90942e211 100644 --- a/io/fv3atm_sfc_io.F90 +++ b/io/fv3atm_sfc_io.F90 @@ -9,7 +9,8 @@ module fv3atm_sfc_io use fms2_io_mod, only: FmsNetcdfDomainFile_t, unlimited, write_data,& register_axis, register_restart_field, & register_variable_attribute, register_field, & - get_global_io_domain_indices, variable_exists + get_global_io_domain_indices, variable_exists, & + get_dimension_size use fv3atm_common_io, only: GFS_Data_transfer, & create_2d_field_and_add_to_bundle, create_3d_field_and_add_to_bundle use GFS_typedefs, only: GFS_sfcprop_type, GFS_control_type, kind_phys @@ -575,8 +576,15 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) character(len=7) :: time2d(3) + integer :: xaxis_1_chunk, yaxis_1_chunk + integer :: chunksizes2d(3) + + call get_dimension_size(Sfc_restart, 'xaxis_1', xaxis_1_chunk) + call get_dimension_size(Sfc_restart, 'yaxis_1', yaxis_1_chunk) + if(.not.reading) then time2d=(/'xaxis_1','yaxis_1','Time '/) + chunksizes2d=(/xaxis_1_chunk, yaxis_1_chunk, 1/) else time2d=(/'Time ','yaxis_1','xaxis_1'/) endif @@ -599,13 +607,13 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=(/'lat','lon'/), is_optional=.true.) else call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d,& - &is_optional=.true.) + & chunksizes=chunksizes2d, is_optional=.true.) end if else if(reading .and. sfc%is_lsoil) then call register_restart_field(Sfc_restart,sfc%name2(num),var2_p, dimensions=(/'lat','lon'/)) else - call register_restart_field(Sfc_restart,sfc%name2(num),var2_p, dimensions=time2d) + call register_restart_field(Sfc_restart,sfc%name2(num),var2_p, dimensions=time2d, chunksizes=chunksizes2d) end if endif enddo @@ -618,7 +626,7 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) if(sfc%is_lsoil) then call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=(/'lat','lon'/), is_optional=.not.mand) else - call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d, chunksizes=chunksizes2d, is_optional=.not.mand) endif enddo endif @@ -629,7 +637,7 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) if(sfc%is_lsoil) then call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=(/'lat','lon'/) ) else - call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d) + call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d, chunksizes=chunksizes2d) end if enddo endif ! mp/ruc @@ -643,7 +651,7 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) if(sfc%is_lsoil) then call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=(/'lat','lon'/), is_optional=.not.mand) else - call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name2(num), var2_p, dimensions=time2d, chunksizes=chunksizes2d, is_optional=.not.mand) end if enddo endif ! noahmp @@ -656,7 +664,7 @@ subroutine Sfc_io_register_2d_fields(sfc,Model,Sfc_restart,reading,warm_start) if(sfc%is_lsoil) then call register_restart_field(Sfc_restart, sfc%name2(num),var2_p,dimensions=(/'lat','lon'/), is_optional=.not.mand) else - call register_restart_field(Sfc_restart, sfc%name2(num),var2_p,dimensions=time2d, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name2(num),var2_p,dimensions=time2d, chunksizes=chunksizes2d, is_optional=.not.mand) endif enddo endif @@ -684,9 +692,17 @@ subroutine Sfc_io_register_3d_fields(sfc,Model,Sfc_restart,reading,warm_start) character(len=7), parameter :: xyz3_time(4) = (/'xaxis_1', 'yaxis_1', 'zaxis_3', 'Time '/) character(len=7), parameter :: xyz4_time(4) = (/'xaxis_1', 'yaxis_1', 'zaxis_4', 'Time '/) + integer :: xaxis_1_chunk, yaxis_1_chunk + integer :: chunksizes3d(4) + + call get_dimension_size(Sfc_restart, 'xaxis_1', xaxis_1_chunk) + call get_dimension_size(Sfc_restart, 'yaxis_1', yaxis_1_chunk) + + chunksizes3d = (/xaxis_1_chunk, yaxis_1_chunk, 1, 1/) + !--- register the 3D fields var3_p => sfc%var3ice(:,:,:) - call register_restart_field(Sfc_restart, sfc%name3(0), var3_p, dimensions=xyz1_time, is_optional=.true.) + call register_restart_field(Sfc_restart, sfc%name3(0), var3_p, dimensions=xyz1_time, chunksizes=chunksizes3d, is_optional=.true.) if(reading) then do num = 1,sfc%nvar3 @@ -706,13 +722,13 @@ subroutine Sfc_io_register_3d_fields(sfc,Model,Sfc_restart,reading,warm_start) elseif(Model%lsm == Model%lsm_ruc) then do num = 1,sfc%nvar3 var3_p => sfc%var3(:,:,:,num) - call register_restart_field(Sfc_restart, sfc%name3(num), var3_p, dimensions=xyz1_time) + call register_restart_field(Sfc_restart, sfc%name3(num), var3_p, dimensions=xyz1_time, chunksizes=chunksizes3d) enddo nullify(var3_p) else ! writing something other than ruc do num = 1,sfc%nvar3 var3_p => sfc%var3(:,:,:,num) - call register_restart_field(Sfc_restart, sfc%name3(num), var3_p, dimensions=xyz2_time) + call register_restart_field(Sfc_restart, sfc%name3(num), var3_p, dimensions=xyz2_time, chunksizes=chunksizes3d) enddo nullify(var3_p) endif @@ -721,14 +737,14 @@ subroutine Sfc_io_register_3d_fields(sfc,Model,Sfc_restart,reading,warm_start) mand = .not.reading do num = sfc%nvar3+1,sfc%nvar3+3 var3_p1 => sfc%var3sn(:,:,:,num) - call register_restart_field(Sfc_restart, sfc%name3(num), var3_p1, dimensions=xyz3_time, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name3(num), var3_p1, dimensions=xyz3_time, chunksizes=chunksizes3d, is_optional=.not.mand) enddo var3_p2 => sfc%var3eq(:,:,:,7) - call register_restart_field(Sfc_restart, sfc%name3(7), var3_p2, dimensions=xyz2_time, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name3(7), var3_p2, dimensions=xyz2_time, chunksizes=chunksizes3d, is_optional=.not.mand) var3_p3 => sfc%var3zn(:,:,:,8) - call register_restart_field(Sfc_restart, sfc%name3(8), var3_p3, dimensions=xyz4_time, is_optional=.not.mand) + call register_restart_field(Sfc_restart, sfc%name3(8), var3_p3, dimensions=xyz4_time, chunksizes=chunksizes3d, is_optional=.not.mand) endif !mp end subroutine Sfc_io_register_3d_fields diff --git a/io/module_write_restart_netcdf.F90 b/io/module_write_restart_netcdf.F90 index 259079bb2..53a1f719c 100644 --- a/io/module_write_restart_netcdf.F90 +++ b/io/module_write_restart_netcdf.F90 @@ -565,7 +565,12 @@ subroutine write_out_ungridded_dim_atts_from_field(field, dimLabel, dimid, rc) ncerr = nf90_def_dim(ncid, trim(dimLabel), valueCount, dimid=dimid); NC_ERR_STOP(ncerr); NC_ERR_STOP(ncerr) endif if( typekind == ESMF_TYPEKIND_R4 ) then - ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_FLOAT, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) + !!! FIXME Use NF90_DOUBLE as axis type, even though axis data are float + !!! This is needed to make phy/sfc restart files identical to FMS + !!! restart files which always defines all axis as double + + ! ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_FLOAT, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) + ncerr = nf90_def_var(ncid, trim(dimLabel), NF90_DOUBLE, dimids=(/dimid/), varid=varid); NC_ERR_STOP(ncerr) ncerr = nf90_put_att(ncid, varid, trim(axis_attr_name), "Z"); NC_ERR_STOP(ncerr) ncerr = nf90_enddef(ncid=ncid); NC_ERR_STOP(ncerr) ncerr = nf90_put_var(ncid, varid, values=valueListr4); NC_ERR_STOP(ncerr)