diff --git a/cicecore/cicedyn/general/ice_init.F90 b/cicecore/cicedyn/general/ice_init.F90 index 24ac40db3..8f07c02fe 100644 --- a/cicecore/cicedyn/general/ice_init.F90 +++ b/cicecore/cicedyn/general/ice_init.F90 @@ -1764,7 +1764,7 @@ subroutine input_data endif endif - if (history_format/='hdf5' .and. (history_chunksize(1)/=0 .or. history_chunksize(2)/=0)) then + if (history_format/='hdf5' .and. all(history_chunksize/=0)) then if (my_task == master_task) then write (nu_diag,*) subname//' WARNING: history_chunksize not compatible with '//history_format write (nu_diag,*) subname//' WARNING: netcdf chunking only possible with history_type="hdf5" ' @@ -1778,7 +1778,7 @@ subroutine input_data endif endif - if (restart_format/='hdf5' .and. (restart_chunksize(1)/=0 .or. restart_chunksize(2)/=0)) then + if (restart_format/='hdf5' .and. all(restart_chunksize/=0)) then if (my_task == master_task) then write (nu_diag,*) subname//' WARNING: restart_chunksize not compatible with '//restart_format write (nu_diag,*) subname//' WARNING: netcdf chunking only possible with restart_type="hdf5" ' diff --git a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90 b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90 index f83db8a5b..96bdd2722 100644 --- a/cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90 +++ b/cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90 @@ -253,7 +253,7 @@ subroutine ice_write_hist (ns) endif time_coord = coord_attributes('time', 'time', trim(cal_units)) - call ice_hist_coord_def(File, time_coord, pio_double, (/timid/), varid) !why is pio_double this not lprecision ? + call ice_hist_coord_def(File, time_coord, pio_double, (/timid/), varid) call ice_pio_check(pio_put_att(File,varid,'calendar',cal_att), & subname//' ERROR: defining att calendar: '//cal_att,file=__FILE__,line=__LINE__) if (hist_avg(ns) .and. .not. write_ic) then @@ -268,7 +268,7 @@ subroutine ice_write_hist (ns) dimid2(1) = boundid dimid2(2) = timid - call ice_hist_coord_def(File, time_coord, pio_double, dimid2, varid) !why is pio_double this not lprecision ? + call ice_hist_coord_def(File, time_coord, pio_double, dimid2, varid) call ice_pio_check(pio_put_att(File,varid,'calendar',cal_att), & subname//' ERROR: defining att calendar: '//cal_att,file=__FILE__,line=__LINE__) endif diff --git a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 index b8749b5cd..c20c7af0e 100644 --- a/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 +++ b/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 @@ -646,7 +646,25 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) call abort_ice(trim(errmsg)) endif - ! Netcdf output created by PIO +#else + + ! Read the cice namelist as part of the call to cice_init1 + call t_startf ('cice_init1') + call cice_init1 + call t_stopf ('cice_init1') + + !----------------------------------------------------------------- + ! Advertise fields + !----------------------------------------------------------------- + call ice_advertise_fields(gcomp, importState, exportState, flds_scalar_name, rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + +#endif + + !---------------------------------------------------------------------------- + ! Initialize netcdf output info + !---------------------------------------------------------------------------- + call NUOPC_CompAttributeGet(gcomp, name="pio_typename", value=cvalue, & isPresent=isPresent, isSet=isSet, rc=rc) if (chkerr(rc,__LINE__,u_FILE_u)) return @@ -659,7 +677,6 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) write(nu_diag,*) trim(subname)//restart_format//'WARNING: restart_format from cice_namelist ignored' write(nu_diag,*) trim(subname)//'WARNING: using '//trim(cvalue)//' from ICE_modelio' endif - ! The only reason to set these is to detect in ice_history_write if the chunk/deflate settings are ok. select case (trim(cvalue)) case ('netcdf4p') @@ -674,22 +691,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) end select else if(mastertask) write(nu_diag,*) trim(subname)//'WARNING: pio_typename from driver needs to be set for netcdf output to work' - end if - -#else - - ! Read the cice namelist as part of the call to cice_init1 - call t_startf ('cice_init1') - call cice_init1 - call t_stopf ('cice_init1') - - !----------------------------------------------------------------- - ! Advertise fields - !----------------------------------------------------------------- - call ice_advertise_fields(gcomp, importState, exportState, flds_scalar_name, rc) - if (ChkErr(rc,__LINE__,u_FILE_u)) return - -#endif + endif !---------------------------------------------------------------------------- ! Initialize grid info